@rslsp1/fa-app-tools 2.0.78 → 2.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,3 +1,8 @@
1
+ import {
2
+ SzenenView,
3
+ createFlowSzenenViewPort
4
+ } from "./chunk-GEGJD43Y.mjs";
5
+ import "./chunk-FUY2OCVC.mjs";
1
6
  import {
2
7
  exportProjectToZip,
3
8
  importProjectFromZip,
@@ -22,10 +27,10 @@ import {
22
27
  setHFToken,
23
28
  tsFromEventPath,
24
29
  writeHFEvent
25
- } from "./chunk-BYD4RMYM.mjs";
30
+ } from "./chunk-VBWQP7PO.mjs";
26
31
 
27
32
  // package.json
28
- var version = "2.0.78";
33
+ var version = "2.0.81";
29
34
 
30
35
  // src/hooks/useOnClickOutside.ts
31
36
  import { useEffect } from "react";
@@ -63,6 +68,9 @@ function useKeyboardNavigation(history, currentResult, setCurrentResult) {
63
68
  }, [currentResult, history, setCurrentResult]);
64
69
  }
65
70
 
71
+ // src/features/szenen/szenenViewStyles.generated.ts
72
+ var SZENEN_VIEW_STYLES = '/* ==========================================================================\n SZENEN VIEW\n ========================================================================== */\n\n.szenen-view {\n display: grid;\n gap: var(--space-md);\n width: 100%;\n min-width: 0;\n font-family: var(--font-sans);\n padding: var(--space-md);\n}\n\n@media (max-width: 760px) {\n .szenen-view {\n padding: var(--space-sm);\n gap: var(--space-sm);\n }\n}\n\n.szenen-view__intro {\n display: flex;\n align-items: end;\n justify-content: space-between;\n gap: var(--space-md);\n padding: clamp(1rem, 3vw, 1.75rem);\n color: var(--color-text-primary);\n background:\n radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.16), transparent 34%),\n linear-gradient(135deg, var(--color-bg-surface), var(--color-bg-elevated));\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n}\n\n.szenen-view__intro h2,\n.szenen-view__intro p {\n margin: 0;\n}\n\n.szenen-view__intro h2 {\n margin-bottom: var(--space-xs);\n font-size: clamp(1.25rem, 4vw, 2rem);\n}\n\n.szenen-view__intro > div > p:last-child {\n max-width: 44rem;\n color: var(--color-text-secondary);\n}\n\n.szenen-view__eyebrow {\n margin-bottom: var(--space-xs) !important;\n color: var(--color-accent-teal, #2dd4bf);\n font-size: 0.72rem;\n font-weight: 800;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.szenen-view__step {\n flex: none;\n padding: 0.35rem 0.65rem;\n color: var(--color-text-primary);\n background: rgba(45, 212, 191, 0.12);\n border: 1px solid rgba(45, 212, 191, 0.35);\n border-radius: var(--radius-full);\n font-size: 0.78rem;\n font-weight: 700;\n}\n\n.szenen-view__nav {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-view__nav button,\n.szenen-view button {\n min-height: 2.25rem;\n padding: 0.45rem 0.75rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-elevated);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n cursor: pointer;\n}\n\n.szenen-view button:hover:not(:disabled) {\n color: var(--color-text-primary);\n background: var(--color-bg-surface-hover);\n border-color: var(--color-border-hover);\n}\n\n.szenen-view button:focus-visible,\n.szenen-view input:focus-visible,\n.szenen-view select:focus-visible,\n.szenen-view textarea:focus-visible {\n outline: 2px solid var(--color-accent-blue);\n outline-offset: 2px;\n}\n\n.szenen-view button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.szenen-view__nav button.is-active,\n.szenen-view__nav button[aria-selected="true"] {\n color: var(--color-text-primary);\n background: var(--color-accent-blue-dim);\n border-color: var(--color-accent-blue);\n}\n\n.szenen-view__area {\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-view__capability-note,\n.szenen-area__lead {\n margin: 0;\n padding: var(--space-sm) var(--space-md);\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border-left: 3px solid var(--color-accent-purple);\n border-radius: var(--radius-sm);\n}\n\n.szenen-view__host-notes {\n color: var(--color-text-secondary);\n}\n\n.szenen-view__host-notes > summary {\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.szenen-view input:not([type="checkbox"]),\n.szenen-view select,\n.szenen-view textarea {\n width: 100%;\n min-height: 2.25rem;\n padding: 0.5rem 0.65rem;\n color: var(--color-text-primary);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n font: inherit;\n}\n\n.szenen-view textarea {\n min-height: 7rem;\n resize: vertical;\n font-family: var(--font-mono);\n font-size: 0.8rem;\n}\n\n.szenen-view label {\n display: grid;\n gap: var(--space-xs);\n color: var(--color-text-secondary);\n font-size: 0.85rem;\n}\n\n.szenen-view code,\n.szenen-view pre {\n font-family: var(--font-mono);\n overflow-wrap: anywhere;\n}\n\n.szenen-view h3,\n.szenen-view h4,\n.szenen-view h5 {\n margin-top: 0;\n}\n\n.szenen-view ul,\n.szenen-view ol {\n padding-left: 1.25rem;\n}\n\n.szenen-elements,\n.szenen-detail,\n.szenen-scene,\n.szenen-setup,\n.szenen-shot,\n.szenen-media,\n.szenen-runs {\n display: grid;\n gap: var(--space-md);\n min-width: 0;\n}\n\n.szenen-elements__filter,\n.szenen-elements__create,\n.szenen-detail__actions,\n.szenen-runs__start,\n.szenen-scene-editor__add,\n.szenen-scene-editor__add-relation {\n display: flex;\n flex-wrap: wrap;\n align-items: end;\n gap: var(--space-sm);\n}\n\n.szenen-elements__filter > label,\n.szenen-elements__create > input,\n.szenen-runs__start > label,\n.szenen-scene-editor__add > input {\n flex: 1 1 16rem;\n}\n\n.szenen-elements__filter > label:has(input[type="checkbox"]) {\n display: flex;\n flex: 1 1 16rem;\n flex-direction: row;\n align-items: center;\n}\n\n.szenen-elements__filter input[type="checkbox"] {\n width: 1rem;\n height: 1rem;\n accent-color: var(--color-accent-blue);\n}\n\n.szenen-elements__list {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-elements__list > li > button {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: var(--space-xs) var(--space-sm);\n width: 100%;\n height: 100%;\n text-align: left;\n}\n\n.szenen-elements__list > li > button.is-selected,\n.szenen-elements__list > li > button[aria-current="true"] {\n background: var(--color-accent-blue-dim);\n border-color: var(--color-accent-blue);\n}\n\n.szenen-elements__type {\n color: var(--color-accent-blue);\n font-size: 0.75rem;\n font-weight: 700;\n text-transform: uppercase;\n}\n\n.szenen-elements__title {\n color: var(--color-text-primary);\n font-size: 0.95rem;\n}\n\n.szenen-elements__technical {\n grid-column: 1 / -1;\n color: var(--color-text-tertiary);\n font-size: 0.72rem;\n}\n\n.szenen-elements__subtype,\n.szenen-elements__retired {\n color: var(--color-text-secondary);\n font-size: 0.75rem;\n}\n\n.szenen-elements__retired {\n color: var(--color-warning);\n}\n\n.szenen-elements__id {\n grid-column: 1 / -1;\n color: var(--color-text-tertiary);\n font-size: 0.72rem;\n}\n\n.szenen-detail {\n margin-top: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n@media (min-width: 761px) {\n .szenen-detail {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n }\n}\n\n.szenen-detail > header,\n.szenen-detail__heads,\n.szenen-detail__draft,\n.szenen-capability {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n/* .szenen-runs ist ein eigenst\xE4ndiger sichtbarer Bereich, beh\xE4lt Styling auf Desktop */\n@media (min-width: 761px) {\n .szenen-runs {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n }\n}\n\n@media (max-width: 760px) {\n .szenen-runs {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n }\n}\n\n.szenen-detail__ids {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin-bottom: 0;\n color: var(--color-text-secondary);\n}\n\n.szenen-detail__heads ul,\n.szenen-scene-editor ul,\n.szenen-runs > ol,\n.szenen-capability > ul {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-detail__heads li,\n.szenen-scene-editor li,\n.szenen-runs > ol > li,\n.szenen-capability > ul > li {\n padding: var(--space-sm);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__field {\n margin-bottom: var(--space-md);\n}\n\n/* Stufe 6.7.2 (D-126) \u2014 Advanced-/Debug-Fl\xE4che f\xFCr die rohe, schema-getriebene\n * Feldliste einer Szene. Gestrichelt wie die anderen \u201EAngebot statt\n * Auskunft"-Bereiche, aber ohne Akzentfarbe: sie ist kein Vorschlag, sondern\n * ein Eskalationsweg. */\n.szenen-detail__technical {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__technical > summary {\n margin-bottom: var(--space-sm);\n color: var(--color-text-secondary);\n font-weight: 600;\n cursor: pointer;\n}\n\n.szenen-detail__technical[open] > summary {\n margin-bottom: var(--space-md);\n}\n\n.szenen-detail__field small,\n.szenen-capability small {\n color: var(--color-text-tertiary);\n}\n\n.szenen-detail__preview-errors,\n.szenen-detail__notice--error,\n.szenen-view [role="alert"] {\n color: #fecaca;\n background: var(--color-accent-red-dim);\n border-color: var(--color-accent-red);\n}\n\n.szenen-detail__notice {\n padding: var(--space-sm) var(--space-md);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__notice--success,\n.szenen-view [data-tone="success"] {\n color: #bbf7d0;\n background: var(--color-accent-green-dim);\n border-color: var(--color-accent-green);\n}\n\n.szenen-scene-editor {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--space-md);\n margin-bottom: 0;\n}\n\n.szenen-scene-editor > section {\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n/* \u2500\u2500 Stufe 6.7.2 (D-126): Node-/Relationskarten \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Nodes und Beziehungen sind `<details>` \u2014 dieselbe Interaktionssprache wie\n * \u201ERohantwort (Diagnose)" und \u201EBilder zu diesem Lauf" in RunsPanel.tsx. Kopf\n * (immer sichtbar) tr\xE4gt Inhalt zuerst, Technik zuletzt; Body (nur bei\n * ge\xF6ffneter Karte) tr\xE4gt die Bearbeitungscontrols. Padding wandert von der\n * `<li>` in Kopf/Body, damit die Karte keinen doppelten Rand bekommt. */\n.szenen-scene-editor li {\n padding: 0;\n overflow: hidden;\n}\n\n.szenen-node-karte__kopf,\n.szenen-relation-karte__kopf {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-xs) var(--space-sm);\n padding: var(--space-sm);\n cursor: pointer;\n list-style: none;\n}\n\n.szenen-node-karte__kopf::-webkit-details-marker,\n.szenen-relation-karte__kopf::-webkit-details-marker {\n display: none;\n}\n\n.szenen-node-karte__titel {\n flex: 1 1 12rem;\n min-width: 0;\n color: var(--color-text-primary);\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n\n.szenen-node-karte__typ {\n flex: none;\n padding: 0.15rem 0.55rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-full);\n font-size: 0.72rem;\n white-space: nowrap;\n}\n\n/* node_id klein, monospace, sekund\xE4r \u2014 sichtbar auch bei zugeklappter Karte,\n * aber optisch klar hinter Beschreibung und Typ. */\n.szenen-node-karte__meta {\n flex: 1 1 100%;\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n color: var(--color-text-tertiary);\n font-size: 0.75rem;\n}\n\n.szenen-node-karte__meta code {\n font-size: inherit;\n}\n\n.szenen-node-karte__body,\n.szenen-relation-karte__body {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-sm) var(--space-sm);\n border-top: 1px solid var(--color-border);\n}\n\n/* \xA74 \u2014 Prim\xE4raktion und destruktive Aktion optisch getrennt: \u201ENode/Beziehung\n * entfernen" bekommt einen eigenen, warnenden Ton statt gleichgewichtig neben\n * der normalen Bearbeitung zu stehen. */\n.szenen-node-karte__entfernen,\n.szenen-relation-karte__entfernen {\n justify-self: start;\n color: #fecaca;\n background: var(--color-accent-red-dim);\n border-color: var(--color-accent-red);\n}\n\n.szenen-relation-karte__kopf {\n font-size: 0.9rem;\n}\n\n.szenen-relation-karte__kopf code {\n overflow-wrap: anywhere;\n}\n\n.szenen-relation-karte__pfeil {\n flex: none;\n color: var(--color-text-secondary);\n}\n\n/* Die Composer-\xD6ffner (\u201E+ Node hinzuf\xFCgen", \u201E+ Beziehung hinzuf\xFCgen") sind\n * Angebote, keine Ausk\xFCnfte \u2014 dasselbe gestrichelte Muster wie beim Folgelauf\n * und der Fehlerrettung (\xA73.3/\xA73.5). */\n.szenen-scene-editor__oeffnen {\n width: 100%;\n border-style: dashed;\n}\n\n.szenen-refpicker {\n display: grid;\n gap: var(--space-sm);\n min-width: 0;\n margin: var(--space-sm) 0;\n padding: var(--space-sm) 0;\n border: none;\n border-radius: 0;\n}\n\n.szenen-refpicker legend {\n padding: 0 var(--space-xs);\n color: var(--color-text-secondary);\n font-weight: 600;\n}\n\n.szenen-capability > ul > li {\n display: grid;\n grid-template-columns: minmax(10rem, 1fr) auto minmax(14rem, 2fr);\n align-items: start;\n gap: var(--space-sm);\n}\n\n.szenen-capability__state {\n padding: 0.1rem 0.5rem;\n border-radius: var(--radius-full);\n font-size: 0.75rem;\n font-weight: 700;\n text-transform: uppercase;\n}\n\n.szenen-capability__state--yes {\n color: #bbf7d0;\n background: var(--color-accent-green-dim);\n}\n\n.szenen-capability__state--no {\n color: #fecaca;\n background: var(--color-accent-red-dim);\n}\n\n.szenen-capability__state--unknown {\n color: #fef08a;\n background: rgba(234, 179, 8, 0.2);\n}\n\n.szenen-runs > ol > li {\n display: grid;\n gap: var(--space-sm);\n}\n\n.szenen-runs > ol > li > header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-sm);\n color: var(--color-text-secondary);\n}\n\n.szenen-runs > ol > li[data-status="succeeded"] {\n border-left: 3px solid var(--color-success);\n}\n\n.szenen-runs > ol > li[data-status="failed"] {\n border-left: 3px solid var(--color-danger);\n}\n\n.szenen-runs details pre {\n max-height: 20rem;\n overflow: auto;\n padding: var(--space-sm);\n white-space: pre-wrap;\n color: var(--color-text-secondary);\n background: var(--color-bg-app);\n border-radius: var(--radius-sm);\n}\n\n.szenen-media > section {\n display: grid;\n gap: var(--space-sm);\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-media__lookup,\n.szenen-media__attach {\n display: flex;\n flex-wrap: wrap;\n align-items: end;\n gap: var(--space-sm);\n}\n\n.szenen-media__lookup > label,\n.szenen-media__attach > label:first-child {\n flex: 1 1 18rem;\n}\n\n.szenen-media__list {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-media__list > li {\n display: grid;\n grid-template-columns: minmax(12rem, 1fr) auto auto auto;\n align-items: center;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n@media (max-width: 760px) {\n .szenen-view {\n gap: var(--space-sm);\n }\n\n .szenen-view__intro {\n align-items: start;\n flex-direction: column;\n gap: var(--space-sm);\n padding: var(--space-md);\n }\n\n .szenen-view__intro h2 {\n font-size: 1.25rem;\n }\n\n .szenen-view__intro > div > p:last-child {\n font-size: 0.9rem;\n }\n\n .szenen-view__nav {\n position: sticky;\n top: 0;\n z-index: 2;\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--space-xs);\n padding: var(--space-xs);\n }\n\n .szenen-view__nav button {\n width: 100%;\n min-width: 0;\n min-height: 2.5rem;\n padding: 0.35rem 0.5rem;\n }\n\n\n .szenen-scene-editor {\n grid-template-columns: 1fr;\n }\n\n .szenen-capability > ul > li {\n grid-template-columns: 1fr;\n }\n\n .szenen-derive,\n .szenen-elements,\n .szenen-scene,\n .szenen-setup,\n .szenen-shot,\n .szenen-media,\n .szenen-runs {\n gap: var(--space-sm);\n }\n\n .szenen-elements__filter,\n .szenen-elements__create {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--space-sm);\n }\n\n .szenen-elements__filter > label,\n .szenen-elements__create > input {\n width: 100%;\n min-width: 0;\n flex: none;\n }\n\n .szenen-elements__filter > label:first-child,\n .szenen-elements__create > input {\n grid-column: 1 / -1;\n }\n\n .szenen-elements__filter > label:has(input[type="checkbox"]) {\n flex: none;\n }\n\n .szenen-detail__actions,\n .szenen-runs__start,\n .szenen-scene-editor__add,\n .szenen-scene-editor__add-relation {\n align-items: stretch;\n flex-direction: column;\n }\n\n .szenen-runs__start > *,\n .szenen-scene-editor__add > *,\n .szenen-scene-editor__add-relation > * {\n width: 100%;\n flex: none;\n }\n}\n\n/* \u2500\u2500 Stufe 6.5: Rekonstruktion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Bereich zeigt drei Dinge nebeneinander: den Vorschlag, das nicht\n * Ableitbare und die Widerspr\xFCche. Die Diagnosen sind deshalb bewusst nicht\n * kleiner gesetzt als der Vorschlag \u2014 wer sie \xFCbersieht, \xFCbernimmt Geratenes.\n */\n\n.szenen-derive {\n display: grid;\n gap: var(--space-md);\n}\n\n.szenen-form {\n display: grid;\n gap: var(--space-sm);\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-field {\n display: grid;\n gap: var(--space-xs);\n}\n\n.szenen-field > span {\n color: var(--color-text-secondary);\n font-size: 0.875rem;\n}\n\n.szenen-error {\n padding: var(--space-sm) var(--space-md);\n color: var(--color-danger);\n background: var(--color-accent-red-dim);\n border: 1px solid var(--color-accent-red);\n border-radius: var(--radius-sm);\n}\n\n.szenen-empty {\n padding: var(--space-md);\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-diagnose {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-left: 3px solid var(--color-warning);\n border-radius: var(--radius-sm);\n}\n\n/* Ein Widerspruch ist der schwerste der drei Befunde: dort steht eine\n * Entscheidung aus, die das System bewusst nicht getroffen hat (D-74). */\n.szenen-diagnose--konflikt {\n border-left-color: var(--color-danger);\n}\n\n.szenen-diagnose > h4 {\n margin: 0 0 var(--space-sm);\n font-size: 0.9375rem;\n}\n\n.szenen-diagnose ul {\n display: grid;\n gap: var(--space-xs);\n margin: 0;\n padding-left: var(--space-md);\n}\n\n.szenen-proposal {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-proposal > h4 {\n margin: 0 0 var(--space-sm);\n font-family: var(--font-mono);\n font-size: 0.9375rem;\n}\n\n.szenen-proposal__payload {\n max-height: 18rem;\n margin: 0 0 var(--space-sm);\n padding: var(--space-sm);\n overflow: auto;\n /* Ein erzeugter Prompt ist ein einziger langer Satz \u2014 ohne Umbruch\n verschwindet er nach rechts aus dem Bild. JSON-Payloads bringen ihre\n eigenen Zeilenumbrueche mit und leiden nicht darunter. */\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-family: var(--font-mono);\n font-size: 0.8125rem;\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-proposal__done {\n margin: var(--space-sm) 0 0;\n color: var(--color-success);\n}\n\n/* Die Belege eines Laufs: Rohantwort und Systemprompt. Zum Lesen und Kopieren,\n nicht zum Bedienen \u2014 deshalb voll markierbar und in Monospace. */\n.szenen-beleg__text {\n width: 100%;\n margin: var(--space-sm) 0 0;\n padding: var(--space-sm);\n font-family: var(--font-mono);\n font-size: 0.8125rem;\n line-height: 1.5;\n white-space: pre;\n background: var(--color-bg-app);\n color: var(--color-text);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n resize: vertical;\n}\n\n/* Der Folgelauf (D-87): abgesetzt, damit er nicht wie Teil des Ergebnisses\n aussieht \u2014 er ist eine Frage, keine Auskunft. */\n.szenen-folgelauf {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-folgelauf > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-run__herkunft {\n margin: 0 0 var(--space-sm);\n font-size: 0.875rem;\n color: var(--color-text-muted, inherit);\n}\n\n/* Widerspricht das Modell, ist das das Wichtigste auf der Seite. */\n.szenen-diagnose--antwort {\n border-left: 3px solid var(--color-accent, var(--color-border));\n}\n\n/* Der Bildw\xE4hler (D-92) \u2014 Kacheln wie in den Labs, aber mit dem CSS dieser\n Ansicht: eine gemeinsame Komponente \xFCber zwei Dom\xE4nengrenzen w\xE4re eine\n Kopplung, die keiner gewollt hat. */\n.szenen-bildwahl__liste {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));\n gap: var(--space-sm);\n margin: var(--space-sm) 0 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bildwahl__liste button {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n width: 100%;\n padding: var(--space-sm);\n text-align: left;\n font-size: 0.8125rem;\n}\n\n.szenen-bildwahl__liste img {\n width: 100%;\n aspect-ratio: 1;\n object-fit: cover;\n border-radius: var(--radius-sm);\n}\n\n.szenen-bildwahl__gewaehlt {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: var(--space-sm) 0 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bildwahl__gewaehlt li {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.25rem 0.5rem;\n font-size: 0.8125rem;\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-beleg__kopf {\n display: flex;\n align-items: center;\n gap: var(--space-sm);\n margin-top: var(--space-sm);\n}\n\n.szenen-diagnose > details + details {\n margin-top: var(--space-sm);\n}\n\n.szenen-diagnose > details > summary {\n cursor: pointer;\n font-weight: 600;\n}\n\n/* \u2500\u2500 Die Fehlerrettung (Stufe 6.6, A5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Sie steht im Fehlerblock und muss trotzdem als Werkzeug lesbar sein, nicht\n * als weitere Fehlermeldung. Deshalb abgesetzt wie der Folgelauf \u2014 und aus\n * demselben Grund: Beides sind Angebote, keine Ausk\xFCnfte.\n *\n * Der wichtigste optische Punkt ist die Trennung von Original und\n * Arbeitskopie. Das Original bekommt den ruhigen, \u201Efesten" Hintergrund der\n * Belege; die Kopie sieht aus wie ein normales Eingabefeld, weil sie eines\n * ist. */\n.szenen-rettung {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-rettung > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-rettung textarea[readonly] {\n background: var(--color-bg-surface);\n color: var(--color-text-secondary);\n font-family: var(--font-mono, monospace);\n font-size: 0.8125rem;\n}\n\n.szenen-rettung textarea:not([readonly]) {\n font-family: var(--font-mono, monospace);\n font-size: 0.8125rem;\n}\n\n.szenen-rettung__aktionen {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: var(--space-sm) 0;\n}\n\n/* Ein Befund tr\xE4gt Code, Bezug und Meldung. Der Code steht klein und\n * monospaced davor: Er ist die Kennung, nicht die Aussage. */\n.szenen-diagnose__liste {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding-left: var(--space-md);\n}\n\n.szenen-diagnose__liste code {\n font-size: 0.8125rem;\n}\n\n.szenen-diagnose__liste > li[data-severity=\'warning\'] {\n color: var(--color-text-secondary);\n}\n\n/* \u2500\u2500 Die Draft-Kette (Stufe 6.6, C4) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Hauptweg. Er steht nach den Einzel\xFCbernahmen und muss als das erkennbar\n * sein, was er ist: nicht eine weitere Option, sondern der k\xFCrzere Weg zum\n * selben Ziel. Deshalb durchgezogener Rahmen statt gestricheltem \u2014 er ist\n * Angebot **und** Empfehlung. */\n.szenen-kette {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-left: 3px solid var(--color-accent, var(--color-border));\n border-radius: var(--radius-sm);\n}\n\n.szenen-kette > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-kette ul {\n display: grid;\n gap: var(--space-xs);\n margin: 0 0 var(--space-sm);\n padding-left: var(--space-md);\n}\n\n.szenen-kette code {\n font-size: 0.8125rem;\n}\n\n/* Ein Hinweis, der eine Bedingung erklaert \u2014 nicht rot, weil er kein Fehler\n ist, aber abgesetzt, weil er eine Folge hat. */\n.szenen-detail__hint {\n margin: var(--space-sm) 0 0;\n padding: var(--space-sm);\n font-size: 0.875rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border-left: 3px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n/* \u2500\u2500 Stufe 6.7: Bilder am Prompt-Lauf (H0/H1) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Bereich tr\xE4gt zwei Dinge, die man nie verwechseln darf: den **Eingang**\n * (woraus der Prompt entstand) und den **Ausgang** (was daraus wurde). Sie\n * bekommen deshalb verschiedene Akzentkanten statt nur verschiedener\n * \xDCberschriften \u2014 wer schnell liest, sieht die Trennung, bevor er sie liest.\n */\n.szenen-bilder {\n display: grid;\n gap: var(--space-md);\n margin-top: var(--space-sm);\n}\n\n.szenen-bilder__eingang,\n.szenen-bilder__ausgang {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__eingang {\n border-left: 3px solid var(--color-accent-purple, var(--color-border));\n}\n\n.szenen-bilder__ausgang {\n border-left: 3px solid var(--color-accent-teal, var(--color-border));\n}\n\n.szenen-bilder h5 {\n margin: 0;\n}\n\n.szenen-bilder__ids {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: 0;\n align-items: baseline;\n color: var(--color-text-secondary);\n font-size: 0.875rem;\n}\n\n.szenen-bilder__eingangsliste,\n.szenen-bilder__batchliste,\n.szenen-bilder__auftraege {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bilder__eingangsliste > li,\n.szenen-bilder__batchliste > li,\n.szenen-bilder__auftraege > li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n font-size: 0.8125rem;\n}\n\n/* Ein unterbrochener Auftrag ist der Fall, f\xFCr den der Auftragssatz existiert.\n Er wird deshalb markiert \u2014 nicht rot, denn er ist kein Fehler, sondern eine\n offene Entscheidung. */\n.szenen-bilder__auftraege > li[data-status="started"] {\n border-left: 3px solid var(--color-warning);\n}\n\n.szenen-bilder__auftraege > li[data-status="succeeded"] {\n border-left: 3px solid var(--color-success);\n}\n\n.szenen-bilder__auftraege > li[data-status="partial"] {\n border-left: 3px solid var(--color-accent-blue, var(--color-border));\n}\n\n.szenen-bilder__auftraege > li[data-status="failed"] {\n border-left: 3px solid var(--color-danger);\n}\n\n.szenen-bilder__eingangsliste img,\n.szenen-bilder__batchliste img {\n width: 4rem;\n height: 4rem;\n object-fit: cover;\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__batch {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n/* Die Aktionen stehen abgesetzt: Sie sind Angebote, keine Ausk\xFCnfte \u2014 dasselbe\n Muster wie beim Folgelauf und bei der Fehlerrettung. */\n.szenen-bilder__aktion {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__aktion > h5 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-bilder__aktion ol {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding-left: var(--space-md);\n font-size: 0.8125rem;\n}\n';
73
+
66
74
  // src/lib/utils.ts
