@helpai/elements 0.14.2 → 0.16.0
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/configurator.mjs +22 -7
- package/elements-web-component.esm.js +25 -25
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +25 -25
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +25 -25
- package/elements.esm.js.map +4 -4
- package/elements.js +25 -25
- package/elements.js.map +4 -4
- package/index.d.ts +38 -7
- package/index.mjs +394 -264
- package/package.json +1 -1
- package/schema.d.ts +6 -3
- package/schema.json +39 -12
- package/schema.mjs +22 -7
- package/style.css +3 -3
- package/web-component.mjs +392 -263
package/index.mjs
CHANGED
|
@@ -35,7 +35,8 @@ var STRINGS_EN = {
|
|
|
35
35
|
attachmentMimeRejected: "File type not supported",
|
|
36
36
|
attachmentTooLarge: "File is too large",
|
|
37
37
|
attachmentTooMany: "Attachment limit reached",
|
|
38
|
-
|
|
38
|
+
conversationClosed: "This conversation is closed",
|
|
39
|
+
conversationLoading: "Loading conversation\u2026",
|
|
39
40
|
close: "Close",
|
|
40
41
|
collapse: "Collapse",
|
|
41
42
|
collapseSidebar: "Collapse sidebar",
|
|
@@ -55,12 +56,10 @@ var STRINGS_EN = {
|
|
|
55
56
|
history: "History",
|
|
56
57
|
historyBack: "Back to chat",
|
|
57
58
|
historyEmpty: "No previous conversations yet",
|
|
58
|
-
historyLoading: "Loading your
|
|
59
|
-
|
|
60
|
-
historyTitle: "Chat history",
|
|
59
|
+
historyLoading: "Loading your conversations\u2026",
|
|
60
|
+
historyTitle: "Conversation history",
|
|
61
61
|
language: "Language",
|
|
62
62
|
launcherOpen: "Open chat",
|
|
63
|
-
messagesLoading: "Loading conversation\u2026",
|
|
64
63
|
micStart: "Start voice input",
|
|
65
64
|
micStop: "Stop voice input",
|
|
66
65
|
micUnsupported: "Voice input is not supported in this browser",
|
|
@@ -76,16 +75,20 @@ var STRINGS_EN = {
|
|
|
76
75
|
startNewConversation: "Start a new conversation",
|
|
77
76
|
stop: "Stop",
|
|
78
77
|
theme: "Theme",
|
|
79
|
-
themeAuto: "Auto
|
|
78
|
+
themeAuto: "Auto",
|
|
80
79
|
themeDark: "Dark",
|
|
81
80
|
themeLight: "Light",
|
|
81
|
+
textSize: "Text size",
|
|
82
|
+
textSizeSmall: "Small",
|
|
83
|
+
textSizeNormal: "Normal",
|
|
84
|
+
textSizeLarge: "Large",
|
|
82
85
|
loading: "Loading\u2026",
|
|
83
86
|
thinking: "Thinking\u2026",
|
|
84
87
|
thoughts: "Thoughts",
|
|
85
88
|
usedTool: "Used tool",
|
|
86
89
|
// ── Messenger modules ──────────────────────────────────────────
|
|
87
90
|
tabHome: "Home",
|
|
88
|
-
|
|
91
|
+
tabConversations: "Conversations",
|
|
89
92
|
tabHelp: "Help",
|
|
90
93
|
tabNews: "News",
|
|
91
94
|
modulesEmpty: "Nothing here yet",
|
|
@@ -109,6 +112,8 @@ var STRINGS_EN = {
|
|
|
109
112
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ────
|
|
110
113
|
formSubmit: "Submit",
|
|
111
114
|
formSkip: "Skip for now",
|
|
115
|
+
formSubmitted: "Form submitted",
|
|
116
|
+
formSkipped: "Form skipped",
|
|
112
117
|
formRequired: "This field is required",
|
|
113
118
|
formInvalidEmail: "Enter a valid email address",
|
|
114
119
|
formInvalidTel: "Enter a valid phone number",
|
|
@@ -140,7 +145,8 @@ var STRINGS_FR = {
|
|
|
140
145
|
attachmentMimeRejected: "Type de fichier non pris en charge",
|
|
141
146
|
attachmentTooLarge: "Le fichier est trop volumineux",
|
|
142
147
|
attachmentTooMany: "Limite de pi\xE8ces jointes atteinte",
|
|
143
|
-
|
|
148
|
+
conversationClosed: "Cette conversation est ferm\xE9e",
|
|
149
|
+
conversationLoading: "Chargement de la conversation\u2026",
|
|
144
150
|
close: "Fermer",
|
|
145
151
|
collapse: "R\xE9duire",
|
|
146
152
|
collapseSidebar: "R\xE9duire la barre lat\xE9rale",
|
|
@@ -161,11 +167,9 @@ var STRINGS_FR = {
|
|
|
161
167
|
historyBack: "Retour au chat",
|
|
162
168
|
historyEmpty: "Aucune conversation pour le moment",
|
|
163
169
|
historyLoading: "Chargement de vos conversations\u2026",
|
|
164
|
-
historyNewChat: "Nouvelle conversation",
|
|
165
170
|
historyTitle: "Historique des conversations",
|
|
166
171
|
language: "Langue",
|
|
167
172
|
launcherOpen: "Ouvrir le chat",
|
|
168
|
-
messagesLoading: "Chargement de la conversation\u2026",
|
|
169
173
|
micStart: "D\xE9marrer la saisie vocale",
|
|
170
174
|
micStop: "Arr\xEAter la saisie vocale",
|
|
171
175
|
micUnsupported: "La saisie vocale n'est pas prise en charge par ce navigateur",
|
|
@@ -181,16 +185,20 @@ var STRINGS_FR = {
|
|
|
181
185
|
startNewConversation: "D\xE9marrer une nouvelle conversation",
|
|
182
186
|
stop: "Arr\xEAter",
|
|
183
187
|
theme: "Th\xE8me",
|
|
184
|
-
themeAuto: "Auto
|
|
188
|
+
themeAuto: "Auto",
|
|
185
189
|
themeDark: "Sombre",
|
|
186
190
|
themeLight: "Clair",
|
|
191
|
+
textSize: "Taille du texte",
|
|
192
|
+
textSizeSmall: "Petite",
|
|
193
|
+
textSizeNormal: "Normale",
|
|
194
|
+
textSizeLarge: "Grande",
|
|
187
195
|
loading: "Chargement\u2026",
|
|
188
196
|
thinking: "R\xE9flexion\u2026",
|
|
189
197
|
thoughts: "R\xE9flexions",
|
|
190
198
|
usedTool: "Outil utilis\xE9",
|
|
191
199
|
// ── Messenger modules ──────────────────────────────────────────
|
|
192
200
|
tabHome: "Accueil",
|
|
193
|
-
|
|
201
|
+
tabConversations: "Conversations",
|
|
194
202
|
tabHelp: "Aide",
|
|
195
203
|
tabNews: "Actualit\xE9s",
|
|
196
204
|
modulesEmpty: "Rien pour le moment",
|
|
@@ -214,6 +222,8 @@ var STRINGS_FR = {
|
|
|
214
222
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ────
|
|
215
223
|
formSubmit: "Envoyer",
|
|
216
224
|
formSkip: "Ignorer pour l'instant",
|
|
225
|
+
formSubmitted: "Formulaire envoy\xE9",
|
|
226
|
+
formSkipped: "Formulaire ignor\xE9",
|
|
217
227
|
formRequired: "Ce champ est obligatoire",
|
|
218
228
|
formInvalidEmail: "Saisissez une adresse e-mail valide",
|
|
219
229
|
formInvalidTel: "Saisissez un num\xE9ro de t\xE9l\xE9phone valide",
|
|
@@ -472,12 +482,12 @@ var DEFAULT_LAUNCHER = {
|
|
|
472
482
|
hidden: false
|
|
473
483
|
};
|
|
474
484
|
var DEFAULT_ACTIONS_BY_MODE = {
|
|
475
|
-
floating: ["theme", "history", "close", "clear", "expand", "fullscreen", "popOut", "sound", "language"],
|
|
476
|
-
inline: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
477
|
-
standalone: ["theme", "history", "clear", "sound", "language"],
|
|
478
|
-
page: ["theme", "history", "clear", "sound", "language"],
|
|
479
|
-
modal: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
480
|
-
drawer: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"]
|
|
485
|
+
floating: ["theme", "textSize", "history", "close", "clear", "expand", "fullscreen", "popOut", "sound", "language"],
|
|
486
|
+
inline: ["theme", "textSize", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
487
|
+
standalone: ["theme", "textSize", "history", "clear", "sound", "language"],
|
|
488
|
+
page: ["theme", "textSize", "history", "clear", "sound", "language"],
|
|
489
|
+
modal: ["theme", "textSize", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
490
|
+
drawer: ["theme", "textSize", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"]
|
|
481
491
|
};
|
|
482
492
|
var DEFAULT_SOUND = {
|
|
483
493
|
enabled: true,
|
|
@@ -488,7 +498,7 @@ var DEFAULT_HAPTICS = {
|
|
|
488
498
|
enabled: true,
|
|
489
499
|
events: void 0
|
|
490
500
|
};
|
|
491
|
-
var DEFAULT_MODULES = [{ label: "
|
|
501
|
+
var DEFAULT_MODULES = [{ label: "tabConversations", layout: "chat" }];
|
|
492
502
|
var DEFAULT_HOME_MODULE = { showSearchBar: true };
|
|
493
503
|
|
|
494
504
|
// src/core/config/resolve.ts
|
|
@@ -513,6 +523,8 @@ function resolveOptions(rawOpts) {
|
|
|
513
523
|
pageContext: sanitizePageContext(opts.pageContext),
|
|
514
524
|
position: presentation.position ?? "bottom-right",
|
|
515
525
|
themeMode,
|
|
526
|
+
// Purely an end-user preference (the ⋯ menu cycler) — no config input.
|
|
527
|
+
textSize: "normal",
|
|
516
528
|
themeOverrides,
|
|
517
529
|
mode,
|
|
518
530
|
iframe: presentation.iframe ?? false,
|
|
@@ -620,7 +632,7 @@ function resolveModules(overrides) {
|
|
|
620
632
|
resolved.greetingText = m.greetingText;
|
|
621
633
|
resolved.showGreeting = m.showGreeting ?? true;
|
|
622
634
|
resolved.showSearchBar = m.showSearchBar ?? DEFAULT_HOME_MODULE.showSearchBar;
|
|
623
|
-
resolved.
|
|
635
|
+
resolved.showRecentConversations = m.showRecentConversations ?? true;
|
|
624
636
|
if (m.userAvatars && m.userAvatars.length > 0) resolved.userAvatars = m.userAvatars;
|
|
625
637
|
if (m.status) resolved.status = m.status;
|
|
626
638
|
resolved.contentBlockTitle = m.contentBlockTitle;
|
|
@@ -700,14 +712,17 @@ function resolveLauncher(overrides) {
|
|
|
700
712
|
}
|
|
701
713
|
|
|
702
714
|
// src/core/config/overrides.ts
|
|
703
|
-
function applyOptionOverrides(options, activeLocale, activeThemeMode) {
|
|
704
|
-
if (activeLocale === options.locale && activeThemeMode === options.themeMode
|
|
715
|
+
function applyOptionOverrides(options, activeLocale, activeThemeMode, activeTextSize) {
|
|
716
|
+
if (activeLocale === options.locale && activeThemeMode === options.themeMode && activeTextSize === options.textSize) {
|
|
717
|
+
return options;
|
|
718
|
+
}
|
|
705
719
|
const next = { ...options };
|
|
706
720
|
if (activeLocale !== options.locale) {
|
|
707
721
|
next.locale = activeLocale;
|
|
708
722
|
next.strings = resolveStrings(activeLocale, options.stringsOverride);
|
|
709
723
|
}
|
|
710
724
|
if (activeThemeMode !== options.themeMode) next.themeMode = activeThemeMode;
|
|
725
|
+
if (activeTextSize !== options.textSize) next.textSize = activeTextSize;
|
|
711
726
|
return next;
|
|
712
727
|
}
|
|
713
728
|
|
|
@@ -792,6 +807,7 @@ var ACTION_NAME_LITERALS = [
|
|
|
792
807
|
"history",
|
|
793
808
|
"language",
|
|
794
809
|
"theme",
|
|
810
|
+
"textSize",
|
|
795
811
|
"close"
|
|
796
812
|
];
|
|
797
813
|
var boolAttr = (v) => v !== "false";
|
|
@@ -909,19 +925,19 @@ function bindHostCommands(host, handlers) {
|
|
|
909
925
|
}
|
|
910
926
|
|
|
911
927
|
// src/styles/tokens.css
|
|
912
|
-
var tokens_default = ':host{--__P__-accent: __BRAND_ACCENT__;--__P__-accent-text: __BRAND_ACCENT_TEXT__;--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-xs: 12px;--__P__-text-sm: 13px;--__P__-text-base: 15px;--__P__-text-md: 16px;--__P__-text-lg: 18px;--__P__-text-xl: 22px;--__P__-text-2xl: 30px
|
|
928
|
+
var tokens_default = ':host{--__P__-accent: __BRAND_ACCENT__;--__P__-accent-text: __BRAND_ACCENT_TEXT__;--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);color-scheme:dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}\n';
|
|
913
929
|
|
|
914
930
|
// src/styles/reset.css
|
|
915
931
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
916
932
|
|
|
917
933
|
// src/styles/panel.css
|
|
918
|
-
var panel_default = '.__P__-anchor{right:16px;bottom:16px}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:14px}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:14px;background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:#ffffff26}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:14px;font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-left:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:14px;font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;right:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;align-items:flex-start;height:0;margin:0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:14px;word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-bottom-right-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-bottom-left-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:11px;line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-left:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-left:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:12.5px;padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-left:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-radius:0 var(--__P__-radius-sm) var(--__P__-radius-sm) 0;color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:left}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-left:var(--__P__-space-3);border-left:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);margin-top:6px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs)}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:14px;line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:16px}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:14px;text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-2)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:12px 8px 6px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-item{all:unset;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:var(--__P__-radius-md);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-title{font-size:14px;font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-preview{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-item[data-closed=true] .__P__-history-title:after{content:"\\2022";margin-left:var(--__P__-space-2);opacity:.5}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:11px;line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:11px;letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;right:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-help-card .__P__-list-row:hover{background:var(--__P__-hover)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:10px;font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:14px;font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:2px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;color:color-mix(in srgb,var(--__P__-on-accent) 88%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-left:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-left:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:left;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:14px}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:14px}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:left}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:14px}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:14px;color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:left;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-bg-elevated)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:left;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-tags{display:flex;gap:6px;flex-wrap:wrap}.__P__-news-tag{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);padding:2px 8px;border-radius:999px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:14px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;right:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-field{display:flex;flex-direction:column;gap:4px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;box-sizing:border-box;padding:var(--__P__-space-2) var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:6px}.__P__-choice{display:flex;align-items:flex-start;gap:8px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:2px}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4) var(--__P__-space-4);border-top:1px solid var(--__P__-border);flex:1 1 auto;min-height:0;overflow-y:auto}.__P__-list-wrap:has(+.__P__-form-gate){flex:0 1 auto;max-height:40%}.__P__-list-wrap:has(+.__P__-form-gate) .__P__-list:empty{padding:0}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}\n';
|
|
934
|
+
var panel_default = '.__P__-anchor{right:16px;bottom:16px}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:#ffffff26}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-left:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;right:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;align-items:flex-start;height:0;margin:0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-bottom-right-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-bottom-left-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-left:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-left:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-left:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-radius:0 var(--__P__-radius-sm) var(--__P__-radius-sm) 0;color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:left}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-left:var(--__P__-space-3);border-left:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);margin-top:6px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs)}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:calc(16px * var(--__P__-text-scale))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-2)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:12px 8px 6px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-item{all:unset;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:var(--__P__-radius-md);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-title{font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-preview{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-item[data-closed=true] .__P__-history-title:after{content:"\\2022";margin-left:var(--__P__-space-2);opacity:.5}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;right:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-help-card .__P__-list-row:hover{background:var(--__P__-hover)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:2px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;color:color-mix(in srgb,var(--__P__-on-accent) 88%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-left:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-left:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:left;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:left}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:left;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-bg-elevated)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:left;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-tags{display:flex;gap:6px;flex-wrap:wrap}.__P__-news-tag{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);padding:2px 8px;border-radius:999px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;right:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-field{display:flex;flex-direction:column;gap:4px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;box-sizing:border-box;padding:var(--__P__-space-2) var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:6px}.__P__-choice{display:flex;align-items:flex-start;gap:8px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:2px}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-2);padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done-title{font-weight:400}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}\n';
|
|
919
935
|
|
|
920
936
|
// src/styles/standalone.css
|
|
921
937
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
922
938
|
|
|
923
939
|
// src/styles/page.css
|
|
924
|
-
var page_default = ':host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .__P__-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--__P__-bg);color:var(--__P__-fg);transition:grid-template-columns var(--__P__-dur-base) var(--__P__-ease-in-out)}:host([data-mode="page"]) .__P__-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .__P__-sidebar{border-right:1px solid var(--__P__-border);display:flex;flex-direction:column;overflow:hidden;background:var(--__P__-surface)}:host([data-mode="page"]) .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-5);border-bottom:1px solid var(--__P__-border);display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-2);justify-content:center}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-logo,:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-title{display:none}:host([data-mode="page"]) .__P__-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--__P__-border);border-radius:6px;background:transparent;color:var(--__P__-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .__P__-sidebar-toggle:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-toggle:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-logo{height:32px;display:block}:host([data-mode="page"]) .__P__-sidebar-title{font-size:var(--__P__-text-md);font-weight:600}:host([data-mode="page"]) .__P__-sidebar-section{padding:var(--__P__-space-3) var(--__P__-space-4);border-bottom:1px solid var(--__P__-border)}:host([data-mode="page"]) .__P__-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .__P__-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--__P__-space-2) var(--__P__-space-3);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);text-decoration:none;font-size:14px;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-nav-item:hover{background:var(--__P__-hover)}:host([data-mode="page"]) .__P__-sidebar-nav-item:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}:host([data-mode="page"]) .__P__-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--__P__-space-2)}:host([data-mode="page"]) .__P__-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);text-decoration:none;color:var(--__P__-fg);transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-card:hover{border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-card-label{font-weight:600;font-size:14px}:host([data-mode="page"]) .__P__-sidebar-card-desc{font-size:var(--__P__-text-xs);color:var(--__P__-muted);margin-top:2px}:host([data-mode="page"]) .__P__-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--__P__-space-3) var(--__P__-space-4)}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .__P__-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .__P__-sidebar{display:none}}\n';
|
|
940
|
+
var page_default = ':host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .__P__-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--__P__-bg);color:var(--__P__-fg);transition:grid-template-columns var(--__P__-dur-base) var(--__P__-ease-in-out)}:host([data-mode="page"]) .__P__-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .__P__-sidebar{border-right:1px solid var(--__P__-border);display:flex;flex-direction:column;overflow:hidden;background:var(--__P__-surface)}:host([data-mode="page"]) .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-5);border-bottom:1px solid var(--__P__-border);display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-2);justify-content:center}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-logo,:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-title{display:none}:host([data-mode="page"]) .__P__-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--__P__-border);border-radius:6px;background:transparent;color:var(--__P__-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .__P__-sidebar-toggle:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-toggle:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-logo{height:32px;display:block}:host([data-mode="page"]) .__P__-sidebar-title{font-size:var(--__P__-text-md);font-weight:600}:host([data-mode="page"]) .__P__-sidebar-section{padding:var(--__P__-space-3) var(--__P__-space-4);border-bottom:1px solid var(--__P__-border)}:host([data-mode="page"]) .__P__-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .__P__-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--__P__-space-2) var(--__P__-space-3);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);text-decoration:none;font-size:calc(14px * var(--__P__-text-scale));transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-nav-item:hover{background:var(--__P__-hover)}:host([data-mode="page"]) .__P__-sidebar-nav-item:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}:host([data-mode="page"]) .__P__-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--__P__-space-2)}:host([data-mode="page"]) .__P__-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);text-decoration:none;color:var(--__P__-fg);transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-card:hover{border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}:host([data-mode="page"]) .__P__-sidebar-card-desc{font-size:var(--__P__-text-xs);color:var(--__P__-muted);margin-top:2px}:host([data-mode="page"]) .__P__-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--__P__-space-3) var(--__P__-space-4)}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .__P__-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .__P__-sidebar{display:none}}\n';
|
|
925
941
|
|
|
926
942
|
// src/styles/index.ts
|
|
927
943
|
var PREFIX = true ? "helpai" : "helpai";
|
|
@@ -1236,7 +1252,7 @@ var DEFAULT_PATHS = {
|
|
|
1236
1252
|
/**
|
|
1237
1253
|
* Form submission (the event-driven forms engine). POST `{ visitorId,
|
|
1238
1254
|
* conversationId, formId, trigger, values, skipped? }` → record the form's answers
|
|
1239
|
-
* immediately, keyed by the same
|
|
1255
|
+
* immediately, keyed by the same `visitorId` + `conversationId` the chat uses.
|
|
1240
1256
|
* Overridable via `endpoints.submitForm`. Fire-and-forget; 404 is ignored.
|
|
1241
1257
|
*/
|
|
1242
1258
|
submitForm: "/ai/agent/submit-form"
|
|
@@ -2574,6 +2590,10 @@ var MoreIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "tru
|
|
|
2574
2590
|
] });
|
|
2575
2591
|
var SpeakerIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M11 5 6 9H2v6h4l5 4zM15 9a5 5 0 0 1 0 6M18 7a9 9 0 0 1 0 10" }) });
|
|
2576
2592
|
var SpeakerMutedIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M11 5 6 9H2v6h4l5 4zM22 9l-6 6M16 9l6 6" }) });
|
|
2593
|
+
var TextSizeIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
2594
|
+
/* @__PURE__ */ jsx("path", { d: "M3 18 8 6l5 12M4.7 14h6.6" }),
|
|
2595
|
+
/* @__PURE__ */ jsx("path", { d: "M14.5 18l3.2-7 3.2 7M15.6 15.8h4.2" })
|
|
2596
|
+
] });
|
|
2577
2597
|
var CheckIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
2578
2598
|
var HistoryIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
2579
2599
|
/* @__PURE__ */ jsx("path", { d: "M3 3v6h6" }),
|
|
@@ -2754,8 +2774,8 @@ var TID = {
|
|
|
2754
2774
|
sidebar: `${p2}-sidebar`,
|
|
2755
2775
|
/** Sidebar collapse / expand toggle. */
|
|
2756
2776
|
sidebarToggle: `${p2}-sidebar-toggle`,
|
|
2757
|
-
/** Sidebar "New
|
|
2758
|
-
|
|
2777
|
+
/** Sidebar "New conversation" button. */
|
|
2778
|
+
sidebarNewConversation: `${p2}-sidebar-new-conversation`,
|
|
2759
2779
|
/** Sidebar history row — suffix `-{conversationId}` at the JSX site. */
|
|
2760
2780
|
sidebarItem: `${p2}-sidebar-item`,
|
|
2761
2781
|
// ── Messenger modules ───────────────────────────────────────────
|
|
@@ -2765,7 +2785,7 @@ var TID = {
|
|
|
2765
2785
|
modulesEmpty: `${p2}-modules-empty`,
|
|
2766
2786
|
/** Bottom-nav tab button — suffix `-{moduleId}` at the JSX site. */
|
|
2767
2787
|
tab: `${p2}-tab`,
|
|
2768
|
-
/** Unread badge on the
|
|
2788
|
+
/** Unread badge on the Conversations tab. */
|
|
2769
2789
|
tabBadge: `${p2}-tab-badge`,
|
|
2770
2790
|
/** Home module root. */
|
|
2771
2791
|
homeView: `${p2}-home-view`,
|
|
@@ -2780,7 +2800,7 @@ var TID = {
|
|
|
2780
2800
|
/** Home / Help search bar. */
|
|
2781
2801
|
homeSearch: `${p2}-home-search`,
|
|
2782
2802
|
helpSearch: `${p2}-help-search`,
|
|
2783
|
-
/** Home recent-
|
|
2803
|
+
/** Home recent-conversation card. */
|
|
2784
2804
|
homeRecent: `${p2}-home-recent`,
|
|
2785
2805
|
/** Home content-list row ("Popular articles") — suffix `-{id}`. */
|
|
2786
2806
|
homeContentRow: `${p2}-home-content-row`,
|
|
@@ -2789,8 +2809,10 @@ var TID = {
|
|
|
2789
2809
|
/** News list item — suffix `-{id}`. */
|
|
2790
2810
|
newsItem: `${p2}-news-item`,
|
|
2791
2811
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ─────
|
|
2792
|
-
/** Form gate root
|
|
2812
|
+
/** Form gate root — a timeline row that locks the chat while open. */
|
|
2793
2813
|
formGate: `${p2}-form-gate`,
|
|
2814
|
+
/** Collapsed "Form submitted / skipped" marker row (ephemeral). */
|
|
2815
|
+
formDone: `${p2}-form-done`,
|
|
2794
2816
|
/** Form submit button. */
|
|
2795
2817
|
formSubmit: `${p2}-form-submit`,
|
|
2796
2818
|
/** Form skip button (shown only when `skippable`). */
|
|
@@ -3054,6 +3076,7 @@ function isActionVisible(name, mode, panelSize, ctx) {
|
|
|
3054
3076
|
case "history":
|
|
3055
3077
|
case "language":
|
|
3056
3078
|
case "theme":
|
|
3079
|
+
case "textSize":
|
|
3057
3080
|
return true;
|
|
3058
3081
|
case "expand":
|
|
3059
3082
|
return mode === "floating";
|
|
@@ -3757,6 +3780,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
3757
3780
|
import { jsx as jsx9, jsxs as jsxs7 } from "preact/jsx-runtime";
|
|
3758
3781
|
var p9 = BRAND.cssPrefix;
|
|
3759
3782
|
var NEXT_THEME = { auto: "dark", dark: "light", light: "auto" };
|
|
3783
|
+
var NEXT_TEXT_SIZE = { normal: "large", large: "small", small: "normal" };
|
|
3760
3784
|
function themeIcon(mode) {
|
|
3761
3785
|
if (mode === "light") return /* @__PURE__ */ jsx9(SunIcon, {});
|
|
3762
3786
|
if (mode === "dark") return /* @__PURE__ */ jsx9(MoonIcon, {});
|
|
@@ -3764,7 +3788,7 @@ function themeIcon(mode) {
|
|
|
3764
3788
|
}
|
|
3765
3789
|
function HeaderActions({ panelProps, variant }) {
|
|
3766
3790
|
const { options, panelSize, feedback, onClose, onClear, onExpand, onFullscreen, onPopOut, onSoundToggle } = panelProps;
|
|
3767
|
-
const { onToggleHistory, onLocaleChange, onThemeChange } = panelProps;
|
|
3791
|
+
const { onToggleHistory, onLocaleChange, onThemeChange, onTextSizeChange } = panelProps;
|
|
3768
3792
|
const s = options.strings;
|
|
3769
3793
|
const mode = options.mode;
|
|
3770
3794
|
const isChat = variant === "chat";
|
|
@@ -3774,27 +3798,15 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
3774
3798
|
const visible = (name) => isActionVisible(name, mode, panelSize, { popOutUrl: options.popOutUrl });
|
|
3775
3799
|
const themeMode = options.themeMode;
|
|
3776
3800
|
const themeLabel = { auto: s.themeAuto, light: s.themeLight, dark: s.themeDark };
|
|
3801
|
+
const textSize = options.textSize;
|
|
3802
|
+
const textSizeLabel = {
|
|
3803
|
+
small: s.textSizeSmall,
|
|
3804
|
+
normal: s.textSizeNormal,
|
|
3805
|
+
large: s.textSizeLarge
|
|
3806
|
+
};
|
|
3777
3807
|
const items = [];
|
|
3778
|
-
if (has("
|
|
3779
|
-
items.push({
|
|
3780
|
-
id: "theme",
|
|
3781
|
-
icon: themeIcon(themeMode),
|
|
3782
|
-
label: `${s.theme}: ${themeLabel[themeMode]}`,
|
|
3783
|
-
onSelect: () => onThemeChange(NEXT_THEME[themeMode]),
|
|
3784
|
-
keepOpen: true
|
|
3785
|
-
});
|
|
3786
|
-
}
|
|
3787
|
-
if (has("language") && options.availableLocales.length > 1) {
|
|
3788
|
-
for (const locale of options.availableLocales) {
|
|
3789
|
-
items.push({
|
|
3790
|
-
id: `language:${locale}`,
|
|
3791
|
-
label: `${s.language} \u2014 ${locale}`,
|
|
3792
|
-
lang: locale,
|
|
3793
|
-
type: "switch",
|
|
3794
|
-
on: locale === options.locale,
|
|
3795
|
-
onSelect: () => onLocaleChange(locale)
|
|
3796
|
-
});
|
|
3797
|
-
}
|
|
3808
|
+
if (isChat && has("clear")) {
|
|
3809
|
+
items.push({ id: "clear", icon: /* @__PURE__ */ jsx9(ComposeIcon, {}), label: s.newConversation, onSelect: onClear });
|
|
3798
3810
|
}
|
|
3799
3811
|
if (has("expand") && visible("expand")) {
|
|
3800
3812
|
const on = panelSize === "expanded";
|
|
@@ -3831,8 +3843,35 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
3831
3843
|
onSelect: onSoundToggle
|
|
3832
3844
|
});
|
|
3833
3845
|
}
|
|
3834
|
-
if (
|
|
3835
|
-
items.push({
|
|
3846
|
+
if (has("theme")) {
|
|
3847
|
+
items.push({
|
|
3848
|
+
id: "theme",
|
|
3849
|
+
icon: themeIcon(themeMode),
|
|
3850
|
+
label: `${s.theme}: ${themeLabel[themeMode]}`,
|
|
3851
|
+
onSelect: () => onThemeChange(NEXT_THEME[themeMode]),
|
|
3852
|
+
keepOpen: true
|
|
3853
|
+
});
|
|
3854
|
+
}
|
|
3855
|
+
if (has("textSize")) {
|
|
3856
|
+
items.push({
|
|
3857
|
+
id: "textSize",
|
|
3858
|
+
icon: /* @__PURE__ */ jsx9(TextSizeIcon, {}),
|
|
3859
|
+
label: `${s.textSize}: ${textSizeLabel[textSize]}`,
|
|
3860
|
+
onSelect: () => onTextSizeChange(NEXT_TEXT_SIZE[textSize]),
|
|
3861
|
+
keepOpen: true
|
|
3862
|
+
});
|
|
3863
|
+
}
|
|
3864
|
+
if (has("language") && options.availableLocales.length > 1) {
|
|
3865
|
+
for (const locale of options.availableLocales) {
|
|
3866
|
+
items.push({
|
|
3867
|
+
id: `language:${locale}`,
|
|
3868
|
+
label: `${s.language} \u2014 ${locale}`,
|
|
3869
|
+
lang: locale,
|
|
3870
|
+
type: "switch",
|
|
3871
|
+
on: locale === options.locale,
|
|
3872
|
+
onSelect: () => onLocaleChange(locale)
|
|
3873
|
+
});
|
|
3874
|
+
}
|
|
3836
3875
|
}
|
|
3837
3876
|
const showClose = !!onClose && canShowClose(mode, panelSize, options.actions);
|
|
3838
3877
|
const showHistory = isChat && has("history");
|
|
@@ -3865,6 +3904,10 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
3865
3904
|
] });
|
|
3866
3905
|
}
|
|
3867
3906
|
|
|
3907
|
+
// src/ui/message-list.tsx
|
|
3908
|
+
import { useEffect as useEffect8, useLayoutEffect, useRef as useRef5, useState as useState6 } from "preact/hooks";
|
|
3909
|
+
import { useComputed as useComputed5 } from "@preact/signals";
|
|
3910
|
+
|
|
3868
3911
|
// src/ui/form/dynamic-form.tsx
|
|
3869
3912
|
import { useState as useState5 } from "preact/hooks";
|
|
3870
3913
|
|
|
@@ -4216,10 +4259,17 @@ function FormGate({ form, strings, onSubmit, onSkip }) {
|
|
|
4216
4259
|
)
|
|
4217
4260
|
] });
|
|
4218
4261
|
}
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4262
|
+
function FormDoneMarker({ marker, strings }) {
|
|
4263
|
+
const label = marker.outcome === "skipped" ? strings.formSkipped : strings.formSubmitted;
|
|
4264
|
+
return /* @__PURE__ */ jsxs9("div", { class: `${p11}-form-done`, "data-testid": TID.formDone, role: "status", children: [
|
|
4265
|
+
/* @__PURE__ */ jsx11(CheckIcon, {}),
|
|
4266
|
+
/* @__PURE__ */ jsx11("span", { children: label }),
|
|
4267
|
+
marker.title ? /* @__PURE__ */ jsxs9("span", { class: `${p11}-form-done-title`, children: [
|
|
4268
|
+
"\xB7 ",
|
|
4269
|
+
marker.title
|
|
4270
|
+
] }) : null
|
|
4271
|
+
] });
|
|
4272
|
+
}
|
|
4223
4273
|
|
|
4224
4274
|
// src/ui/message-bubble.tsx
|
|
4225
4275
|
import { useComputed as useComputed4 } from "@preact/signals";
|
|
@@ -4681,7 +4731,9 @@ function MessageList({
|
|
|
4681
4731
|
showToolCalls,
|
|
4682
4732
|
loading,
|
|
4683
4733
|
idle,
|
|
4684
|
-
tool
|
|
4734
|
+
tool,
|
|
4735
|
+
form,
|
|
4736
|
+
formMarkers
|
|
4685
4737
|
}) {
|
|
4686
4738
|
const ref = useRef5(null);
|
|
4687
4739
|
const messages = useComputed5(() => messagesSig.value);
|
|
@@ -4737,6 +4789,12 @@ function MessageList({
|
|
|
4737
4789
|
obs.observe(el, { childList: true, subtree: true, characterData: true });
|
|
4738
4790
|
return () => obs.disconnect();
|
|
4739
4791
|
}, [messages.value]);
|
|
4792
|
+
const activeFormId = form?.form.id;
|
|
4793
|
+
useLayoutEffect(() => {
|
|
4794
|
+
const el = ref.current;
|
|
4795
|
+
if (!el || !activeFormId) return;
|
|
4796
|
+
el.scrollTop = el.scrollHeight;
|
|
4797
|
+
}, [activeFormId]);
|
|
4740
4798
|
useEffect8(() => {
|
|
4741
4799
|
const el = ref.current;
|
|
4742
4800
|
if (!el) return;
|
|
@@ -4762,7 +4820,19 @@ function MessageList({
|
|
|
4762
4820
|
const rows = [];
|
|
4763
4821
|
let prevDay = "";
|
|
4764
4822
|
const lastId = messages.value.at(-1)?.id;
|
|
4823
|
+
const pendingMarkers = [...formMarkers ?? []].toSorted(
|
|
4824
|
+
(a, b) => (a.createdAt ?? Infinity) - (b.createdAt ?? Infinity)
|
|
4825
|
+
);
|
|
4826
|
+
const flushMarkersBefore = (createdAt) => {
|
|
4827
|
+
let next = pendingMarkers[0];
|
|
4828
|
+
while (next && next.createdAt !== void 0 && (createdAt === void 0 || next.createdAt <= createdAt)) {
|
|
4829
|
+
pendingMarkers.shift();
|
|
4830
|
+
rows.push(/* @__PURE__ */ jsx17(FormDoneMarker, { marker: next, strings }, next.key));
|
|
4831
|
+
next = pendingMarkers[0];
|
|
4832
|
+
}
|
|
4833
|
+
};
|
|
4765
4834
|
for (const m of messages.value) {
|
|
4835
|
+
flushMarkersBefore(m.createdAt);
|
|
4766
4836
|
const day = dayKey(m.createdAt);
|
|
4767
4837
|
if (day && day !== prevDay) {
|
|
4768
4838
|
rows.push(
|
|
@@ -4786,6 +4856,9 @@ function MessageList({
|
|
|
4786
4856
|
)
|
|
4787
4857
|
);
|
|
4788
4858
|
}
|
|
4859
|
+
for (const marker of pendingMarkers) {
|
|
4860
|
+
rows.push(/* @__PURE__ */ jsx17(FormDoneMarker, { marker, strings }, marker.key));
|
|
4861
|
+
}
|
|
4789
4862
|
return /* @__PURE__ */ jsxs14("div", { class: `${p15}-list-wrap`, children: [
|
|
4790
4863
|
/* @__PURE__ */ jsxs14(
|
|
4791
4864
|
"div",
|
|
@@ -4797,8 +4870,9 @@ function MessageList({
|
|
|
4797
4870
|
"aria-relevant": "additions text",
|
|
4798
4871
|
"data-scrolling": scrolling ? "true" : void 0,
|
|
4799
4872
|
children: [
|
|
4800
|
-
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx17("div", { class: `${p15}-list-loading`, role: "status", children: strings.
|
|
4801
|
-
rows
|
|
4873
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx17("div", { class: `${p15}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
4874
|
+
rows,
|
|
4875
|
+
form ? /* @__PURE__ */ jsx17(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
|
|
4802
4876
|
]
|
|
4803
4877
|
}
|
|
4804
4878
|
),
|
|
@@ -4878,7 +4952,13 @@ var BUCKET_TO_STRING = {
|
|
|
4878
4952
|
lastWeek: "dateLastWeek",
|
|
4879
4953
|
older: "dateOlder"
|
|
4880
4954
|
};
|
|
4881
|
-
function ConversationList({
|
|
4955
|
+
function ConversationList({
|
|
4956
|
+
transport,
|
|
4957
|
+
strings,
|
|
4958
|
+
visitorId,
|
|
4959
|
+
onSelect,
|
|
4960
|
+
onNewConversation
|
|
4961
|
+
}) {
|
|
4882
4962
|
const p33 = BRAND.cssPrefix;
|
|
4883
4963
|
const [state, setState] = useState7("loading");
|
|
4884
4964
|
const [conversations, setChats] = useState7([]);
|
|
@@ -4897,10 +4977,19 @@ function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }
|
|
|
4897
4977
|
cancelled = true;
|
|
4898
4978
|
};
|
|
4899
4979
|
}, [transport, visitorId]);
|
|
4900
|
-
const newChatButton =
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4980
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx18("div", { class: `${p33}-history-footer`, children: /* @__PURE__ */ jsxs15(
|
|
4981
|
+
"button",
|
|
4982
|
+
{
|
|
4983
|
+
type: "button",
|
|
4984
|
+
class: `${p33}-history-new`,
|
|
4985
|
+
onClick: onNewConversation,
|
|
4986
|
+
"data-testid": TID.sidebarNewConversation,
|
|
4987
|
+
children: [
|
|
4988
|
+
/* @__PURE__ */ jsx18(PlusIcon, {}),
|
|
4989
|
+
strings.newConversation
|
|
4990
|
+
]
|
|
4991
|
+
}
|
|
4992
|
+
) }) : null;
|
|
4904
4993
|
if (state === "loading") {
|
|
4905
4994
|
return /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
4906
4995
|
/* @__PURE__ */ jsx18("div", { class: `${p33}-history-empty`, children: strings.historyLoading }),
|
|
@@ -4938,18 +5027,12 @@ function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }
|
|
|
4938
5027
|
] });
|
|
4939
5028
|
}
|
|
4940
5029
|
|
|
4941
|
-
// src/ui/chat-history-pane.tsx
|
|
4942
|
-
import { jsx as jsx19 } from "preact/jsx-runtime";
|
|
4943
|
-
function ChatHistoryPane(props2) {
|
|
4944
|
-
return /* @__PURE__ */ jsx19(ConversationList, { ...props2 });
|
|
4945
|
-
}
|
|
4946
|
-
|
|
4947
5030
|
// src/ui/suggestions.tsx
|
|
4948
|
-
import { jsx as
|
|
5031
|
+
import { jsx as jsx19 } from "preact/jsx-runtime";
|
|
4949
5032
|
var p16 = BRAND.cssPrefix;
|
|
4950
5033
|
function Suggestions({ suggestions, onPick }) {
|
|
4951
5034
|
if (suggestions.length === 0) return null;
|
|
4952
|
-
return /* @__PURE__ */
|
|
5035
|
+
return /* @__PURE__ */ jsx19("div", { class: `${p16}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx19(
|
|
4953
5036
|
"button",
|
|
4954
5037
|
{
|
|
4955
5038
|
type: "button",
|
|
@@ -4963,7 +5046,7 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
4963
5046
|
}
|
|
4964
5047
|
|
|
4965
5048
|
// src/ui/panel.tsx
|
|
4966
|
-
import { Fragment as Fragment3, jsx as
|
|
5049
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
4967
5050
|
var p17 = BRAND.cssPrefix;
|
|
4968
5051
|
function Panel(props2) {
|
|
4969
5052
|
const { options, onClose } = props2;
|
|
@@ -4999,7 +5082,7 @@ function Panel(props2) {
|
|
|
4999
5082
|
style: { position: "relative" },
|
|
5000
5083
|
"data-testid": TID.panel,
|
|
5001
5084
|
children: [
|
|
5002
|
-
/* @__PURE__ */
|
|
5085
|
+
/* @__PURE__ */ jsx20(
|
|
5003
5086
|
PanelContent,
|
|
5004
5087
|
{
|
|
5005
5088
|
...props2,
|
|
@@ -5008,7 +5091,7 @@ function Panel(props2) {
|
|
|
5008
5091
|
composerAttachApiRef
|
|
5009
5092
|
}
|
|
5010
5093
|
),
|
|
5011
|
-
/* @__PURE__ */
|
|
5094
|
+
/* @__PURE__ */ jsx20(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
5012
5095
|
]
|
|
5013
5096
|
}
|
|
5014
5097
|
);
|
|
@@ -5033,13 +5116,14 @@ function PanelContent(props2) {
|
|
|
5033
5116
|
onBack,
|
|
5034
5117
|
onClear,
|
|
5035
5118
|
onToggleHistory,
|
|
5036
|
-
|
|
5037
|
-
|
|
5119
|
+
onSelectHistoryConversation,
|
|
5120
|
+
onNewConversation,
|
|
5038
5121
|
onWidgetSizeChange,
|
|
5039
5122
|
onSend,
|
|
5040
5123
|
onStop,
|
|
5041
5124
|
onSuggestion,
|
|
5042
5125
|
activeForm,
|
|
5126
|
+
formMarkers,
|
|
5043
5127
|
onFormSubmit,
|
|
5044
5128
|
onFormSkip,
|
|
5045
5129
|
tool,
|
|
@@ -5050,11 +5134,11 @@ function PanelContent(props2) {
|
|
|
5050
5134
|
const s = options.strings;
|
|
5051
5135
|
let composerArea;
|
|
5052
5136
|
if (activeForm) {
|
|
5053
|
-
composerArea =
|
|
5137
|
+
composerArea = null;
|
|
5054
5138
|
} else if (canSend) {
|
|
5055
5139
|
composerArea = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5056
|
-
/* @__PURE__ */
|
|
5057
|
-
/* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ jsx20(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
5141
|
+
/* @__PURE__ */ jsx20(
|
|
5058
5142
|
Composer,
|
|
5059
5143
|
{
|
|
5060
5144
|
options,
|
|
@@ -5069,10 +5153,10 @@ function PanelContent(props2) {
|
|
|
5069
5153
|
)
|
|
5070
5154
|
] });
|
|
5071
5155
|
} else {
|
|
5072
|
-
composerArea = /* @__PURE__ */
|
|
5156
|
+
composerArea = /* @__PURE__ */ jsx20(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
5073
5157
|
}
|
|
5074
5158
|
return /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5075
|
-
view === "history" ? /* @__PURE__ */
|
|
5159
|
+
view === "history" ? /* @__PURE__ */ jsx20(
|
|
5076
5160
|
HistoryHeader,
|
|
5077
5161
|
{
|
|
5078
5162
|
strings: s,
|
|
@@ -5081,7 +5165,7 @@ function PanelContent(props2) {
|
|
|
5081
5165
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
5082
5166
|
}
|
|
5083
5167
|
) : /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, "data-testid": TID.panelHeader, children: [
|
|
5084
|
-
onBack ? /* @__PURE__ */
|
|
5168
|
+
onBack ? /* @__PURE__ */ jsx20(
|
|
5085
5169
|
"button",
|
|
5086
5170
|
{
|
|
5087
5171
|
type: "button",
|
|
@@ -5089,24 +5173,24 @@ function PanelContent(props2) {
|
|
|
5089
5173
|
onClick: onBack,
|
|
5090
5174
|
"aria-label": s.moduleBack,
|
|
5091
5175
|
title: s.moduleBack,
|
|
5092
|
-
children: /* @__PURE__ */
|
|
5176
|
+
children: /* @__PURE__ */ jsx20(BackIcon, {})
|
|
5093
5177
|
}
|
|
5094
5178
|
) : null,
|
|
5095
|
-
agent ? /* @__PURE__ */
|
|
5096
|
-
/* @__PURE__ */
|
|
5179
|
+
agent ? /* @__PURE__ */ jsx20(AgentBadge, { agent }) : /* @__PURE__ */ jsx20("h1", { children: s.panelTitle }),
|
|
5180
|
+
/* @__PURE__ */ jsx20(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
5097
5181
|
] }),
|
|
5098
|
-
view === "history" ? /* @__PURE__ */
|
|
5099
|
-
|
|
5182
|
+
view === "history" ? /* @__PURE__ */ jsx20(
|
|
5183
|
+
ConversationList,
|
|
5100
5184
|
{
|
|
5101
5185
|
transport,
|
|
5102
5186
|
strings: s,
|
|
5103
5187
|
visitorId,
|
|
5104
|
-
onSelect: (
|
|
5105
|
-
|
|
5188
|
+
onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
|
|
5189
|
+
onNewConversation
|
|
5106
5190
|
}
|
|
5107
5191
|
) : /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5108
|
-
/* @__PURE__ */
|
|
5109
|
-
/* @__PURE__ */
|
|
5192
|
+
/* @__PURE__ */ jsx20(DropZone, { visible: dragOver, strings: s }),
|
|
5193
|
+
/* @__PURE__ */ jsx20(
|
|
5110
5194
|
MessageList,
|
|
5111
5195
|
{
|
|
5112
5196
|
messagesSig,
|
|
@@ -5116,13 +5200,15 @@ function PanelContent(props2) {
|
|
|
5116
5200
|
showToolCalls: options.showToolCalls,
|
|
5117
5201
|
loading: loadingMessages,
|
|
5118
5202
|
idle: !isStreaming,
|
|
5119
|
-
tool
|
|
5203
|
+
tool,
|
|
5204
|
+
form: activeForm ? { form: activeForm, onSubmit: onFormSubmit, onSkip: onFormSkip } : null,
|
|
5205
|
+
formMarkers
|
|
5120
5206
|
}
|
|
5121
5207
|
),
|
|
5122
5208
|
composerArea,
|
|
5123
|
-
/* @__PURE__ */
|
|
5209
|
+
/* @__PURE__ */ jsx20(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
5124
5210
|
] }),
|
|
5125
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
5211
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx20(
|
|
5126
5212
|
ResizeGrip,
|
|
5127
5213
|
{
|
|
5128
5214
|
panelEl: containerEl,
|
|
@@ -5142,7 +5228,7 @@ function HistoryHeader({
|
|
|
5142
5228
|
showClose
|
|
5143
5229
|
}) {
|
|
5144
5230
|
return /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, children: [
|
|
5145
|
-
/* @__PURE__ */
|
|
5231
|
+
/* @__PURE__ */ jsx20(
|
|
5146
5232
|
"button",
|
|
5147
5233
|
{
|
|
5148
5234
|
type: "button",
|
|
@@ -5150,11 +5236,11 @@ function HistoryHeader({
|
|
|
5150
5236
|
onClick: onBack,
|
|
5151
5237
|
"aria-label": strings.historyBack,
|
|
5152
5238
|
title: strings.historyBack,
|
|
5153
|
-
children: /* @__PURE__ */
|
|
5239
|
+
children: /* @__PURE__ */ jsx20(BackIcon, {})
|
|
5154
5240
|
}
|
|
5155
5241
|
),
|
|
5156
|
-
/* @__PURE__ */
|
|
5157
|
-
showClose ? /* @__PURE__ */
|
|
5242
|
+
/* @__PURE__ */ jsx20("h1", { children: strings.historyTitle }),
|
|
5243
|
+
showClose ? /* @__PURE__ */ jsx20(
|
|
5158
5244
|
"button",
|
|
5159
5245
|
{
|
|
5160
5246
|
type: "button",
|
|
@@ -5162,34 +5248,38 @@ function HistoryHeader({
|
|
|
5162
5248
|
onClick: onClose,
|
|
5163
5249
|
"aria-label": strings.close,
|
|
5164
5250
|
title: strings.close,
|
|
5165
|
-
children: /* @__PURE__ */
|
|
5251
|
+
children: /* @__PURE__ */ jsx20(CloseIcon, {})
|
|
5166
5252
|
}
|
|
5167
5253
|
) : null
|
|
5168
5254
|
] });
|
|
5169
5255
|
}
|
|
5170
|
-
function ReadOnlyBanner({
|
|
5256
|
+
function ReadOnlyBanner({
|
|
5257
|
+
label,
|
|
5258
|
+
ctaLabel,
|
|
5259
|
+
onNewConversation
|
|
5260
|
+
}) {
|
|
5171
5261
|
return /* @__PURE__ */ jsxs16("div", { class: `${p17}-readonly-banner`, role: "note", children: [
|
|
5172
|
-
/* @__PURE__ */
|
|
5173
|
-
/* @__PURE__ */
|
|
5262
|
+
/* @__PURE__ */ jsx20("span", { class: `${p17}-readonly-label`, children: label }),
|
|
5263
|
+
/* @__PURE__ */ jsx20("button", { type: "button", class: `${p17}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
5174
5264
|
] });
|
|
5175
5265
|
}
|
|
5176
5266
|
function ComposerFooter({ disclaimer }) {
|
|
5177
5267
|
if (!disclaimer) return null;
|
|
5178
|
-
return /* @__PURE__ */
|
|
5268
|
+
return /* @__PURE__ */ jsx20("div", { class: `${p17}-composer-footer`, children: /* @__PURE__ */ jsx20("div", { class: `${p17}-disclaimer`, children: disclaimer }) });
|
|
5179
5269
|
}
|
|
5180
5270
|
function PoweredByBar({ poweredBy }) {
|
|
5181
5271
|
if (!poweredBy) return null;
|
|
5182
|
-
return /* @__PURE__ */
|
|
5272
|
+
return /* @__PURE__ */ jsx20("div", { class: `${p17}-poweredby-bar`, children: /* @__PURE__ */ jsx20(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
5183
5273
|
}
|
|
5184
5274
|
function PoweredBy({ logoUrl, text, href }) {
|
|
5185
5275
|
const inner = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5186
|
-
logoUrl ? /* @__PURE__ */
|
|
5187
|
-
text ? /* @__PURE__ */
|
|
5276
|
+
logoUrl ? /* @__PURE__ */ jsx20("img", { class: `${p17}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
5277
|
+
text ? /* @__PURE__ */ jsx20("span", { children: text }) : null
|
|
5188
5278
|
] });
|
|
5189
5279
|
if (href) {
|
|
5190
|
-
return /* @__PURE__ */
|
|
5280
|
+
return /* @__PURE__ */ jsx20("a", { class: `${p17}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
5191
5281
|
}
|
|
5192
|
-
return /* @__PURE__ */
|
|
5282
|
+
return /* @__PURE__ */ jsx20("span", { class: `${p17}-poweredby`, children: inner });
|
|
5193
5283
|
}
|
|
5194
5284
|
|
|
5195
5285
|
// src/ui/form/form-controller.ts
|
|
@@ -5265,7 +5355,7 @@ function whenPasses(form, d) {
|
|
|
5265
5355
|
}
|
|
5266
5356
|
|
|
5267
5357
|
// src/ui/sidebar.tsx
|
|
5268
|
-
import { Fragment as Fragment4, jsx as
|
|
5358
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
5269
5359
|
function Sidebar(props2) {
|
|
5270
5360
|
const p33 = BRAND.cssPrefix;
|
|
5271
5361
|
const { site, blocks, strings, collapsed } = props2;
|
|
@@ -5274,8 +5364,8 @@ function Sidebar(props2) {
|
|
|
5274
5364
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
5275
5365
|
return /* @__PURE__ */ jsxs17("aside", { class: `${p33}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
5276
5366
|
/* @__PURE__ */ jsxs17("div", { class: `${p33}-sidebar-header`, children: [
|
|
5277
|
-
/* @__PURE__ */
|
|
5278
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ jsx21(SidebarBrand, { site }),
|
|
5368
|
+
/* @__PURE__ */ jsx21(
|
|
5279
5369
|
"button",
|
|
5280
5370
|
{
|
|
5281
5371
|
type: "button",
|
|
@@ -5285,21 +5375,21 @@ function Sidebar(props2) {
|
|
|
5285
5375
|
title: toggleLabel,
|
|
5286
5376
|
onClick: props2.onToggleCollapsed,
|
|
5287
5377
|
"data-testid": TID.sidebarToggle,
|
|
5288
|
-
children: /* @__PURE__ */
|
|
5378
|
+
children: /* @__PURE__ */ jsx21(SidebarToggleIcon, { collapsed })
|
|
5289
5379
|
}
|
|
5290
5380
|
)
|
|
5291
5381
|
] }),
|
|
5292
5382
|
collapsed ? null : /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
5293
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
5294
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
5295
|
-
props2.showConversations ? /* @__PURE__ */
|
|
5383
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx21("nav", { class: `${p33}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx21(SidebarNav, { items: navigation }) }) : null,
|
|
5384
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx21(SidebarCards, { items: linkCards }) }) : null,
|
|
5385
|
+
props2.showConversations ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-conversations`, children: /* @__PURE__ */ jsx21(
|
|
5296
5386
|
ConversationList,
|
|
5297
5387
|
{
|
|
5298
5388
|
transport: props2.transport,
|
|
5299
5389
|
strings: props2.strings,
|
|
5300
5390
|
visitorId: props2.visitorId,
|
|
5301
|
-
onSelect: props2.
|
|
5302
|
-
|
|
5391
|
+
onSelect: props2.onSelectConversation,
|
|
5392
|
+
onNewConversation: props2.onNewConversation
|
|
5303
5393
|
}
|
|
5304
5394
|
) }) : null
|
|
5305
5395
|
] })
|
|
@@ -5310,14 +5400,14 @@ function SidebarBrand({ site }) {
|
|
|
5310
5400
|
if (site?.logo?.url) {
|
|
5311
5401
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
5312
5402
|
return /* @__PURE__ */ jsxs17("picture", { children: [
|
|
5313
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
5314
|
-
/* @__PURE__ */
|
|
5403
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx21("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
5404
|
+
/* @__PURE__ */ jsx21("img", { class: `${p33}-sidebar-logo`, src: site.logo.url, alt })
|
|
5315
5405
|
] });
|
|
5316
5406
|
}
|
|
5317
|
-
return /* @__PURE__ */
|
|
5407
|
+
return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
5318
5408
|
}
|
|
5319
5409
|
function SidebarToggleIcon({ collapsed }) {
|
|
5320
|
-
return /* @__PURE__ */
|
|
5410
|
+
return /* @__PURE__ */ jsx21(
|
|
5321
5411
|
"svg",
|
|
5322
5412
|
{
|
|
5323
5413
|
width: "16",
|
|
@@ -5327,13 +5417,13 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
5327
5417
|
stroke: "currentColor",
|
|
5328
5418
|
"stroke-width": "2",
|
|
5329
5419
|
"aria-hidden": "true",
|
|
5330
|
-
children: collapsed ? /* @__PURE__ */
|
|
5420
|
+
children: collapsed ? /* @__PURE__ */ jsx21("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx21("polyline", { points: "15 6 9 12 15 18" })
|
|
5331
5421
|
}
|
|
5332
5422
|
);
|
|
5333
5423
|
}
|
|
5334
5424
|
function SidebarNav({ items }) {
|
|
5335
5425
|
const p33 = BRAND.cssPrefix;
|
|
5336
|
-
return /* @__PURE__ */
|
|
5426
|
+
return /* @__PURE__ */ jsx21("ul", { class: `${p33}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsxs17(
|
|
5337
5427
|
"a",
|
|
5338
5428
|
{
|
|
5339
5429
|
class: `${p33}-sidebar-nav-item`,
|
|
@@ -5341,15 +5431,15 @@ function SidebarNav({ items }) {
|
|
|
5341
5431
|
target: item.href ? "_blank" : void 0,
|
|
5342
5432
|
rel: item.href ? "noreferrer" : void 0,
|
|
5343
5433
|
children: [
|
|
5344
|
-
item.icon ? /* @__PURE__ */
|
|
5345
|
-
/* @__PURE__ */
|
|
5434
|
+
item.icon ? /* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
5435
|
+
/* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-label`, children: item.label })
|
|
5346
5436
|
]
|
|
5347
5437
|
}
|
|
5348
5438
|
) }, item.id ?? item.label)) });
|
|
5349
5439
|
}
|
|
5350
5440
|
function SidebarCards({ items }) {
|
|
5351
5441
|
const p33 = BRAND.cssPrefix;
|
|
5352
|
-
return /* @__PURE__ */
|
|
5442
|
+
return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs17(
|
|
5353
5443
|
"a",
|
|
5354
5444
|
{
|
|
5355
5445
|
class: `${p33}-sidebar-card`,
|
|
@@ -5357,8 +5447,8 @@ function SidebarCards({ items }) {
|
|
|
5357
5447
|
target: item.href ? "_blank" : void 0,
|
|
5358
5448
|
rel: item.href ? "noreferrer" : void 0,
|
|
5359
5449
|
children: [
|
|
5360
|
-
/* @__PURE__ */
|
|
5361
|
-
item.description ? /* @__PURE__ */
|
|
5450
|
+
/* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-label`, children: item.label }),
|
|
5451
|
+
item.description ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-desc`, children: item.description }) : null
|
|
5362
5452
|
]
|
|
5363
5453
|
},
|
|
5364
5454
|
item.id ?? item.label
|
|
@@ -5366,11 +5456,11 @@ function SidebarCards({ items }) {
|
|
|
5366
5456
|
}
|
|
5367
5457
|
|
|
5368
5458
|
// src/ui/page-shell.tsx
|
|
5369
|
-
import { jsx as
|
|
5459
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
5370
5460
|
var p18 = BRAND.cssPrefix;
|
|
5371
5461
|
function PageShell(props2) {
|
|
5372
5462
|
return /* @__PURE__ */ jsxs18("main", { class: `${p18}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
5373
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ jsx22(
|
|
5374
5464
|
Sidebar,
|
|
5375
5465
|
{
|
|
5376
5466
|
site: props2.site,
|
|
@@ -5379,13 +5469,13 @@ function PageShell(props2) {
|
|
|
5379
5469
|
strings: props2.strings,
|
|
5380
5470
|
visitorId: props2.visitorId,
|
|
5381
5471
|
showConversations: props2.showConversations,
|
|
5382
|
-
|
|
5383
|
-
|
|
5472
|
+
onSelectConversation: props2.onSelectConversation,
|
|
5473
|
+
onNewConversation: props2.onNewConversation,
|
|
5384
5474
|
collapsed: props2.sidebarCollapsed,
|
|
5385
5475
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
5386
5476
|
}
|
|
5387
5477
|
),
|
|
5388
|
-
/* @__PURE__ */
|
|
5478
|
+
/* @__PURE__ */ jsx22("section", { class: `${p18}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
5389
5479
|
] });
|
|
5390
5480
|
}
|
|
5391
5481
|
|
|
@@ -5425,7 +5515,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
|
|
|
5425
5515
|
import { useCallback as useCallback4, useEffect as useEffect15, useRef as useRef8 } from "preact/hooks";
|
|
5426
5516
|
import { useComputed as useComputed6 } from "@preact/signals";
|
|
5427
5517
|
|
|
5428
|
-
// src/ui/modules/
|
|
5518
|
+
// src/ui/modules/chat.tsx
|
|
5429
5519
|
var chatLayout = {
|
|
5430
5520
|
Icon: BubblesIcon
|
|
5431
5521
|
// No `Root`: MessengerHome renders the existing chat panel for this tab.
|
|
@@ -5435,35 +5525,35 @@ var chatLayout = {
|
|
|
5435
5525
|
import { useEffect as useEffect11, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
|
|
5436
5526
|
|
|
5437
5527
|
// src/ui/back-header.tsx
|
|
5438
|
-
import { jsx as
|
|
5528
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
5439
5529
|
var p19 = BRAND.cssPrefix;
|
|
5440
5530
|
function TitleBar({ title, actions }) {
|
|
5441
5531
|
return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-variant": "title", children: [
|
|
5442
|
-
/* @__PURE__ */
|
|
5443
|
-
/* @__PURE__ */
|
|
5444
|
-
actions ?? /* @__PURE__ */
|
|
5532
|
+
/* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" }),
|
|
5533
|
+
/* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
|
|
5534
|
+
actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
|
|
5445
5535
|
] });
|
|
5446
5536
|
}
|
|
5447
5537
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
5448
5538
|
return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-testid": testid, children: [
|
|
5449
|
-
/* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5451
|
-
actions ?? /* @__PURE__ */
|
|
5539
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p19}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx23(BackIcon, {}) }),
|
|
5540
|
+
/* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
|
|
5541
|
+
actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
|
|
5452
5542
|
] });
|
|
5453
5543
|
}
|
|
5454
5544
|
|
|
5455
5545
|
// src/ui/home-search.tsx
|
|
5456
|
-
import { jsx as
|
|
5546
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
5457
5547
|
var p20 = BRAND.cssPrefix;
|
|
5458
5548
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
5459
5549
|
return /* @__PURE__ */ jsxs20("button", { type: "button", class: `${p20}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
5460
|
-
/* @__PURE__ */
|
|
5461
|
-
/* @__PURE__ */
|
|
5550
|
+
/* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-text`, children: placeholder }),
|
|
5551
|
+
/* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
|
|
5462
5552
|
] });
|
|
5463
5553
|
}
|
|
5464
5554
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
5465
5555
|
return /* @__PURE__ */ jsxs20("div", { class: `${p20}-home-search`, "data-input": "true", children: [
|
|
5466
|
-
/* @__PURE__ */
|
|
5556
|
+
/* @__PURE__ */ jsx24(
|
|
5467
5557
|
"input",
|
|
5468
5558
|
{
|
|
5469
5559
|
type: "search",
|
|
@@ -5474,25 +5564,25 @@ function HelpSearchInput({ placeholder, value, onInput }) {
|
|
|
5474
5564
|
"data-testid": TID.helpSearch
|
|
5475
5565
|
}
|
|
5476
5566
|
),
|
|
5477
|
-
/* @__PURE__ */
|
|
5567
|
+
/* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
|
|
5478
5568
|
] });
|
|
5479
5569
|
}
|
|
5480
5570
|
|
|
5481
5571
|
// src/ui/list-row.tsx
|
|
5482
|
-
import { jsx as
|
|
5572
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
5483
5573
|
var p21 = BRAND.cssPrefix;
|
|
5484
5574
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
5485
5575
|
return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p21}-list-row`, onClick, "data-testid": testid, children: [
|
|
5486
5576
|
/* @__PURE__ */ jsxs21("span", { class: `${p21}-list-row-body`, children: [
|
|
5487
|
-
/* @__PURE__ */
|
|
5488
|
-
subtitle ? /* @__PURE__ */
|
|
5577
|
+
/* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-title`, children: title }),
|
|
5578
|
+
subtitle ? /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-sub`, children: subtitle }) : null
|
|
5489
5579
|
] }),
|
|
5490
|
-
/* @__PURE__ */
|
|
5580
|
+
/* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(ChevronRightIcon, {}) })
|
|
5491
5581
|
] });
|
|
5492
5582
|
}
|
|
5493
5583
|
|
|
5494
5584
|
// src/ui/module-state.tsx
|
|
5495
|
-
import { jsx as
|
|
5585
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
5496
5586
|
var p22 = BRAND.cssPrefix;
|
|
5497
5587
|
function ModuleState({
|
|
5498
5588
|
tone = "info",
|
|
@@ -5501,13 +5591,13 @@ function ModuleState({
|
|
|
5501
5591
|
strings
|
|
5502
5592
|
}) {
|
|
5503
5593
|
return /* @__PURE__ */ jsxs22("div", { class: `${p22}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
onRetry ? /* @__PURE__ */
|
|
5594
|
+
/* @__PURE__ */ jsx26("span", { children: message }),
|
|
5595
|
+
onRetry ? /* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
5506
5596
|
] });
|
|
5507
5597
|
}
|
|
5508
5598
|
|
|
5509
5599
|
// src/ui/modules/help.tsx
|
|
5510
|
-
import { jsx as
|
|
5600
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
5511
5601
|
var p23 = BRAND.cssPrefix;
|
|
5512
5602
|
var log12 = logger.scope("help");
|
|
5513
5603
|
var openArticle = (nav, a) => a.url ? nav.push({ kind: "iframe", url: a.url, title: a.title }) : nav.push({ kind: "content", id: a.id, title: a.title });
|
|
@@ -5537,7 +5627,7 @@ function fuzzySearch(items, query) {
|
|
|
5537
5627
|
return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
|
|
5538
5628
|
}
|
|
5539
5629
|
function ArticleRow({ article, nav }) {
|
|
5540
|
-
return /* @__PURE__ */
|
|
5630
|
+
return /* @__PURE__ */ jsx27(
|
|
5541
5631
|
ListRow,
|
|
5542
5632
|
{
|
|
5543
5633
|
title: article.title,
|
|
@@ -5574,45 +5664,45 @@ function HelpRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5574
5664
|
const results = useMemo2(() => fuzzySearch(items, query), [items, query]);
|
|
5575
5665
|
function renderBody() {
|
|
5576
5666
|
if (query.trim().length > 0) {
|
|
5577
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
5578
|
-
return /* @__PURE__ */
|
|
5667
|
+
if (results.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
5668
|
+
return /* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) });
|
|
5579
5669
|
}
|
|
5580
|
-
if (state === "loading") return /* @__PURE__ */
|
|
5670
|
+
if (state === "loading") return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpLoading, strings });
|
|
5581
5671
|
if (state === "error") {
|
|
5582
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ jsx27(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
5583
5673
|
}
|
|
5584
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
5674
|
+
if (items.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpEmpty, strings });
|
|
5585
5675
|
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs23("section", { class: `${p23}-help-group`, children: [
|
|
5586
|
-
category ? /* @__PURE__ */
|
|
5587
|
-
/* @__PURE__ */
|
|
5676
|
+
category ? /* @__PURE__ */ jsx27("h2", { class: `${p23}-help-section-title`, children: category }) : null,
|
|
5677
|
+
/* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) })
|
|
5588
5678
|
] }, category));
|
|
5589
5679
|
}
|
|
5590
5680
|
return /* @__PURE__ */ jsxs23("div", { class: `${p23}-module`, children: [
|
|
5591
|
-
/* @__PURE__ */
|
|
5592
|
-
/* @__PURE__ */
|
|
5593
|
-
/* @__PURE__ */
|
|
5681
|
+
/* @__PURE__ */ jsx27(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx27(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
5682
|
+
/* @__PURE__ */ jsx27("div", { class: `${p23}-module-pad`, children: /* @__PURE__ */ jsx27(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
5683
|
+
/* @__PURE__ */ jsx27("div", { class: `${p23}-help-list`, children: renderBody() })
|
|
5594
5684
|
] });
|
|
5595
5685
|
}
|
|
5596
5686
|
var helpLayout = {
|
|
5597
5687
|
Icon: HelpIcon,
|
|
5598
|
-
Root: (props2) => /* @__PURE__ */
|
|
5688
|
+
Root: (props2) => /* @__PURE__ */ jsx27(HelpRoot, { ...props2 })
|
|
5599
5689
|
};
|
|
5600
5690
|
|
|
5601
5691
|
// src/ui/modules/home.tsx
|
|
5602
5692
|
import { useEffect as useEffect12, useState as useState9 } from "preact/hooks";
|
|
5603
5693
|
|
|
5604
5694
|
// src/ui/home-card.tsx
|
|
5605
|
-
import { jsx as
|
|
5695
|
+
import { jsx as jsx28 } from "preact/jsx-runtime";
|
|
5606
5696
|
var p24 = BRAND.cssPrefix;
|
|
5607
5697
|
function HomeCard({ onClick, children, testid }) {
|
|
5608
5698
|
if (onClick) {
|
|
5609
|
-
return /* @__PURE__ */
|
|
5699
|
+
return /* @__PURE__ */ jsx28("button", { type: "button", class: `${p24}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
5610
5700
|
}
|
|
5611
|
-
return /* @__PURE__ */
|
|
5701
|
+
return /* @__PURE__ */ jsx28("div", { class: `${p24}-home-card`, "data-testid": testid, children });
|
|
5612
5702
|
}
|
|
5613
5703
|
|
|
5614
5704
|
// src/ui/modules/home.tsx
|
|
5615
|
-
import { Fragment as Fragment5, jsx as
|
|
5705
|
+
import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
5616
5706
|
var p25 = BRAND.cssPrefix;
|
|
5617
5707
|
var log13 = logger.scope("home");
|
|
5618
5708
|
function resolveGreeting(props2) {
|
|
@@ -5631,13 +5721,13 @@ function HomeRoot(props2) {
|
|
|
5631
5721
|
const [content, setContent] = useState9([]);
|
|
5632
5722
|
const tagsKey = config.contentTags?.join(",");
|
|
5633
5723
|
useEffect12(() => {
|
|
5634
|
-
if (!config.
|
|
5724
|
+
if (!config.showRecentConversations) return;
|
|
5635
5725
|
let cancelled = false;
|
|
5636
5726
|
transport.listConversations({ limit: 1 }).then((res) => !cancelled && setRecent(res.conversations?.[0] ?? null)).catch((err) => !cancelled && log13.warn("listConversations (home) failed", { err }));
|
|
5637
5727
|
return () => {
|
|
5638
5728
|
cancelled = true;
|
|
5639
5729
|
};
|
|
5640
|
-
}, [transport, config.
|
|
5730
|
+
}, [transport, config.showRecentConversations]);
|
|
5641
5731
|
useEffect12(() => {
|
|
5642
5732
|
if (!config.contentTags?.length) return;
|
|
5643
5733
|
let cancelled = false;
|
|
@@ -5650,49 +5740,49 @@ function HomeRoot(props2) {
|
|
|
5650
5740
|
const avatars = config.userAvatars ?? [];
|
|
5651
5741
|
const status = config.status;
|
|
5652
5742
|
const contentTitle = config.contentBlockTitle ? moduleLabel(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
5653
|
-
return /* @__PURE__ */
|
|
5743
|
+
return /* @__PURE__ */ jsx29("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
|
|
5654
5744
|
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
|
|
5655
5745
|
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-top`, children: [
|
|
5656
|
-
config.brandName ? /* @__PURE__ */
|
|
5746
|
+
config.brandName ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx29("span", { class: `${p25}-home-brand-spacer`, "aria-hidden": "true" }),
|
|
5657
5747
|
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-actions`, children: [
|
|
5658
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
5659
|
-
/* @__PURE__ */
|
|
5748
|
+
avatars.length > 0 ? /* @__PURE__ */ jsx29("div", { class: `${p25}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx29("span", { class: `${p25}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx29("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx29("span", { children: initials(a.name) }) }, a.name)) }) : null,
|
|
5749
|
+
/* @__PURE__ */ jsx29(HeaderActions, { panelProps, variant: "plain" })
|
|
5660
5750
|
] })
|
|
5661
5751
|
] }),
|
|
5662
5752
|
config.showGreeting !== false ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
5753
|
+
/* @__PURE__ */ jsx29("h1", { class: `${p25}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
5754
|
+
greeting.subtitle ? /* @__PURE__ */ jsx29("p", { class: `${p25}-home-lead`, children: greeting.subtitle }) : null
|
|
5665
5755
|
] }) : null
|
|
5666
5756
|
] }),
|
|
5667
5757
|
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-cards`, children: [
|
|
5668
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
5758
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx29(
|
|
5669
5759
|
HomeSearchButton,
|
|
5670
5760
|
{
|
|
5671
5761
|
placeholder: strings.homeSearchPlaceholder,
|
|
5672
5762
|
onActivate: () => nav.switchToLayout("help")
|
|
5673
5763
|
}
|
|
5674
5764
|
) : null,
|
|
5675
|
-
recent ? /* @__PURE__ */
|
|
5676
|
-
/* @__PURE__ */
|
|
5765
|
+
recent ? /* @__PURE__ */ jsx29(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
|
|
5766
|
+
/* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(BubblesIcon, {}) }),
|
|
5677
5767
|
/* @__PURE__ */ jsxs24("span", { class: `${p25}-home-recent-body`, children: [
|
|
5678
|
-
/* @__PURE__ */
|
|
5679
|
-
recent.preview ? /* @__PURE__ */
|
|
5768
|
+
/* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-title`, children: recent.title }),
|
|
5769
|
+
recent.preview ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-preview`, children: recent.preview }) : null
|
|
5680
5770
|
] }),
|
|
5681
|
-
(recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */
|
|
5771
|
+
(recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
5682
5772
|
] }) }) : null,
|
|
5683
|
-
status ? /* @__PURE__ */
|
|
5773
|
+
status ? /* @__PURE__ */ jsx29(
|
|
5684
5774
|
HomeCard,
|
|
5685
5775
|
{
|
|
5686
5776
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: status.text }) : void 0,
|
|
5687
5777
|
children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
5688
|
-
/* @__PURE__ */
|
|
5689
|
-
/* @__PURE__ */
|
|
5778
|
+
/* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(StatusOkIcon, {}) }),
|
|
5779
|
+
/* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: status.text })
|
|
5690
5780
|
] })
|
|
5691
5781
|
}
|
|
5692
5782
|
) : null,
|
|
5693
5783
|
content.length > 0 ? /* @__PURE__ */ jsxs24("section", { class: `${p25}-home-content`, children: [
|
|
5694
|
-
/* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5784
|
+
/* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-title`, children: contentTitle }),
|
|
5785
|
+
/* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx29(
|
|
5696
5786
|
ListRow,
|
|
5697
5787
|
{
|
|
5698
5788
|
title: item.title,
|
|
@@ -5708,12 +5798,12 @@ function HomeRoot(props2) {
|
|
|
5708
5798
|
}
|
|
5709
5799
|
var homeLayout = {
|
|
5710
5800
|
Icon: HomeIcon,
|
|
5711
|
-
Root: (props2) => /* @__PURE__ */
|
|
5801
|
+
Root: (props2) => /* @__PURE__ */ jsx29(HomeRoot, { ...props2 })
|
|
5712
5802
|
};
|
|
5713
5803
|
|
|
5714
5804
|
// src/ui/modules/news.tsx
|
|
5715
5805
|
import { useEffect as useEffect13, useState as useState10 } from "preact/hooks";
|
|
5716
|
-
import { jsx as
|
|
5806
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
5717
5807
|
var p26 = BRAND.cssPrefix;
|
|
5718
5808
|
var log14 = logger.scope("news");
|
|
5719
5809
|
function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
@@ -5740,12 +5830,12 @@ function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5740
5830
|
};
|
|
5741
5831
|
}, [transport, tags, reloadKey]);
|
|
5742
5832
|
function renderBody() {
|
|
5743
|
-
if (state === "loading") return /* @__PURE__ */
|
|
5833
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsLoading, strings });
|
|
5744
5834
|
if (state === "error") {
|
|
5745
|
-
return /* @__PURE__ */
|
|
5835
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
5746
5836
|
}
|
|
5747
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
5748
|
-
return /* @__PURE__ */
|
|
5837
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsEmpty, strings });
|
|
5838
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p26}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs25(
|
|
5749
5839
|
"button",
|
|
5750
5840
|
{
|
|
5751
5841
|
type: "button",
|
|
@@ -5753,11 +5843,11 @@ function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5753
5843
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
5754
5844
|
"data-testid": tid(TID.newsItem, item.id),
|
|
5755
5845
|
children: [
|
|
5756
|
-
item.image ? /* @__PURE__ */
|
|
5846
|
+
item.image ? /* @__PURE__ */ jsx30("img", { class: `${p26}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
5757
5847
|
/* @__PURE__ */ jsxs25("span", { class: `${p26}-news-body`, children: [
|
|
5758
|
-
item.tags && item.tags.length > 0 ? /* @__PURE__ */
|
|
5759
|
-
/* @__PURE__ */
|
|
5760
|
-
item.description ? /* @__PURE__ */
|
|
5848
|
+
item.tags && item.tags.length > 0 ? /* @__PURE__ */ jsx30("span", { class: `${p26}-news-tags`, children: item.tags.map((t) => /* @__PURE__ */ jsx30("span", { class: `${p26}-news-tag`, children: t }, t)) }) : null,
|
|
5849
|
+
/* @__PURE__ */ jsx30("span", { class: `${p26}-news-title`, children: item.title }),
|
|
5850
|
+
item.description ? /* @__PURE__ */ jsx30("span", { class: `${p26}-news-summary`, children: item.description }) : null
|
|
5761
5851
|
] })
|
|
5762
5852
|
]
|
|
5763
5853
|
},
|
|
@@ -5765,13 +5855,13 @@ function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5765
5855
|
)) });
|
|
5766
5856
|
}
|
|
5767
5857
|
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
5768
|
-
/* @__PURE__ */
|
|
5769
|
-
/* @__PURE__ */
|
|
5858
|
+
/* @__PURE__ */ jsx30(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
5859
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-module-scroll`, children: renderBody() })
|
|
5770
5860
|
] });
|
|
5771
5861
|
}
|
|
5772
5862
|
var newsLayout = {
|
|
5773
5863
|
Icon: NewsIcon,
|
|
5774
|
-
Root: (props2) => /* @__PURE__ */
|
|
5864
|
+
Root: (props2) => /* @__PURE__ */ jsx30(NewsRoot, { ...props2 })
|
|
5775
5865
|
};
|
|
5776
5866
|
|
|
5777
5867
|
// src/ui/modules/registry.ts
|
|
@@ -5783,10 +5873,10 @@ var LAYOUTS = {
|
|
|
5783
5873
|
};
|
|
5784
5874
|
|
|
5785
5875
|
// src/ui/home-tab-bar.tsx
|
|
5786
|
-
import { jsx as
|
|
5876
|
+
import { jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
5787
5877
|
var p27 = BRAND.cssPrefix;
|
|
5788
5878
|
function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
5789
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ jsx31("nav", { class: `${p27}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
5790
5880
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
5791
5881
|
const selected = m.id === activeTab;
|
|
5792
5882
|
const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
|
|
@@ -5801,10 +5891,10 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
5801
5891
|
"data-testid": tid(TID.tab, m.id),
|
|
5802
5892
|
children: [
|
|
5803
5893
|
/* @__PURE__ */ jsxs26("span", { class: `${p27}-tab-icon`, "aria-hidden": "true", children: [
|
|
5804
|
-
/* @__PURE__ */
|
|
5805
|
-
badge ? /* @__PURE__ */
|
|
5894
|
+
/* @__PURE__ */ jsx31(Icon, {}),
|
|
5895
|
+
badge ? /* @__PURE__ */ jsx31("span", { class: `${p27}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
|
|
5806
5896
|
] }),
|
|
5807
|
-
/* @__PURE__ */
|
|
5897
|
+
/* @__PURE__ */ jsx31("span", { class: `${p27}-tab-label`, children: moduleLabel(strings, m.label) })
|
|
5808
5898
|
]
|
|
5809
5899
|
},
|
|
5810
5900
|
m.id
|
|
@@ -5813,12 +5903,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
5813
5903
|
}
|
|
5814
5904
|
|
|
5815
5905
|
// src/ui/iframe-view.tsx
|
|
5816
|
-
import { jsx as
|
|
5906
|
+
import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
5817
5907
|
var p28 = BRAND.cssPrefix;
|
|
5818
5908
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
5819
5909
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
5820
5910
|
return /* @__PURE__ */ jsxs27("div", { class: `${p28}-module`, children: [
|
|
5821
|
-
/* @__PURE__ */
|
|
5911
|
+
/* @__PURE__ */ jsx32(
|
|
5822
5912
|
BackHeader,
|
|
5823
5913
|
{
|
|
5824
5914
|
title: title || strings.moduleBack,
|
|
@@ -5827,7 +5917,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
5827
5917
|
actions
|
|
5828
5918
|
}
|
|
5829
5919
|
),
|
|
5830
|
-
/* @__PURE__ */
|
|
5920
|
+
/* @__PURE__ */ jsx32(
|
|
5831
5921
|
"iframe",
|
|
5832
5922
|
{
|
|
5833
5923
|
class: `${p28}-content-frame`,
|
|
@@ -5844,7 +5934,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
5844
5934
|
|
|
5845
5935
|
// src/ui/content-view.tsx
|
|
5846
5936
|
import { useCallback as useCallback3, useEffect as useEffect14, useState as useState11 } from "preact/hooks";
|
|
5847
|
-
import { jsx as
|
|
5937
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
5848
5938
|
var p29 = BRAND.cssPrefix;
|
|
5849
5939
|
var log15 = logger.scope("content");
|
|
5850
5940
|
function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
@@ -5873,17 +5963,17 @@ function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
|
5873
5963
|
};
|
|
5874
5964
|
}, [transport, id, reloadKey]);
|
|
5875
5965
|
function renderBody() {
|
|
5876
|
-
if (failed) return /* @__PURE__ */
|
|
5877
|
-
if (item === null) return /* @__PURE__ */
|
|
5966
|
+
if (failed) return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
5967
|
+
if (item === null) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.contentLoading, strings });
|
|
5878
5968
|
return /* @__PURE__ */ jsxs28("article", { class: `${p29}-content`, "data-testid": TID.contentView, children: [
|
|
5879
|
-
item.image ? /* @__PURE__ */
|
|
5880
|
-
item.description ? /* @__PURE__ */
|
|
5881
|
-
item.tags && item.tags.length > 0 ? /* @__PURE__ */
|
|
5882
|
-
/* @__PURE__ */
|
|
5969
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
5970
|
+
item.description ? /* @__PURE__ */ jsx33("p", { class: `${p29}-content-subtitle`, children: item.description }) : null,
|
|
5971
|
+
item.tags && item.tags.length > 0 ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-tags`, children: item.tags.map((t) => /* @__PURE__ */ jsx33("span", { class: `${p29}-news-tag`, children: t }, t)) }) : null,
|
|
5972
|
+
/* @__PURE__ */ jsx33(StaticMarkdown, { text: item.content ?? "" })
|
|
5883
5973
|
] });
|
|
5884
5974
|
}
|
|
5885
5975
|
return /* @__PURE__ */ jsxs28("div", { class: `${p29}-module`, children: [
|
|
5886
|
-
/* @__PURE__ */
|
|
5976
|
+
/* @__PURE__ */ jsx33(
|
|
5887
5977
|
BackHeader,
|
|
5888
5978
|
{
|
|
5889
5979
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -5893,12 +5983,12 @@ function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
|
5893
5983
|
testid: TID.backHeader
|
|
5894
5984
|
}
|
|
5895
5985
|
),
|
|
5896
|
-
/* @__PURE__ */
|
|
5986
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
5897
5987
|
] });
|
|
5898
5988
|
}
|
|
5899
5989
|
|
|
5900
5990
|
// src/ui/messenger-home.tsx
|
|
5901
|
-
import { jsx as
|
|
5991
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
5902
5992
|
var p30 = BRAND.cssPrefix;
|
|
5903
5993
|
function MessengerHome({
|
|
5904
5994
|
panelProps,
|
|
@@ -5967,12 +6057,12 @@ function MessengerHome({
|
|
|
5967
6057
|
nav: moduleNav,
|
|
5968
6058
|
panelProps
|
|
5969
6059
|
});
|
|
5970
|
-
const plainActions = /* @__PURE__ */
|
|
6060
|
+
const plainActions = /* @__PURE__ */ jsx34(HeaderActions, { panelProps, variant: "plain" });
|
|
5971
6061
|
let body;
|
|
5972
6062
|
if (top?.kind === "iframe") {
|
|
5973
|
-
body = /* @__PURE__ */
|
|
6063
|
+
body = /* @__PURE__ */ jsx34(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
5974
6064
|
} else if (top?.kind === "content") {
|
|
5975
|
-
body = /* @__PURE__ */
|
|
6065
|
+
body = /* @__PURE__ */ jsx34(
|
|
5976
6066
|
ContentView,
|
|
5977
6067
|
{
|
|
5978
6068
|
id: top.id,
|
|
@@ -5984,7 +6074,7 @@ function MessengerHome({
|
|
|
5984
6074
|
}
|
|
5985
6075
|
);
|
|
5986
6076
|
} else if (activeModule?.layout === "chat") {
|
|
5987
|
-
body = /* @__PURE__ */
|
|
6077
|
+
body = /* @__PURE__ */ jsx34(
|
|
5988
6078
|
PanelContent,
|
|
5989
6079
|
{
|
|
5990
6080
|
...panelProps,
|
|
@@ -5995,7 +6085,7 @@ function MessengerHome({
|
|
|
5995
6085
|
);
|
|
5996
6086
|
} else if (activeModule) {
|
|
5997
6087
|
const Root = LAYOUTS[activeModule.layout].Root;
|
|
5998
|
-
body = Root ? /* @__PURE__ */
|
|
6088
|
+
body = Root ? /* @__PURE__ */ jsx34(Root, { ...screenProps(activeModule) }, activeModule.id) : null;
|
|
5999
6089
|
} else {
|
|
6000
6090
|
body = null;
|
|
6001
6091
|
}
|
|
@@ -6010,8 +6100,8 @@ function MessengerHome({
|
|
|
6010
6100
|
style: { position: "relative" },
|
|
6011
6101
|
"data-testid": TID.messengerHome,
|
|
6012
6102
|
children: [
|
|
6013
|
-
/* @__PURE__ */
|
|
6014
|
-
showTabBar ? /* @__PURE__ */
|
|
6103
|
+
/* @__PURE__ */ jsx34("div", { class: `${p30}-messenger-body`, children: body }),
|
|
6104
|
+
showTabBar ? /* @__PURE__ */ jsx34(
|
|
6015
6105
|
HomeTabBar,
|
|
6016
6106
|
{
|
|
6017
6107
|
modules: enabledModules,
|
|
@@ -6021,8 +6111,8 @@ function MessengerHome({
|
|
|
6021
6111
|
onSelect: nav.switchTab
|
|
6022
6112
|
}
|
|
6023
6113
|
) : null,
|
|
6024
|
-
/* @__PURE__ */
|
|
6025
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
6114
|
+
/* @__PURE__ */ jsx34(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
6115
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx34(
|
|
6026
6116
|
ResizeGrip,
|
|
6027
6117
|
{
|
|
6028
6118
|
panelEl: containerRef.current,
|
|
@@ -6039,7 +6129,7 @@ function MessengerHome({
|
|
|
6039
6129
|
}
|
|
6040
6130
|
|
|
6041
6131
|
// src/ui/modules-empty.tsx
|
|
6042
|
-
import { jsx as
|
|
6132
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
6043
6133
|
var p31 = BRAND.cssPrefix;
|
|
6044
6134
|
function ModulesEmpty({ strings, onClose }) {
|
|
6045
6135
|
return /* @__PURE__ */ jsxs30(
|
|
@@ -6050,7 +6140,7 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
6050
6140
|
"aria-label": strings.panelTitle,
|
|
6051
6141
|
"data-testid": TID.modulesEmpty,
|
|
6052
6142
|
children: [
|
|
6053
|
-
onClose ? /* @__PURE__ */
|
|
6143
|
+
onClose ? /* @__PURE__ */ jsx35(
|
|
6054
6144
|
"button",
|
|
6055
6145
|
{
|
|
6056
6146
|
type: "button",
|
|
@@ -6058,10 +6148,10 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
6058
6148
|
onClick: onClose,
|
|
6059
6149
|
"aria-label": strings.close,
|
|
6060
6150
|
title: strings.close,
|
|
6061
|
-
children: /* @__PURE__ */
|
|
6151
|
+
children: /* @__PURE__ */ jsx35(CloseIcon, {})
|
|
6062
6152
|
}
|
|
6063
6153
|
) : null,
|
|
6064
|
-
/* @__PURE__ */
|
|
6154
|
+
/* @__PURE__ */ jsx35("p", { class: `${p31}-modules-empty-text`, children: strings.modulesEmpty })
|
|
6065
6155
|
]
|
|
6066
6156
|
}
|
|
6067
6157
|
);
|
|
@@ -6133,7 +6223,7 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
6133
6223
|
}
|
|
6134
6224
|
|
|
6135
6225
|
// src/ui/app.tsx
|
|
6136
|
-
import { jsx as
|
|
6226
|
+
import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
6137
6227
|
var log16 = logger.scope("app");
|
|
6138
6228
|
var p32 = BRAND.cssPrefix;
|
|
6139
6229
|
function App({ options, hostElement, bus }) {
|
|
@@ -6144,10 +6234,12 @@ function App({ options, hostElement, bus }) {
|
|
|
6144
6234
|
const [activeThemeMode, setActiveThemeMode] = useState13(
|
|
6145
6235
|
() => initialSettings.themeMode ?? options.themeMode
|
|
6146
6236
|
);
|
|
6237
|
+
const [activeTextSize, setActiveTextSize] = useState13(() => initialSettings.textSize ?? options.textSize);
|
|
6147
6238
|
const conversationIdSig = useSignal2(persistence.loadConversationId());
|
|
6148
6239
|
const messagesSig = useSignal2([]);
|
|
6149
6240
|
const unreadCountSig = useSignal2(0);
|
|
6150
6241
|
const [loadingMessages, setLoadingMessages] = useState13(false);
|
|
6242
|
+
const [formMarkers, setFormMarkers] = useState13([]);
|
|
6151
6243
|
function landingTab() {
|
|
6152
6244
|
const list = options.modules.list;
|
|
6153
6245
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -6225,6 +6317,9 @@ function App({ options, hostElement, bus }) {
|
|
|
6225
6317
|
useEffect17(() => {
|
|
6226
6318
|
hostElement.dataset.theme = activeThemeMode;
|
|
6227
6319
|
}, [hostElement, activeThemeMode, options]);
|
|
6320
|
+
useEffect17(() => {
|
|
6321
|
+
hostElement.dataset.textSize = activeTextSize;
|
|
6322
|
+
}, [hostElement, activeTextSize, options]);
|
|
6228
6323
|
useEffect17(() => {
|
|
6229
6324
|
feedback.update(options.sound, options.haptics);
|
|
6230
6325
|
}, [feedback, options.sound, options.haptics]);
|
|
@@ -6349,14 +6444,29 @@ function App({ options, hostElement, bus }) {
|
|
|
6349
6444
|
if (res.userPrefs.locale) setActiveLocale(res.userPrefs.locale);
|
|
6350
6445
|
if (res.userPrefs.soundMuted !== void 0) feedback.setMuted(res.userPrefs.soundMuted);
|
|
6351
6446
|
if (res.userPrefs.themeMode) setActiveThemeMode(res.userPrefs.themeMode);
|
|
6447
|
+
if (res.userPrefs.textSize) setActiveTextSize(res.userPrefs.textSize);
|
|
6352
6448
|
}
|
|
6353
6449
|
const isResume = !newConversation && persistedChatId && res.conversationId === persistedChatId;
|
|
6354
6450
|
if (isResume) {
|
|
6355
6451
|
setLoadingMessages(true);
|
|
6356
6452
|
try {
|
|
6357
|
-
const chat = res.messages?.length ? {
|
|
6453
|
+
const chat = res.messages?.length ? {
|
|
6454
|
+
conversationId: persistedChatId,
|
|
6455
|
+
canContinue: res.canContinue ?? true,
|
|
6456
|
+
messages: res.messages,
|
|
6457
|
+
formSubmissions: res.formSubmissions
|
|
6458
|
+
} : await transport.loadConversation(persistedChatId);
|
|
6358
6459
|
if (isStale()) return;
|
|
6359
6460
|
const loaded = (chat.messages ?? []).map(fromWireMessage);
|
|
6461
|
+
const subs = chat.formSubmissions ?? res.formSubmissions ?? [];
|
|
6462
|
+
setFormMarkers(
|
|
6463
|
+
subs.map((rec, i) => ({
|
|
6464
|
+
key: `wire:${rec.formId}:${rec.createdAt ?? i}`,
|
|
6465
|
+
formId: rec.formId,
|
|
6466
|
+
outcome: rec.skipped ? "skipped" : "submitted",
|
|
6467
|
+
createdAt: rec.createdAt
|
|
6468
|
+
}))
|
|
6469
|
+
);
|
|
6360
6470
|
const tail = resumeBubbleRef.current ? [resumeBubbleRef.current] : [];
|
|
6361
6471
|
if (loaded.length || tail.length) {
|
|
6362
6472
|
messagesSig.value = [...loaded, ...tail];
|
|
@@ -6584,6 +6694,10 @@ function App({ options, hostElement, bus }) {
|
|
|
6584
6694
|
onComplete: (form, trigger, values, skipped) => {
|
|
6585
6695
|
log16.info("formSubmit", { formId: form.id, trigger, skipped });
|
|
6586
6696
|
bus.emit("formSubmit", { formId: form.id, values, skipped });
|
|
6697
|
+
setFormMarkers((prev) => [
|
|
6698
|
+
...prev,
|
|
6699
|
+
{ key: `local:${form.id}:${prev.length}`, formId: form.id, outcome: skipped ? "skipped" : "submitted" }
|
|
6700
|
+
]);
|
|
6587
6701
|
if (skipped || Object.keys(values).length === 0) return;
|
|
6588
6702
|
const activeConversationId = conversationIdSig.value ?? uuid7();
|
|
6589
6703
|
if (!conversationIdSig.value) {
|
|
@@ -6697,6 +6811,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6697
6811
|
conversationIdSig.value = void 0;
|
|
6698
6812
|
persistence.clearConversation();
|
|
6699
6813
|
setCanSend(true);
|
|
6814
|
+
setFormMarkers([]);
|
|
6700
6815
|
void runStartConversation({ newConversation: true });
|
|
6701
6816
|
}, [streaming, activeCancel, messagesSig, conversationIdSig, persistence, runStartConversation, bus]);
|
|
6702
6817
|
const handleNewChat = useCallback6(() => {
|
|
@@ -6722,7 +6837,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6722
6837
|
const handlePopOut = useCallback6(() => {
|
|
6723
6838
|
if (!options.popOutUrl) return;
|
|
6724
6839
|
const url = new URL(options.popOutUrl);
|
|
6725
|
-
if (conversationIdSig.value) url.searchParams.set("
|
|
6840
|
+
if (conversationIdSig.value) url.searchParams.set("conversation", conversationIdSig.value);
|
|
6726
6841
|
if (options.widgetId !== "default") url.searchParams.set("widgetId", options.widgetId);
|
|
6727
6842
|
log16.info("popOut", { url: url.toString() });
|
|
6728
6843
|
window.open(url.toString(), "_blank", "noopener,noreferrer");
|
|
@@ -6755,6 +6870,16 @@ function App({ options, hostElement, bus }) {
|
|
|
6755
6870
|
},
|
|
6756
6871
|
[hostElement, patchAndSync, bus]
|
|
6757
6872
|
);
|
|
6873
|
+
const handleTextSizeChange = useCallback6(
|
|
6874
|
+
(size) => {
|
|
6875
|
+
log16.info("textSizeChange", { size });
|
|
6876
|
+
setActiveTextSize(size);
|
|
6877
|
+
hostElement.dataset.textSize = size;
|
|
6878
|
+
patchAndSync({ textSize: size });
|
|
6879
|
+
bus.emit("textSizeChange", size);
|
|
6880
|
+
},
|
|
6881
|
+
[hostElement, patchAndSync, bus]
|
|
6882
|
+
);
|
|
6758
6883
|
const handleToggleSidebarCollapsed = useCallback6(() => {
|
|
6759
6884
|
setSidebarCollapsed((prev) => {
|
|
6760
6885
|
const next = !prev;
|
|
@@ -6772,12 +6897,12 @@ function App({ options, hostElement, bus }) {
|
|
|
6772
6897
|
},
|
|
6773
6898
|
[patchAndSync, bus]
|
|
6774
6899
|
);
|
|
6775
|
-
const
|
|
6776
|
-
async (
|
|
6777
|
-
log16.info("
|
|
6778
|
-
bus.emit("
|
|
6900
|
+
const handleSelectHistoryConversation = useCallback6(
|
|
6901
|
+
async (targetConversationId) => {
|
|
6902
|
+
log16.info("selectConversation", { conversationId: targetConversationId });
|
|
6903
|
+
bus.emit("selectConversation", { conversationId: targetConversationId });
|
|
6779
6904
|
try {
|
|
6780
|
-
const res = await transport.loadConversation(
|
|
6905
|
+
const res = await transport.loadConversation(targetConversationId);
|
|
6781
6906
|
const hydrated = res.messages.map(fromWireMessage);
|
|
6782
6907
|
messagesSig.value = hydrated;
|
|
6783
6908
|
conversationIdSig.value = res.conversationId;
|
|
@@ -6786,7 +6911,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6786
6911
|
setCanSend(res.canContinue);
|
|
6787
6912
|
setSuggestions(res.suggestions ?? []);
|
|
6788
6913
|
setView("chat");
|
|
6789
|
-
await transport.markRead(
|
|
6914
|
+
await transport.markRead(targetConversationId);
|
|
6790
6915
|
refreshUnread();
|
|
6791
6916
|
} catch (err) {
|
|
6792
6917
|
bus.emit("error", err);
|
|
@@ -6807,8 +6932,8 @@ function App({ options, hostElement, bus }) {
|
|
|
6807
6932
|
return unsub;
|
|
6808
6933
|
}, [hostElement, handleOpen, handleClose, handleExpand, handleFullscreen, handlePopOut, forms]);
|
|
6809
6934
|
const effectiveOptions = useMemo3(
|
|
6810
|
-
() => applyOptionOverrides(options, activeLocale, activeThemeMode),
|
|
6811
|
-
[options, activeLocale, activeThemeMode]
|
|
6935
|
+
() => applyOptionOverrides(options, activeLocale, activeThemeMode, activeTextSize),
|
|
6936
|
+
[options, activeLocale, activeThemeMode, activeTextSize]
|
|
6812
6937
|
);
|
|
6813
6938
|
const panelProps = {
|
|
6814
6939
|
options: effectiveOptions,
|
|
@@ -6831,10 +6956,11 @@ function App({ options, hostElement, bus }) {
|
|
|
6831
6956
|
onPopOut: handlePopOut,
|
|
6832
6957
|
onSoundToggle: handleSoundToggle,
|
|
6833
6958
|
onToggleHistory: handleToggleHistory,
|
|
6834
|
-
|
|
6835
|
-
|
|
6959
|
+
onSelectHistoryConversation: handleSelectHistoryConversation,
|
|
6960
|
+
onNewConversation: handleNewChat,
|
|
6836
6961
|
onLocaleChange: handleLocaleChange,
|
|
6837
6962
|
onThemeChange: handleThemeChange,
|
|
6963
|
+
onTextSizeChange: handleTextSizeChange,
|
|
6838
6964
|
onWidgetSizeChange: handleWidgetSizeChange,
|
|
6839
6965
|
onSend: handleSend,
|
|
6840
6966
|
onStop: handleStop,
|
|
@@ -6847,12 +6973,15 @@ function App({ options, hostElement, bus }) {
|
|
|
6847
6973
|
// Active form: replaces the composer as a gate and locks every chat action
|
|
6848
6974
|
// until the visitor submits or (when skippable) skips.
|
|
6849
6975
|
activeForm: activeForm.value?.form ?? null,
|
|
6976
|
+
// Resolve marker titles against the CURRENT forms config — the wire echo
|
|
6977
|
+
// can land before the server config merge populates `options.forms`.
|
|
6978
|
+
formMarkers: formMarkers.map((m) => ({ ...m, title: options.forms.list.find((f) => f.id === m.formId)?.title })),
|
|
6850
6979
|
onFormSubmit: forms.complete,
|
|
6851
6980
|
onFormSkip: forms.skip,
|
|
6852
6981
|
tool: toolInteraction
|
|
6853
6982
|
};
|
|
6854
6983
|
const onSelectConversation = (conversationId) => {
|
|
6855
|
-
void
|
|
6984
|
+
void handleSelectHistoryConversation(conversationId);
|
|
6856
6985
|
const chatId = chatTabId();
|
|
6857
6986
|
if (chatId) homeNav.switchTab(chatId);
|
|
6858
6987
|
};
|
|
@@ -6861,12 +6990,12 @@ function App({ options, hostElement, bus }) {
|
|
|
6861
6990
|
const renderSurface = (size) => {
|
|
6862
6991
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
6863
6992
|
if (enabledModules.length === 0) {
|
|
6864
|
-
return /* @__PURE__ */
|
|
6993
|
+
return /* @__PURE__ */ jsx36(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
6865
6994
|
}
|
|
6866
6995
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
6867
|
-
return /* @__PURE__ */
|
|
6996
|
+
return /* @__PURE__ */ jsx36(Panel, { ...panelProps, panelSize: size });
|
|
6868
6997
|
}
|
|
6869
|
-
return /* @__PURE__ */
|
|
6998
|
+
return /* @__PURE__ */ jsx36(
|
|
6870
6999
|
MessengerHome,
|
|
6871
7000
|
{
|
|
6872
7001
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
@@ -6880,11 +7009,11 @@ function App({ options, hostElement, bus }) {
|
|
|
6880
7009
|
);
|
|
6881
7010
|
};
|
|
6882
7011
|
if (options.mode === "page") {
|
|
6883
|
-
const
|
|
6884
|
-
void
|
|
7012
|
+
const onSelectConversationFromSidebar = (chat) => {
|
|
7013
|
+
void handleSelectHistoryConversation(chat.conversationId);
|
|
6885
7014
|
};
|
|
6886
|
-
const
|
|
6887
|
-
return /* @__PURE__ */
|
|
7015
|
+
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
7016
|
+
return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: /* @__PURE__ */ jsx36(
|
|
6888
7017
|
PageShell,
|
|
6889
7018
|
{
|
|
6890
7019
|
site: parsedSite,
|
|
@@ -6892,9 +7021,9 @@ function App({ options, hostElement, bus }) {
|
|
|
6892
7021
|
transport,
|
|
6893
7022
|
strings: effectiveOptions.strings,
|
|
6894
7023
|
visitorId,
|
|
6895
|
-
showConversations:
|
|
6896
|
-
|
|
6897
|
-
|
|
7024
|
+
showConversations: conversationsEnabled,
|
|
7025
|
+
onSelectConversation: onSelectConversationFromSidebar,
|
|
7026
|
+
onNewConversation: handleNewChat,
|
|
6898
7027
|
sidebarCollapsed,
|
|
6899
7028
|
onToggleSidebarCollapsed: handleToggleSidebarCollapsed,
|
|
6900
7029
|
children: renderSurface("fullscreen")
|
|
@@ -6903,7 +7032,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6903
7032
|
}
|
|
6904
7033
|
if (isInlineLike) {
|
|
6905
7034
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
6906
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: renderSurface(inlineSize) });
|
|
6907
7036
|
}
|
|
6908
7037
|
const drawerEdgeTab = options.mode === "drawer";
|
|
6909
7038
|
const triggerOwnedByPage = options.mode === "modal";
|
|
@@ -6911,7 +7040,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6911
7040
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
6912
7041
|
return /* @__PURE__ */ jsxs31("div", { class: `${p32}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
6913
7042
|
isOpen ? renderSurface(panelSize) : null,
|
|
6914
|
-
launcherVisible ? /* @__PURE__ */
|
|
7043
|
+
launcherVisible ? /* @__PURE__ */ jsx36(
|
|
6915
7044
|
Launcher,
|
|
6916
7045
|
{
|
|
6917
7046
|
onToggle: handleOpen,
|
|
@@ -6921,7 +7050,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6921
7050
|
edgeTab: drawerEdgeTab
|
|
6922
7051
|
}
|
|
6923
7052
|
) : null,
|
|
6924
|
-
calloutToRender ? /* @__PURE__ */
|
|
7053
|
+
calloutToRender ? /* @__PURE__ */ jsx36(
|
|
6925
7054
|
LauncherCallout,
|
|
6926
7055
|
{
|
|
6927
7056
|
callout: calloutToRender,
|
|
@@ -7117,7 +7246,7 @@ var EVENT_NAMES = [
|
|
|
7117
7246
|
"send",
|
|
7118
7247
|
"stop",
|
|
7119
7248
|
"clear",
|
|
7120
|
-
"
|
|
7249
|
+
"selectConversation",
|
|
7121
7250
|
"suggestion",
|
|
7122
7251
|
"toggleHistory",
|
|
7123
7252
|
// Forms + human-in-the-loop
|
|
@@ -7133,6 +7262,7 @@ var EVENT_NAMES = [
|
|
|
7133
7262
|
// Preferences
|
|
7134
7263
|
"localeChange",
|
|
7135
7264
|
"themeChange",
|
|
7265
|
+
"textSizeChange",
|
|
7136
7266
|
"soundToggle",
|
|
7137
7267
|
"sidebarToggle",
|
|
7138
7268
|
"calloutDismiss",
|