@helpai/elements 0.54.1 → 0.54.3

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/web-component.mjs CHANGED
@@ -1523,8 +1523,8 @@ function fillRandom(view) {
1523
1523
 
1524
1524
  // src/core/persistence.ts
1525
1525
  var log2 = logger.scope("persistence");
1526
- function createPersistence(widgetId, storage = defaultStorage, deploymentId) {
1527
- const scope = deploymentId ? `${widgetId}.${deploymentId}` : widgetId;
1526
+ function createPersistence(widgetId, storage = defaultStorage, aiAgentDeploymentId) {
1527
+ const scope = aiAgentDeploymentId ? `${widgetId}.${aiAgentDeploymentId}` : widgetId;
1528
1528
  const KEY_STORAGE_VERSION = `${BRAND.cssPrefix}.storageVersion`;
1529
1529
  const activeVersion = storage.get(KEY_STORAGE_VERSION) ?? void 0;
1530
1530
  const version = activeVersion ? `.v${activeVersion}` : "";
@@ -1761,22 +1761,22 @@ function attachAdoptedSheet(shadow, doc) {
1761
1761
  }
1762
1762
  }
1763
1763
  function applyThemeOverrides(host, overrides) {
1764
- const p36 = BRAND.cssPrefix;
1765
- if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
1766
- if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
1767
- if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
1768
- if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
1764
+ const p35 = BRAND.cssPrefix;
1765
+ if (overrides.accent) host.style.setProperty(`--${p35}-accent-user`, overrides.accent);
1766
+ if (overrides.accentText) host.style.setProperty(`--${p35}-accent-text-user`, overrides.accentText);
1767
+ if (overrides.radius) host.style.setProperty(`--${p35}-radius`, overrides.radius);
1768
+ if (overrides.fontFamily) host.style.setProperty(`--${p35}-font`, overrides.fontFamily);
1769
1769
  }
1770
1770
  function applyThemeMode(host, mode) {
1771
1771
  host.dataset.theme = mode;
1772
1772
  }
1773
1773
  function applySize(host, size) {
1774
- const p36 = BRAND.cssPrefix;
1775
- if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
1776
- if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
1777
- if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
1778
- if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
1779
- if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
1774
+ const p35 = BRAND.cssPrefix;
1775
+ if (size.width !== void 0) host.style.setProperty(`--${p35}-panel-w`, size.width);
1776
+ if (size.height !== void 0) host.style.setProperty(`--${p35}-panel-h`, size.height);
1777
+ if (size.expanded?.width !== void 0) host.style.setProperty(`--${p35}-expanded-w`, size.expanded.width);
1778
+ if (size.expanded?.height !== void 0) host.style.setProperty(`--${p35}-expanded-h`, size.expanded.height);
1779
+ if (size.inset !== void 0) host.style.setProperty(`--${p35}-panel-inset`, size.inset);
1780
1780
  }
1781
1781
  function applyPosition(host, pos) {
1782
1782
  host.dataset.position = pos;
@@ -1796,7 +1796,7 @@ import { h, render as renderPreact } from "preact";
1796
1796
 
1797
1797
  // src/ui/app.tsx
1798
1798
  import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "preact/hooks";
1799
- import { batch, useComputed as useComputed8, useSignal } from "@preact/signals";
1799
+ import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
1800
1800
 
1801
1801
  // src/core/handshake-shape.ts
1802
1802
  function isPlainObject2(raw) {
@@ -1880,7 +1880,7 @@ function createAuth(opts) {
1880
1880
  }
1881
1881
 
1882
1882
  // src/core/version.ts
1883
- var ELEMENTS_VERSION = true ? "0.54.1" : "0.0.0-dev";
1883
+ var ELEMENTS_VERSION = true ? "0.54.3" : "0.0.0-dev";
1884
1884
  var ELEMENTS_VERSION_PARAM = "_ev";
1885
1885
 
1886
1886
  // src/stream/types.ts
@@ -1965,11 +1965,11 @@ function toBase64Url(json) {
1965
1965
  var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
1966
1966
  function encodeContext(user, page) {
1967
1967
  const u = nonEmpty(user);
1968
- const p36 = nonEmpty(page);
1969
- if (!u && !p36) return void 0;
1968
+ const p35 = nonEmpty(page);
1969
+ if (!u && !p35) return void 0;
1970
1970
  const envelope = {};
1971
1971
  if (u) envelope.user = u;
1972
- if (p36) envelope.page = p36;
1972
+ if (p35) envelope.page = p35;
1973
1973
  return toBase64Url(JSON.stringify(envelope));
1974
1974
  }
1975
1975
 
@@ -2069,8 +2069,8 @@ function buildSendMessageRequest(params) {
2069
2069
  if (tools?.length) body.data = { tools };
2070
2070
  return body;
2071
2071
  }
2072
- function isResolvedToolPart(p36) {
2073
- return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
2072
+ function isResolvedToolPart(p35) {
2073
+ return p35.state === "output-available" || p35.state === "output-error" || p35.state === "output-denied" || p35.approval?.approved !== void 0;
2074
2074
  }
2075
2075
  function normalizeToolRef(ref) {
2076
2076
  if (typeof ref === "string") return ref ? { code: ref } : null;
@@ -2078,29 +2078,29 @@ function normalizeToolRef(ref) {
2078
2078
  }
2079
2079
  function messageToWireParts(m) {
2080
2080
  const out = [];
2081
- for (const p36 of m.parts) {
2082
- if (p36.kind === "step-start") {
2081
+ for (const p35 of m.parts) {
2082
+ if (p35.kind === "step-start") {
2083
2083
  out.push({ type: "step-start" });
2084
2084
  }
2085
- if (p36.kind === "reasoning" && p36.text) {
2086
- out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
2085
+ if (p35.kind === "reasoning" && p35.text) {
2086
+ out.push({ type: "reasoning", text: p35.text, state: p35.done ? "done" : "streaming" });
2087
2087
  }
2088
- if (p36.kind === "text" && p36.text) {
2089
- out.push({ text: p36.text, type: "text" });
2088
+ if (p35.kind === "text" && p35.text) {
2089
+ out.push({ text: p35.text, type: "text" });
2090
2090
  }
2091
- if (p36.kind === "file" && p36.url) {
2092
- out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
2091
+ if (p35.kind === "file" && p35.url) {
2092
+ out.push({ mediaType: p35.mediaType, type: "file", url: p35.url });
2093
2093
  }
2094
- if (p36.kind === "tool" && isResolvedToolPart(p36)) {
2094
+ if (p35.kind === "tool" && isResolvedToolPart(p35)) {
2095
2095
  const part = {
2096
- type: toolPartType(p36.toolName),
2097
- toolCallId: p36.toolCallId,
2098
- state: p36.state
2096
+ type: toolPartType(p35.toolName),
2097
+ toolCallId: p35.toolCallId,
2098
+ state: p35.state
2099
2099
  };
2100
- if (p36.input !== void 0) part.input = p36.input;
2101
- if (p36.output !== void 0) part.output = p36.output;
2102
- if (p36.error !== void 0) part.errorText = p36.error;
2103
- if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
2100
+ if (p35.input !== void 0) part.input = p35.input;
2101
+ if (p35.output !== void 0) part.output = p35.output;
2102
+ if (p35.error !== void 0) part.errorText = p35.error;
2103
+ if (p35.approval && p35.approval.approved !== void 0) part.approval = p35.approval;
2104
2104
  out.push(part);
2105
2105
  }
2106
2106
  }
@@ -2858,7 +2858,7 @@ function fromWireMessage(w) {
2858
2858
  };
2859
2859
  }
2860
2860
  return null;
2861
- }).filter((p36) => p36 !== null);
2861
+ }).filter((p35) => p35 !== null);
2862
2862
  return {
2863
2863
  id: w.id,
2864
2864
  role: w.role,
@@ -2912,7 +2912,7 @@ function assistantText(m) {
2912
2912
  }
2913
2913
  function hasNoVisibleAnswer(m) {
2914
2914
  if (assistantText(m).trim() !== "") return false;
2915
- return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
2915
+ return !m.partsSig.value.some((p35) => p35.kind === "tool" || p35.kind === "file" || p35.kind === "source");
2916
2916
  }
2917
2917
  function isEmptyAssistantReply(m) {
2918
2918
  return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
@@ -2920,43 +2920,43 @@ function isEmptyAssistantReply(m) {
2920
2920
  function isHiddenCanceledTurn(m) {
2921
2921
  return m.canceled === true && isEmptyAssistantReply(m);
2922
2922
  }
2923
- function partToReactive(p36) {
2924
- if (p36.kind === "text" || p36.kind === "reasoning") {
2925
- return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
2923
+ function partToReactive(p35) {
2924
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2925
+ return { kind: p35.kind, id: p35.id, textSig: signal(p35.text), doneSig: signal(p35.done) };
2926
2926
  }
2927
- if (p36.kind === "tool") {
2927
+ if (p35.kind === "tool") {
2928
2928
  return {
2929
2929
  kind: "tool",
2930
- toolCallId: p36.toolCallId,
2931
- toolName: p36.toolName,
2932
- inputPartialSig: signal(p36.inputPartial),
2933
- inputSig: signal(p36.input),
2934
- outputSig: signal(p36.output),
2935
- errorSig: signal(p36.error),
2936
- stateSig: signal(p36.state),
2937
- approvalSig: signal(p36.approval)
2930
+ toolCallId: p35.toolCallId,
2931
+ toolName: p35.toolName,
2932
+ inputPartialSig: signal(p35.inputPartial),
2933
+ inputSig: signal(p35.input),
2934
+ outputSig: signal(p35.output),
2935
+ errorSig: signal(p35.error),
2936
+ stateSig: signal(p35.state),
2937
+ approvalSig: signal(p35.approval)
2938
2938
  };
2939
2939
  }
2940
- return p36;
2940
+ return p35;
2941
2941
  }
2942
- function partFromReactive(p36) {
2943
- if (p36.kind === "text" || p36.kind === "reasoning") {
2944
- return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
2942
+ function partFromReactive(p35) {
2943
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2944
+ return { kind: p35.kind, id: p35.id, text: p35.textSig.value, done: p35.doneSig.value };
2945
2945
  }
2946
- if (p36.kind === "tool") {
2946
+ if (p35.kind === "tool") {
2947
2947
  return {
2948
2948
  kind: "tool",
2949
- toolCallId: p36.toolCallId,
2950
- toolName: p36.toolName,
2951
- inputPartial: p36.inputPartialSig.value,
2952
- input: p36.inputSig.value,
2953
- output: p36.outputSig.value,
2954
- error: p36.errorSig.value,
2955
- state: p36.stateSig.value,
2956
- approval: p36.approvalSig.value
2949
+ toolCallId: p35.toolCallId,
2950
+ toolName: p35.toolName,
2951
+ inputPartial: p35.inputPartialSig.value,
2952
+ input: p35.inputSig.value,
2953
+ output: p35.outputSig.value,
2954
+ error: p35.errorSig.value,
2955
+ state: p35.stateSig.value,
2956
+ approval: p35.approvalSig.value
2957
2957
  };
2958
2958
  }
2959
- return p36;
2959
+ return p35;
2960
2960
  }
2961
2961
 
2962
2962
  // src/stream/reducer.ts
@@ -3035,8 +3035,8 @@ var StreamReducer = class {
3035
3035
  this.ensureTextPart(m, "text", chunk.id);
3036
3036
  return;
3037
3037
  case "text-delta": {
3038
- const p36 = this.ensureTextPart(m, "text", chunk.id);
3039
- p36.textSig.value += chunk.delta;
3038
+ const p35 = this.ensureTextPart(m, "text", chunk.id);
3039
+ p35.textSig.value += chunk.delta;
3040
3040
  return;
3041
3041
  }
3042
3042
  case "text-end":
@@ -3046,8 +3046,8 @@ var StreamReducer = class {
3046
3046
  this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
3047
3047
  return;
3048
3048
  case "reasoning-delta": {
3049
- const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
3050
- p36.textSig.value += chunk.delta;
3049
+ const p35 = this.ensureTextPart(m, "reasoning", chunk.id);
3050
+ p35.textSig.value += chunk.delta;
3051
3051
  return;
3052
3052
  }
3053
3053
  case "reasoning-end":
@@ -3099,7 +3099,7 @@ var StreamReducer = class {
3099
3099
  }
3100
3100
  };
3101
3101
  function ensureToolPart(m, toolCallId, toolName2) {
3102
- const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
3102
+ const existing = m.partsSig.value.find((p35) => p35.kind === "tool" && p35.toolCallId === toolCallId);
3103
3103
  if (existing) return existing;
3104
3104
  const part = {
3105
3105
  kind: "tool",
@@ -3119,7 +3119,7 @@ function appendPart(m, part) {
3119
3119
  m.partsSig.value = [...m.partsSig.value, part];
3120
3120
  }
3121
3121
  function appendSource(m, source) {
3122
- if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
3122
+ if (m.partsSig.value.some((p35) => p35.kind === "source" && p35.sourceId === source.sourceId)) return;
3123
3123
  appendPart(m, source);
3124
3124
  }
3125
3125
  function applyTool(m, chunk) {
@@ -3128,37 +3128,37 @@ function applyTool(m, chunk) {
3128
3128
  ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3129
3129
  return;
3130
3130
  case "tool-input-delta": {
3131
- const p36 = ensureToolPart(m, chunk.toolCallId);
3132
- p36.inputPartialSig.value += chunk.inputTextDelta;
3131
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3132
+ p35.inputPartialSig.value += chunk.inputTextDelta;
3133
3133
  return;
3134
3134
  }
3135
3135
  case "tool-input-available": {
3136
- const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3137
- p36.inputSig.value = chunk.input;
3138
- p36.stateSig.value = "input-available";
3136
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3137
+ p35.inputSig.value = chunk.input;
3138
+ p35.stateSig.value = "input-available";
3139
3139
  return;
3140
3140
  }
3141
3141
  case "tool-approval-request": {
3142
- const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3143
- p36.approvalSig.value = { id: chunk.approvalId };
3144
- p36.stateSig.value = "approval-requested";
3142
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3143
+ p35.approvalSig.value = { id: chunk.approvalId };
3144
+ p35.stateSig.value = "approval-requested";
3145
3145
  return;
3146
3146
  }
3147
3147
  case "tool-output-available": {
3148
- const p36 = ensureToolPart(m, chunk.toolCallId);
3149
- p36.outputSig.value = chunk.output;
3150
- p36.stateSig.value = "output-available";
3148
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3149
+ p35.outputSig.value = chunk.output;
3150
+ p35.stateSig.value = "output-available";
3151
3151
  return;
3152
3152
  }
3153
3153
  case "tool-output-error": {
3154
- const p36 = ensureToolPart(m, chunk.toolCallId);
3155
- p36.errorSig.value = chunk.errorText;
3156
- p36.stateSig.value = "output-error";
3154
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3155
+ p35.errorSig.value = chunk.errorText;
3156
+ p35.stateSig.value = "output-error";
3157
3157
  return;
3158
3158
  }
3159
3159
  case "tool-output-denied": {
3160
- const p36 = ensureToolPart(m, chunk.toolCallId);
3161
- p36.stateSig.value = "output-denied";
3160
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3161
+ p35.stateSig.value = "output-denied";
3162
3162
  return;
3163
3163
  }
3164
3164
  default:
@@ -3870,24 +3870,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
3870
3870
  import { useEffect as useEffect2, useRef } from "preact/hooks";
3871
3871
  import { jsx as jsx3 } from "preact/jsx-runtime";
3872
3872
  function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
3873
- const p36 = BRAND.cssPrefix;
3873
+ const p35 = BRAND.cssPrefix;
3874
3874
  const dragRef = useRef(null);
3875
3875
  useEffect2(() => {
3876
3876
  if (!panelEl) return;
3877
3877
  const style = panelEl.style;
3878
- if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
3879
- if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
3880
- if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
3881
- if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
3878
+ if (resize.minWidth) style.setProperty(`--${p35}-resize-min-w`, resize.minWidth);
3879
+ if (resize.maxWidth) style.setProperty(`--${p35}-resize-max-w`, resize.maxWidth);
3880
+ if (resize.minHeight) style.setProperty(`--${p35}-resize-min-h`, resize.minHeight);
3881
+ if (resize.maxHeight) style.setProperty(`--${p35}-resize-max-h`, resize.maxHeight);
3882
3882
  if (initialSize) {
3883
- style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
3884
- style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
3883
+ style.setProperty(`--${p35}-widget-w`, `${initialSize.width}px`);
3884
+ style.setProperty(`--${p35}-widget-h`, `${initialSize.height}px`);
3885
3885
  }
3886
- }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
3886
+ }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p35, initialSize]);
3887
3887
  if (!panelEl) return null;
3888
3888
  const isTop = position.startsWith("top-");
3889
3889
  const isRight = position.endsWith("-right");
3890
- const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3890
+ const cornerClass = `${p35}-resize-grip ${p35}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3891
3891
  const onPointerDown = (e) => {
3892
3892
  if (!panelEl) return;
3893
3893
  const target = e.currentTarget;
@@ -3912,8 +3912,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
3912
3912
  if (!d || e.pointerId !== d.pointerId || !panelEl) return;
3913
3913
  const dx = (e.clientX - d.startX) * d.dirX;
3914
3914
  const dy = (e.clientY - d.startY) * d.dirY;
3915
- panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
3916
- panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
3915
+ panelEl.style.setProperty(`--${p35}-widget-w`, `${d.startW + dx}px`);
3916
+ panelEl.style.setProperty(`--${p35}-widget-h`, `${d.startH + dy}px`);
3917
3917
  };
3918
3918
  const onPointerUp = (e) => {
3919
3919
  const d = dragRef.current;
@@ -4650,7 +4650,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
4650
4650
  // src/ui/overflow-menu.tsx
4651
4651
  import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
4652
4652
  function OverflowMenu({ items, triggerLabel }) {
4653
- const p36 = BRAND.cssPrefix;
4653
+ const p35 = BRAND.cssPrefix;
4654
4654
  const menu = usePopoverMenu({ itemCount: items.length });
4655
4655
  const handleSelect = (item) => {
4656
4656
  if (item.disabled) return;
@@ -4673,13 +4673,13 @@ function OverflowMenu({ items, triggerLabel }) {
4673
4673
  e.stopPropagation();
4674
4674
  pickSegment(item, segs[next].value);
4675
4675
  };
4676
- return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
4676
+ return /* @__PURE__ */ jsxs6("div", { class: `${p35}-menu-wrap`, children: [
4677
4677
  /* @__PURE__ */ jsx8(
4678
4678
  "button",
4679
4679
  {
4680
4680
  ref: menu.triggerRef,
4681
4681
  type: "button",
4682
- class: `${p36}-icon-btn`,
4682
+ class: `${p35}-icon-btn`,
4683
4683
  "aria-label": triggerLabel,
4684
4684
  "aria-haspopup": "menu",
4685
4685
  "aria-expanded": menu.open,
@@ -4693,7 +4693,7 @@ function OverflowMenu({ items, triggerLabel }) {
4693
4693
  "div",
4694
4694
  {
4695
4695
  ref: menu.menuRef,
4696
- class: `${p36}-menu`,
4696
+ class: `${p35}-menu`,
4697
4697
  role: "menu",
4698
4698
  "aria-label": triggerLabel,
4699
4699
  onKeyDown: menu.onMenuKey,
@@ -4703,14 +4703,14 @@ function OverflowMenu({ items, triggerLabel }) {
4703
4703
  "div",
4704
4704
  {
4705
4705
  role: "menuitem",
4706
- class: `${p36}-menu-item ${p36}-menu-item-segmented`,
4706
+ class: `${p35}-menu-item ${p35}-menu-item-segmented`,
4707
4707
  "aria-label": item.label,
4708
4708
  tabIndex: -1,
4709
4709
  onKeyDown: (e) => onSegmentRowKey(e, item),
4710
4710
  children: [
4711
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
4712
- /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
4713
- /* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4711
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4712
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4713
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4714
4714
  const active = seg.value === item.value;
4715
4715
  return /* @__PURE__ */ jsx8(
4716
4716
  "button",
@@ -4718,7 +4718,7 @@ function OverflowMenu({ items, triggerLabel }) {
4718
4718
  type: "button",
4719
4719
  role: "menuitemradio",
4720
4720
  "aria-checked": active,
4721
- class: `${p36}-segment`,
4721
+ class: `${p35}-segment`,
4722
4722
  "data-on": active ? "true" : void 0,
4723
4723
  lang: seg.lang,
4724
4724
  title: seg.value,
@@ -4738,14 +4738,14 @@ function OverflowMenu({ items, triggerLabel }) {
4738
4738
  {
4739
4739
  type: "button",
4740
4740
  role: "menuitem",
4741
- class: `${p36}-menu-item`,
4741
+ class: `${p35}-menu-item`,
4742
4742
  "aria-pressed": item.type === "switch" ? item.on : void 0,
4743
4743
  disabled: item.disabled,
4744
4744
  onClick: () => handleSelect(item),
4745
4745
  children: [
4746
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
4747
- /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
4748
- item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4746
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4747
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4748
+ item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4749
4749
  ]
4750
4750
  },
4751
4751
  item.id
@@ -4897,7 +4897,7 @@ function HeaderActions({ panelProps, variant }) {
4897
4897
 
4898
4898
  // src/ui/message-list.tsx
4899
4899
  import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "preact/hooks";
4900
- import { useComputed as useComputed6 } from "@preact/signals";
4900
+ import { useComputed as useComputed7 } from "@preact/signals";
4901
4901
 
4902
4902
  // src/ui/form/dynamic-form.tsx
4903
4903
  import { useState as useState5 } from "preact/hooks";
@@ -5293,7 +5293,7 @@ function FormDoneMarker({
5293
5293
  }
5294
5294
 
5295
5295
  // src/ui/message-bubble.tsx
5296
- import { useComputed as useComputed5 } from "@preact/signals";
5296
+ import { useComputed as useComputed6 } from "@preact/signals";
5297
5297
 
5298
5298
  // src/stream/constants.ts
5299
5299
  function isAskUserQuestionsTool(toolName2) {
@@ -5391,9 +5391,10 @@ function SourceView({ part, strings }) {
5391
5391
  }
5392
5392
 
5393
5393
  // src/ui/tool-approval.tsx
5394
- import { useComputed as useComputed2 } from "@preact/signals";
5394
+ import { useComputed as useComputed3 } from "@preact/signals";
5395
5395
 
5396
5396
  // src/ui/tool-card.tsx
5397
+ import { useComputed as useComputed2 } from "@preact/signals";
5397
5398
  import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
5398
5399
  var p13 = BRAND.cssPrefix;
5399
5400
  function toolName(raw) {
@@ -5464,6 +5465,33 @@ function ToolHeaderRow({
5464
5465
  /* @__PURE__ */ jsx14("span", { class: `${p13}-toolui-chevron`, children: /* @__PURE__ */ jsx14(ChevronDownIcon, {}) })
5465
5466
  ] });
5466
5467
  }
5468
+ function ToolCollapsibleCard({
5469
+ part,
5470
+ strings,
5471
+ testid,
5472
+ superseded
5473
+ }) {
5474
+ const input = useComputed2(() => part.inputSig.value);
5475
+ const output = useComputed2(() => part.outputSig.value);
5476
+ const error = useComputed2(() => part.errorSig.value);
5477
+ const state = useComputed2(() => part.stateSig.value);
5478
+ const approval = useComputed2(() => part.approvalSig.value);
5479
+ return /* @__PURE__ */ jsxs11("details", { class: `${p13}-toolui ${p13}-toolui-collapsible`, "data-testid": testid, children: [
5480
+ /* @__PURE__ */ jsx14("summary", { class: `${p13}-toolui-head`, children: /* @__PURE__ */ jsx14(
5481
+ ToolHeaderRow,
5482
+ {
5483
+ name: toolName(part.toolName),
5484
+ state: state.value,
5485
+ approval: approval.value,
5486
+ strings,
5487
+ superseded
5488
+ }
5489
+ ) }),
5490
+ /* @__PURE__ */ jsx14(ToolSection, { label: strings.toolParameters, value: input.value }),
5491
+ output.value !== void 0 ? /* @__PURE__ */ jsx14(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5492
+ error.value ? /* @__PURE__ */ jsx14(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5493
+ ] });
5494
+ }
5467
5495
  function ToolSection({ label, value, error }) {
5468
5496
  const text = error ? String(value ?? "") : pretty(unwrapResult(value));
5469
5497
  if (!text) return null;
@@ -5494,11 +5522,8 @@ function pretty(value) {
5494
5522
  import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
5495
5523
  var p14 = BRAND.cssPrefix;
5496
5524
  function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
5497
- const approval = useComputed2(() => part.approvalSig.value);
5498
- const state = useComputed2(() => part.stateSig.value);
5499
- const input = useComputed2(() => part.inputSig.value);
5500
- const output = useComputed2(() => part.outputSig.value);
5501
- const error = useComputed2(() => part.errorSig.value);
5525
+ const approval = useComputed3(() => part.approvalSig.value);
5526
+ const state = useComputed3(() => part.stateSig.value);
5502
5527
  const name = toolName(part.toolName);
5503
5528
  const approved = approval.value?.approved;
5504
5529
  const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
@@ -5506,21 +5531,7 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
5506
5531
  const skipped = superseded && !decided;
5507
5532
  const id = part.toolCallId;
5508
5533
  return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
5509
- /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, children: [
5510
- /* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
5511
- ToolHeaderRow,
5512
- {
5513
- name,
5514
- state: state.value,
5515
- approval: approval.value,
5516
- strings,
5517
- superseded: skipped
5518
- }
5519
- ) }),
5520
- /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
5521
- output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5522
- error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5523
- ] }),
5534
+ /* @__PURE__ */ jsx15(ToolCollapsibleCard, { part, strings, superseded: skipped }),
5524
5535
  skipped || terminal ? null : /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui ${p14}-toolui-body`, children: [
5525
5536
  responded ? (
5526
5537
  // DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
@@ -5561,13 +5572,14 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
5561
5572
  children: strings.approve
5562
5573
  }
5563
5574
  )
5564
- ] }) : editable ? /* @__PURE__ */ jsx15("div", { class: `${p14}-toolui-actions`, children: /* @__PURE__ */ jsx15("button", { type: "button", class: `${p14}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
5575
+ ] }) : null,
5576
+ editable ? /* @__PURE__ */ jsx15("div", { class: `${p14}-toolui-actions`, children: /* @__PURE__ */ jsx15("button", { type: "button", class: `${p14}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
5565
5577
  ] })
5566
5578
  ] });
5567
5579
  }
5568
5580
 
5569
5581
  // src/ui/tool-ask-questions.tsx
5570
- import { useComputed as useComputed3 } from "@preact/signals";
5582
+ import { useComputed as useComputed4 } from "@preact/signals";
5571
5583
 
5572
5584
  // src/ui/form/field.ts
5573
5585
  var QUESTION_TYPES = /* @__PURE__ */ new Set([
@@ -5639,9 +5651,9 @@ function str(v) {
5639
5651
  import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5640
5652
  var p15 = BRAND.cssPrefix;
5641
5653
  function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
5642
- const state = useComputed3(() => part.stateSig.value);
5643
- const approval = useComputed3(() => part.approvalSig.value);
5644
- const request = useComputed3(() => parseAskUserQuestions(part.inputSig.value));
5654
+ const state = useComputed4(() => part.stateSig.value);
5655
+ const approval = useComputed4(() => part.approvalSig.value);
5656
+ const request = useComputed4(() => parseAskUserQuestions(part.inputSig.value));
5645
5657
  const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
5646
5658
  const req = request.value;
5647
5659
  if (decided) {
@@ -5704,7 +5716,7 @@ function DecidedCard({
5704
5716
  editable,
5705
5717
  onEdit
5706
5718
  }) {
5707
- const approval = useComputed3(() => part.approvalSig.value);
5719
+ const approval = useComputed4(() => part.approvalSig.value);
5708
5720
  const skipped = approval.value?.approved === false;
5709
5721
  const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
5710
5722
  return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui`, "data-testid": TID.toolDecision, children: [
@@ -5745,36 +5757,20 @@ function parseAnswers(reason) {
5745
5757
  }
5746
5758
 
5747
5759
  // src/ui/tool-call.tsx
5748
- import { useComputed as useComputed4 } from "@preact/signals";
5749
- import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5750
- var p16 = BRAND.cssPrefix;
5760
+ import { useComputed as useComputed5 } from "@preact/signals";
5761
+ import { jsx as jsx17 } from "preact/jsx-runtime";
5751
5762
  function ToolCall({ part, strings }) {
5752
- const input = useComputed4(() => part.inputSig.value);
5753
- const output = useComputed4(() => part.outputSig.value);
5754
- const error = useComputed4(() => part.errorSig.value);
5755
- const state = useComputed4(() => part.stateSig.value);
5756
- const approval = useComputed4(() => part.approvalSig.value);
5757
- const hasDetails = useComputed4(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
5763
+ const input = useComputed5(() => part.inputSig.value);
5764
+ const output = useComputed5(() => part.outputSig.value);
5765
+ const error = useComputed5(() => part.errorSig.value);
5766
+ const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
5758
5767
  if (!hasDetails.value) return null;
5759
- return /* @__PURE__ */ jsxs14("details", { class: `${p16}-toolui ${p16}-toolui-collapsible`, "data-testid": TID.toolCall, children: [
5760
- /* @__PURE__ */ jsx17("summary", { class: `${p16}-toolui-head`, children: /* @__PURE__ */ jsx17(
5761
- ToolHeaderRow,
5762
- {
5763
- name: toolName(part.toolName),
5764
- state: state.value,
5765
- approval: approval.value,
5766
- strings
5767
- }
5768
- ) }),
5769
- /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolParameters, value: input.value }),
5770
- output.value !== void 0 ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5771
- error.value ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5772
- ] });
5768
+ return /* @__PURE__ */ jsx17(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
5773
5769
  }
5774
5770
 
5775
5771
  // src/ui/message-bubble.tsx
5776
- import { jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5777
- var p17 = BRAND.cssPrefix;
5772
+ import { jsx as jsx18, jsxs as jsxs14 } from "preact/jsx-runtime";
5773
+ var p16 = BRAND.cssPrefix;
5778
5774
  function MessageBubble({
5779
5775
  message,
5780
5776
  strings,
@@ -5787,17 +5783,17 @@ function MessageBubble({
5787
5783
  tool,
5788
5784
  onRetry
5789
5785
  }) {
5790
- const parts = useComputed5(() => message.partsSig.value);
5786
+ const parts = useComputed6(() => message.partsSig.value);
5791
5787
  const partList = parts.value;
5792
- const emptyReply = useComputed5(() => isEmptyAssistantReply(message));
5793
- const hideCanceledHusk = useComputed5(() => isHiddenCanceledTurn(message));
5794
- const hasAnswerText = useComputed5(
5788
+ const emptyReply = useComputed6(() => isEmptyAssistantReply(message));
5789
+ const hideCanceledHusk = useComputed6(() => isHiddenCanceledTurn(message));
5790
+ const hasAnswerText = useComputed6(
5795
5791
  () => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
5796
5792
  );
5797
- const reasoningVisible = useComputed5(
5793
+ const reasoningVisible = useComputed6(
5798
5794
  () => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
5799
5795
  );
5800
- const lastOutputIdx = useComputed5(() => {
5796
+ const lastOutputIdx = useComputed6(() => {
5801
5797
  const list = message.partsSig.value;
5802
5798
  let idx = -1;
5803
5799
  for (let i = 0; i < list.length; i++) {
@@ -5812,8 +5808,8 @@ function MessageBubble({
5812
5808
  const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
5813
5809
  if (hideCanceledHusk.value) return null;
5814
5810
  const stamp = formatStamp(message.createdAt);
5815
- return /* @__PURE__ */ jsx18("div", { class: `${p17}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
5816
- /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
5811
+ return /* @__PURE__ */ jsx18("div", { class: `${p16}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble-col`, children: [
5812
+ /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble`, children: [
5817
5813
  bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx18(
5818
5814
  PartView,
5819
5815
  {
@@ -5830,12 +5826,12 @@ function MessageBubble({
5830
5826
  partKey(part)
5831
5827
  )),
5832
5828
  showStreamDots && /* @__PURE__ */ jsx18(TypingDots, {}),
5833
- message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
5829
+ message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs14("div", { class: `${p16}-error`, role: "alert", children: [
5834
5830
  /* @__PURE__ */ jsx18("span", { children: message.errorText ?? strings.errorGeneric }),
5835
- onRetry ? /* @__PURE__ */ jsx18("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
5831
+ onRetry ? /* @__PURE__ */ jsx18("button", { type: "button", class: `${p16}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
5836
5832
  ] }) : null
5837
5833
  ] }),
5838
- stamp ? /* @__PURE__ */ jsx18("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5834
+ stamp ? /* @__PURE__ */ jsx18("time", { class: `${p16}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5839
5835
  ] }) });
5840
5836
  }
5841
5837
  function formatStamp(createdAt) {
@@ -5898,7 +5894,7 @@ function ToolPartView({
5898
5894
  superseded,
5899
5895
  tool
5900
5896
  }) {
5901
- const hasApproval = useComputed5(() => part.approvalSig.value !== void 0);
5897
+ const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
5902
5898
  if (tool?.humanInLoop) {
5903
5899
  if (isAskUserQuestionsTool(part.toolName)) {
5904
5900
  return /* @__PURE__ */ jsx18(
@@ -5934,9 +5930,9 @@ function ReasoningView({
5934
5930
  active,
5935
5931
  strings
5936
5932
  }) {
5937
- return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5938
- /* @__PURE__ */ jsx18("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx18("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5939
- /* @__PURE__ */ jsx18("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx18(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5933
+ return /* @__PURE__ */ jsxs14("details", { class: `${p16}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5934
+ /* @__PURE__ */ jsx18("summary", { class: `${p16}-reasoning-summary`, children: /* @__PURE__ */ jsx18("span", { class: `${p16}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5935
+ /* @__PURE__ */ jsx18("div", { class: `${p16}-reasoning-body`, children: /* @__PURE__ */ jsx18(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5940
5936
  ] });
5941
5937
  }
5942
5938
  function partKey(part) {
@@ -5954,22 +5950,22 @@ function partKey(part) {
5954
5950
  }
5955
5951
  }
5956
5952
  function TypingDots() {
5957
- return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
5953
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-typing`, "aria-hidden": "true", children: [
5958
5954
  /* @__PURE__ */ jsx18("span", {}),
5959
5955
  /* @__PURE__ */ jsx18("span", {}),
5960
5956
  /* @__PURE__ */ jsx18("span", {})
5961
5957
  ] });
5962
5958
  }
5963
5959
  function LoadingSpinner({ label }) {
5964
- return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
5965
- /* @__PURE__ */ jsx18("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
5966
- /* @__PURE__ */ jsx18("span", { class: `${p17}-loading-label`, children: label })
5960
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-loading`, role: "status", children: [
5961
+ /* @__PURE__ */ jsx18("span", { class: `${p16}-loading-spinner`, "aria-hidden": "true" }),
5962
+ /* @__PURE__ */ jsx18("span", { class: `${p16}-loading-label`, children: label })
5967
5963
  ] });
5968
5964
  }
5969
5965
 
5970
5966
  // src/ui/message-list.tsx
5971
- import { jsx as jsx19, jsxs as jsxs16 } from "preact/jsx-runtime";
5972
- var p18 = BRAND.cssPrefix;
5967
+ import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
5968
+ var p17 = BRAND.cssPrefix;
5973
5969
  var STICK_THRESHOLD = 120;
5974
5970
  var INTERACTION_GRACE_MS = 350;
5975
5971
  function MessageList({
@@ -5988,7 +5984,7 @@ function MessageList({
5988
5984
  onFillForm
5989
5985
  }) {
5990
5986
  const ref = useRef5(null);
5991
- const messages = useComputed6(() => messagesSig.value);
5987
+ const messages = useComputed7(() => messagesSig.value);
5992
5988
  const [showJump, setShowJump] = useState6(false);
5993
5989
  const hasHydratedRef = useRef5(false);
5994
5990
  const detachedRef = useRef5(false);
@@ -6206,7 +6202,7 @@ function MessageList({
6206
6202
  const day = dayKey(m.createdAt);
6207
6203
  if (day && day !== prevDay) {
6208
6204
  rows.push(
6209
- /* @__PURE__ */ jsx19("div", { class: `${p18}-date-divider`, children: /* @__PURE__ */ jsx19("span", { class: `${p18}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
6205
+ /* @__PURE__ */ jsx19("div", { class: `${p17}-date-divider`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
6210
6206
  );
6211
6207
  prevDay = day;
6212
6208
  }
@@ -6232,9 +6228,9 @@ function MessageList({
6232
6228
  for (const marker of pendingMarkers) {
6233
6229
  rows.push(markerRow(marker));
6234
6230
  }
6235
- return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
6236
- /* @__PURE__ */ jsxs16("div", { ref, class: `${p18}-list`, role: "log", "aria-live": "polite", "aria-relevant": "additions text", children: [
6237
- loading && messages.value.length === 0 ? /* @__PURE__ */ jsx19("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
6231
+ return /* @__PURE__ */ jsxs15("div", { class: `${p17}-list-wrap`, children: [
6232
+ /* @__PURE__ */ jsxs15("div", { ref, class: `${p17}-list`, role: "log", "aria-live": "polite", "aria-relevant": "additions text", children: [
6233
+ loading && messages.value.length === 0 ? /* @__PURE__ */ jsx19("div", { class: `${p17}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
6238
6234
  rows,
6239
6235
  form && !inlineForm ? /* @__PURE__ */ jsx19(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
6240
6236
  ] }),
@@ -6242,7 +6238,7 @@ function MessageList({
6242
6238
  "button",
6243
6239
  {
6244
6240
  type: "button",
6245
- class: `${p18}-jump`,
6241
+ class: `${p17}-jump`,
6246
6242
  onClick: jumpToBottom,
6247
6243
  "aria-label": strings.scrollToBottom,
6248
6244
  title: strings.scrollToBottom,
@@ -6306,7 +6302,7 @@ function startOfDay(ms) {
6306
6302
  }
6307
6303
 
6308
6304
  // src/ui/conversation-list.tsx
6309
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs17 } from "preact/jsx-runtime";
6305
+ import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
6310
6306
  var log11 = logger.scope("history");
6311
6307
  var DEFAULT_SKELETON_ROWS = 3;
6312
6308
  var MAX_SKELETON_ROWS = 6;
@@ -6333,7 +6329,7 @@ function ConversationList({
6333
6329
  onSelect,
6334
6330
  onNewConversation
6335
6331
  }) {
6336
- const p36 = BRAND.cssPrefix;
6332
+ const p35 = BRAND.cssPrefix;
6337
6333
  const seed = transport.peekConversations({ visitorId });
6338
6334
  const [state, setState] = useState7(seed ? "loaded" : "loading");
6339
6335
  const [conversations, setChats] = useState7(seed?.conversations ?? []);
@@ -6354,11 +6350,11 @@ function ConversationList({
6354
6350
  cancelled = true;
6355
6351
  };
6356
6352
  }, [transport, visitorId, persistence]);
6357
- const newChatButton = onNewConversation ? /* @__PURE__ */ jsx20("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
6353
+ const newChatButton = onNewConversation ? /* @__PURE__ */ jsx20("div", { class: `${p35}-history-footer`, children: /* @__PURE__ */ jsxs16(
6358
6354
  "button",
6359
6355
  {
6360
6356
  type: "button",
6361
- class: `${p36}-history-new`,
6357
+ class: `${p35}-history-new`,
6362
6358
  onClick: onNewConversation,
6363
6359
  "data-testid": TID.sidebarNewConversation,
6364
6360
  children: [
@@ -6369,17 +6365,17 @@ function ConversationList({
6369
6365
  ) }) : null;
6370
6366
  if (state === "loading") {
6371
6367
  const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
6372
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6373
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, "aria-hidden": "true", children: [
6374
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
6375
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-card`, children: Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-item ${p36}-history-item-skeleton`, children: [
6376
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
6377
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
6378
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6379
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
6380
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
6368
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6369
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, "aria-hidden": "true", children: [
6370
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-heading`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-heading` }) }),
6371
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-card`, children: Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-item ${p35}-history-item-skeleton`, children: [
6372
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-avatar ${p35}-skeleton` }),
6373
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
6374
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6375
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-title`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-title` }) }),
6376
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-time`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-time` }) })
6381
6377
  ] }),
6382
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-row`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-history-preview`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-preview` }) }) })
6378
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-row`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-history-preview`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-preview` }) }) })
6383
6379
  ] })
6384
6380
  ] }, i)) })
6385
6381
  ] }) }),
@@ -6387,36 +6383,36 @@ function ConversationList({
6387
6383
  ] });
6388
6384
  }