67
75
  var getFormattedTimestamp = () => {
68
76
  const d = /* @__PURE__ */ new Date();
@@ -78,7 +86,45 @@ var GLOBAL_STYLES = `
78
86
  .prompt-loading { background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%); background-size: 200% 100%; animation: prompt-shimmer 2s infinite linear; }
79
87
  @keyframes dropdown-enter { from { opacity: 0; transform: scale(0.95) translateY(-5px); } to { opacity: 1; transform: scale(1) translateY(0); } }
80
88
  .animate-dropdown { animation: dropdown-enter 0.1s ease-out forwards; }
81
- `;
89
+ .flow-szenen-entry { display: grid; gap: 6px; width: 100%; max-width: 280px; text-align: center; }
90
+ .flow-szenen-entry button, .flow-szenen-shell__header button { min-height: 44px; padding: 0 16px; color: #e7e5e4; background: #1d4ed8; border: 1px solid #3b82f6; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
91
+ .flow-szenen-entry button { display: flex; align-items: center; justify-content: center; gap: 8px; }
92
+ .flow-szenen-entry button:disabled { color: rgba(255,255,255,.3); background: transparent; border-color: rgba(255,255,255,.1); cursor: not-allowed; }
93
+ .flow-szenen-entry small { color: rgba(255,255,255,.35); font-size: 10px; }
94
+ .flow-workspace-picker { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; color: #f5f5f5; background: #050505; overflow: auto; }
95
+ .flow-workspace-picker__card { box-sizing: border-box; display: grid; gap: 16px; width: min(100%, 448px); padding: 24px; background: #171717; border: 1px solid #404040; border-radius: 12px; box-shadow: 0 25px 50px rgba(0,0,0,.55); }
96
+ .flow-workspace-picker__card header { display: grid; gap: 4px; }
97
+ .flow-workspace-picker__card header strong { font-size: 22px; }
98
+ .flow-workspace-picker__card header small, .flow-workspace-picker__choices small { color: #a3a3a3; }
99
+ .flow-workspace-picker__choices { display: grid; gap: 8px; }
100
+ .flow-workspace-picker__choices button { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 10px 12px; color: #f5f5f5; background: #050505; border: 1px solid #404040; border-radius: 8px; font: inherit; cursor: pointer; }
101
+ .flow-workspace-picker__choices button:hover { border-color: #3b82f6; background: #262626; }
102
+ .flow-workspace-picker__back { justify-self: start; padding: 0; color: #a3a3a3; background: transparent; border: 0; font: inherit; cursor: pointer; }
103
+ .flow-workspace-picker__warning { margin: 0; padding: 10px; color: #fbbf24; background: rgba(146,64,14,.2); border: 1px solid rgba(217,119,6,.4); border-radius: 8px; font-size: 12px; }
104
+ .flow-szenen-shell {
105
+ --sz-bg: #0e0e0e; --sz-surface: #171717; --sz-elevated: #262626;
106
+ --sz-border: #404040; --sz-text: #f5f5f5; --sz-muted: #a3a3a3;
107
+ --color-bg-app: #000; --color-bg-surface: #0a0a0a; --color-bg-surface-hover: #171717; --color-bg-elevated: #171717;
108
+ --color-border: #262626; --color-border-hover: #404040;
109
+ --color-text-primary: #fff; --color-text-secondary: #a3a3a3; --color-text-tertiary: #525252;
110
+ --color-accent-blue: #3b82f6; --color-accent-blue-dim: rgba(59,130,246,.2);
111
+ --color-accent-purple: #a855f7; --color-accent-green: #22c55e; --color-accent-green-dim: rgba(34,197,94,.2);
112
+ --color-accent-red: #ef4444; --color-accent-red-dim: rgba(239,68,68,.2);
113
+ --color-success: #22c55e; --color-warning: #eab308; --color-danger: #ef4444;
114
+ --space-xs: .25rem; --space-sm: .5rem; --space-md: 1rem;
115
+ --radius-sm: .25rem; --radius-md: .5rem; --radius-lg: .75rem; --radius-full: 9999px;
116
+ --font-sans: system-ui, -apple-system, sans-serif;
117
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
118
+ position: fixed; inset: 0; display: flex; flex-direction: column;
119
+ color: var(--sz-text); background: var(--sz-bg); overflow: hidden;
120
+ }
121
+ .flow-szenen-shell__header { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 8px 16px; background: #050505; border-bottom: 1px solid var(--sz-border); }
122
+ .flow-szenen-shell__header button { min-height: 36px; background: var(--sz-elevated); border-color: var(--sz-border); }
123
+ .flow-szenen-shell__header div { display: grid; gap: 2px; }
124
+ .flow-szenen-shell__header small { color: var(--sz-muted); font-family: monospace; }
125
+ .flow-szenen-shell__content { flex: 1; min-height: 0; padding: 16px; overflow: auto; }
126
+ @media (max-width: 760px) { .flow-szenen-shell__content { padding: 8px; } }
127
+ ` + SZENEN_VIEW_STYLES;
82
128
 
83
129
  // src/lib/aiHelpers.ts
84
130
  function buildGenerationPrompt(hierarchyText, mode = "creative") {
@@ -184,13 +230,13 @@ function createFlowServices(Flow) {
184
230
  generateText: async (text, options) => {
185
231
  try {
186
232
  const response = await Flow.generate.text(text, {
187
- thinkingLevel: "low",
233
+ thinkingLevel: options?.thinkingLevel ?? "low",
188
234
  systemInstruction: options?.systemInstruction || "You are an expert prompt engineer. Always return ONLY the generated prompt text, no headers, no quotes, no conversational filler.",
189
235
  images: options?.images
190
236
  });
191
237
  const result = response?.text?.trim() || "";
192
238
  if (!result) throw new Error("Empty AI response");
193
- return cleanAiResponse(result);
239
+ return options?.responseFormat === "json" ? result : cleanAiResponse(result);
194
240
  } catch (err) {
195
241
  throw interpretSdkError(err);
196
242
  }
@@ -603,7 +649,7 @@ function TagBaseSection(props) {
603
649
  className: "w-full bg-black/40 border border-white/10 rounded px-2 py-1.5 text-[11px] text-white outline-none focus:border-white/20",
604
650
  children: [
605
651
  /* @__PURE__ */ jsx7("option", { value: "", children: "\u2014 Context w\xE4hlen \u2014" }),
606
- tagBase.contexts.map((c) => /* @__PURE__ */ jsxs5("option", { value: c.id, children: [
652
+ tagBase.contexts.filter((c) => tagBase.users.find((u) => u.id === selectedUserId)?.context_ids?.includes(c.id)).map((c) => /* @__PURE__ */ jsxs5("option", { value: c.id, children: [
607
653
  c.label || c.name,
608
654
  " (id=",
609
655
  c.id,
@@ -1398,7 +1444,7 @@ function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMove
1398
1444
  }
1399
1445
 
1400
1446
  // src/components/AvatarArchitectApp.tsx
1401
- import { useState as useState24, useCallback as useCallback4, useMemo as useMemo5, useEffect as useEffect10, useRef as useRef11 } from "react";
1447
+ import { useState as useState25, useCallback as useCallback4, useMemo as useMemo6, useEffect as useEffect10, useRef as useRef11 } from "react";
1402
1448
 
1403
1449
  // src/components/PromptTab.tsx
1404
1450
  import { useRef as useRef5, useState as useState8 } from "react";
@@ -2262,7 +2308,7 @@ var ProjectSyncTab = ({
2262
2308
  {
2263
2309
  onClick: async () => {
2264
2310
  try {
2265
- const { hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-JKEVTY66.mjs");
2311
+ const { hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-WKQLNDHO.mjs");
2266
2312
  const file = await hfDownloadProject2(p.path, hfToken);
2267
2313
  onHfLoad(file);
2268
2314
  } catch (e) {
@@ -2854,12 +2900,19 @@ function deriveTagBaseWorkspaceTags(tags, contextId, pending = []) {
2854
2900
  }
2855
2901
  function validateTagBaseSelection(base, userId, contextId) {
2856
2902
  if (userId === null || contextId === null) return { valid: false, reason: null };
2857
- const userExists = base.users.some((u) => u.id === userId);
2903
+ const user = base.users.find((u) => u.id === userId);
2904
+ const userExists = user !== void 0;
2858
2905
  const contextExists = base.contexts.some((c) => c.id === contextId);
2859
- if (userExists && contextExists) return { valid: true, reason: null };
2906
+ const contextAllowed = userExists && Array.isArray(user.context_ids) && user.context_ids.includes(contextId);
2907
+ if (userExists && contextExists && contextAllowed) return { valid: true, reason: null };
2860
2908
  const missing = [];
2861
2909
  if (!userExists) missing.push(`User id=${userId}`);
2862
2910
  if (!contextExists) missing.push(`Context id=${contextId}`);
2911
+ if (userExists && contextExists && !Array.isArray(user.context_ids)) {
2912
+ missing.push(`User id=${userId} hat keine context_ids (Tag-Base muss neu erzeugt werden)`);
2913
+ } else if (userExists && contextExists && !contextAllowed) {
2914
+ missing.push(`Context id=${contextId} ist User id=${userId} nicht zugeordnet`);
2915
+ }
2863
2916
  return {
2864
2917
  valid: false,
2865
2918
  reason: `Gespeicherte Auswahl (${missing.join(", ")}) existiert nicht mehr in der Tag-Base (Version ${base.meta.version}) \u2014 bitte neu w\xE4hlen.`
@@ -2940,7 +2993,9 @@ function useTagBase(token, namespace) {
2940
2993
  }, [load]);
2941
2994
  const selectUser = useCallback2((userId) => {
2942
2995
  setSelectedUserId(userId);
2996
+ setSelectedContextId(null);
2943
2997
  writeStoredId(USER_ID_KEY, userId);
2998
+ writeStoredId(CONTEXT_ID_KEY, null);
2944
2999
  }, []);
2945
3000
  const selectContext = useCallback2((contextId) => {
2946
3001
  setSelectedContextId(contextId);
@@ -5586,9 +5641,80 @@ function ServerTab({ serverBaseUrl }) {
5586
5641
  ] });
5587
5642
  }
5588
5643
 
5589
- // src/components/AvatarArchitectApp.tsx
5644
+ // src/components/FlowWorkspacePicker.tsx
5645
+ import { useMemo as useMemo5, useState as useState24 } from "react";
5590
5646
  import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
5591
- function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }) {
5647
+ function FlowWorkspacePicker({
5648
+ tagBase,
5649
+ selectedUserId,
5650
+ message,
5651
+ onSelectUser,
5652
+ onSelectContext
5653
+ }) {
5654
+ const [step, setStep] = useState24(selectedUserId === null ? "user" : "context");
5655
+ const selectedUser = tagBase.users.find((user) => user.id === selectedUserId) ?? null;
5656
+ const contexts = useMemo5(() => {
5657
+ if (!selectedUser) return [];
5658
+ if (!Array.isArray(selectedUser.context_ids)) return [];
5659
+ const allowed = new Set(selectedUser.context_ids);
5660
+ return tagBase.contexts.filter((context) => allowed.has(context.id));
5661
+ }, [selectedUser, tagBase.contexts]);
5662
+ const chooseUser = (userId) => {
5663
+ onSelectUser(userId);
5664
+ setStep("context");
5665
+ };
5666
+ const back = () => {
5667
+ setStep("user");
5668
+ };
5669
+ return /* @__PURE__ */ jsx28("main", { className: "flow-workspace-picker", "data-testid": "flow-workspace-picker", children: /* @__PURE__ */ jsxs26("section", { className: "flow-workspace-picker__card", children: [
5670
+ /* @__PURE__ */ jsxs26("header", { children: [
5671
+ /* @__PURE__ */ jsx28("strong", { children: "FineArt Flow" }),
5672
+ /* @__PURE__ */ jsx28("small", { children: step === "user" ? "Benutzer w\xE4hlen" : `Kontext f\xFCr ${selectedUser?.username ?? `User ${selectedUserId}`}` })
5673
+ ] }),
5674
+ message && /* @__PURE__ */ jsx28("p", { className: "flow-workspace-picker__warning", children: message }),
5675
+ step === "user" ? /* @__PURE__ */ jsxs26("div", { className: "flow-workspace-picker__choices", "aria-label": "Benutzer w\xE4hlen", children: [
5676
+ tagBase.users.map((user) => /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => chooseUser(user.id), children: [
5677
+ /* @__PURE__ */ jsx28("span", { children: user.username }),
5678
+ /* @__PURE__ */ jsxs26("small", { children: [
5679
+ "id=",
5680
+ user.id
5681
+ ] })
5682
+ ] }, user.id)),
5683
+ tagBase.users.length === 0 && /* @__PURE__ */ jsxs26("p", { children: [
5684
+ "Tag-Base v",
5685
+ tagBase.meta.version,
5686
+ " enth\xE4lt keine Benutzer."
5687
+ ] })
5688
+ ] }) : /* @__PURE__ */ jsxs26(Fragment10, { children: [
5689
+ /* @__PURE__ */ jsx28("button", { className: "flow-workspace-picker__back", type: "button", onClick: back, children: "\u2190 Anderen Benutzer w\xE4hlen" }),
5690
+ /* @__PURE__ */ jsxs26("div", { className: "flow-workspace-picker__choices", "aria-label": "Kontext w\xE4hlen", children: [
5691
+ contexts.map((context) => /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => onSelectContext(context.id), children: [
5692
+ /* @__PURE__ */ jsx28("span", { children: context.label || context.name }),
5693
+ /* @__PURE__ */ jsxs26("small", { children: [
5694
+ "id=",
5695
+ context.id
5696
+ ] })
5697
+ ] }, context.id)),
5698
+ selectedUser && !Array.isArray(selectedUser.context_ids) && /* @__PURE__ */ jsxs26("p", { children: [
5699
+ "User ",
5700
+ selectedUser.id,
5701
+ " hat keine context_ids. Die Tag-Base muss auf dem Server neu erzeugt werden."
5702
+ ] }),
5703
+ selectedUser && Array.isArray(selectedUser.context_ids) && contexts.length === 0 && /* @__PURE__ */ jsxs26("p", { children: [
5704
+ "F\xFCr User ",
5705
+ selectedUser.id,
5706
+ " sind in Tag-Base v",
5707
+ tagBase.meta.version,
5708
+ " keine Contexts freigegeben."
5709
+ ] })
5710
+ ] })
5711
+ ] })
5712
+ ] }) });
5713
+ }
5714
+
5715
+ // src/components/AvatarArchitectApp.tsx
5716
+ import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
5717
+ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, requireWorkspaceSelection = false, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }) {
5592
5718
  useEffect10(() => {
5593
5719
  const id = "flow-styles";
5594
5720
  if (!document.getElementById(id)) {
@@ -5598,19 +5724,20 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5598
5724
  document.head.appendChild(style);
5599
5725
  }
5600
5726
  }, []);
5601
- const [showStart, setShowStart] = useState24(true);
5602
- const [layoutChoice, setLayoutChoice] = useState24(() => {
5727
+ const [showStart, setShowStart] = useState25(true);
5728
+ const [showSzenen, setShowSzenen] = useState25(false);
5729
+ const [layoutChoice, setLayoutChoice] = useState25(() => {
5603
5730
  try {
5604
5731
  return localStorage.getItem("aa-layout") || null;
5605
5732
  } catch {
5606
5733
  return null;
5607
5734
  }
5608
5735
  });
5609
- const [projectLoaded, setProjectLoaded] = useState24(false);
5610
- const [hfToken, setHfToken] = useState24(initialHfToken || "");
5611
- const [hfTokenInput, setHfTokenInput] = useState24(initialHfToken || "");
5612
- const [isLoadingFromHF, setIsLoadingFromHF] = useState24(false);
5613
- const [hfNamespaceLocal, setHfNamespaceLocal] = useState24(() => {
5736
+ const [projectLoaded, setProjectLoaded] = useState25(false);
5737
+ const [hfToken, setHfToken] = useState25(initialHfToken || "");
5738
+ const [hfTokenInput, setHfTokenInput] = useState25(initialHfToken || "");
5739
+ const [isLoadingFromHF, setIsLoadingFromHF] = useState25(false);
5740
+ const [hfNamespaceLocal, setHfNamespaceLocal] = useState25(() => {
5614
5741
  const KNOWN = ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"];
5615
5742
  const DEFAULT = "app.art-by-rolands.de/";
5616
5743
  try {
@@ -5622,17 +5749,20 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5622
5749
  return DEFAULT;
5623
5750
  }
5624
5751
  });
5625
- const [hfNamespaceFromServer, setHfNamespaceFromServer] = useState24(null);
5752
+ const [hfNamespaceFromServer, setHfNamespaceFromServer] = useState25(null);
5626
5753
  useEffect10(() => {
5627
- if (hfNamespace !== void 0) return;
5628
- const backendUrl = typeof window !== "undefined" ? window.BACKEND_URL || window.location.origin : null;
5629
- if (!backendUrl) return;
5630
- fetch(`${backendUrl}/api/status`).then((r) => r.json()).then((d) => {
5754
+ if (hfNamespace !== void 0 || !serverBaseUrl) return;
5755
+ fetch(`${serverBaseUrl}/api/status`).then((r) => r.json()).then((d) => {
5631
5756
  if (typeof d.hfNamespace === "string" && d.hfNamespace) setHfNamespaceFromServer(d.hfNamespace);
5632
5757
  }).catch(() => {
5633
5758
  });
5634
- }, [hfNamespace]);
5759
+ }, [hfNamespace, serverBaseUrl]);
5635
5760
  const effectiveNamespace = hfNamespace ?? hfNamespaceFromServer ?? hfNamespaceLocal;
5761
+ const szenenPort = useMemo6(() => hfToken ? createFlowSzenenViewPort({
5762
+ generateText: onGeneratePrompt,
5763
+ token: hfToken,
5764
+ namespace: effectiveNamespace
5765
+ }) : null, [hfToken, effectiveNamespace, onGeneratePrompt]);
5636
5766
  const {
5637
5767
  state: hfState,
5638
5768
  isLoading: isHfRefreshing,
@@ -5646,36 +5776,36 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5646
5776
  hasStateZip
5647
5777
  } = useHFState(hfToken, effectiveNamespace);
5648
5778
  const tagBaseResult = useTagBase(hfToken, effectiveNamespace);
5649
- const [imageUploadStatus, setImageUploadStatus] = useState24(/* @__PURE__ */ new Map());
5650
- const [bootstrapLog, setBootstrapLog] = useState24([]);
5651
- const [isBootstrapping, setIsBootstrapping] = useState24(false);
5652
- const [hfMissingImages, setHfMissingImages] = useState24([]);
5653
- const syncTopSlot = /* @__PURE__ */ jsxs26(Fragment10, { children: [
5654
- localOnlyCount > 0 && /* @__PURE__ */ jsxs26("div", { style: { background: "rgba(234,179,8,0.15)", border: "1px solid rgba(234,179,8,0.3)", padding: "4px 10px", fontSize: 11, color: "#fbbf24", borderRadius: 4, marginBottom: 4 }, children: [
5779
+ const [imageUploadStatus, setImageUploadStatus] = useState25(/* @__PURE__ */ new Map());
5780
+ const [bootstrapLog, setBootstrapLog] = useState25([]);
5781
+ const [isBootstrapping, setIsBootstrapping] = useState25(false);
5782
+ const [hfMissingImages, setHfMissingImages] = useState25([]);
5783
+ const syncTopSlot = /* @__PURE__ */ jsxs27(Fragment11, { children: [
5784
+ localOnlyCount > 0 && /* @__PURE__ */ jsxs27("div", { style: { background: "rgba(234,179,8,0.15)", border: "1px solid rgba(234,179,8,0.3)", padding: "4px 10px", fontSize: 11, color: "#fbbf24", borderRadius: 4, marginBottom: 4 }, children: [
5655
5785
  "\u26A0 ",
5656
5786
  localOnlyCount,
5657
5787
  " lokale Event",
5658
5788
  localOnlyCount > 1 ? "s" : "",
5659
5789
  " noch nicht auf HF best\xE4tigt"
5660
5790
  ] }),
5661
- pendingBufferCount > 0 && /* @__PURE__ */ jsxs26("div", { style: { background: "linear-gradient(90deg,#f59e0b,#ef4444)", padding: "4px 10px", fontSize: 11, color: "#fff", borderRadius: 4, marginBottom: 4 }, children: [
5791
+ pendingBufferCount > 0 && /* @__PURE__ */ jsxs27("div", { style: { background: "linear-gradient(90deg,#f59e0b,#ef4444)", padding: "4px 10px", fontSize: 11, color: "#fff", borderRadius: 4, marginBottom: 4 }, children: [
5662
5792
  pendingBufferCount,
5663
5793
  " \xC4nderung",
5664
5794
  pendingBufferCount > 1 ? "en" : "",
5665
5795
  " lokal \u2014 bei Flow-Reload verloren wenn nicht synchronisiert"
5666
5796
  ] }),
5667
- eventCount > 100 && /* @__PURE__ */ jsxs26("div", { style: { background: "#dc2626", color: "#fff", padding: "5px 10px", borderRadius: 4, marginBottom: 4, fontWeight: 600, fontSize: 11 }, children: [
5797
+ eventCount > 100 && /* @__PURE__ */ jsxs27("div", { style: { background: "#dc2626", color: "#fff", padding: "5px 10px", borderRadius: 4, marginBottom: 4, fontWeight: 600, fontSize: 11 }, children: [
5668
5798
  "\u26A0 ",
5669
5799
  eventCount,
5670
5800
  " Events nicht konsolidiert \u2014 Konsolidierung dringend empfohlen"
5671
5801
  ] }),
5672
- eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ jsxs26("div", { style: { background: "#44403c", color: "#a8a29e", padding: "4px 10px", borderRadius: 4, marginBottom: 4, fontSize: 11 }, children: [
5802
+ eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ jsxs27("div", { style: { background: "#44403c", color: "#a8a29e", padding: "4px 10px", borderRadius: 4, marginBottom: 4, fontSize: 11 }, children: [
5673
5803
  eventCount,
5674
5804
  " Events seit letzter Konsolidierung \u2014 Konsolidierung empfohlen"
5675
5805
  ] }),
5676
- hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ jsxs26("div", { style: { background: "#1c1917", border: "1px solid #44403c", borderRadius: 6, padding: "10px 12px" }, children: [
5677
- /* @__PURE__ */ jsx28("div", { style: { fontSize: 12, color: "#a8a29e", marginBottom: 6 }, children: effectiveNamespace ? `Kein State-Snapshot in HF (${effectiveNamespace}) \u2014 aus Legacy-Daten (tags.json + metadata.json) migrieren?` : "Namespace wird geladen\u2026" }),
5678
- /* @__PURE__ */ jsx28(
5806
+ hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ jsxs27("div", { style: { background: "#1c1917", border: "1px solid #44403c", borderRadius: 6, padding: "10px 12px" }, children: [
5807
+ /* @__PURE__ */ jsx29("div", { style: { fontSize: 12, color: "#a8a29e", marginBottom: 6 }, children: effectiveNamespace ? `Kein State-Snapshot in HF (${effectiveNamespace}) \u2014 aus Legacy-Daten (tags.json + metadata.json) migrieren?` : "Namespace wird geladen\u2026" }),
5808
+ /* @__PURE__ */ jsx29(
5679
5809
  "button",
5680
5810
  {
5681
5811
  disabled: isBootstrapping || !effectiveNamespace,
@@ -5696,7 +5826,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5696
5826
  children: isBootstrapping ? "Migriere\u2026" : "Legacy-Migration starten"
5697
5827
  }
5698
5828
  ),
5699
- bootstrapLog.length > 0 && /* @__PURE__ */ jsx28("div", { style: { marginTop: 6, fontFamily: "monospace", fontSize: 10, color: "#78716c", lineHeight: 1.6 }, children: bootstrapLog.map((l, i) => /* @__PURE__ */ jsx28("div", { children: l }, i)) })
5829
+ bootstrapLog.length > 0 && /* @__PURE__ */ jsx29("div", { style: { marginTop: 6, fontFamily: "monospace", fontSize: 10, color: "#78716c", lineHeight: 1.6 }, children: bootstrapLog.map((l, i) => /* @__PURE__ */ jsx29("div", { children: l }, i)) })
5700
5830
  ] })
5701
5831
  ] });
5702
5832
  const wsInputRef = useRef11(null);
@@ -5708,17 +5838,17 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5708
5838
  setLayoutChoice(choice);
5709
5839
  setShowStart(false);
5710
5840
  };
5711
- const [nodes, setNodes] = useState24([{ id: "1", type: "custom", position: { x: 0, y: 0 }, data: { label: "Fine Art Project", placeholder: "Name..." } }]);
5712
- const [edges, setEdges] = useState24([]);
5713
- const [history, setHistory] = useState24([]);
5714
- const [galleryItems, setGalleryItems] = useState24([]);
5841
+ const [nodes, setNodes] = useState25([{ id: "1", type: "custom", position: { x: 0, y: 0 }, data: { label: "Fine Art Project", placeholder: "Name..." } }]);
5842
+ const [edges, setEdges] = useState25([]);
5843
+ const [history, setHistory] = useState25([]);
5844
+ const [galleryItems, setGalleryItems] = useState25([]);
5715
5845
  const galleryItemsRef = useRef11([]);
5716
5846
  useEffect10(() => {
5717
5847
  galleryItemsRef.current = galleryItems;
5718
5848
  }, [galleryItems]);
5719
5849
  const hfImageNotFoundRef = useRef11(/* @__PURE__ */ new Map());
5720
- const [galleryVisibleCount, setGalleryVisibleCount] = useState24(20);
5721
- const [historyVisibleCount, setHistoryVisibleCount] = useState24(20);
5850
+ const [galleryVisibleCount, setGalleryVisibleCount] = useState25(20);
5851
+ const [historyVisibleCount, setHistoryVisibleCount] = useState25(20);
5722
5852
  const loadThumbnailsForEntries = useCallback4(async (entries) => {
5723
5853
  for (const entry of entries) {
5724
5854
  if (galleryItemsRef.current.find((g) => g.id === entry.id)?.base64) continue;
@@ -5777,24 +5907,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5777
5907
  const sortedMeta = [...hfState.metadata].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
5778
5908
  loadThumbnailsForEntries(sortedMeta.slice(0, historyVisibleCount));
5779
5909
  }, [hfState, historyVisibleCount, loadThumbnailsForEntries]);
5780
- const [activePrompt, setActivePrompt] = useState24("");
5781
- const [isSynthesizing, setIsSynthesizing] = useState24(false);
5782
- const [activeGenerationsCount, setActiveGenerationsCount] = useState24(0);
5783
- const [currentResult, setCurrentResult] = useState24(null);
5784
- const [focusedNodeId, setFocusedNodeId] = useState24(null);
5785
- const [leftTab, setLeftTab] = useState24("prompt");
5786
- const [promptFeedback, setPromptFeedback] = useState24(null);
5787
- const [lastPromptPayload, setLastPromptPayload] = useState24(null);
5788
- const [isPromptTabGenerating, setIsPromptTabGenerating] = useState24(false);
5789
- const [activeTab, setActiveTab] = useState24("history");
5790
- const [mobileTab, setMobileTab] = useState24("stage");
5791
- const [middlePanel, setMiddlePanel] = useState24("stage");
5792
- const [recentLabItems, setRecentLabItems] = useState24([]);
5793
- const [aspectRatio, setAspectRatio] = useState24("1:1");
5794
- const [selectedModel, setSelectedModel] = useState24("\u{1F34C} Nano Banana Pro");
5795
- const [seed, setSeed] = useState24(Math.floor(Math.random() * 1e6));
5796
- const [seedMode, setSeedMode] = useState24("random");
5797
- const [imageCount, setImageCount] = useState24(() => {
5910
+ const [activePrompt, setActivePrompt] = useState25("");
5911
+ const [isSynthesizing, setIsSynthesizing] = useState25(false);
5912
+ const [activeGenerationsCount, setActiveGenerationsCount] = useState25(0);
5913
+ const [currentResult, setCurrentResult] = useState25(null);
5914
+ const [focusedNodeId, setFocusedNodeId] = useState25(null);
5915
+ const [leftTab, setLeftTab] = useState25("prompt");
5916
+ const [promptFeedback, setPromptFeedback] = useState25(null);
5917
+ const [lastPromptPayload, setLastPromptPayload] = useState25(null);
5918
+ const [isPromptTabGenerating, setIsPromptTabGenerating] = useState25(false);
5919
+ const [activeTab, setActiveTab] = useState25("history");
5920
+ const [mobileTab, setMobileTab] = useState25("stage");
5921
+ const [middlePanel, setMiddlePanel] = useState25("stage");
5922
+ const [recentLabItems, setRecentLabItems] = useState25([]);
5923
+ const [aspectRatio, setAspectRatio] = useState25("1:1");
5924
+ const [selectedModel, setSelectedModel] = useState25("\u{1F34C} Nano Banana Pro");
5925
+ const [seed, setSeed] = useState25(Math.floor(Math.random() * 1e6));
5926
+ const [seedMode, setSeedMode] = useState25("random");
5927
+ const [imageCount, setImageCount] = useState25(() => {
5798
5928
  try {
5799
5929
  const v = parseInt(localStorage.getItem("aa-image-count") || "", 10);
5800
5930
  return v >= 1 && v <= 8 ? v : 4;
@@ -5816,42 +5946,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5816
5946
  { label: "4 Bilder", value: "4" },
5817
5947
  { label: "8 Bilder", value: "8" }
5818
5948
  ];
5819
- const [isLeftCollapsed, setIsLeftCollapsed] = useState24(false);
5820
- const [isRightCollapsed, setIsRightCollapsed] = useState24(false);
5821
- const [leftPanelWidth, setLeftPanelWidth] = useState24(() => {
5949
+ const [isLeftCollapsed, setIsLeftCollapsed] = useState25(false);
5950
+ const [isRightCollapsed, setIsRightCollapsed] = useState25(false);
5951
+ const [leftPanelWidth, setLeftPanelWidth] = useState25(() => {
5822
5952
  try {
5823
5953
  return parseInt(localStorage.getItem("aa-left-width") || "260", 10);
5824
5954
  } catch {
5825
5955
  return 260;
5826
5956
  }
5827
5957
  });
5828
- const [rightPanelWidth, setRightPanelWidth] = useState24(() => {
5958
+ const [rightPanelWidth, setRightPanelWidth] = useState25(() => {
5829
5959
  try {
5830
5960
  return parseInt(localStorage.getItem("aa-right-width") || "320", 10);
5831
5961
  } catch {
5832
5962
  return 320;
5833
5963
  }
5834
5964
  });
5835
- const [isPromptCollapsed, setIsPromptCollapsed] = useState24(false);
5836
- const [projectActionState, setProjectActionState] = useState24("idle");
5965
+ const [isPromptCollapsed, setIsPromptCollapsed] = useState25(false);
5966
+ const [projectActionState, setProjectActionState] = useState25("idle");
5837
5967
  const syncServerDataRef = useRef11(null);
5838
- const [workspaceTags, setWorkspaceTags] = useState24(null);
5839
- const [serverProjects, setServerProjects] = useState24([]);
5840
- const [isLoadingFromServer, setIsLoadingFromServer] = useState24(false);
5841
- const [highContrast, setHighContrast] = useState24(() => {
5968
+ const [workspaceTags, setWorkspaceTags] = useState25(null);
5969
+ const [serverProjects, setServerProjects] = useState25([]);
5970
+ const [isLoadingFromServer, setIsLoadingFromServer] = useState25(false);
5971
+ const [highContrast, setHighContrast] = useState25(() => {
5842
5972
  try {
5843
5973
  return localStorage.getItem("aa-contrast") === "high";
5844
5974
  } catch {
5845
5975
  return false;
5846
5976
  }
5847
5977
  });
5848
- const [activeReferenceId, setActiveReferenceId] = useState24(null);
5849
- const [activeReferenceThumbnail, setActiveReferenceThumbnail] = useState24(null);
5850
- const [isScanningImage, setIsScanningImage] = useState24(false);
5851
- const [touchStartX, setTouchStartX] = useState24(null);
5852
- const [isFullscreen, setIsFullscreen] = useState24(false);
5853
- const [zoomScale, setZoomScale] = useState24(1);
5854
- const [zoomOffset, setZoomOffset] = useState24({ x: 0, y: 0 });
5978
+ const [activeReferenceId, setActiveReferenceId] = useState25(null);
5979
+ const [activeReferenceThumbnail, setActiveReferenceThumbnail] = useState25(null);
5980
+ const [isScanningImage, setIsScanningImage] = useState25(false);
5981
+ const [touchStartX, setTouchStartX] = useState25(null);
5982
+ const [isFullscreen, setIsFullscreen] = useState25(false);
5983
+ const [zoomScale, setZoomScale] = useState25(1);
5984
+ const [zoomOffset, setZoomOffset] = useState25({ x: 0, y: 0 });
5855
5985
  const lastPinchDist = useRef11(null);
5856
5986
  const lastTapTime = useRef11(0);
5857
5987
  const dragStart = useRef11(null);
@@ -5917,7 +6047,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5917
6047
  setActiveReferenceId(null);
5918
6048
  setActiveReferenceThumbnail(null);
5919
6049
  };
5920
- const labServices = useMemo5(() => {
6050
+ const labServices = useMemo6(() => {
5921
6051
  const available = groupGenerationsToLabItems([...galleryItems, ...history]);
5922
6052
  return {
5923
6053
  availableItems: available,
@@ -5997,7 +6127,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5997
6127
  setIsScanningImage(false);
5998
6128
  }
5999
6129
  };
6000
- const currentIndex = useMemo5(() => history.findIndex((h) => h.id === currentResult?.id), [history, currentResult]);
6130
+ const currentIndex = useMemo6(() => history.findIndex((h) => h.id === currentResult?.id), [history, currentResult]);
6001
6131
  const goToPrev = useCallback4(() => {
6002
6132
  if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
6003
6133
  }, [currentIndex, history]);
@@ -6026,7 +6156,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6026
6156
  });
6027
6157
  }
6028
6158
  }, [hfToken, effectiveNamespace, hfWriteEvent]);
6029
- const currentGroup = useMemo5(() => {
6159
+ const currentGroup = useMemo6(() => {
6030
6160
  if (!currentResult?.prompt) return [];
6031
6161
  const groups = groupByPrompt(galleryItems.filter((g) => g.status === "done" && !!g.base64));
6032
6162
  const group = groups.find((gr) => gr.prompt === currentResult.prompt);
@@ -6058,15 +6188,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6058
6188
  })();
6059
6189
  }, [currentResult?.id, currentResult?.prompt]);
6060
6190
  const hcStyle = highContrast ? { filter: "brightness(1.6) contrast(1.05)" } : void 0;
6061
- const runningBadge = activeGenerationsCount > 0 ? /* @__PURE__ */ jsxs26(
6191
+ const runningBadge = activeGenerationsCount > 0 ? /* @__PURE__ */ jsxs27(
6062
6192
  "div",
6063
6193
  {
6064
6194
  className: "flex items-center gap-1 rounded-full bg-sky-500/15 border border-sky-400/30 px-2 shrink-0",
6065
6195
  style: { height: 24 },
6066
6196
  title: `${activeGenerationsCount} Generierung${activeGenerationsCount === 1 ? "" : "en"} l\xE4uft gerade`,
6067
6197
  children: [
6068
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-sky-300", style: { fontSize: 14, lineHeight: 1 }, children: "autorenew" }),
6069
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold text-sky-300 tabular-nums", children: activeGenerationsCount })
6198
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-sky-300", style: { fontSize: 14, lineHeight: 1 }, children: "autorenew" }),
6199
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold text-sky-300 tabular-nums", children: activeGenerationsCount })
6070
6200
  ]
6071
6201
  }
6072
6202
  ) : null;
@@ -6079,7 +6209,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6079
6209
  return `${indent}- ${node.data.label || "(unbenannt)"}
6080
6210
  ` + childrenIds.map((id) => getSubtreeFormat(id, depth + 1)).join("");
6081
6211
  }, [nodes, edges]);
6082
- const activePath = useMemo5(() => {
6212
+ const activePath = useMemo6(() => {
6083
6213
  if (!focusedNodeId) return /* @__PURE__ */ new Set();
6084
6214
  const path = /* @__PURE__ */ new Set([focusedNodeId]);
6085
6215
  let currId = focusedNodeId;
@@ -6467,10 +6597,49 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6467
6597
  const all = Object.entries(merged).flatMap(([cat, tags]) => tags.map((t) => ({ ...t, category: cat })));
6468
6598
  return { by_category: merged, all };
6469
6599
  };
6600
+ if (requireWorkspaceSelection) {
6601
+ if (!hfToken) {
6602
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsx29("section", { className: "flow-workspace-picker__card", role: "alert", children: "HF-Token fehlt \u2014 User und Context koennen nicht aus der Tag-Base geladen werden." }) });
6603
+ }
6604
+ if (tagBaseResult.isLoading) {
6605
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", children: [
6606
+ "Lade User und Contexts aus ",
6607
+ effectiveNamespace,
6608
+ "\u2026"
6609
+ ] }) });
6610
+ }
6611
+ if (tagBaseResult.error) {
6612
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", role: "alert", children: [
6613
+ "Tag-Base ",
6614
+ effectiveNamespace,
6615
+ " konnte nicht geladen werden: ",
6616
+ tagBaseResult.error
6617
+ ] }) });
6618
+ }
6619
+ if (!tagBaseResult.tagBase) {
6620
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", role: "alert", children: [
6621
+ "Im Namespace ",
6622
+ effectiveNamespace,
6623
+ " fehlt tags-state-*.zip. Der Server muss zuerst die Tag-Base erzeugen."
6624
+ ] }) });
6625
+ }
6626
+ if (tagBaseResult.needsPicker) {
6627
+ return /* @__PURE__ */ jsx29(
6628
+ FlowWorkspacePicker,
6629
+ {
6630
+ tagBase: tagBaseResult.tagBase,
6631
+ selectedUserId: tagBaseResult.selectedUserId,
6632
+ message: tagBaseResult.pickerMessage,
6633
+ onSelectUser: tagBaseResult.selectUser,
6634
+ onSelectContext: tagBaseResult.selectContext
6635
+ }
6636
+ );
6637
+ }
6638
+ }
6470
6639
  if (isFullscreen && currentResult?.base64) {
6471
6640
  const fsRaw = currentResult.fullBase64 || currentResult.base64;
6472
6641
  const fsBase64 = fsRaw.startsWith("data:") ? fsRaw : `data:image/png;base64,${fsRaw}`;
6473
- return /* @__PURE__ */ jsxs26(
6642
+ return /* @__PURE__ */ jsxs27(
6474
6643
  "div",
6475
6644
  {
6476
6645
  className: "fixed inset-0 bg-black z-50 flex items-center justify-center overflow-hidden touch-none",
@@ -6478,7 +6647,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6478
6647
  onTouchMove: handleFsTouchMove,
6479
6648
  onTouchEnd: handleFsTouchEnd,
6480
6649
  children: [
6481
- /* @__PURE__ */ jsx28(
6650
+ /* @__PURE__ */ jsx29(
6482
6651
  "img",
6483
6652
  {
6484
6653
  src: fsBase64,
@@ -6495,77 +6664,95 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6495
6664
  }
6496
6665
  }
6497
6666
  ),
6498
- /* @__PURE__ */ jsx28("button", { onClick: closeFullscreen, className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "close" }) }),
6499
- zoomScale > 1 && /* @__PURE__ */ jsx28("button", { onClick: () => {
6667
+ /* @__PURE__ */ jsx29("button", { onClick: closeFullscreen, className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "close" }) }),
6668
+ zoomScale > 1 && /* @__PURE__ */ jsx29("button", { onClick: () => {
6500
6669
  setZoomScale(1);
6501
6670
  setZoomOffset({ x: 0, y: 0 });
6502
- }, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "zoom_out_map" }) }),
6503
- history.length > 1 && /* @__PURE__ */ jsxs26(Fragment10, { children: [
6504
- /* @__PURE__ */ jsx28("button", { onClick: () => {
6671
+ }, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "zoom_out_map" }) }),
6672
+ history.length > 1 && /* @__PURE__ */ jsxs27(Fragment11, { children: [
6673
+ /* @__PURE__ */ jsx29("button", { onClick: () => {
6505
6674
  if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
6506
- }, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6507
- /* @__PURE__ */ jsx28("button", { onClick: () => {
6675
+ }, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6676
+ /* @__PURE__ */ jsx29("button", { onClick: () => {
6508
6677
  if (currentIndex < history.length - 1) setCurrentResult(history[currentIndex + 1]);
6509
- }, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6510
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6678
+ }, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6679
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6511
6680
  currentIndex + 1,
6512
6681
  " / ",
6513
6682
  history.length
6514
6683
  ] })
6515
6684
  ] }),
6516
- zoomScale === 1 && /* @__PURE__ */ jsx28("div", { className: "absolute bottom-6 right-4 text-[9px] text-white/20 font-mono", children: "Pinch zum Zoomen \xB7 Doppeltipp 2.5\xD7" })
6685
+ zoomScale === 1 && /* @__PURE__ */ jsx29("div", { className: "absolute bottom-6 right-4 text-[9px] text-white/20 font-mono", children: "Pinch zum Zoomen \xB7 Doppeltipp 2.5\xD7" })
6517
6686
  ]
6518
6687
  }
6519
6688
  );
6520
6689
  }
6690
+ if (showSzenen && szenenPort) {
6691
+ return /* @__PURE__ */ jsxs27("main", { className: "flow-szenen-shell", children: [
6692
+ /* @__PURE__ */ jsxs27("header", { className: "flow-szenen-shell__header", children: [
6693
+ /* @__PURE__ */ jsx29("button", { type: "button", onClick: () => setShowSzenen(false), children: "Zur\xFCck" }),
6694
+ /* @__PURE__ */ jsxs27("div", { children: [
6695
+ /* @__PURE__ */ jsx29("strong", { children: "Szenen" }),
6696
+ /* @__PURE__ */ jsxs27("small", { children: [
6697
+ effectiveNamespace,
6698
+ " \xB7 User ",
6699
+ tagBaseResult.selectedUserId,
6700
+ " \xB7 Context ",
6701
+ tagBaseResult.selectedContextId
6702
+ ] })
6703
+ ] })
6704
+ ] }),
6705
+ /* @__PURE__ */ jsx29("div", { className: "flow-szenen-shell__content", children: /* @__PURE__ */ jsx29(SzenenView, { port: szenenPort, contextId: tagBaseResult.selectedContextId === null ? null : String(tagBaseResult.selectedContextId) }) })
6706
+ ] });
6707
+ }
6521
6708
  if (showStart) {
6522
- return /* @__PURE__ */ jsxs26("div", { className: "fixed inset-0 bg-[#0e0e0e] flex flex-col items-center justify-center p-6", style: { gap: 28, ...hcStyle }, children: [
6523
- /* @__PURE__ */ jsx28("input", { ref: wsInputRef, type: "file", accept: ".zip", className: "hidden", onChange: (e) => {
6709
+ return /* @__PURE__ */ jsxs27("div", { className: "fixed inset-0 bg-[#0e0e0e] flex flex-col items-center justify-center p-6", style: { gap: 28, ...hcStyle }, children: [
6710
+ /* @__PURE__ */ jsx29("input", { ref: wsInputRef, type: "file", accept: ".zip", className: "hidden", onChange: (e) => {
6524
6711
  const f = e.target.files?.[0];
6525
6712
  if (f) handleProjectImport(f);
6526
6713
  e.target.value = "";
6527
6714
  } }),
6528
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-1", children: [
6529
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-white/15 text-[44px]", children: "palette" }),
6530
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] font-bold uppercase tracking-[0.25em]", children: "Avatar Architect" }),
6531
- /* @__PURE__ */ jsxs26("span", { className: "text-white text-[13px] font-mono", children: [
6715
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-1", children: [
6716
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-white/15 text-[44px]", children: "palette" }),
6717
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] font-bold uppercase tracking-[0.25em]", children: "Avatar Architect" }),
6718
+ /* @__PURE__ */ jsxs27("span", { className: "text-white text-[13px] font-mono", children: [
6532
6719
  "v",
6533
6720
  version
6534
6721
  ] })
6535
6722
  ] }),
6536
- /* @__PURE__ */ jsxs26(
6723
+ /* @__PURE__ */ jsxs27(
6537
6724
  "button",
6538
6725
  {
6539
6726
  onClick: toggleContrast,
6540
6727
  className: "flex items-center gap-3 px-5 py-3 rounded-2xl border transition-colors",
6541
6728
  style: { borderColor: highContrast ? "rgba(255,255,255,0.3)" : "rgba(255,255,255,0.08)", background: highContrast ? "rgba(255,255,255,0.08)" : "transparent" },
6542
6729
  children: [
6543
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.35)" }, children: highContrast ? "light_mode" : "dark_mode" }),
6544
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-start", children: [
6545
- /* @__PURE__ */ jsx28("span", { className: "text-[13px] font-bold", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.5)" }, children: highContrast ? "Hoher Kontrast" : "Normaler Kontrast" }),
6546
- /* @__PURE__ */ jsx28("span", { className: "text-[10px]", style: { color: "rgba(255,255,255,0.25)" }, children: "Tippen zum Umschalten" })
6730
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.35)" }, children: highContrast ? "light_mode" : "dark_mode" }),
6731
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-start", children: [
6732
+ /* @__PURE__ */ jsx29("span", { className: "text-[13px] font-bold", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.5)" }, children: highContrast ? "Hoher Kontrast" : "Normaler Kontrast" }),
6733
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px]", style: { color: "rgba(255,255,255,0.25)" }, children: "Tippen zum Umschalten" })
6547
6734
  ] })
6548
6735
  ]
6549
6736
  }
6550
6737
  ),
6551
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6552
- /* @__PURE__ */ jsxs26(
6738
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6739
+ /* @__PURE__ */ jsxs27(
6553
6740
  "button",
6554
6741
  {
6555
6742
  onClick: () => wsInputRef.current?.click(),
6556
6743
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform",
6557
6744
  style: { height: 56, background: projectLoaded ? "#16a34a" : "#0284c7" },
6558
6745
  children: [
6559
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: projectLoaded ? "check_circle" : "folder_zip" }),
6746
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: projectLoaded ? "check_circle" : "folder_zip" }),
6560
6747
  projectLoaded ? "Projekt geladen \u2713" : "Projekt laden (.zip)"
6561
6748
  ]
6562
6749
  }
6563
6750
  ),
6564
- !projectLoaded && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
6751
+ !projectLoaded && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
6565
6752
  ] }),
6566
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6567
- !initialHfToken && /* @__PURE__ */ jsxs26("div", { className: "flex gap-2 w-full", children: [
6568
- /* @__PURE__ */ jsx28(
6753
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6754
+ !initialHfToken && /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 w-full", children: [
6755
+ /* @__PURE__ */ jsx29(
6569
6756
  "input",
6570
6757
  {
6571
6758
  type: "password",
@@ -6581,7 +6768,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6581
6768
  style: { height: 44, background: "rgba(255,255,255,0.05)", border: "1px solid rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.7)" }
6582
6769
  }
6583
6770
  ),
6584
- hfTokenInput.trim() && /* @__PURE__ */ jsx28(
6771
+ hfTokenInput.trim() && /* @__PURE__ */ jsx29(
6585
6772
  "button",
6586
6773
  {
6587
6774
  type: "button",
@@ -6592,9 +6779,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6592
6779
  }
6593
6780
  )
6594
6781
  ] }),
6595
- !hfNamespace && /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-3 w-full", children: [
6596
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold flex-shrink-0", children: "State:" }),
6597
- ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ jsx28(
6782
+ !hfNamespace && /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-3 w-full", children: [
6783
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold flex-shrink-0", children: "State:" }),
6784
+ ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ jsx29(
6598
6785
  "button",
6599
6786
  {
6600
6787
  onClick: () => {
@@ -6614,14 +6801,14 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6614
6801
  ns
6615
6802
  ))
6616
6803
  ] }),
6617
- hfToken && /* @__PURE__ */ jsxs26(
6804
+ hfToken && /* @__PURE__ */ jsxs27(
6618
6805
  "button",
6619
6806
  {
6620
6807
  disabled: isLoadingFromHF,
6621
6808
  onClick: async () => {
6622
6809
  setIsLoadingFromHF(true);
6623
6810
  try {
6624
- const { hfListProjects: hfListProjects2, hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-JKEVTY66.mjs");
6811
+ const { hfListProjects: hfListProjects2, hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-WKQLNDHO.mjs");
6625
6812
  const projects = await hfListProjects2(hfToken);
6626
6813
  if (projects.length > 0) {
6627
6814
  const file = await hfDownloadProject2(projects[0].path, hfToken);
@@ -6636,15 +6823,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6636
6823
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
6637
6824
  style: { height: 56, background: "#f59e0b" },
6638
6825
  children: [
6639
- /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromHF ? " animate-spin" : ""}`, children: isLoadingFromHF ? "sync" : "cloud_download" }),
6826
+ /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromHF ? " animate-spin" : ""}`, children: isLoadingFromHF ? "sync" : "cloud_download" }),
6640
6827
  isLoadingFromHF ? "Laden\u2026" : "Von HF laden"
6641
6828
  ]
6642
6829
  }
6643
6830
  ),
6644
- hfToken && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand von Hugging Face laden" })
6831
+ hfToken && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand von Hugging Face laden" })
6645
6832
  ] }),
6646
- onFetchServerProjects && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6647
- /* @__PURE__ */ jsxs26(
6833
+ onFetchServerProjects && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6834
+ /* @__PURE__ */ jsxs27(
6648
6835
  "button",
6649
6836
  {
6650
6837
  disabled: isLoadingFromServer,
@@ -6665,35 +6852,50 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6665
6852
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
6666
6853
  style: { height: 56, background: "#7c3aed" },
6667
6854
  children: [
6668
- /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromServer ? " animate-spin" : ""}`, children: isLoadingFromServer ? "sync" : "cloud_download" }),
6855
+ /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromServer ? " animate-spin" : ""}`, children: isLoadingFromServer ? "sync" : "cloud_download" }),
6669
6856
  isLoadingFromServer ? "Laden\u2026" : "Vom Server laden"
6670
6857
  ]
6671
6858
  }
6672
6859
  ),
6673
- /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand vom Server wiederherstellen" })
6860
+ /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand vom Server wiederherstellen" })
6861
+ ] }),
6862
+ /* @__PURE__ */ jsxs27("div", { className: "flow-szenen-entry", children: [
6863
+ /* @__PURE__ */ jsxs27(
6864
+ "button",
6865
+ {
6866
+ type: "button",
6867
+ disabled: !szenenPort,
6868
+ onClick: () => setShowSzenen(true),
6869
+ children: [
6870
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", children: "movie" }),
6871
+ "Szenen \xF6ffnen"
6872
+ ]
6873
+ }
6874
+ ),
6875
+ !szenenPort && /* @__PURE__ */ jsx29("small", { children: "F\xFCr Szenen zuerst den HF-Token setzen." })
6674
6876
  ] }),
6675
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6676
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "Layout w\xE4hlen & starten" }),
6677
- /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2 w-full", children: [
6877
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6878
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "Layout w\xE4hlen & starten" }),
6879
+ /* @__PURE__ */ jsx29("div", { className: "grid grid-cols-2 gap-2 w-full", children: [
6678
6880
  { id: "mobile", icon: "smartphone", label: "Mobile" },
6679
6881
  { id: "mobile-desktop", icon: "phonelink", label: "Mobile+" },
6680
6882
  { id: "desktop", icon: "desktop_windows", label: "Desktop" },
6681
6883
  { id: "tablet-landscape", icon: "tablet", label: "Landscape" }
6682
- ].map((opt) => /* @__PURE__ */ jsxs26(
6884
+ ].map((opt) => /* @__PURE__ */ jsxs27(
6683
6885
  "button",
6684
6886
  {
6685
6887
  onClick: () => startApp(opt.id),
6686
6888
  className: "flex flex-col items-center gap-2 py-4 rounded-2xl border transition-colors",
6687
6889
  style: { borderColor: layoutChoice === opt.id ? "rgba(255,255,255,0.35)" : "rgba(255,255,255,0.08)", background: layoutChoice === opt.id ? "rgba(255,255,255,0.07)" : "transparent" },
6688
6890
  children: [
6689
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[24px]", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.icon }),
6690
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.label })
6891
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[24px]", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.icon }),
6892
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.label })
6691
6893
  ]
6692
6894
  },
6693
6895
  opt.id
6694
6896
  )) }),
6695
- layoutChoice === "mobile-desktop" && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[9px] text-center", children: "Mobil-Layout skaliert f\xFCr Desktop-Modus" }),
6696
- layoutChoice === "tablet-landscape" && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[9px] text-center", children: "2-Spalten-Layout f\xFCr Landscape-Tablet im Desktop-Mode" })
6897
+ layoutChoice === "mobile-desktop" && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[9px] text-center", children: "Mobil-Layout skaliert f\xFCr Desktop-Modus" }),
6898
+ layoutChoice === "tablet-landscape" && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[9px] text-center", children: "2-Spalten-Layout f\xFCr Landscape-Tablet im Desktop-Mode" })
6697
6899
  ] })
6698
6900
  ] });
6699
6901
  }
@@ -6702,22 +6904,22 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6702
6904
  const mdScale = mdMode ? window.innerWidth / 430 : 1;
6703
6905
  const mdW = mdMode ? 430 : void 0;
6704
6906
  const mdH = mdMode ? Math.ceil(window.innerHeight / mdScale) : void 0;
6705
- const mobileRoot = /* @__PURE__ */ jsxs26("div", { className: "flex flex-col bg-[#0e0e0e] text-white overflow-hidden", style: {
6907
+ const mobileRoot = /* @__PURE__ */ jsxs27("div", { className: "flex flex-col bg-[#0e0e0e] text-white overflow-hidden", style: {
6706
6908
  width: mdMode ? mdW : "100vw",
6707
6909
  height: mdMode ? mdH : "100dvh",
6708
6910
  transform: mdMode ? `scale(${mdScale})` : void 0,
6709
6911
  transformOrigin: mdMode ? "top left" : void 0,
6710
6912
  ...hcStyle || {}
6711
6913
  }, children: [
6712
- mobileTab === "labs" && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx28(LabsTab, { services: labServices, onResult: (item) => {
6914
+ mobileTab === "labs" && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx29(LabsTab, { services: labServices, onResult: (item) => {
6713
6915
  const frame = item.frames[0];
6714
6916
  if (frame?.base64) {
6715
6917
  setCurrentResult(frameToGeneration(frame, item));
6716
6918
  setMobileTab("stage");
6717
6919
  }
6718
6920
  } }) }),
6719
- mobileTab === "server" && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0 relative", children: /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl }) }),
6720
- mobileTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx28(
6921
+ mobileTab === "server" && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0 relative", children: /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl }) }),
6922
+ mobileTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx29(
6721
6923
  TagManagerPanel,
6722
6924
  {
6723
6925
  workspaceTags,
@@ -6728,24 +6930,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6728
6930
  onTagMove: handleTagMove
6729
6931
  }
6730
6932
  ) }),
6731
- mobileTab === "stage" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col flex-1 min-h-0", children: [
6732
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 px-3 border-b border-white/5 bg-black/30 shrink-0", style: { height: 52 }, children: [
6733
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
6734
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
6735
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
6736
- /* @__PURE__ */ jsx28("div", { className: "flex-1" }),
6737
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
6933
+ mobileTab === "stage" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 min-h-0", children: [
6934
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 px-3 border-b border-white/5 bg-black/30 shrink-0", style: { height: 52 }, children: [
6935
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
6936
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
6937
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
6938
+ /* @__PURE__ */ jsx29("div", { className: "flex-1" }),
6939
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
6738
6940
  runningBadge,
6739
- activeReferenceThumbnail ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden mr-2", style: { height: 28 }, children: [
6740
- /* @__PURE__ */ jsx28("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
6741
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
6742
- /* @__PURE__ */ jsx28("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 active:text-white/80 transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
6743
- ] }) : /* @__PURE__ */ jsx28("button", { onClick: handleSelectReference, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "add_photo_alternate" }) }),
6744
- /* @__PURE__ */ jsx28("button", { onClick: toggleContrast, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: highContrast ? "light_mode" : "dark_mode" }) }),
6745
- /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), className: "text-white/20 active:text-white/60 transition-colors mr-1", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "desktop_windows" }) })
6941
+ activeReferenceThumbnail ? /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden mr-2", style: { height: 28 }, children: [
6942
+ /* @__PURE__ */ jsx29("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
6943
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
6944
+ /* @__PURE__ */ jsx29("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 active:text-white/80 transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
6945
+ ] }) : /* @__PURE__ */ jsx29("button", { onClick: handleSelectReference, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "add_photo_alternate" }) }),
6946
+ /* @__PURE__ */ jsx29("button", { onClick: toggleContrast, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: highContrast ? "light_mode" : "dark_mode" }) }),
6947
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), className: "text-white/20 active:text-white/60 transition-colors mr-1", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "desktop_windows" }) })
6746
6948
  ] }),
6747
- /* @__PURE__ */ jsx28("div", { className: "px-3 pt-3 pb-2 shrink-0", children: /* @__PURE__ */ jsxs26("div", { className: `relative rounded-xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
6748
- /* @__PURE__ */ jsx28(
6949
+ /* @__PURE__ */ jsx29("div", { className: "px-3 pt-3 pb-2 shrink-0", children: /* @__PURE__ */ jsxs27("div", { className: `relative rounded-xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
6950
+ /* @__PURE__ */ jsx29(
6749
6951
  "textarea",
6750
6952
  {
6751
6953
  value: activePrompt,
@@ -6755,9 +6957,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6755
6957
  placeholder: "Prompt eingeben..."
6756
6958
  }
6757
6959
  ),
6758
- activePrompt && !isSynthesizing && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center text-white/20 active:text-white transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: "close" }) })
6960
+ activePrompt && !isSynthesizing && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center text-white/20 active:text-white transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: "close" }) })
6759
6961
  ] }) }),
6760
- /* @__PURE__ */ jsx28("div", { className: "px-3 pb-3 shrink-0", children: /* @__PURE__ */ jsxs26(
6962
+ /* @__PURE__ */ jsx29("div", { className: "px-3 pb-3 shrink-0", children: /* @__PURE__ */ jsxs27(
6761
6963
  "button",
6762
6964
  {
6763
6965
  onClick: () => handleGenerateBatch(),
@@ -6765,13 +6967,13 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6765
6967
  className: "w-full flex items-center justify-center gap-2 rounded-xl font-bold text-[14px] uppercase tracking-wide transition-all disabled:opacity-30 active:scale-95",
6766
6968
  style: { height: 48, background: activePrompt.trim() ? "#0284c7" : void 0, border: "1px solid rgba(255,255,255,0.1)" },
6767
6969
  children: [
6768
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "bolt" }),
6769
- /* @__PURE__ */ jsx28("span", { children: "Generieren" })
6970
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "bolt" }),
6971
+ /* @__PURE__ */ jsx29("span", { children: "Generieren" })
6770
6972
  ]
6771
6973
  }
6772
6974
  ) }),
6773
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 min-h-0 px-3 pb-3 flex flex-col", children: [
6774
- /* @__PURE__ */ jsxs26(
6975
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 min-h-0 px-3 pb-3 flex flex-col", children: [
6976
+ /* @__PURE__ */ jsxs27(
6775
6977
  "div",
6776
6978
  {
6777
6979
  className: "w-full rounded-2xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center",
@@ -6785,25 +6987,25 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6785
6987
  setTouchStartX(null);
6786
6988
  },
6787
6989
  children: [
6788
- currentResult?.status === "processing" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-3 opacity-40", children: [
6789
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
6790
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
6990
+ currentResult?.status === "processing" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-3 opacity-40", children: [
6991
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
6992
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
6791
6993
  ] }),
6792
- currentResult?.status === "error" && /* @__PURE__ */ jsxs26("div", { className: "p-6 text-center flex flex-col items-center gap-3", children: [
6793
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-red-400 text-[36px]", children: "warning" }),
6794
- /* @__PURE__ */ jsx28("p", { className: "text-white/50 text-[13px]", children: currentResult.error?.message }),
6795
- /* @__PURE__ */ jsx28("button", { onClick: () => handleGenerateImage(currentResult.prompt), className: "px-4 py-2 rounded-lg border border-white/20 text-[13px] text-white/70 active:bg-white/10", children: "Erneut versuchen" })
6994
+ currentResult?.status === "error" && /* @__PURE__ */ jsxs27("div", { className: "p-6 text-center flex flex-col items-center gap-3", children: [
6995
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-red-400 text-[36px]", children: "warning" }),
6996
+ /* @__PURE__ */ jsx29("p", { className: "text-white/50 text-[13px]", children: currentResult.error?.message }),
6997
+ /* @__PURE__ */ jsx29("button", { onClick: () => handleGenerateImage(currentResult.prompt), className: "px-4 py-2 rounded-lg border border-white/20 text-[13px] text-white/70 active:bg-white/10", children: "Erneut versuchen" })
6796
6998
  ] }),
6797
- currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, className: "w-full h-full object-contain" }),
6798
- !currentResult && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
6799
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[64px]", children: "palette" }),
6800
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
6999
+ currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, className: "w-full h-full object-contain" }),
7000
+ !currentResult && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7001
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[64px]", children: "palette" }),
7002
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
6801
7003
  ] }),
6802
- currentResult?.status === "done" && /* @__PURE__ */ jsx28("button", { onClick: openFullscreen, className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-black/60 border border-white/10 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: "fullscreen" }) }),
6803
- history.length > 1 && currentResult && /* @__PURE__ */ jsxs26(Fragment10, { children: [
6804
- /* @__PURE__ */ jsx28("button", { onClick: goToPrev, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6805
- /* @__PURE__ */ jsx28("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6806
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
7004
+ currentResult?.status === "done" && /* @__PURE__ */ jsx29("button", { onClick: openFullscreen, className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-black/60 border border-white/10 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: "fullscreen" }) }),
7005
+ history.length > 1 && currentResult && /* @__PURE__ */ jsxs27(Fragment11, { children: [
7006
+ /* @__PURE__ */ jsx29("button", { onClick: goToPrev, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
7007
+ /* @__PURE__ */ jsx29("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
7008
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6807
7009
  currentIndex + 1,
6808
7010
  " / ",
6809
7011
  history.length
@@ -6812,8 +7014,8 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6812
7014
  ]
6813
7015
  }
6814
7016
  ),
6815
- currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx28("div", { className: "mt-2 flex gap-1.5 overflow-x-auto pb-1", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs26("div", { style: { position: "relative", flexShrink: 0 }, children: [
6816
- /* @__PURE__ */ jsx28(
7017
+ currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx29("div", { className: "mt-2 flex gap-1.5 overflow-x-auto pb-1", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs27("div", { style: { position: "relative", flexShrink: 0 }, children: [
7018
+ /* @__PURE__ */ jsx29(
6817
7019
  "div",
6818
7020
  {
6819
7021
  onClick: () => handleGallerySelect(item),
@@ -6826,10 +7028,10 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6826
7028
  border: item.id === currentResult.id ? "2px solid rgba(255,255,255,0.8)" : "2px solid rgba(255,255,255,0.15)",
6827
7029
  opacity: item.id === currentResult.id ? 1 : 0.55
6828
7030
  },
6829
- children: /* @__PURE__ */ jsx28("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7031
+ children: /* @__PURE__ */ jsx29("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
6830
7032
  }
6831
7033
  ),
6832
- /* @__PURE__ */ jsx28(
7034
+ /* @__PURE__ */ jsx29(
6833
7035
  "button",
6834
7036
  {
6835
7037
  onClick: (e) => {
@@ -6851,34 +7053,34 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6851
7053
  alignItems: "center",
6852
7054
  justifyContent: "center"
6853
7055
  },
6854
- children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 9, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7056
+ children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 9, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
6855
7057
  }
6856
7058
  )
6857
7059
  ] }, item.id)) }),
6858
- currentResult?.status === "done" && /* @__PURE__ */ jsxs26("div", { className: "flex gap-2 mt-3", children: [
6859
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
6860
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "replay" }),
6861
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/60", children: "Prompt" })
7060
+ currentResult?.status === "done" && /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 mt-3", children: [
7061
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
7062
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "replay" }),
7063
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/60", children: "Prompt" })
6862
7064
  ] }),
6863
- /* @__PURE__ */ jsxs26("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl bg-white/10 active:bg-white/15 transition-colors", style: { height: 44 }, children: [
6864
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/80", children: "auto_fix_high" }),
6865
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/80 font-bold", children: "Referenz" })
7065
+ /* @__PURE__ */ jsxs27("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl bg-white/10 active:bg-white/15 transition-colors", style: { height: 44 }, children: [
7066
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/80", children: "auto_fix_high" }),
7067
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/80 font-bold", children: "Referenz" })
6866
7068
  ] }),
6867
- /* @__PURE__ */ jsxs26("button", { onClick: handleDownloadSingle, className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
6868
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "download" }),
6869
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/60", children: "Laden" })
7069
+ /* @__PURE__ */ jsxs27("button", { onClick: handleDownloadSingle, className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
7070
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "download" }),
7071
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/60", children: "Laden" })
6870
7072
  ] })
6871
7073
  ] })
6872
7074
  ] })
6873
7075
  ] }),
6874
- mobileTab === "browse" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col flex-1 min-h-0", children: [
6875
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
6876
- ["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab(tab), className: `flex-1 flex items-center justify-center gap-1.5 transition-colors text-[11px] font-bold uppercase tracking-wide ${activeTab === tab ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : "info" }) }, tab)),
6877
- hfToken && /* @__PURE__ */ jsx28("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-12 flex items-center justify-center text-white/20 active:text-white transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[20px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) })
7076
+ mobileTab === "browse" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 min-h-0", children: [
7077
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
7078
+ ["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab(tab), className: `flex-1 flex items-center justify-center gap-1.5 transition-colors text-[11px] font-bold uppercase tracking-wide ${activeTab === tab ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : "info" }) }, tab)),
7079
+ hfToken && /* @__PURE__ */ jsx29("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-12 flex items-center justify-center text-white/20 active:text-white transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[20px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) })
6878
7080
  ] }),
6879
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
6880
- activeTab === "history" && /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
6881
- activeTab === "gallery" && /* @__PURE__ */ jsx28(
7081
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7082
+ activeTab === "history" && /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7083
+ activeTab === "gallery" && /* @__PURE__ */ jsx29(
6882
7084
  MediaLibrary,
6883
7085
  {
6884
7086
  items: galleryItems,
@@ -6897,44 +7099,44 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6897
7099
  onLoadMore: () => setGalleryVisibleCount((c) => c + 20)
6898
7100
  }
6899
7101
  ),
6900
- activeTab === "inspect" && /* @__PURE__ */ jsx28(InspectPanel, { currentResult, history, onSelect: (g) => {
7102
+ activeTab === "inspect" && /* @__PURE__ */ jsx29(InspectPanel, { currentResult, history, onSelect: (g) => {
6901
7103
  setCurrentResult(g);
6902
7104
  } })
6903
7105
  ] })
6904
7106
  ] }),
6905
- /* @__PURE__ */ jsxs26("div", { style: { display: mobileTab === "tools" ? "flex" : "none" }, className: "flex flex-col flex-1 min-h-0", children: [
6906
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
6907
- workspaceTags && /* @__PURE__ */ jsxs26("button", { onClick: () => {
7107
+ /* @__PURE__ */ jsxs27("div", { style: { display: mobileTab === "tools" ? "flex" : "none" }, className: "flex flex-col flex-1 min-h-0", children: [
7108
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
7109
+ workspaceTags && /* @__PURE__ */ jsxs27("button", { onClick: () => {
6908
7110
  setLeftTab("prompt");
6909
7111
  if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
6910
7112
  }, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6911
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "auto_fix_high" }),
7113
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "auto_fix_high" }),
6912
7114
  "Prompt"
6913
7115
  ] }),
6914
- /* @__PURE__ */ jsxs26("button", { onClick: () => {
7116
+ /* @__PURE__ */ jsxs27("button", { onClick: () => {
6915
7117
  setLeftTab("hierarchy");
6916
7118
  if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
6917
7119
  }, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6918
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "account_tree" }),
7120
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "account_tree" }),
6919
7121
  "Hierarchie"
6920
7122
  ] }),
6921
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("setup"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "setup" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6922
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "settings" }),
7123
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("setup"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "setup" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7124
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "settings" }),
6923
7125
  "Setup"
6924
7126
  ] }),
