@flytedan/flytebot-design-system 0.64.0 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4808,30 +4808,43 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4808
4808
  ] });
4809
4809
  }
4810
4810
 
4811
+ // src/components/data/StatGrid.tsx
4812
+ import { jsx as jsx51 } from "react/jsx-runtime";
4813
+ function StatGrid({ columns, className = "", children, ...rest }) {
4814
+ return /* @__PURE__ */ jsx51("div", { className: ["fd-stat-grid", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ jsx51("div", { className: "fd-stat-grid-tiles", "data-columns": columns, children }) });
4815
+ }
4816
+
4811
4817
  // src/components/data/StatTile.tsx
4812
- import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
4818
+ import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
4813
4819
  function isZeroDelta(delta) {
4814
4820
  if (!delta) return false;
4815
4821
  const match = delta.match(/[\d.]+/);
4816
4822
  return match !== null && parseFloat(match[0]) === 0;
4817
4823
  }
4818
- function StatTile({ label, value, sub, delta, invert = false, loading = false, compact: compact3 = false, className = "", ...rest }) {
4824
+ function StatTile(props) {
4825
+ const { label, value, sub, delta, invert = false, loading = false, compact: compact3 = false, className = "", ...rest } = props;
4819
4826
  const isDecrease = delta?.startsWith("-") ?? false;
4820
4827
  const isZero = isZeroDelta(delta);
4821
4828
  const isGood = invert ? isDecrease : !isDecrease;
4822
4829
  const deltaToneClass = isZero ? "fd-stat-delta-neutral" : isGood ? "fd-stat-delta-up" : "fd-stat-delta-down";
4823
- return /* @__PURE__ */ jsxs42("div", { className: ["fd-stat", compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" "), ...rest, children: [
4824
- loading ? /* @__PURE__ */ jsx51("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: compact3 ? 20 : 28, width: "62%" } }) : /* @__PURE__ */ jsxs42("span", { className: "fd-stat-top", children: [
4825
- /* @__PURE__ */ jsx51("span", { className: "fd-stat-figure", children: value }),
4830
+ const content = /* @__PURE__ */ jsxs42(Fragment8, { children: [
4831
+ loading ? /* @__PURE__ */ jsx52("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: compact3 ? 20 : 28, width: "62%" } }) : /* @__PURE__ */ jsxs42("span", { className: "fd-stat-top", children: [
4832
+ /* @__PURE__ */ jsx52("span", { className: "fd-stat-figure", children: value }),
4826
4833
  delta ? /* @__PURE__ */ jsxs42("span", { className: "fd-stat-delta " + deltaToneClass, children: [
4827
- /* @__PURE__ */ jsx51("i", { className: "ph ph-" + (isZero ? "minus" : "arrow-" + (isDecrease ? "down" : "up") + "-right"), "aria-hidden": "true" }),
4834
+ /* @__PURE__ */ jsx52("i", { className: "ph ph-" + (isZero ? "minus" : "arrow-" + (isDecrease ? "down" : "up") + "-right"), "aria-hidden": "true" }),
4828
4835
  " ",
4829
4836
  delta
4830
4837
  ] }) : null
4831
4838
  ] }),
4832
- !loading && sub ? /* @__PURE__ */ jsx51("span", { className: "fd-stat-sub", children: sub }) : null,
4833
- loading ? /* @__PURE__ */ jsx51("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 10, width: "40%", marginTop: 8 } }) : /* @__PURE__ */ jsx51("span", { className: "fd-stat-label", style: { display: "block" }, children: label })
4839
+ !loading && sub ? /* @__PURE__ */ jsx52("span", { className: "fd-stat-sub", children: sub }) : null,
4840
+ loading ? /* @__PURE__ */ jsx52("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 10, width: "40%", marginTop: 8 } }) : /* @__PURE__ */ jsx52("span", { className: "fd-stat-label", style: { display: "block" }, children: label })
4834
4841
  ] });
4842
+ const classes = (...extra) => ["fd-stat", ...extra, compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" ");
4843
+ if (rest.onPress) {
4844
+ const { onPress, pressed = false, disabled = false, ...buttonRest } = rest;
4845
+ return /* @__PURE__ */ jsx52("button", { type: "button", className: classes("fd-stat-pressable"), "aria-pressed": pressed, disabled: disabled || loading, onClick: onPress, ...buttonRest, children: content });
4846
+ }
4847
+ return /* @__PURE__ */ jsx52("div", { className: classes(), ...rest, children: content });
4835
4848
  }
4836
4849
 
4837
4850
  // src/components/data/CodeBlock.tsx
@@ -4891,7 +4904,7 @@ function useCopyToClipboard() {
4891
4904
  }
4892
4905
 
4893
4906
  // src/components/data/CodeBlock.tsx
4894
- import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
4907
+ import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
4895
4908
  var JS_KW = /^(?:const|let|var|function|return|if|else|for|while|do|new|class|extends|import|from|export|default|await|async|try|catch|finally|throw|typeof|instanceof|of|in|switch|case|break|continue|delete|void|yield|static|get|set|this|super|interface|type|enum|implements|public|private|protected|readonly|abstract|as|satisfies|declare|namespace)$/;
4896
4909
  var RULES = {
4897
4910
  js: [
@@ -5047,7 +5060,7 @@ function tokenize(src, lang) {
5047
5060
  }
5048
5061
  function Highlighted({ code, lang }) {
5049
5062
  const toks = React34.useMemo(() => tokenize(code, lang), [code, lang]);
5050
- return /* @__PURE__ */ jsx52(Fragment8, { children: toks.map((tk, i) => tk.c ? /* @__PURE__ */ jsx52("span", { className: "tok-" + tk.c, children: tk.t }, i) : tk.t) });
5063
+ return /* @__PURE__ */ jsx53(Fragment9, { children: toks.map((tk, i) => tk.c ? /* @__PURE__ */ jsx53("span", { className: "tok-" + tk.c, children: tk.t }, i) : tk.t) });
5051
5064
  }
5052
5065
  function CodeBlock({
5053
5066
  code = "",
@@ -5069,22 +5082,22 @@ function CodeBlock({
5069
5082
  const shown = foldable && !open2 ? lines.slice(0, collapseAfter).join("\n") : body;
5070
5083
  return /* @__PURE__ */ jsxs43("div", { className: ["fd-code", wrap ? "is-wrap" : "", className].filter(Boolean).join(" "), children: [
5071
5084
  /* @__PURE__ */ jsxs43("div", { className: "fd-code-head", children: [
5072
- filename ? /* @__PURE__ */ jsx52("span", { className: "fd-code-file", children: filename }) : null,
5073
- /* @__PURE__ */ jsx52("span", { className: "fd-code-lang", children: languageLabel(language) }),
5074
- /* @__PURE__ */ jsx52("span", { className: "fd-code-spacer" }),
5085
+ filename ? /* @__PURE__ */ jsx53("span", { className: "fd-code-file", children: filename }) : null,
5086
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-lang", children: languageLabel(language) }),
5087
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-spacer" }),
5075
5088
  actions,
5076
- /* @__PURE__ */ jsx52("button", { type: "button", className: "fd-code-act", onClick: () => setWrap((v) => !v), "aria-pressed": wrap, title: wrap ? "No wrap" : "Soft wrap", children: /* @__PURE__ */ jsx52("i", { className: "ph ph-text-" + (wrap ? "columns" : "align-left"), "aria-hidden": "true" }) }),
5089
+ /* @__PURE__ */ jsx53("button", { type: "button", className: "fd-code-act", onClick: () => setWrap((v) => !v), "aria-pressed": wrap, title: wrap ? "No wrap" : "Soft wrap", children: /* @__PURE__ */ jsx53("i", { className: "ph ph-text-" + (wrap ? "columns" : "align-left"), "aria-hidden": "true" }) }),
5077
5090
  copyable ? /* @__PURE__ */ jsxs43("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(body), children: [
5078
- /* @__PURE__ */ jsx52("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5079
- /* @__PURE__ */ jsx52("span", { children: copied ? "Copied" : "Copy" })
5091
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5092
+ /* @__PURE__ */ jsx53("span", { children: copied ? "Copied" : "Copy" })
5080
5093
  ] }) : null
5081
5094
  ] }),
5082
5095
  /* @__PURE__ */ jsxs43("div", { className: "fd-code-body", children: [
5083
- lineNumbers2 ? /* @__PURE__ */ jsx52("pre", { className: "fd-code-gutter", "aria-hidden": "true", children: shown.split("\n").map((_, i) => i + 1 + "\n").join("") }) : null,
5084
- /* @__PURE__ */ jsx52("pre", { className: "fd-code-pre", tabIndex: 0, children: /* @__PURE__ */ jsx52("code", { children: /* @__PURE__ */ jsx52(Highlighted, { code: shown, lang: language }) }) })
5096
+ lineNumbers2 ? /* @__PURE__ */ jsx53("pre", { className: "fd-code-gutter", "aria-hidden": "true", children: shown.split("\n").map((_, i) => i + 1 + "\n").join("") }) : null,
5097
+ /* @__PURE__ */ jsx53("pre", { className: "fd-code-pre", tabIndex: 0, children: /* @__PURE__ */ jsx53("code", { children: /* @__PURE__ */ jsx53(Highlighted, { code: shown, lang: language }) }) })
5085
5098
  ] }),
5086
5099
  foldable ? /* @__PURE__ */ jsxs43("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open2, children: [
5087
- /* @__PURE__ */ jsx52("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5100
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5088
5101
  open2 ? "Collapse" : "Show all " + lines.length + " lines"
5089
5102
  ] }) : null
5090
5103
  ] });
@@ -5106,8 +5119,8 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5106
5119
  const rows = foldable && !open2 ? all.slice(0, collapseAfter) : all;
5107
5120
  return /* @__PURE__ */ jsxs43("div", { className: ["fd-code", "fd-diff", className].filter(Boolean).join(" "), children: [
5108
5121
  /* @__PURE__ */ jsxs43("div", { className: "fd-code-head", children: [
5109
- /* @__PURE__ */ jsx52("i", { className: "ph ph-git-diff fd-code-icon", "aria-hidden": "true" }),
5110
- filename ? /* @__PURE__ */ jsx52("span", { className: "fd-code-file", children: filename }) : /* @__PURE__ */ jsx52("span", { className: "fd-code-lang", children: "Diff" }),
5122
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-git-diff fd-code-icon", "aria-hidden": "true" }),
5123
+ filename ? /* @__PURE__ */ jsx53("span", { className: "fd-code-file", children: filename }) : /* @__PURE__ */ jsx53("span", { className: "fd-code-lang", children: "Diff" }),
5111
5124
  /* @__PURE__ */ jsxs43("span", { className: "fd-diff-stat fd-tabular", children: [
5112
5125
  /* @__PURE__ */ jsxs43("span", { className: "is-add", children: [
5113
5126
  "+",
@@ -5118,18 +5131,18 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5118
5131
  dels
5119
5132
  ] })
5120
5133
  ] }),
5121
- /* @__PURE__ */ jsx52("span", { className: "fd-code-spacer" }),
5134
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-spacer" }),
5122
5135
  /* @__PURE__ */ jsxs43("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(raw), children: [
5123
- /* @__PURE__ */ jsx52("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5124
- /* @__PURE__ */ jsx52("span", { children: copied ? "Copied" : "Copy" })
5136
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5137
+ /* @__PURE__ */ jsx53("span", { children: copied ? "Copied" : "Copy" })
5125
5138
  ] })
5126
5139
  ] }),
5127
- /* @__PURE__ */ jsx52("div", { className: "fd-diff-body", children: rows.map((r, i) => /* @__PURE__ */ jsxs43("div", { className: "fd-diff-line is-" + r.k, children: [
5128
- /* @__PURE__ */ jsx52("span", { className: "fd-diff-mark", "aria-hidden": "true", children: r.k === "add" ? "+" : r.k === "del" ? "\u2212" : "" }),
5129
- /* @__PURE__ */ jsx52("code", { children: r.k === "add" || r.k === "del" ? r.line.slice(1) : r.line })
5140
+ /* @__PURE__ */ jsx53("div", { className: "fd-diff-body", children: rows.map((r, i) => /* @__PURE__ */ jsxs43("div", { className: "fd-diff-line is-" + r.k, children: [
5141
+ /* @__PURE__ */ jsx53("span", { className: "fd-diff-mark", "aria-hidden": "true", children: r.k === "add" ? "+" : r.k === "del" ? "\u2212" : "" }),
5142
+ /* @__PURE__ */ jsx53("code", { children: r.k === "add" || r.k === "del" ? r.line.slice(1) : r.line })
5130
5143
  ] }, i)) }),
5131
5144
  foldable ? /* @__PURE__ */ jsxs43("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open2, children: [
5132
- /* @__PURE__ */ jsx52("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5145
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5133
5146
  open2 ? "Collapse" : "Show all " + all.length + " lines"
5134
5147
  ] }) : null
5135
5148
  ] });
@@ -5137,7 +5150,7 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5137
5150
 
5138
5151
  // src/components/data/Markdown.tsx
5139
5152
  import * as React35 from "react";
5140
- import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
5153
+ import { jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
5141
5154
  var SAFE = /^(?:https?:|mailto:|tel:|#|\/|\.{1,2}\/)/i;
5142
5155
  var safeHref = (h) => SAFE.test(String(h || "").trim()) ? String(h).trim() : null;
5143
5156
  var INLINE = [
@@ -5167,22 +5180,22 @@ function inlineNodes(src, ctx, keyBase) {
5167
5180
  const { kind, m } = best;
5168
5181
  if (m.index > 0) out.push(rest.slice(0, m.index));
5169
5182
  const g = (i) => m[i];
5170
- if (kind === "code") out.push(/* @__PURE__ */ jsx53("code", { className: "fd-md-code", children: g(1) }, key()));
5183
+ if (kind === "code") out.push(/* @__PURE__ */ jsx54("code", { className: "fd-md-code", children: g(1) }, key()));
5171
5184
  else if (kind === "image") {
5172
5185
  const src2 = safeHref(g(2));
5173
- out.push(ctx.allowImages && src2 ? /* @__PURE__ */ jsx53("img", { className: "fd-md-img", src: src2, alt: g(1) || "", title: g(3) || void 0, loading: "lazy" }, key()) : /* @__PURE__ */ jsx53("span", { className: "fd-md-imgalt", children: g(1) || "image" }, key()));
5186
+ out.push(ctx.allowImages && src2 ? /* @__PURE__ */ jsx54("img", { className: "fd-md-img", src: src2, alt: g(1) || "", title: g(3) || void 0, loading: "lazy" }, key()) : /* @__PURE__ */ jsx54("span", { className: "fd-md-imgalt", children: g(1) || "image" }, key()));
5174
5187
  } else if (kind === "link") {
5175
5188
  const href = safeHref(g(2));
5176
- out.push(href ? /* @__PURE__ */ jsx53("a", { href, title: g(3) || void 0, target: /^https?:/i.test(href) ? "_blank" : void 0, rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: inlineNodes(g(1), ctx, key()) }, key()) : /* @__PURE__ */ jsx53("span", { children: g(1) }, key()));
5189
+ out.push(href ? /* @__PURE__ */ jsx54("a", { href, title: g(3) || void 0, target: /^https?:/i.test(href) ? "_blank" : void 0, rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: inlineNodes(g(1), ctx, key()) }, key()) : /* @__PURE__ */ jsx54("span", { children: g(1) }, key()));
5177
5190
  } else if (kind === "cite") {
5178
- out.push(ctx.renderCitation ? /* @__PURE__ */ jsx53(React35.Fragment, { children: ctx.renderCitation(g(1)) }, key()) : /* @__PURE__ */ jsx53("sup", { className: "fd-md-cite", children: g(1) }, key()));
5179
- } else if (kind === "strongem") out.push(/* @__PURE__ */ jsx53("strong", { children: /* @__PURE__ */ jsx53("em", { children: inlineNodes(g(1), ctx, key()) }) }, key()));
5180
- else if (kind === "strong") out.push(/* @__PURE__ */ jsx53("strong", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5181
- else if (kind === "em") out.push(/* @__PURE__ */ jsx53("em", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5182
- else if (kind === "del") out.push(/* @__PURE__ */ jsx53("del", { children: inlineNodes(g(1), ctx, key()) }, key()));
5191
+ out.push(ctx.renderCitation ? /* @__PURE__ */ jsx54(React35.Fragment, { children: ctx.renderCitation(g(1)) }, key()) : /* @__PURE__ */ jsx54("sup", { className: "fd-md-cite", children: g(1) }, key()));
5192
+ } else if (kind === "strongem") out.push(/* @__PURE__ */ jsx54("strong", { children: /* @__PURE__ */ jsx54("em", { children: inlineNodes(g(1), ctx, key()) }) }, key()));
5193
+ else if (kind === "strong") out.push(/* @__PURE__ */ jsx54("strong", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5194
+ else if (kind === "em") out.push(/* @__PURE__ */ jsx54("em", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5195
+ else if (kind === "del") out.push(/* @__PURE__ */ jsx54("del", { children: inlineNodes(g(1), ctx, key()) }, key()));
5183
5196
  else if (kind === "autolink" || kind === "bare") {
5184
5197
  const href = safeHref(g(1));
5185
- out.push(href ? /* @__PURE__ */ jsx53("a", { href, target: "_blank", rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: g(1).replace(/^mailto:/, "") }, key()) : g(1));
5198
+ out.push(href ? /* @__PURE__ */ jsx54("a", { href, target: "_blank", rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: g(1).replace(/^mailto:/, "") }, key()) : g(1));
5186
5199
  }
5187
5200
  rest = rest.slice(m.index + m[0].length);
5188
5201
  }
@@ -5300,33 +5313,33 @@ function renderBlocks(blocks, ctx, path) {
5300
5313
  const k = path + "-" + i;
5301
5314
  switch (b.t) {
5302
5315
  case "code": {
5303
- if ((b.lang || "").toLowerCase() === "diff") return /* @__PURE__ */ jsx53(DiffBlock, { diff: b.code, filename: b.file || void 0 }, k);
5304
- return /* @__PURE__ */ jsx53(CodeBlock, { code: b.code, language: b.lang, filename: b.file || void 0, ...ctx.codeProps || {} }, k);
5316
+ if ((b.lang || "").toLowerCase() === "diff") return /* @__PURE__ */ jsx54(DiffBlock, { diff: b.code, filename: b.file || void 0 }, k);
5317
+ return /* @__PURE__ */ jsx54(CodeBlock, { code: b.code, language: b.lang, filename: b.file || void 0, ...ctx.codeProps || {} }, k);
5305
5318
  }
5306
5319
  case "h": {
5307
5320
  const lvl = Math.min(6, Math.max(1, b.level + (ctx.headingOffset || 0)));
5308
5321
  const Tag2 = "h" + lvl;
5309
- return /* @__PURE__ */ jsx53(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
5322
+ return /* @__PURE__ */ jsx54(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
5310
5323
  }
5311
5324
  case "hr":
5312
- return /* @__PURE__ */ jsx53("hr", { className: "fd-md-hr" }, k);
5325
+ return /* @__PURE__ */ jsx54("hr", { className: "fd-md-hr" }, k);
5313
5326
  case "quote":
5314
- return /* @__PURE__ */ jsx53("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
5327
+ return /* @__PURE__ */ jsx54("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
5315
5328
  case "list": {
5316
5329
  const Tag2 = b.ordered ? "ol" : "ul";
5317
5330
  const isTask = b.items.some((it) => it.checked != null);
5318
- return /* @__PURE__ */ jsx53(Tag2, { className: "fd-md-list" + (isTask ? " is-task" : ""), start: b.ordered && b.start !== 1 ? b.start : void 0, children: b.items.map((it, j) => /* @__PURE__ */ jsxs44("li", { className: it.checked != null ? it.checked ? "is-done" : "is-todo" : void 0, children: [
5319
- it.checked != null ? /* @__PURE__ */ jsx53("span", { className: "fd-md-task", "aria-hidden": "true", children: /* @__PURE__ */ jsx53("i", { className: "ph ph-" + (it.checked ? "check-square" : "square") }) }) : null,
5320
- /* @__PURE__ */ jsx53("span", { className: "fd-md-li", children: renderBlocks(it.children, ctx, k + "-" + j) })
5331
+ return /* @__PURE__ */ jsx54(Tag2, { className: "fd-md-list" + (isTask ? " is-task" : ""), start: b.ordered && b.start !== 1 ? b.start : void 0, children: b.items.map((it, j) => /* @__PURE__ */ jsxs44("li", { className: it.checked != null ? it.checked ? "is-done" : "is-todo" : void 0, children: [
5332
+ it.checked != null ? /* @__PURE__ */ jsx54("span", { className: "fd-md-task", "aria-hidden": "true", children: /* @__PURE__ */ jsx54("i", { className: "ph ph-" + (it.checked ? "check-square" : "square") }) }) : null,
5333
+ /* @__PURE__ */ jsx54("span", { className: "fd-md-li", children: renderBlocks(it.children, ctx, k + "-" + j) })
5321
5334
  ] }, k + "-" + j)) }, k);
5322
5335
  }
5323
5336
  case "table":
5324
- return /* @__PURE__ */ jsx53("div", { className: "fd-md-tablewrap", children: /* @__PURE__ */ jsxs44("table", { className: "fd-md-table", children: [
5325
- /* @__PURE__ */ jsx53("thead", { children: /* @__PURE__ */ jsx53("tr", { children: b.head.map((c, j) => /* @__PURE__ */ jsx53("th", { style: { textAlign: b.align[j] || "left" }, children: inlineNodes(c, ctx, k + "h" + j) }, j)) }) }),
5326
- /* @__PURE__ */ jsx53("tbody", { children: b.rows.map((r, ri) => /* @__PURE__ */ jsx53("tr", { children: b.head.map((_, ci) => /* @__PURE__ */ jsx53("td", { style: { textAlign: b.align[ci] || "left" }, children: inlineNodes(r[ci] || "", ctx, k + ri + "c" + ci) }, ci)) }, ri)) })
5337
+ return /* @__PURE__ */ jsx54("div", { className: "fd-md-tablewrap", children: /* @__PURE__ */ jsxs44("table", { className: "fd-md-table", children: [
5338
+ /* @__PURE__ */ jsx54("thead", { children: /* @__PURE__ */ jsx54("tr", { children: b.head.map((c, j) => /* @__PURE__ */ jsx54("th", { style: { textAlign: b.align[j] || "left" }, children: inlineNodes(c, ctx, k + "h" + j) }, j)) }) }),
5339
+ /* @__PURE__ */ jsx54("tbody", { children: b.rows.map((r, ri) => /* @__PURE__ */ jsx54("tr", { children: b.head.map((_, ci) => /* @__PURE__ */ jsx54("td", { style: { textAlign: b.align[ci] || "left" }, children: inlineNodes(r[ci] || "", ctx, k + ri + "c" + ci) }, ci)) }, ri)) })
5327
5340
  ] }) }, k);
5328
5341
  default:
5329
- return /* @__PURE__ */ jsx53("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
5342
+ return /* @__PURE__ */ jsx54("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
5330
5343
  }
5331
5344
  });
5332
5345
  }
@@ -5341,24 +5354,24 @@ function Markdown({
5341
5354
  }) {
5342
5355
  const ctx = { allowImages, headingOffset, renderCitation, onLinkClick, codeProps };
5343
5356
  const blocks = React35.useMemo(() => parseBlocks(source), [source]);
5344
- return /* @__PURE__ */ jsx53("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
5357
+ return /* @__PURE__ */ jsx54("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
5345
5358
  }
5346
5359
  function MarkdownInline({ source = "", className = "", onLinkClick }) {
5347
- return /* @__PURE__ */ jsx53("span", { className: ["fd-md-inline", className].filter(Boolean).join(" "), children: inlineNodes(source, { allowImages: false, onLinkClick }, "i") });
5360
+ return /* @__PURE__ */ jsx54("span", { className: ["fd-md-inline", className].filter(Boolean).join(" "), children: inlineNodes(source, { allowImages: false, onLinkClick }, "i") });
5348
5361
  }
5349
5362
  function markdownToText(src) {
5350
5363
  return String(src == null ? "" : src).replace(/```[\w+#-]*\n?([\s\S]*?)```/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/^\s{0,3}#{1,6}\s+/gm, "").replace(/\*\*\*([^*]+)\*\*\*|\*\*([^*]+)\*\*|__([^_]+)__/g, "$1$2$3").replace(/(^|\W)[*_]([^*_\n]+)[*_](\W|$)/g, "$1$2$3").replace(/~~([^~]+)~~/g, "$1").replace(/^\s*>\s?/gm, "").trim();
5351
5364
  }
5352
5365
 
5353
5366
  // src/components/data/Meter.tsx
5354
- import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
5367
+ import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
5355
5368
  function Meter({ segments = [], unallocated = 0, height = 8, label, legend = false, className = "" }) {
5356
5369
  const total = segments.reduce((s, x) => s + x.value, 0) + unallocated;
5357
5370
  const pct = (v) => total ? v / total * 100 : 0;
5358
5371
  return /* @__PURE__ */ jsxs45("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 8 }, children: [
5359
- label ? /* @__PURE__ */ jsx54("span", { className: "fd-label-lg fd-secondary", children: label }) : null,
5372
+ label ? /* @__PURE__ */ jsx55("span", { className: "fd-label-lg fd-secondary", children: label }) : null,
5360
5373
  /* @__PURE__ */ jsxs45("div", { className: "fd-meterbar", style: { height }, children: [
5361
- segments.map((s, i) => /* @__PURE__ */ jsx54(
5374
+ segments.map((s, i) => /* @__PURE__ */ jsx55(
5362
5375
  "span",
5363
5376
  {
5364
5377
  className: "fd-meterbar-seg",
@@ -5367,15 +5380,15 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
5367
5380
  },
5368
5381
  i
5369
5382
  )),
5370
- unallocated > 0 ? /* @__PURE__ */ jsx54("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
5383
+ unallocated > 0 ? /* @__PURE__ */ jsx55("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
5371
5384
  ] }),
5372
5385
  legend ? /* @__PURE__ */ jsxs45("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap" }, children: [
5373
5386
  segments.map((s, i) => /* @__PURE__ */ jsxs45("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
5374
- /* @__PURE__ */ jsx54("span", { style: { width: 9, height: 9, borderRadius: 2, background: s.color || "var(--chart-" + (i % 8 + 1) + ")" } }),
5387
+ /* @__PURE__ */ jsx55("span", { style: { width: 9, height: 9, borderRadius: 2, background: s.color || "var(--chart-" + (i % 8 + 1) + ")" } }),
5375
5388
  s.label
5376
5389
  ] }, i)),
5377
5390
  unallocated > 0 ? /* @__PURE__ */ jsxs45("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
5378
- /* @__PURE__ */ jsx54("span", { className: "fd-meterbar-unallocated", style: { width: 9, height: 9, borderRadius: 2 } }),
5391
+ /* @__PURE__ */ jsx55("span", { className: "fd-meterbar-unallocated", style: { width: 9, height: 9, borderRadius: 2 } }),
5379
5392
  "Unallocated"
5380
5393
  ] }) : null
5381
5394
  ] }) : null
@@ -5383,7 +5396,7 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
5383
5396
  }
5384
5397
 
5385
5398
  // src/components/data/Pagination.tsx
5386
- import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
5399
+ import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
5387
5400
  var unitPluralRules = new Intl.PluralRules("en-US");
5388
5401
  function pluralizeUnit(n, singular, irregularPlural) {
5389
5402
  return unitPluralRules.select(n) === "one" ? singular : irregularPlural ?? `${singular}s`;
@@ -5415,10 +5428,10 @@ function Pagination({
5415
5428
  else if (nums[nums.length - 1] !== "\u2026") nums.push("\u2026");
5416
5429
  }
5417
5430
  return /* @__PURE__ */ jsxs46("div", { className: ["fd-pag", className].filter(Boolean).join(" "), ...rest, children: [
5418
- /* @__PURE__ */ jsx55("span", { className: "fd-pag-count", children: loading ? /* @__PURE__ */ jsx55("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 12, width: 108 } }) : total === 0 ? /* @__PURE__ */ jsxs46(Fragment10, { children: [
5431
+ /* @__PURE__ */ jsx56("span", { className: "fd-pag-count", children: loading ? /* @__PURE__ */ jsx56("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 12, width: 108 } }) : total === 0 ? /* @__PURE__ */ jsxs46(Fragment11, { children: [
5419
5432
  "No ",
5420
5433
  unitLabel
5421
- ] }) : /* @__PURE__ */ jsxs46(Fragment10, { children: [
5434
+ ] }) : /* @__PURE__ */ jsxs46(Fragment11, { children: [
5422
5435
  /* @__PURE__ */ jsxs46("strong", { children: [
5423
5436
  from.toLocaleString(),
5424
5437
  "\u2013",
@@ -5430,13 +5443,13 @@ function Pagination({
5430
5443
  unitLabel
5431
5444
  ] }) }),
5432
5445
  onPageSizeChange ? /* @__PURE__ */ jsxs46("label", { className: "fd-pag-size", children: [
5433
- /* @__PURE__ */ jsx55("span", { children: "Rows" }),
5434
- /* @__PURE__ */ jsx55("select", { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), "aria-label": "Rows per page", children: pageSizes.map((n) => /* @__PURE__ */ jsx55("option", { value: n, children: n }, n)) })
5446
+ /* @__PURE__ */ jsx56("span", { children: "Rows" }),
5447
+ /* @__PURE__ */ jsx56("select", { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), "aria-label": "Rows per page", children: pageSizes.map((n) => /* @__PURE__ */ jsx56("option", { value: n, children: n }, n)) })
5435
5448
  ] }) : null,
5436
5449
  /* @__PURE__ */ jsxs46("span", { className: "fd-pag-nav", children: [
5437
- /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => go(1), disabled: page <= 1, "aria-label": "First page", children: /* @__PURE__ */ jsx55("i", { className: "ph ph-caret-double-left" }) }),
5438
- /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "Previous page", children: /* @__PURE__ */ jsx55("i", { className: "ph ph-caret-left" }) }),
5439
- nums.map((n, i) => n === "\u2026" ? /* @__PURE__ */ jsx55("span", { className: "fd-pag-gap", "aria-hidden": "true", children: "\u2026" }, "e" + i) : /* @__PURE__ */ jsx55(
5450
+ /* @__PURE__ */ jsx56("button", { type: "button", onClick: () => go(1), disabled: page <= 1, "aria-label": "First page", children: /* @__PURE__ */ jsx56("i", { className: "ph ph-caret-double-left" }) }),
5451
+ /* @__PURE__ */ jsx56("button", { type: "button", onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "Previous page", children: /* @__PURE__ */ jsx56("i", { className: "ph ph-caret-left" }) }),
5452
+ nums.map((n, i) => n === "\u2026" ? /* @__PURE__ */ jsx56("span", { className: "fd-pag-gap", "aria-hidden": "true", children: "\u2026" }, "e" + i) : /* @__PURE__ */ jsx56(
5440
5453
  "button",
5441
5454
  {
5442
5455
  type: "button",
@@ -5447,8 +5460,8 @@ function Pagination({
5447
5460
  },
5448
5461
  n
5449
5462
  )),
5450
- /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => go(page + 1), disabled: page >= totalPages, "aria-label": "Next page", children: /* @__PURE__ */ jsx55("i", { className: "ph ph-caret-right" }) }),
5451
- /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => go(totalPages), disabled: page >= totalPages, "aria-label": "Last page", children: /* @__PURE__ */ jsx55("i", { className: "ph ph-caret-double-right" }) })
5463
+ /* @__PURE__ */ jsx56("button", { type: "button", onClick: () => go(page + 1), disabled: page >= totalPages, "aria-label": "Next page", children: /* @__PURE__ */ jsx56("i", { className: "ph ph-caret-right" }) }),
5464
+ /* @__PURE__ */ jsx56("button", { type: "button", onClick: () => go(totalPages), disabled: page >= totalPages, "aria-label": "Last page", children: /* @__PURE__ */ jsx56("i", { className: "ph ph-caret-double-right" }) })
5452
5465
  ] })
5453
5466
  ] });
5454
5467
  }
@@ -5525,7 +5538,7 @@ function RelativeTime({ value, prefix, className = "", refresh: refresh2 = true,
5525
5538
 
5526
5539
  // src/components/data/ScoreMeter.tsx
5527
5540
  import * as React37 from "react";
5528
- import { jsx as jsx56, jsxs as jsxs48 } from "react/jsx-runtime";
5541
+ import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
5529
5542
  function ScoreMeter({
5530
5543
  score,
5531
5544
  segments,
@@ -5543,11 +5556,11 @@ function ScoreMeter({
5543
5556
  const ref = React37.useRef(null);
5544
5557
  const value = Math.max(0, Math.min(100, Math.round(Number(score) || 0)));
5545
5558
  const body = /* @__PURE__ */ jsxs48(React37.Fragment, { children: [
5546
- /* @__PURE__ */ jsx56("span", { className: "fd-scoremeter-rail", style: { width }, "aria-hidden": "true", children: /* @__PURE__ */ jsx56(SegmentedMeter, { total: 100, segments, height, showTotal: false, showPercent: false, legend: false }) }),
5547
- showScore ? /* @__PURE__ */ jsx56("span", { className: "fd-scoremeter-value fd-tabular", "aria-hidden": "true", children: value }) : null
5559
+ /* @__PURE__ */ jsx57("span", { className: "fd-scoremeter-rail", style: { width }, "aria-hidden": "true", children: /* @__PURE__ */ jsx57(SegmentedMeter, { total: 100, segments, height, showTotal: false, showPercent: false, legend: false }) }),
5560
+ showScore ? /* @__PURE__ */ jsx57("span", { className: "fd-scoremeter-value fd-tabular", "aria-hidden": "true", children: value }) : null
5548
5561
  ] });
5549
5562
  if (!breakdown) {
5550
- return /* @__PURE__ */ jsx56(
5563
+ return /* @__PURE__ */ jsx57(
5551
5564
  "span",
5552
5565
  {
5553
5566
  className: ["fd-scoremeter", className].filter(Boolean).join(" "),
@@ -5562,7 +5575,7 @@ function ScoreMeter({
5562
5575
  );
5563
5576
  }
5564
5577
  return /* @__PURE__ */ jsxs48(React37.Fragment, { children: [
5565
- /* @__PURE__ */ jsx56(
5578
+ /* @__PURE__ */ jsx57(
5566
5579
  "button",
5567
5580
  {
5568
5581
  type: "button",
@@ -5575,7 +5588,7 @@ function ScoreMeter({
5575
5588
  children: body
5576
5589
  }
5577
5590
  ),
5578
- /* @__PURE__ */ jsx56(
5591
+ /* @__PURE__ */ jsx57(
5579
5592
  Popover,
5580
5593
  {
5581
5594
  open: open2,
@@ -5593,14 +5606,14 @@ function ScoreMeter({
5593
5606
 
5594
5607
  // src/components/actions/inlinePanel.tsx
5595
5608
  import * as React38 from "react";
5596
- import { jsx as jsx57 } from "react/jsx-runtime";
5609
+ import { jsx as jsx58 } from "react/jsx-runtime";
5597
5610
  function useInlinePanel() {
5598
5611
  const [open2, setOpen] = React38.useState(false);
5599
5612
  const ref = React38.useRef(null);
5600
5613
  return { open: open2, setOpen, ref };
5601
5614
  }
5602
5615
  function InlinePanelSurface({ panel, align = "right", ...popover }) {
5603
- return /* @__PURE__ */ jsx57(
5616
+ return /* @__PURE__ */ jsx58(
5604
5617
  Popover,
5605
5618
  {
5606
5619
  open: panel.open,
@@ -5613,7 +5626,7 @@ function InlinePanelSurface({ panel, align = "right", ...popover }) {
5613
5626
  }
5614
5627
 
5615
5628
  // src/components/data/SortMenu.tsx
5616
- import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
5629
+ import { Fragment as Fragment13, jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
5617
5630
  var directionWord = (field, dir) => dir === "asc" ? field.numeric ? "lowest first" : "A to Z" : field.numeric ? "highest first" : "Z to A";
5618
5631
  function moved(sort, from, to) {
5619
5632
  const next = [...sort];
@@ -5643,7 +5656,7 @@ function SortMenu({
5643
5656
  const field = fieldOf(entry.key);
5644
5657
  return field.label + " " + directionWord(field, entry.dir);
5645
5658
  }).join(", then ");
5646
- const arrow = (field, dir, on, onClick) => /* @__PURE__ */ jsx58(
5659
+ const arrow = (field, dir, on, onClick) => /* @__PURE__ */ jsx59(
5647
5660
  "button",
5648
5661
  {
5649
5662
  type: "button",
@@ -5662,7 +5675,7 @@ function SortMenu({
5662
5675
  background: on ? "var(--brand)" : "var(--surface)",
5663
5676
  color: on ? "#fff" : "var(--text-muted)"
5664
5677
  },
5665
- children: /* @__PURE__ */ jsx58("i", { className: "ph ph-arrow-" + (dir === "asc" ? "up" : "down"), style: { fontSize: 13 } })
5678
+ children: /* @__PURE__ */ jsx59("i", { className: "ph ph-arrow-" + (dir === "asc" ? "up" : "down"), style: { fontSize: 13 } })
5666
5679
  }
5667
5680
  );
5668
5681
  const rowStyle = (highlight) => ({
@@ -5680,21 +5693,21 @@ function SortMenu({
5680
5693
  const singleBody = fields.map((f) => {
5681
5694
  const on = !!first && first.key === f.key;
5682
5695
  return /* @__PURE__ */ jsxs49("span", { className: "fd-row", style: rowStyle(on), children: [
5683
- /* @__PURE__ */ jsx58("span", { className: "fd-body-sm", style: labelStyle(on), children: f.label }),
5696
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(on), children: f.label }),
5684
5697
  arrow(f, "asc", on && first.dir === "asc", () => change([{ key: f.key, dir: "asc" }])),
5685
5698
  arrow(f, "desc", on && first.dir === "desc", () => change([{ key: f.key, dir: "desc" }]))
5686
5699
  ] }, f.key);
5687
5700
  });
5688
5701
  const unused = fields.filter((f) => !active.some((entry) => entry.key === f.key));
5689
- const multipleBody = /* @__PURE__ */ jsxs49(Fragment12, { children: [
5690
- /* @__PURE__ */ jsx58("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sorted by" }),
5691
- active.length === 0 ? /* @__PURE__ */ jsx58("span", { className: "fd-body-sm fd-muted", style: { padding: "4px 8px" }, children: "Unsorted" }) : /* @__PURE__ */ jsx58("ol", { className: "fd-stack", style: { gap: 2, margin: 0, padding: 0, listStyle: "none" }, "aria-label": "Sort order", children: active.map((entry, index) => {
5702
+ const multipleBody = /* @__PURE__ */ jsxs49(Fragment13, { children: [
5703
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sorted by" }),
5704
+ active.length === 0 ? /* @__PURE__ */ jsx59("span", { className: "fd-body-sm fd-muted", style: { padding: "4px 8px" }, children: "Unsorted" }) : /* @__PURE__ */ jsx59("ol", { className: "fd-stack", style: { gap: 2, margin: 0, padding: 0, listStyle: "none" }, "aria-label": "Sort order", children: active.map((entry, index) => {
5692
5705
  const f = fieldOf(entry.key);
5693
5706
  const flipped = entry.dir === "asc" ? "desc" : "asc";
5694
5707
  return /* @__PURE__ */ jsxs49("li", { className: "fd-row", style: rowStyle(false), children: [
5695
- /* @__PURE__ */ jsx58("span", { className: "fd-body-sm fd-muted", "aria-hidden": "true", style: { width: 14, flex: "none" }, children: index + 1 }),
5696
- /* @__PURE__ */ jsx58("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5697
- /* @__PURE__ */ jsx58(
5708
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm fd-muted", "aria-hidden": "true", style: { width: 14, flex: "none" }, children: index + 1 }),
5709
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5710
+ /* @__PURE__ */ jsx59(
5698
5711
  IconButton,
5699
5712
  {
5700
5713
  size: "sm",
@@ -5704,7 +5717,7 @@ function SortMenu({
5704
5717
  onClick: () => change(active.map((e) => e.key === entry.key ? { key: e.key, dir: flipped } : e))
5705
5718
  }
5706
5719
  ),
5707
- /* @__PURE__ */ jsx58(
5720
+ /* @__PURE__ */ jsx59(
5708
5721
  IconButton,
5709
5722
  {
5710
5723
  size: "sm",
@@ -5714,7 +5727,7 @@ function SortMenu({
5714
5727
  onClick: () => change(moved(active, index, index - 1))
5715
5728
  }
5716
5729
  ),
5717
- /* @__PURE__ */ jsx58(
5730
+ /* @__PURE__ */ jsx59(
5718
5731
  IconButton,
5719
5732
  {
5720
5733
  size: "sm",
@@ -5724,7 +5737,7 @@ function SortMenu({
5724
5737
  onClick: () => change(moved(active, index, index + 1))
5725
5738
  }
5726
5739
  ),
5727
- /* @__PURE__ */ jsx58(
5740
+ /* @__PURE__ */ jsx59(
5728
5741
  IconButton,
5729
5742
  {
5730
5743
  size: "sm",
@@ -5735,10 +5748,10 @@ function SortMenu({
5735
5748
  )
5736
5749
  ] }, entry.key);
5737
5750
  }) }),
5738
- unused.length > 0 ? /* @__PURE__ */ jsxs49(Fragment12, { children: [
5739
- /* @__PURE__ */ jsx58("span", { className: "fd-overline fd-muted", style: { padding: "10px 8px 6px" }, children: "Add a sort" }),
5751
+ unused.length > 0 ? /* @__PURE__ */ jsxs49(Fragment13, { children: [
5752
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "10px 8px 6px" }, children: "Add a sort" }),
5740
5753
  unused.map((f) => /* @__PURE__ */ jsxs49("span", { className: "fd-row", style: rowStyle(false), children: [
5741
- /* @__PURE__ */ jsx58("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5754
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5742
5755
  arrow(f, "asc", false, () => change([...active, { key: f.key, dir: "asc" }])),
5743
5756
  arrow(f, "desc", false, () => change([...active, { key: f.key, dir: "desc" }]))
5744
5757
  ] }, f.key))
@@ -5755,12 +5768,12 @@ function SortMenu({
5755
5768
  onClick: () => setOpen(!open2),
5756
5769
  children: [
5757
5770
  triggerLabel,
5758
- /* @__PURE__ */ jsx58("i", { className: "ph ph-" + (first && first.dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
5771
+ /* @__PURE__ */ jsx59("i", { className: "ph ph-" + (first && first.dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
5759
5772
  ]
5760
5773
  }
5761
5774
  ),
5762
- /* @__PURE__ */ jsx58(InlinePanelSurface, { panel, align, offset: 6, width: multiple ? 340 : 280, label: "Sort by", children: /* @__PURE__ */ jsx58("span", { className: "fd-stack", style: { gap: 2, padding: 8 }, children: multiple ? multipleBody : /* @__PURE__ */ jsxs49(Fragment12, { children: [
5763
- /* @__PURE__ */ jsx58("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
5775
+ /* @__PURE__ */ jsx59(InlinePanelSurface, { panel, align, offset: 6, width: multiple ? 340 : 280, label: "Sort by", children: /* @__PURE__ */ jsx59("span", { className: "fd-stack", style: { gap: 2, padding: 8 }, children: multiple ? multipleBody : /* @__PURE__ */ jsxs49(Fragment13, { children: [
5776
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
5764
5777
  singleBody
5765
5778
  ] }) }) })
5766
5779
  ] });
@@ -5768,7 +5781,7 @@ function SortMenu({
5768
5781
 
5769
5782
  // src/components/data/StepList.tsx
5770
5783
  import * as React39 from "react";
5771
- import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
5784
+ import { jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
5772
5785
  var KIND_ICON = { tool: "wrench", search: "magnifying-glass", read: "file-text", write: "pencil-simple", reasoning: "brain", run: "terminal", fetch: "cloud-arrow-down" };
5773
5786
  function StepList({
5774
5787
  steps = [],
@@ -5796,8 +5809,8 @@ function StepList({
5796
5809
  };
5797
5810
  return /* @__PURE__ */ jsxs50("div", { className: ["fd-steps", dense ? "is-dense" : "", open2 ? "is-open" : "", className].filter(Boolean).join(" "), children: [
5798
5811
  /* @__PURE__ */ jsxs50("button", { type: "button", className: "fd-steps-head", onClick: toggle, "aria-expanded": open2, children: [
5799
- running ? /* @__PURE__ */ jsx59("span", { className: "fd-steps-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx59("i", { className: "ph ph-" + (failed ? "warning-circle" : "check-circle"), "aria-hidden": "true" }),
5800
- /* @__PURE__ */ jsx59("span", { className: "fd-steps-title", title: truncationTitle(summary), children: summary }),
5812
+ running ? /* @__PURE__ */ jsx60("span", { className: "fd-steps-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx60("i", { className: "ph ph-" + (failed ? "warning-circle" : "check-circle"), "aria-hidden": "true" }),
5813
+ /* @__PURE__ */ jsx60("span", { className: "fd-steps-title", title: truncationTitle(summary), children: summary }),
5801
5814
  /* @__PURE__ */ jsxs50("span", { className: "fd-steps-count fd-tabular", children: [
5802
5815
  steps.length,
5803
5816
  " step",
@@ -5808,15 +5821,15 @@ function StepList({
5808
5821
  " failed"
5809
5822
  ] }) : null
5810
5823
  ] }),
5811
- /* @__PURE__ */ jsx59("i", { className: "ph ph-caret-" + (open2 ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
5824
+ /* @__PURE__ */ jsx60("i", { className: "ph ph-caret-" + (open2 ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
5812
5825
  ] }),
5813
- open2 ? /* @__PURE__ */ jsx59("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
5826
+ open2 ? /* @__PURE__ */ jsx60("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
5814
5827
  const id = s.id || i;
5815
5828
  const isOpen = !!expanded[id];
5816
5829
  const icon = KIND_ICON[s.kind || ""] || "dot-outline";
5817
5830
  return /* @__PURE__ */ jsxs50("li", { className: "fd-step is-" + (s.status || "ok"), children: [
5818
5831
  /* @__PURE__ */ jsxs50("div", { className: "fd-step-row", children: [
5819
- /* @__PURE__ */ jsx59("span", { className: "fd-step-icon", "aria-hidden": "true", children: s.status === "running" ? /* @__PURE__ */ jsx59("span", { className: "fd-steps-spin" }) : /* @__PURE__ */ jsx59("i", { className: "ph ph-" + icon }) }),
5832
+ /* @__PURE__ */ jsx60("span", { className: "fd-step-icon", "aria-hidden": "true", children: s.status === "running" ? /* @__PURE__ */ jsx60("span", { className: "fd-steps-spin" }) : /* @__PURE__ */ jsx60("i", { className: "ph ph-" + icon }) }),
5820
5833
  s.detail ? /* @__PURE__ */ jsxs50(
5821
5834
  "button",
5822
5835
  {
@@ -5825,15 +5838,15 @@ function StepList({
5825
5838
  "aria-expanded": isOpen,
5826
5839
  onClick: () => setExpanded((m) => Object.assign({}, m, { [id]: !isOpen })),
5827
5840
  children: [
5828
- /* @__PURE__ */ jsx59("span", { title: truncationTitle(s.label), children: s.label }),
5829
- /* @__PURE__ */ jsx59("i", { className: "ph ph-caret-" + (isOpen ? "up" : "down"), "aria-hidden": "true" })
5841
+ /* @__PURE__ */ jsx60("span", { title: truncationTitle(s.label), children: s.label }),
5842
+ /* @__PURE__ */ jsx60("i", { className: "ph ph-caret-" + (isOpen ? "up" : "down"), "aria-hidden": "true" })
5830
5843
  ]
5831
5844
  }
5832
- ) : /* @__PURE__ */ jsx59("span", { className: "fd-step-label is-static", title: truncationTitle(s.label), children: s.label }),
5833
- s.status === "error" ? /* @__PURE__ */ jsx59("span", { className: "fd-step-badge is-error", children: "failed" }) : null,
5834
- showDurations && s.durationMs ? /* @__PURE__ */ jsx59("span", { className: "fd-step-dur fd-tabular", children: formatDuration(s.durationMs) }) : null
5845
+ ) : /* @__PURE__ */ jsx60("span", { className: "fd-step-label is-static", title: truncationTitle(s.label), children: s.label }),
5846
+ s.status === "error" ? /* @__PURE__ */ jsx60("span", { className: "fd-step-badge is-error", children: "failed" }) : null,
5847
+ showDurations && s.durationMs ? /* @__PURE__ */ jsx60("span", { className: "fd-step-dur fd-tabular", children: formatDuration(s.durationMs) }) : null
5835
5848
  ] }),
5836
- s.detail && isOpen ? /* @__PURE__ */ jsx59("pre", { className: "fd-step-detail", children: s.detail }) : null
5849
+ s.detail && isOpen ? /* @__PURE__ */ jsx60("pre", { className: "fd-step-detail", children: s.detail }) : null
5837
5850
  ] }, id);
5838
5851
  }) }) : null
5839
5852
  ] });
@@ -5841,7 +5854,7 @@ function StepList({
5841
5854
 
5842
5855
  // src/components/data/VirtualList.tsx
5843
5856
  import * as React40 from "react";
5844
- import { jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
5857
+ import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
5845
5858
  var VIRTUAL_LIST_BUFFER_ROWS = 20;
5846
5859
  var VIRTUAL_LIST_ROW_GAP = 6;
5847
5860
  function computeVirtualWindow(opts) {
@@ -5935,7 +5948,7 @@ function VirtualList({
5935
5948
  }, [items]);
5936
5949
  const gapStyle = { "--fd-vlist-gap": rowGap + "px" };
5937
5950
  if (!items.length && !loading && !refreshing && emptyState) {
5938
- return /* @__PURE__ */ jsx60("div", { className: ["fd-vlist-wrap", className].filter(Boolean).join(" "), style: { height, position: "relative", ...style }, children: /* @__PURE__ */ jsx60("div", { className: "fd-vlist fd-scrollbar", style: { height: "100%", overflow: "auto" }, children: emptyState }) });
5951
+ return /* @__PURE__ */ jsx61("div", { className: ["fd-vlist-wrap", className].filter(Boolean).join(" "), style: { height, position: "relative", ...style }, children: /* @__PURE__ */ jsx61("div", { className: "fd-vlist fd-scrollbar", style: { height: "100%", overflow: "auto" }, children: emptyState }) });
5939
5952
  }
5940
5953
  const rows = [];
5941
5954
  for (let i = win.startIndex; i <= win.endIndex; i++) {
@@ -5943,12 +5956,12 @@ function VirtualList({
5943
5956
  if (item === void 0) continue;
5944
5957
  const key = keyOf(item);
5945
5958
  rows.push(
5946
- /* @__PURE__ */ jsx60(
5959
+ /* @__PURE__ */ jsx61(
5947
5960
  "div",
5948
5961
  {
5949
5962
  className: "fd-vlist-row",
5950
5963
  style: { height: itemHeight, boxSizing: "border-box", transform: "translateY(" + i * itemHeight + "px)" },
5951
- children: /* @__PURE__ */ jsx60("div", { className: newKeys.has(key) ? "fd-vlist-row-content fd-vlist-row-enter" : "fd-vlist-row-content", children: renderItem(item, i) })
5964
+ children: /* @__PURE__ */ jsx61("div", { className: newKeys.has(key) ? "fd-vlist-row-content fd-vlist-row-enter" : "fd-vlist-row-content", children: renderItem(item, i) })
5952
5965
  },
5953
5966
  key
5954
5967
  )
@@ -5962,21 +5975,21 @@ function VirtualList({
5962
5975
  style: { height: "100%", overflowY: "auto", overflowX: "hidden", position: "relative" },
5963
5976
  onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
5964
5977
  children: [
5965
- /* @__PURE__ */ jsx60("div", { style: { height: win.totalHeight, position: "relative" }, children: rows }),
5966
- loading ? /* @__PURE__ */ jsx60("div", { style: { position: "sticky", bottom: 0, left: 0, right: 0, display: "grid", placeItems: "center", padding: "8px 0", background: "var(--surface)" }, children: /* @__PURE__ */ jsx60("span", { className: "fd-spinner", "aria-hidden": "true" }) }) : null
5978
+ /* @__PURE__ */ jsx61("div", { style: { height: win.totalHeight, position: "relative" }, children: rows }),
5979
+ loading ? /* @__PURE__ */ jsx61("div", { style: { position: "sticky", bottom: 0, left: 0, right: 0, display: "grid", placeItems: "center", padding: "8px 0", background: "var(--surface)" }, children: /* @__PURE__ */ jsx61("span", { className: "fd-spinner", "aria-hidden": "true" }) }) : null
5967
5980
  ]
5968
5981
  }
5969
5982
  ),
5970
- refreshing ? /* @__PURE__ */ jsx60("div", { className: "fd-vlist-refresh-scrim", children: /* @__PURE__ */ jsxs51("div", { className: "fd-vlist-refresh-card", children: [
5971
- /* @__PURE__ */ jsx60("span", { className: "fd-spinner", "aria-hidden": "true" }),
5972
- /* @__PURE__ */ jsx60("span", { className: "fd-body-sm", children: refreshingLabel })
5983
+ refreshing ? /* @__PURE__ */ jsx61("div", { className: "fd-vlist-refresh-scrim", children: /* @__PURE__ */ jsxs51("div", { className: "fd-vlist-refresh-card", children: [
5984
+ /* @__PURE__ */ jsx61("span", { className: "fd-spinner", "aria-hidden": "true" }),
5985
+ /* @__PURE__ */ jsx61("span", { className: "fd-body-sm", children: refreshingLabel })
5973
5986
  ] }) }) : null
5974
5987
  ] });
5975
5988
  }
5976
5989
 
5977
5990
  // src/components/data/EntityRow.tsx
5978
5991
  import * as React41 from "react";
5979
- import { jsx as jsx61, jsxs as jsxs52 } from "react/jsx-runtime";
5992
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
5980
5993
  var ENTITY_ROW_METRIC_WIDTH = 74;
5981
5994
  var METRIC_TONE_COLOR = {
5982
5995
  default: "var(--text-2)",
@@ -5984,16 +5997,16 @@ var METRIC_TONE_COLOR = {
5984
5997
  danger: "var(--danger-text)"
5985
5998
  };
5986
5999
  function EntityRowMetrics({ metrics, className = "", style }) {
5987
- return /* @__PURE__ */ jsx61("span", { className: ["fd-erow-metrics", className].filter(Boolean).join(" "), style, children: metrics.map((m, i) => {
6000
+ return /* @__PURE__ */ jsx62("span", { className: ["fd-erow-metrics", className].filter(Boolean).join(" "), style, children: metrics.map((m, i) => {
5988
6001
  const key = m.id || m.label || i;
5989
6002
  const className2 = ["fd-erow-metric", m.tone && m.tone !== "default" ? "is-" + m.tone : "", m.tooltip != null ? "is-described" : ""].filter(Boolean).join(" ");
5990
6003
  const tone = { color: METRIC_TONE_COLOR[m.tone || "default"] };
5991
6004
  const content = /* @__PURE__ */ jsxs52(React41.Fragment, { children: [
5992
- m.icon ? /* @__PURE__ */ jsx61("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }) : null,
5993
- /* @__PURE__ */ jsx61("span", { className: "fd-erow-metric-value fd-tabular", children: m.value }),
5994
- /* @__PURE__ */ jsx61("span", { className: "fd-sr", children: " " + m.label })
6005
+ m.icon ? /* @__PURE__ */ jsx62("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }) : null,
6006
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-metric-value fd-tabular", children: m.value }),
6007
+ /* @__PURE__ */ jsx62("span", { className: "fd-sr", children: " " + m.label })
5995
6008
  ] });
5996
- return /* @__PURE__ */ jsx61("span", { className: "fd-erow-cell", style: { "--erow-metric-w": (m.width || ENTITY_ROW_METRIC_WIDTH) + "px" }, children: m.tooltip == null ? /* @__PURE__ */ jsx61("span", { className: className2, style: tone, title: m.label, children: content }) : /* @__PURE__ */ jsx61(Tooltip, { label: m.tooltip, children: /* @__PURE__ */ jsx61("button", { type: "button", className: className2, style: tone, children: content }) }) }, key);
6009
+ return /* @__PURE__ */ jsx62("span", { className: "fd-erow-cell", style: { "--erow-metric-w": (m.width || ENTITY_ROW_METRIC_WIDTH) + "px" }, children: m.tooltip == null ? /* @__PURE__ */ jsx62("span", { className: className2, style: tone, title: m.label, children: content }) : /* @__PURE__ */ jsx62(Tooltip, { label: m.tooltip, children: /* @__PURE__ */ jsx62("button", { type: "button", className: className2, style: tone, children: content }) }) }, key);
5997
6010
  }) });
5998
6011
  }
5999
6012
  function EntityRow({
@@ -6036,33 +6049,33 @@ function EntityRow({
6036
6049
  // font-size moved to the .fd-erow-grip stylesheet rule, same reason as the
6037
6050
  // row's own padding above: .fd-tlist-footer's indent reads it back as
6038
6051
  // --erow-grip-size.
6039
- /* @__PURE__ */ jsx61("i", { className: "ph ph-dots-six-vertical fd-erow-grip", "aria-hidden": "true", style: { flex: "none", color: "var(--text-muted)" } })
6052
+ /* @__PURE__ */ jsx62("i", { className: "ph ph-dots-six-vertical fd-erow-grip", "aria-hidden": "true", style: { flex: "none", color: "var(--text-muted)" } })
6040
6053
  ) : null,
6041
6054
  /* @__PURE__ */ jsxs52("span", { className: "fd-erow-body", children: [
6042
6055
  /* @__PURE__ */ jsxs52("span", { className: "fd-erow-titleline", children: [
6043
- titleIcon ? /* @__PURE__ */ jsx61(Tooltip, { label: titleIcon.tooltip, children: /* @__PURE__ */ jsxs52(
6056
+ titleIcon ? /* @__PURE__ */ jsx62(Tooltip, { label: titleIcon.tooltip, children: /* @__PURE__ */ jsxs52(
6044
6057
  "button",
6045
6058
  {
6046
6059
  type: "button",
6047
6060
  className: ["fd-erow-title-icon", titleIcon.tone ? "is-" + titleIcon.tone : ""].filter(Boolean).join(" "),
6048
6061
  children: [
6049
- /* @__PURE__ */ jsx61("i", { className: "ph ph-" + titleIcon.icon, "aria-hidden": "true" }),
6050
- /* @__PURE__ */ jsx61("span", { className: "fd-erow-title fd-body-sm", children: title })
6062
+ /* @__PURE__ */ jsx62("i", { className: "ph ph-" + titleIcon.icon, "aria-hidden": "true" }),
6063
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-title fd-body-sm", children: title })
6051
6064
  ]
6052
6065
  }
6053
6066
  ) }) : (
6054
6067
  // MP-141: dense-row identifier, no Tooltip wrapper in this branch — a native
6055
6068
  // `title` is the exposure mechanism, same rule as every other identifier.
6056
- /* @__PURE__ */ jsx61("span", { className: "fd-erow-title fd-body-sm", title: truncationTitle(title), children: title })
6069
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-title fd-body-sm", title: truncationTitle(title), children: title })
6057
6070
  ),
6058
- meta ? /* @__PURE__ */ jsx61("span", { className: "fd-erow-meta", title: truncationTitle(meta), children: meta }) : null
6071
+ meta ? /* @__PURE__ */ jsx62("span", { className: "fd-erow-meta", title: truncationTitle(meta), children: meta }) : null
6059
6072
  ] }),
6060
6073
  hasStrip ? /* @__PURE__ */ jsxs52("span", { className: "fd-erow-strip", children: [
6061
- metrics && metrics.length ? /* @__PURE__ */ jsx61(EntityRowMetrics, { metrics }) : null,
6062
- accessory ? /* @__PURE__ */ jsx61("span", { className: "fd-erow-accessory", children: accessory }) : null
6074
+ metrics && metrics.length ? /* @__PURE__ */ jsx62(EntityRowMetrics, { metrics }) : null,
6075
+ accessory ? /* @__PURE__ */ jsx62("span", { className: "fd-erow-accessory", children: accessory }) : null
6063
6076
  ] }) : null
6064
6077
  ] }),
6065
- action ? /* @__PURE__ */ jsx61(
6078
+ action ? /* @__PURE__ */ jsx62(
6066
6079
  IconButton,
6067
6080
  {
6068
6081
  icon: action.icon,
@@ -6084,7 +6097,7 @@ import * as React42 from "react";
6084
6097
  import { createPortal as createPortal5 } from "react-dom";
6085
6098
 
6086
6099
  // src/components/forms/Input.tsx
6087
- import { jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
6100
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
6088
6101
  function Input({
6089
6102
  label,
6090
6103
  help,
@@ -6112,23 +6125,23 @@ function Input({
6112
6125
  size === "lg" ? "fd-input-lg" : ""
6113
6126
  ].filter(Boolean).join(" ");
6114
6127
  return /* @__PURE__ */ jsxs53("div", { className: ["fd-field", className].filter(Boolean).join(" "), style, children: [
6115
- label ? /* @__PURE__ */ jsx62(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
6128
+ label ? /* @__PURE__ */ jsx63(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
6116
6129
  /* @__PURE__ */ jsxs53("div", { className: box, children: [
6117
- icon ? /* @__PURE__ */ jsx62("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx62("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
6118
- prefix ? /* @__PURE__ */ jsx62("span", { className: "fd-input-affix", children: prefix }) : null,
6119
- /* @__PURE__ */ jsx62("input", { id: fieldId, disabled, style: inputStyle, "aria-invalid": error ? "true" : void 0, ...rest }),
6120
- loading ? /* @__PURE__ */ jsx62("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading" }) : null,
6121
- suffix && !loading ? /* @__PURE__ */ jsx62("span", { className: "fd-input-affix", children: suffix }) : null
6130
+ icon ? /* @__PURE__ */ jsx63("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
6131
+ prefix ? /* @__PURE__ */ jsx63("span", { className: "fd-input-affix", children: prefix }) : null,
6132
+ /* @__PURE__ */ jsx63("input", { id: fieldId, disabled, style: inputStyle, "aria-invalid": error ? "true" : void 0, ...rest }),
6133
+ loading ? /* @__PURE__ */ jsx63("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading" }) : null,
6134
+ suffix && !loading ? /* @__PURE__ */ jsx63("span", { className: "fd-input-affix", children: suffix }) : null
6122
6135
  ] }),
6123
6136
  error ? /* @__PURE__ */ jsxs53("span", { className: "fd-field-error", children: [
6124
- /* @__PURE__ */ jsx62("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6137
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6125
6138
  error
6126
- ] }) : help ? /* @__PURE__ */ jsx62("span", { className: "fd-field-help", children: help }) : null
6139
+ ] }) : help ? /* @__PURE__ */ jsx63("span", { className: "fd-field-help", children: help }) : null
6127
6140
  ] });
6128
6141
  }
6129
6142
 
6130
6143
  // src/components/forms/SearchField.tsx
6131
- import { jsx as jsx63 } from "react/jsx-runtime";
6144
+ import { jsx as jsx64 } from "react/jsx-runtime";
6132
6145
  function SearchField({
6133
6146
  value,
6134
6147
  onChange,
@@ -6143,7 +6156,7 @@ function SearchField({
6143
6156
  ...rest
6144
6157
  }) {
6145
6158
  const clear = onClear || (() => onChange(""));
6146
- return /* @__PURE__ */ jsx63(
6159
+ return /* @__PURE__ */ jsx64(
6147
6160
  Input,
6148
6161
  {
6149
6162
  id,
@@ -6156,14 +6169,14 @@ function SearchField({
6156
6169
  style,
6157
6170
  className,
6158
6171
  onChange: (e) => onChange(e.target.value),
6159
- suffix: value ? /* @__PURE__ */ jsx63(
6172
+ suffix: value ? /* @__PURE__ */ jsx64(
6160
6173
  "button",
6161
6174
  {
6162
6175
  type: "button",
6163
6176
  "aria-label": "Clear search",
6164
6177
  onClick: clear,
6165
6178
  style: { all: "unset", cursor: "pointer", color: "var(--text-muted)", display: "grid", placeItems: "center", padding: 2 },
6166
- children: /* @__PURE__ */ jsx63("i", { className: "ph ph-x-circle", style: { fontSize: 15 }, "aria-hidden": "true" })
6179
+ children: /* @__PURE__ */ jsx64("i", { className: "ph ph-x-circle", style: { fontSize: 15 }, "aria-hidden": "true" })
6167
6180
  }
6168
6181
  ) : void 0,
6169
6182
  ...rest
@@ -6172,7 +6185,7 @@ function SearchField({
6172
6185
  }
6173
6186
 
6174
6187
  // src/components/data/TransferList.tsx
6175
- import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
6188
+ import { jsx as jsx65, jsxs as jsxs54 } from "react/jsx-runtime";
6176
6189
  var emptyHasMore = {};
6177
6190
  var DRAG_THRESHOLD_PX = 5;
6178
6191
  function TransferList({
@@ -6297,12 +6310,12 @@ function TransferList({
6297
6310
  cfg.label,
6298
6311
  cfg.total != null ? " (" + cfg.total.toLocaleString() + ")" : ""
6299
6312
  ] }) : null,
6300
- cfg.header ? /* @__PURE__ */ jsx64("div", { className: "fd-tlist-header", children: cfg.header }) : null,
6313
+ cfg.header ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-header", children: cfg.header }) : null,
6301
6314
  /* @__PURE__ */ jsxs54("span", { className: "fd-row", style: { gap: 8 }, children: [
6302
- /* @__PURE__ */ jsx64(SearchField, { value: cfg.search, onChange: cfg.onSearchChange, placeholder: "Search", "aria-label": (cfg.label || side) + " search", style: { flex: 1 } }),
6303
- /* @__PURE__ */ jsx64(SortMenu, { fields: cfg.sortFields, sort: cfg.sort ? [cfg.sort] : [], onSortChange: (next) => next[0] && cfg.onSort(next[0].key, next[0].dir), align: side === "left" ? "left" : "right" })
6315
+ /* @__PURE__ */ jsx65(SearchField, { value: cfg.search, onChange: cfg.onSearchChange, placeholder: "Search", "aria-label": (cfg.label || side) + " search", style: { flex: 1 } }),
6316
+ /* @__PURE__ */ jsx65(SortMenu, { fields: cfg.sortFields, sort: cfg.sort ? [cfg.sort] : [], onSortChange: (next) => next[0] && cfg.onSort(next[0].key, next[0].dir), align: side === "left" ? "left" : "right" })
6304
6317
  ] }),
6305
- /* @__PURE__ */ jsx64(
6318
+ /* @__PURE__ */ jsx65(
6306
6319
  VirtualList,
6307
6320
  {
6308
6321
  items: cfg.items,
@@ -6316,15 +6329,15 @@ function TransferList({
6316
6329
  firstItemIndex: cfg.firstItemIndex,
6317
6330
  totalCount: cfg.totalCount,
6318
6331
  onNeedMore: cfg.onNeedMore,
6319
- emptyState: /* @__PURE__ */ jsx64(EmptyState, { icon: "tray", title: "Nothing here" }),
6332
+ emptyState: /* @__PURE__ */ jsx65(EmptyState, { icon: "tray", title: "Nothing here" }),
6320
6333
  renderItem: (item) => {
6321
6334
  const isBeingDragged = drag != null && drag.from === side && drag.key === keyOf(item);
6322
6335
  if (isBeingDragged) {
6323
- return /* @__PURE__ */ jsx64("div", { className: "fd-erow-placeholder", "aria-hidden": "true" });
6336
+ return /* @__PURE__ */ jsx65("div", { className: "fd-erow-placeholder", "aria-hidden": "true" });
6324
6337
  }
6325
6338
  const content = renderRow(item);
6326
6339
  const destination = (side === "left" ? right : left).label || "the other list";
6327
- return /* @__PURE__ */ jsx64(
6340
+ return /* @__PURE__ */ jsx65(
6328
6341
  EntityRow,
6329
6342
  {
6330
6343
  ...content,
@@ -6344,10 +6357,10 @@ function TransferList({
6344
6357
  }
6345
6358
  }
6346
6359
  ),
6347
- cfg.footer ? /* @__PURE__ */ jsx64("div", { className: "fd-tlist-footer", children: cfg.footer }) : null,
6348
- showOverlay ? /* @__PURE__ */ jsx64("div", { className: "fd-tlist-drop-overlay", "aria-hidden": "true", children: /* @__PURE__ */ jsxs54("span", { className: "fd-tlist-drop-card", children: [
6349
- /* @__PURE__ */ jsx64("i", { className: "ph ph-tray-arrow-down", style: { fontSize: 18 }, "aria-hidden": "true" }),
6350
- /* @__PURE__ */ jsx64("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: cfg.dropLabel || "Drop here" + (cfg.label ? " \u2014 " + cfg.label : "") })
6360
+ cfg.footer ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-footer", children: cfg.footer }) : null,
6361
+ showOverlay ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-drop-overlay", "aria-hidden": "true", children: /* @__PURE__ */ jsxs54("span", { className: "fd-tlist-drop-card", children: [
6362
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-tray-arrow-down", style: { fontSize: 18 }, "aria-hidden": "true" }),
6363
+ /* @__PURE__ */ jsx65("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: cfg.dropLabel || "Drop here" + (cfg.label ? " \u2014 " + cfg.label : "") })
6351
6364
  ] }) }) : null
6352
6365
  ]
6353
6366
  }
@@ -6359,7 +6372,7 @@ function TransferList({
6359
6372
  renderSide("right", right, "left")
6360
6373
  ] }),
6361
6374
  drag ? createPortal5(
6362
- /* @__PURE__ */ jsx64(
6375
+ /* @__PURE__ */ jsx65(
6363
6376
  "div",
6364
6377
  {
6365
6378
  "aria-hidden": "true",
@@ -6374,7 +6387,7 @@ function TransferList({
6374
6387
  pointerEvents: "none",
6375
6388
  zIndex: OVERLAY_CEILING
6376
6389
  },
6377
- children: /* @__PURE__ */ jsx64(EntityRow, { ...renderRow(drag.item), draggable: true, className: "fd-erow-dragging" })
6390
+ children: /* @__PURE__ */ jsx65(EntityRow, { ...renderRow(drag.item), draggable: true, className: "fd-erow-dragging" })
6378
6391
  }
6379
6392
  ),
6380
6393
  document.body
@@ -6383,11 +6396,11 @@ function TransferList({
6383
6396
  }
6384
6397
 
6385
6398
  // src/components/data/FactList.tsx
6386
- import { jsx as jsx65, jsxs as jsxs55 } from "react/jsx-runtime";
6399
+ import { jsx as jsx66, jsxs as jsxs55 } from "react/jsx-runtime";
6387
6400
  function FactList({ facts = [], className = "", ...rest }) {
6388
- return /* @__PURE__ */ jsx65("div", { className: ["fd-facts", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ jsx65("dl", { className: "fd-facts-grid", children: facts.map((f) => /* @__PURE__ */ jsxs55("div", { className: "fd-fact", children: [
6389
- /* @__PURE__ */ jsx65("dt", { className: "fd-fact-label", children: f.label }),
6390
- /* @__PURE__ */ jsx65("dd", { className: "fd-fact-value", children: f.value })
6401
+ return /* @__PURE__ */ jsx66("div", { className: ["fd-facts", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ jsx66("dl", { className: "fd-facts-grid", children: facts.map((f) => /* @__PURE__ */ jsxs55("div", { className: "fd-fact", children: [
6402
+ /* @__PURE__ */ jsx66("dt", { className: "fd-fact-label", children: f.label }),
6403
+ /* @__PURE__ */ jsx66("dd", { className: "fd-fact-value", children: f.value })
6391
6404
  ] }, f.label)) }) });
6392
6405
  }
6393
6406
 
@@ -6477,7 +6490,7 @@ function useUsStateShapes() {
6477
6490
  }
6478
6491
 
6479
6492
  // src/components/data/USChoropleth.tsx
6480
- import { jsx as jsx66, jsxs as jsxs56 } from "react/jsx-runtime";
6493
+ import { jsx as jsx67, jsxs as jsxs56 } from "react/jsx-runtime";
6481
6494
  var TABLE_TITLE = "Show as a table";
6482
6495
  function legendLabel({ from, to }, formatValue) {
6483
6496
  if (from === 0) return `Up to ${formatValue(to)}`;
@@ -6486,11 +6499,11 @@ function legendLabel({ from, to }, formatValue) {
6486
6499
  function Legend({ model, formatValue }) {
6487
6500
  return /* @__PURE__ */ jsxs56("ul", { className: "fd-uschoro-legend", "aria-label": "Legend", children: [
6488
6501
  /* @__PURE__ */ jsxs56("li", { children: [
6489
- /* @__PURE__ */ jsx66("span", { className: "fd-uschoro-swatch", "data-step": "none", "aria-hidden": "true" }),
6502
+ /* @__PURE__ */ jsx67("span", { className: "fd-uschoro-swatch", "data-step": "none", "aria-hidden": "true" }),
6490
6503
  "None"
6491
6504
  ] }),
6492
6505
  legendSteps(model.bounds).map((step) => /* @__PURE__ */ jsxs56("li", { children: [
6493
- /* @__PURE__ */ jsx66("span", { className: "fd-uschoro-swatch", "data-step": step.step, "aria-hidden": "true" }),
6506
+ /* @__PURE__ */ jsx67("span", { className: "fd-uschoro-swatch", "data-step": step.step, "aria-hidden": "true" }),
6494
6507
  legendLabel(step, formatValue)
6495
6508
  ] }, step.step))
6496
6509
  ] });
@@ -6518,7 +6531,7 @@ function StateMap({ shapes, model, figures, label, formatReadout }) {
6518
6531
  const figure = figures.get(shape.code);
6519
6532
  const readout = formatReadout(figure);
6520
6533
  const binding = tip.bind(shape.code, readout);
6521
- return /* @__PURE__ */ jsx66(
6534
+ return /* @__PURE__ */ jsx67(
6522
6535
  "path",
6523
6536
  {
6524
6537
  className: "fd-uschoro-state",
@@ -6537,7 +6550,7 @@ function StateMap({ shapes, model, figures, label, formatReadout }) {
6537
6550
  shape.code
6538
6551
  );
6539
6552
  }),
6540
- active ? /* @__PURE__ */ jsx66("path", { className: "fd-uschoro-active", d: active.path, "aria-hidden": "true" }) : null
6553
+ active ? /* @__PURE__ */ jsx67("path", { className: "fd-uschoro-active", d: active.path, "aria-hidden": "true" }) : null
6541
6554
  ] }),
6542
6555
  tip.bubble
6543
6556
  ] });
@@ -6548,7 +6561,7 @@ function StateTable({ model, valueLabel, formatValue }) {
6548
6561
  { key: "value", label: valueLabel, numeric: true, phone: "secondary", render: (row) => formatValue(row.value) },
6549
6562
  { key: "share", label: "Share of total", numeric: true, phone: "secondary", render: (row) => formatShare(row.share) }
6550
6563
  ];
6551
- return /* @__PURE__ */ jsx66(Collapsible, { title: TABLE_TITLE, children: /* @__PURE__ */ jsx66(DataTable, { columns, rows: model.rows, rowKey: "code", compact: true }) });
6564
+ return /* @__PURE__ */ jsx67(Collapsible, { title: TABLE_TITLE, children: /* @__PURE__ */ jsx67(DataTable, { columns, rows: model.rows, rowKey: "code", compact: true }) });
6552
6565
  }
6553
6566
  function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, topN, total, className = "" }) {
6554
6567
  const model = React44.useMemo(() => buildChoroplethModel(values, topN ?? 0, total), [values, topN, total]);
@@ -6557,20 +6570,20 @@ function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, t
6557
6570
  return /* @__PURE__ */ jsxs56("div", { className: ["fd-uschoro", className].filter(Boolean).join(" "), children: [
6558
6571
  /* @__PURE__ */ jsxs56("div", { className: "fd-uschoro-layout", children: [
6559
6572
  /* @__PURE__ */ jsxs56("div", { className: "fd-uschoro-main", children: [
6560
- /* @__PURE__ */ jsx66(
6573
+ /* @__PURE__ */ jsx67(
6561
6574
  LoadingRegion,
6562
6575
  {
6563
6576
  state: state.status,
6564
6577
  label: `${label} loading`,
6565
6578
  error: state.status === "error" ? state.message : void 0,
6566
6579
  onRetry: retry,
6567
- skeleton: /* @__PURE__ */ jsx66("div", { className: "fd-uschoro-skeleton", children: /* @__PURE__ */ jsx66(Skeleton, { h: "100%" }) }),
6568
- children: state.status === "ready" ? /* @__PURE__ */ jsx66(StateMap, { shapes: state.shapes, model, figures, label, formatReadout }) : null
6580
+ skeleton: /* @__PURE__ */ jsx67("div", { className: "fd-uschoro-skeleton", children: /* @__PURE__ */ jsx67(Skeleton, { h: "100%" }) }),
6581
+ children: state.status === "ready" ? /* @__PURE__ */ jsx67(StateMap, { shapes: state.shapes, model, figures, label, formatReadout }) : null
6569
6582
  }
6570
6583
  ),
6571
- /* @__PURE__ */ jsx66(Legend, { model, formatValue })
6584
+ /* @__PURE__ */ jsx67(Legend, { model, formatValue })
6572
6585
  ] }),
6573
- topN ? /* @__PURE__ */ jsx66("div", { className: "fd-uschoro-top", children: /* @__PURE__ */ jsx66(
6586
+ topN ? /* @__PURE__ */ jsx67("div", { className: "fd-uschoro-top", children: /* @__PURE__ */ jsx67(
6574
6587
  BarList,
6575
6588
  {
6576
6589
  label: `Top ${topN} states`,
@@ -6582,13 +6595,13 @@ function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, t
6582
6595
  }
6583
6596
  ) }) : null
6584
6597
  ] }),
6585
- /* @__PURE__ */ jsx66(StateTable, { model, valueLabel, formatValue })
6598
+ /* @__PURE__ */ jsx67(StateTable, { model, valueLabel, formatValue })
6586
6599
  ] });
6587
6600
  }
6588
6601
 
6589
6602
  // src/components/forms/Checkbox.tsx
6590
6603
  import * as React45 from "react";
6591
- import { jsx as jsx67, jsxs as jsxs57 } from "react/jsx-runtime";
6604
+ import { jsx as jsx68, jsxs as jsxs57 } from "react/jsx-runtime";
6592
6605
  function Checkbox({ label, description, card = false, indeterminate = false, className = "", ...rest }) {
6593
6606
  const ref = React45.useRef(null);
6594
6607
  React45.useEffect(() => {
@@ -6596,47 +6609,47 @@ function Checkbox({ label, description, card = false, indeterminate = false, cla
6596
6609
  }, [indeterminate]);
6597
6610
  return /* @__PURE__ */ jsxs57("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
6598
6611
  /* @__PURE__ */ jsxs57("span", { className: "fd-choice-input", children: [
6599
- /* @__PURE__ */ jsx67("input", { ref, type: "checkbox", ...rest }),
6600
- /* @__PURE__ */ jsx67("span", { className: "fd-choice-box", "aria-hidden": "true", children: /* @__PURE__ */ jsx67("i", { className: indeterminate ? "ph ph-minus" : "ph ph-check" }) })
6612
+ /* @__PURE__ */ jsx68("input", { ref, type: "checkbox", ...rest }),
6613
+ /* @__PURE__ */ jsx68("span", { className: "fd-choice-box", "aria-hidden": "true", children: /* @__PURE__ */ jsx68("i", { className: indeterminate ? "ph ph-minus" : "ph ph-check" }) })
6601
6614
  ] }),
6602
6615
  /* @__PURE__ */ jsxs57("span", { className: "fd-choice-text", children: [
6603
- /* @__PURE__ */ jsx67("span", { className: "fd-choice-title", children: label }),
6604
- description ? /* @__PURE__ */ jsx67("span", { className: "fd-choice-desc", children: description }) : null
6616
+ /* @__PURE__ */ jsx68("span", { className: "fd-choice-title", children: label }),
6617
+ description ? /* @__PURE__ */ jsx68("span", { className: "fd-choice-desc", children: description }) : null
6605
6618
  ] })
6606
6619
  ] });
6607
6620
  }
6608
6621
 
6609
6622
  // src/components/forms/Radio.tsx
6610
- import { jsx as jsx68, jsxs as jsxs58 } from "react/jsx-runtime";
6623
+ import { jsx as jsx69, jsxs as jsxs58 } from "react/jsx-runtime";
6611
6624
  function Radio({ label, description, card = false, className = "", ...rest }) {
6612
6625
  return /* @__PURE__ */ jsxs58("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
6613
6626
  /* @__PURE__ */ jsxs58("span", { className: "fd-choice-input", children: [
6614
- /* @__PURE__ */ jsx68("input", { type: "radio", ...rest }),
6615
- /* @__PURE__ */ jsx68("span", { className: "fd-choice-box fd-choice-box-round", "aria-hidden": "true", children: /* @__PURE__ */ jsx68("span", { className: "fd-choice-dot" }) })
6627
+ /* @__PURE__ */ jsx69("input", { type: "radio", ...rest }),
6628
+ /* @__PURE__ */ jsx69("span", { className: "fd-choice-box fd-choice-box-round", "aria-hidden": "true", children: /* @__PURE__ */ jsx69("span", { className: "fd-choice-dot" }) })
6616
6629
  ] }),
6617
6630
  /* @__PURE__ */ jsxs58("span", { className: "fd-choice-text", children: [
6618
- /* @__PURE__ */ jsx68("span", { className: "fd-choice-title", children: label }),
6619
- description ? /* @__PURE__ */ jsx68("span", { className: "fd-choice-desc", children: description }) : null
6631
+ /* @__PURE__ */ jsx69("span", { className: "fd-choice-title", children: label }),
6632
+ description ? /* @__PURE__ */ jsx69("span", { className: "fd-choice-desc", children: description }) : null
6620
6633
  ] })
6621
6634
  ] });
6622
6635
  }
6623
6636
 
6624
6637
  // src/components/forms/Switch.tsx
6625
- import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
6638
+ import { jsx as jsx70, jsxs as jsxs59 } from "react/jsx-runtime";
6626
6639
  function Switch({ label, description, className = "", ...rest }) {
6627
6640
  return /* @__PURE__ */ jsxs59("label", { className: ["fd-switch", className].filter(Boolean).join(" "), children: [
6628
- /* @__PURE__ */ jsx69("input", { type: "checkbox", role: "switch", ...rest }),
6629
- /* @__PURE__ */ jsx69("span", { className: "fd-switch-track", children: /* @__PURE__ */ jsx69("span", { className: "fd-switch-thumb" }) }),
6641
+ /* @__PURE__ */ jsx70("input", { type: "checkbox", role: "switch", ...rest }),
6642
+ /* @__PURE__ */ jsx70("span", { className: "fd-switch-track", children: /* @__PURE__ */ jsx70("span", { className: "fd-switch-thumb" }) }),
6630
6643
  label ? /* @__PURE__ */ jsxs59("span", { className: "fd-choice-text", children: [
6631
- /* @__PURE__ */ jsx69("span", { className: "fd-switch-label", children: label }),
6632
- description ? /* @__PURE__ */ jsx69("span", { className: "fd-choice-desc", children: description }) : null
6644
+ /* @__PURE__ */ jsx70("span", { className: "fd-switch-label", children: label }),
6645
+ description ? /* @__PURE__ */ jsx70("span", { className: "fd-choice-desc", children: description }) : null
6633
6646
  ] }) : null
6634
6647
  ] });
6635
6648
  }
6636
6649
 
6637
6650
  // src/components/forms/Select.tsx
6638
6651
  import * as React46 from "react";
6639
- import { jsx as jsx70, jsxs as jsxs60 } from "react/jsx-runtime";
6652
+ import { jsx as jsx71, jsxs as jsxs60 } from "react/jsx-runtime";
6640
6653
  var norm = (o) => typeof o === "string" ? { value: o, label: o } : o;
6641
6654
  function Select({
6642
6655
  label,
@@ -6737,7 +6750,7 @@ function Select({
6737
6750
  });
6738
6751
  const box = ["fd-input", "fd-select", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
6739
6752
  return /* @__PURE__ */ jsxs60("div", { className: ["fd-field", "fd-popfield", open2 ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
6740
- label ? /* @__PURE__ */ jsx70(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : /* @__PURE__ */ jsx70(HiddenFieldLabel, { id: labelId, children: hiddenLabel }),
6753
+ label ? /* @__PURE__ */ jsx71(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : /* @__PURE__ */ jsx71(HiddenFieldLabel, { id: labelId, children: hiddenLabel }),
6741
6754
  /* @__PURE__ */ jsxs60("div", { className: box, style: { cursor: disabled ? "not-allowed" : "pointer" }, ref: boxRef, children: [
6742
6755
  /* @__PURE__ */ jsxs60(
6743
6756
  "button",
@@ -6753,13 +6766,13 @@ function Select({
6753
6766
  "aria-labelledby": ariaLabelledBy,
6754
6767
  style: { all: "unset", flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 8, cursor: "inherit", overflow: "hidden" },
6755
6768
  children: [
6756
- selected && selected.icon ? /* @__PURE__ */ jsx70("i", { className: "ph ph-" + selected.icon, style: { flex: "none", color: "var(--text-2)" } }) : null,
6757
- /* @__PURE__ */ jsx70("span", { title: truncationTitle(boxText), style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: (multiple ? chosen.length : selected) ? "var(--text)" : "var(--text-muted)" }, children: boxText }),
6758
- multiple && chosen.length > 1 ? /* @__PURE__ */ jsx70("span", { className: "fd-mono", style: { flex: "none", fontSize: 11, fontWeight: 700, padding: "1px 6px", borderRadius: 99, background: "var(--brand)", color: "#fff" }, children: chosen.length }) : null
6769
+ selected && selected.icon ? /* @__PURE__ */ jsx71("i", { className: "ph ph-" + selected.icon, style: { flex: "none", color: "var(--text-2)" } }) : null,
6770
+ /* @__PURE__ */ jsx71("span", { title: truncationTitle(boxText), style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: (multiple ? chosen.length : selected) ? "var(--text)" : "var(--text-muted)" }, children: boxText }),
6771
+ multiple && chosen.length > 1 ? /* @__PURE__ */ jsx71("span", { className: "fd-mono", style: { flex: "none", fontSize: 11, fontWeight: 700, padding: "1px 6px", borderRadius: 99, background: "var(--brand)", color: "#fff" }, children: chosen.length }) : null
6759
6772
  ]
6760
6773
  }
6761
6774
  ),
6762
- clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx70(
6775
+ clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx71(
6763
6776
  "button",
6764
6777
  {
6765
6778
  type: "button",
@@ -6769,12 +6782,12 @@ function Select({
6769
6782
  fire(multiple ? [] : "");
6770
6783
  },
6771
6784
  style: { all: "unset", cursor: "pointer", color: "var(--text-muted)", display: "grid", placeItems: "center", padding: 2 },
6772
- children: /* @__PURE__ */ jsx70("i", { className: "ph ph-x-circle", style: { fontSize: 15 } })
6785
+ children: /* @__PURE__ */ jsx71("i", { className: "ph ph-x-circle", style: { fontSize: 15 } })
6773
6786
  }
6774
6787
  ) : null,
6775
- loading ? /* @__PURE__ */ jsx70("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading options" }) : /* @__PURE__ */ jsx70("span", { className: "fd-select-caret", onClick: toggle, children: /* @__PURE__ */ jsx70("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
6788
+ loading ? /* @__PURE__ */ jsx71("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading options" }) : /* @__PURE__ */ jsx71("span", { className: "fd-select-caret", onClick: toggle, children: /* @__PURE__ */ jsx71("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
6776
6789
  ] }),
6777
- /* @__PURE__ */ jsx70(
6790
+ /* @__PURE__ */ jsx71(
6778
6791
  Popover,
6779
6792
  {
6780
6793
  open: open2,
@@ -6788,8 +6801,8 @@ function Select({
6788
6801
  role: "presentation",
6789
6802
  style: { maxWidth: 380 },
6790
6803
  header: hasSearch ? /* @__PURE__ */ jsxs60("div", { className: "fd-pop-search", children: [
6791
- /* @__PURE__ */ jsx70("i", { className: "ph ph-magnifying-glass", style: { color: "var(--text-muted)", fontSize: 14 } }),
6792
- /* @__PURE__ */ jsx70(
6804
+ /* @__PURE__ */ jsx71("i", { className: "ph ph-magnifying-glass", style: { color: "var(--text-muted)", fontSize: 14 } }),
6805
+ /* @__PURE__ */ jsx71(
6793
6806
  "input",
6794
6807
  {
6795
6808
  autoFocus: true,
@@ -6802,10 +6815,10 @@ function Select({
6802
6815
  }
6803
6816
  }
6804
6817
  ),
6805
- q ? /* @__PURE__ */ jsx70("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
6818
+ q ? /* @__PURE__ */ jsx71("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
6806
6819
  ] }) : void 0,
6807
6820
  footer: multiple ? /* @__PURE__ */ jsxs60(React46.Fragment, { children: [
6808
- /* @__PURE__ */ jsx70(
6821
+ /* @__PURE__ */ jsx71(
6809
6822
  "button",
6810
6823
  {
6811
6824
  type: "button",
@@ -6814,13 +6827,13 @@ function Select({
6814
6827
  children: "Select all"
6815
6828
  }
6816
6829
  ),
6817
- /* @__PURE__ */ jsx70("span", { style: { flex: 1 } }),
6830
+ /* @__PURE__ */ jsx71("span", { style: { flex: 1 } }),
6818
6831
  /* @__PURE__ */ jsxs60("span", { className: "fd-body-sm fd-muted", children: [
6819
6832
  vals.length,
6820
6833
  " of ",
6821
6834
  opts.length
6822
6835
  ] }),
6823
- /* @__PURE__ */ jsx70(
6836
+ /* @__PURE__ */ jsx71(
6824
6837
  "button",
6825
6838
  {
6826
6839
  type: "button",
@@ -6831,12 +6844,12 @@ function Select({
6831
6844
  }
6832
6845
  )
6833
6846
  ] }) : void 0,
6834
- children: /* @__PURE__ */ jsx70("div", { className: "fd-pop-list", role: "listbox", "aria-multiselectable": multiple || void 0, ref: listRef, children: visible.length === 0 ? /* @__PURE__ */ jsxs60("div", { className: "fd-pop-empty", children: [
6847
+ children: /* @__PURE__ */ jsx71("div", { className: "fd-pop-list", role: "listbox", "aria-multiselectable": multiple || void 0, ref: listRef, children: visible.length === 0 ? /* @__PURE__ */ jsxs60("div", { className: "fd-pop-empty", children: [
6835
6848
  'Nothing matches "',
6836
6849
  q,
6837
6850
  '".'
6838
6851
  ] }) : groups.map((grp) => /* @__PURE__ */ jsxs60(React46.Fragment, { children: [
6839
- grp.g ? /* @__PURE__ */ jsx70("div", { className: "fd-pop-group", children: grp.g }) : null,
6852
+ grp.g ? /* @__PURE__ */ jsx71("div", { className: "fd-pop-group", children: grp.g }) : null,
6840
6853
  grp.items.map(({ o, i }) => /* @__PURE__ */ jsxs60(
6841
6854
  "button",
6842
6855
  {
@@ -6849,14 +6862,14 @@ function Select({
6849
6862
  onMouseEnter: () => nav.setActive(i),
6850
6863
  onClick: () => pick(o),
6851
6864
  children: [
6852
- multiple ? /* @__PURE__ */ jsx70("span", { "aria-hidden": "true", style: { flex: "none", display: "grid", placeItems: "center", width: 16, height: 16, borderRadius: 4, border: "1.5px solid " + (isOn(o.value) ? "var(--brand)" : "var(--border-strong, var(--border))"), background: isOn(o.value) ? "var(--brand)" : "var(--surface)", color: "#fff" }, children: isOn(o.value) ? /* @__PURE__ */ jsx70("i", { className: "ph ph-check", style: { fontSize: 11 } }) : null }) : null,
6853
- o.icon ? /* @__PURE__ */ jsx70("span", { className: "fd-opt-icon", children: /* @__PURE__ */ jsx70("i", { className: "ph ph-" + o.icon }) }) : null,
6865
+ multiple ? /* @__PURE__ */ jsx71("span", { "aria-hidden": "true", style: { flex: "none", display: "grid", placeItems: "center", width: 16, height: 16, borderRadius: 4, border: "1.5px solid " + (isOn(o.value) ? "var(--brand)" : "var(--border-strong, var(--border))"), background: isOn(o.value) ? "var(--brand)" : "var(--surface)", color: "#fff" }, children: isOn(o.value) ? /* @__PURE__ */ jsx71("i", { className: "ph ph-check", style: { fontSize: 11 } }) : null }) : null,
6866
+ o.icon ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-icon", children: /* @__PURE__ */ jsx71("i", { className: "ph ph-" + o.icon }) }) : null,
6854
6867
  /* @__PURE__ */ jsxs60("span", { style: { flex: 1, minWidth: 0 }, children: [
6855
- /* @__PURE__ */ jsx70("span", { className: "fd-opt-label", children: o.label }),
6856
- o.description ? /* @__PURE__ */ jsx70("span", { className: "fd-opt-desc", children: o.description }) : null
6868
+ /* @__PURE__ */ jsx71("span", { className: "fd-opt-label", children: o.label }),
6869
+ o.description ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-desc", children: o.description }) : null
6857
6870
  ] }),
6858
- o.meta ? /* @__PURE__ */ jsx70("span", { className: "fd-opt-meta", children: o.meta }) : null,
6859
- multiple ? null : /* @__PURE__ */ jsx70("span", { className: "fd-opt-check", children: o.value === value ? /* @__PURE__ */ jsx70("i", { className: "ph ph-check" }) : null })
6871
+ o.meta ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-meta", children: o.meta }) : null,
6872
+ multiple ? null : /* @__PURE__ */ jsx71("span", { className: "fd-opt-check", children: o.value === value ? /* @__PURE__ */ jsx71("i", { className: "ph ph-check" }) : null })
6860
6873
  ]
6861
6874
  },
6862
6875
  String(o.value)
@@ -6865,15 +6878,15 @@ function Select({
6865
6878
  }
6866
6879
  ),
6867
6880
  error ? /* @__PURE__ */ jsxs60("span", { className: "fd-field-error", children: [
6868
- /* @__PURE__ */ jsx70("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6881
+ /* @__PURE__ */ jsx71("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6869
6882
  error
6870
- ] }) : help ? /* @__PURE__ */ jsx70("span", { className: "fd-field-help", children: help }) : null
6883
+ ] }) : help ? /* @__PURE__ */ jsx71("span", { className: "fd-field-help", children: help }) : null
6871
6884
  ] });
6872
6885
  }
6873
6886
 
6874
6887
  // src/components/forms/TimePicker.tsx
6875
6888
  import * as React47 from "react";
6876
- import { jsx as jsx71, jsxs as jsxs61 } from "react/jsx-runtime";
6889
+ import { jsx as jsx72, jsxs as jsxs61 } from "react/jsx-runtime";
6877
6890
  var pad = (n) => String(n).padStart(2, "0");
6878
6891
  function ClockFace({ value = "09:00", onChange }) {
6879
6892
  let [h24, m] = value.split(":").map(Number);
@@ -6920,10 +6933,10 @@ function ClockFace({ value = "09:00", onChange }) {
6920
6933
  const minuteOff = mode2 === "m" && m % 5 !== 0;
6921
6934
  return /* @__PURE__ */ jsxs61("div", { style: { padding: "4px 14px 14px" }, children: [
6922
6935
  /* @__PURE__ */ jsxs61("div", { className: "fd-clock-digits", children: [
6923
- /* @__PURE__ */ jsx71("button", { type: "button", className: "fd-clock-digit" + (mode2 === "h" ? " is-active" : ""), onClick: () => setMode("h"), children: pad(h12) }),
6924
- /* @__PURE__ */ jsx71("span", { style: { fontSize: 24, fontWeight: 700, color: "var(--text-muted)" }, children: ":" }),
6925
- /* @__PURE__ */ jsx71("button", { type: "button", className: "fd-clock-digit" + (mode2 === "m" ? " is-active" : ""), onClick: () => setMode("m"), children: pad(m) }),
6926
- /* @__PURE__ */ jsx71("span", { className: "fd-stack", style: { gap: 3, marginLeft: 8 }, children: ["AM", "PM"].map((ap) => /* @__PURE__ */ jsx71(
6936
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-clock-digit" + (mode2 === "h" ? " is-active" : ""), onClick: () => setMode("h"), children: pad(h12) }),
6937
+ /* @__PURE__ */ jsx72("span", { style: { fontSize: 24, fontWeight: 700, color: "var(--text-muted)" }, children: ":" }),
6938
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-clock-digit" + (mode2 === "m" ? " is-active" : ""), onClick: () => setMode("m"), children: pad(m) }),
6939
+ /* @__PURE__ */ jsx72("span", { className: "fd-stack", style: { gap: 3, marginLeft: 8 }, children: ["AM", "PM"].map((ap) => /* @__PURE__ */ jsx72(
6927
6940
  "button",
6928
6941
  {
6929
6942
  type: "button",
@@ -6935,12 +6948,12 @@ function ClockFace({ value = "09:00", onChange }) {
6935
6948
  )) })
6936
6949
  ] }),
6937
6950
  /* @__PURE__ */ jsxs61("div", { className: "fd-clock", ref: faceRef, onPointerDown: down, onPointerMove: move, onPointerUp: upH, children: [
6938
- /* @__PURE__ */ jsx71("span", { className: "fd-clock-hand", style: { height: NR - (minuteOff ? 14 : 16), transform: "translateX(-50%) rotate(" + handAngle + "deg)", bottom: "50%" } }),
6939
- /* @__PURE__ */ jsx71("span", { className: "fd-clock-pivot" }),
6940
- minuteOff ? /* @__PURE__ */ jsx71("span", { style: { position: "absolute", left: "50%", top: "50%", width: 10, height: 10, margin: -5, borderRadius: "50%", border: "2px solid var(--brand)", background: "var(--surface)", transform: "rotate(" + handAngle + "deg) translateY(-" + (NR - 6) + "px)", transformOrigin: "center", pointerEvents: "none" } }) : null,
6951
+ /* @__PURE__ */ jsx72("span", { className: "fd-clock-hand", style: { height: NR - (minuteOff ? 14 : 16), transform: "translateX(-50%) rotate(" + handAngle + "deg)", bottom: "50%" } }),
6952
+ /* @__PURE__ */ jsx72("span", { className: "fd-clock-pivot" }),
6953
+ minuteOff ? /* @__PURE__ */ jsx72("span", { style: { position: "absolute", left: "50%", top: "50%", width: 10, height: 10, margin: -5, borderRadius: "50%", border: "2px solid var(--brand)", background: "var(--surface)", transform: "rotate(" + handAngle + "deg) translateY(-" + (NR - 6) + "px)", transformOrigin: "center", pointerEvents: "none" } }) : null,
6941
6954
  nums.map((n) => {
6942
6955
  const a = angleOf(n) * Math.PI / 180;
6943
- return /* @__PURE__ */ jsx71(
6956
+ return /* @__PURE__ */ jsx72(
6944
6957
  "span",
6945
6958
  {
6946
6959
  className: "fd-clock-num" + (n === selNum || mode2 === "m" && n === Math.round(m / 5) * 5 % 60 && m % 5 === 0 ? " is-sel" : ""),
@@ -6951,7 +6964,7 @@ function ClockFace({ value = "09:00", onChange }) {
6951
6964
  );
6952
6965
  })
6953
6966
  ] }),
6954
- /* @__PURE__ */ jsx71("div", { className: "fd-row", style: { justifyContent: "center", gap: 6 }, children: /* @__PURE__ */ jsx71("span", { className: "fd-body-sm fd-muted", children: mode2 === "h" ? "Pick the hour \u2014 drag or tap" : "Now the minutes" }) })
6967
+ /* @__PURE__ */ jsx72("div", { className: "fd-row", style: { justifyContent: "center", gap: 6 }, children: /* @__PURE__ */ jsx72("span", { className: "fd-body-sm fd-muted", children: mode2 === "h" ? "Pick the hour \u2014 drag or tap" : "Now the minutes" }) })
6955
6968
  ] });
6956
6969
  }
6957
6970
  function TimePicker({ label, help, error, required = false, disabled = false, value = "", onChange, placeholder = "Pick a time", id, className = "", style }) {
@@ -6968,10 +6981,10 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
6968
6981
  if (!disabled) setOpen(!open2);
6969
6982
  };
6970
6983
  return /* @__PURE__ */ jsxs61("div", { className: ["fd-field", "fd-popfield", open2 ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
6971
- label ? /* @__PURE__ */ jsx71(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : null,
6984
+ label ? /* @__PURE__ */ jsx72(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : null,
6972
6985
  /* @__PURE__ */ jsxs61("div", { className: ["fd-input", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" "), style: { cursor: disabled ? "not-allowed" : "pointer" }, onClick: toggle, ref: boxRef, children: [
6973
- /* @__PURE__ */ jsx71("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx71("i", { className: "ph ph-clock", "aria-hidden": "true" }) }),
6974
- /* @__PURE__ */ jsx71(
6986
+ /* @__PURE__ */ jsx72("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx72("i", { className: "ph ph-clock", "aria-hidden": "true" }) }),
6987
+ /* @__PURE__ */ jsx72(
6975
6988
  "button",
6976
6989
  {
6977
6990
  type: "button",
@@ -6988,9 +7001,9 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
6988
7001
  children: disp() || placeholder
6989
7002
  }
6990
7003
  ),
6991
- /* @__PURE__ */ jsx71("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx71("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
7004
+ /* @__PURE__ */ jsx72("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx72("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
6992
7005
  ] }),
6993
- /* @__PURE__ */ jsx71(
7006
+ /* @__PURE__ */ jsx72(
6994
7007
  Popover,
6995
7008
  {
6996
7009
  open: open2,
@@ -7002,7 +7015,7 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
7002
7015
  width: 262,
7003
7016
  role: "presentation",
7004
7017
  footer: /* @__PURE__ */ jsxs61(React47.Fragment, { children: [
7005
- /* @__PURE__ */ jsx71(
7018
+ /* @__PURE__ */ jsx72(
7006
7019
  "button",
7007
7020
  {
7008
7021
  type: "button",
@@ -7015,22 +7028,22 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
7015
7028
  children: "Now"
7016
7029
  }
7017
7030
  ),
7018
- /* @__PURE__ */ jsx71("span", { style: { flex: 1 } }),
7019
- /* @__PURE__ */ jsx71("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", onClick: () => setOpen(false), children: "Done" })
7031
+ /* @__PURE__ */ jsx72("span", { style: { flex: 1 } }),
7032
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", onClick: () => setOpen(false), children: "Done" })
7020
7033
  ] }),
7021
- children: /* @__PURE__ */ jsx71(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) })
7034
+ children: /* @__PURE__ */ jsx72(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) })
7022
7035
  }
7023
7036
  ),
7024
7037
  error ? /* @__PURE__ */ jsxs61("span", { className: "fd-field-error", children: [
7025
- /* @__PURE__ */ jsx71("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7038
+ /* @__PURE__ */ jsx72("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7026
7039
  error
7027
- ] }) : help ? /* @__PURE__ */ jsx71("span", { className: "fd-field-help", children: help }) : null
7040
+ ] }) : help ? /* @__PURE__ */ jsx72("span", { className: "fd-field-help", children: help }) : null
7028
7041
  ] });
7029
7042
  }
7030
7043
 
7031
7044
  // src/components/forms/Slider.tsx
7032
7045
  import * as React48 from "react";
7033
- import { jsx as jsx72, jsxs as jsxs62 } from "react/jsx-runtime";
7046
+ import { jsx as jsx73, jsxs as jsxs62 } from "react/jsx-runtime";
7034
7047
  function Slider({
7035
7048
  label,
7036
7049
  min = 0,
@@ -7052,13 +7065,13 @@ function Slider({
7052
7065
  const pct = max === min ? 0 : (v - min) / (max - min) * 100;
7053
7066
  return /* @__PURE__ */ jsxs62("div", { className: ["fd-field", className].filter(Boolean).join(" "), children: [
7054
7067
  label ? /* @__PURE__ */ jsxs62("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
7055
- /* @__PURE__ */ jsx72(FieldLabel, { htmlFor: fieldId, children: label }),
7056
- /* @__PURE__ */ jsx72("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: format(v) })
7068
+ /* @__PURE__ */ jsx73(FieldLabel, { htmlFor: fieldId, children: label }),
7069
+ /* @__PURE__ */ jsx73("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: format(v) })
7057
7070
  ] }) : null,
7058
7071
  /* @__PURE__ */ jsxs62("div", { className: "fd-slider", children: [
7059
- /* @__PURE__ */ jsx72("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
7060
- showChip && dragging ? /* @__PURE__ */ jsx72("span", { className: "fd-slider-chip", style: { left: pct + "%" }, children: format(v) }) : null,
7061
- /* @__PURE__ */ jsx72(
7072
+ /* @__PURE__ */ jsx73("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
7073
+ showChip && dragging ? /* @__PURE__ */ jsx73("span", { className: "fd-slider-chip", style: { left: pct + "%" }, children: format(v) }) : null,
7074
+ /* @__PURE__ */ jsx73(
7062
7075
  "input",
7063
7076
  {
7064
7077
  id: fieldId,
@@ -7076,13 +7089,13 @@ function Slider({
7076
7089
  }
7077
7090
  )
7078
7091
  ] }),
7079
- help ? /* @__PURE__ */ jsx72("span", { className: "fd-field-help", children: help }) : null
7092
+ help ? /* @__PURE__ */ jsx73("span", { className: "fd-field-help", children: help }) : null
7080
7093
  ] });
7081
7094
  }
7082
7095
 
7083
7096
  // src/components/forms/RangeSlider.tsx
7084
7097
  import * as React49 from "react";
7085
- import { jsx as jsx73, jsxs as jsxs63 } from "react/jsx-runtime";
7098
+ import { jsx as jsx74, jsxs as jsxs63 } from "react/jsx-runtime";
7086
7099
  function RangeSlider({
7087
7100
  label,
7088
7101
  min = 0,
@@ -7139,7 +7152,7 @@ function RangeSlider({
7139
7152
  };
7140
7153
  const thin = S.length > 7 ? Math.ceil(S.length / 5) : 1;
7141
7154
  const pair = value || [S[0].value, S[S.length - 1].value];
7142
- return /* @__PURE__ */ jsx73(
7155
+ return /* @__PURE__ */ jsx74(
7143
7156
  RangeSlider,
7144
7157
  {
7145
7158
  ...rest,
@@ -7189,7 +7202,7 @@ function RangeSlider({
7189
7202
  const hasLabels = marks.some((m) => m.label);
7190
7203
  return /* @__PURE__ */ jsxs63("div", { className: ["fd-field", className].filter(Boolean).join(" "), ...rest, children: [
7191
7204
  label ? /* @__PURE__ */ jsxs63("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
7192
- /* @__PURE__ */ jsx73("span", { className: "fd-field-label", children: label }),
7205
+ /* @__PURE__ */ jsx74("span", { className: "fd-field-label", children: label }),
7193
7206
  /* @__PURE__ */ jsxs63("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: [
7194
7207
  fmt2(a),
7195
7208
  " \u2013 ",
@@ -7197,13 +7210,13 @@ function RangeSlider({
7197
7210
  ] })
7198
7211
  ] }) : null,
7199
7212
  /* @__PURE__ */ jsxs63("div", { className: "fd-range" + (hasLabels ? " has-labels" : ""), onPointerDown: onRailDown, children: [
7200
- /* @__PURE__ */ jsx73("span", { className: "fd-range-rail", ref: railRef }),
7201
- /* @__PURE__ */ jsx73("span", { className: "fd-range-fill", style: { left: pct(a) + "%", width: pct(b) - pct(a) + "%" } }),
7213
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-rail", ref: railRef }),
7214
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-fill", style: { left: pct(a) + "%", width: pct(b) - pct(a) + "%" } }),
7202
7215
  marks.map((m) => /* @__PURE__ */ jsxs63(React49.Fragment, { children: [
7203
- /* @__PURE__ */ jsx73("span", { className: "fd-range-mark" + (m.value >= a && m.value <= b ? " is-in" : ""), style: { left: pct(m.value) + "%" } }),
7204
- m.label ? /* @__PURE__ */ jsx73("span", { className: "fd-range-mark-label", style: { left: pct(m.value) + "%" }, children: m.label }) : null
7216
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-mark" + (m.value >= a && m.value <= b ? " is-in" : ""), style: { left: pct(m.value) + "%" } }),
7217
+ m.label ? /* @__PURE__ */ jsx74("span", { className: "fd-range-mark-label", style: { left: pct(m.value) + "%" }, children: m.label }) : null
7205
7218
  ] }, m.value)),
7206
- [a, b].map((v, i) => /* @__PURE__ */ jsx73(
7219
+ [a, b].map((v, i) => /* @__PURE__ */ jsx74(
7207
7220
  "span",
7208
7221
  {
7209
7222
  className: "fd-range-thumb" + (drag === i ? " is-drag" : ""),
@@ -7218,18 +7231,18 @@ function RangeSlider({
7218
7231
  onKeyDown: key(i),
7219
7232
  onFocus: () => setFocus(i),
7220
7233
  onBlur: () => setFocus(null),
7221
- children: /* @__PURE__ */ jsx73("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
7234
+ children: /* @__PURE__ */ jsx74("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
7222
7235
  },
7223
7236
  i
7224
7237
  ))
7225
7238
  ] }),
7226
- help ? /* @__PURE__ */ jsx73("span", { className: "fd-field-help", children: help }) : null
7239
+ help ? /* @__PURE__ */ jsx74("span", { className: "fd-field-help", children: help }) : null
7227
7240
  ] });
7228
7241
  }
7229
7242
 
7230
7243
  // src/components/forms/Dropzone.tsx
7231
7244
  import * as React50 from "react";
7232
- import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
7245
+ import { jsx as jsx75, jsxs as jsxs64 } from "react/jsx-runtime";
7233
7246
  function Dropzone({
7234
7247
  onFiles,
7235
7248
  onReject,
@@ -7285,10 +7298,10 @@ function Dropzone({
7285
7298
  onDrop: drop,
7286
7299
  children: [
7287
7300
  children,
7288
- over ? /* @__PURE__ */ jsx74("div", { className: "fd-dropzone-veil", "aria-hidden": "true", children: /* @__PURE__ */ jsxs64("div", { className: "fd-dropzone-card", children: [
7289
- /* @__PURE__ */ jsx74("i", { className: "ph ph-tray-arrow-down" }),
7290
- /* @__PURE__ */ jsx74("span", { className: "fd-dropzone-label", children: label }),
7291
- hint ? /* @__PURE__ */ jsx74("span", { className: "fd-dropzone-hint", children: hint }) : null
7301
+ over ? /* @__PURE__ */ jsx75("div", { className: "fd-dropzone-veil", "aria-hidden": "true", children: /* @__PURE__ */ jsxs64("div", { className: "fd-dropzone-card", children: [
7302
+ /* @__PURE__ */ jsx75("i", { className: "ph ph-tray-arrow-down" }),
7303
+ /* @__PURE__ */ jsx75("span", { className: "fd-dropzone-label", children: label }),
7304
+ hint ? /* @__PURE__ */ jsx75("span", { className: "fd-dropzone-hint", children: hint }) : null
7292
7305
  ] }) }) : null
7293
7306
  ]
7294
7307
  }
@@ -7308,7 +7321,7 @@ function FilePickButton({
7308
7321
  }) {
7309
7322
  const ref = React50.useRef(null);
7310
7323
  return /* @__PURE__ */ jsxs64(React50.Fragment, { children: [
7311
- /* @__PURE__ */ jsx74(
7324
+ /* @__PURE__ */ jsx75(
7312
7325
  "button",
7313
7326
  {
7314
7327
  type: "button",
@@ -7317,10 +7330,10 @@ function FilePickButton({
7317
7330
  "aria-label": label,
7318
7331
  title: label,
7319
7332
  onClick: () => ref.current && ref.current.click(),
7320
- children: children != null ? children : /* @__PURE__ */ jsx74("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
7333
+ children: children != null ? children : /* @__PURE__ */ jsx75("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
7321
7334
  }
7322
7335
  ),
7323
- /* @__PURE__ */ jsx74(
7336
+ /* @__PURE__ */ jsx75(
7324
7337
  "input",
7325
7338
  {
7326
7339
  ref,
@@ -7397,7 +7410,7 @@ function useStagedFiles(upload, opts) {
7397
7410
  var DropzoneKit = { useStagedFiles };
7398
7411
 
7399
7412
  // src/components/forms/FileGrid.tsx
7400
- import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
7413
+ import { jsx as jsx76, jsxs as jsxs65 } from "react/jsx-runtime";
7401
7414
  var truncateMiddle = (name, max = 34) => {
7402
7415
  if (!name || name.length <= max) return name;
7403
7416
  const ext = /\.[A-Za-z0-9]+$/.exec(name);
@@ -7406,7 +7419,7 @@ var truncateMiddle = (name, max = 34) => {
7406
7419
  return head + "\u2026" + tail;
7407
7420
  };
7408
7421
  function Progress({ value }) {
7409
- return /* @__PURE__ */ jsx75("span", { className: "fd-file-prog", role: "progressbar", "aria-valuenow": Math.round(value), "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx75("span", { className: "fd-file-prog-fill", style: { width: Math.max(4, Math.min(100, value)) + "%" } }) });
7422
+ return /* @__PURE__ */ jsx76("span", { className: "fd-file-prog", role: "progressbar", "aria-valuenow": Math.round(value), "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx76("span", { className: "fd-file-prog-fill", style: { width: Math.max(4, Math.min(100, value)) + "%" } }) });
7410
7423
  }
7411
7424
  function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false, className = "" }) {
7412
7425
  if (!file) return null;
@@ -7426,13 +7439,13 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
7426
7439
  title: file.name + (meta ? " \xB7 " + meta : ""),
7427
7440
  children: [
7428
7441
  /* @__PURE__ */ jsxs65("span", { className: "fd-file-icon", children: [
7429
- thumb ? /* @__PURE__ */ jsx75("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsx75("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7430
- (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx75("i", { className: "ph ph-play fd-file-play", "aria-hidden": "true" }) : null
7442
+ thumb ? /* @__PURE__ */ jsx76("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsx76("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7443
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx76("i", { className: "ph ph-play fd-file-play", "aria-hidden": "true" }) : null
7431
7444
  ] }),
7432
7445
  /* @__PURE__ */ jsxs65("span", { className: "fd-file-text", children: [
7433
- /* @__PURE__ */ jsx75("span", { className: "fd-file-name", children: truncateMiddle(file.name, compact3 ? 26 : 40) }),
7434
- /* @__PURE__ */ jsx75("span", { className: "fd-file-meta", children: file.error ? /* @__PURE__ */ jsxs65("span", { className: "fd-file-err", children: [
7435
- /* @__PURE__ */ jsx75("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7446
+ /* @__PURE__ */ jsx76("span", { className: "fd-file-name", children: truncateMiddle(file.name, compact3 ? 26 : 40) }),
7447
+ /* @__PURE__ */ jsx76("span", { className: "fd-file-meta", children: file.error ? /* @__PURE__ */ jsxs65("span", { className: "fd-file-err", children: [
7448
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7436
7449
  file.error
7437
7450
  ] }) : uploading ? /* @__PURE__ */ jsxs65("span", { className: "fd-tabular", children: [
7438
7451
  Math.round(file.progress),
@@ -7442,9 +7455,9 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
7442
7455
  ]
7443
7456
  }
7444
7457
  ),
7445
- uploading ? /* @__PURE__ */ jsx75(Progress, { value: file.progress }) : null,
7446
- file.error && onRetry ? /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-file-act", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx75("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
7447
- onRemove ? /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-file-act", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx75("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7458
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7459
+ file.error && onRetry ? /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-file-act", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx76("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
7460
+ onRemove ? /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-file-act", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx76("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7448
7461
  ] });
7449
7462
  }
7450
7463
  function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = "" }) {
@@ -7452,19 +7465,19 @@ function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = "" }) {
7452
7465
  const src = file.thumb && file.thumb.url || file.blobUrl || file.url;
7453
7466
  const uploading = file.progress != null && file.progress < 100 && !file.error;
7454
7467
  return /* @__PURE__ */ jsxs65("figure", { className: ["fd-tile", uploading ? "is-uploading" : "", file.error ? "is-error" : "", className].filter(Boolean).join(" "), children: [
7455
- /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-tile-btn", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen, children: src ? /* @__PURE__ */ jsx75("img", { src, alt: file.name || "", style: { maxHeight }, loading: "lazy" }) : /* @__PURE__ */ jsx75("span", { className: "fd-tile-fallback", children: /* @__PURE__ */ jsx75("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }) }) }),
7456
- uploading ? /* @__PURE__ */ jsx75(Progress, { value: file.progress }) : null,
7468
+ /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-tile-btn", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen, children: src ? /* @__PURE__ */ jsx76("img", { src, alt: file.name || "", style: { maxHeight }, loading: "lazy" }) : /* @__PURE__ */ jsx76("span", { className: "fd-tile-fallback", children: /* @__PURE__ */ jsx76("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }) }) }),
7469
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7457
7470
  file.error ? /* @__PURE__ */ jsxs65("figcaption", { className: "fd-tile-err", children: [
7458
- /* @__PURE__ */ jsx75("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7471
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7459
7472
  file.error
7460
7473
  ] }) : null,
7461
- onRemove ? /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-tile-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx75("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7474
+ onRemove ? /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-tile-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx76("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7462
7475
  ] });
7463
7476
  }
7464
7477
  function FileStrip({ files = [], size = 68, onOpen, onRemove, onRetry, className = "" }) {
7465
7478
  const list = files.filter(Boolean);
7466
7479
  if (!list.length) return null;
7467
- return /* @__PURE__ */ jsx75("div", { className: ["fd-filestrip", "fd-scrollbar", className].filter(Boolean).join(" "), style: { "--fd-cell": size + "px" }, children: list.map((f) => /* @__PURE__ */ jsx75(FileCell, { file: f, onOpen, onRemove, onRetry }, f.id || f.name)) });
7480
+ return /* @__PURE__ */ jsx76("div", { className: ["fd-filestrip", "fd-scrollbar", className].filter(Boolean).join(" "), style: { "--fd-cell": size + "px" }, children: list.map((f) => /* @__PURE__ */ jsx76(FileCell, { file: f, onOpen, onRemove, onRetry }, f.id || f.name)) });
7468
7481
  }
7469
7482
  var shortName = (name, keep = 5) => {
7470
7483
  const s = String(name || "file");
@@ -7480,17 +7493,17 @@ function FileCell({ file, onOpen, onRemove, onRetry }) {
7480
7493
  const label = file.name + (file.size ? " \xB7 " + formatBytes(file.size) : "");
7481
7494
  return /* @__PURE__ */ jsxs65("div", { className: ["fd-cell", file.error ? "is-error" : "", uploading ? "is-uploading" : ""].filter(Boolean).join(" "), title: file.error ? file.name + " \u2014 " + file.error : label, children: [
7482
7495
  /* @__PURE__ */ jsxs65("button", { type: "button", className: "fd-cell-main", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen || uploading, "aria-label": "Open " + file.name, children: [
7483
- thumb ? /* @__PURE__ */ jsx75("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsxs65("span", { className: "fd-cell-doc", children: [
7484
- /* @__PURE__ */ jsx75("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7485
- /* @__PURE__ */ jsx75("span", { className: "fd-cell-name", children: shortName(file.name) }),
7486
- /* @__PURE__ */ jsx75("span", { className: "fd-cell-size", children: file.meta || formatBytes(file.size) })
7496
+ thumb ? /* @__PURE__ */ jsx76("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsxs65("span", { className: "fd-cell-doc", children: [
7497
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7498
+ /* @__PURE__ */ jsx76("span", { className: "fd-cell-name", children: shortName(file.name) }),
7499
+ /* @__PURE__ */ jsx76("span", { className: "fd-cell-size", children: file.meta || formatBytes(file.size) })
7487
7500
  ] }),
7488
- (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx75("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
7501
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx76("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
7489
7502
  ] }),
7490
- uploading ? /* @__PURE__ */ jsx75(Progress, { value: file.progress }) : null,
7491
- file.error ? /* @__PURE__ */ jsx75("span", { className: "fd-cell-err", "aria-hidden": "true", children: /* @__PURE__ */ jsx75("i", { className: "ph ph-warning-circle" }) }) : null,
7492
- file.error && onRetry ? /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-cell-x is-retry", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx75("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
7493
- onRemove ? /* @__PURE__ */ jsx75("button", { type: "button", className: "fd-cell-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx75("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7503
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7504
+ file.error ? /* @__PURE__ */ jsx76("span", { className: "fd-cell-err", "aria-hidden": "true", children: /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle" }) }) : null,
7505
+ file.error && onRetry ? /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-cell-x is-retry", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx76("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
7506
+ onRemove ? /* @__PURE__ */ jsx76("button", { type: "button", className: "fd-cell-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx76("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
7494
7507
  ] });
7495
7508
  }
7496
7509
  function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeight = 200, compact: compact3 = false, className = "" }) {
@@ -7499,14 +7512,14 @@ function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeig
7499
7512
  const pics = tiles ? list.filter((f) => isImage(f.mime, f.name)) : [];
7500
7513
  const rest = list.filter((f) => pics.indexOf(f) === -1);
7501
7514
  return /* @__PURE__ */ jsxs65("div", { className: ["fd-filegrid", className].filter(Boolean).join(" "), children: [
7502
- pics.length ? /* @__PURE__ */ jsx75("div", { className: "fd-filegrid-tiles", children: pics.map((f) => /* @__PURE__ */ jsx75(FileTile, { file: f, onOpen, onRemove, maxHeight }, f.id || f.name)) }) : null,
7503
- rest.length ? /* @__PURE__ */ jsx75("div", { className: "fd-filegrid-chips", children: rest.map((f) => /* @__PURE__ */ jsx75(FileChip, { file: f, onOpen, onRemove, onRetry, compact: compact3 }, f.id || f.name)) }) : null
7515
+ pics.length ? /* @__PURE__ */ jsx76("div", { className: "fd-filegrid-tiles", children: pics.map((f) => /* @__PURE__ */ jsx76(FileTile, { file: f, onOpen, onRemove, maxHeight }, f.id || f.name)) }) : null,
7516
+ rest.length ? /* @__PURE__ */ jsx76("div", { className: "fd-filegrid-chips", children: rest.map((f) => /* @__PURE__ */ jsx76(FileChip, { file: f, onOpen, onRemove, onRetry, compact: compact3 }, f.id || f.name)) }) : null
7504
7517
  ] });
7505
7518
  }
7506
7519
 
7507
7520
  // src/components/forms/MarkdownEditor.tsx
7508
7521
  import * as React51 from "react";
7509
- import { jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
7522
+ import { jsx as jsx77, jsxs as jsxs66 } from "react/jsx-runtime";
7510
7523
  var isMac = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || "");
7511
7524
  var INLINE_RE = /(\*\*\*[^*\n]+\*\*\*|\*\*[^*\n]+\*\*|__[^_\n]+__|~~[^~\n]+~~|`[^`\n]+`|\*[^*\s][^*\n]*\*|(?<![A-Za-z0-9_])_[^_\s][^_\n]*_|\[[^\]\n]*\]\([^)\s\n]*\)|https?:\/\/\S+)/g;
7512
7525
  function inlineParts(text) {
@@ -7933,7 +7946,7 @@ var MarkdownEditor = React51.forwardRef(function MarkdownEditor2({
7933
7946
  };
7934
7947
  const lh = 1.55;
7935
7948
  return /* @__PURE__ */ jsxs66("div", { className: ["fd-rme-wrap", disabled ? "is-disabled" : "", className].filter(Boolean).join(" "), children: [
7936
- /* @__PURE__ */ jsx76(
7949
+ /* @__PURE__ */ jsx77(
7937
7950
  "div",
7938
7951
  {
7939
7952
  ref: boxRef,
@@ -7966,7 +7979,7 @@ var MarkdownEditor = React51.forwardRef(function MarkdownEditor2({
7966
7979
  }
7967
7980
  }
7968
7981
  ),
7969
- !value ? /* @__PURE__ */ jsx76("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
7982
+ !value ? /* @__PURE__ */ jsx77("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
7970
7983
  ] });
7971
7984
  });
7972
7985
 
@@ -7978,7 +7991,7 @@ import { defaultKeymap, history, historyKeymap, indentMore, indentLess } from "@
7978
7991
  import { sql as sqlLang } from "@codemirror/lang-sql";
7979
7992
  import { syntaxHighlighting, HighlightStyle, indentOnInput, bracketMatching } from "@codemirror/language";
7980
7993
  import { tags } from "@lezer/highlight";
7981
- import { jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
7994
+ import { jsx as jsx78, jsxs as jsxs67 } from "react/jsx-runtime";
7982
7995
  function clampOffset(state, line, column) {
7983
7996
  const total = state.doc.lines;
7984
7997
  const ln = state.doc.line(Math.min(Math.max(1, line), total));
@@ -8163,13 +8176,13 @@ function CodeEditor({
8163
8176
  const box = ["fd-input", "fd-code-editor", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
8164
8177
  const announce = diagnostics.length ? diagnostics.length + (diagnostics.length === 1 ? " problem: " : " problems: ") + diagnostics.map((d) => "line " + d.line + (d.column ? ", column " + d.column : "") + ": " + d.message).join("; ") : "";
8165
8178
  return /* @__PURE__ */ jsxs67("div", { className: ["fd-field", className].filter(Boolean).join(" "), style, children: [
8166
- label ? /* @__PURE__ */ jsx77(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
8167
- /* @__PURE__ */ jsx77(
8179
+ label ? /* @__PURE__ */ jsx78(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
8180
+ /* @__PURE__ */ jsx78(
8168
8181
  "div",
8169
8182
  {
8170
8183
  className: box,
8171
8184
  style: { minHeight },
8172
- children: /* @__PURE__ */ jsx77(
8185
+ children: /* @__PURE__ */ jsx78(
8173
8186
  "div",
8174
8187
  {
8175
8188
  ref: hostRef,
@@ -8183,9 +8196,9 @@ function CodeEditor({
8183
8196
  help ? help + ". " : "",
8184
8197
  showEscapeHint ? "Tab indents. Press Escape, then Tab, to move focus out of the editor." : ""
8185
8198
  ] }),
8186
- /* @__PURE__ */ jsx77("div", { id: liveId, className: "fd-sr", role: "status", "aria-live": "polite", children: announce }),
8187
- diagnostics.length ? /* @__PURE__ */ jsx77("ul", { className: "fd-code-editor-diagnostics", children: diagnostics.map((d, i) => /* @__PURE__ */ jsxs67("li", { className: "fd-code-editor-diag is-" + (d.severity || "error"), children: [
8188
- /* @__PURE__ */ jsx77(
8199
+ /* @__PURE__ */ jsx78("div", { id: liveId, className: "fd-sr", role: "status", "aria-live": "polite", children: announce }),
8200
+ diagnostics.length ? /* @__PURE__ */ jsx78("ul", { className: "fd-code-editor-diagnostics", children: diagnostics.map((d, i) => /* @__PURE__ */ jsxs67("li", { className: "fd-code-editor-diag is-" + (d.severity || "error"), children: [
8201
+ /* @__PURE__ */ jsx78(
8189
8202
  "i",
8190
8203
  {
8191
8204
  className: "ph ph-" + (d.severity === "warning" ? "warning" : d.severity === "info" ? "info" : "warning-circle"),
@@ -8197,13 +8210,13 @@ function CodeEditor({
8197
8210
  d.line,
8198
8211
  d.column ? ":" + d.column : ""
8199
8212
  ] }),
8200
- /* @__PURE__ */ jsx77("span", { children: d.message })
8213
+ /* @__PURE__ */ jsx78("span", { children: d.message })
8201
8214
  ] }, i)) }) : null,
8202
8215
  error ? /* @__PURE__ */ jsxs67("span", { className: "fd-field-error", children: [
8203
- /* @__PURE__ */ jsx77("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8216
+ /* @__PURE__ */ jsx78("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8204
8217
  error
8205
- ] }) : !diagnostics.length && help ? /* @__PURE__ */ jsx77("span", { className: "fd-field-help", children: help }) : null,
8206
- showEscapeHint ? /* @__PURE__ */ jsx77("span", { className: "fd-field-help fd-code-editor-hint", children: "Tab indents. Escape, then Tab, moves focus out." }) : null
8218
+ ] }) : !diagnostics.length && help ? /* @__PURE__ */ jsx78("span", { className: "fd-field-help", children: help }) : null,
8219
+ showEscapeHint ? /* @__PURE__ */ jsx78("span", { className: "fd-field-help fd-code-editor-hint", children: "Tab indents. Escape, then Tab, moves focus out." }) : null
8207
8220
  ] });
8208
8221
  }
8209
8222
 
@@ -8227,7 +8240,7 @@ function useSessionContext() {
8227
8240
  }
8228
8241
 
8229
8242
  // src/components/platform/AccountMenu.tsx
8230
- import { Fragment as Fragment18, jsx as jsx78, jsxs as jsxs68 } from "react/jsx-runtime";
8243
+ import { Fragment as Fragment19, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
8231
8244
  var DEFAULT_LINKS = [];
8232
8245
  var DEFAULT_GROUPS = [];
8233
8246
  function Item({ item, onPick }) {
@@ -8239,9 +8252,9 @@ function Item({ item, onPick }) {
8239
8252
  className: "fd-acct-item",
8240
8253
  onClick: () => onPick(item),
8241
8254
  children: [
8242
- item.icon ? /* @__PURE__ */ jsx78("i", { className: "ph ph-" + item.icon, "aria-hidden": "true" }) : null,
8243
- /* @__PURE__ */ jsx78("span", { style: { flex: 1 }, children: item.label }),
8244
- item.badge ? /* @__PURE__ */ jsx78(Badge, { tone: "neutral", children: item.badge }) : null
8255
+ item.icon ? /* @__PURE__ */ jsx79("i", { className: "ph ph-" + item.icon, "aria-hidden": "true" }) : null,
8256
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: item.label }),
8257
+ item.badge ? /* @__PURE__ */ jsx79(Badge, { tone: "neutral", children: item.badge }) : null
8245
8258
  ]
8246
8259
  }
8247
8260
  );
@@ -8289,7 +8302,7 @@ function AccountMenu({
8289
8302
  }
8290
8303
  };
8291
8304
  const showSwitcher = allowUserSwitch && !!demo;
8292
- return /* @__PURE__ */ jsxs68(Fragment18, { children: [
8305
+ return /* @__PURE__ */ jsxs68(Fragment19, { children: [
8293
8306
  /* @__PURE__ */ jsxs68(
8294
8307
  "button",
8295
8308
  {
@@ -8302,12 +8315,12 @@ function AccountMenu({
8302
8315
  onClick: () => open2 ? closeMenu() : setOpen(true),
8303
8316
  ...rest,
8304
8317
  children: [
8305
- /* @__PURE__ */ jsx78(Avatar, { name: user.name, size: "sm" }),
8306
- /* @__PURE__ */ jsx78("i", { className: "ph ph-caret-down", "aria-hidden": "true", style: { fontSize: 11, color: "var(--text-muted)" } })
8318
+ /* @__PURE__ */ jsx79(Avatar, { name: user.name, size: "sm" }),
8319
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-caret-down", "aria-hidden": "true", style: { fontSize: 11, color: "var(--text-muted)" } })
8307
8320
  ]
8308
8321
  }
8309
8322
  ),
8310
- /* @__PURE__ */ jsx78(
8323
+ /* @__PURE__ */ jsx79(
8311
8324
  Popover,
8312
8325
  {
8313
8326
  open: open2,
@@ -8317,25 +8330,25 @@ function AccountMenu({
8317
8330
  width: 272,
8318
8331
  children: /* @__PURE__ */ jsxs68("div", { role: "menu", className: "fd-stack", style: { gap: 0 }, children: [
8319
8332
  /* @__PURE__ */ jsxs68("div", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
8320
- /* @__PURE__ */ jsx78(Avatar, { name: user.name }),
8333
+ /* @__PURE__ */ jsx79(Avatar, { name: user.name }),
8321
8334
  /* @__PURE__ */ jsxs68("span", { className: "fd-stack", style: { gap: 1, minWidth: 0, flex: 1 }, children: [
8322
- /* @__PURE__ */ jsx78("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: user.name }),
8323
- /* @__PURE__ */ jsx78("span", { className: "fd-body-sm fd-muted fd-table-trunc", title: truncationTitle(user.email), children: user.email })
8335
+ /* @__PURE__ */ jsx79("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: user.name }),
8336
+ /* @__PURE__ */ jsx79("span", { className: "fd-body-sm fd-muted fd-table-trunc", title: truncationTitle(user.email), children: user.email })
8324
8337
  ] })
8325
8338
  ] }),
8326
- showRoles && roles.length ? /* @__PURE__ */ jsx78("div", { className: "fd-row", style: { gap: 6, padding: "10px 14px", flexWrap: "wrap", borderBottom: "1px solid var(--border)" }, children: roles.map((r) => /* @__PURE__ */ jsx78(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)) }) : null,
8327
- visibleLinks.length ? /* @__PURE__ */ jsx78("div", { className: "fd-acct-group", children: visibleLinks.map((l) => /* @__PURE__ */ jsx78(Item, { item: l, onPick: pick }, l.id)) }) : null,
8339
+ showRoles && roles.length ? /* @__PURE__ */ jsx79("div", { className: "fd-row", style: { gap: 6, padding: "10px 14px", flexWrap: "wrap", borderBottom: "1px solid var(--border)" }, children: roles.map((r) => /* @__PURE__ */ jsx79(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)) }) : null,
8340
+ visibleLinks.length ? /* @__PURE__ */ jsx79("div", { className: "fd-acct-group", children: visibleLinks.map((l) => /* @__PURE__ */ jsx79(Item, { item: l, onPick: pick }, l.id)) }) : null,
8328
8341
  visibleGroups.map((g) => /* @__PURE__ */ jsxs68("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
8329
- /* @__PURE__ */ jsx78("span", { className: "fd-overline fd-muted", style: { padding: "8px 14px 4px", display: "block" }, children: g.label }),
8330
- g.links.map((l) => /* @__PURE__ */ jsx78(Item, { item: l, onPick: pick }, l.id))
8342
+ /* @__PURE__ */ jsx79("span", { className: "fd-overline fd-muted", style: { padding: "8px 14px 4px", display: "block" }, children: g.label }),
8343
+ g.links.map((l) => /* @__PURE__ */ jsx79(Item, { item: l, onPick: pick }, l.id))
8331
8344
  ] }, g.label)),
8332
8345
  showSwitcher && demo ? /* @__PURE__ */ jsxs68("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
8333
8346
  /* @__PURE__ */ jsxs68("button", { type: "button", role: "menuitem", className: "fd-acct-item", onClick: () => setSwitching((s) => !s), children: [
8334
- /* @__PURE__ */ jsx78("i", { className: "ph ph-user-switch", "aria-hidden": "true" }),
8335
- /* @__PURE__ */ jsx78("span", { style: { flex: 1 }, children: "View as another member" }),
8336
- /* @__PURE__ */ jsx78("i", { className: "ph ph-caret-" + (switching ? "up" : "down"), "aria-hidden": "true", style: { fontSize: 11 } })
8347
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-user-switch", "aria-hidden": "true" }),
8348
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: "View as another member" }),
8349
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-caret-" + (switching ? "up" : "down"), "aria-hidden": "true", style: { fontSize: 11 } })
8337
8350
  ] }),
8338
- switching ? /* @__PURE__ */ jsx78("div", { className: "fd-stack", style: { gap: 0 }, children: demo.allUsers.map((u) => /* @__PURE__ */ jsxs68(
8351
+ switching ? /* @__PURE__ */ jsx79("div", { className: "fd-stack", style: { gap: 0 }, children: demo.allUsers.map((u) => /* @__PURE__ */ jsxs68(
8339
8352
  "button",
8340
8353
  {
8341
8354
  type: "button",
@@ -8347,12 +8360,12 @@ function AccountMenu({
8347
8360
  setSwitching(false);
8348
8361
  },
8349
8362
  children: [
8350
- /* @__PURE__ */ jsx78(Avatar, { name: u.name, size: "sm" }),
8363
+ /* @__PURE__ */ jsx79(Avatar, { name: u.name, size: "sm" }),
8351
8364
  /* @__PURE__ */ jsxs68("span", { className: "fd-stack", style: { gap: 0, flex: 1, minWidth: 0, alignItems: "flex-start" }, children: [
8352
- /* @__PURE__ */ jsx78("span", { style: { fontWeight: u.id === user.id ? 700 : 500 }, children: u.name }),
8353
- u.roles ? /* @__PURE__ */ jsx78("span", { className: "fd-muted", style: { fontSize: 11.5 }, children: u.roles.join(", ") }) : null
8365
+ /* @__PURE__ */ jsx79("span", { style: { fontWeight: u.id === user.id ? 700 : 500 }, children: u.name }),
8366
+ u.roles ? /* @__PURE__ */ jsx79("span", { className: "fd-muted", style: { fontSize: 11.5 }, children: u.roles.join(", ") }) : null
8354
8367
  ] }),
8355
- u.id === user.id ? /* @__PURE__ */ jsx78("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
8368
+ u.id === user.id ? /* @__PURE__ */ jsx79("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
8356
8369
  ]
8357
8370
  },
8358
8371
  u.id
@@ -8369,14 +8382,14 @@ function AccountMenu({
8369
8382
  disabled: signingOut,
8370
8383
  onClick: signOut,
8371
8384
  children: [
8372
- signingOut ? /* @__PURE__ */ jsx78(Spinner, { size: "sm" }) : /* @__PURE__ */ jsx78("i", { className: "ph ph-sign-out", "aria-hidden": "true" }),
8373
- /* @__PURE__ */ jsx78("span", { style: { flex: 1 }, children: signingOut ? "Signing out\u2026" : "Sign out" })
8385
+ signingOut ? /* @__PURE__ */ jsx79(Spinner, { size: "sm" }) : /* @__PURE__ */ jsx79("i", { className: "ph ph-sign-out", "aria-hidden": "true" }),
8386
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: signingOut ? "Signing out\u2026" : "Sign out" })
8374
8387
  ]
8375
8388
  }
8376
8389
  ),
8377
8390
  signOutError ? /* @__PURE__ */ jsxs68("div", { role: "alert", className: "fd-body-sm", style: { padding: "0 14px 12px" }, children: [
8378
- /* @__PURE__ */ jsx78("span", { style: { display: "block", color: "var(--danger-text)", marginBottom: 6 }, children: signOutError }),
8379
- /* @__PURE__ */ jsx78("button", { type: "button", className: "fd-soon-link", disabled: signingOut, onClick: signOut, children: "Retry" })
8391
+ /* @__PURE__ */ jsx79("span", { style: { display: "block", color: "var(--danger-text)", marginBottom: 6 }, children: signOutError }),
8392
+ /* @__PURE__ */ jsx79("button", { type: "button", className: "fd-soon-link", disabled: signingOut, onClick: signOut, children: "Retry" })
8380
8393
  ] }) : null
8381
8394
  ] })
8382
8395
  ] })
@@ -8387,7 +8400,7 @@ function AccountMenu({
8387
8400
 
8388
8401
  // src/components/platform/AppSwitcher.tsx
8389
8402
  import * as React55 from "react";
8390
- import { jsx as jsx79, jsxs as jsxs69 } from "react/jsx-runtime";
8403
+ import { jsx as jsx80, jsxs as jsxs69 } from "react/jsx-runtime";
8391
8404
  function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8392
8405
  const { apps: contextApps } = useSessionContext();
8393
8406
  const apps = appsProp ?? contextApps ?? [];
@@ -8407,7 +8420,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8407
8420
  }
8408
8421
  }));
8409
8422
  return /* @__PURE__ */ jsxs69(React55.Fragment, { children: [
8410
- /* @__PURE__ */ jsx79("span", { ref: anchorRef, className: ["fd-appswitch-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx79(
8423
+ /* @__PURE__ */ jsx80("span", { ref: anchorRef, className: ["fd-appswitch-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx80(
8411
8424
  IconButton,
8412
8425
  {
8413
8426
  icon: "squares-four",
@@ -8417,7 +8430,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8417
8430
  onClick: () => setOpen((v) => !v)
8418
8431
  }
8419
8432
  ) }),
8420
- /* @__PURE__ */ jsx79(
8433
+ /* @__PURE__ */ jsx80(
8421
8434
  Popover,
8422
8435
  {
8423
8436
  open: open2,
@@ -8428,7 +8441,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8428
8441
  label: "All flytedesk apps",
8429
8442
  width: 240,
8430
8443
  maxHeight: 360,
8431
- children: /* @__PURE__ */ jsx79(Menu, { items, onClose: () => setOpen(false) })
8444
+ children: /* @__PURE__ */ jsx80(Menu, { items, onClose: () => setOpen(false) })
8432
8445
  }
8433
8446
  )
8434
8447
  ] });
@@ -8562,11 +8575,11 @@ function useAppearancePrefs(store) {
8562
8575
 
8563
8576
  // src/components/platform/AppearanceProvider.tsx
8564
8577
  import * as React57 from "react";
8565
- import { jsx as jsx80 } from "react/jsx-runtime";
8578
+ import { jsx as jsx81 } from "react/jsx-runtime";
8566
8579
  var AppearanceStoreContext = React57.createContext(null);
8567
8580
  function AppearanceProvider({ store, children }) {
8568
8581
  React57.useLayoutEffect(() => watchAppearance(store), [store]);
8569
- return /* @__PURE__ */ jsx80(AppearanceStoreContext.Provider, { value: store, children });
8582
+ return /* @__PURE__ */ jsx81(AppearanceStoreContext.Provider, { value: store, children });
8570
8583
  }
8571
8584
  function useAppearanceStore() {
8572
8585
  const store = React57.useContext(AppearanceStoreContext);
@@ -8575,7 +8588,7 @@ function useAppearanceStore() {
8575
8588
  }
8576
8589
 
8577
8590
  // src/components/platform/AppearanceMenu.tsx
8578
- import { jsx as jsx81, jsxs as jsxs70 } from "react/jsx-runtime";
8591
+ import { jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
8579
8592
  var THEME_OPTIONS = [
8580
8593
  { value: "light", label: "Light" },
8581
8594
  { value: "dark", label: "Dark" },
@@ -8593,7 +8606,7 @@ function AppearanceMenu({ className = "" }) {
8593
8606
  const anchorRef = React58.useRef(null);
8594
8607
  const patch = (p) => update(p);
8595
8608
  return /* @__PURE__ */ jsxs70(React58.Fragment, { children: [
8596
- /* @__PURE__ */ jsx81("span", { ref: anchorRef, className: ["fd-appearance-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx81(
8609
+ /* @__PURE__ */ jsx82("span", { ref: anchorRef, className: ["fd-appearance-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx82(
8597
8610
  IconButton,
8598
8611
  {
8599
8612
  icon: "circle-half",
@@ -8601,7 +8614,7 @@ function AppearanceMenu({ className = "" }) {
8601
8614
  onClick: () => setOpen((v) => !v)
8602
8615
  }
8603
8616
  ) }),
8604
- /* @__PURE__ */ jsx81(
8617
+ /* @__PURE__ */ jsx82(
8605
8618
  Popover,
8606
8619
  {
8607
8620
  open: open2,
@@ -8613,8 +8626,8 @@ function AppearanceMenu({ className = "" }) {
8613
8626
  label: "Appearance settings",
8614
8627
  children: /* @__PURE__ */ jsxs70("div", { className: "fd-stack", style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
8615
8628
  /* @__PURE__ */ jsxs70("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8616
- /* @__PURE__ */ jsx81("span", { className: "fd-field-label", children: "Theme" }),
8617
- /* @__PURE__ */ jsx81(
8629
+ /* @__PURE__ */ jsx82("span", { className: "fd-field-label", children: "Theme" }),
8630
+ /* @__PURE__ */ jsx82(
8618
8631
  SegmentedControl,
8619
8632
  {
8620
8633
  options: THEME_OPTIONS,
@@ -8625,8 +8638,8 @@ function AppearanceMenu({ className = "" }) {
8625
8638
  )
8626
8639
  ] }),
8627
8640
  /* @__PURE__ */ jsxs70("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8628
- /* @__PURE__ */ jsx81("span", { className: "fd-field-label", children: "Text size" }),
8629
- /* @__PURE__ */ jsx81(
8641
+ /* @__PURE__ */ jsx82("span", { className: "fd-field-label", children: "Text size" }),
8642
+ /* @__PURE__ */ jsx82(
8630
8643
  SegmentedControl,
8631
8644
  {
8632
8645
  options: TEXT_SCALE_OPTIONS,
@@ -8636,7 +8649,7 @@ function AppearanceMenu({ className = "" }) {
8636
8649
  }
8637
8650
  )
8638
8651
  ] }),
8639
- /* @__PURE__ */ jsx81(
8652
+ /* @__PURE__ */ jsx82(
8640
8653
  Switch,
8641
8654
  {
8642
8655
  label: "High contrast",
@@ -8645,7 +8658,7 @@ function AppearanceMenu({ className = "" }) {
8645
8658
  onChange: (e) => patch({ highContrast: e.target.checked })
8646
8659
  }
8647
8660
  ),
8648
- /* @__PURE__ */ jsx81(
8661
+ /* @__PURE__ */ jsx82(
8649
8662
  Switch,
8650
8663
  {
8651
8664
  label: "Reduce motion",
@@ -8662,10 +8675,10 @@ function AppearanceMenu({ className = "" }) {
8662
8675
 
8663
8676
  // src/components/platform/ApiSpecBrowser.tsx
8664
8677
  import * as React59 from "react";
8665
- import { jsx as jsx82, jsxs as jsxs71 } from "react/jsx-runtime";
8678
+ import { jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
8666
8679
  var METHOD_TONE = { GET: "success", POST: "info", PATCH: "warning", PUT: "warning", DELETE: "danger" };
8667
8680
  function Json({ obj }) {
8668
- return /* @__PURE__ */ jsx82("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
8681
+ return /* @__PURE__ */ jsx83("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
8669
8682
  }
8670
8683
  function Endpoint({ s, onRequest }) {
8671
8684
  const [tried, setTried] = React59.useState(null);
@@ -8679,50 +8692,50 @@ function Endpoint({ s, onRequest }) {
8679
8692
  setTried({ ms: Math.round((window.performance || Date).now() - t0), error: String(e && e.message || e) });
8680
8693
  }
8681
8694
  };
8682
- return /* @__PURE__ */ jsx82(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 0 }, children: [
8695
+ return /* @__PURE__ */ jsx83(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 0 }, children: [
8683
8696
  /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 10, padding: "14px 18px", flexWrap: "wrap" }, children: [
8684
- /* @__PURE__ */ jsx82(Badge, { tone: METHOD_TONE[s.method] || "neutral", children: s.method }),
8685
- /* @__PURE__ */ jsx82("code", { className: "fd-mono", style: { fontSize: 12.5, fontWeight: 600, color: "var(--text)", wordBreak: "break-all" }, children: s.path }),
8686
- s.isList ? /* @__PURE__ */ jsx82(Badge, { tone: "neutral", icon: "rows", children: "Paged list" }) : null,
8687
- /* @__PURE__ */ jsx82("span", { style: { flex: 1 } }),
8697
+ /* @__PURE__ */ jsx83(Badge, { tone: METHOD_TONE[s.method] || "neutral", children: s.method }),
8698
+ /* @__PURE__ */ jsx83("code", { className: "fd-mono", style: { fontSize: 12.5, fontWeight: 600, color: "var(--text)", wordBreak: "break-all" }, children: s.path }),
8699
+ s.isList ? /* @__PURE__ */ jsx83(Badge, { tone: "neutral", icon: "rows", children: "Paged list" }) : null,
8700
+ /* @__PURE__ */ jsx83("span", { style: { flex: 1 } }),
8688
8701
  /* @__PURE__ */ jsxs71("span", { className: "fd-body-sm fd-muted fd-mono", children: [
8689
8702
  s.latency[0],
8690
8703
  "\u2013",
8691
8704
  s.latency[1],
8692
8705
  "ms"
8693
8706
  ] }),
8694
- /* @__PURE__ */ jsx82(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
8707
+ /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
8695
8708
  ] }),
8696
8709
  /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 14, padding: "0 18px 16px" }, children: [
8697
8710
  /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8698
- /* @__PURE__ */ jsx82("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: s.title }),
8699
- /* @__PURE__ */ jsx82("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: s.purpose }),
8700
- s.usedBy && s.usedBy.length ? /* @__PURE__ */ jsx82("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: s.usedBy.map((u) => /* @__PURE__ */ jsx82(Tag, { children: u }, u)) }) : null
8711
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: s.title }),
8712
+ /* @__PURE__ */ jsx83("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: s.purpose }),
8713
+ s.usedBy && s.usedBy.length ? /* @__PURE__ */ jsx83("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: s.usedBy.map((u) => /* @__PURE__ */ jsx83(Tag, { children: u }, u)) }) : null
8701
8714
  ] }),
8702
8715
  /* @__PURE__ */ jsxs71("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(280px,1fr))", gap: 12, alignItems: "start" }, children: [
8703
8716
  s.request ? /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8704
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Request body" }),
8705
- /* @__PURE__ */ jsx82(Json, { obj: s.request })
8717
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Request body" }),
8718
+ /* @__PURE__ */ jsx83(Json, { obj: s.request })
8706
8719
  ] }) : null,
8707
8720
  s.query ? /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8708
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Query" }),
8709
- /* @__PURE__ */ jsx82(Json, { obj: s.query })
8721
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Query" }),
8722
+ /* @__PURE__ */ jsx83(Json, { obj: s.query })
8710
8723
  ] }) : null,
8711
8724
  /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8712
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Response 200" }),
8713
- /* @__PURE__ */ jsx82(Json, { obj: s.response })
8725
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Response 200" }),
8726
+ /* @__PURE__ */ jsx83(Json, { obj: s.response })
8714
8727
  ] })
8715
8728
  ] }),
8716
- s.notes ? /* @__PURE__ */ jsx82(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
8729
+ s.notes ? /* @__PURE__ */ jsx83(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
8717
8730
  tried && tried !== "busy" ? /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8718
8731
  /* @__PURE__ */ jsxs71("span", { className: "fd-row", style: { gap: 8 }, children: [
8719
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
8732
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
8720
8733
  /* @__PURE__ */ jsxs71(Badge, { tone: tried.error ? "danger" : "success", icon: "timer", children: [
8721
8734
  tried.ms,
8722
8735
  "ms"
8723
8736
  ] })
8724
8737
  ] }),
8725
- /* @__PURE__ */ jsx82(Json, { obj: tried.error ? { error: tried.error } : tried.data })
8738
+ /* @__PURE__ */ jsx83(Json, { obj: tried.error ? { error: tried.error } : tried.data })
8726
8739
  ] }) : null
8727
8740
  ] })
8728
8741
  ] }) });
@@ -8752,46 +8765,46 @@ function ApiSpecBrowser({
8752
8765
  const listCount = spec.filter((s) => s.isList).length;
8753
8766
  return /* @__PURE__ */ jsxs71("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 1100 }, ...rest, children: [
8754
8767
  /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 10 }, children: [
8755
- kicker ? /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: kicker }) : null,
8756
- /* @__PURE__ */ jsx82("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
8757
- lede ? /* @__PURE__ */ jsx82("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede }) : null
8768
+ kicker ? /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: kicker }) : null,
8769
+ /* @__PURE__ */ jsx83("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
8770
+ lede ? /* @__PURE__ */ jsx83("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede }) : null
8758
8771
  ] }),
8759
8772
  modules && modules.length ? /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 8 }, children: [
8760
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Filter by screen \u2014 every endpoint that screen depends on" }),
8773
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Filter by screen \u2014 every endpoint that screen depends on" }),
8761
8774
  /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
8762
8775
  /* @__PURE__ */ jsxs71(Tag, { icon: "stack", selected: !mod, onClick: () => setMod(null), children: [
8763
8776
  "All screens ",
8764
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: spec.length })
8777
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: spec.length })
8765
8778
  ] }),
8766
8779
  modules.map((m) => /* @__PURE__ */ jsxs71(Tag, { icon: m.icon, selected: mod === m.id, onClick: () => setMod(mod === m.id ? null : m.id), children: [
8767
8780
  m.label,
8768
8781
  " ",
8769
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: m.endpoints.length })
8782
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: m.endpoints.length })
8770
8783
  ] }, m.id))
8771
8784
  ] }),
8772
- activeModule ? /* @__PURE__ */ jsx82(
8785
+ activeModule ? /* @__PURE__ */ jsx83(
8773
8786
  Flag,
8774
8787
  {
8775
8788
  tone: "info",
8776
8789
  statement: activeModule.label + " calls " + activeModule.endpoints.length + " endpoints.",
8777
8790
  cost: "Integration checklist for this screen: " + activeModule.endpoints.join(", ") + ". Wire these and the screen is done.",
8778
- actions: /* @__PURE__ */ jsx82(Button, { size: "sm", variant: "ghost", icon: "x", onClick: () => setMod(null), children: "Show all screens" })
8791
+ actions: /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", icon: "x", onClick: () => setMod(null), children: "Show all screens" })
8779
8792
  }
8780
8793
  ) : null
8781
8794
  ] }) : null,
8782
- sourceNote ? /* @__PURE__ */ jsx82(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
8795
+ sourceNote ? /* @__PURE__ */ jsx83(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
8783
8796
  /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
8784
- /* @__PURE__ */ jsx82(Input, { icon: "magnifying-glass", placeholder: "Find an endpoint, screen, or behavior", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
8797
+ /* @__PURE__ */ jsx83(Input, { icon: "magnifying-glass", placeholder: "Find an endpoint, screen, or behavior", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
8785
8798
  methods.map((m) => /* @__PURE__ */ jsxs71(Tag, { selected: method === m, onClick: () => setMethod(method === m ? null : m), children: [
8786
8799
  m,
8787
8800
  " ",
8788
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
8801
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
8789
8802
  ] }, m)),
8790
8803
  listCount ? /* @__PURE__ */ jsxs71(Tag, { icon: "rows", selected: listOnly, onClick: () => setListOnly(!listOnly), children: [
8791
8804
  "Paged lists ",
8792
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: listCount })
8805
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: listCount })
8793
8806
  ] }) : null,
8794
- /* @__PURE__ */ jsx82("span", { style: { flex: 1 } }),
8807
+ /* @__PURE__ */ jsx83("span", { style: { flex: 1 } }),
8795
8808
  /* @__PURE__ */ jsxs71("span", { className: "fd-body-sm fd-muted", children: [
8796
8809
  hits.length,
8797
8810
  " of ",
@@ -8800,23 +8813,23 @@ function ApiSpecBrowser({
8800
8813
  listCount ? " \xB7 " + listCount + " paged" : ""
8801
8814
  ] })
8802
8815
  ] }),
8803
- hits.length === 0 ? /* @__PURE__ */ jsx82(Card, { elevation: "flat", children: /* @__PURE__ */ jsx82("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No endpoint matches those filters." }) }) : effGroups.map(([g, ids]) => {
8816
+ hits.length === 0 ? /* @__PURE__ */ jsx83(Card, { elevation: "flat", children: /* @__PURE__ */ jsx83("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No endpoint matches those filters." }) }) : effGroups.map(([g, ids]) => {
8804
8817
  const items = hits.filter((s) => ids.indexOf(s.id) >= 0);
8805
8818
  if (!items.length) return null;
8806
8819
  return /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 12 }, children: [
8807
- /* @__PURE__ */ jsx82("span", { className: "fd-label-lg", children: g }),
8808
- items.map((s) => /* @__PURE__ */ jsx82(Endpoint, { s, onRequest }, s.id))
8820
+ /* @__PURE__ */ jsx83("span", { className: "fd-label-lg", children: g }),
8821
+ items.map((s) => /* @__PURE__ */ jsx83(Endpoint, { s, onRequest }, s.id))
8809
8822
  ] }, g);
8810
8823
  }),
8811
- conventions && conventions.length ? /* @__PURE__ */ jsx82(Card, { title: "Cross-cutting conventions", elevation: "flat", children: /* @__PURE__ */ jsx82("div", { className: "fd-stack", style: { gap: 10 }, children: conventions.map(([k, v]) => /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 12, alignItems: "flex-start" }, children: [
8812
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", style: { width: 110, flex: "none", paddingTop: 2 }, children: k }),
8813
- /* @__PURE__ */ jsx82("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: v })
8824
+ conventions && conventions.length ? /* @__PURE__ */ jsx83(Card, { title: "Cross-cutting conventions", elevation: "flat", children: /* @__PURE__ */ jsx83("div", { className: "fd-stack", style: { gap: 10 }, children: conventions.map(([k, v]) => /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 12, alignItems: "flex-start" }, children: [
8825
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", style: { width: 110, flex: "none", paddingTop: 2 }, children: k }),
8826
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: v })
8814
8827
  ] }, k)) }) }) : null,
8815
- openQuestions && openQuestions.length ? /* @__PURE__ */ jsx82(Collapsible, { icon: "list-checks", title: "Open questions before implementation", subtitle: openQuestions.length + " unresolved", children: /* @__PURE__ */ jsx82("div", { className: "fd-stack", style: { gap: 8 }, children: openQuestions.map(([id, question, why]) => /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start", padding: "8px 0", borderTop: "1px solid var(--border)" }, children: [
8816
- /* @__PURE__ */ jsx82(Badge, { tone: "danger", children: id }),
8828
+ openQuestions && openQuestions.length ? /* @__PURE__ */ jsx83(Collapsible, { icon: "list-checks", title: "Open questions before implementation", subtitle: openQuestions.length + " unresolved", children: /* @__PURE__ */ jsx83("div", { className: "fd-stack", style: { gap: 8 }, children: openQuestions.map(([id, question, why]) => /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start", padding: "8px 0", borderTop: "1px solid var(--border)" }, children: [
8829
+ /* @__PURE__ */ jsx83(Badge, { tone: "danger", children: id }),
8817
8830
  /* @__PURE__ */ jsxs71("span", { className: "fd-stack", style: { gap: 2, flex: 1 }, children: [
8818
- /* @__PURE__ */ jsx82("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: question }),
8819
- /* @__PURE__ */ jsx82("span", { className: "fd-body-sm fd-muted", children: why })
8831
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: question }),
8832
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-muted", children: why })
8820
8833
  ] })
8821
8834
  ] }, id)) }) }) : null
8822
8835
  ] });
@@ -8824,7 +8837,7 @@ function ApiSpecBrowser({
8824
8837
 
8825
8838
  // src/components/platform/ProfilePage.tsx
8826
8839
  import * as React60 from "react";
8827
- import { jsx as jsx83, jsxs as jsxs72 } from "react/jsx-runtime";
8840
+ import { jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
8828
8841
  function fieldInitialValue(field, user) {
8829
8842
  if (field.value) return field.value(user);
8830
8843
  const raw = user[field.key];
@@ -8912,35 +8925,35 @@ function ProfilePage({
8912
8925
  const fieldGroups = groupFields(fields);
8913
8926
  return /* @__PURE__ */ jsxs72("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 860 }, children: [
8914
8927
  /* @__PURE__ */ jsxs72("div", { className: "fd-stack", style: { gap: 10 }, children: [
8915
- /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Account" }),
8916
- /* @__PURE__ */ jsx83("h1", { className: "fd-h1", style: { margin: 0 }, children: "Your profile" }),
8917
- /* @__PURE__ */ jsx83("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: "How you appear to colleagues and clients across every flytedesk app, and what we send you." })
8928
+ /* @__PURE__ */ jsx84("span", { className: "fd-overline fd-muted", children: "Account" }),
8929
+ /* @__PURE__ */ jsx84("h1", { className: "fd-h1", style: { margin: 0 }, children: "Your profile" }),
8930
+ /* @__PURE__ */ jsx84("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: "How you appear to colleagues and clients across every flytedesk app, and what we send you." })
8918
8931
  ] }),
8919
- /* @__PURE__ */ jsx83(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs72("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap", alignItems: "flex-start" }, children: [
8920
- /* @__PURE__ */ jsx83(Avatar, { name: displayName, size: "lg" }),
8932
+ /* @__PURE__ */ jsx84(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs72("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap", alignItems: "flex-start" }, children: [
8933
+ /* @__PURE__ */ jsx84(Avatar, { name: displayName, size: "lg" }),
8921
8934
  /* @__PURE__ */ jsxs72("div", { className: "fd-stack", style: { gap: 4, flex: 1, minWidth: 200 }, children: [
8922
- /* @__PURE__ */ jsx83("span", { className: "fd-h3", style: { margin: 0 }, children: displayName }),
8935
+ /* @__PURE__ */ jsx84("span", { className: "fd-h3", style: { margin: 0 }, children: displayName }),
8923
8936
  /* @__PURE__ */ jsxs72("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 4 }, children: [
8924
- roles.map((r) => /* @__PURE__ */ jsx83(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)),
8925
- user.sso ? /* @__PURE__ */ jsx83(Badge, { tone: "info", icon: "shield-check", children: "SSO" }) : null
8937
+ roles.map((r) => /* @__PURE__ */ jsx84(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)),
8938
+ user.sso ? /* @__PURE__ */ jsx84(Badge, { tone: "info", icon: "shield-check", children: "SSO" }) : null
8926
8939
  ] })
8927
8940
  ] }),
8928
- onChangePhoto ? /* @__PURE__ */ jsx83(Button, { variant: "secondary", size: "sm", icon: "image", onClick: onChangePhoto, children: "Change photo" }) : null
8941
+ onChangePhoto ? /* @__PURE__ */ jsx84(Button, { variant: "secondary", size: "sm", icon: "image", onClick: onChangePhoto, children: "Change photo" }) : null
8929
8942
  ] }) }),
8930
- fieldGroups.map(({ group, description, fields: groupFieldDefs }) => /* @__PURE__ */ jsx83(
8943
+ fieldGroups.map(({ group, description, fields: groupFieldDefs }) => /* @__PURE__ */ jsx84(
8931
8944
  Card,
8932
8945
  {
8933
8946
  title: description ? /* @__PURE__ */ jsxs72("span", { className: "fd-stack", style: { gap: 2 }, children: [
8934
- /* @__PURE__ */ jsx83("span", { children: group }),
8935
- /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: description })
8947
+ /* @__PURE__ */ jsx84("span", { children: group }),
8948
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: description })
8936
8949
  ] }) : group,
8937
8950
  elevation: "flat",
8938
8951
  children: /* @__PURE__ */ jsxs72("div", { className: "fd-stack", style: { gap: 14 }, children: [
8939
- /* @__PURE__ */ jsx83("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: groupFieldDefs.filter((f) => f.type !== "textarea").map((field) => {
8952
+ /* @__PURE__ */ jsx84("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: groupFieldDefs.filter((f) => f.type !== "textarea").map((field) => {
8940
8953
  const help = typeof field.help === "function" ? field.help(user) : field.help;
8941
8954
  const readOnly = field.readOnly || field.type === "readonly";
8942
8955
  if (field.type === "select") {
8943
- return /* @__PURE__ */ jsx83(
8956
+ return /* @__PURE__ */ jsx84(
8944
8957
  Select,
8945
8958
  {
8946
8959
  label: field.label,
@@ -8954,7 +8967,7 @@ function ProfilePage({
8954
8967
  field.key
8955
8968
  );
8956
8969
  }
8957
- return /* @__PURE__ */ jsx83(
8970
+ return /* @__PURE__ */ jsx84(
8958
8971
  Input,
8959
8972
  {
8960
8973
  label: field.label,
@@ -8970,7 +8983,7 @@ function ProfilePage({
8970
8983
  }) }),
8971
8984
  groupFieldDefs.filter((f) => f.type === "textarea").map((field) => {
8972
8985
  const help = typeof field.help === "function" ? field.help(user) : field.help;
8973
- return /* @__PURE__ */ jsx83(
8986
+ return /* @__PURE__ */ jsx84(
8974
8987
  Textarea,
8975
8988
  {
8976
8989
  label: field.label,
@@ -8990,16 +9003,16 @@ function ProfilePage({
8990
9003
  group
8991
9004
  )),
8992
9005
  extra,
8993
- notifications.length > 0 ? /* @__PURE__ */ jsx83(Card, { title: "Notifications", elevation: "flat", children: /* @__PURE__ */ jsx83("div", { className: "fd-stack", style: { gap: 14 }, children: notifications.map((n) => /* @__PURE__ */ jsx83(Switch, { checked: !!notify[n.key], onChange: () => toggleNotify(n.key), label: n.label, description: n.description }, n.key)) }) }) : null,
9006
+ notifications.length > 0 ? /* @__PURE__ */ jsx84(Card, { title: "Notifications", elevation: "flat", children: /* @__PURE__ */ jsx84("div", { className: "fd-stack", style: { gap: 14 }, children: notifications.map((n) => /* @__PURE__ */ jsx84(Switch, { checked: !!notify[n.key], onChange: () => toggleNotify(n.key), label: n.label, description: n.description }, n.key)) }) }) : null,
8994
9007
  /* @__PURE__ */ jsxs72(
8995
9008
  Card,
8996
9009
  {
8997
9010
  title: /* @__PURE__ */ jsxs72("span", { className: "fd-stack", style: { gap: 2 }, children: [
8998
- /* @__PURE__ */ jsx83("span", { children: "Access" }),
8999
- /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "What your roles grant you" })
9011
+ /* @__PURE__ */ jsx84("span", { children: "Access" }),
9012
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "What your roles grant you" })
9000
9013
  ] }),
9001
9014
  elevation: "flat",
9002
- action: /* @__PURE__ */ jsx83(
9015
+ action: /* @__PURE__ */ jsx84(
9003
9016
  Button,
9004
9017
  {
9005
9018
  size: "sm",
@@ -9011,34 +9024,34 @@ function ProfilePage({
9011
9024
  ),
9012
9025
  children: [
9013
9026
  /* @__PURE__ */ jsxs72("div", { className: "fd-stack", style: { gap: 0 }, children: [
9014
- /* @__PURE__ */ jsx83(CardRow, { label: "Roles", children: roles.map((r) => r.name).join(", ") || "None" }),
9027
+ /* @__PURE__ */ jsx84(CardRow, { label: "Roles", children: roles.map((r) => r.name).join(", ") || "None" }),
9015
9028
  /* @__PURE__ */ jsxs72(CardRow, { label: "Permissions", children: [
9016
9029
  permissions.length,
9017
9030
  " granted"
9018
9031
  ] }),
9019
- /* @__PURE__ */ jsx83(CardRow, { label: "Member since", children: user.joined || "\u2014" })
9032
+ /* @__PURE__ */ jsx84(CardRow, { label: "Member since", children: user.joined || "\u2014" })
9020
9033
  ] }),
9021
- /* @__PURE__ */ jsx83("p", { className: "fd-body-sm fd-muted", style: { margin: "12px 0 0" }, children: "You cannot change your own roles \u2014 that is the point of them. An administrator manages roles from Admin \u2192 Users." })
9034
+ /* @__PURE__ */ jsx84("p", { className: "fd-body-sm fd-muted", style: { margin: "12px 0 0" }, children: "You cannot change your own roles \u2014 that is the point of them. An administrator manages roles from Admin \u2192 Users." })
9022
9035
  ]
9023
9036
  }
9024
9037
  ),
9025
- sessions ? /* @__PURE__ */ jsx83(
9038
+ sessions ? /* @__PURE__ */ jsx84(
9026
9039
  Card,
9027
9040
  {
9028
9041
  title: "Signed-in devices",
9029
9042
  elevation: "flat",
9030
- action: /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", icon: "sign-out", onClick: onSignOutEverywhere, children: "Sign out everywhere" }),
9031
- children: /* @__PURE__ */ jsx83("div", { className: "fd-stack", style: { gap: 0 }, children: sessions.length === 0 ? /* @__PURE__ */ jsx83("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No other signed-in devices." }) : sessions.map((s) => /* @__PURE__ */ jsxs72("div", { className: "fd-row", style: { gap: 12, padding: "10px 0", borderTop: "1px solid var(--border)", flexWrap: "wrap" }, children: [
9032
- /* @__PURE__ */ jsx83("i", { className: "ph ph-device-mobile", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
9043
+ action: /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", icon: "sign-out", onClick: onSignOutEverywhere, children: "Sign out everywhere" }),
9044
+ children: /* @__PURE__ */ jsx84("div", { className: "fd-stack", style: { gap: 0 }, children: sessions.length === 0 ? /* @__PURE__ */ jsx84("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No other signed-in devices." }) : sessions.map((s) => /* @__PURE__ */ jsxs72("div", { className: "fd-row", style: { gap: 12, padding: "10px 0", borderTop: "1px solid var(--border)", flexWrap: "wrap" }, children: [
9045
+ /* @__PURE__ */ jsx84("i", { className: "ph ph-device-mobile", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
9033
9046
  /* @__PURE__ */ jsxs72("span", { className: "fd-stack", style: { gap: 1, flex: 1, minWidth: 160 }, children: [
9034
- /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: s.device }),
9047
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: s.device }),
9035
9048
  /* @__PURE__ */ jsxs72("span", { className: "fd-body-sm fd-muted", children: [
9036
9049
  s.where,
9037
9050
  " \xB7 ",
9038
9051
  s.when
9039
9052
  ] })
9040
9053
  ] }),
9041
- s.current ? /* @__PURE__ */ jsx83(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", children: "Revoke" })
9054
+ s.current ? /* @__PURE__ */ jsx84(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", children: "Revoke" })
9042
9055
  ] }, s.id)) })
9043
9056
  }
9044
9057
  ) : null,
@@ -9053,16 +9066,16 @@ function ProfilePage({
9053
9066
  border: "1px solid var(--border)",
9054
9067
  boxShadow: "0 -4px 16px rgba(11,13,17,.06)"
9055
9068
  }, children: [
9056
- /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 600, flex: 1 }, children: saved ? "Saved." : dirty ? "Unsaved changes" : "No pending changes" }),
9057
- /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", disabled: !dirty || saving, onClick: discard, children: "Discard" }),
9058
- /* @__PURE__ */ jsx83(Button, { size: "sm", icon: "check", disabled: !dirty || !canSave, loading: saving, onClick: save, children: "Save changes" })
9069
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm", style: { fontWeight: 600, flex: 1 }, children: saved ? "Saved." : dirty ? "Unsaved changes" : "No pending changes" }),
9070
+ /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", disabled: !dirty || saving, onClick: discard, children: "Discard" }),
9071
+ /* @__PURE__ */ jsx84(Button, { size: "sm", icon: "check", disabled: !dirty || !canSave, loading: saving, onClick: save, children: "Save changes" })
9059
9072
  ] })
9060
9073
  ] });
9061
9074
  }
9062
9075
 
9063
9076
  // src/components/platform/SessionScreen.tsx
9064
9077
  import * as React61 from "react";
9065
- import { Fragment as Fragment21, jsx as jsx84, jsxs as jsxs73 } from "react/jsx-runtime";
9078
+ import { Fragment as Fragment22, jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
9066
9079
  var COPY = {
9067
9080
  "signing-in": { busy: "Signing you in\u2026" },
9068
9081
  "session-expired": { busy: "Your session expired \u2014 signing you back in\u2026" },
@@ -9084,19 +9097,19 @@ function SessionScreen({ kind, error, onRetry, productName }) {
9084
9097
  React61.useEffect(() => {
9085
9098
  titleRef.current?.focus({ preventScroll: true });
9086
9099
  }, [failed]);
9087
- return /* @__PURE__ */ jsx84("main", { className: "fd-session-screen", children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-inner", children: [
9088
- /* @__PURE__ */ jsx84("div", { className: "fd-session-screen-mark", "data-theme": "dark", children: /* @__PURE__ */ jsx84(FlytedeskMark, { size: "lg" }) }),
9100
+ return /* @__PURE__ */ jsx85("main", { className: "fd-session-screen", children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-inner", children: [
9101
+ /* @__PURE__ */ jsx85("div", { className: "fd-session-screen-mark", "data-theme": "dark", children: /* @__PURE__ */ jsx85(FlytedeskMark, { size: "lg" }) }),
9089
9102
  /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-frame", children: [
9090
- /* @__PURE__ */ jsx84("div", { className: "fd-session-screen-stripe" }),
9091
- /* @__PURE__ */ jsx84(Card, { children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-body", children: [
9092
- /* @__PURE__ */ jsx84("h1", { ref: titleRef, tabIndex: -1, className: "fd-h3 fd-session-screen-title", children: productName }),
9093
- /* @__PURE__ */ jsx84("div", { role: "status", "aria-live": "polite", className: "fd-session-screen-status", children: busyMessage !== null ? /* @__PURE__ */ jsxs73(Fragment21, { children: [
9094
- /* @__PURE__ */ jsx84("span", { className: "fd-spinner fd-spinner-lg fd-session-screen-spinner", "aria-hidden": "true" }),
9095
- /* @__PURE__ */ jsx84("p", { className: "fd-body fd-session-screen-message", children: announced })
9103
+ /* @__PURE__ */ jsx85("div", { className: "fd-session-screen-stripe" }),
9104
+ /* @__PURE__ */ jsx85(Card, { children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-body", children: [
9105
+ /* @__PURE__ */ jsx85("h1", { ref: titleRef, tabIndex: -1, className: "fd-h3 fd-session-screen-title", children: productName }),
9106
+ /* @__PURE__ */ jsx85("div", { role: "status", "aria-live": "polite", className: "fd-session-screen-status", children: busyMessage !== null ? /* @__PURE__ */ jsxs73(Fragment22, { children: [
9107
+ /* @__PURE__ */ jsx85("span", { className: "fd-spinner fd-spinner-lg fd-session-screen-spinner", "aria-hidden": "true" }),
9108
+ /* @__PURE__ */ jsx85("p", { className: "fd-body fd-session-screen-message", children: announced })
9096
9109
  ] }) : null }),
9097
9110
  failureTitle !== null ? /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-failure", children: [
9098
- /* @__PURE__ */ jsx84(Banner, { tone: "danger", title: failureTitle, detail: error ?? void 0 }),
9099
- onRetry !== null ? /* @__PURE__ */ jsx84(Button, { variant: "primary", block: true, onClick: onRetry, children: "Try again" }) : null
9111
+ /* @__PURE__ */ jsx85(Banner, { tone: "danger", title: failureTitle, detail: error ?? void 0 }),
9112
+ onRetry !== null ? /* @__PURE__ */ jsx85(Button, { variant: "primary", block: true, onClick: onRetry, children: "Try again" }) : null
9100
9113
  ] }) : null
9101
9114
  ] }) })
9102
9115
  ] })
@@ -10919,7 +10932,7 @@ var UseRuntimeMode = useRuntimeMode;
10919
10932
  var UseFeatureStatus = useFeatureStatus;
10920
10933
 
10921
10934
  // src/components/platform/RoadmapTimeline.tsx
10922
- import { jsx as jsx85, jsxs as jsxs74 } from "react/jsx-runtime";
10935
+ import { jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
10923
10936
  var STATUS = {
10924
10937
  shipped: { tone: "success", icon: "check-circle", label: "Wired" },
10925
10938
  next: { tone: "warning", icon: "traffic-cone", label: "Not wired" },
@@ -10934,43 +10947,43 @@ function RoadmapCard({ item, byKey, onOpenFlag }) {
10934
10947
  const s = STATUS[item.status] || STATUS.planned;
10935
10948
  const deps = (item.dependsOn || []).map((k) => byKey[k]).filter(Boolean);
10936
10949
  const blocking = deps.filter((d) => !d.implemented);
10937
- return /* @__PURE__ */ jsx85(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 10 }, children: [
10950
+ return /* @__PURE__ */ jsx86(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 10 }, children: [
10938
10951
  /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
10939
- /* @__PURE__ */ jsx85("span", { className: "fd-body", style: { fontWeight: 700, flex: 1, minWidth: 140 }, children: item.label }),
10940
- /* @__PURE__ */ jsx85(Badge, { tone: "neutral", icon: PROJECT_ICON[item.project] || "squares-four", children: item.project }),
10941
- /* @__PURE__ */ jsx85(Badge, { tone: s.tone, icon: s.icon, children: s.label })
10952
+ /* @__PURE__ */ jsx86("span", { className: "fd-body", style: { fontWeight: 700, flex: 1, minWidth: 140 }, children: item.label }),
10953
+ /* @__PURE__ */ jsx86(Badge, { tone: "neutral", icon: PROJECT_ICON[item.project] || "squares-four", children: item.project }),
10954
+ /* @__PURE__ */ jsx86(Badge, { tone: s.tone, icon: s.icon, children: s.label })
10942
10955
  ] }),
10943
- /* @__PURE__ */ jsx85("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
10956
+ /* @__PURE__ */ jsx86("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
10944
10957
  item.backend ? /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start" }, children: [
10945
- /* @__PURE__ */ jsx85("span", { className: "fd-overline fd-muted", style: { width: 62, flex: "none", paddingTop: 2 }, children: "Backend" }),
10946
- /* @__PURE__ */ jsx85("span", { className: "fd-body-sm", style: { flex: 1, textWrap: "pretty" }, children: item.backend })
10958
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", style: { width: 62, flex: "none", paddingTop: 2 }, children: "Backend" }),
10959
+ /* @__PURE__ */ jsx86("span", { className: "fd-body-sm", style: { flex: 1, textWrap: "pretty" }, children: item.backend })
10947
10960
  ] }) : null,
10948
10961
  /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
10949
10962
  item.effort ? /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm fd-muted", children: [
10950
- /* @__PURE__ */ jsx85("i", { className: "ph ph-hourglass-medium" }),
10963
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-hourglass-medium" }),
10951
10964
  " ",
10952
10965
  item.effort
10953
10966
  ] }) : null,
10954
10967
  /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm fd-muted", children: [
10955
- /* @__PURE__ */ jsx85("i", { className: "ph ph-user" }),
10968
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-user" }),
10956
10969
  " ",
10957
10970
  item.owner
10958
10971
  ] }),
10959
- item.screen ? /* @__PURE__ */ jsx85(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
10960
- /* @__PURE__ */ jsx85("span", { style: { flex: 1 } }),
10961
- /* @__PURE__ */ jsx85(
10972
+ item.screen ? /* @__PURE__ */ jsx86(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
10973
+ /* @__PURE__ */ jsx86("span", { style: { flex: 1 } }),
10974
+ /* @__PURE__ */ jsx86(
10962
10975
  "button",
10963
10976
  {
10964
10977
  type: "button",
10965
10978
  onClick: () => onOpenFlag && onOpenFlag(item.key),
10966
10979
  style: { all: "unset", cursor: "pointer", display: "inline-flex", alignItems: "center", gap: 5 },
10967
- children: /* @__PURE__ */ jsx85("code", { className: "fd-mono", style: { fontSize: 11, color: "var(--brand)" }, children: item.key })
10980
+ children: /* @__PURE__ */ jsx86("code", { className: "fd-mono", style: { fontSize: 11, color: "var(--brand)" }, children: item.key })
10968
10981
  }
10969
10982
  )
10970
10983
  ] }),
10971
10984
  deps.length ? /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 6, borderTop: "1px solid var(--border)" }, children: [
10972
- /* @__PURE__ */ jsx85("span", { className: "fd-overline fd-muted", style: { paddingTop: 3 }, children: "After" }),
10973
- deps.map((d) => /* @__PURE__ */ jsx85(Tag, { icon: d.implemented ? "check" : "clock", children: d.label }, d.key))
10985
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", style: { paddingTop: 3 }, children: "After" }),
10986
+ deps.map((d) => /* @__PURE__ */ jsx86(Tag, { icon: d.implemented ? "check" : "clock", children: d.label }, d.key))
10974
10987
  ] }) : null,
10975
10988
  blocking.length && !item.implemented ? /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm", style: { color: "var(--warn-text)" }, children: [
10976
10989
  "Blocked until ",
@@ -11027,21 +11040,21 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11027
11040
  let lastPhase = null;
11028
11041
  return /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 16, maxWidth: 1e3 }, children: [
11029
11042
  /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 10 }, children: [
11030
- /* @__PURE__ */ jsx85("span", { className: "fd-overline fd-muted", children: "Architecture" }),
11031
- /* @__PURE__ */ jsx85("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
11032
- /* @__PURE__ */ jsx85("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede || "Every screen and feature in these tools is already designed and working against a simulated backend. This is the plan for connecting them to the real one \u2014 so the only work described here is server work." })
11043
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", children: "Architecture" }),
11044
+ /* @__PURE__ */ jsx86("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
11045
+ /* @__PURE__ */ jsx86("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede || "Every screen and feature in these tools is already designed and working against a simulated backend. This is the plan for connecting them to the real one \u2014 so the only work described here is server work." })
11033
11046
  ] }),
11034
11047
  /* @__PURE__ */ jsxs74("div", { className: "fd-grid-stats is-thin", children: [
11035
- /* @__PURE__ */ jsx85(StatTile, { compact: true, label: "Wired", value: String(rm.shipped), sub: "of " + rm.items.length + " features" }),
11036
- /* @__PURE__ */ jsx85(StatTile, { compact: true, label: "Remaining", value: String(rm.remaining), sub: "backend work" }),
11037
- /* @__PURE__ */ jsx85(StatTile, { compact: true, label: "Est. effort", value: days ? days + " days" : "\u2014", sub: "sum of estimates, not calendar" }),
11038
- /* @__PURE__ */ jsx85(StatTile, { compact: true, label: "Up next", value: nextPhase ? "Phase " + nextPhase.phase : "\u2014", sub: nextPhase ? nextPhase.phaseName : "all wired" })
11048
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Wired", value: String(rm.shipped), sub: "of " + rm.items.length + " features" }),
11049
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Remaining", value: String(rm.remaining), sub: "backend work" }),
11050
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Est. effort", value: days ? days + " days" : "\u2014", sub: "sum of estimates, not calendar" }),
11051
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Up next", value: nextPhase ? "Phase " + nextPhase.phase : "\u2014", sub: nextPhase ? nextPhase.phaseName : "all wired" })
11039
11052
  ] }),
11040
11053
  /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
11041
- /* @__PURE__ */ jsx85(Input, { icon: "magnifying-glass", placeholder: "Find a feature or a piece of backend work", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
11042
- /* @__PURE__ */ jsx85(Select, { placeholder: "All projects", value: project, onChange: (e) => setProject(e.target.value), options: projects, style: { width: 190 } }),
11043
- /* @__PURE__ */ jsx85("span", { style: { flex: 1 } }),
11044
- /* @__PURE__ */ jsx85(
11054
+ /* @__PURE__ */ jsx86(Input, { icon: "magnifying-glass", placeholder: "Find a feature or a piece of backend work", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
11055
+ /* @__PURE__ */ jsx86(Select, { placeholder: "All projects", value: project, onChange: (e) => setProject(e.target.value), options: projects, style: { width: 190 } }),
11056
+ /* @__PURE__ */ jsx86("span", { style: { flex: 1 } }),
11057
+ /* @__PURE__ */ jsx86(
11045
11058
  Button,
11046
11059
  {
11047
11060
  size: "sm",
@@ -11055,7 +11068,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11055
11068
  }
11056
11069
  )
11057
11070
  ] }),
11058
- /* @__PURE__ */ jsx85(
11071
+ /* @__PURE__ */ jsx86(
11059
11072
  Flag,
11060
11073
  {
11061
11074
  tone: "info",
@@ -11064,8 +11077,8 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11064
11077
  actions: null
11065
11078
  }
11066
11079
  ),
11067
- /* @__PURE__ */ jsx85("div", { className: "fd-rm", children: /* @__PURE__ */ jsx85("div", { className: "fd-rm-scroll", ref: scrollRef, children: /* @__PURE__ */ jsxs74("div", { className: "fd-rm-track", children: [
11068
- /* @__PURE__ */ jsx85("span", { className: "fd-rm-spine", children: /* @__PURE__ */ jsx85("span", { className: "fd-rm-spine-done", style: { height: items.length ? 100 * shippedShown / items.length + "%" : "0%" } }) }),
11080
+ /* @__PURE__ */ jsx86("div", { className: "fd-rm", children: /* @__PURE__ */ jsx86("div", { className: "fd-rm-scroll", ref: scrollRef, children: /* @__PURE__ */ jsxs74("div", { className: "fd-rm-track", children: [
11081
+ /* @__PURE__ */ jsx86("span", { className: "fd-rm-spine", children: /* @__PURE__ */ jsx86("span", { className: "fd-rm-spine-done", style: { height: items.length ? 100 * shippedShown / items.length + "%" : "0%" } }) }),
11069
11082
  items.map((item, n) => {
11070
11083
  const showPhase = item.phase !== lastPhase;
11071
11084
  lastPhase = item.phase;
@@ -11074,7 +11087,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11074
11087
  return /* @__PURE__ */ jsxs74(React64.Fragment, { children: [
11075
11088
  showPhase ? /* @__PURE__ */ jsxs74("div", { className: "fd-rm-era", children: [
11076
11089
  /* @__PURE__ */ jsxs74("span", { className: "fd-row", style: { gap: 8, flexWrap: "wrap", alignItems: "baseline" }, children: [
11077
- /* @__PURE__ */ jsx85("span", { style: { fontWeight: 700 }, children: item.phase === 0 ? "Shipped" : "Phase " + item.phase + " \u2014 " + item.phaseName }),
11090
+ /* @__PURE__ */ jsx86("span", { style: { fontWeight: 700 }, children: item.phase === 0 ? "Shipped" : "Phase " + item.phase + " \u2014 " + item.phaseName }),
11078
11091
  item.phase === 0 ? null : /* @__PURE__ */ jsxs74("span", { className: "fd-mono", style: { opacity: 0.7, fontWeight: 400 }, children: [
11079
11092
  fmtDate(item.phaseStart),
11080
11093
  " \u2013 ",
@@ -11087,28 +11100,28 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11087
11100
  inPhase === 1 ? "" : "s"
11088
11101
  ] })
11089
11102
  ] }),
11090
- item.phaseWhy ? /* @__PURE__ */ jsx85("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
11103
+ item.phaseWhy ? /* @__PURE__ */ jsx86("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
11091
11104
  ] }) : null,
11092
- isBoundary ? /* @__PURE__ */ jsx85("div", { className: "fd-rm-now", ref: nowRef, children: /* @__PURE__ */ jsxs74("span", { className: "fd-rm-now-pill", children: [
11093
- /* @__PURE__ */ jsx85("i", { className: "ph ph-map-pin" }),
11105
+ isBoundary ? /* @__PURE__ */ jsx86("div", { className: "fd-rm-now", ref: nowRef, children: /* @__PURE__ */ jsxs74("span", { className: "fd-rm-now-pill", children: [
11106
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-map-pin" }),
11094
11107
  " You are here \u2014 everything above is wired"
11095
11108
  ] }) }) : null,
11096
11109
  /* @__PURE__ */ jsxs74("div", { className: "fd-rm-row", children: [
11097
- /* @__PURE__ */ jsx85("span", { className: "fd-rm-dot " + (item.implemented ? "is-shipped" : item.status === "next" ? "is-next" : "") }),
11110
+ /* @__PURE__ */ jsx86("span", { className: "fd-rm-dot " + (item.implemented ? "is-shipped" : item.status === "next" ? "is-next" : "") }),
11098
11111
  /* @__PURE__ */ jsxs74("div", { className: "fd-rm-date", children: [
11099
11112
  fmtDate(item.date),
11100
- /* @__PURE__ */ jsx85("br", {}),
11101
- /* @__PURE__ */ jsx85("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
11113
+ /* @__PURE__ */ jsx86("br", {}),
11114
+ /* @__PURE__ */ jsx86("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
11102
11115
  ] }),
11103
- /* @__PURE__ */ jsx85(RoadmapCard, { item, byKey, onOpenFlag })
11116
+ /* @__PURE__ */ jsx86(RoadmapCard, { item, byKey, onOpenFlag })
11104
11117
  ] })
11105
11118
  ] }, item.key);
11106
11119
  }),
11107
- !items.length ? /* @__PURE__ */ jsx85("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
11120
+ !items.length ? /* @__PURE__ */ jsx86("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
11108
11121
  ] }) }) }),
11109
11122
  /* @__PURE__ */ jsxs74("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: [
11110
11123
  "Derived from the feature-flag registry \u2014 each entry's status is its flag's ",
11111
- /* @__PURE__ */ jsx85("code", { className: "fd-mono", children: "implemented" }),
11124
+ /* @__PURE__ */ jsx86("code", { className: "fd-mono", children: "implemented" }),
11112
11125
  " field, so this page cannot drift from what the apps actually do."
11113
11126
  ] })
11114
11127
  ] });
@@ -11117,7 +11130,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11117
11130
  // src/components/platform/ComingSoon.tsx
11118
11131
  import * as React65 from "react";
11119
11132
  import { createPortal as createPortal6 } from "react-dom";
11120
- import { Fragment as Fragment23, jsx as jsx86, jsxs as jsxs75 } from "react/jsx-runtime";
11133
+ import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
11121
11134
  var BYPASS_STORE = "fd.soon.bypass.v1";
11122
11135
  function readBypassed() {
11123
11136
  try {
@@ -11147,35 +11160,35 @@ function useBypass(key) {
11147
11160
  return [on, set];
11148
11161
  }
11149
11162
  function SoonCard({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass }) {
11150
- return /* @__PURE__ */ jsxs75(Fragment23, { children: [
11163
+ return /* @__PURE__ */ jsxs75(Fragment24, { children: [
11151
11164
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-badge", children: [
11152
- /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11165
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11153
11166
  label
11154
11167
  ] }),
11155
- detail ? /* @__PURE__ */ jsx86("span", { className: "fd-soon-detail", children: detail }) : null,
11168
+ detail ? /* @__PURE__ */ jsx87("span", { className: "fd-soon-detail", children: detail }) : null,
11156
11169
  backend ? /* @__PURE__ */ jsxs75("span", { className: "fd-soon-backend", children: [
11157
- /* @__PURE__ */ jsx86("span", { className: "fd-overline", children: "Needs" }),
11170
+ /* @__PURE__ */ jsx87("span", { className: "fd-overline", children: "Needs" }),
11158
11171
  " ",
11159
11172
  backend
11160
11173
  ] }) : null,
11161
11174
  eta || effort || onRoadmap ? /* @__PURE__ */ jsxs75("span", { className: "fd-soon-meta", children: [
11162
11175
  eta ? /* @__PURE__ */ jsxs75("span", { children: [
11163
- /* @__PURE__ */ jsx86("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
11176
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
11164
11177
  " ",
11165
11178
  eta
11166
11179
  ] }) : null,
11167
11180
  effort ? /* @__PURE__ */ jsxs75("span", { children: [
11168
- /* @__PURE__ */ jsx86("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
11181
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
11169
11182
  " ",
11170
11183
  effort
11171
11184
  ] }) : null,
11172
11185
  onRoadmap ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
11173
11186
  "See the roadmap ",
11174
- /* @__PURE__ */ jsx86("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11187
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11175
11188
  ] }) : null
11176
11189
  ] }) : null,
11177
11190
  allowed ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-view", onClick: onBypass, children: [
11178
- /* @__PURE__ */ jsx86("i", { className: "ph ph-eye", "aria-hidden": "true" }),
11191
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-eye", "aria-hidden": "true" }),
11179
11192
  " View and use it anyway"
11180
11193
  ] }) : null
11181
11194
  ] });
@@ -11237,7 +11250,7 @@ function ComingSoon({
11237
11250
  if (allowed && bypassed) {
11238
11251
  return /* @__PURE__ */ jsxs75("span", { className: ["fd-soon-inline-on", className].filter(Boolean).join(" "), ...rest, children: [
11239
11252
  children,
11240
- /* @__PURE__ */ jsx86(
11253
+ /* @__PURE__ */ jsx87(
11241
11254
  "button",
11242
11255
  {
11243
11256
  type: "button",
@@ -11245,12 +11258,12 @@ function ComingSoon({
11245
11258
  title: "Unwired \u2014 writes go to the simulated backend. " + tip + " Click to re-blur.",
11246
11259
  onClick: () => setBypassed(false),
11247
11260
  "aria-label": "Re-blur this unwired feature",
11248
- children: /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11261
+ children: /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11249
11262
  }
11250
11263
  )
11251
11264
  ] });
11252
11265
  }
11253
- return /* @__PURE__ */ jsx86(
11266
+ return /* @__PURE__ */ jsx87(
11254
11267
  InlineSoon,
11255
11268
  {
11256
11269
  label,
@@ -11273,17 +11286,17 @@ function ComingSoon({
11273
11286
  return /* @__PURE__ */ jsxs75("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, ...rest, children: [
11274
11287
  /* @__PURE__ */ jsxs75("div", { className: "fd-soon-bar", role: "status", children: [
11275
11288
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-badge", children: [
11276
- /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11289
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11277
11290
  "Unwired feature \u2014 you are using it anyway"
11278
11291
  ] }),
11279
- /* @__PURE__ */ jsx86("span", { className: "fd-soon-bar-detail", children: "Every action here writes to the simulated backend, so nothing you do persists beyond this session." }),
11292
+ /* @__PURE__ */ jsx87("span", { className: "fd-soon-bar-detail", children: "Every action here writes to the simulated backend, so nothing you do persists beyond this session." }),
11280
11293
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-bar-actions", children: [
11281
11294
  onRoadmap ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
11282
11295
  "Roadmap ",
11283
- /* @__PURE__ */ jsx86("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11296
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11284
11297
  ] }) : null,
11285
11298
  /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-link", onClick: () => setBypassed(false), children: [
11286
- /* @__PURE__ */ jsx86("i", { className: "ph ph-eye-slash", "aria-hidden": "true" }),
11299
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-eye-slash", "aria-hidden": "true" }),
11287
11300
  " Re-blur"
11288
11301
  ] })
11289
11302
  ] })
@@ -11292,9 +11305,9 @@ function ComingSoon({
11292
11305
  ] });
11293
11306
  }
11294
11307
  return /* @__PURE__ */ jsxs75("div", { className: ["fd-soon", className].filter(Boolean).join(" "), style: minHeight ? { minHeight } : void 0, ...rest, children: [
11295
- /* @__PURE__ */ jsx86("div", { className: "fd-soon-under", style: { filter: "blur(" + blur + "px) saturate(.62)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11296
- /* @__PURE__ */ jsx86("div", { className: "fd-soon-veil" }),
11297
- /* @__PURE__ */ jsx86("div", { className: "fd-soon-note", role: "note", children: /* @__PURE__ */ jsx86(
11308
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-under", style: { filter: "blur(" + blur + "px) saturate(.62)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11309
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-veil" }),
11310
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-note", role: "note", children: /* @__PURE__ */ jsx87(
11298
11311
  SoonCard,
11299
11312
  {
11300
11313
  label,
@@ -11345,8 +11358,8 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11345
11358
  onBlur: hide,
11346
11359
  ...rest,
11347
11360
  children: [
11348
- /* @__PURE__ */ jsx86("span", { className: "fd-soon-under", style: { filter: "blur(" + Math.min(blur, 1.1) + "px) saturate(.66)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11349
- /* @__PURE__ */ jsx86(
11361
+ /* @__PURE__ */ jsx87("span", { className: "fd-soon-under", style: { filter: "blur(" + Math.min(blur, 1.1) + "px) saturate(.66)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11362
+ /* @__PURE__ */ jsx87(
11350
11363
  "button",
11351
11364
  {
11352
11365
  type: "button",
@@ -11357,11 +11370,11 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11357
11370
  onFocus: show,
11358
11371
  onBlur: hide,
11359
11372
  onClick: () => open2 ? setOpen(false) : show(),
11360
- children: /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11373
+ children: /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11361
11374
  }
11362
11375
  ),
11363
11376
  open2 && pos ? createPortal6(
11364
- /* @__PURE__ */ jsx86(
11377
+ /* @__PURE__ */ jsx87(
11365
11378
  "div",
11366
11379
  {
11367
11380
  ref: hoverCardRef,
@@ -11370,7 +11383,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11370
11383
  style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex },
11371
11384
  onMouseEnter: show,
11372
11385
  onMouseLeave: hide,
11373
- children: /* @__PURE__ */ jsx86(
11386
+ children: /* @__PURE__ */ jsx87(
11374
11387
  SoonCard,
11375
11388
  {
11376
11389
  label,
@@ -11400,7 +11413,7 @@ function formatEta(iso2) {
11400
11413
  var FormatEta = formatEta;
11401
11414
 
11402
11415
  // src/components/platform/Gate.tsx
11403
- import { jsx as jsx87, jsxs as jsxs76 } from "react/jsx-runtime";
11416
+ import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
11404
11417
  function PermissionDenied({ permission, title, detail, compact: compact3 = false, className = "", ...rest }) {
11405
11418
  const need = Array.isArray(permission) ? permission : [permission].filter(Boolean);
11406
11419
  return /* @__PURE__ */ jsxs76(
@@ -11420,13 +11433,13 @@ function PermissionDenied({ permission, title, detail, compact: compact3 = false
11420
11433
  ...rest,
11421
11434
  children: [
11422
11435
  /* @__PURE__ */ jsxs76("span", { className: "fd-row", style: { gap: 8 }, children: [
11423
- /* @__PURE__ */ jsx87("i", { className: "ph ph-lock-simple", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11424
- /* @__PURE__ */ jsx87("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: title || "You do not have access to this" })
11436
+ /* @__PURE__ */ jsx88("i", { className: "ph ph-lock-simple", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11437
+ /* @__PURE__ */ jsx88("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: title || "You do not have access to this" })
11425
11438
  ] }),
11426
- /* @__PURE__ */ jsx87("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: detail || "Your roles do not grant this. An administrator can change that from Admin \u2192 Users." }),
11439
+ /* @__PURE__ */ jsx88("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: detail || "Your roles do not grant this. An administrator can change that from Admin \u2192 Users." }),
11427
11440
  need.length ? /* @__PURE__ */ jsxs76("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: [
11428
- /* @__PURE__ */ jsx87("span", { className: "fd-overline fd-muted", children: "Requires" }),
11429
- need.map((p) => /* @__PURE__ */ jsx87("code", { className: "fd-mono", style: {
11441
+ /* @__PURE__ */ jsx88("span", { className: "fd-overline fd-muted", children: "Requires" }),
11442
+ need.map((p) => /* @__PURE__ */ jsx88("code", { className: "fd-mono", style: {
11430
11443
  fontSize: 11.5,
11431
11444
  padding: "2px 7px",
11432
11445
  borderRadius: 5,
@@ -11456,10 +11469,10 @@ function GatePending({ compact: compact3 = false, className = "" }) {
11456
11469
  },
11457
11470
  children: [
11458
11471
  /* @__PURE__ */ jsxs76("span", { className: "fd-row", style: { gap: 8 }, children: [
11459
- /* @__PURE__ */ jsx87("i", { className: "ph ph-arrows-clockwise", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11460
- /* @__PURE__ */ jsx87("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: "Reconnecting\u2026" })
11472
+ /* @__PURE__ */ jsx88("i", { className: "ph ph-arrows-clockwise", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11473
+ /* @__PURE__ */ jsx88("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: "Reconnecting\u2026" })
11461
11474
  ] }),
11462
- /* @__PURE__ */ jsx87("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: "Your access can't be verified right now. This will resolve on its own once the connection is back." })
11475
+ /* @__PURE__ */ jsx88("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: "Your access can't be verified right now. This will resolve on its own once the connection is back." })
11463
11476
  ]
11464
11477
  }
11465
11478
  );
@@ -11469,7 +11482,7 @@ function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, co
11469
11482
  if (pending) {
11470
11483
  if (pendingFallback !== void 0) return pendingFallback;
11471
11484
  if (silent) return null;
11472
- return /* @__PURE__ */ jsx87(GatePending, { compact: compact3 });
11485
+ return /* @__PURE__ */ jsx88(GatePending, { compact: compact3 });
11473
11486
  }
11474
11487
  let ok = true;
11475
11488
  if (perm) ok = ok && can2(perm);
@@ -11478,7 +11491,7 @@ function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, co
11478
11491
  if (ok) return children;
11479
11492
  if (fallback !== void 0) return fallback;
11480
11493
  if (silent) return null;
11481
- return /* @__PURE__ */ jsx87(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
11494
+ return /* @__PURE__ */ jsx88(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
11482
11495
  }
11483
11496
  function FeatureGate({
11484
11497
  flag,
@@ -11501,7 +11514,7 @@ function FeatureGate({
11501
11514
  const f = SessionKit.findFlag(flag) || {};
11502
11515
  const missing = rt.missing || [];
11503
11516
  const canBypass = pending ? false : bypassPerm === null ? false : !bypassPerm || can2(bypassPerm);
11504
- return /* @__PURE__ */ jsx87(
11517
+ return /* @__PURE__ */ jsx88(
11505
11518
  ComingSoon,
11506
11519
  {
11507
11520
  label: label || (variant === "inline" ? f.label || "Not wired yet" : "Designed \u2014 backend not wired yet"),
@@ -11522,22 +11535,22 @@ function FeatureGate({
11522
11535
  function PermissionHint({ perm, children }) {
11523
11536
  const { can: can2, pending } = useSessionContext();
11524
11537
  if (pending) {
11525
- return /* @__PURE__ */ jsx87("span", { title: "Access can't be verified right now", style: { display: "inline-flex", opacity: 0.45, cursor: "not-allowed" }, "aria-disabled": "true", children: /* @__PURE__ */ jsx87("span", { style: { pointerEvents: "none" }, children }) });
11538
+ return /* @__PURE__ */ jsx88("span", { title: "Access can't be verified right now", style: { display: "inline-flex", opacity: 0.45, cursor: "not-allowed" }, "aria-disabled": "true", children: /* @__PURE__ */ jsx88("span", { style: { pointerEvents: "none" }, children }) });
11526
11539
  }
11527
11540
  if (can2(perm)) return children;
11528
- return /* @__PURE__ */ jsx87(
11541
+ return /* @__PURE__ */ jsx88(
11529
11542
  "span",
11530
11543
  {
11531
11544
  title: "Requires " + (Array.isArray(perm) ? perm.join(", ") : perm),
11532
11545
  style: { display: "inline-flex", opacity: 0.45, cursor: "not-allowed" },
11533
11546
  "aria-disabled": "true",
11534
- children: /* @__PURE__ */ jsx87("span", { style: { pointerEvents: "none" }, children })
11547
+ children: /* @__PURE__ */ jsx88("span", { style: { pointerEvents: "none" }, children })
11535
11548
  }
11536
11549
  );
11537
11550
  }
11538
11551
 
11539
11552
  // src/components/platform/ModeSwitch.tsx
11540
- import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs77 } from "react/jsx-runtime";
11553
+ import { Fragment as Fragment25, jsx as jsx89, jsxs as jsxs77 } from "react/jsx-runtime";
11541
11554
  function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
11542
11555
  const mode2 = useRuntimeMode();
11543
11556
  const panel = useInlinePanel();
@@ -11560,15 +11573,15 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11560
11573
  title: test ? "Test mode \u2014 every response is simulated. Click to inspect requests or return to live mode." : "Live mode \u2014 incomplete features are shown under construction. Click for test mode.",
11561
11574
  className: "fd-mode-btn" + (test ? " is-test" : "") + (open2 ? " is-open" : ""),
11562
11575
  children: [
11563
- /* @__PURE__ */ jsx88("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), style: { fontSize: 17 } }),
11564
- test && requestCount ? /* @__PURE__ */ jsx88("span", { className: "fd-mono fd-mode-count", children: requestCount > 99 ? "99+" : requestCount }, requestCount) : null
11576
+ /* @__PURE__ */ jsx89("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), style: { fontSize: 17 } }),
11577
+ test && requestCount ? /* @__PURE__ */ jsx89("span", { className: "fd-mono fd-mode-count", children: requestCount > 99 ? "99+" : requestCount }, requestCount) : null
11565
11578
  ]
11566
11579
  }
11567
11580
  ),
11568
11581
  /* @__PURE__ */ jsxs77(InlinePanelSurface, { panel, align: "right", offset: 8, width: 400, className: "fd-mode-pop", label: test ? "Test mode" : "Live mode", children: [
11569
11582
  /* @__PURE__ */ jsxs77("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
11570
11583
  /* @__PURE__ */ jsxs77("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
11571
- /* @__PURE__ */ jsx88("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
11584
+ /* @__PURE__ */ jsx89("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
11572
11585
  test ? "Test mode" : "Live mode"
11573
11586
  ] }),
11574
11587
  test ? /* @__PURE__ */ jsxs77("span", { className: "fd-body-sm fd-muted fd-mono", children: [
@@ -11576,11 +11589,11 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11576
11589
  " simulated request",
11577
11590
  requestCount === 1 ? "" : "s"
11578
11591
  ] }) : null,
11579
- /* @__PURE__ */ jsx88("span", { style: { flex: 1 } }),
11580
- test && onClearLog ? /* @__PURE__ */ jsx88("button", { type: "button", className: "fd-soon-link", onClick: onClearLog, children: "Clear" }) : null
11592
+ /* @__PURE__ */ jsx89("span", { style: { flex: 1 } }),
11593
+ test && onClearLog ? /* @__PURE__ */ jsx89("button", { type: "button", className: "fd-soon-link", onClick: onClearLog, children: "Clear" }) : null
11581
11594
  ] }),
11582
11595
  /* @__PURE__ */ jsxs77("span", { style: { display: "block", padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
11583
- /* @__PURE__ */ jsx88("span", { className: "fd-body-sm fd-secondary", style: { display: "block", textWrap: "pretty" }, children: test ? "Every feature is usable and nothing is obstructed, but no response comes from a real service \u2014 nothing you do here persists. Use this to review and demo the design." : "This is what a user would see today. " + s.incomplete + " of " + s.total + " features depend on backend work that is not wired yet, so they render under construction." }),
11596
+ /* @__PURE__ */ jsx89("span", { className: "fd-body-sm fd-secondary", style: { display: "block", textWrap: "pretty" }, children: test ? "Every feature is usable and nothing is obstructed, but no response comes from a real service \u2014 nothing you do here persists. Use this to review and demo the design." : "This is what a user would see today. " + s.incomplete + " of " + s.total + " features depend on backend work that is not wired yet, so they render under construction." }),
11584
11597
  /* @__PURE__ */ jsxs77("span", { className: "fd-row", style: { gap: 8, marginTop: 10, flexWrap: "wrap" }, children: [
11585
11598
  /* @__PURE__ */ jsxs77("span", { className: "fd-body-sm fd-muted fd-mono", children: [
11586
11599
  s.endpointsWired,
@@ -11592,37 +11605,37 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11592
11605
  s.total,
11593
11606
  " features complete"
11594
11607
  ] }),
11595
- onOpenSpec ? /* @__PURE__ */ jsxs77(Fragment24, { children: [
11596
- /* @__PURE__ */ jsx88("span", { style: { flex: 1 } }),
11608
+ onOpenSpec ? /* @__PURE__ */ jsxs77(Fragment25, { children: [
11609
+ /* @__PURE__ */ jsx89("span", { style: { flex: 1 } }),
11597
11610
  /* @__PURE__ */ jsxs77("button", { type: "button", className: "fd-soon-link", onClick: () => {
11598
11611
  setOpen(false);
11599
11612
  onOpenSpec();
11600
11613
  }, children: [
11601
11614
  "API spec ",
11602
- /* @__PURE__ */ jsx88("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11615
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11603
11616
  ] })
11604
11617
  ] }) : null
11605
11618
  ] })
11606
11619
  ] }),
11607
11620
  /* @__PURE__ */ jsxs77("span", { className: "fd-mode-choice", children: [
11608
11621
  /* @__PURE__ */ jsxs77("button", { type: "button", className: "fd-mode-opt" + (!test ? " is-on" : ""), onClick: () => go("live"), children: [
11609
- /* @__PURE__ */ jsx88("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11622
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11610
11623
  /* @__PURE__ */ jsxs77("span", { className: "fd-mode-opt-text", children: [
11611
- /* @__PURE__ */ jsx88("span", { className: "fd-mode-opt-title", children: "Live mode" }),
11612
- /* @__PURE__ */ jsx88("span", { className: "fd-mode-opt-desc", children: "Incomplete features under construction" })
11624
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-title", children: "Live mode" }),
11625
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-desc", children: "Incomplete features under construction" })
11613
11626
  ] }),
11614
- !test ? /* @__PURE__ */ jsx88("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11627
+ !test ? /* @__PURE__ */ jsx89("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11615
11628
  ] }),
11616
11629
  /* @__PURE__ */ jsxs77("button", { type: "button", className: "fd-mode-opt" + (test ? " is-on" : ""), onClick: () => go("test"), children: [
11617
- /* @__PURE__ */ jsx88("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11630
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11618
11631
  /* @__PURE__ */ jsxs77("span", { className: "fd-mode-opt-text", children: [
11619
- /* @__PURE__ */ jsx88("span", { className: "fd-mode-opt-title", children: "Test mode" }),
11620
- /* @__PURE__ */ jsx88("span", { className: "fd-mode-opt-desc", children: "Everything usable, all data simulated" })
11632
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-title", children: "Test mode" }),
11633
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-desc", children: "Everything usable, all data simulated" })
11621
11634
  ] }),
11622
- test ? /* @__PURE__ */ jsx88("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11635
+ test ? /* @__PURE__ */ jsx89("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11623
11636
  ] })
11624
11637
  ] }),
11625
- test && renderLog ? /* @__PURE__ */ jsx88("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
11638
+ test && renderLog ? /* @__PURE__ */ jsx89("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
11626
11639
  ] })
11627
11640
  ] });
11628
11641
  }
@@ -11631,19 +11644,19 @@ function TestModeBar({ onExit }) {
11631
11644
  if (mode2 !== "test") return null;
11632
11645
  return /* @__PURE__ */ jsxs77("div", { className: "fd-testbar", role: "status", children: [
11633
11646
  /* @__PURE__ */ jsxs77("span", { className: "fd-badge fd-badge-warning", children: [
11634
- /* @__PURE__ */ jsx88("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11647
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11635
11648
  "Test mode"
11636
11649
  ] }),
11637
- /* @__PURE__ */ jsx88("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
11650
+ /* @__PURE__ */ jsx89("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
11638
11651
  /* @__PURE__ */ jsxs77("button", { type: "button", className: "fd-soon-link", onClick: () => onExit ? onExit() : RuntimeKit.setMode("live"), children: [
11639
- /* @__PURE__ */ jsx88("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11652
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11640
11653
  " Back to live mode"
11641
11654
  ] })
11642
11655
  ] });
11643
11656
  }
11644
11657
 
11645
11658
  // src/components/planner/ChannelMeta.tsx
11646
- import { jsx as jsx89, jsxs as jsxs78 } from "react/jsx-runtime";
11659
+ import { jsx as jsx90, jsxs as jsxs78 } from "react/jsx-runtime";
11647
11660
  var CHANNEL_WEIGHTS = {
11648
11661
  "OOH": 50,
11649
11662
  "DOOH": 50,
@@ -11696,7 +11709,7 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
11696
11709
  const m = ChannelMeta(channel);
11697
11710
  const wt = channelWeightOf(channel || "");
11698
11711
  if (dot) {
11699
- return /* @__PURE__ */ jsx89("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
11712
+ return /* @__PURE__ */ jsx90("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
11700
11713
  }
11701
11714
  return /* @__PURE__ */ jsxs78(
11702
11715
  "span",
@@ -11706,16 +11719,16 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
11706
11719
  style: { "--chan": m.color },
11707
11720
  ...rest,
11708
11721
  children: [
11709
- /* @__PURE__ */ jsx89("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }),
11710
- showLabel ? /* @__PURE__ */ jsx89("span", { className: "fd-chan-label", children: m.label }) : null,
11711
- weight ? /* @__PURE__ */ jsx89("span", { className: "fd-chan-weight", children: wt || 0 }) : null
11722
+ /* @__PURE__ */ jsx90("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }),
11723
+ showLabel ? /* @__PURE__ */ jsx90("span", { className: "fd-chan-label", children: m.label }) : null,
11724
+ weight ? /* @__PURE__ */ jsx90("span", { className: "fd-chan-weight", children: wt || 0 }) : null
11712
11725
  ]
11713
11726
  }
11714
11727
  );
11715
11728
  }
11716
11729
 
11717
11730
  // src/components/planner/SaturationDistribution.tsx
11718
- import { jsx as jsx90, jsxs as jsxs79 } from "react/jsx-runtime";
11731
+ import { jsx as jsx91, jsxs as jsxs79 } from "react/jsx-runtime";
11719
11732
  var BANDS2 = [
11720
11733
  { key: "weak", label: "Weak", n: 1, range: "< 50" },
11721
11734
  { key: "adequate", label: "Adequate", n: 2, range: "50\u2013100" },
@@ -11727,7 +11740,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11727
11740
  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));
11728
11741
  const floor = BANDS2.find((b) => b.key === floorBand) || BANDS2[0];
11729
11742
  return /* @__PURE__ */ jsxs79("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
11730
- /* @__PURE__ */ jsx90("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,minmax(0,1fr))", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
11743
+ /* @__PURE__ */ jsx91("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,minmax(0,1fr))", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
11731
11744
  const mark = "var(--csi-" + g.n + "-mark)";
11732
11745
  const active = selectedBand === g.key;
11733
11746
  return /* @__PURE__ */ jsxs79(
@@ -11737,13 +11750,13 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11737
11750
  onClick: onSelectBand ? () => onSelectBand(active ? null : g.key) : void 0,
11738
11751
  style: { display: "flex", flexDirection: "column", justifyContent: "flex-end", gap: 10, padding: 12, border: "1px solid " + (active ? "var(--border-strong)" : "var(--border)"), borderRadius: "var(--r-lg)", background: active ? "var(--surface-2)" : "var(--surface)", cursor: onSelectBand ? "pointer" : "default", textAlign: "left", minHeight: 190, minWidth: 0, transition: "background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)" },
11739
11752
  children: [
11740
- /* @__PURE__ */ jsx90("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24, minWidth: 0 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx90("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => (
11753
+ /* @__PURE__ */ jsx91("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24, minWidth: 0 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx91("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => (
11741
11754
  // `overflow: hidden` + `white-space: nowrap` only clips once the span
11742
11755
  // actually HAS a bounded width to clip against (see the grid/flex
11743
11756
  // `minWidth: 0` chain above) — `textOverflow: ellipsis` then makes
11744
11757
  // that clip readable instead of a hard cut mid-letter; the full name
11745
11758
  // is still one hover away via `title`.
11746
- /* @__PURE__ */ jsx90(
11759
+ /* @__PURE__ */ jsx91(
11747
11760
  "span",
11748
11761
  {
11749
11762
  title: c.name + " \xB7 " + c.crp,
@@ -11754,11 +11767,11 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11754
11767
  )
11755
11768
  )) }),
11756
11769
  /* @__PURE__ */ jsxs79("span", { className: "fd-row", style: { gap: 8, alignItems: "baseline" }, children: [
11757
- /* @__PURE__ */ jsx90("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),
11758
- /* @__PURE__ */ jsx90("span", { className: "fd-meter", style: { gap: 2, color: mark }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx90("span", { className: "fd-meter-seg" + (i <= g.n ? " is-on" : ""), style: { width: 4, height: 9 } }, i)) })
11770
+ /* @__PURE__ */ jsx91("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),
11771
+ /* @__PURE__ */ jsx91("span", { className: "fd-meter", style: { gap: 2, color: mark }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx91("span", { className: "fd-meter-seg" + (i <= g.n ? " is-on" : ""), style: { width: 4, height: 9 } }, i)) })
11759
11772
  ] }),
11760
11773
  /* @__PURE__ */ jsxs79("span", { className: "fd-stack", style: { gap: 1 }, children: [
11761
- /* @__PURE__ */ jsx90("span", { className: "fd-label-lg", children: g.label }),
11774
+ /* @__PURE__ */ jsx91("span", { className: "fd-label-lg", children: g.label }),
11762
11775
  /* @__PURE__ */ jsxs79("span", { className: "fd-body-sm fd-muted", style: { fontSize: 11.5 }, children: [
11763
11776
  "CRP ",
11764
11777
  g.range
@@ -11770,7 +11783,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11770
11783
  );
11771
11784
  }) }),
11772
11785
  floorBand ? /* @__PURE__ */ jsxs79("div", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderRadius: "var(--r-md)", background: "var(--surface-2)", border: "1px solid var(--border)", flexWrap: "wrap" }, children: [
11773
- /* @__PURE__ */ jsx90("span", { className: "fd-meter", style: { gap: 2, color: "var(--csi-" + floor.n + "-mark)" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx90("span", { className: "fd-meter-seg" + (i <= floor.n ? " is-on" : ""), style: { width: 5, height: 12 } }, i)) }),
11786
+ /* @__PURE__ */ jsx91("span", { className: "fd-meter", style: { gap: 2, color: "var(--csi-" + floor.n + "-mark)" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx91("span", { className: "fd-meter-seg" + (i <= floor.n ? " is-on" : ""), style: { width: 5, height: 12 } }, i)) }),
11774
11787
  /* @__PURE__ */ jsxs79("span", { className: "fd-body-sm fd-secondary", style: { flex: 1, minWidth: 240 }, children: [
11775
11788
  /* @__PURE__ */ jsxs79("strong", { style: { color: "var(--text)" }, children: [
11776
11789
  "Plan floor ",
@@ -11784,7 +11797,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11784
11797
 
11785
11798
  // src/components/planner/MixGap.tsx
11786
11799
  import * as React66 from "react";
11787
- import { Fragment as Fragment25, jsx as jsx91, jsxs as jsxs80 } from "react/jsx-runtime";
11800
+ import { Fragment as Fragment26, jsx as jsx92, jsxs as jsxs80 } from "react/jsx-runtime";
11788
11801
  var MIX_GAP_LAYOUT = {
11789
11802
  trackHeight: 30,
11790
11803
  barHeight: 20,
@@ -11806,11 +11819,11 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11806
11819
  return /* @__PURE__ */ jsxs80("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 4 }, children: [
11807
11820
  /* @__PURE__ */ jsxs80("div", { className: "fd-row", style: { gap: 16, justifyContent: "flex-end", paddingBottom: 6, flexWrap: "wrap" }, children: [
11808
11821
  [["On target", TONE.ok], ["Close", TONE.warn], ["Short", TONE.danger]].map(([l, c]) => /* @__PURE__ */ jsxs80("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
11809
- /* @__PURE__ */ jsx91("span", { style: { width: 14, height: 9, borderRadius: 2, background: c } }),
11822
+ /* @__PURE__ */ jsx92("span", { style: { width: 14, height: 9, borderRadius: 2, background: c } }),
11810
11823
  l
11811
11824
  ] }, l)),
11812
11825
  /* @__PURE__ */ jsxs80("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
11813
- /* @__PURE__ */ jsx91("span", { "data-mixgap-legend-target": "", style: { width: targetWidth, height: 16, borderRadius: 1, background: MIX_GAP_TARGET_STRIPE } }),
11826
+ /* @__PURE__ */ jsx92("span", { "data-mixgap-legend-target": "", style: { width: targetWidth, height: 16, borderRadius: 1, background: MIX_GAP_TARGET_STRIPE } }),
11814
11827
  "Target"
11815
11828
  ] })
11816
11829
  ] }),
@@ -11827,15 +11840,15 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11827
11840
  onMouseEnter: () => setHover(r.channel),
11828
11841
  onMouseLeave: () => setHover(null),
11829
11842
  children: [
11830
- /* @__PURE__ */ jsx91("span", { style: { width: 128, flex: "none" }, children: /* @__PURE__ */ jsx91(ChannelTag, { channel: r.channel, size: "sm" }) }),
11831
- /* @__PURE__ */ jsx91("span", { style: { position: "relative", flex: 1, height: trackHeight, minWidth: 120 }, children: loading ? /* @__PURE__ */ jsx91("span", { className: "fd-skel", style: { position: "absolute", left: 0, right: 0, top: barTop, height: barHeight, borderRadius: 3 } }) : /* @__PURE__ */ jsxs80(Fragment25, { children: [
11832
- /* @__PURE__ */ jsx91("span", { "data-mixgap-bar": "", style: { position: "absolute", left: 0, top: barTop, height: barHeight, width: mixGapOffset(r.realized, max), background: TONE[tone], borderRadius: "2px 3px 3px 2px", transition: "width var(--dur-slow) var(--ease), background var(--dur-base) var(--ease)" } }),
11833
- /* @__PURE__ */ jsx91("span", { "data-mixgap-target": "", style: { position: "absolute", left: `calc(${mixGapOffset(r.target, max)} - ${targetWidth / 2}px)`, top: 0, width: targetWidth, height: trackHeight, background: MIX_GAP_TARGET_STRIPE, borderRadius: 1 } }),
11843
+ /* @__PURE__ */ jsx92("span", { style: { width: 128, flex: "none" }, children: /* @__PURE__ */ jsx92(ChannelTag, { channel: r.channel, size: "sm" }) }),
11844
+ /* @__PURE__ */ jsx92("span", { style: { position: "relative", flex: 1, height: trackHeight, minWidth: 120 }, children: loading ? /* @__PURE__ */ jsx92("span", { className: "fd-skel", style: { position: "absolute", left: 0, right: 0, top: barTop, height: barHeight, borderRadius: 3 } }) : /* @__PURE__ */ jsxs80(Fragment26, { children: [
11845
+ /* @__PURE__ */ jsx92("span", { "data-mixgap-bar": "", style: { position: "absolute", left: 0, top: barTop, height: barHeight, width: mixGapOffset(r.realized, max), background: TONE[tone], borderRadius: "2px 3px 3px 2px", transition: "width var(--dur-slow) var(--ease), background var(--dur-base) var(--ease)" } }),
11846
+ /* @__PURE__ */ jsx92("span", { "data-mixgap-target": "", style: { position: "absolute", left: `calc(${mixGapOffset(r.target, max)} - ${targetWidth / 2}px)`, top: 0, width: targetWidth, height: trackHeight, background: MIX_GAP_TARGET_STRIPE, borderRadius: 1 } }),
11834
11847
  /* @__PURE__ */ jsxs80("span", { "data-mixgap-label": "", className: "fd-num", style: { position: "absolute", left: labelLeft, top: "50%", transform: "translateY(-50%)", fontSize: 12, color: "var(--text-muted)", whiteSpace: "nowrap" }, children: [
11835
11848
  r.realized,
11836
11849
  "%"
11837
11850
  ] }),
11838
- hover === r.channel ? /* @__PURE__ */ jsx91("span", { className: "fd-tooltip", role: "tooltip", style: { position: "absolute", left: 0, right: "auto", bottom: trackHeight + 4, maxWidth: "min(340px, 100%)", whiteSpace: "normal", textAlign: "left", width: "max-content" }, children: tip }) : null
11851
+ hover === r.channel ? /* @__PURE__ */ jsx92("span", { className: "fd-tooltip", role: "tooltip", style: { position: "absolute", left: 0, right: "auto", bottom: trackHeight + 4, maxWidth: "min(340px, 100%)", whiteSpace: "normal", textAlign: "left", width: "max-content" }, children: tip }) : null
11839
11852
  ] }) })
11840
11853
  ]
11841
11854
  },
@@ -11846,7 +11859,7 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11846
11859
  }
11847
11860
 
11848
11861
  // src/components/planner/ChannelContribution.tsx
11849
- import { jsx as jsx92, jsxs as jsxs81 } from "react/jsx-runtime";
11862
+ import { jsx as jsx93, jsxs as jsxs81 } from "react/jsx-runtime";
11850
11863
  var money = (n) => "$" + Math.round(n).toLocaleString();
11851
11864
  function ChannelContribution({
11852
11865
  channels = [],
@@ -11863,8 +11876,8 @@ function ChannelContribution({
11863
11876
  const pct = (v) => grand ? v / grand * 100 : 0;
11864
11877
  const spendTotal = channels.reduce((s, c) => s + Number(String(c.spend || 0).replace(/[^0-9.]/g, "")), 0);
11865
11878
  return /* @__PURE__ */ jsxs81("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
11866
- loading ? /* @__PURE__ */ jsx92("span", { className: "fd-skel", style: { height: 34, borderRadius: "var(--r-sm)" } }) : /* @__PURE__ */ jsxs81("div", { className: "fd-row", style: { height: 34, borderRadius: "var(--r-sm)", overflow: "hidden", gap: 2, background: "var(--surface-3)" }, children: [
11867
- channels.map((c) => /* @__PURE__ */ jsx92(
11879
+ loading ? /* @__PURE__ */ jsx93("span", { className: "fd-skel", style: { height: 34, borderRadius: "var(--r-sm)" } }) : /* @__PURE__ */ jsxs81("div", { className: "fd-row", style: { height: 34, borderRadius: "var(--r-sm)", overflow: "hidden", gap: 2, background: "var(--surface-3)" }, children: [
11880
+ channels.map((c) => /* @__PURE__ */ jsx93(
11868
11881
  "span",
11869
11882
  {
11870
11883
  title: c.name + " \xB7 " + c.crp.toFixed(1) + " CRP",
@@ -11873,7 +11886,7 @@ function ChannelContribution({
11873
11886
  },
11874
11887
  c.name
11875
11888
  )),
11876
- bonus > 0 ? /* @__PURE__ */ jsx92(
11889
+ bonus > 0 ? /* @__PURE__ */ jsx93(
11877
11890
  "span",
11878
11891
  {
11879
11892
  title: "Surround-sound bonus +" + bonusPct + "%",
@@ -11883,17 +11896,17 @@ function ChannelContribution({
11883
11896
  ) : null
11884
11897
  ] }),
11885
11898
  showTable ? /* @__PURE__ */ jsxs81("table", { className: "fd-table", style: { fontSize: "var(--body-sm-size)" }, children: [
11886
- /* @__PURE__ */ jsx92("thead", { children: /* @__PURE__ */ jsxs81("tr", { children: [
11887
- /* @__PURE__ */ jsx92("th", { style: { width: "34%" }, children: "Channel" }),
11888
- /* @__PURE__ */ jsx92("th", { style: { width: "16%" }, children: "Weight" }),
11889
- /* @__PURE__ */ jsx92("th", { className: "is-num", style: { width: "16%" }, children: "Spend" }),
11890
- /* @__PURE__ */ jsx92("th", { className: "is-num", style: { width: "17%" }, children: "CRP" }),
11891
- /* @__PURE__ */ jsx92("th", { className: "is-num", style: { width: "17%" }, children: "Share" })
11899
+ /* @__PURE__ */ jsx93("thead", { children: /* @__PURE__ */ jsxs81("tr", { children: [
11900
+ /* @__PURE__ */ jsx93("th", { style: { width: "34%" }, children: "Channel" }),
11901
+ /* @__PURE__ */ jsx93("th", { style: { width: "16%" }, children: "Weight" }),
11902
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "16%" }, children: "Spend" }),
11903
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "17%" }, children: "CRP" }),
11904
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "17%" }, children: "Share" })
11892
11905
  ] }) }),
11893
11906
  /* @__PURE__ */ jsxs81("tbody", { children: [
11894
11907
  channels.map((c) => /* @__PURE__ */ jsxs81("tr", { children: [
11895
- /* @__PURE__ */ jsx92("td", { children: /* @__PURE__ */ jsx92(ChannelTag, { channel: c.name, size: "sm" }) }),
11896
- /* @__PURE__ */ jsx92("td", { children: /* @__PURE__ */ jsx92(
11908
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsx93(ChannelTag, { channel: c.name, size: "sm" }) }),
11909
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsx93(
11897
11910
  "span",
11898
11911
  {
11899
11912
  className: "fd-badge fd-badge-neutral",
@@ -11902,38 +11915,38 @@ function ChannelContribution({
11902
11915
  children: "weight " + (channelWeightOf(c.name) || 0)
11903
11916
  }
11904
11917
  ) }),
11905
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: c.spend }),
11906
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: c.crp.toFixed(1) }),
11918
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: c.spend }),
11919
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: c.crp.toFixed(1) }),
11907
11920
  /* @__PURE__ */ jsxs81("td", { className: "is-num", children: [
11908
11921
  pct(c.crp).toFixed(0),
11909
11922
  "%"
11910
11923
  ] })
11911
11924
  ] }, c.name)),
11912
11925
  bonus > 0 ? /* @__PURE__ */ jsxs81("tr", { children: [
11913
- /* @__PURE__ */ jsx92("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-row", style: { gap: 9, fontWeight: 600 }, children: [
11914
- /* @__PURE__ */ jsx92("span", { style: { width: 9, height: 9, borderRadius: 2, background: "repeating-linear-gradient(135deg,var(--csi-3-mark) 0 3px,var(--csi-2-mark) 3px 6px)", flex: "none" } }),
11926
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-row", style: { gap: 9, fontWeight: 600 }, children: [
11927
+ /* @__PURE__ */ jsx93("span", { style: { width: 9, height: 9, borderRadius: 2, background: "repeating-linear-gradient(135deg,var(--csi-3-mark) 0 3px,var(--csi-2-mark) 3px 6px)", flex: "none" } }),
11915
11928
  "Surround-sound bonus"
11916
11929
  ] }) }),
11917
- /* @__PURE__ */ jsx92("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
11930
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
11918
11931
  "+",
11919
11932
  bonusPct,
11920
11933
  "% of +",
11921
11934
  bonusMax,
11922
11935
  "%"
11923
11936
  ] }) }),
11924
- /* @__PURE__ */ jsx92("td", { className: "is-num fd-muted", children: "\u2014" }),
11925
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: bonus.toFixed(1) }),
11937
+ /* @__PURE__ */ jsx93("td", { className: "is-num fd-muted", children: "\u2014" }),
11938
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: bonus.toFixed(1) }),
11926
11939
  /* @__PURE__ */ jsxs81("td", { className: "is-num", children: [
11927
11940
  pct(bonus).toFixed(0),
11928
11941
  "%"
11929
11942
  ] })
11930
11943
  ] }) : null,
11931
11944
  /* @__PURE__ */ jsxs81("tr", { style: { background: "var(--surface-2)" }, children: [
11932
- /* @__PURE__ */ jsx92("td", { style: { fontWeight: 700 }, children: "Campus total" }),
11933
- /* @__PURE__ */ jsx92("td", {}),
11934
- /* @__PURE__ */ jsx92("td", { className: "is-num", style: { fontWeight: 700 }, children: money(spendTotal) }),
11935
- /* @__PURE__ */ jsx92("td", { className: "is-num", style: { fontWeight: 700 }, children: grand.toFixed(1) }),
11936
- /* @__PURE__ */ jsx92("td", { className: "is-num", style: { fontWeight: 700 }, children: "100%" })
11945
+ /* @__PURE__ */ jsx93("td", { style: { fontWeight: 700 }, children: "Campus total" }),
11946
+ /* @__PURE__ */ jsx93("td", {}),
11947
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: money(spendTotal) }),
11948
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: grand.toFixed(1) }),
11949
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: "100%" })
11937
11950
  ] })
11938
11951
  ] })
11939
11952
  ] }) : null
@@ -11942,7 +11955,7 @@ function ChannelContribution({
11942
11955
 
11943
11956
  // src/components/planner/BudgetReallocator.tsx
11944
11957
  import * as React67 from "react";
11945
- import { Fragment as Fragment26, jsx as jsx93, jsxs as jsxs82 } from "react/jsx-runtime";
11958
+ import { Fragment as Fragment27, jsx as jsx94, jsxs as jsxs82 } from "react/jsx-runtime";
11946
11959
  var bandFor = (crp) => crp >= 200 ? "dominant" : crp >= 100 ? "strong" : crp >= 50 ? "adequate" : "weak";
11947
11960
  function BudgetReallocator({
11948
11961
  campus,
@@ -12004,16 +12017,16 @@ function BudgetReallocator({
12004
12017
  style: { gap: 14, padding: 18, border: "1px solid " + (dirty ? "var(--border-brand)" : "var(--border)"), borderRadius: "var(--r-lg)", background: dirty ? "var(--surface-brand)" : "var(--surface)", color: "var(--text)", transition: "background var(--dur-base) var(--ease),border-color var(--dur-base) var(--ease)" },
12005
12018
  children: [
12006
12019
  /* @__PURE__ */ jsxs82("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
12007
- /* @__PURE__ */ jsx93("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
12008
- /* @__PURE__ */ jsx93(CsiBadge, { band: nowBand, crp, size: "medium" }),
12009
- dirty ? /* @__PURE__ */ jsxs82(Fragment26, { children: [
12010
- /* @__PURE__ */ jsx93("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
12011
- /* @__PURE__ */ jsx93(CsiBadge, { band: nextBand, crp: nextCrp, size: "medium", preview: true })
12020
+ /* @__PURE__ */ jsx94("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
12021
+ /* @__PURE__ */ jsx94(CsiBadge, { band: nowBand, crp, size: "medium" }),
12022
+ dirty ? /* @__PURE__ */ jsxs82(Fragment27, { children: [
12023
+ /* @__PURE__ */ jsx94("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
12024
+ /* @__PURE__ */ jsx94(CsiBadge, { band: nextBand, crp: nextCrp, size: "medium", preview: true })
12012
12025
  ] }) : null
12013
12026
  ] }),
12014
12027
  /* @__PURE__ */ jsxs82("div", { className: "fd-slider", ref: trackRef, children: [
12015
- /* @__PURE__ */ jsx93("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
12016
- dirty ? /* @__PURE__ */ jsx93(
12028
+ /* @__PURE__ */ jsx94("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
12029
+ dirty ? /* @__PURE__ */ jsx94(
12017
12030
  "span",
12018
12031
  {
12019
12032
  ref: chipRef,
@@ -12025,7 +12038,7 @@ function BudgetReallocator({
12025
12038
  children: (delta < 0 ? "\u2212$" : "+$") + Math.abs(delta).toLocaleString()
12026
12039
  }
12027
12040
  ) : null,
12028
- /* @__PURE__ */ jsx93(
12041
+ /* @__PURE__ */ jsx94(
12029
12042
  "input",
12030
12043
  {
12031
12044
  type: "range",
@@ -12043,11 +12056,11 @@ function BudgetReallocator({
12043
12056
  ] }),
12044
12057
  /* @__PURE__ */ jsxs82("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
12045
12058
  /* @__PURE__ */ jsxs82("span", { className: "fd-stack", style: { gap: 2, flex: 1, minWidth: 150 }, children: [
12046
- /* @__PURE__ */ jsx93("span", { className: "fd-num", style: { fontSize: 19, fontWeight: 700 }, children: "$" + draft.toLocaleString() }),
12047
- /* @__PURE__ */ jsx93("span", { className: "fd-body-sm fd-muted", children: "Arrow keys step $100, shift+arrow $1,000. Escape reverts." })
12059
+ /* @__PURE__ */ jsx94("span", { className: "fd-num", style: { fontSize: 19, fontWeight: 700 }, children: "$" + draft.toLocaleString() }),
12060
+ /* @__PURE__ */ jsx94("span", { className: "fd-body-sm fd-muted", children: "Arrow keys step $100, shift+arrow $1,000. Escape reverts." })
12048
12061
  ] }),
12049
- /* @__PURE__ */ jsx93("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
12050
- /* @__PURE__ */ jsx93(
12062
+ /* @__PURE__ */ jsx94("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
12063
+ /* @__PURE__ */ jsx94(
12051
12064
  "button",
12052
12065
  {
12053
12066
  type: "button",
@@ -12066,7 +12079,7 @@ function BudgetReallocator({
12066
12079
  }
12067
12080
 
12068
12081
  // src/components/planner/SurroundSound.tsx
12069
- import { jsx as jsx94, jsxs as jsxs83 } from "react/jsx-runtime";
12082
+ import { jsx as jsx95, jsxs as jsxs83 } from "react/jsx-runtime";
12070
12083
  var CATEGORIES = [
12071
12084
  { key: "ooh", label: "OOH", icon: "flag-banner", color: "var(--ch-ooh)" },
12072
12085
  { key: "transit", label: "Transit", icon: "bus", color: "var(--ch-transit)" },
@@ -12079,7 +12092,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12079
12092
  const earned = Math.max(0, Math.min(1, bonusPct / bonusMax));
12080
12093
  const single = present.length <= 2;
12081
12094
  return /* @__PURE__ */ jsxs83("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, children: [
12082
- /* @__PURE__ */ jsx94("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: CATEGORIES.map((c) => {
12095
+ /* @__PURE__ */ jsx95("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: CATEGORIES.map((c) => {
12083
12096
  const on = present.includes(c.key);
12084
12097
  return /* @__PURE__ */ jsxs83(
12085
12098
  "span",
@@ -12087,8 +12100,8 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12087
12100
  title: c.label + (on ? " \u2014 present" : " \u2014 not bought"),
12088
12101
  style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 5, width: 62, padding: "10px 0", borderRadius: "var(--r-md)", border: "1px solid " + (on ? "var(--csi-2-edge)" : "var(--border)"), background: on ? "var(--csi-2-fill)" : "var(--surface-2)", color: on ? "var(--csi-2-text)" : "var(--text-disabled)" },
12089
12102
  children: [
12090
- /* @__PURE__ */ jsx94("i", { className: "ph ph-" + c.icon, style: { fontSize: 19, color: on ? c.color : "var(--text-muted)" }, "aria-hidden": "true" }),
12091
- /* @__PURE__ */ jsx94("span", { style: { fontSize: 10.5, fontWeight: 700 }, children: c.label })
12103
+ /* @__PURE__ */ jsx95("i", { className: "ph ph-" + c.icon, style: { fontSize: 19, color: on ? c.color : "var(--text-muted)" }, "aria-hidden": "true" }),
12104
+ /* @__PURE__ */ jsx95("span", { style: { fontSize: 10.5, fontWeight: 700 }, children: c.label })
12092
12105
  ]
12093
12106
  },
12094
12107
  c.key
@@ -12096,7 +12109,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12096
12109
  }) }),
12097
12110
  /* @__PURE__ */ jsxs83("div", { className: "fd-stack", style: { gap: 8 }, children: [
12098
12111
  /* @__PURE__ */ jsxs83("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
12099
- /* @__PURE__ */ jsx94("span", { className: "fd-label-lg", children: "Surround-sound bonus earned" }),
12112
+ /* @__PURE__ */ jsx95("span", { className: "fd-label-lg", children: "Surround-sound bonus earned" }),
12100
12113
  /* @__PURE__ */ jsxs83("span", { className: "fd-num", style: { color: single ? "var(--warn-text)" : "var(--csi-3-mark)", fontWeight: 700 }, children: [
12101
12114
  "+",
12102
12115
  bonusPct,
@@ -12105,7 +12118,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12105
12118
  "%"
12106
12119
  ] })
12107
12120
  ] }),
12108
- /* @__PURE__ */ jsx94("div", { style: { height: 8, borderRadius: "var(--r-xs)", background: "var(--surface-3)", overflow: "hidden" }, children: /* @__PURE__ */ jsx94("div", { style: { height: "100%", width: earned * 100 + "%", background: "var(--csi-3-mark)", borderRadius: "inherit", transition: "width var(--dur-slow) var(--ease)" } }) }),
12121
+ /* @__PURE__ */ jsx95("div", { style: { height: 8, borderRadius: "var(--r-xs)", background: "var(--surface-3)", overflow: "hidden" }, children: /* @__PURE__ */ jsx95("div", { style: { height: "100%", width: earned * 100 + "%", background: "var(--csi-3-mark)", borderRadius: "inherit", transition: "width var(--dur-slow) var(--ease)" } }) }),
12109
12122
  /* @__PURE__ */ jsxs83("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: [
12110
12123
  present.length,
12111
12124
  " of 6 channel categories present.",
@@ -12118,7 +12131,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12118
12131
  }
12119
12132
 
12120
12133
  // src/components/planner/Importance.tsx
12121
- import { jsx as jsx95, jsxs as jsxs84 } from "react/jsx-runtime";
12134
+ import { jsx as jsx96, jsxs as jsxs84 } from "react/jsx-runtime";
12122
12135
  var IMPORTANCE_LEVELS = [
12123
12136
  { id: "nudge", rank: 1, label: "Nudge", icon: "feather", description: "Breaks a tie, nothing more." },
12124
12137
  { id: "lean", rank: 2, label: "Lean", icon: "arrow-bend-up-right", description: "A mild preference between otherwise equal options." },
@@ -12156,8 +12169,8 @@ function ImportanceTag({ level, showLabel = true, size = "sm", className = "", d
12156
12169
  title: lvl.label + " \u2014 " + lvl.description,
12157
12170
  "aria-disabled": disabled ? "true" : void 0,
12158
12171
  children: [
12159
- /* @__PURE__ */ jsx95("i", { className: "ph ph-" + lvl.icon, "aria-hidden": "true" }),
12160
- showLabel ? lvl.label : /* @__PURE__ */ jsx95("span", { className: "fd-sr", children: lvl.label })
12172
+ /* @__PURE__ */ jsx96("i", { className: "ph ph-" + lvl.icon, "aria-hidden": "true" }),
12173
+ showLabel ? lvl.label : /* @__PURE__ */ jsx96("span", { className: "fd-sr", children: lvl.label })
12161
12174
  ]
12162
12175
  }
12163
12176
  );
@@ -12165,7 +12178,7 @@ function ImportanceTag({ level, showLabel = true, size = "sm", className = "", d
12165
12178
 
12166
12179
  // src/components/planner/PreferenceMeter.tsx
12167
12180
  import * as React68 from "react";
12168
- import { jsx as jsx96, jsxs as jsxs85 } from "react/jsx-runtime";
12181
+ import { jsx as jsx97, jsxs as jsxs85 } from "react/jsx-runtime";
12169
12182
  function preferenceScore(criteria) {
12170
12183
  const earned = criteria.reduce((n, c) => n + (Number(c.earned) || 0), 0);
12171
12184
  const weight = criteria.reduce((n, c) => n + (Number(c.weight) || 0), 0);
@@ -12195,7 +12208,7 @@ function PreferenceMeter({
12195
12208
  }) {
12196
12209
  const value = score == null ? preferenceScore(criteria) : score;
12197
12210
  const segments = React68.useMemo(() => preferenceSegments(criteria), [criteria]);
12198
- return /* @__PURE__ */ jsx96(
12211
+ return /* @__PURE__ */ jsx97(
12199
12212
  ScoreMeter,
12200
12213
  {
12201
12214
  score: value,
@@ -12209,20 +12222,20 @@ function PreferenceMeter({
12209
12222
  breakdownLabel: breakdownTitle,
12210
12223
  breakdown: /* @__PURE__ */ jsxs85("div", { className: "fd-prefbreak", children: [
12211
12224
  /* @__PURE__ */ jsxs85("div", { className: "fd-prefbreak-head", children: [
12212
- /* @__PURE__ */ jsx96("span", { className: "fd-label-lg", children: breakdownTitle }),
12213
- /* @__PURE__ */ jsx96("span", { className: "fd-prefbreak-score fd-tabular", children: Math.round(value) })
12225
+ /* @__PURE__ */ jsx97("span", { className: "fd-label-lg", children: breakdownTitle }),
12226
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-score fd-tabular", children: Math.round(value) })
12214
12227
  ] }),
12215
- /* @__PURE__ */ jsx96("ul", { className: "fd-prefbreak-list", children: criteria.map((c) => {
12228
+ /* @__PURE__ */ jsx97("ul", { className: "fd-prefbreak-list", children: criteria.map((c) => {
12216
12229
  const pct = c.weight > 0 ? Math.round((Number(c.earned) || 0) / c.weight * 100) : 0;
12217
12230
  return /* @__PURE__ */ jsxs85("li", { className: pct === 0 ? "fd-prefbreak-item is-unmet" : "fd-prefbreak-item", children: [
12218
- /* @__PURE__ */ jsx96(ImportanceTag, { level: c.importance }),
12231
+ /* @__PURE__ */ jsx97(ImportanceTag, { level: c.importance }),
12219
12232
  /* @__PURE__ */ jsxs85("span", { className: "fd-prefbreak-text", children: [
12220
- /* @__PURE__ */ jsx96("span", { className: "fd-prefbreak-label", children: c.label }),
12221
- c.note ? /* @__PURE__ */ jsx96("span", { className: "fd-prefbreak-note", children: c.note }) : null
12233
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-label", children: c.label }),
12234
+ c.note ? /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-note", children: c.note }) : null
12222
12235
  ] }),
12223
12236
  /* @__PURE__ */ jsxs85("span", { className: "fd-prefbreak-val fd-tabular", children: [
12224
12237
  Math.round(Number(c.earned) || 0),
12225
- /* @__PURE__ */ jsx96("span", { className: "fd-prefbreak-sep", children: "/" }),
12238
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-sep", children: "/" }),
12226
12239
  Math.round(c.weight)
12227
12240
  ] })
12228
12241
  ] }, c.id);
@@ -12650,7 +12663,7 @@ import * as React71 from "react";
12650
12663
 
12651
12664
  // src/components/chat/ChatTurn.tsx
12652
12665
  import * as React70 from "react";
12653
- import { jsx as jsx97, jsxs as jsxs86 } from "react/jsx-runtime";
12666
+ import { jsx as jsx98, jsxs as jsxs86 } from "react/jsx-runtime";
12654
12667
  function JsonView({ value }) {
12655
12668
  let text;
12656
12669
  try {
@@ -12658,7 +12671,7 @@ function JsonView({ value }) {
12658
12671
  } catch (e) {
12659
12672
  text = String(value);
12660
12673
  }
12661
- return /* @__PURE__ */ jsx97(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
12674
+ return /* @__PURE__ */ jsx98(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
12662
12675
  }
12663
12676
  function PacketCard({ packet, schema, render, onApply, applied }) {
12664
12677
  if (!packet) return null;
@@ -12667,19 +12680,19 @@ function PacketCard({ packet, schema, render, onApply, applied }) {
12667
12680
  const title = s.heading || packet.type;
12668
12681
  return /* @__PURE__ */ jsxs86("section", { className: "fdc-packet" + (invalid ? " is-invalid" : ""), "aria-label": title, children: [
12669
12682
  /* @__PURE__ */ jsxs86("header", { className: "fdc-packet-head", children: [
12670
- /* @__PURE__ */ jsx97("i", { className: "ph ph-" + (s.icon || "package"), "aria-hidden": "true" }),
12671
- /* @__PURE__ */ jsx97("span", { className: "fdc-packet-title", title: truncationTitle(title), children: title }),
12672
- packet.repaired ? /* @__PURE__ */ jsx97("span", { className: "fdc-packet-badge", children: "Repaired" }) : null,
12673
- invalid ? /* @__PURE__ */ jsx97("span", { className: "fdc-packet-badge is-danger", children: "Invalid" }) : null
12683
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (s.icon || "package"), "aria-hidden": "true" }),
12684
+ /* @__PURE__ */ jsx98("span", { className: "fdc-packet-title", title: truncationTitle(title), children: title }),
12685
+ packet.repaired ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-badge", children: "Repaired" }) : null,
12686
+ invalid ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-badge is-danger", children: "Invalid" }) : null
12674
12687
  ] }),
12675
12688
  invalid ? /* @__PURE__ */ jsxs86("div", { className: "fdc-packet-alert", role: "alert", children: [
12676
- /* @__PURE__ */ jsx97("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12677
- /* @__PURE__ */ jsx97("span", { children: packet.error || "This result failed validation and can\u2019t be applied." })
12678
- ] }) : /* @__PURE__ */ jsx97("div", { className: "fdc-packet-body", children: render ? render(packet) : /* @__PURE__ */ jsx97(JsonView, { value: packet.payload }) }),
12689
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12690
+ /* @__PURE__ */ jsx98("span", { children: packet.error || "This result failed validation and can\u2019t be applied." })
12691
+ ] }) : /* @__PURE__ */ jsx98("div", { className: "fdc-packet-body", children: render ? render(packet) : /* @__PURE__ */ jsx98(JsonView, { value: packet.payload }) }),
12679
12692
  !invalid && onApply ? /* @__PURE__ */ jsxs86("footer", { className: "fdc-packet-foot", children: [
12680
- packet.repaired ? /* @__PURE__ */ jsx97("span", { className: "fdc-packet-note", children: "Corrected by the backend after a first attempt." }) : /* @__PURE__ */ jsx97("span", {}),
12693
+ packet.repaired ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-note", children: "Corrected by the backend after a first attempt." }) : /* @__PURE__ */ jsx98("span", {}),
12681
12694
  /* @__PURE__ */ jsxs86("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", disabled: applied, onClick: () => onApply(packet), children: [
12682
- /* @__PURE__ */ jsx97("i", { className: "ph ph-" + (applied ? "check" : "arrow-square-in"), "aria-hidden": "true" }),
12695
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (applied ? "check" : "arrow-square-in"), "aria-hidden": "true" }),
12683
12696
  applied ? "Applied" : s.applyLabel || "Apply"
12684
12697
  ] })
12685
12698
  ] }) : null
@@ -12690,16 +12703,16 @@ function ThinkingBlock({ text, durationMs, streaming, defaultOpen = false }) {
12690
12703
  if (!text) return null;
12691
12704
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-think" + (open2 ? " is-open" : ""), children: [
12692
12705
  /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-think-head", onClick: () => setOpen((v) => !v), "aria-expanded": open2, children: [
12693
- /* @__PURE__ */ jsx97("i", { className: "ph ph-brain", "aria-hidden": "true" }),
12694
- /* @__PURE__ */ jsx97("span", { children: streaming ? "Thinking" : durationMs ? "Thought for " + formatDuration(durationMs) : "Thought process" }),
12706
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-brain", "aria-hidden": "true" }),
12707
+ /* @__PURE__ */ jsx98("span", { children: streaming ? "Thinking" : durationMs ? "Thought for " + formatDuration(durationMs) : "Thought process" }),
12695
12708
  streaming ? /* @__PURE__ */ jsxs86("span", { className: "fdc-dots", "aria-hidden": "true", children: [
12696
- /* @__PURE__ */ jsx97("span", {}),
12697
- /* @__PURE__ */ jsx97("span", {}),
12698
- /* @__PURE__ */ jsx97("span", {})
12709
+ /* @__PURE__ */ jsx98("span", {}),
12710
+ /* @__PURE__ */ jsx98("span", {}),
12711
+ /* @__PURE__ */ jsx98("span", {})
12699
12712
  ] }) : null,
12700
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12713
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12701
12714
  ] }),
12702
- open2 ? /* @__PURE__ */ jsx97("div", { className: "fdc-think-body", children: text }) : null
12715
+ open2 ? /* @__PURE__ */ jsx98("div", { className: "fdc-think-body", children: text }) : null
12703
12716
  ] });
12704
12717
  }
12705
12718
  function Citations({ items = [], onOpen }) {
@@ -12707,18 +12720,18 @@ function Citations({ items = [], onOpen }) {
12707
12720
  if (!items.length) return null;
12708
12721
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-cites", children: [
12709
12722
  /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-cites-head", onClick: () => setOpen((v) => !v), "aria-expanded": open2, children: [
12710
- /* @__PURE__ */ jsx97("i", { className: "ph ph-quotes", "aria-hidden": "true" }),
12723
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-quotes", "aria-hidden": "true" }),
12711
12724
  /* @__PURE__ */ jsxs86("span", { children: [
12712
12725
  items.length,
12713
12726
  " source",
12714
12727
  items.length === 1 ? "" : "s"
12715
12728
  ] }),
12716
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12729
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12717
12730
  ] }),
12718
- open2 ? /* @__PURE__ */ jsx97("ol", { className: "fdc-cites-list", children: items.map((c, i) => /* @__PURE__ */ jsxs86("li", { children: [
12719
- /* @__PURE__ */ jsx97("span", { className: "fdc-cite-n fd-tabular", children: c.marker || i + 1 }),
12720
- c.url ? /* @__PURE__ */ jsx97("a", { href: c.url, target: "_blank", rel: "noopener noreferrer", onClick: onOpen ? (e) => onOpen(c, e) : void 0, children: c.title || c.url }) : /* @__PURE__ */ jsx97("span", { children: c.title || "Source" }),
12721
- c.detail ? /* @__PURE__ */ jsx97("span", { className: "fdc-cite-detail", children: c.detail }) : null
12731
+ open2 ? /* @__PURE__ */ jsx98("ol", { className: "fdc-cites-list", children: items.map((c, i) => /* @__PURE__ */ jsxs86("li", { children: [
12732
+ /* @__PURE__ */ jsx98("span", { className: "fdc-cite-n fd-tabular", children: c.marker || i + 1 }),
12733
+ c.url ? /* @__PURE__ */ jsx98("a", { href: c.url, target: "_blank", rel: "noopener noreferrer", onClick: onOpen ? (e) => onOpen(c, e) : void 0, children: c.title || c.url }) : /* @__PURE__ */ jsx98("span", { children: c.title || "Source" }),
12734
+ c.detail ? /* @__PURE__ */ jsx98("span", { className: "fdc-cite-detail", children: c.detail }) : null
12722
12735
  ] }, c.id || i)) }) : null
12723
12736
  ] });
12724
12737
  }
@@ -12736,22 +12749,22 @@ function MessageBody({ message: m, ctx }) {
12736
12749
  const body = clamped != null ? clamped : raw;
12737
12750
  const showMd = ctx.markdown && !isUser;
12738
12751
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-body", children: [
12739
- m.thinking && ctx.showThinking ? /* @__PURE__ */ jsx97(ThinkingBlock, { text: m.thinking, durationMs: m.thinkingMs, streaming: m.streaming && !m.text }) : null,
12740
- m.steps && m.steps.length && ctx.showSteps ? /* @__PURE__ */ jsx97(StepList, { steps: m.steps, defaultOpen: m.steps.some((s) => s.status === "running"), dense: true }) : null,
12752
+ m.thinking && ctx.showThinking ? /* @__PURE__ */ jsx98(ThinkingBlock, { text: m.thinking, durationMs: m.thinkingMs, streaming: m.streaming && !m.text }) : null,
12753
+ m.steps && m.steps.length && ctx.showSteps ? /* @__PURE__ */ jsx98(StepList, { steps: m.steps, defaultOpen: m.steps.some((s) => s.status === "running"), dense: true }) : null,
12741
12754
  body ? /* @__PURE__ */ jsxs86("div", { className: "fdc-text" + (isUser ? " is-user" : ""), children: [
12742
- showMd ? /* @__PURE__ */ jsx97(Markdown, { source: body, headingOffset: 2, codeProps: { collapseAfter: 22 }, renderCitation: ctx.renderCitation }) : /* @__PURE__ */ jsx97("div", { className: "fdc-plain", children: body }),
12743
- m.streaming ? /* @__PURE__ */ jsx97("span", { className: "fdc-caret", "aria-hidden": "true" }) : null
12755
+ showMd ? /* @__PURE__ */ jsx98(Markdown, { source: body, headingOffset: 2, codeProps: { collapseAfter: 22 }, renderCitation: ctx.renderCitation }) : /* @__PURE__ */ jsx98("div", { className: "fdc-plain", children: body }),
12756
+ m.streaming ? /* @__PURE__ */ jsx98("span", { className: "fdc-caret", "aria-hidden": "true" }) : null
12744
12757
  ] }) : null,
12745
12758
  clamped != null ? /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(true), children: [
12746
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-down", "aria-hidden": "true" }),
12759
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-down", "aria-hidden": "true" }),
12747
12760
  "Show more",
12748
- /* @__PURE__ */ jsx97("span", { className: "fdc-more-len fd-tabular", children: raw.length < 2e3 ? raw.length.toLocaleString() + " characters" : Math.round(raw.length / 100) / 10 + "k characters" })
12761
+ /* @__PURE__ */ jsx98("span", { className: "fdc-more-len fd-tabular", children: raw.length < 2e3 ? raw.length.toLocaleString() + " characters" : Math.round(raw.length / 100) / 10 + "k characters" })
12749
12762
  ] }) : expanded && ctx.maxVisibleChars && raw.length > ctx.maxVisibleChars ? /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(false), children: [
12750
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-up", "aria-hidden": "true" }),
12763
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-up", "aria-hidden": "true" }),
12751
12764
  "Show less"
12752
12765
  ] }) : null,
12753
- m.attachments && m.attachments.length ? /* @__PURE__ */ jsx97(FileGrid, { files: m.attachments, onOpen: ctx.onOpenAttachment, tiles: true, maxHeight: ctx.attachmentHeight || 220, compact: ctx.narrow }) : null,
12754
- m.packet ? /* @__PURE__ */ jsx97(
12766
+ m.attachments && m.attachments.length ? /* @__PURE__ */ jsx98(FileGrid, { files: m.attachments, onOpen: ctx.onOpenAttachment, tiles: true, maxHeight: ctx.attachmentHeight || 220, compact: ctx.narrow }) : null,
12767
+ m.packet ? /* @__PURE__ */ jsx98(
12755
12768
  PacketCard,
12756
12769
  {
12757
12770
  packet: m.packet,
@@ -12761,12 +12774,12 @@ function MessageBody({ message: m, ctx }) {
12761
12774
  applied: ctx.appliedPackets && ctx.appliedPackets[m.id]
12762
12775
  }
12763
12776
  ) : null,
12764
- m.citations && m.citations.length ? /* @__PURE__ */ jsx97(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
12777
+ m.citations && m.citations.length ? /* @__PURE__ */ jsx98(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
12765
12778
  m.working ? /* @__PURE__ */ jsxs86("div", { className: "fdc-working", role: "status", children: [
12766
12779
  /* @__PURE__ */ jsxs86("span", { className: "fdc-dots", "aria-hidden": "true", children: [
12767
- /* @__PURE__ */ jsx97("span", {}),
12768
- /* @__PURE__ */ jsx97("span", {}),
12769
- /* @__PURE__ */ jsx97("span", {})
12780
+ /* @__PURE__ */ jsx98("span", {}),
12781
+ /* @__PURE__ */ jsx98("span", {}),
12782
+ /* @__PURE__ */ jsx98("span", {})
12770
12783
  ] }),
12771
12784
  /* @__PURE__ */ jsxs86("span", { className: "fdc-working-label", children: [
12772
12785
  m.resumed ? "Resuming" : "Working",
@@ -12779,17 +12792,17 @@ function MessageBody({ message: m, ctx }) {
12779
12792
  m.job.detail
12780
12793
  ] }) : null
12781
12794
  ] }),
12782
- m.jobId ? /* @__PURE__ */ jsx97("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
12795
+ m.jobId ? /* @__PURE__ */ jsx98("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
12783
12796
  ] }) : null,
12784
12797
  m.stopped ? /* @__PURE__ */ jsxs86("div", { className: "fdc-stopped", children: [
12785
- /* @__PURE__ */ jsx97("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
12798
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
12786
12799
  "Stopped"
12787
12800
  ] }) : null,
12788
12801
  m.error ? /* @__PURE__ */ jsxs86("div", { className: "fdc-error", role: "alert", children: [
12789
- /* @__PURE__ */ jsx97("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12790
- /* @__PURE__ */ jsx97("span", { className: "fdc-error-text", children: ctx.errorCopy ? ctx.errorCopy(m.error) : m.error }),
12802
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12803
+ /* @__PURE__ */ jsx98("span", { className: "fdc-error-text", children: ctx.errorCopy ? ctx.errorCopy(m.error) : m.error }),
12791
12804
  m.retryable && ctx.onRetry ? /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-error-retry", onClick: ctx.onRetry, children: [
12792
- /* @__PURE__ */ jsx97("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12805
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12793
12806
  "Retry"
12794
12807
  ] }) : null
12795
12808
  ] }) : null
@@ -12804,14 +12817,14 @@ function RunActions({ group, ctx }) {
12804
12817
  if (!ctx.messageActions) return null;
12805
12818
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-actions", role: "group", "aria-label": "Message actions", children: [
12806
12819
  /* @__PURE__ */ jsxs86("button", { type: "button", className: "fdc-act" + (copied ? " is-done" : ""), onClick: () => copy(markdownToText(text)), "aria-label": "Copy message", children: [
12807
- /* @__PURE__ */ jsx97("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
12808
- /* @__PURE__ */ jsx97("span", { className: "fdc-act-label", children: copied ? "Copied" : "Copy" })
12820
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
12821
+ /* @__PURE__ */ jsx98("span", { className: "fdc-act-label", children: copied ? "Copied" : "Copy" })
12809
12822
  ] }),
12810
- isAssistant && ctx.onRetry ? /* @__PURE__ */ jsx97("button", { type: "button", className: "fdc-act", onClick: ctx.onRetry, "aria-label": "Retry this turn", children: /* @__PURE__ */ jsx97("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
12811
- group.role === "user" && ctx.onEdit ? /* @__PURE__ */ jsx97("button", { type: "button", className: "fdc-act", onClick: () => ctx.onEdit(last), "aria-label": "Edit and resend", children: /* @__PURE__ */ jsx97("i", { className: "ph ph-pencil-simple", "aria-hidden": "true" }) }) : null,
12823
+ isAssistant && ctx.onRetry ? /* @__PURE__ */ jsx98("button", { type: "button", className: "fdc-act", onClick: ctx.onRetry, "aria-label": "Retry this turn", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
12824
+ group.role === "user" && ctx.onEdit ? /* @__PURE__ */ jsx98("button", { type: "button", className: "fdc-act", onClick: () => ctx.onEdit(last), "aria-label": "Edit and resend", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-pencil-simple", "aria-hidden": "true" }) }) : null,
12812
12825
  isAssistant && ctx.onFeedback ? /* @__PURE__ */ jsxs86(React70.Fragment, { children: [
12813
- /* @__PURE__ */ jsx97("button", { type: "button", className: "fdc-act" + (fb === "up" ? " is-on" : ""), onClick: () => ctx.onFeedback(last.id, "up"), "aria-pressed": fb === "up", "aria-label": "Good response", children: /* @__PURE__ */ jsx97("i", { className: "ph ph-thumbs-up", "aria-hidden": "true" }) }),
12814
- /* @__PURE__ */ jsx97("button", { type: "button", className: "fdc-act" + (fb === "down" ? " is-on" : ""), onClick: () => ctx.onFeedback(last.id, "down"), "aria-pressed": fb === "down", "aria-label": "Bad response", children: /* @__PURE__ */ jsx97("i", { className: "ph ph-thumbs-down", "aria-hidden": "true" }) })
12826
+ /* @__PURE__ */ jsx98("button", { type: "button", className: "fdc-act" + (fb === "up" ? " is-on" : ""), onClick: () => ctx.onFeedback(last.id, "up"), "aria-pressed": fb === "up", "aria-label": "Good response", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-thumbs-up", "aria-hidden": "true" }) }),
12827
+ /* @__PURE__ */ jsx98("button", { type: "button", className: "fdc-act" + (fb === "down" ? " is-on" : ""), onClick: () => ctx.onFeedback(last.id, "down"), "aria-pressed": fb === "down", "aria-label": "Bad response", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-thumbs-down", "aria-hidden": "true" }) })
12815
12828
  ] }) : null,
12816
12829
  ctx.extraActions ? ctx.extraActions(group) : null
12817
12830
  ] });
@@ -12823,20 +12836,20 @@ function ChatTurn({ group, ctx }) {
12823
12836
  const stamp = group.messages[0].timestamp;
12824
12837
  return /* @__PURE__ */ jsxs86("article", { className: "fdc-turn is-" + group.role, "aria-label": String(name) + (stamp ? " at " + formatClock(stamp) : ""), children: [
12825
12838
  /* @__PURE__ */ jsxs86("div", { className: "fdc-turn-head", children: [
12826
- ctx.showAvatars ? /* @__PURE__ */ jsx97("span", { className: "fdc-avatar is-" + group.role, "aria-hidden": "true", children: avatar ? /* @__PURE__ */ jsx97("img", { src: avatar, alt: "" }) : isUser ? /* @__PURE__ */ jsx97("span", { className: "fdc-avatar-txt", children: (name || "You").slice(0, 1).toUpperCase() }) : /* @__PURE__ */ jsx97("i", { className: "ph ph-" + (ctx.assistantIcon || "sparkle") }) }) : null,
12827
- /* @__PURE__ */ jsx97("span", { className: "fdc-who", children: name }),
12828
- stamp ? /* @__PURE__ */ jsx97(RelativeTime, { className: "fdc-when", value: stamp }) : null,
12829
- group.messages.some((m) => m.model) ? /* @__PURE__ */ jsx97("span", { className: "fdc-turn-model", children: group.messages.find((m) => m.model).model }) : null
12839
+ ctx.showAvatars ? /* @__PURE__ */ jsx98("span", { className: "fdc-avatar is-" + group.role, "aria-hidden": "true", children: avatar ? /* @__PURE__ */ jsx98("img", { src: avatar, alt: "" }) : isUser ? /* @__PURE__ */ jsx98("span", { className: "fdc-avatar-txt", children: (name || "You").slice(0, 1).toUpperCase() }) : /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (ctx.assistantIcon || "sparkle") }) }) : null,
12840
+ /* @__PURE__ */ jsx98("span", { className: "fdc-who", children: name }),
12841
+ stamp ? /* @__PURE__ */ jsx98(RelativeTime, { className: "fdc-when", value: stamp }) : null,
12842
+ group.messages.some((m) => m.model) ? /* @__PURE__ */ jsx98("span", { className: "fdc-turn-model", children: group.messages.find((m) => m.model).model }) : null
12830
12843
  ] }),
12831
12844
  /* @__PURE__ */ jsxs86("div", { className: "fdc-turn-body", children: [
12832
- group.messages.map((m) => /* @__PURE__ */ jsx97("div", { className: "fdc-msg" + (m.pending ? " is-pending" : ""), children: /* @__PURE__ */ jsx97(MessageBody, { message: m, ctx }) }, m.id)),
12833
- /* @__PURE__ */ jsx97(RunActions, { group, ctx })
12845
+ group.messages.map((m) => /* @__PURE__ */ jsx98("div", { className: "fdc-msg" + (m.pending ? " is-pending" : ""), children: /* @__PURE__ */ jsx98(MessageBody, { message: m, ctx }) }, m.id)),
12846
+ /* @__PURE__ */ jsx98(RunActions, { group, ctx })
12834
12847
  ] })
12835
12848
  ] });
12836
12849
  }
12837
12850
 
12838
12851
  // src/components/chat/ChatTranscript.tsx
12839
- import { jsx as jsx98, jsxs as jsxs87 } from "react/jsx-runtime";
12852
+ import { jsx as jsx99, jsxs as jsxs87 } from "react/jsx-runtime";
12840
12853
  var GROUP_WINDOW = 6e4;
12841
12854
  var STICK_PX = 100;
12842
12855
  function groupMessages(list) {
@@ -12869,25 +12882,25 @@ function dayLabel(key) {
12869
12882
  }
12870
12883
  function Suggestions({ items = [], onPick }) {
12871
12884
  if (!items.length) return null;
12872
- return /* @__PURE__ */ jsx98("div", { className: "fdc-suggest", children: items.map((s, i) => {
12885
+ return /* @__PURE__ */ jsx99("div", { className: "fdc-suggest", children: items.map((s, i) => {
12873
12886
  const it = typeof s === "string" ? { label: s, text: s } : s;
12874
12887
  return /* @__PURE__ */ jsxs87("button", { type: "button", className: "fdc-suggest-item", onClick: () => onPick && onPick(it.text || it.label), children: [
12875
- it.icon ? /* @__PURE__ */ jsx98("i", { className: "ph ph-" + it.icon, "aria-hidden": "true" }) : null,
12888
+ it.icon ? /* @__PURE__ */ jsx99("i", { className: "ph ph-" + it.icon, "aria-hidden": "true" }) : null,
12876
12889
  /* @__PURE__ */ jsxs87("span", { className: "fdc-suggest-text", children: [
12877
- /* @__PURE__ */ jsx98("span", { className: "fdc-suggest-label", children: it.label }),
12878
- it.description ? /* @__PURE__ */ jsx98("span", { className: "fdc-suggest-desc", children: it.description }) : null
12890
+ /* @__PURE__ */ jsx99("span", { className: "fdc-suggest-label", children: it.label }),
12891
+ it.description ? /* @__PURE__ */ jsx99("span", { className: "fdc-suggest-desc", children: it.description }) : null
12879
12892
  ] }),
12880
- /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
12893
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
12881
12894
  ] }, it.id || i);
12882
12895
  }) });
12883
12896
  }
12884
12897
  function LoadingTurns() {
12885
- return /* @__PURE__ */ jsx98("div", { className: "fdc-skel", "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsxs87("div", { className: "fdc-skel-turn", children: [
12886
- /* @__PURE__ */ jsx98("div", { className: "fd-skel fd-skel-circle", style: { width: 22, height: 22 } }),
12898
+ return /* @__PURE__ */ jsx99("div", { className: "fdc-skel", "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsxs87("div", { className: "fdc-skel-turn", children: [
12899
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel fd-skel-circle", style: { width: 22, height: 22 } }),
12887
12900
  /* @__PURE__ */ jsxs87("div", { className: "fdc-skel-lines", children: [
12888
- /* @__PURE__ */ jsx98("div", { className: "fd-skel", style: { width: i ? "62%" : "44%", height: 11 } }),
12889
- /* @__PURE__ */ jsx98("div", { className: "fd-skel", style: { width: i ? "94%" : "78%", height: 11 } }),
12890
- /* @__PURE__ */ jsx98("div", { className: "fd-skel", style: { width: i ? "71%" : "56%", height: 11 } })
12901
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "62%" : "44%", height: 11 } }),
12902
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "94%" : "78%", height: 11 } }),
12903
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "71%" : "56%", height: 11 } })
12891
12904
  ] })
12892
12905
  ] }, i)) });
12893
12906
  }
@@ -12948,34 +12961,34 @@ function ChatTranscript({
12948
12961
  const empty = !messages.length && status === "ready";
12949
12962
  return /* @__PURE__ */ jsxs87("div", { className: ["fdc-scroll", className].filter(Boolean).join(" "), ref: scroller, onScroll, children: [
12950
12963
  /* @__PURE__ */ jsxs87("div", { className: "fdc-log", role: "log", "aria-label": "Conversation", children: [
12951
- status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx98(LoadingTurns, {}) : null,
12964
+ status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx99(LoadingTurns, {}) : null,
12952
12965
  status === "disconnected" ? /* @__PURE__ */ jsxs87("div", { className: "fdc-dead", children: [
12953
- /* @__PURE__ */ jsx98("span", { className: "fdc-dead-icon", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-plugs", "aria-hidden": "true" }) }),
12954
- /* @__PURE__ */ jsx98("h3", { className: "fdc-dead-title", children: ctx.deadTitle || "The assistant isn\u2019t reachable" }),
12955
- /* @__PURE__ */ jsx98("p", { className: "fdc-dead-body", children: fatal === "chat_unavailable" ? "The service reported chat_unavailable. Nothing you type will be lost \u2014 reopen the panel once it\u2019s back." : "The thread couldn\u2019t be resolved" + (fatal ? " (" + fatal + ")" : "") + ". The composer stays disabled until it resolves." }),
12966
+ /* @__PURE__ */ jsx99("span", { className: "fdc-dead-icon", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-plugs", "aria-hidden": "true" }) }),
12967
+ /* @__PURE__ */ jsx99("h3", { className: "fdc-dead-title", children: ctx.deadTitle || "The assistant isn\u2019t reachable" }),
12968
+ /* @__PURE__ */ jsx99("p", { className: "fdc-dead-body", children: fatal === "chat_unavailable" ? "The service reported chat_unavailable. Nothing you type will be lost \u2014 reopen the panel once it\u2019s back." : "The thread couldn\u2019t be resolved" + (fatal ? " (" + fatal + ")" : "") + ". The composer stays disabled until it resolves." }),
12956
12969
  ctx.onReconnect ? /* @__PURE__ */ jsxs87("button", { type: "button", className: "fd-btn fd-btn-secondary fd-btn-sm", onClick: ctx.onReconnect, children: [
12957
- /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12970
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12958
12971
  "Try again"
12959
12972
  ] }) : null
12960
12973
  ] }) : null,
12961
12974
  empty ? renderEmpty ? renderEmpty() : /* @__PURE__ */ jsxs87("div", { className: "fdc-empty", children: [
12962
- /* @__PURE__ */ jsx98("span", { className: "fdc-empty-icon", children: /* @__PURE__ */ jsx98("i", { className: "ph ph-" + emptyIcon, "aria-hidden": "true" }) }),
12963
- /* @__PURE__ */ jsx98("h3", { className: "fdc-empty-title", children: emptyTitle }),
12964
- emptyDescription ? /* @__PURE__ */ jsx98("p", { className: "fdc-empty-body", children: emptyDescription }) : null,
12965
- /* @__PURE__ */ jsx98(Suggestions, { items: suggestions, onPick })
12975
+ /* @__PURE__ */ jsx99("span", { className: "fdc-empty-icon", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-" + emptyIcon, "aria-hidden": "true" }) }),
12976
+ /* @__PURE__ */ jsx99("h3", { className: "fdc-empty-title", children: emptyTitle }),
12977
+ emptyDescription ? /* @__PURE__ */ jsx99("p", { className: "fdc-empty-body", children: emptyDescription }) : null,
12978
+ /* @__PURE__ */ jsx99(Suggestions, { items: suggestions, onPick })
12966
12979
  ] }) : null,
12967
12980
  groups.map((g, i) => {
12968
12981
  const prev = groups[i - 1];
12969
12982
  const k = dayKey(g.messages[0].timestamp);
12970
12983
  const showDay = !!k && (!prev || dayKey(prev.messages[0].timestamp) !== k);
12971
12984
  return /* @__PURE__ */ jsxs87(React71.Fragment, { children: [
12972
- showDay ? /* @__PURE__ */ jsx98("div", { className: "fdc-day", children: /* @__PURE__ */ jsx98("span", { children: dayLabel(k) }) }) : null,
12973
- /* @__PURE__ */ jsx98(ChatTurn, { group: g, ctx })
12985
+ showDay ? /* @__PURE__ */ jsx99("div", { className: "fdc-day", children: /* @__PURE__ */ jsx99("span", { children: dayLabel(k) }) }) : null,
12986
+ /* @__PURE__ */ jsx99(ChatTurn, { group: g, ctx })
12974
12987
  ] }, g.key || i);
12975
12988
  })
12976
12989
  ] }),
12977
12990
  pill ? /* @__PURE__ */ jsxs87("button", { type: "button", className: "fdc-pill", onClick: () => toBottom(true), children: [
12978
- /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-down", "aria-hidden": "true" }),
12991
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-down", "aria-hidden": "true" }),
12979
12992
  pill,
12980
12993
  " new message",
12981
12994
  pill === 1 ? "" : "s"
@@ -12986,7 +12999,7 @@ var TranscriptKit = { groupMessages };
12986
12999
 
12987
13000
  // src/components/chat/ChatComposer.tsx
12988
13001
  import * as React72 from "react";
12989
- import { jsx as jsx99, jsxs as jsxs88 } from "react/jsx-runtime";
13002
+ import { jsx as jsx100, jsxs as jsxs88 } from "react/jsx-runtime";
12990
13003
  function ChatComposer({
12991
13004
  onSubmit,
12992
13005
  onStop,
@@ -13091,7 +13104,7 @@ function ChatComposer({
13091
13104
  description: it.description,
13092
13105
  icon: it.icon,
13093
13106
  meta: mention.meta,
13094
- shortcut: slash.shortcut ? /* @__PURE__ */ jsx99(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
13107
+ shortcut: slash.shortcut ? /* @__PURE__ */ jsx100(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
13095
13108
  onSelect: () => {
13096
13109
  const insert = trigger.type === "slash" ? slash.immediate ? "/" + slash.id : "/" + slash.id + " " : "@" + (mention.value || mention.label) + " ";
13097
13110
  editor.current && editor.current.replaceRange(trigger.from, trigger.to, insert);
@@ -13151,13 +13164,13 @@ function ChatComposer({
13151
13164
  };
13152
13165
  };
13153
13166
  return /* @__PURE__ */ jsxs88("div", { className: "fdc-composer" + (disabled ? " is-disabled" : "") + (narrow ? " is-narrow" : ""), children: [
13154
- queue.length ? /* @__PURE__ */ jsx99("div", { className: "fdc-queue", "aria-label": "Queued messages", children: queue.map((q) => /* @__PURE__ */ jsxs88("div", { className: "fdc-queue-row", children: [
13155
- /* @__PURE__ */ jsx99("i", { className: "ph ph-clock-countdown", "aria-hidden": "true" }),
13156
- /* @__PURE__ */ jsx99("span", { className: "fdc-queue-text", title: truncationTitle(q.text || (q.attachments ? q.attachments.length + " file(s)" : "")), children: q.text || (q.attachments ? q.attachments.length + " file(s)" : "") }),
13157
- onRemoveQueued ? /* @__PURE__ */ jsx99("button", { type: "button", className: "fdc-queue-x", onClick: () => onRemoveQueued(q.id), "aria-label": "Remove queued message", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
13167
+ queue.length ? /* @__PURE__ */ jsx100("div", { className: "fdc-queue", "aria-label": "Queued messages", children: queue.map((q) => /* @__PURE__ */ jsxs88("div", { className: "fdc-queue-row", children: [
13168
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-clock-countdown", "aria-hidden": "true" }),
13169
+ /* @__PURE__ */ jsx100("span", { className: "fdc-queue-text", title: truncationTitle(q.text || (q.attachments ? q.attachments.length + " file(s)" : "")), children: q.text || (q.attachments ? q.attachments.length + " file(s)" : "") }),
13170
+ onRemoveQueued ? /* @__PURE__ */ jsx100("button", { type: "button", className: "fdc-queue-x", onClick: () => onRemoveQueued(q.id), "aria-label": "Remove queued message", children: /* @__PURE__ */ jsx100("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
13158
13171
  ] }, q.id)) }) : null,
13159
13172
  sessionBar,
13160
- /* @__PURE__ */ jsx99(
13173
+ /* @__PURE__ */ jsx100(
13161
13174
  Dropzone,
13162
13175
  {
13163
13176
  className: "fdc-field",
@@ -13172,8 +13185,8 @@ function ChatComposer({
13172
13185
  label: "Drop to attach",
13173
13186
  hint: acceptFiles ? acceptFiles.replace(/,/g, " \xB7 ") : void 0,
13174
13187
  children: /* @__PURE__ */ jsxs88("div", { ref: wrap, className: "fdc-field-inner", children: [
13175
- staged.items.length ? /* @__PURE__ */ jsx99("div", { className: "fdc-staged", children: /* @__PURE__ */ jsx99(FileStrip, { files: staged.items, size: narrow ? 60 : 68, onRemove: staged.remove, onRetry: staged.retry, onOpen: onOpenAttachment }) }) : null,
13176
- /* @__PURE__ */ jsx99(
13188
+ staged.items.length ? /* @__PURE__ */ jsx100("div", { className: "fdc-staged", children: /* @__PURE__ */ jsx100(FileStrip, { files: staged.items, size: narrow ? 60 : 68, onRemove: staged.remove, onRetry: staged.retry, onOpen: onOpenAttachment }) }) : null,
13189
+ /* @__PURE__ */ jsx100(
13177
13190
  MarkdownEditor,
13178
13191
  {
13179
13192
  ref: editor,
@@ -13193,32 +13206,32 @@ function ChatComposer({
13193
13206
  }
13194
13207
  ),
13195
13208
  /* @__PURE__ */ jsxs88("div", { className: "fdc-tools", children: [
13196
- fileUploadHandler ? /* @__PURE__ */ jsx99(FilePickButton, { onFiles: staged.add, onReject: (r) => flash(r[0].message), accept: acceptFiles, maxFileSize, label: "Attach files", icon: "plus" }) : null,
13197
- voiceHandler ? /* @__PURE__ */ jsx99("button", { type: "button", className: "fd-attachbtn" + (listening ? " is-live" : ""), onClick: voice, "aria-pressed": listening, "aria-label": listening ? "Stop dictation" : "Dictate", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-" + (listening ? "waveform" : "microphone"), "aria-hidden": "true" }) }) : null,
13209
+ fileUploadHandler ? /* @__PURE__ */ jsx100(FilePickButton, { onFiles: staged.add, onReject: (r) => flash(r[0].message), accept: acceptFiles, maxFileSize, label: "Attach files", icon: "plus" }) : null,
13210
+ voiceHandler ? /* @__PURE__ */ jsx100("button", { type: "button", className: "fd-attachbtn" + (listening ? " is-live" : ""), onClick: voice, "aria-pressed": listening, "aria-label": listening ? "Stop dictation" : "Dictate", children: /* @__PURE__ */ jsx100("i", { className: "ph ph-" + (listening ? "waveform" : "microphone"), "aria-hidden": "true" }) }) : null,
13198
13211
  toolbarExtras,
13199
- /* @__PURE__ */ jsx99("span", { className: "fdc-tools-gap" }),
13212
+ /* @__PURE__ */ jsx100("span", { className: "fdc-tools-gap" }),
13200
13213
  maxLength && text.length > maxLength * 0.6 ? /* @__PURE__ */ jsxs88("span", { className: "fdc-count fd-tabular" + (text.length > maxLength * 0.95 ? " is-hot" : ""), children: [
13201
13214
  text.length,
13202
13215
  "/",
13203
13216
  maxLength
13204
13217
  ] }) : null,
13205
13218
  busy ? /* @__PURE__ */ jsxs88("button", { type: "button", className: "fdc-stop", onClick: onStop, "aria-label": "Stop generating", children: [
13206
- /* @__PURE__ */ jsx99("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
13207
- /* @__PURE__ */ jsx99("span", { children: "Stop" })
13219
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
13220
+ /* @__PURE__ */ jsx100("span", { children: "Stop" })
13208
13221
  ] }) : /* @__PURE__ */ jsxs88("button", { type: "button", className: "fdc-send", onClick: submit, disabled: !canSend, "aria-label": "Send message", children: [
13209
- /* @__PURE__ */ jsx99("i", { className: "ph ph-paper-plane-right", "aria-hidden": "true" }),
13210
- /* @__PURE__ */ jsx99("span", { className: "fdc-send-label", children: "Send" })
13222
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-paper-plane-right", "aria-hidden": "true" }),
13223
+ /* @__PURE__ */ jsx100("span", { className: "fdc-send-label", children: "Send" })
13211
13224
  ] })
13212
13225
  ] })
13213
13226
  ] })
13214
13227
  }
13215
13228
  ),
13216
13229
  notice ? /* @__PURE__ */ jsxs88("div", { className: "fdc-notice", role: "status", children: [
13217
- /* @__PURE__ */ jsx99("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
13230
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
13218
13231
  notice
13219
13232
  ] }) : null,
13220
- hint && !notice ? /* @__PURE__ */ jsx99("div", { className: "fdc-hint", children: hint }) : null,
13221
- /* @__PURE__ */ jsx99(
13233
+ hint && !notice ? /* @__PURE__ */ jsx100("div", { className: "fdc-hint", children: hint }) : null,
13234
+ /* @__PURE__ */ jsx100(
13222
13235
  Popover,
13223
13236
  {
13224
13237
  open: menuOpen,
@@ -13232,12 +13245,12 @@ function ChatComposer({
13232
13245
  returnFocus: false,
13233
13246
  closeOnOutside: true,
13234
13247
  label: trigger && trigger.type === "slash" ? "Commands" : "Mentions",
13235
- children: /* @__PURE__ */ jsx99(
13248
+ children: /* @__PURE__ */ jsx100(
13236
13249
  Menu,
13237
13250
  {
13238
13251
  items: menuItems,
13239
13252
  autoFocus: false,
13240
- header: /* @__PURE__ */ jsx99("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
13253
+ header: /* @__PURE__ */ jsx100("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
13241
13254
  onClose: () => setTrigger(null)
13242
13255
  }
13243
13256
  )
@@ -13248,7 +13261,7 @@ function ChatComposer({
13248
13261
 
13249
13262
  // src/components/chat/ChatSessionBar.tsx
13250
13263
  import * as React73 from "react";
13251
- import { jsx as jsx100, jsxs as jsxs89 } from "react/jsx-runtime";
13264
+ import { jsx as jsx101, jsxs as jsxs89 } from "react/jsx-runtime";
13252
13265
  var compact2 = meterFormats.compact;
13253
13266
  function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extras }) {
13254
13267
  const [open2, setOpen] = React73.useState(false);
@@ -13280,15 +13293,15 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13280
13293
  "aria-expanded": expandable ? open2 : void 0,
13281
13294
  "aria-label": expandable ? "Usage details" : void 0,
13282
13295
  children: [
13283
- cu ? /* @__PURE__ */ jsx100("span", { className: "fdc-bar-mini", "aria-hidden": "true", children: /* @__PURE__ */ jsx100(SegmentedMeter, { total, segments: cu.segments, height: 4, showTotal: false }) }) : null,
13284
- /* @__PURE__ */ jsx100("span", { className: "fdc-bar-text", title: truncationTitle(bits.join(" \xB7 ")), children: bits.join(" \xB7 ") }),
13285
- expandable ? /* @__PURE__ */ jsx100("i", { className: "ph ph-caret-right fdc-bar-caret", "aria-hidden": "true" }) : null
13296
+ cu ? /* @__PURE__ */ jsx101("span", { className: "fdc-bar-mini", "aria-hidden": "true", children: /* @__PURE__ */ jsx101(SegmentedMeter, { total, segments: cu.segments, height: 4, showTotal: false }) }) : null,
13297
+ /* @__PURE__ */ jsx101("span", { className: "fdc-bar-text", title: truncationTitle(bits.join(" \xB7 ")), children: bits.join(" \xB7 ") }),
13298
+ expandable ? /* @__PURE__ */ jsx101("i", { className: "ph ph-caret-right fdc-bar-caret", "aria-hidden": "true" }) : null
13286
13299
  ]
13287
13300
  }
13288
13301
  ),
13289
13302
  extras
13290
13303
  ] }),
13291
- /* @__PURE__ */ jsx100(
13304
+ /* @__PURE__ */ jsx101(
13292
13305
  Popover,
13293
13306
  {
13294
13307
  open: open2,
@@ -13303,11 +13316,11 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13303
13316
  setOpen(false);
13304
13317
  onClear();
13305
13318
  }, children: [
13306
- /* @__PURE__ */ jsx100("i", { className: "ph ph-trash", "aria-hidden": "true" }),
13319
+ /* @__PURE__ */ jsx101("i", { className: "ph ph-trash", "aria-hidden": "true" }),
13307
13320
  "Clear conversation"
13308
13321
  ] }) : void 0,
13309
13322
  children: /* @__PURE__ */ jsxs89("div", { className: "fdc-usage", children: [
13310
- cu ? /* @__PURE__ */ jsx100("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx100(
13323
+ cu ? /* @__PURE__ */ jsx101("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx101(
13311
13324
  SegmentedMeter,
13312
13325
  {
13313
13326
  total,
@@ -13320,8 +13333,8 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13320
13333
  }
13321
13334
  ) }) : null,
13322
13335
  limits && limits.length ? /* @__PURE__ */ jsxs89("section", { className: "fdc-usage-sec", children: [
13323
- /* @__PURE__ */ jsx100("h4", { className: "fdc-usage-h", children: "Usage limits" }),
13324
- /* @__PURE__ */ jsx100("div", { className: "fdc-usage-rows", children: limits.map((l) => /* @__PURE__ */ jsx100(
13336
+ /* @__PURE__ */ jsx101("h4", { className: "fdc-usage-h", children: "Usage limits" }),
13337
+ /* @__PURE__ */ jsx101("div", { className: "fdc-usage-rows", children: limits.map((l) => /* @__PURE__ */ jsx101(
13325
13338
  QuotaRow,
13326
13339
  {
13327
13340
  label: l.label,
@@ -13333,23 +13346,23 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13333
13346
  ] }) : null,
13334
13347
  stats ? /* @__PURE__ */ jsxs89("section", { className: "fdc-usage-sec fdc-usage-stats", children: [
13335
13348
  stats.elapsedMs ? /* @__PURE__ */ jsxs89("div", { children: [
13336
- /* @__PURE__ */ jsx100("span", { children: "Session" }),
13337
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
13349
+ /* @__PURE__ */ jsx101("span", { children: "Session" }),
13350
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
13338
13351
  ] }) : null,
13339
13352
  stats.tokens ? /* @__PURE__ */ jsxs89("div", { children: [
13340
- /* @__PURE__ */ jsx100("span", { children: "Tokens" }),
13341
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
13353
+ /* @__PURE__ */ jsx101("span", { children: "Tokens" }),
13354
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
13342
13355
  ] }) : null,
13343
13356
  stats.costUsd != null ? /* @__PURE__ */ jsxs89("div", { children: [
13344
- /* @__PURE__ */ jsx100("span", { children: "Cost" }),
13357
+ /* @__PURE__ */ jsx101("span", { children: "Cost" }),
13345
13358
  /* @__PURE__ */ jsxs89("b", { className: "fd-tabular", children: [
13346
13359
  "$",
13347
13360
  Number(stats.costUsd).toFixed(3)
13348
13361
  ] })
13349
13362
  ] }) : null,
13350
13363
  stats.turns ? /* @__PURE__ */ jsxs89("div", { children: [
13351
- /* @__PURE__ */ jsx100("span", { children: "Turns" }),
13352
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: stats.turns })
13364
+ /* @__PURE__ */ jsx101("span", { children: "Turns" }),
13365
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: stats.turns })
13353
13366
  ] }) : null
13354
13367
  ] }) : null
13355
13368
  ] })
@@ -13388,7 +13401,7 @@ function ModelControls({
13388
13401
  disabled: m.disabled,
13389
13402
  checked: m.id === (current2 && current2.id),
13390
13403
  meta: m.meta,
13391
- shortcut: m.shortcut ? /* @__PURE__ */ jsx100(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
13404
+ shortcut: m.shortcut ? /* @__PURE__ */ jsx101(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
13392
13405
  onSelect: () => onModelChange && onModelChange(m.id)
13393
13406
  });
13394
13407
  const items = [{ kind: "section", label: "Models" }].concat(flat.map(item));
@@ -13402,14 +13415,14 @@ function ModelControls({
13402
13415
  items.push({
13403
13416
  kind: "custom",
13404
13417
  render: () => /* @__PURE__ */ jsxs89("label", { className: "fdc-switchrow", children: [
13405
- /* @__PURE__ */ jsx100("span", { children: fastModeLabel }),
13406
- /* @__PURE__ */ jsx100("input", { type: "checkbox", className: "fd-sr", checked: !!fastMode, onChange: (e) => onFastModeChange(e.target.checked) }),
13407
- /* @__PURE__ */ jsx100("span", { className: "fd-switch-track" + (fastMode ? " is-on" : ""), "aria-hidden": "true", children: /* @__PURE__ */ jsx100("span", { className: "fd-switch-thumb" }) })
13418
+ /* @__PURE__ */ jsx101("span", { children: fastModeLabel }),
13419
+ /* @__PURE__ */ jsx101("input", { type: "checkbox", className: "fd-sr", checked: !!fastMode, onChange: (e) => onFastModeChange(e.target.checked) }),
13420
+ /* @__PURE__ */ jsx101("span", { className: "fd-switch-track" + (fastMode ? " is-on" : ""), "aria-hidden": "true", children: /* @__PURE__ */ jsx101("span", { className: "fd-switch-thumb" }) })
13408
13421
  ] })
13409
13422
  });
13410
13423
  }
13411
13424
  return /* @__PURE__ */ jsxs89(React73.Fragment, { children: [
13412
- /* @__PURE__ */ jsx100(
13425
+ /* @__PURE__ */ jsx101(
13413
13426
  MenuButton,
13414
13427
  {
13415
13428
  items,
@@ -13420,7 +13433,7 @@ function ModelControls({
13420
13433
  title: "Choose a model"
13421
13434
  }
13422
13435
  ),
13423
- effortLevels && effortLevels.length ? /* @__PURE__ */ jsx100(
13436
+ effortLevels && effortLevels.length ? /* @__PURE__ */ jsx101(
13424
13437
  MenuButton,
13425
13438
  {
13426
13439
  placement: "top-end",
@@ -13441,7 +13454,7 @@ function ModelControls({
13441
13454
  }
13442
13455
 
13443
13456
  // src/components/chat/AgentChatPanel.tsx
13444
- import { jsx as jsx101, jsxs as jsxs90 } from "react/jsx-runtime";
13457
+ import { jsx as jsx102, jsxs as jsxs90 } from "react/jsx-runtime";
13445
13458
  var SURFACES = { sidebar: "is-sidebar", inline: "is-inline", page: "is-page", modal: "is-modal", sheet: "is-sheet" };
13446
13459
  function AgentChatPanel({
13447
13460
  /* required */
@@ -13595,7 +13608,7 @@ function AgentChatPanel({
13595
13608
  onReconnect: engine.reload,
13596
13609
  deadTitle: "The assistant isn\u2019t reachable"
13597
13610
  };
13598
- const sessionBar = /* @__PURE__ */ jsx101(
13611
+ const sessionBar = /* @__PURE__ */ jsx102(
13599
13612
  ChatSessionBar,
13600
13613
  {
13601
13614
  sessionStats,
@@ -13604,7 +13617,7 @@ function AgentChatPanel({
13604
13617
  onClear: engine.visible.length ? engine.clear : void 0
13605
13618
  }
13606
13619
  );
13607
- const modelControls = /* @__PURE__ */ jsx101(
13620
+ const modelControls = /* @__PURE__ */ jsx102(
13608
13621
  ModelControls,
13609
13622
  {
13610
13623
  models,
@@ -13619,7 +13632,7 @@ function AgentChatPanel({
13619
13632
  narrow
13620
13633
  }
13621
13634
  );
13622
- const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx101(
13635
+ const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx102(
13623
13636
  MenuButton,
13624
13637
  {
13625
13638
  variant: "ghost",
@@ -13657,7 +13670,7 @@ function AgentChatPanel({
13657
13670
  },
13658
13671
  "aria-label": title,
13659
13672
  children: [
13660
- surface === "sidebar" && resizable ? /* @__PURE__ */ jsx101(
13673
+ surface === "sidebar" && resizable ? /* @__PURE__ */ jsx102(
13661
13674
  "div",
13662
13675
  {
13663
13676
  className: "fdc-grip",
@@ -13673,19 +13686,19 @@ function AgentChatPanel({
13673
13686
  }
13674
13687
  ) : null,
13675
13688
  showHeader ? /* @__PURE__ */ jsxs90("header", { className: "fdc-head", children: [
13676
- /* @__PURE__ */ jsx101("span", { className: "fdc-head-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx101("i", { className: "ph ph-" + assistantIcon }) }),
13689
+ /* @__PURE__ */ jsx102("span", { className: "fdc-head-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-" + assistantIcon }) }),
13677
13690
  /* @__PURE__ */ jsxs90("span", { className: "fdc-head-titles", children: [
13678
- /* @__PURE__ */ jsx101("span", { className: "fdc-head-title", title: truncationTitle(title), children: title }),
13679
- subtitle ? /* @__PURE__ */ jsx101("span", { className: "fdc-head-sub", title: truncationTitle(subtitle), children: subtitle }) : null
13691
+ /* @__PURE__ */ jsx102("span", { className: "fdc-head-title", title: truncationTitle(title), children: title }),
13692
+ subtitle ? /* @__PURE__ */ jsx102("span", { className: "fdc-head-sub", title: truncationTitle(subtitle), children: subtitle }) : null
13680
13693
  ] }),
13681
13694
  /* @__PURE__ */ jsxs90("span", { className: "fdc-head-acts", children: [
13682
13695
  headerActions,
13683
13696
  threadMenu,
13684
- onNewThread ? /* @__PURE__ */ jsx101("button", { type: "button", className: "fdc-iconbtn", onClick: onNewThread, "aria-label": "New conversation", title: "New conversation", children: /* @__PURE__ */ jsx101("i", { className: "ph ph-plus", "aria-hidden": "true" }) }) : null,
13685
- onClose ? /* @__PURE__ */ jsx101("button", { type: "button", className: "fdc-iconbtn", onClick: onClose, "aria-label": "Close panel", title: "Close", children: /* @__PURE__ */ jsx101("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
13697
+ onNewThread ? /* @__PURE__ */ jsx102("button", { type: "button", className: "fdc-iconbtn", onClick: onNewThread, "aria-label": "New conversation", title: "New conversation", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-plus", "aria-hidden": "true" }) }) : null,
13698
+ onClose ? /* @__PURE__ */ jsx102("button", { type: "button", className: "fdc-iconbtn", onClick: onClose, "aria-label": "Close panel", title: "Close", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
13686
13699
  ] })
13687
13700
  ] }) : null,
13688
- /* @__PURE__ */ jsx101(
13701
+ /* @__PURE__ */ jsx102(
13689
13702
  ChatTranscript,
13690
13703
  {
13691
13704
  messages: engine.visible,
@@ -13700,7 +13713,7 @@ function AgentChatPanel({
13700
13713
  renderEmpty
13701
13714
  }
13702
13715
  ),
13703
- /* @__PURE__ */ jsx101(
13716
+ /* @__PURE__ */ jsx102(
13704
13717
  ChatComposer,
13705
13718
  {
13706
13719
  onSubmit: (text, atts) => engine.send(text, atts),
@@ -13734,7 +13747,7 @@ function AgentChatPanel({
13734
13747
 
13735
13748
  // src/components/files/FileViewer.tsx
13736
13749
  import * as React75 from "react";
13737
- import { jsx as jsx102, jsxs as jsxs91 } from "react/jsx-runtime";
13750
+ import { jsx as jsx103, jsxs as jsxs91 } from "react/jsx-runtime";
13738
13751
  function previewKindOf(file) {
13739
13752
  const mime = (file.mime || "").toLowerCase();
13740
13753
  const ext = extensionOf(file.name || "");
@@ -13829,16 +13842,16 @@ function usePreview(file, kind, resolveUrl) {
13829
13842
  return { ...state, retry: React75.useCallback(() => setAttempt((a) => a + 1), []) };
13830
13843
  }
13831
13844
  function PreviewBody({ file, kind, state }) {
13832
- if (kind === "image") return /* @__PURE__ */ jsx102("img", { className: "fd-fv-image", src: state.url, alt: file.name || "Preview" });
13833
- if (kind === "pdf") return /* @__PURE__ */ jsx102("iframe", { className: "fd-fv-pdf", src: state.url, title: file.name || "PDF preview" });
13834
- if (kind === "markdown") return /* @__PURE__ */ jsx102(Markdown, { className: "fd-fv-markdown", source: state.text || "" });
13845
+ if (kind === "image") return /* @__PURE__ */ jsx103("img", { className: "fd-fv-image", src: state.url, alt: file.name || "Preview" });
13846
+ if (kind === "pdf") return /* @__PURE__ */ jsx103("iframe", { className: "fd-fv-pdf", src: state.url, title: file.name || "PDF preview" });
13847
+ if (kind === "markdown") return /* @__PURE__ */ jsx103(Markdown, { className: "fd-fv-markdown", source: state.text || "" });
13835
13848
  if (kind === "json") {
13836
13849
  let pretty = state.text || "";
13837
13850
  try {
13838
13851
  pretty = JSON.stringify(JSON.parse(pretty), null, 2);
13839
13852
  } catch {
13840
13853
  }
13841
- return /* @__PURE__ */ jsx102(CodeBlock, { code: pretty, language: "json" });
13854
+ return /* @__PURE__ */ jsx103(CodeBlock, { code: pretty, language: "json" });
13842
13855
  }
13843
13856
  if (kind === "csv") {
13844
13857
  const tsv = extensionOf(file.name || "") === "tsv" || (file.mime || "").toLowerCase().includes("tab-separated");
@@ -13848,8 +13861,8 @@ function PreviewBody({ file, kind, state }) {
13848
13861
  const shown = dataRows.slice(0, FILE_VIEWER_CSV_ROW_LIMIT);
13849
13862
  return /* @__PURE__ */ jsxs91("div", { className: "fd-fv-csv", children: [
13850
13863
  /* @__PURE__ */ jsxs91("table", { className: "fd-fv-csv-table", children: [
13851
- /* @__PURE__ */ jsx102("thead", { children: /* @__PURE__ */ jsx102("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx102("th", { children: c }, i)) }) }),
13852
- /* @__PURE__ */ jsx102("tbody", { children: shown.map((r, ri) => /* @__PURE__ */ jsx102("tr", { children: head.map((_, ci) => /* @__PURE__ */ jsx102("td", { children: r[ci] ?? "" }, ci)) }, ri)) })
13864
+ /* @__PURE__ */ jsx103("thead", { children: /* @__PURE__ */ jsx103("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx103("th", { children: c }, i)) }) }),
13865
+ /* @__PURE__ */ jsx103("tbody", { children: shown.map((r, ri) => /* @__PURE__ */ jsx103("tr", { children: head.map((_, ci) => /* @__PURE__ */ jsx103("td", { children: r[ci] ?? "" }, ci)) }, ri)) })
13853
13866
  ] }),
13854
13867
  dataRows.length > FILE_VIEWER_CSV_ROW_LIMIT ? /* @__PURE__ */ jsxs91("p", { className: "fd-fv-csv-note fd-body-sm fd-muted", children: [
13855
13868
  "Showing the first ",
@@ -13860,10 +13873,10 @@ function PreviewBody({ file, kind, state }) {
13860
13873
  ] }) : null
13861
13874
  ] });
13862
13875
  }
13863
- if (kind === "text") return /* @__PURE__ */ jsx102(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
13876
+ if (kind === "text") return /* @__PURE__ */ jsx103(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
13864
13877
  return /* @__PURE__ */ jsxs91("div", { className: "fd-fv-fallback", children: [
13865
- /* @__PURE__ */ jsx102("span", { className: "fd-fv-fallback-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13866
- /* @__PURE__ */ jsx102("span", { className: "fd-fv-fallback-title", children: "No preview available" }),
13878
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-fallback-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13879
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-fallback-title", children: "No preview available" }),
13867
13880
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-fallback-meta", children: [
13868
13881
  file.mime || "Unknown type",
13869
13882
  file.size ? " \xB7 " + formatBytes(file.size) : ""
@@ -13900,9 +13913,9 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13900
13913
  "aria-label": file.name || "File",
13901
13914
  children: [
13902
13915
  /* @__PURE__ */ jsxs91("header", { className: "fd-fv-head", children: [
13903
- /* @__PURE__ */ jsx102("span", { className: "fd-fv-head-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13916
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-head-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13904
13917
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-titles", children: [
13905
- /* @__PURE__ */ jsx102("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
13918
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
13906
13919
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-meta", children: [
13907
13920
  file.mime || "Unknown type",
13908
13921
  file.size ? " \xB7 " + formatBytes(file.size) : ""
@@ -13910,12 +13923,12 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13910
13923
  ] }),
13911
13924
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-actions", children: [
13912
13925
  actions,
13913
- /* @__PURE__ */ jsx102(Button, { variant: "secondary", size: "sm", icon: "download-simple", loading: downloading, onClick: download, children: "Download" }),
13914
- onClose ? /* @__PURE__ */ jsx102(IconButton, { icon: "x", label: "Close", onClick: onClose }) : null
13926
+ /* @__PURE__ */ jsx103(Button, { variant: "secondary", size: "sm", icon: "download-simple", loading: downloading, onClick: download, children: "Download" }),
13927
+ onClose ? /* @__PURE__ */ jsx103(IconButton, { icon: "x", label: "Close", onClick: onClose }) : null
13915
13928
  ] })
13916
13929
  ] }),
13917
- downloadError ? /* @__PURE__ */ jsx102("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
13918
- hasSide ? /* @__PURE__ */ jsx102(
13930
+ downloadError ? /* @__PURE__ */ jsx103("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
13931
+ hasSide ? /* @__PURE__ */ jsx103(
13919
13932
  Tabs,
13920
13933
  {
13921
13934
  className: "fd-fv-tabs",
@@ -13925,18 +13938,18 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13925
13938
  }
13926
13939
  ) : null,
13927
13940
  /* @__PURE__ */ jsxs91("div", { className: "fd-fv-body", children: [
13928
- /* @__PURE__ */ jsx102("div", { className: "fd-fv-preview", role: "region", "aria-label": "Preview of " + (file.name || "file"), children: /* @__PURE__ */ jsx102(
13941
+ /* @__PURE__ */ jsx103("div", { className: "fd-fv-preview", role: "region", "aria-label": "Preview of " + (file.name || "file"), children: /* @__PURE__ */ jsx103(
13929
13942
  LoadingRegion,
13930
13943
  {
13931
13944
  state: preview.status === "loading" ? "loading" : preview.status === "error" ? "error" : "ready",
13932
13945
  error: preview.error,
13933
13946
  label: "Loading preview of " + (file.name || "file"),
13934
13947
  onRetry: preview.status === "error" ? preview.retry : void 0,
13935
- skeleton: /* @__PURE__ */ jsx102(Skeleton, { shape: "card", h: 220 }),
13936
- children: /* @__PURE__ */ jsx102(PreviewBody, { file, kind, state: preview })
13948
+ skeleton: /* @__PURE__ */ jsx103(Skeleton, { shape: "card", h: 220 }),
13949
+ children: /* @__PURE__ */ jsx103(PreviewBody, { file, kind, state: preview })
13937
13950
  }
13938
13951
  ) }),
13939
- hasSide ? /* @__PURE__ */ jsx102("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
13952
+ hasSide ? /* @__PURE__ */ jsx103("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
13940
13953
  ] })
13941
13954
  ]
13942
13955
  }
@@ -13945,7 +13958,7 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13945
13958
 
13946
13959
  // src/components/files/FileBrowser.tsx
13947
13960
  import * as React76 from "react";
13948
- import { Fragment as Fragment30, jsx as jsx103, jsxs as jsxs92 } from "react/jsx-runtime";
13961
+ import { Fragment as Fragment31, jsx as jsx104, jsxs as jsxs92 } from "react/jsx-runtime";
13949
13962
  function childrenOf(folders, parentId) {
13950
13963
  return folders.filter((f) => f.parentId === parentId).sort((a, b) => a.name.localeCompare(b.name));
13951
13964
  }
@@ -14018,7 +14031,7 @@ function FolderPickerMenu({
14018
14031
  const panel = useInlinePanel();
14019
14032
  const { open: open2, setOpen, ref } = panel;
14020
14033
  return /* @__PURE__ */ jsxs92("span", { className: "fd-fb-menu-anchor", ref, children: [
14021
- /* @__PURE__ */ jsx103(
14034
+ /* @__PURE__ */ jsx104(
14022
14035
  IconButton,
14023
14036
  {
14024
14037
  icon: "arrows-out-cardinal",
@@ -14030,8 +14043,8 @@ function FolderPickerMenu({
14030
14043
  onClick: () => setOpen((v) => !v)
14031
14044
  }
14032
14045
  ),
14033
- /* @__PURE__ */ jsx103(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs92("div", { className: "fd-fb-menu", children: [
14034
- /* @__PURE__ */ jsx103("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
14046
+ /* @__PURE__ */ jsx104(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs92("div", { className: "fd-fb-menu", children: [
14047
+ /* @__PURE__ */ jsx104("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
14035
14048
  destinations.map((d) => /* @__PURE__ */ jsxs92(
14036
14049
  "button",
14037
14050
  {
@@ -14044,7 +14057,7 @@ function FolderPickerMenu({
14044
14057
  setOpen(false);
14045
14058
  },
14046
14059
  children: [
14047
- /* @__PURE__ */ jsx103("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14060
+ /* @__PURE__ */ jsx104("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14048
14061
  d.name
14049
14062
  ]
14050
14063
  },
@@ -14090,15 +14103,15 @@ function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropP
14090
14103
  draggable: !!draggableId,
14091
14104
  onDragStart: draggableId ? (e) => writeDragPayload(e, draggableId) : void 0,
14092
14105
  children: [
14093
- /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + icon }) }),
14106
+ /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx104("i", { className: "ph ph-" + icon }) }),
14094
14107
  /* @__PURE__ */ jsxs92("span", { className: "fd-fb-row-text", children: [
14095
- /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-name", title: name, children: name }),
14096
- meta ? /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-meta", children: meta }) : null
14108
+ /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-name", title: name, children: name }),
14109
+ meta ? /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-meta", children: meta }) : null
14097
14110
  ] })
14098
14111
  ]
14099
14112
  }
14100
14113
  ),
14101
- actions ? /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-actions", children: actions }) : null
14114
+ actions ? /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-actions", children: actions }) : null
14102
14115
  ] });
14103
14116
  }
14104
14117
  function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveInto, canMove }) {
@@ -14109,7 +14122,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14109
14122
  }, [currentFolderId, folder.id, folders]);
14110
14123
  const isCurrent = folder.id === currentFolderId;
14111
14124
  return /* @__PURE__ */ jsxs92("div", { className: "fd-fb-tree-node", children: [
14112
- /* @__PURE__ */ jsx103(
14125
+ /* @__PURE__ */ jsx104(
14113
14126
  RowShell,
14114
14127
  {
14115
14128
  icon: folder.id === currentFolderId ? "folder-open" : "folder-simple",
@@ -14119,7 +14132,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14119
14132
  isDropTarget: canMove,
14120
14133
  onDropPayload: (payload) => onMoveInto(payload, folder.id),
14121
14134
  className: ["fd-fb-tree-row", isCurrent ? "is-current" : ""].filter(Boolean).join(" "),
14122
- actions: kids.length ? /* @__PURE__ */ jsx103(
14135
+ actions: kids.length ? /* @__PURE__ */ jsx104(
14123
14136
  IconButton,
14124
14137
  {
14125
14138
  icon: expanded ? "caret-down" : "caret-right",
@@ -14131,7 +14144,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14131
14144
  ) : void 0
14132
14145
  }
14133
14146
  ),
14134
- expanded && kids.length ? /* @__PURE__ */ jsx103("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx103(
14147
+ expanded && kids.length ? /* @__PURE__ */ jsx104("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx104(
14135
14148
  TreeNode,
14136
14149
  {
14137
14150
  folder: k,
@@ -14220,7 +14233,7 @@ function FileBrowser({
14220
14233
  const content = /* @__PURE__ */ jsxs92("div", { className: ["fd-fb", className].filter(Boolean).join(" "), children: [
14221
14234
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-head", children: [
14222
14235
  /* @__PURE__ */ jsxs92("nav", { className: "fd-fb-crumbs", "aria-label": "Folder path", children: [
14223
- /* @__PURE__ */ jsx103(
14236
+ /* @__PURE__ */ jsx104(
14224
14237
  BreadcrumbCrumb,
14225
14238
  {
14226
14239
  label: "Home",
@@ -14230,7 +14243,7 @@ function FileBrowser({
14230
14243
  onDropPayload: (p) => moveIntoFolder(p, null)
14231
14244
  }
14232
14245
  ),
14233
- crumbFolders.map((f, i) => /* @__PURE__ */ jsx103(
14246
+ crumbFolders.map((f, i) => /* @__PURE__ */ jsx104(
14234
14247
  BreadcrumbCrumb,
14235
14248
  {
14236
14249
  label: f.name,
@@ -14243,10 +14256,10 @@ function FileBrowser({
14243
14256
  ))
14244
14257
  ] }),
14245
14258
  /* @__PURE__ */ jsxs92("span", { className: "fd-fb-actions", children: [
14246
- canCreateFolder ? /* @__PURE__ */ jsx103(Button, { variant: "secondary", size: "sm", icon: "folder-simple-plus", onClick: openCreate, children: "New folder" }) : null,
14247
- canUpload ? /* @__PURE__ */ jsxs92(Fragment30, { children: [
14248
- /* @__PURE__ */ jsx103(Button, { variant: "secondary", size: "sm", icon: "upload-simple", onClick: () => uploadInputRef.current && uploadInputRef.current.click(), children: "Upload" }),
14249
- /* @__PURE__ */ jsx103(
14259
+ canCreateFolder ? /* @__PURE__ */ jsx104(Button, { variant: "secondary", size: "sm", icon: "folder-simple-plus", onClick: openCreate, children: "New folder" }) : null,
14260
+ canUpload ? /* @__PURE__ */ jsxs92(Fragment31, { children: [
14261
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", size: "sm", icon: "upload-simple", onClick: () => uploadInputRef.current && uploadInputRef.current.click(), children: "Upload" }),
14262
+ /* @__PURE__ */ jsx104(
14250
14263
  "input",
14251
14264
  {
14252
14265
  ref: uploadInputRef,
@@ -14266,7 +14279,7 @@ function FileBrowser({
14266
14279
  ] }),
14267
14280
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-body", children: [
14268
14281
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-tree", role: "region", "aria-label": "Folder tree", children: [
14269
- /* @__PURE__ */ jsx103(
14282
+ /* @__PURE__ */ jsx104(
14270
14283
  RowShell,
14271
14284
  {
14272
14285
  icon: "house-simple",
@@ -14277,7 +14290,7 @@ function FileBrowser({
14277
14290
  className: ["fd-fb-tree-row", currentFolderId == null ? "is-current" : ""].filter(Boolean).join(" ")
14278
14291
  }
14279
14292
  ),
14280
- childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx103(
14293
+ childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx104(
14281
14294
  TreeNode,
14282
14295
  {
14283
14296
  folder: f,
@@ -14291,18 +14304,18 @@ function FileBrowser({
14291
14304
  f.id
14292
14305
  ))
14293
14306
  ] }),
14294
- /* @__PURE__ */ jsx103("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx103(
14307
+ /* @__PURE__ */ jsx104("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx104(
14295
14308
  LoadingRegion,
14296
14309
  {
14297
14310
  state: loading ? "loading" : "ready",
14298
14311
  label: "Loading folder contents",
14299
14312
  skeleton: /* @__PURE__ */ jsxs92("div", { className: "fd-stack", style: { gap: 8, padding: 12 }, children: [
14300
- /* @__PURE__ */ jsx103(Skeleton, { h: 44, radius: "10px" }),
14301
- /* @__PURE__ */ jsx103(Skeleton, { h: 44, radius: "10px" }),
14302
- /* @__PURE__ */ jsx103(Skeleton, { h: 44, radius: "10px" })
14313
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" }),
14314
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" }),
14315
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" })
14303
14316
  ] }),
14304
- children: isEmpty ? /* @__PURE__ */ jsx103(EmptyState, { icon: "folder-open", title: "This folder is empty", children: canUpload ? "Drop files here, or use Upload above." : "Nothing has been filed here yet." }) : /* @__PURE__ */ jsxs92("div", { className: "fd-fb-list", children: [
14305
- subfolders.map((f) => /* @__PURE__ */ jsx103(
14317
+ children: isEmpty ? /* @__PURE__ */ jsx104(EmptyState, { icon: "folder-open", title: "This folder is empty", children: canUpload ? "Drop files here, or use Upload above." : "Nothing has been filed here yet." }) : /* @__PURE__ */ jsxs92("div", { className: "fd-fb-list", children: [
14318
+ subfolders.map((f) => /* @__PURE__ */ jsx104(
14306
14319
  RowShell,
14307
14320
  {
14308
14321
  icon: "folder-simple",
@@ -14311,9 +14324,9 @@ function FileBrowser({
14311
14324
  draggableId: canMove ? { kind: "folder", id: f.id } : void 0,
14312
14325
  isDropTarget: canMove,
14313
14326
  onDropPayload: (p) => moveIntoFolder(p, f.id),
14314
- actions: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14315
- canRenameFolder ? /* @__PURE__ */ jsx103(IconButton, { icon: "pencil-simple", label: "Rename " + f.name, size: "sm", variant: "ghost", onClick: () => openRename(f) }) : null,
14316
- canMove ? /* @__PURE__ */ jsx103(
14327
+ actions: /* @__PURE__ */ jsxs92(Fragment31, { children: [
14328
+ canRenameFolder ? /* @__PURE__ */ jsx104(IconButton, { icon: "pencil-simple", label: "Rename " + f.name, size: "sm", variant: "ghost", onClick: () => openRename(f) }) : null,
14329
+ canMove ? /* @__PURE__ */ jsx104(
14317
14330
  FolderPickerMenu,
14318
14331
  {
14319
14332
  label: "Move " + f.name,
@@ -14321,12 +14334,12 @@ function FileBrowser({
14321
14334
  onPick: (target) => moveIntoFolder({ kind: "folder", id: f.id }, target)
14322
14335
  }
14323
14336
  ) : null,
14324
- canDeleteFolder ? /* @__PURE__ */ jsx103(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14337
+ canDeleteFolder ? /* @__PURE__ */ jsx104(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14325
14338
  ] })
14326
14339
  },
14327
14340
  f.id
14328
14341
  )),
14329
- currentFiles.map((file) => /* @__PURE__ */ jsx103(
14342
+ currentFiles.map((file) => /* @__PURE__ */ jsx104(
14330
14343
  RowShell,
14331
14344
  {
14332
14345
  icon: iconForMime(file.mime, file.name),
@@ -14334,8 +14347,8 @@ function FileBrowser({
14334
14347
  meta: file.size ? formatBytes(file.size) : void 0,
14335
14348
  onOpen: onOpenFile ? () => onOpenFile(file) : void 0,
14336
14349
  draggableId: canMove ? { kind: "file", id: file.id } : void 0,
14337
- actions: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14338
- canMove ? /* @__PURE__ */ jsx103(
14350
+ actions: /* @__PURE__ */ jsxs92(Fragment31, { children: [
14351
+ canMove ? /* @__PURE__ */ jsx104(
14339
14352
  FolderPickerMenu,
14340
14353
  {
14341
14354
  label: "Move " + file.name,
@@ -14343,7 +14356,7 @@ function FileBrowser({
14343
14356
  onPick: (target) => onMoveFile && onMoveFile(file.id, target)
14344
14357
  }
14345
14358
  ) : null,
14346
- canRemoveFile ? /* @__PURE__ */ jsx103(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14359
+ canRemoveFile ? /* @__PURE__ */ jsx104(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14347
14360
  ] })
14348
14361
  },
14349
14362
  file.id
@@ -14352,10 +14365,10 @@ function FileBrowser({
14352
14365
  }
14353
14366
  ) })
14354
14367
  ] }),
14355
- /* @__PURE__ */ jsx103(Modal, { open: createOpen, title: "New folder", onClose: () => setCreateOpen(false), footer: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14356
- /* @__PURE__ */ jsx103(Button, { variant: "secondary", onClick: () => setCreateOpen(false), children: "Cancel" }),
14357
- /* @__PURE__ */ jsx103(Button, { onClick: submitCreate, disabled: !createName.trim(), children: "Create" })
14358
- ] }), children: /* @__PURE__ */ jsx103(
14368
+ /* @__PURE__ */ jsx104(Modal, { open: createOpen, title: "New folder", onClose: () => setCreateOpen(false), footer: /* @__PURE__ */ jsxs92(Fragment31, { children: [
14369
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setCreateOpen(false), children: "Cancel" }),
14370
+ /* @__PURE__ */ jsx104(Button, { onClick: submitCreate, disabled: !createName.trim(), children: "Create" })
14371
+ ] }), children: /* @__PURE__ */ jsx104(
14359
14372
  "input",
14360
14373
  {
14361
14374
  className: "fd-fb-input",
@@ -14369,10 +14382,10 @@ function FileBrowser({
14369
14382
  autoFocus: true
14370
14383
  }
14371
14384
  ) }),
14372
- /* @__PURE__ */ jsx103(Modal, { open: renameTarget != null, title: "Rename folder", onClose: () => setRenameTarget(null), footer: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14373
- /* @__PURE__ */ jsx103(Button, { variant: "secondary", onClick: () => setRenameTarget(null), children: "Cancel" }),
14374
- /* @__PURE__ */ jsx103(Button, { onClick: submitRename, disabled: !renameValue.trim(), children: "Save" })
14375
- ] }), children: /* @__PURE__ */ jsx103(
14385
+ /* @__PURE__ */ jsx104(Modal, { open: renameTarget != null, title: "Rename folder", onClose: () => setRenameTarget(null), footer: /* @__PURE__ */ jsxs92(Fragment31, { children: [
14386
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setRenameTarget(null), children: "Cancel" }),
14387
+ /* @__PURE__ */ jsx104(Button, { onClick: submitRename, disabled: !renameValue.trim(), children: "Save" })
14388
+ ] }), children: /* @__PURE__ */ jsx104(
14376
14389
  "input",
14377
14390
  {
14378
14391
  className: "fd-fb-input",
@@ -14386,22 +14399,22 @@ function FileBrowser({
14386
14399
  autoFocus: true
14387
14400
  }
14388
14401
  ) }),
14389
- /* @__PURE__ */ jsx103(
14402
+ /* @__PURE__ */ jsx104(
14390
14403
  Modal,
14391
14404
  {
14392
14405
  open: deleteTarget != null,
14393
14406
  title: deleteTarget ? "Delete \u201C" + deleteTarget.name + "\u201D?" : "Delete folder?",
14394
14407
  description: "This can't be undone. The folder must be empty.",
14395
14408
  onClose: () => setDeleteTarget(null),
14396
- footer: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14397
- /* @__PURE__ */ jsx103(Button, { variant: "secondary", onClick: () => setDeleteTarget(null), children: "Cancel" }),
14398
- /* @__PURE__ */ jsx103(Button, { variant: "danger", onClick: confirmDelete, children: "Delete" })
14409
+ footer: /* @__PURE__ */ jsxs92(Fragment31, { children: [
14410
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setDeleteTarget(null), children: "Cancel" }),
14411
+ /* @__PURE__ */ jsx104(Button, { variant: "danger", onClick: confirmDelete, children: "Delete" })
14399
14412
  ] })
14400
14413
  }
14401
14414
  )
14402
14415
  ] });
14403
14416
  if (!canUpload) return content;
14404
- return /* @__PURE__ */ jsx103(Dropzone, { className: "fd-fb-dropzone", onFiles: (picked) => onUpload && onUpload(picked, currentFolderId), label: "Drop files to upload", children: content });
14417
+ return /* @__PURE__ */ jsx104(Dropzone, { className: "fd-fb-dropzone", onFiles: (picked) => onUpload && onUpload(picked, currentFolderId), label: "Drop files to upload", children: content });
14405
14418
  }
14406
14419
  function BreadcrumbCrumb({
14407
14420
  label,
@@ -14436,7 +14449,7 @@ function BreadcrumbCrumb({
14436
14449
  if (payload && onDropPayload) onDropPayload(payload);
14437
14450
  }
14438
14451
  } : {};
14439
- return /* @__PURE__ */ jsx103("span", { className: ["fd-fb-crumb", over ? "is-drop-target" : ""].filter(Boolean).join(" "), ...dropHandlers, children: isCurrent ? /* @__PURE__ */ jsx103("span", { className: "fd-fb-crumb-current", "aria-current": "page", children: label }) : /* @__PURE__ */ jsx103("button", { type: "button", className: "fd-fb-crumb-link", onClick, children: label }) });
14452
+ return /* @__PURE__ */ jsx104("span", { className: ["fd-fb-crumb", over ? "is-drop-target" : ""].filter(Boolean).join(" "), ...dropHandlers, children: isCurrent ? /* @__PURE__ */ jsx104("span", { className: "fd-fb-crumb-current", "aria-current": "page", children: label }) : /* @__PURE__ */ jsx104("button", { type: "button", className: "fd-fb-crumb-link", onClick, children: label }) });
14440
14453
  }
14441
14454
 
14442
14455
  // src/kits/query.ts
@@ -15146,6 +15159,7 @@ export {
15146
15159
  SortMenu,
15147
15160
  Spinner,
15148
15161
  StackedLayerProvider,
15162
+ StatGrid,
15149
15163
  StatTile,
15150
15164
  StepList,
15151
15165
  SurroundSound,