6389
6385
  if (state === "error" || conversations.length === 0) {
6390
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6391
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
6386
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6387
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-empty`, children: strings.historyEmpty }),
6392
6388
  newChatButton
6393
6389
  ] });
6394
6390
  }
6395
6391
  const now = Date.now();
6396
6392
  const groups = groupByBucket(now, conversations);
6397
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6398
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
6399
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
6400
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
6393
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6394
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, children: [
6395
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
6396
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs16(
6401
6397
  "button",
6402
6398
  {
6403
6399
  type: "button",
6404
6400
  role: "listitem",
6405
- class: `${p36}-history-item`,
6401
+ class: `${p35}-history-item`,
6406
6402
  onClick: () => onSelect(chat),
6407
6403
  "data-closed": chat.canContinue ? void 0 : "true",
6408
6404
  "data-unread": (chat.unreadCount ?? 0) > 0 ? "true" : void 0,
6409
6405
  "data-testid": tid(TID.historyItem, chat.conversationId),
6410
6406
  children: [
6411
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx20(MessageIcon, {}) }),
6412
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
6413
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6414
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-title`, children: chat.title }),
6415
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
6407
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx20(MessageIcon, {}) }),
6408
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
6409
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6410
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-title`, children: chat.title }),
6411
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
6416
6412
  ] }),
6417
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6418
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
6419
- (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p36}-history-dot` }) : null
6413
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6414
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
6415
+ (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p35}-history-dot` }) : null
6420
6416
  ] })
6421
6417
  ] })
6422
6418
  ]
@@ -6430,14 +6426,14 @@ function ConversationList({
6430
6426
 
6431
6427
  // src/ui/suggestions.tsx
6432
6428
  import { jsx as jsx21 } from "preact/jsx-runtime";
6433
- var p19 = BRAND.cssPrefix;
6429
+ var p18 = BRAND.cssPrefix;
6434
6430
  function Suggestions({ suggestions, onPick }) {
6435
6431
  if (suggestions.length === 0) return null;
6436
- return /* @__PURE__ */ jsx21("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx21(
6432
+ return /* @__PURE__ */ jsx21("div", { class: `${p18}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx21(
6437
6433
  "button",
6438
6434
  {
6439
6435
  type: "button",
6440
- class: `${p19}-suggestion`,
6436
+ class: `${p18}-suggestion`,
6441
6437
  onClick: () => onPick(s),
6442
6438
  "data-testid": tid(TID.suggestion, i),
6443
6439
  children: s.label
@@ -6447,8 +6443,8 @@ function Suggestions({ suggestions, onPick }) {
6447
6443
  }
6448
6444
 
6449
6445
  // src/ui/panel.tsx
6450
- import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
6451
- var p20 = BRAND.cssPrefix;
6446
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs17 } from "preact/jsx-runtime";
6447
+ var p19 = BRAND.cssPrefix;
6452
6448
  function Panel(props2) {
6453
6449
  const { options, onClose } = props2;
6454
6450
  const s = options.strings;
@@ -6472,11 +6468,11 @@ function Panel(props2) {
6472
6468
  }, []);
6473
6469
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
6474
6470
  useDragMove(containerRef.current, options.mode === "modal");
6475
- return /* @__PURE__ */ jsxs18(
6471
+ return /* @__PURE__ */ jsxs17(
6476
6472
  "div",
6477
6473
  {
6478
6474
  ref: containerRef,
6479
- class: `${p20}-panel`,
6475
+ class: `${p19}-panel`,
6480
6476
  role: "dialog",
6481
6477
  "aria-modal": "false",
6482
6478
  "aria-label": s.panelTitle,
@@ -6540,7 +6536,7 @@ function PanelContent(props2) {
6540
6536
  if (activeForm) {
6541
6537
  composerArea = null;
6542
6538
  } else if (canSend) {
6543
- composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
6539
+ composerArea = /* @__PURE__ */ jsxs17(Fragment6, { children: [
6544
6540
  /* @__PURE__ */ jsx22(Suggestions, { suggestions, onPick: onSuggestion }),
6545
6541
  /* @__PURE__ */ jsx22(
6546
6542
  Composer,
@@ -6559,7 +6555,7 @@ function PanelContent(props2) {
6559
6555
  } else {
6560
6556
  composerArea = /* @__PURE__ */ jsx22(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
6561
6557
  }
6562
- return /* @__PURE__ */ jsxs18(Fragment6, { children: [
6558
+ return /* @__PURE__ */ jsxs17(Fragment6, { children: [
6563
6559
  view === "history" ? /* @__PURE__ */ jsx22(
6564
6560
  HistoryHeader,
6565
6561
  {
@@ -6568,12 +6564,12 @@ function PanelContent(props2) {
6568
6564
  onClose,
6569
6565
  showClose: canShowClose(options.mode, panelSize, options.actions)
6570
6566
  }
6571
- ) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
6567
+ ) : /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, "data-testid": TID.panelHeader, children: [
6572
6568
  onBack ? /* @__PURE__ */ jsx22(
6573
6569
  "button",
6574
6570
  {
6575
6571
  type: "button",
6576
- class: `${p20}-icon-btn`,
6572
+ class: `${p19}-icon-btn`,
6577
6573
  onClick: onBack,
6578
6574
  "aria-label": s.moduleBack,
6579
6575
  title: s.moduleBack,
@@ -6594,7 +6590,7 @@ function PanelContent(props2) {
6594
6590
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
6595
6591
  onNewConversation
6596
6592
  }
6597
- ) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
6593
+ ) : /* @__PURE__ */ jsxs17(Fragment6, { children: [
6598
6594
  /* @__PURE__ */ jsx22(DropZone, { visible: dragOver, strings: s }),
6599
6595
  /* @__PURE__ */ jsx22(
6600
6596
  MessageList,
@@ -6636,12 +6632,12 @@ function HistoryHeader({
6636
6632
  onClose,
6637
6633
  showClose
6638
6634
  }) {
6639
- return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
6635
+ return /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, children: [
6640
6636
  /* @__PURE__ */ jsx22(
6641
6637
  "button",
6642
6638
  {
6643
6639
  type: "button",
6644
- class: `${p20}-icon-btn`,
6640
+ class: `${p19}-icon-btn`,
6645
6641
  onClick: onBack,
6646
6642
  "aria-label": strings.historyBack,
6647
6643
  title: strings.historyBack,
@@ -6653,7 +6649,7 @@ function HistoryHeader({
6653
6649
  "button",
6654
6650
  {
6655
6651
  type: "button",
6656
- class: `${p20}-icon-btn`,
6652
+ class: `${p19}-icon-btn`,
6657
6653
  onClick: onClose,
6658
6654
  "aria-label": strings.close,
6659
6655
  title: strings.close,
@@ -6667,28 +6663,28 @@ function ReadOnlyBanner({
6667
6663
  ctaLabel,
6668
6664
  onNewConversation
6669
6665
  }) {
6670
- return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
6671
- /* @__PURE__ */ jsx22("span", { class: `${p20}-readonly-label`, children: label }),
6672
- /* @__PURE__ */ jsx22("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
6666
+ return /* @__PURE__ */ jsxs17("div", { class: `${p19}-readonly-banner`, role: "note", children: [
6667
+ /* @__PURE__ */ jsx22("span", { class: `${p19}-readonly-label`, children: label }),
6668
+ /* @__PURE__ */ jsx22("button", { type: "button", class: `${p19}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
6673
6669
  ] });
6674
6670
  }
6675
6671
  function ComposerFooter({ disclaimer }) {
6676
6672
  if (!disclaimer) return null;
6677
- return /* @__PURE__ */ jsx22("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx22("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
6673
+ return /* @__PURE__ */ jsx22("div", { class: `${p19}-composer-footer`, children: /* @__PURE__ */ jsx22("div", { class: `${p19}-disclaimer`, children: disclaimer }) });
6678
6674
  }
6679
6675
  function PoweredByBar({ poweredBy }) {
6680
6676
  if (!poweredBy) return null;
6681
- return /* @__PURE__ */ jsx22("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx22(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
6677
+ return /* @__PURE__ */ jsx22("div", { class: `${p19}-poweredby-bar`, children: /* @__PURE__ */ jsx22(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
6682
6678
  }
6683
6679
  function PoweredBy({ logoUrl, text, href }) {
6684
- const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
6685
- logoUrl ? /* @__PURE__ */ jsx22("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
6680
+ const inner = /* @__PURE__ */ jsxs17(Fragment6, { children: [
6681
+ logoUrl ? /* @__PURE__ */ jsx22("img", { class: `${p19}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
6686
6682
  text ? /* @__PURE__ */ jsx22("span", { children: text }) : null
6687
6683
  ] });
6688
6684
  if (href) {
6689
- return /* @__PURE__ */ jsx22("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
6685
+ return /* @__PURE__ */ jsx22("a", { class: `${p19}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
6690
6686
  }
6691
- return /* @__PURE__ */ jsx22("span", { class: `${p20}-poweredby`, children: inner });
6687
+ return /* @__PURE__ */ jsx22("span", { class: `${p19}-poweredby`, children: inner });
6692
6688
  }
6693
6689
 
6694
6690
  // src/ui/form/form-controller.ts
@@ -6771,21 +6767,21 @@ function whenPasses(form, d) {
6771
6767
  }
6772
6768
 
6773
6769
  // src/ui/sidebar.tsx
6774
- import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6770
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
6775
6771
  function Sidebar(props2) {
6776
- const p36 = BRAND.cssPrefix;
6772
+ const p35 = BRAND.cssPrefix;
6777
6773
  const { site, blocks, strings, collapsed } = props2;
6778
6774
  const navigation = blocks?.navigation ?? [];
6779
6775
  const linkCards = blocks?.linkCards ?? [];
6780
6776
  const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
6781
- return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6782
- /* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
6777
+ return /* @__PURE__ */ jsxs18("aside", { class: `${p35}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6778
+ /* @__PURE__ */ jsxs18("div", { class: `${p35}-sidebar-header`, children: [
6783
6779
  /* @__PURE__ */ jsx23(SidebarBrand, { site }),
6784
6780
  /* @__PURE__ */ jsx23(
6785
6781
  "button",
6786
6782
  {
6787
6783
  type: "button",
6788
- class: `${p36}-sidebar-toggle`,
6784
+ class: `${p35}-sidebar-toggle`,
6789
6785
  "aria-label": toggleLabel,
6790
6786
  "aria-expanded": collapsed ? "false" : "true",
6791
6787
  title: toggleLabel,
@@ -6795,10 +6791,10 @@ function Sidebar(props2) {
6795
6791
  }
6796
6792
  )
6797
6793
  ] }),
6798
- collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
6799
- navigation.length > 0 ? /* @__PURE__ */ jsx23("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx23(SidebarNav, { items: navigation }) }) : null,
6800
- linkCards.length > 0 ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx23(SidebarCards, { items: linkCards }) }) : null,
6801
- props2.showConversations ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx23(
6794
+ collapsed ? null : /* @__PURE__ */ jsxs18(Fragment7, { children: [
6795
+ navigation.length > 0 ? /* @__PURE__ */ jsx23("nav", { class: `${p35}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx23(SidebarNav, { items: navigation }) }) : null,
6796
+ linkCards.length > 0 ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx23(SidebarCards, { items: linkCards }) }) : null,
6797
+ props2.showConversations ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-conversations`, children: /* @__PURE__ */ jsx23(
6802
6798
  ConversationList,
6803
6799
  {
6804
6800
  transport: props2.transport,
@@ -6814,15 +6810,15 @@ function Sidebar(props2) {
6814
6810
  ] });
6815
6811
  }
6816
6812
  function SidebarBrand({ site }) {
6817
- const p36 = BRAND.cssPrefix;
6813
+ const p35 = BRAND.cssPrefix;
6818
6814
  if (site?.logo?.url) {
6819
6815
  const alt = site.logo.alt ?? site.title ?? "Logo";
6820
- return /* @__PURE__ */ jsxs19("picture", { children: [
6816
+ return /* @__PURE__ */ jsxs18("picture", { children: [
6821
6817
  site.logoDark?.url ? /* @__PURE__ */ jsx23("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
6822
- /* @__PURE__ */ jsx23("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
6818
+ /* @__PURE__ */ jsx23("img", { class: `${p35}-sidebar-logo`, src: site.logo.url, alt })
6823
6819
  ] });
6824
6820
  }
6825
- return /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
6821
+ return /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-title`, children: site?.title ?? BRAND.name });
6826
6822
  }
6827
6823
  function SidebarToggleIcon({ collapsed }) {
6828
6824
  return /* @__PURE__ */ jsx23(
@@ -6840,33 +6836,33 @@ function SidebarToggleIcon({ collapsed }) {
6840
6836
  );
6841
6837
  }
6842
6838
  function SidebarNav({ items }) {
6843
- const p36 = BRAND.cssPrefix;
6844
- return /* @__PURE__ */ jsx23("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsxs19(
6839
+ const p35 = BRAND.cssPrefix;
6840
+ return /* @__PURE__ */ jsx23("ul", { class: `${p35}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsxs18(
6845
6841
  "a",
6846
6842
  {
6847
- class: `${p36}-sidebar-nav-item`,
6843
+ class: `${p35}-sidebar-nav-item`,
6848
6844
  href: item.href,
6849
6845
  target: item.href ? "_blank" : void 0,
6850
6846
  rel: item.href ? "noreferrer" : void 0,
6851
6847
  children: [
6852
- item.icon ? /* @__PURE__ */ jsx23("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6853
- /* @__PURE__ */ jsx23("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
6848
+ item.icon ? /* @__PURE__ */ jsx23("span", { class: `${p35}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6849
+ /* @__PURE__ */ jsx23("span", { class: `${p35}-sidebar-nav-label`, children: item.label })
6854
6850
  ]
6855
6851
  }
6856
6852
  ) }, item.id ?? item.label)) });
6857
6853
  }
6858
6854
  function SidebarCards({ items }) {
6859
- const p36 = BRAND.cssPrefix;
6860
- return /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
6855
+ const p35 = BRAND.cssPrefix;
6856
+ return /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs18(
6861
6857
  "a",
6862
6858
  {
6863
- class: `${p36}-sidebar-card`,
6859
+ class: `${p35}-sidebar-card`,
6864
6860
  href: item.href,
6865
6861
  target: item.href ? "_blank" : void 0,
6866
6862
  rel: item.href ? "noreferrer" : void 0,
6867
6863
  children: [
6868
- /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
6869
- item.description ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
6864
+ /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-card-label`, children: item.label }),
6865
+ item.description ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-card-desc`, children: item.description }) : null
6870
6866
  ]
6871
6867
  },
6872
6868
  item.id ?? item.label
@@ -6874,10 +6870,10 @@ function SidebarCards({ items }) {
6874
6870
  }
6875
6871
 
6876
6872
  // src/ui/page-shell.tsx
6877
- import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6878
- var p21 = BRAND.cssPrefix;
6873
+ import { jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
6874
+ var p20 = BRAND.cssPrefix;
6879
6875
  function PageShell(props2) {
6880
- return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6876
+ return /* @__PURE__ */ jsxs19("main", { class: `${p20}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6881
6877
  /* @__PURE__ */ jsx24(
6882
6878
  Sidebar,
6883
6879
  {
@@ -6895,7 +6891,7 @@ function PageShell(props2) {
6895
6891
  onToggleCollapsed: props2.onToggleSidebarCollapsed
6896
6892
  }
6897
6893
  ),
6898
- /* @__PURE__ */ jsx24("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
6894
+ /* @__PURE__ */ jsx24("section", { class: `${p20}-page-chat`, "aria-label": "Chat", children: props2.children })
6899
6895
  ] });
6900
6896
  }
6901
6897
 
@@ -6933,7 +6929,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
6933
6929
 
6934
6930
  // src/ui/messenger-home.tsx
6935
6931
  import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
6936
- import { useComputed as useComputed7 } from "@preact/signals";
6932
+ import { useComputed as useComputed8 } from "@preact/signals";
6937
6933
 
6938
6934
  // src/ui/modules/chat.tsx
6939
6935
  var chatLayout = {
@@ -6945,80 +6941,80 @@ var chatLayout = {
6945
6941
  import { useEffect as useEffect10, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
6946
6942
 
6947
6943
  // src/ui/back-header.tsx
6948
- import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6949
- var p22 = BRAND.cssPrefix;
6944
+ import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
6945
+ var p21 = BRAND.cssPrefix;
6950
6946
  function TitleBar({ title, actions }) {
6951
- return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
6952
- /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
6953
- /* @__PURE__ */ jsx25("h1", { class: `${p22}-back-title`, children: title }),
6954
- actions ?? /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
6947
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-variant": "title", children: [
6948
+ /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" }),
6949
+ /* @__PURE__ */ jsx25("h1", { class: `${p21}-back-title`, children: title }),
6950
+ actions ?? /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6955
6951
  ] });
6956
6952
  }
6957
6953
  function BackHeader({ title, backLabel, onBack, actions, testid }) {
6958
- return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
6959
- /* @__PURE__ */ jsx25("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx25(BackIcon, {}) }),
6960
- /* @__PURE__ */ jsx25("h1", { class: `${p22}-back-title`, children: title }),
6961
- actions ?? /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
6954
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-testid": testid, children: [
6955
+ /* @__PURE__ */ jsx25("button", { type: "button", class: `${p21}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx25(BackIcon, {}) }),
6956
+ /* @__PURE__ */ jsx25("h1", { class: `${p21}-back-title`, children: title }),
6957
+ actions ?? /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6962
6958
  ] });
6963
6959
  }
6964
6960
 
6965
6961
  // src/ui/home-search.tsx
6966
- import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
6967
- var p23 = BRAND.cssPrefix;
6962
+ import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
6963
+ var p22 = BRAND.cssPrefix;
6968
6964
  function HomeSearchButton({ placeholder, onActivate }) {
6969
- return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6970
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-text`, children: placeholder }),
6971
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
6965
+ return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p22}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6966
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-text`, children: placeholder }),
6967
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
6972
6968
  ] });
6973
6969
  }
6974
6970
  function HelpSearchInput({ placeholder, value, onInput }) {
6975
- return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
6971
+ return /* @__PURE__ */ jsxs21("div", { class: `${p22}-home-search`, "data-input": "true", children: [
6976
6972
  /* @__PURE__ */ jsx26(
6977
6973
  "input",
6978
6974
  {
6979
6975
  type: "search",
6980
- class: `${p23}-home-search-input`,
6976
+ class: `${p22}-home-search-input`,
6981
6977
  placeholder,
6982
6978
  value,
6983
6979
  onInput: (e) => onInput(e.currentTarget.value),
6984
6980
  "data-testid": TID.helpSearch
6985
6981
  }
6986
6982
  ),
6987
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
6983
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
6988
6984
  ] });
6989
6985
  }
6990
6986
 
6991
6987
  // src/ui/list-row.tsx
6992
- import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
6993
- var p24 = BRAND.cssPrefix;
6988
+ import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
6989
+ var p23 = BRAND.cssPrefix;
6994
6990
  function ListRow({ title, subtitle, onClick, testid }) {
6995
- return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
6996
- /* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
6997
- /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-title`, children: title }),
6998
- subtitle ? /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
6991
+ return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-list-row`, onClick, "data-testid": testid, children: [
6992
+ /* @__PURE__ */ jsxs22("span", { class: `${p23}-list-row-body`, children: [
6993
+ /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-title`, children: title }),
6994
+ subtitle ? /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-sub`, children: subtitle }) : null
6999
6995
  ] }),
7000
- /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(ChevronRightIcon, {}) })
6996
+ /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(ChevronRightIcon, {}) })
7001
6997
  ] });
7002
6998
  }
7003
6999
 
7004
7000
  // src/ui/module-state.tsx
7005
- import { jsx as jsx28, jsxs as jsxs24 } from "preact/jsx-runtime";
7006
- var p25 = BRAND.cssPrefix;
7001
+ import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
7002
+ var p24 = BRAND.cssPrefix;
7007
7003
  function ModuleState({
7008
7004
  tone = "info",
7009
7005
  message,
7010
7006
  onRetry,
7011
7007
  strings
7012
7008
  }) {
7013
- return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
7009
+ return /* @__PURE__ */ jsxs23("div", { class: `${p24}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
7014
7010
  /* @__PURE__ */ jsx28("span", { children: message }),
7015
- onRetry ? /* @__PURE__ */ jsx28("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
7011
+ onRetry ? /* @__PURE__ */ jsx28("button", { type: "button", class: `${p24}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
7016
7012
  ] });
7017
7013
  }
7018
7014
 
7019
7015
  // src/ui/modules/help.tsx
7020
- import { jsx as jsx29, jsxs as jsxs25 } from "preact/jsx-runtime";
7021
- var p26 = BRAND.cssPrefix;
7016
+ import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
7017
+ var p25 = BRAND.cssPrefix;
7022
7018
  var log12 = logger.scope("help");
7023
7019
  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 });
7024
7020
  function groupByCategory(items) {
@@ -7093,22 +7089,22 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
7093
7089
  function renderBody() {
7094
7090
  if (query.trim().length > 0) {
7095
7091
  if (results.length === 0) return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpSearchEmpty, strings });
7096
- return /* @__PURE__ */ jsx29("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) });
7092
+ return /* @__PURE__ */ jsx29("div", { class: `${p25}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) });
7097
7093
  }
7098
7094
  if (state === "loading") return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpLoading, strings });
7099
7095
  if (state === "error") {
7100
7096
  return /* @__PURE__ */ jsx29(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
7101
7097
  }
7102
7098
  if (items.length === 0) return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpEmpty, strings });
7103
- return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
7104
- category ? /* @__PURE__ */ jsx29("h2", { class: `${p26}-help-section-title`, children: category }) : null,
7105
- /* @__PURE__ */ jsx29("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) })
7099
+ return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs24("section", { class: `${p25}-help-group`, children: [
7100
+ category ? /* @__PURE__ */ jsx29("h2", { class: `${p25}-help-section-title`, children: category }) : null,
7101
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) })
7106
7102
  ] }, category));
7107
7103
  }
7108
- return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
7104
+ return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module`, children: [
7109
7105
  /* @__PURE__ */ jsx29(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx29(HeaderActions, { panelProps, variant: "plain" }) }),
7110
- /* @__PURE__ */ jsx29("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx29(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
7111
- /* @__PURE__ */ jsx29("div", { class: `${p26}-help-list`, children: renderBody() })
7106
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-module-pad`, children: /* @__PURE__ */ jsx29(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
7107
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-help-list`, children: renderBody() })
7112
7108
  ] });
7113
7109
  }
7114
7110
  var helpLayout = {
@@ -7121,17 +7117,17 @@ import { useEffect as useEffect11, useState as useState9 } from "preact/hooks";
7121
7117
 
7122
7118
  // src/ui/home-card.tsx
7123
7119
  import { jsx as jsx30 } from "preact/jsx-runtime";
7124
- var p27 = BRAND.cssPrefix;
7120
+ var p26 = BRAND.cssPrefix;
7125
7121
  function HomeCard({ onClick, children, testid }) {
7126
7122
  if (onClick) {
7127
- return /* @__PURE__ */ jsx30("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
7123
+ return /* @__PURE__ */ jsx30("button", { type: "button", class: `${p26}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
7128
7124
  }
7129
- return /* @__PURE__ */ jsx30("div", { class: `${p27}-home-card`, "data-testid": testid, children });
7125
+ return /* @__PURE__ */ jsx30("div", { class: `${p26}-home-card`, "data-testid": testid, children });
7130
7126
  }
7131
7127
 
7132
7128
  // src/ui/modules/home.tsx
7133
- import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
7134
- var p28 = BRAND.cssPrefix;
7129
+ import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs25 } from "preact/jsx-runtime";
7130
+ var p27 = BRAND.cssPrefix;
7135
7131
  var log13 = logger.scope("home");
7136
7132
  function resolveGreeting(props2) {
7137
7133
  const name = props2.options.userContext?.name;
@@ -7174,21 +7170,21 @@ function HomeRoot(props2) {
7174
7170
  const status = config.status;
7175
7171
  const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
7176
7172
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
7177
- return /* @__PURE__ */ jsx31("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
7178
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
7179
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
7180
- config.brandName ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx31("span", { class: `${p28}-home-brand-spacer`, "aria-hidden": "true" }),
7181
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
7182
- avatars.length > 0 ? /* @__PURE__ */ jsx31("div", { class: `${p28}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx31("span", { class: `${p28}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx31("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx31("span", { children: initials(a.name) }) }, a.name)) }) : null,
7173
+ return /* @__PURE__ */ jsx31("div", { class: `${p27}-module ${p27}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-scroll`, children: [
7174
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero`, children: [
7175
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-top`, children: [
7176
+ config.brandName ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx31("span", { class: `${p27}-home-brand-spacer`, "aria-hidden": "true" }),
7177
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-actions`, children: [
7178
+ avatars.length > 0 ? /* @__PURE__ */ jsx31("div", { class: `${p27}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx31("span", { class: `${p27}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx31("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx31("span", { children: initials(a.name) }) }, a.name)) }) : null,
7183
7179
  /* @__PURE__ */ jsx31(HeaderActions, { panelProps, variant: "plain" })
7184
7180
  ] })
7185
7181
  ] }),
7186
- config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
7187
- /* @__PURE__ */ jsx31("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7188
- greeting.subtitle ? /* @__PURE__ */ jsx31("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
7182
+ config.showGreeting !== false ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
7183
+ /* @__PURE__ */ jsx31("h1", { class: `${p27}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7184
+ greeting.subtitle ? /* @__PURE__ */ jsx31("p", { class: `${p27}-home-lead`, children: greeting.subtitle }) : null
7189
7185
  ] }) : null
7190
7186
  ] }),
7191
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
7187
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-cards`, children: [
7192
7188
  config.showSearchBar !== false ? /* @__PURE__ */ jsx31(
7193
7189
  HomeSearchButton,
7194
7190
  {
@@ -7196,27 +7192,27 @@ function HomeRoot(props2) {
7196
7192
  onActivate: () => nav.switchToLayout("help")
7197
7193
  }
7198
7194
  ) : null,
7199
- recent ? /* @__PURE__ */ jsx31(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
7200
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(BubblesIcon, {}) }),
7201
- /* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
7202
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-title`, children: recent.title }),
7203
- recent.preview ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
7195
+ recent ? /* @__PURE__ */ jsx31(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
7196
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(BubblesIcon, {}) }),
7197
+ /* @__PURE__ */ jsxs25("span", { class: `${p27}-home-recent-body`, children: [
7198
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-title`, children: recent.title }),
7199
+ recent.preview ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-preview`, children: recent.preview }) : null
7204
7200
  ] }),
7205
- (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
7201
+ (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-dot`, "aria-label": "Unread" }) : null
7206
7202
  ] }) }) : null,
7207
7203
  status ? /* @__PURE__ */ jsx31(
7208
7204
  HomeCard,
7209
7205
  {
7210
7206
  onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
7211
- children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
7212
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(StatusOkIcon, {}) }),
7213
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-status-text`, children: statusText })
7207
+ children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-status`, "data-level": status.level ?? "operational", children: [
7208
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(StatusOkIcon, {}) }),
7209
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-status-text`, children: statusText })
7214
7210
  ] })
7215
7211
  }
7216
7212
  ) : null,
7217
- content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
7218
- /* @__PURE__ */ jsx31("div", { class: `${p28}-home-content-title`, children: contentTitle }),
7219
- /* @__PURE__ */ jsx31("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx31(
7213
+ content.length > 0 ? /* @__PURE__ */ jsxs25("section", { class: `${p27}-home-content`, children: [
7214
+ /* @__PURE__ */ jsx31("div", { class: `${p27}-home-content-title`, children: contentTitle }),
7215
+ /* @__PURE__ */ jsx31("div", { class: `${p27}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx31(
7220
7216
  ListRow,
7221
7217
  {
7222
7218
  title: item.title,
@@ -7237,8 +7233,8 @@ var homeLayout = {
7237
7233
 
7238
7234
  // src/ui/modules/news.tsx
7239
7235
  import { useEffect as useEffect12, useState as useState10 } from "preact/hooks";
7240
- import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
7241
- var p29 = BRAND.cssPrefix;
7236
+ import { jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
7237
+ var p28 = BRAND.cssPrefix;
7242
7238
  var log14 = logger.scope("news");
7243
7239
  function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
7244
7240
  const tags = config.contentTags;
@@ -7271,27 +7267,27 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
7271
7267
  return /* @__PURE__ */ jsx32(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
7272
7268
  }
7273
7269
  if (items.length === 0) return /* @__PURE__ */ jsx32(ModuleState, { message: strings.newsEmpty, strings });
7274
- return /* @__PURE__ */ jsx32("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
7270
+ return /* @__PURE__ */ jsx32("div", { class: `${p28}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs26(
7275
7271
  "button",
7276
7272
  {
7277
7273
  type: "button",
7278
- class: `${p29}-news-card`,
7274
+ class: `${p28}-news-card`,
7279
7275
  onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
7280
7276
  "data-testid": tid(TID.newsItem, item.id),
7281
7277
  children: [
7282
- item.image ? /* @__PURE__ */ jsx32("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7283
- /* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
7284
- /* @__PURE__ */ jsx32("span", { class: `${p29}-news-title`, children: item.title }),
7285
- item.description ? /* @__PURE__ */ jsx32("span", { class: `${p29}-news-summary`, children: item.description }) : null
7278
+ item.image ? /* @__PURE__ */ jsx32("img", { class: `${p28}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7279
+ /* @__PURE__ */ jsxs26("span", { class: `${p28}-news-body`, children: [
7280
+ /* @__PURE__ */ jsx32("span", { class: `${p28}-news-title`, children: item.title }),
7281
+ item.description ? /* @__PURE__ */ jsx32("span", { class: `${p28}-news-summary`, children: item.description }) : null
7286
7282
  ] })
7287
7283
  ]
7288
7284
  },
7289
7285
  item.id
7290
7286
  )) });
7291
7287
  }
7292
- return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
7288
+ return /* @__PURE__ */ jsxs26("div", { class: `${p28}-module`, children: [
7293
7289
  /* @__PURE__ */ jsx32(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" }) }),
7294
- /* @__PURE__ */ jsx32("div", { class: `${p29}-module-scroll`, children: renderBody() })
7290
+ /* @__PURE__ */ jsx32("div", { class: `${p28}-module-scroll`, children: renderBody() })
7295
7291
  ] });
7296
7292
  }
7297
7293
  var newsLayout = {
@@ -7308,28 +7304,28 @@ var LAYOUTS = {
7308
7304
  };
7309
7305
 
7310
7306
  // src/ui/home-tab-bar.tsx
7311
- import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
7312
- var p30 = BRAND.cssPrefix;
7307
+ import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
7308
+ var p29 = BRAND.cssPrefix;
7313
7309
  function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
7314
- return /* @__PURE__ */ jsx33("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
7310
+ return /* @__PURE__ */ jsx33("nav", { class: `${p29}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
7315
7311
  const Icon = LAYOUTS[m.layout].Icon;
7316
7312
  const selected = m.id === activeTab;
7317
7313
  const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
7318
- return /* @__PURE__ */ jsxs28(
7314
+ return /* @__PURE__ */ jsxs27(
7319
7315
  "button",
7320
7316
  {
7321
7317
  type: "button",
7322
7318
  role: "tab",
7323
7319
  "aria-selected": selected,
7324
- class: `${p30}-tab`,
7320
+ class: `${p29}-tab`,
7325
7321
  onClick: () => onSelect(m.id),
7326
7322
  "data-testid": tid(TID.tab, m.id),
7327
7323
  children: [
7328
- /* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
7324
+ /* @__PURE__ */ jsxs27("span", { class: `${p29}-tab-icon`, "aria-hidden": "true", children: [
7329
7325
  /* @__PURE__ */ jsx33(Icon, {}),
7330
- badge ? /* @__PURE__ */ jsx33("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
7326
+ badge ? /* @__PURE__ */ jsx33("span", { class: `${p29}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
7331
7327
  ] }),
7332
- /* @__PURE__ */ jsx33("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
7328
+ /* @__PURE__ */ jsx33("span", { class: `${p29}-tab-label`, children: localizeText(strings, m.label) })
7333
7329
  ]
7334
7330
  },
7335
7331
  m.id
@@ -7338,11 +7334,11 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
7338
7334
  }
7339
7335
 
7340
7336
  // src/ui/iframe-view.tsx
7341
- import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
7342
- var p31 = BRAND.cssPrefix;
7337
+ import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
7338
+ var p30 = BRAND.cssPrefix;
7343
7339
  var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
7344
7340
  function IframeView({ url, title, strings, onBack, actions }) {
7345
- return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
7341
+ return /* @__PURE__ */ jsxs28("div", { class: `${p30}-module`, children: [
7346
7342
  /* @__PURE__ */ jsx34(
7347
7343
  BackHeader,
7348
7344
  {
@@ -7355,7 +7351,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
7355
7351
  /* @__PURE__ */ jsx34(
7356
7352
  "iframe",
7357
7353
  {
7358
- class: `${p31}-content-frame`,
7354
+ class: `${p30}-content-frame`,
7359
7355
  src: url,
7360
7356
  title: title || "content",
7361
7357
  sandbox: SANDBOX,
@@ -7369,8 +7365,8 @@ function IframeView({ url, title, strings, onBack, actions }) {
7369
7365
 
7370
7366
  // src/ui/content-view.tsx
7371
7367
  import { useCallback as useCallback3, useEffect as useEffect13, useState as useState11 } from "preact/hooks";
7372
- import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
7373
- var p32 = BRAND.cssPrefix;
7368
+ import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
7369
+ var p31 = BRAND.cssPrefix;
7374
7370
  var log15 = logger.scope("content");
7375
7371
  var READ_DWELL_MS = 5e3;
7376
7372
  function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
@@ -7416,13 +7412,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
7416
7412
  function renderBody() {
7417
7413
  if (failed) return /* @__PURE__ */ jsx35(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
7418
7414
  if (item === null) return /* @__PURE__ */ jsx35(ModuleState, { message: strings.contentLoading, strings });
7419
- return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
7420
- item.image ? /* @__PURE__ */ jsx35("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7421
- item.description ? /* @__PURE__ */ jsx35("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
7415
+ return /* @__PURE__ */ jsxs29("article", { class: `${p31}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
7416
+ item.image ? /* @__PURE__ */ jsx35("img", { class: `${p31}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7417
+ item.description ? /* @__PURE__ */ jsx35("p", { class: `${p31}-content-subtitle`, children: item.description }) : null,
7422
7418
  /* @__PURE__ */ jsx35(StaticMarkdown, { text: item.content ?? "" })
7423
7419
  ] });
7424
7420
  }
7425
- return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
7421
+ return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
7426
7422
  /* @__PURE__ */ jsx35(
7427
7423
  BackHeader,
7428
7424
  {
@@ -7433,13 +7429,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
7433
7429
  testid: TID.backHeader
7434
7430
  }
7435
7431
  ),
7436
- /* @__PURE__ */ jsx35("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
7432
+ /* @__PURE__ */ jsx35("div", { class: `${p31}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
7437
7433
  ] });
7438
7434
  }
7439
7435
 
7440
7436
  // src/ui/messenger-home.tsx
7441
- import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
7442
- var p33 = BRAND.cssPrefix;
7437
+ import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
7438
+ var p32 = BRAND.cssPrefix;
7443
7439
  function MessengerHome({
7444
7440
  panelProps,
7445
7441
  enabledModules,
@@ -7473,7 +7469,7 @@ function MessengerHome({
7473
7469
  }, []);
7474
7470
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
7475
7471
  useDragMove(containerRef.current, options.mode === "modal");
7476
- const navState = useComputed7(() => nav.sig.value).value;
7472
+ const navState = useComputed8(() => nav.sig.value).value;
7477
7473
  const top = topScreen(navState);
7478
7474
  const activeModule = options.modules.byId[navState.activeTab];
7479
7475
  const isReader = top?.kind === "iframe" || top?.kind === "content";
@@ -7548,19 +7544,19 @@ function MessengerHome({
7548
7544
  }
7549
7545
  return null;
7550
7546
  };
7551
- return /* @__PURE__ */ jsxs31(
7547
+ return /* @__PURE__ */ jsxs30(
7552
7548
  "div",
7553
7549
  {
7554
7550
  ref: containerRef,
7555
- class: `${p33}-panel ${p33}-messenger`,
7551
+ class: `${p32}-panel ${p32}-messenger`,
7556
7552
  role: "dialog",
7557
7553
  "aria-modal": "false",
7558
7554
  "aria-label": strings.panelTitle,
7559
7555
  style: { position: "relative" },
7560
7556
  "data-testid": TID.messengerHome,
7561
7557
  children: [
7562
- /* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
7563
- visitedTabs.map((m) => /* @__PURE__ */ jsx36("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
7558
+ /* @__PURE__ */ jsxs30("div", { class: `${p32}-messenger-body`, children: [
7559
+ visitedTabs.map((m) => /* @__PURE__ */ jsx36("div", { class: `${p32}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
7564
7560
  renderReader()
7565
7561
  ] }),
7566
7562
  showTabBar ? /* @__PURE__ */ jsx36(
@@ -7591,13 +7587,13 @@ function MessengerHome({
7591
7587
  }
7592
7588
 
7593
7589
  // src/ui/modules-empty.tsx
7594
- import { jsx as jsx37, jsxs as jsxs32 } from "preact/jsx-runtime";
7595
- var p34 = BRAND.cssPrefix;
7590
+ import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
7591
+ var p33 = BRAND.cssPrefix;
7596
7592
  function ModulesEmpty({ strings, onClose }) {
7597
- return /* @__PURE__ */ jsxs32(
7593
+ return /* @__PURE__ */ jsxs31(
7598
7594
  "div",
7599
7595
  {
7600
- class: `${p34}-panel ${p34}-modules-empty`,
7596
+ class: `${p33}-panel ${p33}-modules-empty`,
7601
7597
  role: "dialog",
7602
7598
  "aria-label": strings.panelTitle,
7603
7599
  "data-testid": TID.modulesEmpty,
@@ -7606,14 +7602,14 @@ function ModulesEmpty({ strings, onClose }) {
7606
7602
  "button",
7607
7603
  {
7608
7604
  type: "button",
7609
- class: `${p34}-icon-btn ${p34}-modules-empty-close`,
7605
+ class: `${p33}-icon-btn ${p33}-modules-empty-close`,
7610
7606
  onClick: onClose,
7611
7607
  "aria-label": strings.close,
7612
7608
  title: strings.close,
7613
7609
  children: /* @__PURE__ */ jsx37(CloseIcon, {})
7614
7610
  }
7615
7611
  ) : null,
7616
- /* @__PURE__ */ jsx37("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
7612
+ /* @__PURE__ */ jsx37("p", { class: `${p33}-modules-empty-text`, children: strings.modulesEmpty })
7617
7613
  ]
7618
7614
  }
7619
7615
  );
@@ -7636,9 +7632,9 @@ function useLauncherCallout({ callout, persistence }) {
7636
7632
  }
7637
7633
 
7638
7634
  // src/ui/app.tsx
7639
- import { jsx as jsx38, jsxs as jsxs33 } from "preact/jsx-runtime";
7635
+ import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
7640
7636
  var log16 = logger.scope("app");
7641
- var p35 = BRAND.cssPrefix;
7637
+ var p34 = BRAND.cssPrefix;
7642
7638
  function makeLocalizedWelcome(w, strings) {
7643
7639
  return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
7644
7640
  }
@@ -8243,7 +8239,7 @@ function App({ options, hostElement, bus }) {
8243
8239
  );
8244
8240
  const regenerateDanglingTurn = useCallback6(() => {
8245
8241
  if (streaming || regenInFlightRef.current || resumeBubbleRef.current) return;
8246
- const last = messagesSig.value.filter((m) => !m.ephemeral).at(-1);
8242
+ const last = messagesSig.value.findLast((m) => !m.ephemeral);
8247
8243
  if (last?.role !== "user") return;
8248
8244
  regenInFlightRef.current = true;
8249
8245
  log16.info("regenerating dangling user turn (needs-generation)");
@@ -8361,12 +8357,12 @@ function App({ options, hostElement, bus }) {
8361
8357
  void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
8362
8358
  }
8363
8359
  });
8364
- const activeForm = useComputed8(() => forms.activeForm.value);
8360
+ const activeForm = useComputed9(() => forms.activeForm.value);
8365
8361
  useEffect16(() => {
8366
8362
  forms.refresh();
8367
8363
  }, [effectiveForms, forms]);
8368
8364
  const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
8369
- const msgCount = useComputed8(() => messagesSig.value.length);
8365
+ const msgCount = useComputed9(() => messagesSig.value.length);
8370
8366
  useEffect16(() => {
8371
8367
  if (conversationReady && formsReady) forms.fire("pre-chat");
8372
8368
  }, [conversationReady, formsReady, forms]);
@@ -8724,7 +8720,7 @@ function App({ options, hostElement, bus }) {
8724
8720
  void handleSelectHistoryConversation(chat.conversationId);
8725
8721
  };
8726
8722
  const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
8727
- return /* @__PURE__ */ jsx38("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx38(
8723
+ return /* @__PURE__ */ jsx38("div", { class: `${p34}-anchor`, children: /* @__PURE__ */ jsx38(
8728
8724
  PageShell,
8729
8725
  {
8730
8726
  site: parsedSite,
@@ -8745,14 +8741,14 @@ function App({ options, hostElement, bus }) {
8745
8741
  }
8746
8742
  if (isInlineLike) {
8747
8743
  const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
8748
- return /* @__PURE__ */ jsx38("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
8744
+ return /* @__PURE__ */ jsx38("div", { class: `${p34}-anchor`, children: renderSurface(inlineSize) });
8749
8745
  }
8750
8746
  const drawerEdgeTab = options.mode === "drawer";
8751
8747
  const triggerOwnedByPage = options.mode === "modal";
8752
8748
  const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
8753
8749
  const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
8754
- return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
8755
- isOpen || activated ? /* @__PURE__ */ jsx38("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
8750
+ return /* @__PURE__ */ jsxs32("div", { class: `${p34}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
8751
+ isOpen || activated ? /* @__PURE__ */ jsx38("div", { class: `${p34}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
8756
8752
  launcherVisible ? /* @__PURE__ */ jsx38(
8757
8753
  Launcher,
8758
8754
  {
@@ -8828,34 +8824,34 @@ var TRACKED = {
8828
8824
  expand: (on) => ({ on }),
8829
8825
  fullscreen: (on) => ({ on }),
8830
8826
  // Conversation funnel. `send` is the key conversion; text never rides.
8831
- send: (p36) => ({ attachments: p36.attachmentCount }),
8832
- message: (p36) => ({ role: p36.role }),
8827
+ send: (p35) => ({ attachments: p35.attachmentCount }),
8828
+ message: (p35) => ({ role: p35.role }),
8833
8829
  stop: () => void 0,
8834
8830
  clear: () => void 0,
8835
8831
  suggestion: () => void 0,
8836
- toggleHistory: (p36) => ({ view: p36.view }),
8832
+ toggleHistory: (p35) => ({ view: p35.view }),
8837
8833
  handshake: () => void 0,
8838
8834
  // Forms + human-in-the-loop — ids and outcomes, never values.
8839
- formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
8835
+ formSubmit: (p35) => ({ formId: p35.formId, skipped: p35.skipped }),
8840
8836
  toolResult: () => void 0,
8841
- toolDecision: (p36) => ({ approved: p36.approved }),
8837
+ toolDecision: (p35) => ({ approved: p35.approved }),
8842
8838
  // Content — ids, tags + counts only; titles/bodies never ride.
8843
- contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
8844
- contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
8845
- contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
8846
- contentRead: (p36) => ({ contentId: p36.contentId }),
8847
- contentLinkClick: (p36) => ({ contentId: p36.contentId }),
8839
+ contentView: (p35) => ({ section: p35.section, tags: p35.tags, count: p35.count }),
8840
+ contentOpen: (p35) => ({ contentId: p35.contentId, tags: p35.tags }),
8841
+ contentSearch: (p35) => ({ qlen: p35.queryLength, hits: p35.hitCount }),
8842
+ contentRead: (p35) => ({ contentId: p35.contentId }),
8843
+ contentLinkClick: (p35) => ({ contentId: p35.contentId }),
8848
8844
  // Composer / attachments / voice.
8849
- attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
8845
+ attach: (p35) => ({ count: p35.count, bytes: p35.totalBytes }),
8850
8846
  voiceStart: () => void 0,
8851
- voiceStop: (p36) => ({ ms: p36.durationMs }),
8847
+ voiceStop: (p35) => ({ ms: p35.durationMs }),
8852
8848
  voiceCancel: () => void 0,
8853
8849
  // Preferences — how visitors tune the surface.
8854
8850
  localeChange: (locale) => ({ locale }),
8855
8851
  themeChange: (theme) => ({ theme }),
8856
8852
  textSizeChange: (size) => ({ size }),
8857
- soundToggle: (p36) => ({ muted: p36.muted }),
8858
- sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
8853
+ soundToggle: (p35) => ({ muted: p35.muted }),
8854
+ sidebarToggle: (p35) => ({ collapsed: p35.collapsed }),
8859
8855
  calloutDismiss: () => void 0,
8860
8856
  // Health signal only — the error object itself never leaves the page.
8861
8857
  error: () => void 0