6925
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("sync"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6926
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "cloud_sync" }),
7127
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("sync"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7128
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "cloud_sync" }),
6927
7129
  "Sync"
6928
7130
  ] }),
6929
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("hftest"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "hftest" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6930
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "biotech" }),
7131
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("hftest"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "hftest" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7132
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "biotech" }),
6931
7133
  "HF"
6932
7134
  ] }),
6933
- serverBaseUrl && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("server"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "server" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
6934
- workspaceTags && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7135
+ serverBaseUrl && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("server"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "server" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
7136
+ workspaceTags && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
6935
7137
  ] }),
6936
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
6937
- leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7138
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7139
+ leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
6938
7140
  ListView,
6939
7141
  {
6940
7142
  nodes,
@@ -6965,12 +7167,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6965
7167
  isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
6966
7168
  }
6967
7169
  ) }),
6968
- workspaceTags && /* @__PURE__ */ jsx28("div", { style: { display: leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" ? "flex" : "none" }, className: "absolute inset-0 flex-col", children: /* @__PURE__ */ jsx28(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => {
7170
+ workspaceTags && /* @__PURE__ */ jsx29("div", { style: { display: leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" ? "flex" : "none" }, className: "absolute inset-0 flex-col", children: /* @__PURE__ */ jsx29(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => {
6969
7171
  handleGenerateBatch(prompt);
6970
7172
  setMobileTab("stage");
6971
7173
  }, onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage }) }),
6972
- activeTab === "setup" && /* @__PURE__ */ jsx28(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
6973
- activeTab === "sync" && /* @__PURE__ */ jsx28(
7174
+ activeTab === "setup" && /* @__PURE__ */ jsx29(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7175
+ activeTab === "sync" && /* @__PURE__ */ jsx29(
6974
7176
  ProjectSyncTab,
6975
7177
  {
6976
7178
  topSlot: syncTopSlot,
@@ -6994,7 +7196,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6994
7196
  onHfInitialSync: hfToken ? handleHfInitialSync : void 0
6995
7197
  }
6996
7198
  ),
6997
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7199
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
6998
7200
  TagManagerPanel,
6999
7201
  {
7000
7202
  workspaceTags,
@@ -7005,7 +7207,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7005
7207
  onTagMove: handleTagMove
7006
7208
  }
7007
7209
  ),
7008
- activeTab === "hftest" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7210
+ activeTab === "hftest" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
7009
7211
  HFTestTab,
7010
7212
  {
7011
7213
  token: hfToken,
@@ -7017,23 +7219,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7017
7219
  missingImages: hfMissingImages
7018
7220
  }
7019
7221
  ) }),
7020
- activeTab === "server" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl }) })
7222
+ activeTab === "server" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl }) })
7021
7223
  ] })
7022
7224
  ] }),
7023
- /* @__PURE__ */ jsx28("div", { className: "flex border-t border-white/10 bg-black shrink-0", style: { height: 56, paddingBottom: "env(safe-area-inset-bottom, 0px)" }, children: [
7225
+ /* @__PURE__ */ jsx29("div", { className: "flex overflow-x-auto border-t border-white/10 bg-black shrink-0", style: { height: 56, paddingBottom: "env(safe-area-inset-bottom, 0px)" }, children: [
7024
7226
  { id: "tools", icon: "auto_fix_high", label: "Prompt" },
7227
+ { id: "szenen", icon: "movie", label: "Szenen" },
7025
7228
  { id: "stage", icon: "palette", label: "Stage" },
7026
7229
  { id: "labs", icon: "science", label: "Labs" },
7027
7230
  ...workspaceTags ? [{ id: "tags", icon: "label", label: "Tags" }] : [],
7028
7231
  { id: "browse", icon: "photo_library", label: "Galerie" },
7029
7232
  ...serverBaseUrl ? [{ id: "server", icon: "storage", label: "Server" }] : []
7030
- ].map((tab) => /* @__PURE__ */ jsxs26("button", { onClick: () => setMobileTab(tab.id), className: `flex-1 flex flex-col items-center justify-center gap-0.5 transition-colors ${mobileTab === tab.id ? "text-white" : "text-white/30"}`, children: [
7031
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[24px]", children: tab.icon }),
7032
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: tab.label })
7233
+ ].map((tab) => /* @__PURE__ */ jsxs27("button", { onClick: () => tab.id === "szenen" ? setShowSzenen(true) : setMobileTab(tab.id), className: `flex-none min-w-[64px] flex flex-col items-center justify-center gap-0.5 transition-colors ${mobileTab === tab.id ? "text-white" : "text-white/30"}`, children: [
7234
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[24px]", children: tab.icon }),
7235
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: tab.label })
7033
7236
  ] }, tab.id)) })
7034
7237
  ] });
7035
7238
  if (mdMode) {
7036
- return /* @__PURE__ */ jsx28("div", { style: { position: "fixed", inset: 0, overflow: "hidden", background: "#0e0e0e" }, children: mobileRoot });
7239
+ return /* @__PURE__ */ jsx29("div", { style: { position: "fixed", inset: 0, overflow: "hidden", background: "#0e0e0e" }, children: mobileRoot });
7037
7240
  }
7038
7241
  return mobileRoot;
7039
7242
  }
@@ -7041,20 +7244,20 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7041
7244
  const tlScale = Math.min(window.innerWidth / 920, window.innerHeight / 520);
7042
7245
  const tlW = 920;
7043
7246
  const tlH = 520;
7044
- return /* @__PURE__ */ jsx28("div", { style: { position: "fixed", inset: 0, background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", ...hcStyle || {} }, children: /* @__PURE__ */ jsxs26("div", { style: { width: tlW, height: tlH, transform: `scale(${tlScale})`, transformOrigin: "center center", display: "flex", flexDirection: "row", color: "#fff", overflow: "hidden", borderRadius: 0 }, children: [
7045
- /* @__PURE__ */ jsxs26("div", { style: { width: 320, height: tlH, display: "flex", flexDirection: "column", borderRight: "1px solid rgba(255,255,255,0.05)", background: "#000", flexShrink: 0 }, children: [
7046
- /* @__PURE__ */ jsxs26("div", { style: { height: 52, borderBottom: "1px solid rgba(255,255,255,0.05)", display: "flex", alignItems: "center", gap: 8, padding: "0 12px", flexShrink: 0 }, children: [
7047
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7048
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7049
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
7050
- /* @__PURE__ */ jsx28("div", { style: { flex: 1 } }),
7051
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7247
+ return /* @__PURE__ */ jsx29("div", { style: { position: "fixed", inset: 0, background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", ...hcStyle || {} }, children: /* @__PURE__ */ jsxs27("div", { style: { width: tlW, height: tlH, transform: `scale(${tlScale})`, transformOrigin: "center center", display: "flex", flexDirection: "row", color: "#fff", overflow: "hidden", borderRadius: 0 }, children: [
7248
+ /* @__PURE__ */ jsxs27("div", { style: { width: 320, height: tlH, display: "flex", flexDirection: "column", borderRight: "1px solid rgba(255,255,255,0.05)", background: "#000", flexShrink: 0 }, children: [
7249
+ /* @__PURE__ */ jsxs27("div", { style: { height: 52, borderBottom: "1px solid rgba(255,255,255,0.05)", display: "flex", alignItems: "center", gap: 8, padding: "0 12px", flexShrink: 0 }, children: [
7250
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7251
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7252
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
7253
+ /* @__PURE__ */ jsx29("div", { style: { flex: 1 } }),
7254
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7052
7255
  runningBadge,
7053
- /* @__PURE__ */ jsx28("button", { onClick: toggleContrast, style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: highContrast ? "light_mode" : "dark_mode" }) }),
7054
- /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "apps" }) })
7256
+ /* @__PURE__ */ jsx29("button", { onClick: toggleContrast, style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: highContrast ? "light_mode" : "dark_mode" }) }),
7257
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "apps" }) })
7055
7258
  ] }),
7056
- /* @__PURE__ */ jsx28("div", { style: { padding: "12px 12px 8px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs26("div", { style: { position: "relative", borderRadius: 12, border: `1px solid ${isSynthesizing ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.1)"}`, background: "rgba(255,255,255,0.05)" }, children: [
7057
- /* @__PURE__ */ jsx28(
7259
+ /* @__PURE__ */ jsx29("div", { style: { padding: "12px 12px 8px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs27("div", { style: { position: "relative", borderRadius: 12, border: `1px solid ${isSynthesizing ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.1)"}`, background: "rgba(255,255,255,0.05)" }, children: [
7260
+ /* @__PURE__ */ jsx29(
7058
7261
  "textarea",
7059
7262
  {
7060
7263
  value: activePrompt,
@@ -7063,24 +7266,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7063
7266
  placeholder: "Prompt eingeben..."
7064
7267
  }
7065
7268
  ),
7066
- activePrompt && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), style: { position: "absolute", top: 6, right: 6, width: 22, height: 22, display: "flex", alignItems: "center", justifyContent: "center", color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 15 }, children: "close" }) })
7269
+ activePrompt && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), style: { position: "absolute", top: 6, right: 6, width: 22, height: 22, display: "flex", alignItems: "center", justifyContent: "center", color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 15 }, children: "close" }) })
7067
7270
  ] }) }),
7068
- /* @__PURE__ */ jsx28("div", { style: { padding: "0 12px 10px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs26(
7271
+ /* @__PURE__ */ jsx29("div", { style: { padding: "0 12px 10px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs27(
7069
7272
  "button",
7070
7273
  {
7071
7274
  onClick: () => handleGenerateBatch(),
7072
7275
  disabled: !activePrompt.trim(),
7073
7276
  style: { width: "100%", height: 42, display: "flex", alignItems: "center", justifyContent: "center", gap: 8, borderRadius: 10, fontWeight: "bold", fontSize: 13, textTransform: "uppercase", letterSpacing: "0.05em", border: "1px solid rgba(255,255,255,0.1)", background: activePrompt.trim() ? "#0284c7" : "transparent", color: "#fff", cursor: activePrompt.trim() ? "pointer" : "default", opacity: !activePrompt.trim() ? 0.3 : 1, fontFamily: "inherit", transition: "background 0.2s" },
7074
7277
  children: [
7075
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "bolt" }),
7076
- /* @__PURE__ */ jsx28("span", { children: "Generieren" })
7278
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "bolt" }),
7279
+ /* @__PURE__ */ jsx29("span", { children: "Generieren" })
7077
7280
  ]
7078
7281
  }
7079
7282
  ) }),
7080
- /* @__PURE__ */ jsx28("div", { style: { flex: 1, overflow: "hidden", position: "relative" }, children: /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }) })
7283
+ /* @__PURE__ */ jsx29("div", { style: { flex: 1, overflow: "hidden", position: "relative" }, children: /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }) })
7081
7284
  ] }),
7082
- /* @__PURE__ */ jsxs26("div", { style: { flex: 1, height: tlH, display: "flex", flexDirection: "column", background: "#0b0b0b" }, children: [
7083
- /* @__PURE__ */ jsx28(
7285
+ /* @__PURE__ */ jsxs27("div", { style: { flex: 1, height: tlH, display: "flex", flexDirection: "column", background: "#0b0b0b" }, children: [
7286
+ /* @__PURE__ */ jsx29(
7084
7287
  "div",
7085
7288
  {
7086
7289
  style: { flex: 1, padding: 16, display: "flex", alignItems: "center", justifyContent: "center", position: "relative" },
@@ -7092,26 +7295,26 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7092
7295
  else if (dx > 50) goToPrev();
7093
7296
  setTouchStartX(null);
7094
7297
  },
7095
- children: /* @__PURE__ */ jsxs26("div", { style: { height: "100%", width: "100%", borderRadius: 20, border: "1px solid rgba(255,255,255,0.05)", background: "rgba(0,0,0,0.4)", position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
7096
- currentResult?.status === "processing" && /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12, opacity: 0.4 }, children: [
7097
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 36 }, children: "hourglass_top" }),
7098
- /* @__PURE__ */ jsx28("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.6)", textTransform: "uppercase", fontWeight: "bold", letterSpacing: "0.15em" }, children: "Erstelle Bild..." })
7298
+ children: /* @__PURE__ */ jsxs27("div", { style: { height: "100%", width: "100%", borderRadius: 20, border: "1px solid rgba(255,255,255,0.05)", background: "rgba(0,0,0,0.4)", position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
7299
+ currentResult?.status === "processing" && /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12, opacity: 0.4 }, children: [
7300
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 36 }, children: "hourglass_top" }),
7301
+ /* @__PURE__ */ jsx29("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.6)", textTransform: "uppercase", fontWeight: "bold", letterSpacing: "0.15em" }, children: "Erstelle Bild..." })
7099
7302
  ] }),
7100
- currentResult?.status === "error" && /* @__PURE__ */ jsxs26("div", { style: { padding: 24, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
7101
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 32, color: "#f87171" }, children: "warning" }),
7102
- /* @__PURE__ */ jsx28("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.5)", margin: 0 }, children: currentResult.error?.message }),
7103
- /* @__PURE__ */ jsx28("button", { onClick: () => handleGenerateImage(currentResult.prompt), style: { padding: "8px 16px", borderRadius: 8, border: "1px solid rgba(255,255,255,0.2)", fontSize: 11, color: "rgba(255,255,255,0.7)", background: "none", cursor: "pointer", fontFamily: "inherit" }, children: "Erneut versuchen" })
7303
+ currentResult?.status === "error" && /* @__PURE__ */ jsxs27("div", { style: { padding: 24, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
7304
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 32, color: "#f87171" }, children: "warning" }),
7305
+ /* @__PURE__ */ jsx29("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.5)", margin: 0 }, children: currentResult.error?.message }),
7306
+ /* @__PURE__ */ jsx29("button", { onClick: () => handleGenerateImage(currentResult.prompt), style: { padding: "8px 16px", borderRadius: 8, border: "1px solid rgba(255,255,255,0.2)", fontSize: 11, color: "rgba(255,255,255,0.7)", background: "none", cursor: "pointer", fontFamily: "inherit" }, children: "Erneut versuchen" })
7104
7307
  ] }),
7105
- currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }),
7106
- !currentResult && /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, opacity: 0.1 }, children: [
7107
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 64 }, children: "palette" }),
7108
- /* @__PURE__ */ jsx28("span", { style: { fontSize: 11, fontWeight: "bold", textTransform: "uppercase", letterSpacing: "0.2em" }, children: "Avatar Architect" })
7308
+ currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }),
7309
+ !currentResult && /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, opacity: 0.1 }, children: [
7310
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 64 }, children: "palette" }),
7311
+ /* @__PURE__ */ jsx29("span", { style: { fontSize: 11, fontWeight: "bold", textTransform: "uppercase", letterSpacing: "0.2em" }, children: "Avatar Architect" })
7109
7312
  ] }),
7110
- currentResult?.status === "done" && /* @__PURE__ */ jsx28("button", { onClick: openFullscreen, style: { position: "absolute", top: 8, right: 8, width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "fullscreen" }) }),
7111
- history.length > 1 && currentResult && /* @__PURE__ */ jsxs26(Fragment10, { children: [
7112
- /* @__PURE__ */ jsx28("button", { onClick: goToPrev, disabled: currentIndex <= 0, style: { position: "absolute", left: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex <= 0 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_left" }) }),
7113
- /* @__PURE__ */ jsx28("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, style: { position: "absolute", right: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex >= history.length - 1 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_right" }) }),
7114
- /* @__PURE__ */ jsxs26("div", { style: { position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", background: "rgba(0,0,0,0.6)", borderRadius: 999, padding: "2px 12px", fontSize: 10, color: "rgba(255,255,255,0.4)", fontFamily: "monospace" }, children: [
7313
+ currentResult?.status === "done" && /* @__PURE__ */ jsx29("button", { onClick: openFullscreen, style: { position: "absolute", top: 8, right: 8, width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "fullscreen" }) }),
7314
+ history.length > 1 && currentResult && /* @__PURE__ */ jsxs27(Fragment11, { children: [
7315
+ /* @__PURE__ */ jsx29("button", { onClick: goToPrev, disabled: currentIndex <= 0, style: { position: "absolute", left: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex <= 0 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_left" }) }),
7316
+ /* @__PURE__ */ jsx29("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, style: { position: "absolute", right: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex >= history.length - 1 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_right" }) }),
7317
+ /* @__PURE__ */ jsxs27("div", { style: { position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", background: "rgba(0,0,0,0.6)", borderRadius: 999, padding: "2px 12px", fontSize: 10, color: "rgba(255,255,255,0.4)", fontFamily: "monospace" }, children: [
7115
7318
  currentIndex + 1,
7116
7319
  " / ",
7117
7320
  history.length
@@ -7120,42 +7323,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7120
7323
  ] })
7121
7324
  }
7122
7325
  ),
7123
- currentResult?.status === "done" && /* @__PURE__ */ jsxs26("div", { style: { padding: "0 16px 16px", display: "flex", gap: 8, flexShrink: 0 }, children: [
7124
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7125
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "replay" }),
7126
- /* @__PURE__ */ jsx28("span", { children: "Prompt" })
7326
+ currentResult?.status === "done" && /* @__PURE__ */ jsxs27("div", { style: { padding: "0 16px 16px", display: "flex", gap: 8, flexShrink: 0 }, children: [
7327
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7328
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "replay" }),
7329
+ /* @__PURE__ */ jsx29("span", { children: "Prompt" })
7127
7330
  ] }),
7128
- /* @__PURE__ */ jsxs26("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "none", background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.8)", fontSize: 11, fontWeight: "bold", cursor: "pointer", fontFamily: "inherit" }, children: [
7129
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "auto_fix_high" }),
7130
- /* @__PURE__ */ jsx28("span", { children: "Referenz" })
7331
+ /* @__PURE__ */ jsxs27("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "none", background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.8)", fontSize: 11, fontWeight: "bold", cursor: "pointer", fontFamily: "inherit" }, children: [
7332
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "auto_fix_high" }),
7333
+ /* @__PURE__ */ jsx29("span", { children: "Referenz" })
7131
7334
  ] }),
7132
- /* @__PURE__ */ jsxs26("button", { onClick: handleDownloadSingle, style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7133
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "download" }),
7134
- /* @__PURE__ */ jsx28("span", { children: "Laden" })
7335
+ /* @__PURE__ */ jsxs27("button", { onClick: handleDownloadSingle, style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7336
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "download" }),
7337
+ /* @__PURE__ */ jsx29("span", { children: "Laden" })
7135
7338
  ] })
7136
7339
  ] })
7137
7340
  ] })
7138
7341
  ] }) });
7139
7342
  }
7140
- return /* @__PURE__ */ jsxs26("div", { className: "flex h-screen w-screen bg-[#0e0e0e] text-white overflow-hidden", style: hcStyle, children: [
7141
- /* @__PURE__ */ jsx28("div", { className: "absolute top-2 right-2 z-50", children: /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), className: "text-white/10 hover:text-white/30 transition-colors text-[10px]", children: "\u21C4" }) }),
7142
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col border-r border-white/5 overflow-hidden relative bg-black/10 shrink-0", style: { width: isLeftCollapsed ? 48 : leftPanelWidth, transition: "none" }, children: [
7143
- /* @__PURE__ */ jsxs26("div", { className: "h-14 border-b border-white/5 flex items-center justify-between shrink-0 px-1", children: [
7144
- !isLeftCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 gap-1", children: [
7145
- workspaceTags && /* @__PURE__ */ jsxs26("button", { onClick: () => setLeftTab("prompt"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7146
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "auto_fix_high" }),
7343
+ return /* @__PURE__ */ jsxs27("div", { className: "flex h-screen w-screen bg-[#0e0e0e] text-white overflow-hidden", style: hcStyle, children: [
7344
+ /* @__PURE__ */ jsx29("div", { className: "absolute top-2 right-2 z-50", children: /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), className: "text-white/10 hover:text-white/30 transition-colors text-[10px]", children: "\u21C4" }) }),
7345
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col border-r border-white/5 overflow-hidden relative bg-black/10 shrink-0", style: { width: isLeftCollapsed ? 48 : leftPanelWidth, transition: "none" }, children: [
7346
+ /* @__PURE__ */ jsxs27("div", { className: "h-14 border-b border-white/5 flex items-center justify-between shrink-0 px-1", children: [
7347
+ !isLeftCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex flex-1 gap-1", children: [
7348
+ workspaceTags && /* @__PURE__ */ jsxs27("button", { onClick: () => setLeftTab("prompt"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7349
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "auto_fix_high" }),
7147
7350
  "Prompt"
7148
7351
  ] }),
7149
- /* @__PURE__ */ jsxs26("button", { onClick: () => setLeftTab("hierarchy"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7150
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "account_tree" }),
7352
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setLeftTab("hierarchy"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7353
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "account_tree" }),
7151
7354
  "Hierarchie"
7152
7355
  ] }),
7153
- workspaceTags && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7356
+ workspaceTags && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7154
7357
  ] }),
7155
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsLeftCollapsed(!isLeftCollapsed), className: "material-symbols-outlined text-[18px] text-white/40 hover:text-white transition-all w-10 flex items-center justify-center", children: isLeftCollapsed ? "chevron_right" : "chevron_left" })
7358
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsLeftCollapsed(!isLeftCollapsed), className: "material-symbols-outlined text-[18px] text-white/40 hover:text-white transition-all w-10 flex items-center justify-center", children: isLeftCollapsed ? "chevron_right" : "chevron_left" })
7156
7359
  ] }),
7157
- !isLeftCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
7158
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7360
+ !isLeftCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7361
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
7159
7362
  TagManagerPanel,
7160
7363
  {
7161
7364
  workspaceTags,
@@ -7166,11 +7369,11 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7166
7369
  onTagMove: handleTagMove
7167
7370
  }
7168
7371
  ),
7169
- activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs26("div", { children: [
7170
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7171
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7372
+ activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs27("div", { children: [
7373
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7374
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7172
7375
  ] }) }),
7173
- leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7376
+ leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
7174
7377
  ListView,
7175
7378
  {
7176
7379
  nodes,
@@ -7195,19 +7398,19 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7195
7398
  isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
7196
7399
  }
7197
7400
  ) }),
7198
- leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ jsx28(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => handleGenerateBatch(prompt), onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage })
7401
+ leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ jsx29(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => handleGenerateBatch(prompt), onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage })
7199
7402
  ] })
7200
7403
  ] }),
7201
- !isLeftCollapsed && /* @__PURE__ */ jsx28("div", { onMouseDown: startLeftResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7202
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 flex flex-col bg-[#0b0b0b] overflow-hidden", children: [
7203
- /* @__PURE__ */ jsxs26("div", { className: "h-14 border-b border-white/5 flex items-center px-4 gap-2 justify-between shrink-0 bg-black/20", children: [
7204
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1.5", children: [
7205
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7206
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7207
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions })
7404
+ !isLeftCollapsed && /* @__PURE__ */ jsx29("div", { onMouseDown: startLeftResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7405
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 flex flex-col bg-[#0b0b0b] overflow-hidden", children: [
7406
+ /* @__PURE__ */ jsxs27("div", { className: "h-14 border-b border-white/5 flex items-center px-4 gap-2 justify-between shrink-0 bg-black/20", children: [
7407
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1.5", children: [
7408
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7409
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7410
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions })
7208
7411
  ] }),
7209
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 mx-auto", children: [
7210
- /* @__PURE__ */ jsx28(
7412
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 mx-auto", children: [
7413
+ /* @__PURE__ */ jsx29(
7211
7414
  "button",
7212
7415
  {
7213
7416
  onClick: () => setMiddlePanel("stage"),
@@ -7215,7 +7418,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7215
7418
  children: "Stage"
7216
7419
  }
7217
7420
  ),
7218
- /* @__PURE__ */ jsx28(
7421
+ /* @__PURE__ */ jsx29(
7219
7422
  "button",
7220
7423
  {
7221
7424
  onClick: () => setMiddlePanel("labs"),
@@ -7224,53 +7427,53 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7224
7427
  }
7225
7428
  )
7226
7429
  ] }),
7227
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
7228
- activeReferenceThumbnail ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden", style: { height: 28 }, children: [
7229
- /* @__PURE__ */ jsx28("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
7230
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
7231
- /* @__PURE__ */ jsx28("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 hover:text-white/80 transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7232
- ] }) : /* @__PURE__ */ jsxs26("button", { onClick: handleSelectReference, className: "flex items-center gap-1 h-7 px-2 rounded-lg border border-white/10 text-white/30 hover:text-white/60 hover:border-white/20 transition-colors text-[10px] font-bold uppercase tracking-wide", children: [
7233
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "add_photo_alternate" }),
7234
- /* @__PURE__ */ jsx28("span", { children: "Ref" })
7430
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
7431
+ activeReferenceThumbnail ? /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden", style: { height: 28 }, children: [
7432
+ /* @__PURE__ */ jsx29("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
7433
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
7434
+ /* @__PURE__ */ jsx29("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 hover:text-white/80 transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7435
+ ] }) : /* @__PURE__ */ jsxs27("button", { onClick: handleSelectReference, className: "flex items-center gap-1 h-7 px-2 rounded-lg border border-white/10 text-white/30 hover:text-white/60 hover:border-white/20 transition-colors text-[10px] font-bold uppercase tracking-wide", children: [
7436
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "add_photo_alternate" }),
7437
+ /* @__PURE__ */ jsx29("span", { children: "Ref" })
7235
7438
  ] }),
7236
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsPromptCollapsed(!isPromptCollapsed), className: "text-white/40 hover:text-white transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", children: isPromptCollapsed ? "expand_more" : "expand_less" }) }),
7237
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7439
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsPromptCollapsed(!isPromptCollapsed), className: "text-white/40 hover:text-white transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", children: isPromptCollapsed ? "expand_more" : "expand_less" }) }),
7440
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7238
7441
  runningBadge,
7239
- /* @__PURE__ */ jsx28(PillButton, { variant: "solid", icon: "bolt", disabled: !activePrompt.trim(), onClick: () => handleGenerateBatch(), children: "Generieren" })
7442
+ /* @__PURE__ */ jsx29(PillButton, { variant: "solid", icon: "bolt", disabled: !activePrompt.trim(), onClick: () => handleGenerateBatch(), children: "Generieren" })
7240
7443
  ] })
7241
7444
  ] }),
7242
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
7243
- !isPromptCollapsed && /* @__PURE__ */ jsx28("div", { className: "px-6 py-4 border-b border-white/5 bg-black/10 overflow-hidden shrink-0", children: /* @__PURE__ */ jsxs26("div", { className: `relative min-h-[60px] p-4 rounded-2xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
7244
- /* @__PURE__ */ jsx28("textarea", { value: activePrompt, onChange: (e) => setActivePrompt(e.target.value), className: "w-full bg-transparent border-none outline-none text-[12px] leading-relaxed text-white/80 resize-none h-20 dark-scrollbar", placeholder: "W\xE4hle einen Knoten oder tippe einen Prompt..." }),
7245
- activePrompt && !isSynthesizing && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-white/5 hover:bg-white/10 flex items-center justify-center transition-colors text-white/20 hover:text-white", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7445
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
7446
+ !isPromptCollapsed && /* @__PURE__ */ jsx29("div", { className: "px-6 py-4 border-b border-white/5 bg-black/10 overflow-hidden shrink-0", children: /* @__PURE__ */ jsxs27("div", { className: `relative min-h-[60px] p-4 rounded-2xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
7447
+ /* @__PURE__ */ jsx29("textarea", { value: activePrompt, onChange: (e) => setActivePrompt(e.target.value), className: "w-full bg-transparent border-none outline-none text-[12px] leading-relaxed text-white/80 resize-none h-20 dark-scrollbar", placeholder: "W\xE4hle einen Knoten oder tippe einen Prompt..." }),
7448
+ activePrompt && !isSynthesizing && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-white/5 hover:bg-white/10 flex items-center justify-center transition-colors text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7246
7449
  ] }) }),
7247
- middlePanel === "labs" ? /* @__PURE__ */ jsx28("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx28(LabsTab, { services: labServices, onResult: (item) => {
7450
+ middlePanel === "labs" ? /* @__PURE__ */ jsx29("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx29(LabsTab, { services: labServices, onResult: (item) => {
7248
7451
  const frame = item.frames[0];
7249
7452
  if (frame?.base64) setCurrentResult(frameToGeneration(frame, item));
7250
- } }) }) : /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden flex flex-col", children: [
7251
- /* @__PURE__ */ jsx28("div", { className: "flex-1 p-6 overflow-hidden flex items-center justify-center", children: /* @__PURE__ */ jsx28("div", { className: "h-full w-full max-w-4xl aspect-square rounded-3xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center group shadow-2xl", children: currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-4 opacity-40", children: [
7252
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
7253
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
7254
- ] }) : currentResult.status === "error" ? /* @__PURE__ */ jsxs26("div", { className: "p-10 text-center flex flex-col items-center gap-5 max-w-md", children: [
7255
- /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-red-500 text-[32px]", children: "warning" }) }),
7256
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-2", children: [
7257
- /* @__PURE__ */ jsx28("h3", { className: "text-[11px] font-bold uppercase tracking-widest text-red-400", children: "Generierungsfehler" }),
7258
- /* @__PURE__ */ jsx28("p", { className: "text-white/60 text-[12px] leading-relaxed", children: currentResult.error?.message })
7453
+ } }) }) : /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden flex flex-col", children: [
7454
+ /* @__PURE__ */ jsx29("div", { className: "flex-1 p-6 overflow-hidden flex items-center justify-center", children: /* @__PURE__ */ jsx29("div", { className: "h-full w-full max-w-4xl aspect-square rounded-3xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center group shadow-2xl", children: currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-4 opacity-40", children: [
7455
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
7456
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
7457
+ ] }) : currentResult.status === "error" ? /* @__PURE__ */ jsxs27("div", { className: "p-10 text-center flex flex-col items-center gap-5 max-w-md", children: [
7458
+ /* @__PURE__ */ jsx29("div", { className: "w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-red-500 text-[32px]", children: "warning" }) }),
7459
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
7460
+ /* @__PURE__ */ jsx29("h3", { className: "text-[11px] font-bold uppercase tracking-widest text-red-400", children: "Generierungsfehler" }),
7461
+ /* @__PURE__ */ jsx29("p", { className: "text-white/60 text-[12px] leading-relaxed", children: currentResult.error?.message })
7259
7462
  ] }),
7260
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "refresh", onClick: () => handleGenerateImage(currentResult.prompt), children: "Erneut versuchen" })
7261
- ] }) : /* @__PURE__ */ jsxs26("div", { className: "h-full w-full relative flex items-center justify-center", children: [
7262
- /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, className: "max-h-full max-w-full object-contain rounded-xl shadow-2xl" }),
7263
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-6 flex gap-2 opacity-0 group-hover:opacity-100 transition-all translate-y-4 group-hover:translate-y-0 z-20", children: [
7264
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "replay", onClick: () => setActivePrompt(currentResult.prompt || ""), children: "Prompt" }),
7265
- /* @__PURE__ */ jsx28(PillButton, { variant: "solid", icon: "auto_fix_high", onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), children: "Referenz" }),
7266
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "download", onClick: handleDownloadSingle, children: "Speichern" })
7463
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "refresh", onClick: () => handleGenerateImage(currentResult.prompt), children: "Erneut versuchen" })
7464
+ ] }) : /* @__PURE__ */ jsxs27("div", { className: "h-full w-full relative flex items-center justify-center", children: [
7465
+ /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, className: "max-h-full max-w-full object-contain rounded-xl shadow-2xl" }),
7466
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-6 flex gap-2 opacity-0 group-hover:opacity-100 transition-all translate-y-4 group-hover:translate-y-0 z-20", children: [
7467
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "replay", onClick: () => setActivePrompt(currentResult.prompt || ""), children: "Prompt" }),
7468
+ /* @__PURE__ */ jsx29(PillButton, { variant: "solid", icon: "auto_fix_high", onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), children: "Referenz" }),
7469
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "download", onClick: handleDownloadSingle, children: "Speichern" })
7267
7470
  ] })
7268
- ] }) : /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7269
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[100px]", children: "palette" }),
7270
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
7471
+ ] }) : /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7472
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[100px]", children: "palette" }),
7473
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
7271
7474
  ] }) }) }),
7272
- currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx28("div", { className: "px-6 pb-4 shrink-0 flex gap-2 overflow-x-auto", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs26("div", { style: { position: "relative", flexShrink: 0 }, children: [
7273
- /* @__PURE__ */ jsx28(
7475
+ currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx29("div", { className: "px-6 pb-4 shrink-0 flex gap-2 overflow-x-auto", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs27("div", { style: { position: "relative", flexShrink: 0 }, children: [
7476
+ /* @__PURE__ */ jsx29(
7274
7477
  "div",
7275
7478
  {
7276
7479
  onClick: () => handleGallerySelect(item),
@@ -7285,10 +7488,10 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7285
7488
  transition: "opacity 0.15s, border-color 0.15s"
7286
7489
  },
7287
7490
  className: "hover:opacity-80",
7288
- children: /* @__PURE__ */ jsx28("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7491
+ children: /* @__PURE__ */ jsx29("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7289
7492
  }
7290
7493
  ),
7291
- /* @__PURE__ */ jsx28(
7494
+ /* @__PURE__ */ jsx29(
7292
7495
  "button",
7293
7496
  {
7294
7497
  onClick: (e) => {
@@ -7311,31 +7514,32 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7311
7514
  alignItems: "center",
7312
7515
  justifyContent: "center"
7313
7516
  },
7314
- children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 10, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7517
+ children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 10, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7315
7518
  }
7316
7519
  )
7317
7520
  ] }, item.id)) })
7318
7521
  ] })
7319
7522
  ] })
7320
7523
  ] }),
7321
- !isRightCollapsed && /* @__PURE__ */ jsx28("div", { onMouseDown: startRightResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7322
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col border-l border-white/5 bg-[#0e0e0e] shrink-0", style: { width: isRightCollapsed ? 60 : rightPanelWidth, transition: "none" }, children: [
7323
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 h-14 shrink-0 overflow-hidden", children: [
7324
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-1", children: [
7325
- ["history", "gallery", "inspect", "setup", "sync", "tags"].map((tab) => /* @__PURE__ */ jsx28("button", { onClick: () => {
7524
+ !isRightCollapsed && /* @__PURE__ */ jsx29("div", { onMouseDown: startRightResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7525
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col border-l border-white/5 bg-[#0e0e0e] shrink-0", style: { width: isRightCollapsed ? 60 : rightPanelWidth, transition: "none" }, children: [
7526
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 h-14 shrink-0 overflow-hidden", children: [
7527
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-1", children: [
7528
+ ["history", "gallery", "inspect", "setup", "sync", "tags"].map((tab) => /* @__PURE__ */ jsx29("button", { onClick: () => {
7326
7529
  setActiveTab(tab);
7327
7530
  setIsRightCollapsed(false);
7328
- }, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : tab === "inspect" ? "info" : tab === "setup" ? "settings" : tab === "sync" ? "cloud_sync" : "label" }) }, tab)),
7329
- serverBaseUrl && /* @__PURE__ */ jsx28("button", { onClick: () => {
7531
+ }, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : tab === "inspect" ? "info" : tab === "setup" ? "settings" : tab === "sync" ? "cloud_sync" : "label" }) }, tab)),
7532
+ serverBaseUrl && /* @__PURE__ */ jsx29("button", { onClick: () => {
7330
7533
  setActiveTab("server");
7331
7534
  setIsRightCollapsed(false);
7332
- }, className: `w-10 flex items-center justify-center relative transition-colors ${activeTab === "server" ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) })
7535
+ }, className: `w-10 flex items-center justify-center relative transition-colors ${activeTab === "server" ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
7536
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowSzenen(true), className: "w-10 flex items-center justify-center relative text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "movie" }) })
7333
7537
  ] }),
7334
- hfToken && /* @__PURE__ */ jsx28("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-10 flex items-center justify-center text-white/20 hover:text-white/60 transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[18px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) }),
7335
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsRightCollapsed(!isRightCollapsed), className: "w-10 flex items-center justify-center text-white/20 hover:text-white", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: isRightCollapsed ? "chevron_left" : "chevron_right" }) })
7538
+ hfToken && /* @__PURE__ */ jsx29("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-10 flex items-center justify-center text-white/20 hover:text-white/60 transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[18px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) }),
7539
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsRightCollapsed(!isRightCollapsed), className: "w-10 flex items-center justify-center text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: isRightCollapsed ? "chevron_left" : "chevron_right" }) })
7336
7540
  ] }),
7337
- !isRightCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
7338
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7541
+ !isRightCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7542
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
7339
7543
  TagManagerPanel,
7340
7544
  {
7341
7545
  workspaceTags,
@@ -7346,12 +7550,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7346
7550
  onTagMove: handleTagMove
7347
7551
  }
7348
7552
  ),
7349
- activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs26("div", { children: [
7350
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7351
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7553
+ activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs27("div", { children: [
7554
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7555
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7352
7556
  ] }) }),
7353
- activeTab === "history" && /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7354
- activeTab === "gallery" && /* @__PURE__ */ jsx28(
7557
+ activeTab === "history" && /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7558
+ activeTab === "gallery" && /* @__PURE__ */ jsx29(
7355
7559
  MediaLibrary,
7356
7560
  {
7357
7561
  items: galleryItems,
@@ -7367,9 +7571,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7367
7571
  onLoadMore: () => setGalleryVisibleCount((c) => c + 20)
7368
7572
  }
7369
7573
  ),
7370
- activeTab === "inspect" && /* @__PURE__ */ jsx28(InspectPanel, { currentResult, history, onSelect: setCurrentResult }),
7371
- activeTab === "setup" && /* @__PURE__ */ jsx28(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7372
- activeTab === "sync" && /* @__PURE__ */ jsx28(
7574
+ activeTab === "inspect" && /* @__PURE__ */ jsx29(InspectPanel, { currentResult, history, onSelect: setCurrentResult }),
7575
+ activeTab === "setup" && /* @__PURE__ */ jsx29(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7576
+ activeTab === "sync" && /* @__PURE__ */ jsx29(
7373
7577
  ProjectSyncTab,
7374
7578
  {
7375
7579
  topSlot: syncTopSlot,
@@ -7393,15 +7597,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7393
7597
  onHfInitialSync: hfToken ? handleHfInitialSync : void 0
7394
7598
  }
7395
7599
  ),
7396
- activeTab === "server" && /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl })
7600
+ activeTab === "server" && /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl })
7397
7601
  ] })
7398
7602
  ] })
7399
7603
  ] });
7400
7604
  }
7401
7605
 
7402
7606
  // src/components/FaApp.tsx
7403
- import { useState as useState25, useEffect as useEffect11 } from "react";
7404
- import { jsx as jsx29 } from "react/jsx-runtime";
7607
+ import { useState as useState26, useEffect as useEffect11 } from "react";
7608
+ import { jsx as jsx30 } from "react/jsx-runtime";
7405
7609
  function FaApp({
7406
7610
  onGenerateImage,
7407
7611
  onGeneratePrompt,
@@ -7420,7 +7624,7 @@ function FaApp({
7420
7624
  onServerDelete,
7421
7625
  buildInfo
7422
7626
  }) {
7423
- const [hfNamespace, setHfNamespace] = useState25(void 0);
7627
+ const [hfNamespace, setHfNamespace] = useState26(void 0);
7424
7628
  useEffect11(() => {
7425
7629
  if (!serverBaseUrl) return;
7426
7630
  fetch(`${serverBaseUrl}/api/status`).then((r) => r.json()).then((d) => {
@@ -7432,7 +7636,7 @@ function FaApp({
7432
7636
  const result = await onGeneratePrompt(text, options);
7433
7637
  return result.text;
7434
7638
  };
7435
- return /* @__PURE__ */ jsx29(
7639
+ return /* @__PURE__ */ jsx30(
7436
7640
  AvatarArchitectApp,
7437
7641
  {
7438
7642
  onGenerateImage,
@@ -7442,6 +7646,7 @@ function FaApp({
7442
7646
  initialHfToken: libToken ? libToken.startsWith("hf_") ? libToken : `hf_${libToken}` : void 0,
7443
7647
  hfNamespace,
7444
7648
  allowDevNamespace: !hfNamespace && allowDevNamespace,
7649
+ requireWorkspaceSelection: true,
7445
7650
  serverBaseUrl,
7446
7651
  onFetchServerProjects,
7447
7652
  onServerSave,
@@ -8018,6 +8223,7 @@ export {
8018
8223
  CompactDropdown,
8019
8224
  FaApp,
8020
8225
  FaToolsBadge,
8226
+ FlowWorkspacePicker,
8021
8227
  GLOBAL_STYLES,
8022
8228
  HistoryPanel,
8023
8229
  InspectPanel,