@flytedan/flytebot-design-system 0.64.0 → 0.65.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,8 +4808,14 @@ 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 { 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.]+/);
@@ -4821,16 +4827,16 @@ function StatTile({ label, value, sub, delta, invert = false, loading = false, c
4821
4827
  const isGood = invert ? isDecrease : !isDecrease;
4822
4828
  const deltaToneClass = isZero ? "fd-stat-delta-neutral" : isGood ? "fd-stat-delta-up" : "fd-stat-delta-down";
4823
4829
  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
+ 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: [
4831
+ /* @__PURE__ */ jsx52("span", { className: "fd-stat-figure", children: value }),
4826
4832
  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" }),
4833
+ /* @__PURE__ */ jsx52("i", { className: "ph ph-" + (isZero ? "minus" : "arrow-" + (isDecrease ? "down" : "up") + "-right"), "aria-hidden": "true" }),
4828
4834
  " ",
4829
4835
  delta
4830
4836
  ] }) : null
4831
4837
  ] }),
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 })
4838
+ !loading && sub ? /* @__PURE__ */ jsx52("span", { className: "fd-stat-sub", children: sub }) : null,
4839
+ 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
4840
  ] });
4835
4841
  }
4836
4842
 
@@ -4891,7 +4897,7 @@ function useCopyToClipboard() {
4891
4897
  }
4892
4898
 
4893
4899
  // src/components/data/CodeBlock.tsx
4894
- import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
4900
+ import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
4895
4901
  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
4902
  var RULES = {
4897
4903
  js: [
@@ -5047,7 +5053,7 @@ function tokenize(src, lang) {
5047
5053
  }
5048
5054
  function Highlighted({ code, lang }) {
5049
5055
  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) });
5056
+ return /* @__PURE__ */ jsx53(Fragment8, { children: toks.map((tk, i) => tk.c ? /* @__PURE__ */ jsx53("span", { className: "tok-" + tk.c, children: tk.t }, i) : tk.t) });
5051
5057
  }
5052
5058
  function CodeBlock({
5053
5059
  code = "",
@@ -5069,22 +5075,22 @@ function CodeBlock({
5069
5075
  const shown = foldable && !open2 ? lines.slice(0, collapseAfter).join("\n") : body;
5070
5076
  return /* @__PURE__ */ jsxs43("div", { className: ["fd-code", wrap ? "is-wrap" : "", className].filter(Boolean).join(" "), children: [
5071
5077
  /* @__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" }),
5078
+ filename ? /* @__PURE__ */ jsx53("span", { className: "fd-code-file", children: filename }) : null,
5079
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-lang", children: languageLabel(language) }),
5080
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-spacer" }),
5075
5081
  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" }) }),
5082
+ /* @__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
5083
  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" })
5084
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5085
+ /* @__PURE__ */ jsx53("span", { children: copied ? "Copied" : "Copy" })
5080
5086
  ] }) : null
5081
5087
  ] }),
5082
5088
  /* @__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 }) }) })
5089
+ lineNumbers2 ? /* @__PURE__ */ jsx53("pre", { className: "fd-code-gutter", "aria-hidden": "true", children: shown.split("\n").map((_, i) => i + 1 + "\n").join("") }) : null,
5090
+ /* @__PURE__ */ jsx53("pre", { className: "fd-code-pre", tabIndex: 0, children: /* @__PURE__ */ jsx53("code", { children: /* @__PURE__ */ jsx53(Highlighted, { code: shown, lang: language }) }) })
5085
5091
  ] }),
5086
5092
  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" }),
5093
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5088
5094
  open2 ? "Collapse" : "Show all " + lines.length + " lines"
5089
5095
  ] }) : null
5090
5096
  ] });
@@ -5106,8 +5112,8 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5106
5112
  const rows = foldable && !open2 ? all.slice(0, collapseAfter) : all;
5107
5113
  return /* @__PURE__ */ jsxs43("div", { className: ["fd-code", "fd-diff", className].filter(Boolean).join(" "), children: [
5108
5114
  /* @__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" }),
5115
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-git-diff fd-code-icon", "aria-hidden": "true" }),
5116
+ filename ? /* @__PURE__ */ jsx53("span", { className: "fd-code-file", children: filename }) : /* @__PURE__ */ jsx53("span", { className: "fd-code-lang", children: "Diff" }),
5111
5117
  /* @__PURE__ */ jsxs43("span", { className: "fd-diff-stat fd-tabular", children: [
5112
5118
  /* @__PURE__ */ jsxs43("span", { className: "is-add", children: [
5113
5119
  "+",
@@ -5118,18 +5124,18 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5118
5124
  dels
5119
5125
  ] })
5120
5126
  ] }),
5121
- /* @__PURE__ */ jsx52("span", { className: "fd-code-spacer" }),
5127
+ /* @__PURE__ */ jsx53("span", { className: "fd-code-spacer" }),
5122
5128
  /* @__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" })
5129
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
5130
+ /* @__PURE__ */ jsx53("span", { children: copied ? "Copied" : "Copy" })
5125
5131
  ] })
5126
5132
  ] }),
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 })
5133
+ /* @__PURE__ */ jsx53("div", { className: "fd-diff-body", children: rows.map((r, i) => /* @__PURE__ */ jsxs43("div", { className: "fd-diff-line is-" + r.k, children: [
5134
+ /* @__PURE__ */ jsx53("span", { className: "fd-diff-mark", "aria-hidden": "true", children: r.k === "add" ? "+" : r.k === "del" ? "\u2212" : "" }),
5135
+ /* @__PURE__ */ jsx53("code", { children: r.k === "add" || r.k === "del" ? r.line.slice(1) : r.line })
5130
5136
  ] }, i)) }),
5131
5137
  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" }),
5138
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" }),
5133
5139
  open2 ? "Collapse" : "Show all " + all.length + " lines"
5134
5140
  ] }) : null
5135
5141
  ] });
@@ -5137,7 +5143,7 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
5137
5143
 
5138
5144
  // src/components/data/Markdown.tsx
5139
5145
  import * as React35 from "react";
5140
- import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
5146
+ import { jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
5141
5147
  var SAFE = /^(?:https?:|mailto:|tel:|#|\/|\.{1,2}\/)/i;
5142
5148
  var safeHref = (h) => SAFE.test(String(h || "").trim()) ? String(h).trim() : null;
5143
5149
  var INLINE = [
@@ -5167,22 +5173,22 @@ function inlineNodes(src, ctx, keyBase) {
5167
5173
  const { kind, m } = best;
5168
5174
  if (m.index > 0) out.push(rest.slice(0, m.index));
5169
5175
  const g = (i) => m[i];
5170
- if (kind === "code") out.push(/* @__PURE__ */ jsx53("code", { className: "fd-md-code", children: g(1) }, key()));
5176
+ if (kind === "code") out.push(/* @__PURE__ */ jsx54("code", { className: "fd-md-code", children: g(1) }, key()));
5171
5177
  else if (kind === "image") {
5172
5178
  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()));
5179
+ 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
5180
  } else if (kind === "link") {
5175
5181
  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()));
5182
+ 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
5183
  } 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()));
5184
+ 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()));
5185
+ } else if (kind === "strongem") out.push(/* @__PURE__ */ jsx54("strong", { children: /* @__PURE__ */ jsx54("em", { children: inlineNodes(g(1), ctx, key()) }) }, key()));
5186
+ else if (kind === "strong") out.push(/* @__PURE__ */ jsx54("strong", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5187
+ else if (kind === "em") out.push(/* @__PURE__ */ jsx54("em", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
5188
+ else if (kind === "del") out.push(/* @__PURE__ */ jsx54("del", { children: inlineNodes(g(1), ctx, key()) }, key()));
5183
5189
  else if (kind === "autolink" || kind === "bare") {
5184
5190
  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));
5191
+ out.push(href ? /* @__PURE__ */ jsx54("a", { href, target: "_blank", rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: g(1).replace(/^mailto:/, "") }, key()) : g(1));
5186
5192
  }
5187
5193
  rest = rest.slice(m.index + m[0].length);
5188
5194
  }
@@ -5300,33 +5306,33 @@ function renderBlocks(blocks, ctx, path) {
5300
5306
  const k = path + "-" + i;
5301
5307
  switch (b.t) {
5302
5308
  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);
5309
+ if ((b.lang || "").toLowerCase() === "diff") return /* @__PURE__ */ jsx54(DiffBlock, { diff: b.code, filename: b.file || void 0 }, k);
5310
+ return /* @__PURE__ */ jsx54(CodeBlock, { code: b.code, language: b.lang, filename: b.file || void 0, ...ctx.codeProps || {} }, k);
5305
5311
  }
5306
5312
  case "h": {
5307
5313
  const lvl = Math.min(6, Math.max(1, b.level + (ctx.headingOffset || 0)));
5308
5314
  const Tag2 = "h" + lvl;
5309
- return /* @__PURE__ */ jsx53(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
5315
+ return /* @__PURE__ */ jsx54(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
5310
5316
  }
5311
5317
  case "hr":
5312
- return /* @__PURE__ */ jsx53("hr", { className: "fd-md-hr" }, k);
5318
+ return /* @__PURE__ */ jsx54("hr", { className: "fd-md-hr" }, k);
5313
5319
  case "quote":
5314
- return /* @__PURE__ */ jsx53("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
5320
+ return /* @__PURE__ */ jsx54("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
5315
5321
  case "list": {
5316
5322
  const Tag2 = b.ordered ? "ol" : "ul";
5317
5323
  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) })
5324
+ 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: [
5325
+ 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,
5326
+ /* @__PURE__ */ jsx54("span", { className: "fd-md-li", children: renderBlocks(it.children, ctx, k + "-" + j) })
5321
5327
  ] }, k + "-" + j)) }, k);
5322
5328
  }
5323
5329
  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)) })
5330
+ return /* @__PURE__ */ jsx54("div", { className: "fd-md-tablewrap", children: /* @__PURE__ */ jsxs44("table", { className: "fd-md-table", children: [
5331
+ /* @__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)) }) }),
5332
+ /* @__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
5333
  ] }) }, k);
5328
5334
  default:
5329
- return /* @__PURE__ */ jsx53("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
5335
+ return /* @__PURE__ */ jsx54("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
5330
5336
  }
5331
5337
  });
5332
5338
  }
@@ -5341,24 +5347,24 @@ function Markdown({
5341
5347
  }) {
5342
5348
  const ctx = { allowImages, headingOffset, renderCitation, onLinkClick, codeProps };
5343
5349
  const blocks = React35.useMemo(() => parseBlocks(source), [source]);
5344
- return /* @__PURE__ */ jsx53("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
5350
+ return /* @__PURE__ */ jsx54("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
5345
5351
  }
5346
5352
  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") });
5353
+ return /* @__PURE__ */ jsx54("span", { className: ["fd-md-inline", className].filter(Boolean).join(" "), children: inlineNodes(source, { allowImages: false, onLinkClick }, "i") });
5348
5354
  }
5349
5355
  function markdownToText(src) {
5350
5356
  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
5357
  }
5352
5358
 
5353
5359
  // src/components/data/Meter.tsx
5354
- import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
5360
+ import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
5355
5361
  function Meter({ segments = [], unallocated = 0, height = 8, label, legend = false, className = "" }) {
5356
5362
  const total = segments.reduce((s, x) => s + x.value, 0) + unallocated;
5357
5363
  const pct = (v) => total ? v / total * 100 : 0;
5358
5364
  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,
5365
+ label ? /* @__PURE__ */ jsx55("span", { className: "fd-label-lg fd-secondary", children: label }) : null,
5360
5366
  /* @__PURE__ */ jsxs45("div", { className: "fd-meterbar", style: { height }, children: [
5361
- segments.map((s, i) => /* @__PURE__ */ jsx54(
5367
+ segments.map((s, i) => /* @__PURE__ */ jsx55(
5362
5368
  "span",
5363
5369
  {
5364
5370
  className: "fd-meterbar-seg",
@@ -5367,15 +5373,15 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
5367
5373
  },
5368
5374
  i
5369
5375
  )),
5370
- unallocated > 0 ? /* @__PURE__ */ jsx54("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
5376
+ unallocated > 0 ? /* @__PURE__ */ jsx55("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
5371
5377
  ] }),
5372
5378
  legend ? /* @__PURE__ */ jsxs45("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap" }, children: [
5373
5379
  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) + ")" } }),
5380
+ /* @__PURE__ */ jsx55("span", { style: { width: 9, height: 9, borderRadius: 2, background: s.color || "var(--chart-" + (i % 8 + 1) + ")" } }),
5375
5381
  s.label
5376
5382
  ] }, i)),
5377
5383
  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 } }),
5384
+ /* @__PURE__ */ jsx55("span", { className: "fd-meterbar-unallocated", style: { width: 9, height: 9, borderRadius: 2 } }),
5379
5385
  "Unallocated"
5380
5386
  ] }) : null
5381
5387
  ] }) : null
@@ -5383,7 +5389,7 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
5383
5389
  }
5384
5390
 
5385
5391
  // src/components/data/Pagination.tsx
5386
- import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
5392
+ import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
5387
5393
  var unitPluralRules = new Intl.PluralRules("en-US");
5388
5394
  function pluralizeUnit(n, singular, irregularPlural) {
5389
5395
  return unitPluralRules.select(n) === "one" ? singular : irregularPlural ?? `${singular}s`;
@@ -5415,7 +5421,7 @@ function Pagination({
5415
5421
  else if (nums[nums.length - 1] !== "\u2026") nums.push("\u2026");
5416
5422
  }
5417
5423
  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: [
5424
+ /* @__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(Fragment10, { children: [
5419
5425
  "No ",
5420
5426
  unitLabel
5421
5427
  ] }) : /* @__PURE__ */ jsxs46(Fragment10, { children: [
@@ -5430,13 +5436,13 @@ function Pagination({
5430
5436
  unitLabel
5431
5437
  ] }) }),
5432
5438
  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)) })
5439
+ /* @__PURE__ */ jsx56("span", { children: "Rows" }),
5440
+ /* @__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
5441
  ] }) : null,
5436
5442
  /* @__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(
5443
+ /* @__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" }) }),
5444
+ /* @__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" }) }),
5445
+ nums.map((n, i) => n === "\u2026" ? /* @__PURE__ */ jsx56("span", { className: "fd-pag-gap", "aria-hidden": "true", children: "\u2026" }, "e" + i) : /* @__PURE__ */ jsx56(
5440
5446
  "button",
5441
5447
  {
5442
5448
  type: "button",
@@ -5447,8 +5453,8 @@ function Pagination({
5447
5453
  },
5448
5454
  n
5449
5455
  )),
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" }) })
5456
+ /* @__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" }) }),
5457
+ /* @__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
5458
  ] })
5453
5459
  ] });
5454
5460
  }
@@ -5525,7 +5531,7 @@ function RelativeTime({ value, prefix, className = "", refresh: refresh2 = true,
5525
5531
 
5526
5532
  // src/components/data/ScoreMeter.tsx
5527
5533
  import * as React37 from "react";
5528
- import { jsx as jsx56, jsxs as jsxs48 } from "react/jsx-runtime";
5534
+ import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
5529
5535
  function ScoreMeter({
5530
5536
  score,
5531
5537
  segments,
@@ -5543,11 +5549,11 @@ function ScoreMeter({
5543
5549
  const ref = React37.useRef(null);
5544
5550
  const value = Math.max(0, Math.min(100, Math.round(Number(score) || 0)));
5545
5551
  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
5552
+ /* @__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 }) }),
5553
+ showScore ? /* @__PURE__ */ jsx57("span", { className: "fd-scoremeter-value fd-tabular", "aria-hidden": "true", children: value }) : null
5548
5554
  ] });
5549
5555
  if (!breakdown) {
5550
- return /* @__PURE__ */ jsx56(
5556
+ return /* @__PURE__ */ jsx57(
5551
5557
  "span",
5552
5558
  {
5553
5559
  className: ["fd-scoremeter", className].filter(Boolean).join(" "),
@@ -5562,7 +5568,7 @@ function ScoreMeter({
5562
5568
  );
5563
5569
  }
5564
5570
  return /* @__PURE__ */ jsxs48(React37.Fragment, { children: [
5565
- /* @__PURE__ */ jsx56(
5571
+ /* @__PURE__ */ jsx57(
5566
5572
  "button",
5567
5573
  {
5568
5574
  type: "button",
@@ -5575,7 +5581,7 @@ function ScoreMeter({
5575
5581
  children: body
5576
5582
  }
5577
5583
  ),
5578
- /* @__PURE__ */ jsx56(
5584
+ /* @__PURE__ */ jsx57(
5579
5585
  Popover,
5580
5586
  {
5581
5587
  open: open2,
@@ -5593,14 +5599,14 @@ function ScoreMeter({
5593
5599
 
5594
5600
  // src/components/actions/inlinePanel.tsx
5595
5601
  import * as React38 from "react";
5596
- import { jsx as jsx57 } from "react/jsx-runtime";
5602
+ import { jsx as jsx58 } from "react/jsx-runtime";
5597
5603
  function useInlinePanel() {
5598
5604
  const [open2, setOpen] = React38.useState(false);
5599
5605
  const ref = React38.useRef(null);
5600
5606
  return { open: open2, setOpen, ref };
5601
5607
  }
5602
5608
  function InlinePanelSurface({ panel, align = "right", ...popover }) {
5603
- return /* @__PURE__ */ jsx57(
5609
+ return /* @__PURE__ */ jsx58(
5604
5610
  Popover,
5605
5611
  {
5606
5612
  open: panel.open,
@@ -5613,7 +5619,7 @@ function InlinePanelSurface({ panel, align = "right", ...popover }) {
5613
5619
  }
5614
5620
 
5615
5621
  // src/components/data/SortMenu.tsx
5616
- import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
5622
+ import { Fragment as Fragment12, jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
5617
5623
  var directionWord = (field, dir) => dir === "asc" ? field.numeric ? "lowest first" : "A to Z" : field.numeric ? "highest first" : "Z to A";
5618
5624
  function moved(sort, from, to) {
5619
5625
  const next = [...sort];
@@ -5643,7 +5649,7 @@ function SortMenu({
5643
5649
  const field = fieldOf(entry.key);
5644
5650
  return field.label + " " + directionWord(field, entry.dir);
5645
5651
  }).join(", then ");
5646
- const arrow = (field, dir, on, onClick) => /* @__PURE__ */ jsx58(
5652
+ const arrow = (field, dir, on, onClick) => /* @__PURE__ */ jsx59(
5647
5653
  "button",
5648
5654
  {
5649
5655
  type: "button",
@@ -5662,7 +5668,7 @@ function SortMenu({
5662
5668
  background: on ? "var(--brand)" : "var(--surface)",
5663
5669
  color: on ? "#fff" : "var(--text-muted)"
5664
5670
  },
5665
- children: /* @__PURE__ */ jsx58("i", { className: "ph ph-arrow-" + (dir === "asc" ? "up" : "down"), style: { fontSize: 13 } })
5671
+ children: /* @__PURE__ */ jsx59("i", { className: "ph ph-arrow-" + (dir === "asc" ? "up" : "down"), style: { fontSize: 13 } })
5666
5672
  }
5667
5673
  );
5668
5674
  const rowStyle = (highlight) => ({
@@ -5680,21 +5686,21 @@ function SortMenu({
5680
5686
  const singleBody = fields.map((f) => {
5681
5687
  const on = !!first && first.key === f.key;
5682
5688
  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 }),
5689
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(on), children: f.label }),
5684
5690
  arrow(f, "asc", on && first.dir === "asc", () => change([{ key: f.key, dir: "asc" }])),
5685
5691
  arrow(f, "desc", on && first.dir === "desc", () => change([{ key: f.key, dir: "desc" }]))
5686
5692
  ] }, f.key);
5687
5693
  });
5688
5694
  const unused = fields.filter((f) => !active.some((entry) => entry.key === f.key));
5689
5695
  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) => {
5696
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sorted by" }),
5697
+ 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
5698
  const f = fieldOf(entry.key);
5693
5699
  const flipped = entry.dir === "asc" ? "desc" : "asc";
5694
5700
  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(
5701
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm fd-muted", "aria-hidden": "true", style: { width: 14, flex: "none" }, children: index + 1 }),
5702
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5703
+ /* @__PURE__ */ jsx59(
5698
5704
  IconButton,
5699
5705
  {
5700
5706
  size: "sm",
@@ -5704,7 +5710,7 @@ function SortMenu({
5704
5710
  onClick: () => change(active.map((e) => e.key === entry.key ? { key: e.key, dir: flipped } : e))
5705
5711
  }
5706
5712
  ),
5707
- /* @__PURE__ */ jsx58(
5713
+ /* @__PURE__ */ jsx59(
5708
5714
  IconButton,
5709
5715
  {
5710
5716
  size: "sm",
@@ -5714,7 +5720,7 @@ function SortMenu({
5714
5720
  onClick: () => change(moved(active, index, index - 1))
5715
5721
  }
5716
5722
  ),
5717
- /* @__PURE__ */ jsx58(
5723
+ /* @__PURE__ */ jsx59(
5718
5724
  IconButton,
5719
5725
  {
5720
5726
  size: "sm",
@@ -5724,7 +5730,7 @@ function SortMenu({
5724
5730
  onClick: () => change(moved(active, index, index + 1))
5725
5731
  }
5726
5732
  ),
5727
- /* @__PURE__ */ jsx58(
5733
+ /* @__PURE__ */ jsx59(
5728
5734
  IconButton,
5729
5735
  {
5730
5736
  size: "sm",
@@ -5736,9 +5742,9 @@ function SortMenu({
5736
5742
  ] }, entry.key);
5737
5743
  }) }),
5738
5744
  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" }),
5745
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "10px 8px 6px" }, children: "Add a sort" }),
5740
5746
  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 }),
5747
+ /* @__PURE__ */ jsx59("span", { className: "fd-body-sm", style: labelStyle(false), children: f.label }),
5742
5748
  arrow(f, "asc", false, () => change([...active, { key: f.key, dir: "asc" }])),
5743
5749
  arrow(f, "desc", false, () => change([...active, { key: f.key, dir: "desc" }]))
5744
5750
  ] }, f.key))
@@ -5755,12 +5761,12 @@ function SortMenu({
5755
5761
  onClick: () => setOpen(!open2),
5756
5762
  children: [
5757
5763
  triggerLabel,
5758
- /* @__PURE__ */ jsx58("i", { className: "ph ph-" + (first && first.dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
5764
+ /* @__PURE__ */ jsx59("i", { className: "ph ph-" + (first && first.dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
5759
5765
  ]
5760
5766
  }
5761
5767
  ),
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" }),
5768
+ /* @__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(Fragment12, { children: [
5769
+ /* @__PURE__ */ jsx59("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
5764
5770
  singleBody
5765
5771
  ] }) }) })
5766
5772
  ] });
@@ -5768,7 +5774,7 @@ function SortMenu({
5768
5774
 
5769
5775
  // src/components/data/StepList.tsx
5770
5776
  import * as React39 from "react";
5771
- import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
5777
+ import { jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
5772
5778
  var KIND_ICON = { tool: "wrench", search: "magnifying-glass", read: "file-text", write: "pencil-simple", reasoning: "brain", run: "terminal", fetch: "cloud-arrow-down" };
5773
5779
  function StepList({
5774
5780
  steps = [],
@@ -5796,8 +5802,8 @@ function StepList({
5796
5802
  };
5797
5803
  return /* @__PURE__ */ jsxs50("div", { className: ["fd-steps", dense ? "is-dense" : "", open2 ? "is-open" : "", className].filter(Boolean).join(" "), children: [
5798
5804
  /* @__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 }),
5805
+ 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" }),
5806
+ /* @__PURE__ */ jsx60("span", { className: "fd-steps-title", title: truncationTitle(summary), children: summary }),
5801
5807
  /* @__PURE__ */ jsxs50("span", { className: "fd-steps-count fd-tabular", children: [
5802
5808
  steps.length,
5803
5809
  " step",
@@ -5808,15 +5814,15 @@ function StepList({
5808
5814
  " failed"
5809
5815
  ] }) : null
5810
5816
  ] }),
5811
- /* @__PURE__ */ jsx59("i", { className: "ph ph-caret-" + (open2 ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
5817
+ /* @__PURE__ */ jsx60("i", { className: "ph ph-caret-" + (open2 ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
5812
5818
  ] }),
5813
- open2 ? /* @__PURE__ */ jsx59("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
5819
+ open2 ? /* @__PURE__ */ jsx60("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
5814
5820
  const id = s.id || i;
5815
5821
  const isOpen = !!expanded[id];
5816
5822
  const icon = KIND_ICON[s.kind || ""] || "dot-outline";
5817
5823
  return /* @__PURE__ */ jsxs50("li", { className: "fd-step is-" + (s.status || "ok"), children: [
5818
5824
  /* @__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 }) }),
5825
+ /* @__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
5826
  s.detail ? /* @__PURE__ */ jsxs50(
5821
5827
  "button",
5822
5828
  {
@@ -5825,15 +5831,15 @@ function StepList({
5825
5831
  "aria-expanded": isOpen,
5826
5832
  onClick: () => setExpanded((m) => Object.assign({}, m, { [id]: !isOpen })),
5827
5833
  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" })
5834
+ /* @__PURE__ */ jsx60("span", { title: truncationTitle(s.label), children: s.label }),
5835
+ /* @__PURE__ */ jsx60("i", { className: "ph ph-caret-" + (isOpen ? "up" : "down"), "aria-hidden": "true" })
5830
5836
  ]
5831
5837
  }
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
5838
+ ) : /* @__PURE__ */ jsx60("span", { className: "fd-step-label is-static", title: truncationTitle(s.label), children: s.label }),
5839
+ s.status === "error" ? /* @__PURE__ */ jsx60("span", { className: "fd-step-badge is-error", children: "failed" }) : null,
5840
+ showDurations && s.durationMs ? /* @__PURE__ */ jsx60("span", { className: "fd-step-dur fd-tabular", children: formatDuration(s.durationMs) }) : null
5835
5841
  ] }),
5836
- s.detail && isOpen ? /* @__PURE__ */ jsx59("pre", { className: "fd-step-detail", children: s.detail }) : null
5842
+ s.detail && isOpen ? /* @__PURE__ */ jsx60("pre", { className: "fd-step-detail", children: s.detail }) : null
5837
5843
  ] }, id);
5838
5844
  }) }) : null
5839
5845
  ] });
@@ -5841,7 +5847,7 @@ function StepList({
5841
5847
 
5842
5848
  // src/components/data/VirtualList.tsx
5843
5849
  import * as React40 from "react";
5844
- import { jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
5850
+ import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
5845
5851
  var VIRTUAL_LIST_BUFFER_ROWS = 20;
5846
5852
  var VIRTUAL_LIST_ROW_GAP = 6;
5847
5853
  function computeVirtualWindow(opts) {
@@ -5935,7 +5941,7 @@ function VirtualList({
5935
5941
  }, [items]);
5936
5942
  const gapStyle = { "--fd-vlist-gap": rowGap + "px" };
5937
5943
  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 }) });
5944
+ 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
5945
  }
5940
5946
  const rows = [];
5941
5947
  for (let i = win.startIndex; i <= win.endIndex; i++) {
@@ -5943,12 +5949,12 @@ function VirtualList({
5943
5949
  if (item === void 0) continue;
5944
5950
  const key = keyOf(item);
5945
5951
  rows.push(
5946
- /* @__PURE__ */ jsx60(
5952
+ /* @__PURE__ */ jsx61(
5947
5953
  "div",
5948
5954
  {
5949
5955
  className: "fd-vlist-row",
5950
5956
  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) })
5957
+ 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
5958
  },
5953
5959
  key
5954
5960
  )
@@ -5962,21 +5968,21 @@ function VirtualList({
5962
5968
  style: { height: "100%", overflowY: "auto", overflowX: "hidden", position: "relative" },
5963
5969
  onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
5964
5970
  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
5971
+ /* @__PURE__ */ jsx61("div", { style: { height: win.totalHeight, position: "relative" }, children: rows }),
5972
+ 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
5973
  ]
5968
5974
  }
5969
5975
  ),
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 })
5976
+ refreshing ? /* @__PURE__ */ jsx61("div", { className: "fd-vlist-refresh-scrim", children: /* @__PURE__ */ jsxs51("div", { className: "fd-vlist-refresh-card", children: [
5977
+ /* @__PURE__ */ jsx61("span", { className: "fd-spinner", "aria-hidden": "true" }),
5978
+ /* @__PURE__ */ jsx61("span", { className: "fd-body-sm", children: refreshingLabel })
5973
5979
  ] }) }) : null
5974
5980
  ] });
5975
5981
  }
5976
5982
 
5977
5983
  // src/components/data/EntityRow.tsx
5978
5984
  import * as React41 from "react";
5979
- import { jsx as jsx61, jsxs as jsxs52 } from "react/jsx-runtime";
5985
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
5980
5986
  var ENTITY_ROW_METRIC_WIDTH = 74;
5981
5987
  var METRIC_TONE_COLOR = {
5982
5988
  default: "var(--text-2)",
@@ -5984,16 +5990,16 @@ var METRIC_TONE_COLOR = {
5984
5990
  danger: "var(--danger-text)"
5985
5991
  };
5986
5992
  function EntityRowMetrics({ metrics, className = "", style }) {
5987
- return /* @__PURE__ */ jsx61("span", { className: ["fd-erow-metrics", className].filter(Boolean).join(" "), style, children: metrics.map((m, i) => {
5993
+ return /* @__PURE__ */ jsx62("span", { className: ["fd-erow-metrics", className].filter(Boolean).join(" "), style, children: metrics.map((m, i) => {
5988
5994
  const key = m.id || m.label || i;
5989
5995
  const className2 = ["fd-erow-metric", m.tone && m.tone !== "default" ? "is-" + m.tone : "", m.tooltip != null ? "is-described" : ""].filter(Boolean).join(" ");
5990
5996
  const tone = { color: METRIC_TONE_COLOR[m.tone || "default"] };
5991
5997
  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 })
5998
+ m.icon ? /* @__PURE__ */ jsx62("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }) : null,
5999
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-metric-value fd-tabular", children: m.value }),
6000
+ /* @__PURE__ */ jsx62("span", { className: "fd-sr", children: " " + m.label })
5995
6001
  ] });
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);
6002
+ 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
6003
  }) });
5998
6004
  }
5999
6005
  function EntityRow({
@@ -6036,33 +6042,33 @@ function EntityRow({
6036
6042
  // font-size moved to the .fd-erow-grip stylesheet rule, same reason as the
6037
6043
  // row's own padding above: .fd-tlist-footer's indent reads it back as
6038
6044
  // --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)" } })
6045
+ /* @__PURE__ */ jsx62("i", { className: "ph ph-dots-six-vertical fd-erow-grip", "aria-hidden": "true", style: { flex: "none", color: "var(--text-muted)" } })
6040
6046
  ) : null,
6041
6047
  /* @__PURE__ */ jsxs52("span", { className: "fd-erow-body", children: [
6042
6048
  /* @__PURE__ */ jsxs52("span", { className: "fd-erow-titleline", children: [
6043
- titleIcon ? /* @__PURE__ */ jsx61(Tooltip, { label: titleIcon.tooltip, children: /* @__PURE__ */ jsxs52(
6049
+ titleIcon ? /* @__PURE__ */ jsx62(Tooltip, { label: titleIcon.tooltip, children: /* @__PURE__ */ jsxs52(
6044
6050
  "button",
6045
6051
  {
6046
6052
  type: "button",
6047
6053
  className: ["fd-erow-title-icon", titleIcon.tone ? "is-" + titleIcon.tone : ""].filter(Boolean).join(" "),
6048
6054
  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 })
6055
+ /* @__PURE__ */ jsx62("i", { className: "ph ph-" + titleIcon.icon, "aria-hidden": "true" }),
6056
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-title fd-body-sm", children: title })
6051
6057
  ]
6052
6058
  }
6053
6059
  ) }) : (
6054
6060
  // MP-141: dense-row identifier, no Tooltip wrapper in this branch — a native
6055
6061
  // `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 })
6062
+ /* @__PURE__ */ jsx62("span", { className: "fd-erow-title fd-body-sm", title: truncationTitle(title), children: title })
6057
6063
  ),
6058
- meta ? /* @__PURE__ */ jsx61("span", { className: "fd-erow-meta", title: truncationTitle(meta), children: meta }) : null
6064
+ meta ? /* @__PURE__ */ jsx62("span", { className: "fd-erow-meta", title: truncationTitle(meta), children: meta }) : null
6059
6065
  ] }),
6060
6066
  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
6067
+ metrics && metrics.length ? /* @__PURE__ */ jsx62(EntityRowMetrics, { metrics }) : null,
6068
+ accessory ? /* @__PURE__ */ jsx62("span", { className: "fd-erow-accessory", children: accessory }) : null
6063
6069
  ] }) : null
6064
6070
  ] }),
6065
- action ? /* @__PURE__ */ jsx61(
6071
+ action ? /* @__PURE__ */ jsx62(
6066
6072
  IconButton,
6067
6073
  {
6068
6074
  icon: action.icon,
@@ -6084,7 +6090,7 @@ import * as React42 from "react";
6084
6090
  import { createPortal as createPortal5 } from "react-dom";
6085
6091
 
6086
6092
  // src/components/forms/Input.tsx
6087
- import { jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
6093
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
6088
6094
  function Input({
6089
6095
  label,
6090
6096
  help,
@@ -6112,23 +6118,23 @@ function Input({
6112
6118
  size === "lg" ? "fd-input-lg" : ""
6113
6119
  ].filter(Boolean).join(" ");
6114
6120
  return /* @__PURE__ */ jsxs53("div", { className: ["fd-field", className].filter(Boolean).join(" "), style, children: [
6115
- label ? /* @__PURE__ */ jsx62(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
6121
+ label ? /* @__PURE__ */ jsx63(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
6116
6122
  /* @__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
6123
+ icon ? /* @__PURE__ */ jsx63("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
6124
+ prefix ? /* @__PURE__ */ jsx63("span", { className: "fd-input-affix", children: prefix }) : null,
6125
+ /* @__PURE__ */ jsx63("input", { id: fieldId, disabled, style: inputStyle, "aria-invalid": error ? "true" : void 0, ...rest }),
6126
+ loading ? /* @__PURE__ */ jsx63("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading" }) : null,
6127
+ suffix && !loading ? /* @__PURE__ */ jsx63("span", { className: "fd-input-affix", children: suffix }) : null
6122
6128
  ] }),
6123
6129
  error ? /* @__PURE__ */ jsxs53("span", { className: "fd-field-error", children: [
6124
- /* @__PURE__ */ jsx62("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6130
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6125
6131
  error
6126
- ] }) : help ? /* @__PURE__ */ jsx62("span", { className: "fd-field-help", children: help }) : null
6132
+ ] }) : help ? /* @__PURE__ */ jsx63("span", { className: "fd-field-help", children: help }) : null
6127
6133
  ] });
6128
6134
  }
6129
6135
 
6130
6136
  // src/components/forms/SearchField.tsx
6131
- import { jsx as jsx63 } from "react/jsx-runtime";
6137
+ import { jsx as jsx64 } from "react/jsx-runtime";
6132
6138
  function SearchField({
6133
6139
  value,
6134
6140
  onChange,
@@ -6143,7 +6149,7 @@ function SearchField({
6143
6149
  ...rest
6144
6150
  }) {
6145
6151
  const clear = onClear || (() => onChange(""));
6146
- return /* @__PURE__ */ jsx63(
6152
+ return /* @__PURE__ */ jsx64(
6147
6153
  Input,
6148
6154
  {
6149
6155
  id,
@@ -6156,14 +6162,14 @@ function SearchField({
6156
6162
  style,
6157
6163
  className,
6158
6164
  onChange: (e) => onChange(e.target.value),
6159
- suffix: value ? /* @__PURE__ */ jsx63(
6165
+ suffix: value ? /* @__PURE__ */ jsx64(
6160
6166
  "button",
6161
6167
  {
6162
6168
  type: "button",
6163
6169
  "aria-label": "Clear search",
6164
6170
  onClick: clear,
6165
6171
  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" })
6172
+ children: /* @__PURE__ */ jsx64("i", { className: "ph ph-x-circle", style: { fontSize: 15 }, "aria-hidden": "true" })
6167
6173
  }
6168
6174
  ) : void 0,
6169
6175
  ...rest
@@ -6172,7 +6178,7 @@ function SearchField({
6172
6178
  }
6173
6179
 
6174
6180
  // src/components/data/TransferList.tsx
6175
- import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
6181
+ import { jsx as jsx65, jsxs as jsxs54 } from "react/jsx-runtime";
6176
6182
  var emptyHasMore = {};
6177
6183
  var DRAG_THRESHOLD_PX = 5;
6178
6184
  function TransferList({
@@ -6297,12 +6303,12 @@ function TransferList({
6297
6303
  cfg.label,
6298
6304
  cfg.total != null ? " (" + cfg.total.toLocaleString() + ")" : ""
6299
6305
  ] }) : null,
6300
- cfg.header ? /* @__PURE__ */ jsx64("div", { className: "fd-tlist-header", children: cfg.header }) : null,
6306
+ cfg.header ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-header", children: cfg.header }) : null,
6301
6307
  /* @__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" })
6308
+ /* @__PURE__ */ jsx65(SearchField, { value: cfg.search, onChange: cfg.onSearchChange, placeholder: "Search", "aria-label": (cfg.label || side) + " search", style: { flex: 1 } }),
6309
+ /* @__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
6310
  ] }),
6305
- /* @__PURE__ */ jsx64(
6311
+ /* @__PURE__ */ jsx65(
6306
6312
  VirtualList,
6307
6313
  {
6308
6314
  items: cfg.items,
@@ -6316,15 +6322,15 @@ function TransferList({
6316
6322
  firstItemIndex: cfg.firstItemIndex,
6317
6323
  totalCount: cfg.totalCount,
6318
6324
  onNeedMore: cfg.onNeedMore,
6319
- emptyState: /* @__PURE__ */ jsx64(EmptyState, { icon: "tray", title: "Nothing here" }),
6325
+ emptyState: /* @__PURE__ */ jsx65(EmptyState, { icon: "tray", title: "Nothing here" }),
6320
6326
  renderItem: (item) => {
6321
6327
  const isBeingDragged = drag != null && drag.from === side && drag.key === keyOf(item);
6322
6328
  if (isBeingDragged) {
6323
- return /* @__PURE__ */ jsx64("div", { className: "fd-erow-placeholder", "aria-hidden": "true" });
6329
+ return /* @__PURE__ */ jsx65("div", { className: "fd-erow-placeholder", "aria-hidden": "true" });
6324
6330
  }
6325
6331
  const content = renderRow(item);
6326
6332
  const destination = (side === "left" ? right : left).label || "the other list";
6327
- return /* @__PURE__ */ jsx64(
6333
+ return /* @__PURE__ */ jsx65(
6328
6334
  EntityRow,
6329
6335
  {
6330
6336
  ...content,
@@ -6344,10 +6350,10 @@ function TransferList({
6344
6350
  }
6345
6351
  }
6346
6352
  ),
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 : "") })
6353
+ cfg.footer ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-footer", children: cfg.footer }) : null,
6354
+ showOverlay ? /* @__PURE__ */ jsx65("div", { className: "fd-tlist-drop-overlay", "aria-hidden": "true", children: /* @__PURE__ */ jsxs54("span", { className: "fd-tlist-drop-card", children: [
6355
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-tray-arrow-down", style: { fontSize: 18 }, "aria-hidden": "true" }),
6356
+ /* @__PURE__ */ jsx65("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: cfg.dropLabel || "Drop here" + (cfg.label ? " \u2014 " + cfg.label : "") })
6351
6357
  ] }) }) : null
6352
6358
  ]
6353
6359
  }
@@ -6359,7 +6365,7 @@ function TransferList({
6359
6365
  renderSide("right", right, "left")
6360
6366
  ] }),
6361
6367
  drag ? createPortal5(
6362
- /* @__PURE__ */ jsx64(
6368
+ /* @__PURE__ */ jsx65(
6363
6369
  "div",
6364
6370
  {
6365
6371
  "aria-hidden": "true",
@@ -6374,7 +6380,7 @@ function TransferList({
6374
6380
  pointerEvents: "none",
6375
6381
  zIndex: OVERLAY_CEILING
6376
6382
  },
6377
- children: /* @__PURE__ */ jsx64(EntityRow, { ...renderRow(drag.item), draggable: true, className: "fd-erow-dragging" })
6383
+ children: /* @__PURE__ */ jsx65(EntityRow, { ...renderRow(drag.item), draggable: true, className: "fd-erow-dragging" })
6378
6384
  }
6379
6385
  ),
6380
6386
  document.body
@@ -6383,11 +6389,11 @@ function TransferList({
6383
6389
  }
6384
6390
 
6385
6391
  // src/components/data/FactList.tsx
6386
- import { jsx as jsx65, jsxs as jsxs55 } from "react/jsx-runtime";
6392
+ import { jsx as jsx66, jsxs as jsxs55 } from "react/jsx-runtime";
6387
6393
  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 })
6394
+ 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: [
6395
+ /* @__PURE__ */ jsx66("dt", { className: "fd-fact-label", children: f.label }),
6396
+ /* @__PURE__ */ jsx66("dd", { className: "fd-fact-value", children: f.value })
6391
6397
  ] }, f.label)) }) });
6392
6398
  }
6393
6399
 
@@ -6477,7 +6483,7 @@ function useUsStateShapes() {
6477
6483
  }
6478
6484
 
6479
6485
  // src/components/data/USChoropleth.tsx
6480
- import { jsx as jsx66, jsxs as jsxs56 } from "react/jsx-runtime";
6486
+ import { jsx as jsx67, jsxs as jsxs56 } from "react/jsx-runtime";
6481
6487
  var TABLE_TITLE = "Show as a table";
6482
6488
  function legendLabel({ from, to }, formatValue) {
6483
6489
  if (from === 0) return `Up to ${formatValue(to)}`;
@@ -6486,11 +6492,11 @@ function legendLabel({ from, to }, formatValue) {
6486
6492
  function Legend({ model, formatValue }) {
6487
6493
  return /* @__PURE__ */ jsxs56("ul", { className: "fd-uschoro-legend", "aria-label": "Legend", children: [
6488
6494
  /* @__PURE__ */ jsxs56("li", { children: [
6489
- /* @__PURE__ */ jsx66("span", { className: "fd-uschoro-swatch", "data-step": "none", "aria-hidden": "true" }),
6495
+ /* @__PURE__ */ jsx67("span", { className: "fd-uschoro-swatch", "data-step": "none", "aria-hidden": "true" }),
6490
6496
  "None"
6491
6497
  ] }),
6492
6498
  legendSteps(model.bounds).map((step) => /* @__PURE__ */ jsxs56("li", { children: [
6493
- /* @__PURE__ */ jsx66("span", { className: "fd-uschoro-swatch", "data-step": step.step, "aria-hidden": "true" }),
6499
+ /* @__PURE__ */ jsx67("span", { className: "fd-uschoro-swatch", "data-step": step.step, "aria-hidden": "true" }),
6494
6500
  legendLabel(step, formatValue)
6495
6501
  ] }, step.step))
6496
6502
  ] });
@@ -6518,7 +6524,7 @@ function StateMap({ shapes, model, figures, label, formatReadout }) {
6518
6524
  const figure = figures.get(shape.code);
6519
6525
  const readout = formatReadout(figure);
6520
6526
  const binding = tip.bind(shape.code, readout);
6521
- return /* @__PURE__ */ jsx66(
6527
+ return /* @__PURE__ */ jsx67(
6522
6528
  "path",
6523
6529
  {
6524
6530
  className: "fd-uschoro-state",
@@ -6537,7 +6543,7 @@ function StateMap({ shapes, model, figures, label, formatReadout }) {
6537
6543
  shape.code
6538
6544
  );
6539
6545
  }),
6540
- active ? /* @__PURE__ */ jsx66("path", { className: "fd-uschoro-active", d: active.path, "aria-hidden": "true" }) : null
6546
+ active ? /* @__PURE__ */ jsx67("path", { className: "fd-uschoro-active", d: active.path, "aria-hidden": "true" }) : null
6541
6547
  ] }),
6542
6548
  tip.bubble
6543
6549
  ] });
@@ -6548,7 +6554,7 @@ function StateTable({ model, valueLabel, formatValue }) {
6548
6554
  { key: "value", label: valueLabel, numeric: true, phone: "secondary", render: (row) => formatValue(row.value) },
6549
6555
  { key: "share", label: "Share of total", numeric: true, phone: "secondary", render: (row) => formatShare(row.share) }
6550
6556
  ];
6551
- return /* @__PURE__ */ jsx66(Collapsible, { title: TABLE_TITLE, children: /* @__PURE__ */ jsx66(DataTable, { columns, rows: model.rows, rowKey: "code", compact: true }) });
6557
+ return /* @__PURE__ */ jsx67(Collapsible, { title: TABLE_TITLE, children: /* @__PURE__ */ jsx67(DataTable, { columns, rows: model.rows, rowKey: "code", compact: true }) });
6552
6558
  }
6553
6559
  function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, topN, total, className = "" }) {
6554
6560
  const model = React44.useMemo(() => buildChoroplethModel(values, topN ?? 0, total), [values, topN, total]);
@@ -6557,20 +6563,20 @@ function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, t
6557
6563
  return /* @__PURE__ */ jsxs56("div", { className: ["fd-uschoro", className].filter(Boolean).join(" "), children: [
6558
6564
  /* @__PURE__ */ jsxs56("div", { className: "fd-uschoro-layout", children: [
6559
6565
  /* @__PURE__ */ jsxs56("div", { className: "fd-uschoro-main", children: [
6560
- /* @__PURE__ */ jsx66(
6566
+ /* @__PURE__ */ jsx67(
6561
6567
  LoadingRegion,
6562
6568
  {
6563
6569
  state: state.status,
6564
6570
  label: `${label} loading`,
6565
6571
  error: state.status === "error" ? state.message : void 0,
6566
6572
  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
6573
+ skeleton: /* @__PURE__ */ jsx67("div", { className: "fd-uschoro-skeleton", children: /* @__PURE__ */ jsx67(Skeleton, { h: "100%" }) }),
6574
+ children: state.status === "ready" ? /* @__PURE__ */ jsx67(StateMap, { shapes: state.shapes, model, figures, label, formatReadout }) : null
6569
6575
  }
6570
6576
  ),
6571
- /* @__PURE__ */ jsx66(Legend, { model, formatValue })
6577
+ /* @__PURE__ */ jsx67(Legend, { model, formatValue })
6572
6578
  ] }),
6573
- topN ? /* @__PURE__ */ jsx66("div", { className: "fd-uschoro-top", children: /* @__PURE__ */ jsx66(
6579
+ topN ? /* @__PURE__ */ jsx67("div", { className: "fd-uschoro-top", children: /* @__PURE__ */ jsx67(
6574
6580
  BarList,
6575
6581
  {
6576
6582
  label: `Top ${topN} states`,
@@ -6582,13 +6588,13 @@ function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, t
6582
6588
  }
6583
6589
  ) }) : null
6584
6590
  ] }),
6585
- /* @__PURE__ */ jsx66(StateTable, { model, valueLabel, formatValue })
6591
+ /* @__PURE__ */ jsx67(StateTable, { model, valueLabel, formatValue })
6586
6592
  ] });
6587
6593
  }
6588
6594
 
6589
6595
  // src/components/forms/Checkbox.tsx
6590
6596
  import * as React45 from "react";
6591
- import { jsx as jsx67, jsxs as jsxs57 } from "react/jsx-runtime";
6597
+ import { jsx as jsx68, jsxs as jsxs57 } from "react/jsx-runtime";
6592
6598
  function Checkbox({ label, description, card = false, indeterminate = false, className = "", ...rest }) {
6593
6599
  const ref = React45.useRef(null);
6594
6600
  React45.useEffect(() => {
@@ -6596,47 +6602,47 @@ function Checkbox({ label, description, card = false, indeterminate = false, cla
6596
6602
  }, [indeterminate]);
6597
6603
  return /* @__PURE__ */ jsxs57("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
6598
6604
  /* @__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" }) })
6605
+ /* @__PURE__ */ jsx68("input", { ref, type: "checkbox", ...rest }),
6606
+ /* @__PURE__ */ jsx68("span", { className: "fd-choice-box", "aria-hidden": "true", children: /* @__PURE__ */ jsx68("i", { className: indeterminate ? "ph ph-minus" : "ph ph-check" }) })
6601
6607
  ] }),
6602
6608
  /* @__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
6609
+ /* @__PURE__ */ jsx68("span", { className: "fd-choice-title", children: label }),
6610
+ description ? /* @__PURE__ */ jsx68("span", { className: "fd-choice-desc", children: description }) : null
6605
6611
  ] })
6606
6612
  ] });
6607
6613
  }
6608
6614
 
6609
6615
  // src/components/forms/Radio.tsx
6610
- import { jsx as jsx68, jsxs as jsxs58 } from "react/jsx-runtime";
6616
+ import { jsx as jsx69, jsxs as jsxs58 } from "react/jsx-runtime";
6611
6617
  function Radio({ label, description, card = false, className = "", ...rest }) {
6612
6618
  return /* @__PURE__ */ jsxs58("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
6613
6619
  /* @__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" }) })
6620
+ /* @__PURE__ */ jsx69("input", { type: "radio", ...rest }),
6621
+ /* @__PURE__ */ jsx69("span", { className: "fd-choice-box fd-choice-box-round", "aria-hidden": "true", children: /* @__PURE__ */ jsx69("span", { className: "fd-choice-dot" }) })
6616
6622
  ] }),
6617
6623
  /* @__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
6624
+ /* @__PURE__ */ jsx69("span", { className: "fd-choice-title", children: label }),
6625
+ description ? /* @__PURE__ */ jsx69("span", { className: "fd-choice-desc", children: description }) : null
6620
6626
  ] })
6621
6627
  ] });
6622
6628
  }
6623
6629
 
6624
6630
  // src/components/forms/Switch.tsx
6625
- import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
6631
+ import { jsx as jsx70, jsxs as jsxs59 } from "react/jsx-runtime";
6626
6632
  function Switch({ label, description, className = "", ...rest }) {
6627
6633
  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" }) }),
6634
+ /* @__PURE__ */ jsx70("input", { type: "checkbox", role: "switch", ...rest }),
6635
+ /* @__PURE__ */ jsx70("span", { className: "fd-switch-track", children: /* @__PURE__ */ jsx70("span", { className: "fd-switch-thumb" }) }),
6630
6636
  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
6637
+ /* @__PURE__ */ jsx70("span", { className: "fd-switch-label", children: label }),
6638
+ description ? /* @__PURE__ */ jsx70("span", { className: "fd-choice-desc", children: description }) : null
6633
6639
  ] }) : null
6634
6640
  ] });
6635
6641
  }
6636
6642
 
6637
6643
  // src/components/forms/Select.tsx
6638
6644
  import * as React46 from "react";
6639
- import { jsx as jsx70, jsxs as jsxs60 } from "react/jsx-runtime";
6645
+ import { jsx as jsx71, jsxs as jsxs60 } from "react/jsx-runtime";
6640
6646
  var norm = (o) => typeof o === "string" ? { value: o, label: o } : o;
6641
6647
  function Select({
6642
6648
  label,
@@ -6737,7 +6743,7 @@ function Select({
6737
6743
  });
6738
6744
  const box = ["fd-input", "fd-select", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
6739
6745
  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 }),
6746
+ label ? /* @__PURE__ */ jsx71(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : /* @__PURE__ */ jsx71(HiddenFieldLabel, { id: labelId, children: hiddenLabel }),
6741
6747
  /* @__PURE__ */ jsxs60("div", { className: box, style: { cursor: disabled ? "not-allowed" : "pointer" }, ref: boxRef, children: [
6742
6748
  /* @__PURE__ */ jsxs60(
6743
6749
  "button",
@@ -6753,13 +6759,13 @@ function Select({
6753
6759
  "aria-labelledby": ariaLabelledBy,
6754
6760
  style: { all: "unset", flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 8, cursor: "inherit", overflow: "hidden" },
6755
6761
  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
6762
+ selected && selected.icon ? /* @__PURE__ */ jsx71("i", { className: "ph ph-" + selected.icon, style: { flex: "none", color: "var(--text-2)" } }) : null,
6763
+ /* @__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 }),
6764
+ 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
6765
  ]
6760
6766
  }
6761
6767
  ),
6762
- clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx70(
6768
+ clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx71(
6763
6769
  "button",
6764
6770
  {
6765
6771
  type: "button",
@@ -6769,12 +6775,12 @@ function Select({
6769
6775
  fire(multiple ? [] : "");
6770
6776
  },
6771
6777
  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 } })
6778
+ children: /* @__PURE__ */ jsx71("i", { className: "ph ph-x-circle", style: { fontSize: 15 } })
6773
6779
  }
6774
6780
  ) : 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" }) })
6781
+ 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
6782
  ] }),
6777
- /* @__PURE__ */ jsx70(
6783
+ /* @__PURE__ */ jsx71(
6778
6784
  Popover,
6779
6785
  {
6780
6786
  open: open2,
@@ -6788,8 +6794,8 @@ function Select({
6788
6794
  role: "presentation",
6789
6795
  style: { maxWidth: 380 },
6790
6796
  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(
6797
+ /* @__PURE__ */ jsx71("i", { className: "ph ph-magnifying-glass", style: { color: "var(--text-muted)", fontSize: 14 } }),
6798
+ /* @__PURE__ */ jsx71(
6793
6799
  "input",
6794
6800
  {
6795
6801
  autoFocus: true,
@@ -6802,10 +6808,10 @@ function Select({
6802
6808
  }
6803
6809
  }
6804
6810
  ),
6805
- q ? /* @__PURE__ */ jsx70("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
6811
+ q ? /* @__PURE__ */ jsx71("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
6806
6812
  ] }) : void 0,
6807
6813
  footer: multiple ? /* @__PURE__ */ jsxs60(React46.Fragment, { children: [
6808
- /* @__PURE__ */ jsx70(
6814
+ /* @__PURE__ */ jsx71(
6809
6815
  "button",
6810
6816
  {
6811
6817
  type: "button",
@@ -6814,13 +6820,13 @@ function Select({
6814
6820
  children: "Select all"
6815
6821
  }
6816
6822
  ),
6817
- /* @__PURE__ */ jsx70("span", { style: { flex: 1 } }),
6823
+ /* @__PURE__ */ jsx71("span", { style: { flex: 1 } }),
6818
6824
  /* @__PURE__ */ jsxs60("span", { className: "fd-body-sm fd-muted", children: [
6819
6825
  vals.length,
6820
6826
  " of ",
6821
6827
  opts.length
6822
6828
  ] }),
6823
- /* @__PURE__ */ jsx70(
6829
+ /* @__PURE__ */ jsx71(
6824
6830
  "button",
6825
6831
  {
6826
6832
  type: "button",
@@ -6831,12 +6837,12 @@ function Select({
6831
6837
  }
6832
6838
  )
6833
6839
  ] }) : 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: [
6840
+ 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
6841
  'Nothing matches "',
6836
6842
  q,
6837
6843
  '".'
6838
6844
  ] }) : groups.map((grp) => /* @__PURE__ */ jsxs60(React46.Fragment, { children: [
6839
- grp.g ? /* @__PURE__ */ jsx70("div", { className: "fd-pop-group", children: grp.g }) : null,
6845
+ grp.g ? /* @__PURE__ */ jsx71("div", { className: "fd-pop-group", children: grp.g }) : null,
6840
6846
  grp.items.map(({ o, i }) => /* @__PURE__ */ jsxs60(
6841
6847
  "button",
6842
6848
  {
@@ -6849,14 +6855,14 @@ function Select({
6849
6855
  onMouseEnter: () => nav.setActive(i),
6850
6856
  onClick: () => pick(o),
6851
6857
  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,
6858
+ 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,
6859
+ o.icon ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-icon", children: /* @__PURE__ */ jsx71("i", { className: "ph ph-" + o.icon }) }) : null,
6854
6860
  /* @__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
6861
+ /* @__PURE__ */ jsx71("span", { className: "fd-opt-label", children: o.label }),
6862
+ o.description ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-desc", children: o.description }) : null
6857
6863
  ] }),
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 })
6864
+ o.meta ? /* @__PURE__ */ jsx71("span", { className: "fd-opt-meta", children: o.meta }) : null,
6865
+ multiple ? null : /* @__PURE__ */ jsx71("span", { className: "fd-opt-check", children: o.value === value ? /* @__PURE__ */ jsx71("i", { className: "ph ph-check" }) : null })
6860
6866
  ]
6861
6867
  },
6862
6868
  String(o.value)
@@ -6865,15 +6871,15 @@ function Select({
6865
6871
  }
6866
6872
  ),
6867
6873
  error ? /* @__PURE__ */ jsxs60("span", { className: "fd-field-error", children: [
6868
- /* @__PURE__ */ jsx70("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6874
+ /* @__PURE__ */ jsx71("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
6869
6875
  error
6870
- ] }) : help ? /* @__PURE__ */ jsx70("span", { className: "fd-field-help", children: help }) : null
6876
+ ] }) : help ? /* @__PURE__ */ jsx71("span", { className: "fd-field-help", children: help }) : null
6871
6877
  ] });
6872
6878
  }
6873
6879
 
6874
6880
  // src/components/forms/TimePicker.tsx
6875
6881
  import * as React47 from "react";
6876
- import { jsx as jsx71, jsxs as jsxs61 } from "react/jsx-runtime";
6882
+ import { jsx as jsx72, jsxs as jsxs61 } from "react/jsx-runtime";
6877
6883
  var pad = (n) => String(n).padStart(2, "0");
6878
6884
  function ClockFace({ value = "09:00", onChange }) {
6879
6885
  let [h24, m] = value.split(":").map(Number);
@@ -6920,10 +6926,10 @@ function ClockFace({ value = "09:00", onChange }) {
6920
6926
  const minuteOff = mode2 === "m" && m % 5 !== 0;
6921
6927
  return /* @__PURE__ */ jsxs61("div", { style: { padding: "4px 14px 14px" }, children: [
6922
6928
  /* @__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(
6929
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-clock-digit" + (mode2 === "h" ? " is-active" : ""), onClick: () => setMode("h"), children: pad(h12) }),
6930
+ /* @__PURE__ */ jsx72("span", { style: { fontSize: 24, fontWeight: 700, color: "var(--text-muted)" }, children: ":" }),
6931
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-clock-digit" + (mode2 === "m" ? " is-active" : ""), onClick: () => setMode("m"), children: pad(m) }),
6932
+ /* @__PURE__ */ jsx72("span", { className: "fd-stack", style: { gap: 3, marginLeft: 8 }, children: ["AM", "PM"].map((ap) => /* @__PURE__ */ jsx72(
6927
6933
  "button",
6928
6934
  {
6929
6935
  type: "button",
@@ -6935,12 +6941,12 @@ function ClockFace({ value = "09:00", onChange }) {
6935
6941
  )) })
6936
6942
  ] }),
6937
6943
  /* @__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,
6944
+ /* @__PURE__ */ jsx72("span", { className: "fd-clock-hand", style: { height: NR - (minuteOff ? 14 : 16), transform: "translateX(-50%) rotate(" + handAngle + "deg)", bottom: "50%" } }),
6945
+ /* @__PURE__ */ jsx72("span", { className: "fd-clock-pivot" }),
6946
+ 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
6947
  nums.map((n) => {
6942
6948
  const a = angleOf(n) * Math.PI / 180;
6943
- return /* @__PURE__ */ jsx71(
6949
+ return /* @__PURE__ */ jsx72(
6944
6950
  "span",
6945
6951
  {
6946
6952
  className: "fd-clock-num" + (n === selNum || mode2 === "m" && n === Math.round(m / 5) * 5 % 60 && m % 5 === 0 ? " is-sel" : ""),
@@ -6951,7 +6957,7 @@ function ClockFace({ value = "09:00", onChange }) {
6951
6957
  );
6952
6958
  })
6953
6959
  ] }),
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" }) })
6960
+ /* @__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
6961
  ] });
6956
6962
  }
6957
6963
  function TimePicker({ label, help, error, required = false, disabled = false, value = "", onChange, placeholder = "Pick a time", id, className = "", style }) {
@@ -6968,10 +6974,10 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
6968
6974
  if (!disabled) setOpen(!open2);
6969
6975
  };
6970
6976
  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,
6977
+ label ? /* @__PURE__ */ jsx72(FieldLabel, { id: labelId, required, onClick: toggle, children: label }) : null,
6972
6978
  /* @__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(
6979
+ /* @__PURE__ */ jsx72("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx72("i", { className: "ph ph-clock", "aria-hidden": "true" }) }),
6980
+ /* @__PURE__ */ jsx72(
6975
6981
  "button",
6976
6982
  {
6977
6983
  type: "button",
@@ -6988,9 +6994,9 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
6988
6994
  children: disp() || placeholder
6989
6995
  }
6990
6996
  ),
6991
- /* @__PURE__ */ jsx71("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx71("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
6997
+ /* @__PURE__ */ jsx72("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx72("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
6992
6998
  ] }),
6993
- /* @__PURE__ */ jsx71(
6999
+ /* @__PURE__ */ jsx72(
6994
7000
  Popover,
6995
7001
  {
6996
7002
  open: open2,
@@ -7002,7 +7008,7 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
7002
7008
  width: 262,
7003
7009
  role: "presentation",
7004
7010
  footer: /* @__PURE__ */ jsxs61(React47.Fragment, { children: [
7005
- /* @__PURE__ */ jsx71(
7011
+ /* @__PURE__ */ jsx72(
7006
7012
  "button",
7007
7013
  {
7008
7014
  type: "button",
@@ -7015,22 +7021,22 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
7015
7021
  children: "Now"
7016
7022
  }
7017
7023
  ),
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" })
7024
+ /* @__PURE__ */ jsx72("span", { style: { flex: 1 } }),
7025
+ /* @__PURE__ */ jsx72("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", onClick: () => setOpen(false), children: "Done" })
7020
7026
  ] }),
7021
- children: /* @__PURE__ */ jsx71(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) })
7027
+ children: /* @__PURE__ */ jsx72(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) })
7022
7028
  }
7023
7029
  ),
7024
7030
  error ? /* @__PURE__ */ jsxs61("span", { className: "fd-field-error", children: [
7025
- /* @__PURE__ */ jsx71("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7031
+ /* @__PURE__ */ jsx72("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7026
7032
  error
7027
- ] }) : help ? /* @__PURE__ */ jsx71("span", { className: "fd-field-help", children: help }) : null
7033
+ ] }) : help ? /* @__PURE__ */ jsx72("span", { className: "fd-field-help", children: help }) : null
7028
7034
  ] });
7029
7035
  }
7030
7036
 
7031
7037
  // src/components/forms/Slider.tsx
7032
7038
  import * as React48 from "react";
7033
- import { jsx as jsx72, jsxs as jsxs62 } from "react/jsx-runtime";
7039
+ import { jsx as jsx73, jsxs as jsxs62 } from "react/jsx-runtime";
7034
7040
  function Slider({
7035
7041
  label,
7036
7042
  min = 0,
@@ -7052,13 +7058,13 @@ function Slider({
7052
7058
  const pct = max === min ? 0 : (v - min) / (max - min) * 100;
7053
7059
  return /* @__PURE__ */ jsxs62("div", { className: ["fd-field", className].filter(Boolean).join(" "), children: [
7054
7060
  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) })
7061
+ /* @__PURE__ */ jsx73(FieldLabel, { htmlFor: fieldId, children: label }),
7062
+ /* @__PURE__ */ jsx73("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: format(v) })
7057
7063
  ] }) : null,
7058
7064
  /* @__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(
7065
+ /* @__PURE__ */ jsx73("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
7066
+ showChip && dragging ? /* @__PURE__ */ jsx73("span", { className: "fd-slider-chip", style: { left: pct + "%" }, children: format(v) }) : null,
7067
+ /* @__PURE__ */ jsx73(
7062
7068
  "input",
7063
7069
  {
7064
7070
  id: fieldId,
@@ -7076,13 +7082,13 @@ function Slider({
7076
7082
  }
7077
7083
  )
7078
7084
  ] }),
7079
- help ? /* @__PURE__ */ jsx72("span", { className: "fd-field-help", children: help }) : null
7085
+ help ? /* @__PURE__ */ jsx73("span", { className: "fd-field-help", children: help }) : null
7080
7086
  ] });
7081
7087
  }
7082
7088
 
7083
7089
  // src/components/forms/RangeSlider.tsx
7084
7090
  import * as React49 from "react";
7085
- import { jsx as jsx73, jsxs as jsxs63 } from "react/jsx-runtime";
7091
+ import { jsx as jsx74, jsxs as jsxs63 } from "react/jsx-runtime";
7086
7092
  function RangeSlider({
7087
7093
  label,
7088
7094
  min = 0,
@@ -7139,7 +7145,7 @@ function RangeSlider({
7139
7145
  };
7140
7146
  const thin = S.length > 7 ? Math.ceil(S.length / 5) : 1;
7141
7147
  const pair = value || [S[0].value, S[S.length - 1].value];
7142
- return /* @__PURE__ */ jsx73(
7148
+ return /* @__PURE__ */ jsx74(
7143
7149
  RangeSlider,
7144
7150
  {
7145
7151
  ...rest,
@@ -7189,7 +7195,7 @@ function RangeSlider({
7189
7195
  const hasLabels = marks.some((m) => m.label);
7190
7196
  return /* @__PURE__ */ jsxs63("div", { className: ["fd-field", className].filter(Boolean).join(" "), ...rest, children: [
7191
7197
  label ? /* @__PURE__ */ jsxs63("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
7192
- /* @__PURE__ */ jsx73("span", { className: "fd-field-label", children: label }),
7198
+ /* @__PURE__ */ jsx74("span", { className: "fd-field-label", children: label }),
7193
7199
  /* @__PURE__ */ jsxs63("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: [
7194
7200
  fmt2(a),
7195
7201
  " \u2013 ",
@@ -7197,13 +7203,13 @@ function RangeSlider({
7197
7203
  ] })
7198
7204
  ] }) : null,
7199
7205
  /* @__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) + "%" } }),
7206
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-rail", ref: railRef }),
7207
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-fill", style: { left: pct(a) + "%", width: pct(b) - pct(a) + "%" } }),
7202
7208
  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
7209
+ /* @__PURE__ */ jsx74("span", { className: "fd-range-mark" + (m.value >= a && m.value <= b ? " is-in" : ""), style: { left: pct(m.value) + "%" } }),
7210
+ m.label ? /* @__PURE__ */ jsx74("span", { className: "fd-range-mark-label", style: { left: pct(m.value) + "%" }, children: m.label }) : null
7205
7211
  ] }, m.value)),
7206
- [a, b].map((v, i) => /* @__PURE__ */ jsx73(
7212
+ [a, b].map((v, i) => /* @__PURE__ */ jsx74(
7207
7213
  "span",
7208
7214
  {
7209
7215
  className: "fd-range-thumb" + (drag === i ? " is-drag" : ""),
@@ -7218,18 +7224,18 @@ function RangeSlider({
7218
7224
  onKeyDown: key(i),
7219
7225
  onFocus: () => setFocus(i),
7220
7226
  onBlur: () => setFocus(null),
7221
- children: /* @__PURE__ */ jsx73("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
7227
+ children: /* @__PURE__ */ jsx74("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
7222
7228
  },
7223
7229
  i
7224
7230
  ))
7225
7231
  ] }),
7226
- help ? /* @__PURE__ */ jsx73("span", { className: "fd-field-help", children: help }) : null
7232
+ help ? /* @__PURE__ */ jsx74("span", { className: "fd-field-help", children: help }) : null
7227
7233
  ] });
7228
7234
  }
7229
7235
 
7230
7236
  // src/components/forms/Dropzone.tsx
7231
7237
  import * as React50 from "react";
7232
- import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
7238
+ import { jsx as jsx75, jsxs as jsxs64 } from "react/jsx-runtime";
7233
7239
  function Dropzone({
7234
7240
  onFiles,
7235
7241
  onReject,
@@ -7285,10 +7291,10 @@ function Dropzone({
7285
7291
  onDrop: drop,
7286
7292
  children: [
7287
7293
  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
7294
+ over ? /* @__PURE__ */ jsx75("div", { className: "fd-dropzone-veil", "aria-hidden": "true", children: /* @__PURE__ */ jsxs64("div", { className: "fd-dropzone-card", children: [
7295
+ /* @__PURE__ */ jsx75("i", { className: "ph ph-tray-arrow-down" }),
7296
+ /* @__PURE__ */ jsx75("span", { className: "fd-dropzone-label", children: label }),
7297
+ hint ? /* @__PURE__ */ jsx75("span", { className: "fd-dropzone-hint", children: hint }) : null
7292
7298
  ] }) }) : null
7293
7299
  ]
7294
7300
  }
@@ -7308,7 +7314,7 @@ function FilePickButton({
7308
7314
  }) {
7309
7315
  const ref = React50.useRef(null);
7310
7316
  return /* @__PURE__ */ jsxs64(React50.Fragment, { children: [
7311
- /* @__PURE__ */ jsx74(
7317
+ /* @__PURE__ */ jsx75(
7312
7318
  "button",
7313
7319
  {
7314
7320
  type: "button",
@@ -7317,10 +7323,10 @@ function FilePickButton({
7317
7323
  "aria-label": label,
7318
7324
  title: label,
7319
7325
  onClick: () => ref.current && ref.current.click(),
7320
- children: children != null ? children : /* @__PURE__ */ jsx74("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
7326
+ children: children != null ? children : /* @__PURE__ */ jsx75("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
7321
7327
  }
7322
7328
  ),
7323
- /* @__PURE__ */ jsx74(
7329
+ /* @__PURE__ */ jsx75(
7324
7330
  "input",
7325
7331
  {
7326
7332
  ref,
@@ -7397,7 +7403,7 @@ function useStagedFiles(upload, opts) {
7397
7403
  var DropzoneKit = { useStagedFiles };
7398
7404
 
7399
7405
  // src/components/forms/FileGrid.tsx
7400
- import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
7406
+ import { jsx as jsx76, jsxs as jsxs65 } from "react/jsx-runtime";
7401
7407
  var truncateMiddle = (name, max = 34) => {
7402
7408
  if (!name || name.length <= max) return name;
7403
7409
  const ext = /\.[A-Za-z0-9]+$/.exec(name);
@@ -7406,7 +7412,7 @@ var truncateMiddle = (name, max = 34) => {
7406
7412
  return head + "\u2026" + tail;
7407
7413
  };
7408
7414
  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)) + "%" } }) });
7415
+ 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
7416
  }
7411
7417
  function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false, className = "" }) {
7412
7418
  if (!file) return null;
@@ -7426,13 +7432,13 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
7426
7432
  title: file.name + (meta ? " \xB7 " + meta : ""),
7427
7433
  children: [
7428
7434
  /* @__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
7435
+ thumb ? /* @__PURE__ */ jsx76("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsx76("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7436
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx76("i", { className: "ph ph-play fd-file-play", "aria-hidden": "true" }) : null
7431
7437
  ] }),
7432
7438
  /* @__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" }),
7439
+ /* @__PURE__ */ jsx76("span", { className: "fd-file-name", children: truncateMiddle(file.name, compact3 ? 26 : 40) }),
7440
+ /* @__PURE__ */ jsx76("span", { className: "fd-file-meta", children: file.error ? /* @__PURE__ */ jsxs65("span", { className: "fd-file-err", children: [
7441
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7436
7442
  file.error
7437
7443
  ] }) : uploading ? /* @__PURE__ */ jsxs65("span", { className: "fd-tabular", children: [
7438
7444
  Math.round(file.progress),
@@ -7442,9 +7448,9 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
7442
7448
  ]
7443
7449
  }
7444
7450
  ),
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
7451
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7452
+ 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,
7453
+ 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
7454
  ] });
7449
7455
  }
7450
7456
  function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = "" }) {
@@ -7452,19 +7458,19 @@ function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = "" }) {
7452
7458
  const src = file.thumb && file.thumb.url || file.blobUrl || file.url;
7453
7459
  const uploading = file.progress != null && file.progress < 100 && !file.error;
7454
7460
  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,
7461
+ /* @__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" }) }) }),
7462
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7457
7463
  file.error ? /* @__PURE__ */ jsxs65("figcaption", { className: "fd-tile-err", children: [
7458
- /* @__PURE__ */ jsx75("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7464
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
7459
7465
  file.error
7460
7466
  ] }) : 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
7467
+ 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
7468
  ] });
7463
7469
  }
7464
7470
  function FileStrip({ files = [], size = 68, onOpen, onRemove, onRetry, className = "" }) {
7465
7471
  const list = files.filter(Boolean);
7466
7472
  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)) });
7473
+ 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
7474
  }
7469
7475
  var shortName = (name, keep = 5) => {
7470
7476
  const s = String(name || "file");
@@ -7480,17 +7486,17 @@ function FileCell({ file, onOpen, onRemove, onRetry }) {
7480
7486
  const label = file.name + (file.size ? " \xB7 " + formatBytes(file.size) : "");
7481
7487
  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
7488
  /* @__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) })
7489
+ thumb ? /* @__PURE__ */ jsx76("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsxs65("span", { className: "fd-cell-doc", children: [
7490
+ /* @__PURE__ */ jsx76("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
7491
+ /* @__PURE__ */ jsx76("span", { className: "fd-cell-name", children: shortName(file.name) }),
7492
+ /* @__PURE__ */ jsx76("span", { className: "fd-cell-size", children: file.meta || formatBytes(file.size) })
7487
7493
  ] }),
7488
- (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx75("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
7494
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx76("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
7489
7495
  ] }),
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
7496
+ uploading ? /* @__PURE__ */ jsx76(Progress, { value: file.progress }) : null,
7497
+ file.error ? /* @__PURE__ */ jsx76("span", { className: "fd-cell-err", "aria-hidden": "true", children: /* @__PURE__ */ jsx76("i", { className: "ph ph-warning-circle" }) }) : null,
7498
+ 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,
7499
+ 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
7500
  ] });
7495
7501
  }
7496
7502
  function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeight = 200, compact: compact3 = false, className = "" }) {
@@ -7499,14 +7505,14 @@ function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeig
7499
7505
  const pics = tiles ? list.filter((f) => isImage(f.mime, f.name)) : [];
7500
7506
  const rest = list.filter((f) => pics.indexOf(f) === -1);
7501
7507
  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
7508
+ 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,
7509
+ 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
7510
  ] });
7505
7511
  }
7506
7512
 
7507
7513
  // src/components/forms/MarkdownEditor.tsx
7508
7514
  import * as React51 from "react";
7509
- import { jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
7515
+ import { jsx as jsx77, jsxs as jsxs66 } from "react/jsx-runtime";
7510
7516
  var isMac = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || "");
7511
7517
  var INLINE_RE = /(\*\*\*[^*\n]+\*\*\*|\*\*[^*\n]+\*\*|__[^_\n]+__|~~[^~\n]+~~|`[^`\n]+`|\*[^*\s][^*\n]*\*|(?<![A-Za-z0-9_])_[^_\s][^_\n]*_|\[[^\]\n]*\]\([^)\s\n]*\)|https?:\/\/\S+)/g;
7512
7518
  function inlineParts(text) {
@@ -7933,7 +7939,7 @@ var MarkdownEditor = React51.forwardRef(function MarkdownEditor2({
7933
7939
  };
7934
7940
  const lh = 1.55;
7935
7941
  return /* @__PURE__ */ jsxs66("div", { className: ["fd-rme-wrap", disabled ? "is-disabled" : "", className].filter(Boolean).join(" "), children: [
7936
- /* @__PURE__ */ jsx76(
7942
+ /* @__PURE__ */ jsx77(
7937
7943
  "div",
7938
7944
  {
7939
7945
  ref: boxRef,
@@ -7966,7 +7972,7 @@ var MarkdownEditor = React51.forwardRef(function MarkdownEditor2({
7966
7972
  }
7967
7973
  }
7968
7974
  ),
7969
- !value ? /* @__PURE__ */ jsx76("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
7975
+ !value ? /* @__PURE__ */ jsx77("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
7970
7976
  ] });
7971
7977
  });
7972
7978
 
@@ -7978,7 +7984,7 @@ import { defaultKeymap, history, historyKeymap, indentMore, indentLess } from "@
7978
7984
  import { sql as sqlLang } from "@codemirror/lang-sql";
7979
7985
  import { syntaxHighlighting, HighlightStyle, indentOnInput, bracketMatching } from "@codemirror/language";
7980
7986
  import { tags } from "@lezer/highlight";
7981
- import { jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
7987
+ import { jsx as jsx78, jsxs as jsxs67 } from "react/jsx-runtime";
7982
7988
  function clampOffset(state, line, column) {
7983
7989
  const total = state.doc.lines;
7984
7990
  const ln = state.doc.line(Math.min(Math.max(1, line), total));
@@ -8163,13 +8169,13 @@ function CodeEditor({
8163
8169
  const box = ["fd-input", "fd-code-editor", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
8164
8170
  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
8171
  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(
8172
+ label ? /* @__PURE__ */ jsx78(FieldLabel, { htmlFor: fieldId, required, children: label }) : null,
8173
+ /* @__PURE__ */ jsx78(
8168
8174
  "div",
8169
8175
  {
8170
8176
  className: box,
8171
8177
  style: { minHeight },
8172
- children: /* @__PURE__ */ jsx77(
8178
+ children: /* @__PURE__ */ jsx78(
8173
8179
  "div",
8174
8180
  {
8175
8181
  ref: hostRef,
@@ -8183,9 +8189,9 @@ function CodeEditor({
8183
8189
  help ? help + ". " : "",
8184
8190
  showEscapeHint ? "Tab indents. Press Escape, then Tab, to move focus out of the editor." : ""
8185
8191
  ] }),
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(
8192
+ /* @__PURE__ */ jsx78("div", { id: liveId, className: "fd-sr", role: "status", "aria-live": "polite", children: announce }),
8193
+ 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: [
8194
+ /* @__PURE__ */ jsx78(
8189
8195
  "i",
8190
8196
  {
8191
8197
  className: "ph ph-" + (d.severity === "warning" ? "warning" : d.severity === "info" ? "info" : "warning-circle"),
@@ -8197,13 +8203,13 @@ function CodeEditor({
8197
8203
  d.line,
8198
8204
  d.column ? ":" + d.column : ""
8199
8205
  ] }),
8200
- /* @__PURE__ */ jsx77("span", { children: d.message })
8206
+ /* @__PURE__ */ jsx78("span", { children: d.message })
8201
8207
  ] }, i)) }) : null,
8202
8208
  error ? /* @__PURE__ */ jsxs67("span", { className: "fd-field-error", children: [
8203
- /* @__PURE__ */ jsx77("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8209
+ /* @__PURE__ */ jsx78("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8204
8210
  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
8211
+ ] }) : !diagnostics.length && help ? /* @__PURE__ */ jsx78("span", { className: "fd-field-help", children: help }) : null,
8212
+ showEscapeHint ? /* @__PURE__ */ jsx78("span", { className: "fd-field-help fd-code-editor-hint", children: "Tab indents. Escape, then Tab, moves focus out." }) : null
8207
8213
  ] });
8208
8214
  }
8209
8215
 
@@ -8227,7 +8233,7 @@ function useSessionContext() {
8227
8233
  }
8228
8234
 
8229
8235
  // src/components/platform/AccountMenu.tsx
8230
- import { Fragment as Fragment18, jsx as jsx78, jsxs as jsxs68 } from "react/jsx-runtime";
8236
+ import { Fragment as Fragment18, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
8231
8237
  var DEFAULT_LINKS = [];
8232
8238
  var DEFAULT_GROUPS = [];
8233
8239
  function Item({ item, onPick }) {
@@ -8239,9 +8245,9 @@ function Item({ item, onPick }) {
8239
8245
  className: "fd-acct-item",
8240
8246
  onClick: () => onPick(item),
8241
8247
  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
8248
+ item.icon ? /* @__PURE__ */ jsx79("i", { className: "ph ph-" + item.icon, "aria-hidden": "true" }) : null,
8249
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: item.label }),
8250
+ item.badge ? /* @__PURE__ */ jsx79(Badge, { tone: "neutral", children: item.badge }) : null
8245
8251
  ]
8246
8252
  }
8247
8253
  );
@@ -8302,12 +8308,12 @@ function AccountMenu({
8302
8308
  onClick: () => open2 ? closeMenu() : setOpen(true),
8303
8309
  ...rest,
8304
8310
  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)" } })
8311
+ /* @__PURE__ */ jsx79(Avatar, { name: user.name, size: "sm" }),
8312
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-caret-down", "aria-hidden": "true", style: { fontSize: 11, color: "var(--text-muted)" } })
8307
8313
  ]
8308
8314
  }
8309
8315
  ),
8310
- /* @__PURE__ */ jsx78(
8316
+ /* @__PURE__ */ jsx79(
8311
8317
  Popover,
8312
8318
  {
8313
8319
  open: open2,
@@ -8317,25 +8323,25 @@ function AccountMenu({
8317
8323
  width: 272,
8318
8324
  children: /* @__PURE__ */ jsxs68("div", { role: "menu", className: "fd-stack", style: { gap: 0 }, children: [
8319
8325
  /* @__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 }),
8326
+ /* @__PURE__ */ jsx79(Avatar, { name: user.name }),
8321
8327
  /* @__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 })
8328
+ /* @__PURE__ */ jsx79("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: user.name }),
8329
+ /* @__PURE__ */ jsx79("span", { className: "fd-body-sm fd-muted fd-table-trunc", title: truncationTitle(user.email), children: user.email })
8324
8330
  ] })
8325
8331
  ] }),
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,
8332
+ 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,
8333
+ visibleLinks.length ? /* @__PURE__ */ jsx79("div", { className: "fd-acct-group", children: visibleLinks.map((l) => /* @__PURE__ */ jsx79(Item, { item: l, onPick: pick }, l.id)) }) : null,
8328
8334
  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))
8335
+ /* @__PURE__ */ jsx79("span", { className: "fd-overline fd-muted", style: { padding: "8px 14px 4px", display: "block" }, children: g.label }),
8336
+ g.links.map((l) => /* @__PURE__ */ jsx79(Item, { item: l, onPick: pick }, l.id))
8331
8337
  ] }, g.label)),
8332
8338
  showSwitcher && demo ? /* @__PURE__ */ jsxs68("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
8333
8339
  /* @__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 } })
8340
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-user-switch", "aria-hidden": "true" }),
8341
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: "View as another member" }),
8342
+ /* @__PURE__ */ jsx79("i", { className: "ph ph-caret-" + (switching ? "up" : "down"), "aria-hidden": "true", style: { fontSize: 11 } })
8337
8343
  ] }),
8338
- switching ? /* @__PURE__ */ jsx78("div", { className: "fd-stack", style: { gap: 0 }, children: demo.allUsers.map((u) => /* @__PURE__ */ jsxs68(
8344
+ switching ? /* @__PURE__ */ jsx79("div", { className: "fd-stack", style: { gap: 0 }, children: demo.allUsers.map((u) => /* @__PURE__ */ jsxs68(
8339
8345
  "button",
8340
8346
  {
8341
8347
  type: "button",
@@ -8347,12 +8353,12 @@ function AccountMenu({
8347
8353
  setSwitching(false);
8348
8354
  },
8349
8355
  children: [
8350
- /* @__PURE__ */ jsx78(Avatar, { name: u.name, size: "sm" }),
8356
+ /* @__PURE__ */ jsx79(Avatar, { name: u.name, size: "sm" }),
8351
8357
  /* @__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
8358
+ /* @__PURE__ */ jsx79("span", { style: { fontWeight: u.id === user.id ? 700 : 500 }, children: u.name }),
8359
+ u.roles ? /* @__PURE__ */ jsx79("span", { className: "fd-muted", style: { fontSize: 11.5 }, children: u.roles.join(", ") }) : null
8354
8360
  ] }),
8355
- u.id === user.id ? /* @__PURE__ */ jsx78("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
8361
+ u.id === user.id ? /* @__PURE__ */ jsx79("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
8356
8362
  ]
8357
8363
  },
8358
8364
  u.id
@@ -8369,14 +8375,14 @@ function AccountMenu({
8369
8375
  disabled: signingOut,
8370
8376
  onClick: signOut,
8371
8377
  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" })
8378
+ signingOut ? /* @__PURE__ */ jsx79(Spinner, { size: "sm" }) : /* @__PURE__ */ jsx79("i", { className: "ph ph-sign-out", "aria-hidden": "true" }),
8379
+ /* @__PURE__ */ jsx79("span", { style: { flex: 1 }, children: signingOut ? "Signing out\u2026" : "Sign out" })
8374
8380
  ]
8375
8381
  }
8376
8382
  ),
8377
8383
  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" })
8384
+ /* @__PURE__ */ jsx79("span", { style: { display: "block", color: "var(--danger-text)", marginBottom: 6 }, children: signOutError }),
8385
+ /* @__PURE__ */ jsx79("button", { type: "button", className: "fd-soon-link", disabled: signingOut, onClick: signOut, children: "Retry" })
8380
8386
  ] }) : null
8381
8387
  ] })
8382
8388
  ] })
@@ -8387,7 +8393,7 @@ function AccountMenu({
8387
8393
 
8388
8394
  // src/components/platform/AppSwitcher.tsx
8389
8395
  import * as React55 from "react";
8390
- import { jsx as jsx79, jsxs as jsxs69 } from "react/jsx-runtime";
8396
+ import { jsx as jsx80, jsxs as jsxs69 } from "react/jsx-runtime";
8391
8397
  function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8392
8398
  const { apps: contextApps } = useSessionContext();
8393
8399
  const apps = appsProp ?? contextApps ?? [];
@@ -8407,7 +8413,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8407
8413
  }
8408
8414
  }));
8409
8415
  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(
8416
+ /* @__PURE__ */ jsx80("span", { ref: anchorRef, className: ["fd-appswitch-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx80(
8411
8417
  IconButton,
8412
8418
  {
8413
8419
  icon: "squares-four",
@@ -8417,7 +8423,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8417
8423
  onClick: () => setOpen((v) => !v)
8418
8424
  }
8419
8425
  ) }),
8420
- /* @__PURE__ */ jsx79(
8426
+ /* @__PURE__ */ jsx80(
8421
8427
  Popover,
8422
8428
  {
8423
8429
  open: open2,
@@ -8428,7 +8434,7 @@ function AppSwitcher({ apps: appsProp, onNavigate, className = "" }) {
8428
8434
  label: "All flytedesk apps",
8429
8435
  width: 240,
8430
8436
  maxHeight: 360,
8431
- children: /* @__PURE__ */ jsx79(Menu, { items, onClose: () => setOpen(false) })
8437
+ children: /* @__PURE__ */ jsx80(Menu, { items, onClose: () => setOpen(false) })
8432
8438
  }
8433
8439
  )
8434
8440
  ] });
@@ -8562,11 +8568,11 @@ function useAppearancePrefs(store) {
8562
8568
 
8563
8569
  // src/components/platform/AppearanceProvider.tsx
8564
8570
  import * as React57 from "react";
8565
- import { jsx as jsx80 } from "react/jsx-runtime";
8571
+ import { jsx as jsx81 } from "react/jsx-runtime";
8566
8572
  var AppearanceStoreContext = React57.createContext(null);
8567
8573
  function AppearanceProvider({ store, children }) {
8568
8574
  React57.useLayoutEffect(() => watchAppearance(store), [store]);
8569
- return /* @__PURE__ */ jsx80(AppearanceStoreContext.Provider, { value: store, children });
8575
+ return /* @__PURE__ */ jsx81(AppearanceStoreContext.Provider, { value: store, children });
8570
8576
  }
8571
8577
  function useAppearanceStore() {
8572
8578
  const store = React57.useContext(AppearanceStoreContext);
@@ -8575,7 +8581,7 @@ function useAppearanceStore() {
8575
8581
  }
8576
8582
 
8577
8583
  // src/components/platform/AppearanceMenu.tsx
8578
- import { jsx as jsx81, jsxs as jsxs70 } from "react/jsx-runtime";
8584
+ import { jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
8579
8585
  var THEME_OPTIONS = [
8580
8586
  { value: "light", label: "Light" },
8581
8587
  { value: "dark", label: "Dark" },
@@ -8593,7 +8599,7 @@ function AppearanceMenu({ className = "" }) {
8593
8599
  const anchorRef = React58.useRef(null);
8594
8600
  const patch = (p) => update(p);
8595
8601
  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(
8602
+ /* @__PURE__ */ jsx82("span", { ref: anchorRef, className: ["fd-appearance-anchor", className].filter(Boolean).join(" "), style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx82(
8597
8603
  IconButton,
8598
8604
  {
8599
8605
  icon: "circle-half",
@@ -8601,7 +8607,7 @@ function AppearanceMenu({ className = "" }) {
8601
8607
  onClick: () => setOpen((v) => !v)
8602
8608
  }
8603
8609
  ) }),
8604
- /* @__PURE__ */ jsx81(
8610
+ /* @__PURE__ */ jsx82(
8605
8611
  Popover,
8606
8612
  {
8607
8613
  open: open2,
@@ -8613,8 +8619,8 @@ function AppearanceMenu({ className = "" }) {
8613
8619
  label: "Appearance settings",
8614
8620
  children: /* @__PURE__ */ jsxs70("div", { className: "fd-stack", style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
8615
8621
  /* @__PURE__ */ jsxs70("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8616
- /* @__PURE__ */ jsx81("span", { className: "fd-field-label", children: "Theme" }),
8617
- /* @__PURE__ */ jsx81(
8622
+ /* @__PURE__ */ jsx82("span", { className: "fd-field-label", children: "Theme" }),
8623
+ /* @__PURE__ */ jsx82(
8618
8624
  SegmentedControl,
8619
8625
  {
8620
8626
  options: THEME_OPTIONS,
@@ -8625,8 +8631,8 @@ function AppearanceMenu({ className = "" }) {
8625
8631
  )
8626
8632
  ] }),
8627
8633
  /* @__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(
8634
+ /* @__PURE__ */ jsx82("span", { className: "fd-field-label", children: "Text size" }),
8635
+ /* @__PURE__ */ jsx82(
8630
8636
  SegmentedControl,
8631
8637
  {
8632
8638
  options: TEXT_SCALE_OPTIONS,
@@ -8636,7 +8642,7 @@ function AppearanceMenu({ className = "" }) {
8636
8642
  }
8637
8643
  )
8638
8644
  ] }),
8639
- /* @__PURE__ */ jsx81(
8645
+ /* @__PURE__ */ jsx82(
8640
8646
  Switch,
8641
8647
  {
8642
8648
  label: "High contrast",
@@ -8645,7 +8651,7 @@ function AppearanceMenu({ className = "" }) {
8645
8651
  onChange: (e) => patch({ highContrast: e.target.checked })
8646
8652
  }
8647
8653
  ),
8648
- /* @__PURE__ */ jsx81(
8654
+ /* @__PURE__ */ jsx82(
8649
8655
  Switch,
8650
8656
  {
8651
8657
  label: "Reduce motion",
@@ -8662,10 +8668,10 @@ function AppearanceMenu({ className = "" }) {
8662
8668
 
8663
8669
  // src/components/platform/ApiSpecBrowser.tsx
8664
8670
  import * as React59 from "react";
8665
- import { jsx as jsx82, jsxs as jsxs71 } from "react/jsx-runtime";
8671
+ import { jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
8666
8672
  var METHOD_TONE = { GET: "success", POST: "info", PATCH: "warning", PUT: "warning", DELETE: "danger" };
8667
8673
  function Json({ obj }) {
8668
- return /* @__PURE__ */ jsx82("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
8674
+ return /* @__PURE__ */ jsx83("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
8669
8675
  }
8670
8676
  function Endpoint({ s, onRequest }) {
8671
8677
  const [tried, setTried] = React59.useState(null);
@@ -8679,50 +8685,50 @@ function Endpoint({ s, onRequest }) {
8679
8685
  setTried({ ms: Math.round((window.performance || Date).now() - t0), error: String(e && e.message || e) });
8680
8686
  }
8681
8687
  };
8682
- return /* @__PURE__ */ jsx82(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 0 }, children: [
8688
+ return /* @__PURE__ */ jsx83(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 0 }, children: [
8683
8689
  /* @__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 } }),
8690
+ /* @__PURE__ */ jsx83(Badge, { tone: METHOD_TONE[s.method] || "neutral", children: s.method }),
8691
+ /* @__PURE__ */ jsx83("code", { className: "fd-mono", style: { fontSize: 12.5, fontWeight: 600, color: "var(--text)", wordBreak: "break-all" }, children: s.path }),
8692
+ s.isList ? /* @__PURE__ */ jsx83(Badge, { tone: "neutral", icon: "rows", children: "Paged list" }) : null,
8693
+ /* @__PURE__ */ jsx83("span", { style: { flex: 1 } }),
8688
8694
  /* @__PURE__ */ jsxs71("span", { className: "fd-body-sm fd-muted fd-mono", children: [
8689
8695
  s.latency[0],
8690
8696
  "\u2013",
8691
8697
  s.latency[1],
8692
8698
  "ms"
8693
8699
  ] }),
8694
- /* @__PURE__ */ jsx82(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
8700
+ /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
8695
8701
  ] }),
8696
8702
  /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 14, padding: "0 18px 16px" }, children: [
8697
8703
  /* @__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
8704
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: s.title }),
8705
+ /* @__PURE__ */ jsx83("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: s.purpose }),
8706
+ 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
8707
  ] }),
8702
8708
  /* @__PURE__ */ jsxs71("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(280px,1fr))", gap: 12, alignItems: "start" }, children: [
8703
8709
  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 })
8710
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Request body" }),
8711
+ /* @__PURE__ */ jsx83(Json, { obj: s.request })
8706
8712
  ] }) : null,
8707
8713
  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 })
8714
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Query" }),
8715
+ /* @__PURE__ */ jsx83(Json, { obj: s.query })
8710
8716
  ] }) : null,
8711
8717
  /* @__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 })
8718
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Response 200" }),
8719
+ /* @__PURE__ */ jsx83(Json, { obj: s.response })
8714
8720
  ] })
8715
8721
  ] }),
8716
- s.notes ? /* @__PURE__ */ jsx82(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
8722
+ s.notes ? /* @__PURE__ */ jsx83(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
8717
8723
  tried && tried !== "busy" ? /* @__PURE__ */ jsxs71("div", { className: "fd-stack", style: { gap: 6 }, children: [
8718
8724
  /* @__PURE__ */ jsxs71("span", { className: "fd-row", style: { gap: 8 }, children: [
8719
- /* @__PURE__ */ jsx82("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
8725
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
8720
8726
  /* @__PURE__ */ jsxs71(Badge, { tone: tried.error ? "danger" : "success", icon: "timer", children: [
8721
8727
  tried.ms,
8722
8728
  "ms"
8723
8729
  ] })
8724
8730
  ] }),
8725
- /* @__PURE__ */ jsx82(Json, { obj: tried.error ? { error: tried.error } : tried.data })
8731
+ /* @__PURE__ */ jsx83(Json, { obj: tried.error ? { error: tried.error } : tried.data })
8726
8732
  ] }) : null
8727
8733
  ] })
8728
8734
  ] }) });
@@ -8752,46 +8758,46 @@ function ApiSpecBrowser({
8752
8758
  const listCount = spec.filter((s) => s.isList).length;
8753
8759
  return /* @__PURE__ */ jsxs71("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 1100 }, ...rest, children: [
8754
8760
  /* @__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
8761
+ kicker ? /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: kicker }) : null,
8762
+ /* @__PURE__ */ jsx83("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
8763
+ lede ? /* @__PURE__ */ jsx83("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede }) : null
8758
8764
  ] }),
8759
8765
  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" }),
8766
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", children: "Filter by screen \u2014 every endpoint that screen depends on" }),
8761
8767
  /* @__PURE__ */ jsxs71("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
8762
8768
  /* @__PURE__ */ jsxs71(Tag, { icon: "stack", selected: !mod, onClick: () => setMod(null), children: [
8763
8769
  "All screens ",
8764
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: spec.length })
8770
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: spec.length })
8765
8771
  ] }),
8766
8772
  modules.map((m) => /* @__PURE__ */ jsxs71(Tag, { icon: m.icon, selected: mod === m.id, onClick: () => setMod(mod === m.id ? null : m.id), children: [
8767
8773
  m.label,
8768
8774
  " ",
8769
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: m.endpoints.length })
8775
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: m.endpoints.length })
8770
8776
  ] }, m.id))
8771
8777
  ] }),
8772
- activeModule ? /* @__PURE__ */ jsx82(
8778
+ activeModule ? /* @__PURE__ */ jsx83(
8773
8779
  Flag,
8774
8780
  {
8775
8781
  tone: "info",
8776
8782
  statement: activeModule.label + " calls " + activeModule.endpoints.length + " endpoints.",
8777
8783
  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" })
8784
+ actions: /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", icon: "x", onClick: () => setMod(null), children: "Show all screens" })
8779
8785
  }
8780
8786
  ) : null
8781
8787
  ] }) : null,
8782
- sourceNote ? /* @__PURE__ */ jsx82(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
8788
+ sourceNote ? /* @__PURE__ */ jsx83(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
8783
8789
  /* @__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 } }),
8790
+ /* @__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
8791
  methods.map((m) => /* @__PURE__ */ jsxs71(Tag, { selected: method === m, onClick: () => setMethod(method === m ? null : m), children: [
8786
8792
  m,
8787
8793
  " ",
8788
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
8794
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
8789
8795
  ] }, m)),
8790
8796
  listCount ? /* @__PURE__ */ jsxs71(Tag, { icon: "rows", selected: listOnly, onClick: () => setListOnly(!listOnly), children: [
8791
8797
  "Paged lists ",
8792
- /* @__PURE__ */ jsx82("span", { className: "fd-mono", children: listCount })
8798
+ /* @__PURE__ */ jsx83("span", { className: "fd-mono", children: listCount })
8793
8799
  ] }) : null,
8794
- /* @__PURE__ */ jsx82("span", { style: { flex: 1 } }),
8800
+ /* @__PURE__ */ jsx83("span", { style: { flex: 1 } }),
8795
8801
  /* @__PURE__ */ jsxs71("span", { className: "fd-body-sm fd-muted", children: [
8796
8802
  hits.length,
8797
8803
  " of ",
@@ -8800,23 +8806,23 @@ function ApiSpecBrowser({
8800
8806
  listCount ? " \xB7 " + listCount + " paged" : ""
8801
8807
  ] })
8802
8808
  ] }),
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]) => {
8809
+ 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
8810
  const items = hits.filter((s) => ids.indexOf(s.id) >= 0);
8805
8811
  if (!items.length) return null;
8806
8812
  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))
8813
+ /* @__PURE__ */ jsx83("span", { className: "fd-label-lg", children: g }),
8814
+ items.map((s) => /* @__PURE__ */ jsx83(Endpoint, { s, onRequest }, s.id))
8809
8815
  ] }, g);
8810
8816
  }),
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 })
8817
+ 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: [
8818
+ /* @__PURE__ */ jsx83("span", { className: "fd-overline fd-muted", style: { width: 110, flex: "none", paddingTop: 2 }, children: k }),
8819
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: v })
8814
8820
  ] }, 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 }),
8821
+ 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: [
8822
+ /* @__PURE__ */ jsx83(Badge, { tone: "danger", children: id }),
8817
8823
  /* @__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 })
8824
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: question }),
8825
+ /* @__PURE__ */ jsx83("span", { className: "fd-body-sm fd-muted", children: why })
8820
8826
  ] })
8821
8827
  ] }, id)) }) }) : null
8822
8828
  ] });
@@ -8824,7 +8830,7 @@ function ApiSpecBrowser({
8824
8830
 
8825
8831
  // src/components/platform/ProfilePage.tsx
8826
8832
  import * as React60 from "react";
8827
- import { jsx as jsx83, jsxs as jsxs72 } from "react/jsx-runtime";
8833
+ import { jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
8828
8834
  function fieldInitialValue(field, user) {
8829
8835
  if (field.value) return field.value(user);
8830
8836
  const raw = user[field.key];
@@ -8912,35 +8918,35 @@ function ProfilePage({
8912
8918
  const fieldGroups = groupFields(fields);
8913
8919
  return /* @__PURE__ */ jsxs72("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 860 }, children: [
8914
8920
  /* @__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." })
8921
+ /* @__PURE__ */ jsx84("span", { className: "fd-overline fd-muted", children: "Account" }),
8922
+ /* @__PURE__ */ jsx84("h1", { className: "fd-h1", style: { margin: 0 }, children: "Your profile" }),
8923
+ /* @__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
8924
  ] }),
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" }),
8925
+ /* @__PURE__ */ jsx84(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs72("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap", alignItems: "flex-start" }, children: [
8926
+ /* @__PURE__ */ jsx84(Avatar, { name: displayName, size: "lg" }),
8921
8927
  /* @__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 }),
8928
+ /* @__PURE__ */ jsx84("span", { className: "fd-h3", style: { margin: 0 }, children: displayName }),
8923
8929
  /* @__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
8930
+ roles.map((r) => /* @__PURE__ */ jsx84(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)),
8931
+ user.sso ? /* @__PURE__ */ jsx84(Badge, { tone: "info", icon: "shield-check", children: "SSO" }) : null
8926
8932
  ] })
8927
8933
  ] }),
8928
- onChangePhoto ? /* @__PURE__ */ jsx83(Button, { variant: "secondary", size: "sm", icon: "image", onClick: onChangePhoto, children: "Change photo" }) : null
8934
+ onChangePhoto ? /* @__PURE__ */ jsx84(Button, { variant: "secondary", size: "sm", icon: "image", onClick: onChangePhoto, children: "Change photo" }) : null
8929
8935
  ] }) }),
8930
- fieldGroups.map(({ group, description, fields: groupFieldDefs }) => /* @__PURE__ */ jsx83(
8936
+ fieldGroups.map(({ group, description, fields: groupFieldDefs }) => /* @__PURE__ */ jsx84(
8931
8937
  Card,
8932
8938
  {
8933
8939
  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 })
8940
+ /* @__PURE__ */ jsx84("span", { children: group }),
8941
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: description })
8936
8942
  ] }) : group,
8937
8943
  elevation: "flat",
8938
8944
  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) => {
8945
+ /* @__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
8946
  const help = typeof field.help === "function" ? field.help(user) : field.help;
8941
8947
  const readOnly = field.readOnly || field.type === "readonly";
8942
8948
  if (field.type === "select") {
8943
- return /* @__PURE__ */ jsx83(
8949
+ return /* @__PURE__ */ jsx84(
8944
8950
  Select,
8945
8951
  {
8946
8952
  label: field.label,
@@ -8954,7 +8960,7 @@ function ProfilePage({
8954
8960
  field.key
8955
8961
  );
8956
8962
  }
8957
- return /* @__PURE__ */ jsx83(
8963
+ return /* @__PURE__ */ jsx84(
8958
8964
  Input,
8959
8965
  {
8960
8966
  label: field.label,
@@ -8970,7 +8976,7 @@ function ProfilePage({
8970
8976
  }) }),
8971
8977
  groupFieldDefs.filter((f) => f.type === "textarea").map((field) => {
8972
8978
  const help = typeof field.help === "function" ? field.help(user) : field.help;
8973
- return /* @__PURE__ */ jsx83(
8979
+ return /* @__PURE__ */ jsx84(
8974
8980
  Textarea,
8975
8981
  {
8976
8982
  label: field.label,
@@ -8990,16 +8996,16 @@ function ProfilePage({
8990
8996
  group
8991
8997
  )),
8992
8998
  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,
8999
+ 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
9000
  /* @__PURE__ */ jsxs72(
8995
9001
  Card,
8996
9002
  {
8997
9003
  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" })
9004
+ /* @__PURE__ */ jsx84("span", { children: "Access" }),
9005
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "What your roles grant you" })
9000
9006
  ] }),
9001
9007
  elevation: "flat",
9002
- action: /* @__PURE__ */ jsx83(
9008
+ action: /* @__PURE__ */ jsx84(
9003
9009
  Button,
9004
9010
  {
9005
9011
  size: "sm",
@@ -9011,34 +9017,34 @@ function ProfilePage({
9011
9017
  ),
9012
9018
  children: [
9013
9019
  /* @__PURE__ */ jsxs72("div", { className: "fd-stack", style: { gap: 0 }, children: [
9014
- /* @__PURE__ */ jsx83(CardRow, { label: "Roles", children: roles.map((r) => r.name).join(", ") || "None" }),
9020
+ /* @__PURE__ */ jsx84(CardRow, { label: "Roles", children: roles.map((r) => r.name).join(", ") || "None" }),
9015
9021
  /* @__PURE__ */ jsxs72(CardRow, { label: "Permissions", children: [
9016
9022
  permissions.length,
9017
9023
  " granted"
9018
9024
  ] }),
9019
- /* @__PURE__ */ jsx83(CardRow, { label: "Member since", children: user.joined || "\u2014" })
9025
+ /* @__PURE__ */ jsx84(CardRow, { label: "Member since", children: user.joined || "\u2014" })
9020
9026
  ] }),
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." })
9027
+ /* @__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
9028
  ]
9023
9029
  }
9024
9030
  ),
9025
- sessions ? /* @__PURE__ */ jsx83(
9031
+ sessions ? /* @__PURE__ */ jsx84(
9026
9032
  Card,
9027
9033
  {
9028
9034
  title: "Signed-in devices",
9029
9035
  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" }),
9036
+ action: /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", icon: "sign-out", onClick: onSignOutEverywhere, children: "Sign out everywhere" }),
9037
+ 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: [
9038
+ /* @__PURE__ */ jsx84("i", { className: "ph ph-device-mobile", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
9033
9039
  /* @__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 }),
9040
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: s.device }),
9035
9041
  /* @__PURE__ */ jsxs72("span", { className: "fd-body-sm fd-muted", children: [
9036
9042
  s.where,
9037
9043
  " \xB7 ",
9038
9044
  s.when
9039
9045
  ] })
9040
9046
  ] }),
9041
- s.current ? /* @__PURE__ */ jsx83(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx83(Button, { size: "sm", variant: "ghost", children: "Revoke" })
9047
+ s.current ? /* @__PURE__ */ jsx84(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", children: "Revoke" })
9042
9048
  ] }, s.id)) })
9043
9049
  }
9044
9050
  ) : null,
@@ -9053,16 +9059,16 @@ function ProfilePage({
9053
9059
  border: "1px solid var(--border)",
9054
9060
  boxShadow: "0 -4px 16px rgba(11,13,17,.06)"
9055
9061
  }, 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" })
9062
+ /* @__PURE__ */ jsx84("span", { className: "fd-body-sm", style: { fontWeight: 600, flex: 1 }, children: saved ? "Saved." : dirty ? "Unsaved changes" : "No pending changes" }),
9063
+ /* @__PURE__ */ jsx84(Button, { size: "sm", variant: "ghost", disabled: !dirty || saving, onClick: discard, children: "Discard" }),
9064
+ /* @__PURE__ */ jsx84(Button, { size: "sm", icon: "check", disabled: !dirty || !canSave, loading: saving, onClick: save, children: "Save changes" })
9059
9065
  ] })
9060
9066
  ] });
9061
9067
  }
9062
9068
 
9063
9069
  // src/components/platform/SessionScreen.tsx
9064
9070
  import * as React61 from "react";
9065
- import { Fragment as Fragment21, jsx as jsx84, jsxs as jsxs73 } from "react/jsx-runtime";
9071
+ import { Fragment as Fragment21, jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
9066
9072
  var COPY = {
9067
9073
  "signing-in": { busy: "Signing you in\u2026" },
9068
9074
  "session-expired": { busy: "Your session expired \u2014 signing you back in\u2026" },
@@ -9084,19 +9090,19 @@ function SessionScreen({ kind, error, onRetry, productName }) {
9084
9090
  React61.useEffect(() => {
9085
9091
  titleRef.current?.focus({ preventScroll: true });
9086
9092
  }, [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" }) }),
9093
+ return /* @__PURE__ */ jsx85("main", { className: "fd-session-screen", children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-inner", children: [
9094
+ /* @__PURE__ */ jsx85("div", { className: "fd-session-screen-mark", "data-theme": "dark", children: /* @__PURE__ */ jsx85(FlytedeskMark, { size: "lg" }) }),
9089
9095
  /* @__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 })
9096
+ /* @__PURE__ */ jsx85("div", { className: "fd-session-screen-stripe" }),
9097
+ /* @__PURE__ */ jsx85(Card, { children: /* @__PURE__ */ jsxs73("div", { className: "fd-session-screen-body", children: [
9098
+ /* @__PURE__ */ jsx85("h1", { ref: titleRef, tabIndex: -1, className: "fd-h3 fd-session-screen-title", children: productName }),
9099
+ /* @__PURE__ */ jsx85("div", { role: "status", "aria-live": "polite", className: "fd-session-screen-status", children: busyMessage !== null ? /* @__PURE__ */ jsxs73(Fragment21, { children: [
9100
+ /* @__PURE__ */ jsx85("span", { className: "fd-spinner fd-spinner-lg fd-session-screen-spinner", "aria-hidden": "true" }),
9101
+ /* @__PURE__ */ jsx85("p", { className: "fd-body fd-session-screen-message", children: announced })
9096
9102
  ] }) : null }),
9097
9103
  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
9104
+ /* @__PURE__ */ jsx85(Banner, { tone: "danger", title: failureTitle, detail: error ?? void 0 }),
9105
+ onRetry !== null ? /* @__PURE__ */ jsx85(Button, { variant: "primary", block: true, onClick: onRetry, children: "Try again" }) : null
9100
9106
  ] }) : null
9101
9107
  ] }) })
9102
9108
  ] })
@@ -10919,7 +10925,7 @@ var UseRuntimeMode = useRuntimeMode;
10919
10925
  var UseFeatureStatus = useFeatureStatus;
10920
10926
 
10921
10927
  // src/components/platform/RoadmapTimeline.tsx
10922
- import { jsx as jsx85, jsxs as jsxs74 } from "react/jsx-runtime";
10928
+ import { jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
10923
10929
  var STATUS = {
10924
10930
  shipped: { tone: "success", icon: "check-circle", label: "Wired" },
10925
10931
  next: { tone: "warning", icon: "traffic-cone", label: "Not wired" },
@@ -10934,43 +10940,43 @@ function RoadmapCard({ item, byKey, onOpenFlag }) {
10934
10940
  const s = STATUS[item.status] || STATUS.planned;
10935
10941
  const deps = (item.dependsOn || []).map((k) => byKey[k]).filter(Boolean);
10936
10942
  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: [
10943
+ return /* @__PURE__ */ jsx86(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 10 }, children: [
10938
10944
  /* @__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 })
10945
+ /* @__PURE__ */ jsx86("span", { className: "fd-body", style: { fontWeight: 700, flex: 1, minWidth: 140 }, children: item.label }),
10946
+ /* @__PURE__ */ jsx86(Badge, { tone: "neutral", icon: PROJECT_ICON[item.project] || "squares-four", children: item.project }),
10947
+ /* @__PURE__ */ jsx86(Badge, { tone: s.tone, icon: s.icon, children: s.label })
10942
10948
  ] }),
10943
- /* @__PURE__ */ jsx85("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
10949
+ /* @__PURE__ */ jsx86("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
10944
10950
  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 })
10951
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", style: { width: 62, flex: "none", paddingTop: 2 }, children: "Backend" }),
10952
+ /* @__PURE__ */ jsx86("span", { className: "fd-body-sm", style: { flex: 1, textWrap: "pretty" }, children: item.backend })
10947
10953
  ] }) : null,
10948
10954
  /* @__PURE__ */ jsxs74("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
10949
10955
  item.effort ? /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm fd-muted", children: [
10950
- /* @__PURE__ */ jsx85("i", { className: "ph ph-hourglass-medium" }),
10956
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-hourglass-medium" }),
10951
10957
  " ",
10952
10958
  item.effort
10953
10959
  ] }) : null,
10954
10960
  /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm fd-muted", children: [
10955
- /* @__PURE__ */ jsx85("i", { className: "ph ph-user" }),
10961
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-user" }),
10956
10962
  " ",
10957
10963
  item.owner
10958
10964
  ] }),
10959
- item.screen ? /* @__PURE__ */ jsx85(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
10960
- /* @__PURE__ */ jsx85("span", { style: { flex: 1 } }),
10961
- /* @__PURE__ */ jsx85(
10965
+ item.screen ? /* @__PURE__ */ jsx86(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
10966
+ /* @__PURE__ */ jsx86("span", { style: { flex: 1 } }),
10967
+ /* @__PURE__ */ jsx86(
10962
10968
  "button",
10963
10969
  {
10964
10970
  type: "button",
10965
10971
  onClick: () => onOpenFlag && onOpenFlag(item.key),
10966
10972
  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 })
10973
+ children: /* @__PURE__ */ jsx86("code", { className: "fd-mono", style: { fontSize: 11, color: "var(--brand)" }, children: item.key })
10968
10974
  }
10969
10975
  )
10970
10976
  ] }),
10971
10977
  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))
10978
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", style: { paddingTop: 3 }, children: "After" }),
10979
+ deps.map((d) => /* @__PURE__ */ jsx86(Tag, { icon: d.implemented ? "check" : "clock", children: d.label }, d.key))
10974
10980
  ] }) : null,
10975
10981
  blocking.length && !item.implemented ? /* @__PURE__ */ jsxs74("span", { className: "fd-body-sm", style: { color: "var(--warn-text)" }, children: [
10976
10982
  "Blocked until ",
@@ -11027,21 +11033,21 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11027
11033
  let lastPhase = null;
11028
11034
  return /* @__PURE__ */ jsxs74("div", { className: "fd-stack", style: { gap: 16, maxWidth: 1e3 }, children: [
11029
11035
  /* @__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." })
11036
+ /* @__PURE__ */ jsx86("span", { className: "fd-overline fd-muted", children: "Architecture" }),
11037
+ /* @__PURE__ */ jsx86("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
11038
+ /* @__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
11039
  ] }),
11034
11040
  /* @__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" })
11041
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Wired", value: String(rm.shipped), sub: "of " + rm.items.length + " features" }),
11042
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Remaining", value: String(rm.remaining), sub: "backend work" }),
11043
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Est. effort", value: days ? days + " days" : "\u2014", sub: "sum of estimates, not calendar" }),
11044
+ /* @__PURE__ */ jsx86(StatTile, { compact: true, label: "Up next", value: nextPhase ? "Phase " + nextPhase.phase : "\u2014", sub: nextPhase ? nextPhase.phaseName : "all wired" })
11039
11045
  ] }),
11040
11046
  /* @__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(
11047
+ /* @__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 } }),
11048
+ /* @__PURE__ */ jsx86(Select, { placeholder: "All projects", value: project, onChange: (e) => setProject(e.target.value), options: projects, style: { width: 190 } }),
11049
+ /* @__PURE__ */ jsx86("span", { style: { flex: 1 } }),
11050
+ /* @__PURE__ */ jsx86(
11045
11051
  Button,
11046
11052
  {
11047
11053
  size: "sm",
@@ -11055,7 +11061,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11055
11061
  }
11056
11062
  )
11057
11063
  ] }),
11058
- /* @__PURE__ */ jsx85(
11064
+ /* @__PURE__ */ jsx86(
11059
11065
  Flag,
11060
11066
  {
11061
11067
  tone: "info",
@@ -11064,8 +11070,8 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11064
11070
  actions: null
11065
11071
  }
11066
11072
  ),
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%" } }) }),
11073
+ /* @__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: [
11074
+ /* @__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
11075
  items.map((item, n) => {
11070
11076
  const showPhase = item.phase !== lastPhase;
11071
11077
  lastPhase = item.phase;
@@ -11074,7 +11080,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11074
11080
  return /* @__PURE__ */ jsxs74(React64.Fragment, { children: [
11075
11081
  showPhase ? /* @__PURE__ */ jsxs74("div", { className: "fd-rm-era", children: [
11076
11082
  /* @__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 }),
11083
+ /* @__PURE__ */ jsx86("span", { style: { fontWeight: 700 }, children: item.phase === 0 ? "Shipped" : "Phase " + item.phase + " \u2014 " + item.phaseName }),
11078
11084
  item.phase === 0 ? null : /* @__PURE__ */ jsxs74("span", { className: "fd-mono", style: { opacity: 0.7, fontWeight: 400 }, children: [
11079
11085
  fmtDate(item.phaseStart),
11080
11086
  " \u2013 ",
@@ -11087,28 +11093,28 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11087
11093
  inPhase === 1 ? "" : "s"
11088
11094
  ] })
11089
11095
  ] }),
11090
- item.phaseWhy ? /* @__PURE__ */ jsx85("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
11096
+ item.phaseWhy ? /* @__PURE__ */ jsx86("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
11091
11097
  ] }) : 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" }),
11098
+ isBoundary ? /* @__PURE__ */ jsx86("div", { className: "fd-rm-now", ref: nowRef, children: /* @__PURE__ */ jsxs74("span", { className: "fd-rm-now-pill", children: [
11099
+ /* @__PURE__ */ jsx86("i", { className: "ph ph-map-pin" }),
11094
11100
  " You are here \u2014 everything above is wired"
11095
11101
  ] }) }) : null,
11096
11102
  /* @__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" : "") }),
11103
+ /* @__PURE__ */ jsx86("span", { className: "fd-rm-dot " + (item.implemented ? "is-shipped" : item.status === "next" ? "is-next" : "") }),
11098
11104
  /* @__PURE__ */ jsxs74("div", { className: "fd-rm-date", children: [
11099
11105
  fmtDate(item.date),
11100
- /* @__PURE__ */ jsx85("br", {}),
11101
- /* @__PURE__ */ jsx85("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
11106
+ /* @__PURE__ */ jsx86("br", {}),
11107
+ /* @__PURE__ */ jsx86("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
11102
11108
  ] }),
11103
- /* @__PURE__ */ jsx85(RoadmapCard, { item, byKey, onOpenFlag })
11109
+ /* @__PURE__ */ jsx86(RoadmapCard, { item, byKey, onOpenFlag })
11104
11110
  ] })
11105
11111
  ] }, item.key);
11106
11112
  }),
11107
- !items.length ? /* @__PURE__ */ jsx85("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
11113
+ !items.length ? /* @__PURE__ */ jsx86("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
11108
11114
  ] }) }) }),
11109
11115
  /* @__PURE__ */ jsxs74("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: [
11110
11116
  "Derived from the feature-flag registry \u2014 each entry's status is its flag's ",
11111
- /* @__PURE__ */ jsx85("code", { className: "fd-mono", children: "implemented" }),
11117
+ /* @__PURE__ */ jsx86("code", { className: "fd-mono", children: "implemented" }),
11112
11118
  " field, so this page cannot drift from what the apps actually do."
11113
11119
  ] })
11114
11120
  ] });
@@ -11117,7 +11123,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
11117
11123
  // src/components/platform/ComingSoon.tsx
11118
11124
  import * as React65 from "react";
11119
11125
  import { createPortal as createPortal6 } from "react-dom";
11120
- import { Fragment as Fragment23, jsx as jsx86, jsxs as jsxs75 } from "react/jsx-runtime";
11126
+ import { Fragment as Fragment23, jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
11121
11127
  var BYPASS_STORE = "fd.soon.bypass.v1";
11122
11128
  function readBypassed() {
11123
11129
  try {
@@ -11149,33 +11155,33 @@ function useBypass(key) {
11149
11155
  function SoonCard({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass }) {
11150
11156
  return /* @__PURE__ */ jsxs75(Fragment23, { children: [
11151
11157
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-badge", children: [
11152
- /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11158
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11153
11159
  label
11154
11160
  ] }),
11155
- detail ? /* @__PURE__ */ jsx86("span", { className: "fd-soon-detail", children: detail }) : null,
11161
+ detail ? /* @__PURE__ */ jsx87("span", { className: "fd-soon-detail", children: detail }) : null,
11156
11162
  backend ? /* @__PURE__ */ jsxs75("span", { className: "fd-soon-backend", children: [
11157
- /* @__PURE__ */ jsx86("span", { className: "fd-overline", children: "Needs" }),
11163
+ /* @__PURE__ */ jsx87("span", { className: "fd-overline", children: "Needs" }),
11158
11164
  " ",
11159
11165
  backend
11160
11166
  ] }) : null,
11161
11167
  eta || effort || onRoadmap ? /* @__PURE__ */ jsxs75("span", { className: "fd-soon-meta", children: [
11162
11168
  eta ? /* @__PURE__ */ jsxs75("span", { children: [
11163
- /* @__PURE__ */ jsx86("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
11169
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
11164
11170
  " ",
11165
11171
  eta
11166
11172
  ] }) : null,
11167
11173
  effort ? /* @__PURE__ */ jsxs75("span", { children: [
11168
- /* @__PURE__ */ jsx86("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
11174
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
11169
11175
  " ",
11170
11176
  effort
11171
11177
  ] }) : null,
11172
11178
  onRoadmap ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
11173
11179
  "See the roadmap ",
11174
- /* @__PURE__ */ jsx86("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11180
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11175
11181
  ] }) : null
11176
11182
  ] }) : null,
11177
11183
  allowed ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-view", onClick: onBypass, children: [
11178
- /* @__PURE__ */ jsx86("i", { className: "ph ph-eye", "aria-hidden": "true" }),
11184
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-eye", "aria-hidden": "true" }),
11179
11185
  " View and use it anyway"
11180
11186
  ] }) : null
11181
11187
  ] });
@@ -11237,7 +11243,7 @@ function ComingSoon({
11237
11243
  if (allowed && bypassed) {
11238
11244
  return /* @__PURE__ */ jsxs75("span", { className: ["fd-soon-inline-on", className].filter(Boolean).join(" "), ...rest, children: [
11239
11245
  children,
11240
- /* @__PURE__ */ jsx86(
11246
+ /* @__PURE__ */ jsx87(
11241
11247
  "button",
11242
11248
  {
11243
11249
  type: "button",
@@ -11245,12 +11251,12 @@ function ComingSoon({
11245
11251
  title: "Unwired \u2014 writes go to the simulated backend. " + tip + " Click to re-blur.",
11246
11252
  onClick: () => setBypassed(false),
11247
11253
  "aria-label": "Re-blur this unwired feature",
11248
- children: /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11254
+ children: /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11249
11255
  }
11250
11256
  )
11251
11257
  ] });
11252
11258
  }
11253
- return /* @__PURE__ */ jsx86(
11259
+ return /* @__PURE__ */ jsx87(
11254
11260
  InlineSoon,
11255
11261
  {
11256
11262
  label,
@@ -11273,17 +11279,17 @@ function ComingSoon({
11273
11279
  return /* @__PURE__ */ jsxs75("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, ...rest, children: [
11274
11280
  /* @__PURE__ */ jsxs75("div", { className: "fd-soon-bar", role: "status", children: [
11275
11281
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-badge", children: [
11276
- /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11282
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
11277
11283
  "Unwired feature \u2014 you are using it anyway"
11278
11284
  ] }),
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." }),
11285
+ /* @__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
11286
  /* @__PURE__ */ jsxs75("span", { className: "fd-soon-bar-actions", children: [
11281
11287
  onRoadmap ? /* @__PURE__ */ jsxs75("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
11282
11288
  "Roadmap ",
11283
- /* @__PURE__ */ jsx86("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11289
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11284
11290
  ] }) : null,
11285
11291
  /* @__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" }),
11292
+ /* @__PURE__ */ jsx87("i", { className: "ph ph-eye-slash", "aria-hidden": "true" }),
11287
11293
  " Re-blur"
11288
11294
  ] })
11289
11295
  ] })
@@ -11292,9 +11298,9 @@ function ComingSoon({
11292
11298
  ] });
11293
11299
  }
11294
11300
  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(
11301
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-under", style: { filter: "blur(" + blur + "px) saturate(.62)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11302
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-veil" }),
11303
+ /* @__PURE__ */ jsx87("div", { className: "fd-soon-note", role: "note", children: /* @__PURE__ */ jsx87(
11298
11304
  SoonCard,
11299
11305
  {
11300
11306
  label,
@@ -11345,8 +11351,8 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11345
11351
  onBlur: hide,
11346
11352
  ...rest,
11347
11353
  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(
11354
+ /* @__PURE__ */ jsx87("span", { className: "fd-soon-under", style: { filter: "blur(" + Math.min(blur, 1.1) + "px) saturate(.66)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
11355
+ /* @__PURE__ */ jsx87(
11350
11356
  "button",
11351
11357
  {
11352
11358
  type: "button",
@@ -11357,11 +11363,11 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11357
11363
  onFocus: show,
11358
11364
  onBlur: hide,
11359
11365
  onClick: () => open2 ? setOpen(false) : show(),
11360
- children: /* @__PURE__ */ jsx86("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11366
+ children: /* @__PURE__ */ jsx87("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
11361
11367
  }
11362
11368
  ),
11363
11369
  open2 && pos ? createPortal6(
11364
- /* @__PURE__ */ jsx86(
11370
+ /* @__PURE__ */ jsx87(
11365
11371
  "div",
11366
11372
  {
11367
11373
  ref: hoverCardRef,
@@ -11370,7 +11376,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11370
11376
  style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex },
11371
11377
  onMouseEnter: show,
11372
11378
  onMouseLeave: hide,
11373
- children: /* @__PURE__ */ jsx86(
11379
+ children: /* @__PURE__ */ jsx87(
11374
11380
  SoonCard,
11375
11381
  {
11376
11382
  label,
@@ -11400,7 +11406,7 @@ function formatEta(iso2) {
11400
11406
  var FormatEta = formatEta;
11401
11407
 
11402
11408
  // src/components/platform/Gate.tsx
11403
- import { jsx as jsx87, jsxs as jsxs76 } from "react/jsx-runtime";
11409
+ import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
11404
11410
  function PermissionDenied({ permission, title, detail, compact: compact3 = false, className = "", ...rest }) {
11405
11411
  const need = Array.isArray(permission) ? permission : [permission].filter(Boolean);
11406
11412
  return /* @__PURE__ */ jsxs76(
@@ -11420,13 +11426,13 @@ function PermissionDenied({ permission, title, detail, compact: compact3 = false
11420
11426
  ...rest,
11421
11427
  children: [
11422
11428
  /* @__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" })
11429
+ /* @__PURE__ */ jsx88("i", { className: "ph ph-lock-simple", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11430
+ /* @__PURE__ */ jsx88("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: title || "You do not have access to this" })
11425
11431
  ] }),
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." }),
11432
+ /* @__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
11433
  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: {
11434
+ /* @__PURE__ */ jsx88("span", { className: "fd-overline fd-muted", children: "Requires" }),
11435
+ need.map((p) => /* @__PURE__ */ jsx88("code", { className: "fd-mono", style: {
11430
11436
  fontSize: 11.5,
11431
11437
  padding: "2px 7px",
11432
11438
  borderRadius: 5,
@@ -11456,10 +11462,10 @@ function GatePending({ compact: compact3 = false, className = "" }) {
11456
11462
  },
11457
11463
  children: [
11458
11464
  /* @__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" })
11465
+ /* @__PURE__ */ jsx88("i", { className: "ph ph-arrows-clockwise", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
11466
+ /* @__PURE__ */ jsx88("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: "Reconnecting\u2026" })
11461
11467
  ] }),
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." })
11468
+ /* @__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
11469
  ]
11464
11470
  }
11465
11471
  );
@@ -11469,7 +11475,7 @@ function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, co
11469
11475
  if (pending) {
11470
11476
  if (pendingFallback !== void 0) return pendingFallback;
11471
11477
  if (silent) return null;
11472
- return /* @__PURE__ */ jsx87(GatePending, { compact: compact3 });
11478
+ return /* @__PURE__ */ jsx88(GatePending, { compact: compact3 });
11473
11479
  }
11474
11480
  let ok = true;
11475
11481
  if (perm) ok = ok && can2(perm);
@@ -11478,7 +11484,7 @@ function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, co
11478
11484
  if (ok) return children;
11479
11485
  if (fallback !== void 0) return fallback;
11480
11486
  if (silent) return null;
11481
- return /* @__PURE__ */ jsx87(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
11487
+ return /* @__PURE__ */ jsx88(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
11482
11488
  }
11483
11489
  function FeatureGate({
11484
11490
  flag,
@@ -11501,7 +11507,7 @@ function FeatureGate({
11501
11507
  const f = SessionKit.findFlag(flag) || {};
11502
11508
  const missing = rt.missing || [];
11503
11509
  const canBypass = pending ? false : bypassPerm === null ? false : !bypassPerm || can2(bypassPerm);
11504
- return /* @__PURE__ */ jsx87(
11510
+ return /* @__PURE__ */ jsx88(
11505
11511
  ComingSoon,
11506
11512
  {
11507
11513
  label: label || (variant === "inline" ? f.label || "Not wired yet" : "Designed \u2014 backend not wired yet"),
@@ -11522,22 +11528,22 @@ function FeatureGate({
11522
11528
  function PermissionHint({ perm, children }) {
11523
11529
  const { can: can2, pending } = useSessionContext();
11524
11530
  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 }) });
11531
+ 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
11532
  }
11527
11533
  if (can2(perm)) return children;
11528
- return /* @__PURE__ */ jsx87(
11534
+ return /* @__PURE__ */ jsx88(
11529
11535
  "span",
11530
11536
  {
11531
11537
  title: "Requires " + (Array.isArray(perm) ? perm.join(", ") : perm),
11532
11538
  style: { display: "inline-flex", opacity: 0.45, cursor: "not-allowed" },
11533
11539
  "aria-disabled": "true",
11534
- children: /* @__PURE__ */ jsx87("span", { style: { pointerEvents: "none" }, children })
11540
+ children: /* @__PURE__ */ jsx88("span", { style: { pointerEvents: "none" }, children })
11535
11541
  }
11536
11542
  );
11537
11543
  }
11538
11544
 
11539
11545
  // src/components/platform/ModeSwitch.tsx
11540
- import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs77 } from "react/jsx-runtime";
11546
+ import { Fragment as Fragment24, jsx as jsx89, jsxs as jsxs77 } from "react/jsx-runtime";
11541
11547
  function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
11542
11548
  const mode2 = useRuntimeMode();
11543
11549
  const panel = useInlinePanel();
@@ -11560,15 +11566,15 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11560
11566
  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
11567
  className: "fd-mode-btn" + (test ? " is-test" : "") + (open2 ? " is-open" : ""),
11562
11568
  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
11569
+ /* @__PURE__ */ jsx89("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), style: { fontSize: 17 } }),
11570
+ test && requestCount ? /* @__PURE__ */ jsx89("span", { className: "fd-mono fd-mode-count", children: requestCount > 99 ? "99+" : requestCount }, requestCount) : null
11565
11571
  ]
11566
11572
  }
11567
11573
  ),
11568
11574
  /* @__PURE__ */ jsxs77(InlinePanelSurface, { panel, align: "right", offset: 8, width: 400, className: "fd-mode-pop", label: test ? "Test mode" : "Live mode", children: [
11569
11575
  /* @__PURE__ */ jsxs77("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
11570
11576
  /* @__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" }),
11577
+ /* @__PURE__ */ jsx89("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
11572
11578
  test ? "Test mode" : "Live mode"
11573
11579
  ] }),
11574
11580
  test ? /* @__PURE__ */ jsxs77("span", { className: "fd-body-sm fd-muted fd-mono", children: [
@@ -11576,11 +11582,11 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11576
11582
  " simulated request",
11577
11583
  requestCount === 1 ? "" : "s"
11578
11584
  ] }) : 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
11585
+ /* @__PURE__ */ jsx89("span", { style: { flex: 1 } }),
11586
+ test && onClearLog ? /* @__PURE__ */ jsx89("button", { type: "button", className: "fd-soon-link", onClick: onClearLog, children: "Clear" }) : null
11581
11587
  ] }),
11582
11588
  /* @__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." }),
11589
+ /* @__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
11590
  /* @__PURE__ */ jsxs77("span", { className: "fd-row", style: { gap: 8, marginTop: 10, flexWrap: "wrap" }, children: [
11585
11591
  /* @__PURE__ */ jsxs77("span", { className: "fd-body-sm fd-muted fd-mono", children: [
11586
11592
  s.endpointsWired,
@@ -11593,36 +11599,36 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
11593
11599
  " features complete"
11594
11600
  ] }),
11595
11601
  onOpenSpec ? /* @__PURE__ */ jsxs77(Fragment24, { children: [
11596
- /* @__PURE__ */ jsx88("span", { style: { flex: 1 } }),
11602
+ /* @__PURE__ */ jsx89("span", { style: { flex: 1 } }),
11597
11603
  /* @__PURE__ */ jsxs77("button", { type: "button", className: "fd-soon-link", onClick: () => {
11598
11604
  setOpen(false);
11599
11605
  onOpenSpec();
11600
11606
  }, children: [
11601
11607
  "API spec ",
11602
- /* @__PURE__ */ jsx88("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11608
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
11603
11609
  ] })
11604
11610
  ] }) : null
11605
11611
  ] })
11606
11612
  ] }),
11607
11613
  /* @__PURE__ */ jsxs77("span", { className: "fd-mode-choice", children: [
11608
11614
  /* @__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" }),
11615
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11610
11616
  /* @__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" })
11617
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-title", children: "Live mode" }),
11618
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-desc", children: "Incomplete features under construction" })
11613
11619
  ] }),
11614
- !test ? /* @__PURE__ */ jsx88("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11620
+ !test ? /* @__PURE__ */ jsx89("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11615
11621
  ] }),
11616
11622
  /* @__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" }),
11623
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11618
11624
  /* @__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" })
11625
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-title", children: "Test mode" }),
11626
+ /* @__PURE__ */ jsx89("span", { className: "fd-mode-opt-desc", children: "Everything usable, all data simulated" })
11621
11627
  ] }),
11622
- test ? /* @__PURE__ */ jsx88("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11628
+ test ? /* @__PURE__ */ jsx89("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
11623
11629
  ] })
11624
11630
  ] }),
11625
- test && renderLog ? /* @__PURE__ */ jsx88("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
11631
+ test && renderLog ? /* @__PURE__ */ jsx89("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
11626
11632
  ] })
11627
11633
  ] });
11628
11634
  }
@@ -11631,19 +11637,19 @@ function TestModeBar({ onExit }) {
11631
11637
  if (mode2 !== "test") return null;
11632
11638
  return /* @__PURE__ */ jsxs77("div", { className: "fd-testbar", role: "status", children: [
11633
11639
  /* @__PURE__ */ jsxs77("span", { className: "fd-badge fd-badge-warning", children: [
11634
- /* @__PURE__ */ jsx88("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11640
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-flask", "aria-hidden": "true" }),
11635
11641
  "Test mode"
11636
11642
  ] }),
11637
- /* @__PURE__ */ jsx88("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
11643
+ /* @__PURE__ */ jsx89("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
11638
11644
  /* @__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" }),
11645
+ /* @__PURE__ */ jsx89("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
11640
11646
  " Back to live mode"
11641
11647
  ] })
11642
11648
  ] });
11643
11649
  }
11644
11650
 
11645
11651
  // src/components/planner/ChannelMeta.tsx
11646
- import { jsx as jsx89, jsxs as jsxs78 } from "react/jsx-runtime";
11652
+ import { jsx as jsx90, jsxs as jsxs78 } from "react/jsx-runtime";
11647
11653
  var CHANNEL_WEIGHTS = {
11648
11654
  "OOH": 50,
11649
11655
  "DOOH": 50,
@@ -11696,7 +11702,7 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
11696
11702
  const m = ChannelMeta(channel);
11697
11703
  const wt = channelWeightOf(channel || "");
11698
11704
  if (dot) {
11699
- return /* @__PURE__ */ jsx89("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
11705
+ return /* @__PURE__ */ jsx90("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
11700
11706
  }
11701
11707
  return /* @__PURE__ */ jsxs78(
11702
11708
  "span",
@@ -11706,16 +11712,16 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
11706
11712
  style: { "--chan": m.color },
11707
11713
  ...rest,
11708
11714
  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
11715
+ /* @__PURE__ */ jsx90("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }),
11716
+ showLabel ? /* @__PURE__ */ jsx90("span", { className: "fd-chan-label", children: m.label }) : null,
11717
+ weight ? /* @__PURE__ */ jsx90("span", { className: "fd-chan-weight", children: wt || 0 }) : null
11712
11718
  ]
11713
11719
  }
11714
11720
  );
11715
11721
  }
11716
11722
 
11717
11723
  // src/components/planner/SaturationDistribution.tsx
11718
- import { jsx as jsx90, jsxs as jsxs79 } from "react/jsx-runtime";
11724
+ import { jsx as jsx91, jsxs as jsxs79 } from "react/jsx-runtime";
11719
11725
  var BANDS2 = [
11720
11726
  { key: "weak", label: "Weak", n: 1, range: "< 50" },
11721
11727
  { key: "adequate", label: "Adequate", n: 2, range: "50\u2013100" },
@@ -11727,7 +11733,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11727
11733
  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));
11728
11734
  const floor = BANDS2.find((b) => b.key === floorBand) || BANDS2[0];
11729
11735
  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) => {
11736
+ /* @__PURE__ */ jsx91("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,minmax(0,1fr))", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
11731
11737
  const mark = "var(--csi-" + g.n + "-mark)";
11732
11738
  const active = selectedBand === g.key;
11733
11739
  return /* @__PURE__ */ jsxs79(
@@ -11737,13 +11743,13 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11737
11743
  onClick: onSelectBand ? () => onSelectBand(active ? null : g.key) : void 0,
11738
11744
  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
11745
  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) => (
11746
+ /* @__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
11747
  // `overflow: hidden` + `white-space: nowrap` only clips once the span
11742
11748
  // actually HAS a bounded width to clip against (see the grid/flex
11743
11749
  // `minWidth: 0` chain above) — `textOverflow: ellipsis` then makes
11744
11750
  // that clip readable instead of a hard cut mid-letter; the full name
11745
11751
  // is still one hover away via `title`.
11746
- /* @__PURE__ */ jsx90(
11752
+ /* @__PURE__ */ jsx91(
11747
11753
  "span",
11748
11754
  {
11749
11755
  title: c.name + " \xB7 " + c.crp,
@@ -11754,11 +11760,11 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11754
11760
  )
11755
11761
  )) }),
11756
11762
  /* @__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)) })
11763
+ /* @__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 }),
11764
+ /* @__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
11765
  ] }),
11760
11766
  /* @__PURE__ */ jsxs79("span", { className: "fd-stack", style: { gap: 1 }, children: [
11761
- /* @__PURE__ */ jsx90("span", { className: "fd-label-lg", children: g.label }),
11767
+ /* @__PURE__ */ jsx91("span", { className: "fd-label-lg", children: g.label }),
11762
11768
  /* @__PURE__ */ jsxs79("span", { className: "fd-body-sm fd-muted", style: { fontSize: 11.5 }, children: [
11763
11769
  "CRP ",
11764
11770
  g.range
@@ -11770,7 +11776,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11770
11776
  );
11771
11777
  }) }),
11772
11778
  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)) }),
11779
+ /* @__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
11780
  /* @__PURE__ */ jsxs79("span", { className: "fd-body-sm fd-secondary", style: { flex: 1, minWidth: 240 }, children: [
11775
11781
  /* @__PURE__ */ jsxs79("strong", { style: { color: "var(--text)" }, children: [
11776
11782
  "Plan floor ",
@@ -11784,7 +11790,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
11784
11790
 
11785
11791
  // src/components/planner/MixGap.tsx
11786
11792
  import * as React66 from "react";
11787
- import { Fragment as Fragment25, jsx as jsx91, jsxs as jsxs80 } from "react/jsx-runtime";
11793
+ import { Fragment as Fragment25, jsx as jsx92, jsxs as jsxs80 } from "react/jsx-runtime";
11788
11794
  var MIX_GAP_LAYOUT = {
11789
11795
  trackHeight: 30,
11790
11796
  barHeight: 20,
@@ -11806,11 +11812,11 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11806
11812
  return /* @__PURE__ */ jsxs80("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 4 }, children: [
11807
11813
  /* @__PURE__ */ jsxs80("div", { className: "fd-row", style: { gap: 16, justifyContent: "flex-end", paddingBottom: 6, flexWrap: "wrap" }, children: [
11808
11814
  [["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 } }),
11815
+ /* @__PURE__ */ jsx92("span", { style: { width: 14, height: 9, borderRadius: 2, background: c } }),
11810
11816
  l
11811
11817
  ] }, l)),
11812
11818
  /* @__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 } }),
11819
+ /* @__PURE__ */ jsx92("span", { "data-mixgap-legend-target": "", style: { width: targetWidth, height: 16, borderRadius: 1, background: MIX_GAP_TARGET_STRIPE } }),
11814
11820
  "Target"
11815
11821
  ] })
11816
11822
  ] }),
@@ -11827,15 +11833,15 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11827
11833
  onMouseEnter: () => setHover(r.channel),
11828
11834
  onMouseLeave: () => setHover(null),
11829
11835
  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 } }),
11836
+ /* @__PURE__ */ jsx92("span", { style: { width: 128, flex: "none" }, children: /* @__PURE__ */ jsx92(ChannelTag, { channel: r.channel, size: "sm" }) }),
11837
+ /* @__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(Fragment25, { children: [
11838
+ /* @__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)" } }),
11839
+ /* @__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
11840
  /* @__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
11841
  r.realized,
11836
11842
  "%"
11837
11843
  ] }),
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
11844
+ 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
11845
  ] }) })
11840
11846
  ]
11841
11847
  },
@@ -11846,7 +11852,7 @@ function MixGap({ rows = [], loading = false, className = "" }) {
11846
11852
  }
11847
11853
 
11848
11854
  // src/components/planner/ChannelContribution.tsx
11849
- import { jsx as jsx92, jsxs as jsxs81 } from "react/jsx-runtime";
11855
+ import { jsx as jsx93, jsxs as jsxs81 } from "react/jsx-runtime";
11850
11856
  var money = (n) => "$" + Math.round(n).toLocaleString();
11851
11857
  function ChannelContribution({
11852
11858
  channels = [],
@@ -11863,8 +11869,8 @@ function ChannelContribution({
11863
11869
  const pct = (v) => grand ? v / grand * 100 : 0;
11864
11870
  const spendTotal = channels.reduce((s, c) => s + Number(String(c.spend || 0).replace(/[^0-9.]/g, "")), 0);
11865
11871
  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(
11872
+ 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: [
11873
+ channels.map((c) => /* @__PURE__ */ jsx93(
11868
11874
  "span",
11869
11875
  {
11870
11876
  title: c.name + " \xB7 " + c.crp.toFixed(1) + " CRP",
@@ -11873,7 +11879,7 @@ function ChannelContribution({
11873
11879
  },
11874
11880
  c.name
11875
11881
  )),
11876
- bonus > 0 ? /* @__PURE__ */ jsx92(
11882
+ bonus > 0 ? /* @__PURE__ */ jsx93(
11877
11883
  "span",
11878
11884
  {
11879
11885
  title: "Surround-sound bonus +" + bonusPct + "%",
@@ -11883,17 +11889,17 @@ function ChannelContribution({
11883
11889
  ) : null
11884
11890
  ] }),
11885
11891
  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" })
11892
+ /* @__PURE__ */ jsx93("thead", { children: /* @__PURE__ */ jsxs81("tr", { children: [
11893
+ /* @__PURE__ */ jsx93("th", { style: { width: "34%" }, children: "Channel" }),
11894
+ /* @__PURE__ */ jsx93("th", { style: { width: "16%" }, children: "Weight" }),
11895
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "16%" }, children: "Spend" }),
11896
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "17%" }, children: "CRP" }),
11897
+ /* @__PURE__ */ jsx93("th", { className: "is-num", style: { width: "17%" }, children: "Share" })
11892
11898
  ] }) }),
11893
11899
  /* @__PURE__ */ jsxs81("tbody", { children: [
11894
11900
  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(
11901
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsx93(ChannelTag, { channel: c.name, size: "sm" }) }),
11902
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsx93(
11897
11903
  "span",
11898
11904
  {
11899
11905
  className: "fd-badge fd-badge-neutral",
@@ -11902,38 +11908,38 @@ function ChannelContribution({
11902
11908
  children: "weight " + (channelWeightOf(c.name) || 0)
11903
11909
  }
11904
11910
  ) }),
11905
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: c.spend }),
11906
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: c.crp.toFixed(1) }),
11911
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: c.spend }),
11912
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: c.crp.toFixed(1) }),
11907
11913
  /* @__PURE__ */ jsxs81("td", { className: "is-num", children: [
11908
11914
  pct(c.crp).toFixed(0),
11909
11915
  "%"
11910
11916
  ] })
11911
11917
  ] }, c.name)),
11912
11918
  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" } }),
11919
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-row", style: { gap: 9, fontWeight: 600 }, children: [
11920
+ /* @__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
11921
  "Surround-sound bonus"
11916
11922
  ] }) }),
11917
- /* @__PURE__ */ jsx92("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
11923
+ /* @__PURE__ */ jsx93("td", { children: /* @__PURE__ */ jsxs81("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
11918
11924
  "+",
11919
11925
  bonusPct,
11920
11926
  "% of +",
11921
11927
  bonusMax,
11922
11928
  "%"
11923
11929
  ] }) }),
11924
- /* @__PURE__ */ jsx92("td", { className: "is-num fd-muted", children: "\u2014" }),
11925
- /* @__PURE__ */ jsx92("td", { className: "is-num", children: bonus.toFixed(1) }),
11930
+ /* @__PURE__ */ jsx93("td", { className: "is-num fd-muted", children: "\u2014" }),
11931
+ /* @__PURE__ */ jsx93("td", { className: "is-num", children: bonus.toFixed(1) }),
11926
11932
  /* @__PURE__ */ jsxs81("td", { className: "is-num", children: [
11927
11933
  pct(bonus).toFixed(0),
11928
11934
  "%"
11929
11935
  ] })
11930
11936
  ] }) : null,
11931
11937
  /* @__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%" })
11938
+ /* @__PURE__ */ jsx93("td", { style: { fontWeight: 700 }, children: "Campus total" }),
11939
+ /* @__PURE__ */ jsx93("td", {}),
11940
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: money(spendTotal) }),
11941
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: grand.toFixed(1) }),
11942
+ /* @__PURE__ */ jsx93("td", { className: "is-num", style: { fontWeight: 700 }, children: "100%" })
11937
11943
  ] })
11938
11944
  ] })
11939
11945
  ] }) : null
@@ -11942,7 +11948,7 @@ function ChannelContribution({
11942
11948
 
11943
11949
  // src/components/planner/BudgetReallocator.tsx
11944
11950
  import * as React67 from "react";
11945
- import { Fragment as Fragment26, jsx as jsx93, jsxs as jsxs82 } from "react/jsx-runtime";
11951
+ import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs82 } from "react/jsx-runtime";
11946
11952
  var bandFor = (crp) => crp >= 200 ? "dominant" : crp >= 100 ? "strong" : crp >= 50 ? "adequate" : "weak";
11947
11953
  function BudgetReallocator({
11948
11954
  campus,
@@ -12004,16 +12010,16 @@ function BudgetReallocator({
12004
12010
  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
12011
  children: [
12006
12012
  /* @__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" }),
12013
+ /* @__PURE__ */ jsx94("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
12014
+ /* @__PURE__ */ jsx94(CsiBadge, { band: nowBand, crp, size: "medium" }),
12009
12015
  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 })
12016
+ /* @__PURE__ */ jsx94("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
12017
+ /* @__PURE__ */ jsx94(CsiBadge, { band: nextBand, crp: nextCrp, size: "medium", preview: true })
12012
12018
  ] }) : null
12013
12019
  ] }),
12014
12020
  /* @__PURE__ */ jsxs82("div", { className: "fd-slider", ref: trackRef, children: [
12015
- /* @__PURE__ */ jsx93("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
12016
- dirty ? /* @__PURE__ */ jsx93(
12021
+ /* @__PURE__ */ jsx94("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
12022
+ dirty ? /* @__PURE__ */ jsx94(
12017
12023
  "span",
12018
12024
  {
12019
12025
  ref: chipRef,
@@ -12025,7 +12031,7 @@ function BudgetReallocator({
12025
12031
  children: (delta < 0 ? "\u2212$" : "+$") + Math.abs(delta).toLocaleString()
12026
12032
  }
12027
12033
  ) : null,
12028
- /* @__PURE__ */ jsx93(
12034
+ /* @__PURE__ */ jsx94(
12029
12035
  "input",
12030
12036
  {
12031
12037
  type: "range",
@@ -12043,11 +12049,11 @@ function BudgetReallocator({
12043
12049
  ] }),
12044
12050
  /* @__PURE__ */ jsxs82("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
12045
12051
  /* @__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." })
12052
+ /* @__PURE__ */ jsx94("span", { className: "fd-num", style: { fontSize: 19, fontWeight: 700 }, children: "$" + draft.toLocaleString() }),
12053
+ /* @__PURE__ */ jsx94("span", { className: "fd-body-sm fd-muted", children: "Arrow keys step $100, shift+arrow $1,000. Escape reverts." })
12048
12054
  ] }),
12049
- /* @__PURE__ */ jsx93("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
12050
- /* @__PURE__ */ jsx93(
12055
+ /* @__PURE__ */ jsx94("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
12056
+ /* @__PURE__ */ jsx94(
12051
12057
  "button",
12052
12058
  {
12053
12059
  type: "button",
@@ -12066,7 +12072,7 @@ function BudgetReallocator({
12066
12072
  }
12067
12073
 
12068
12074
  // src/components/planner/SurroundSound.tsx
12069
- import { jsx as jsx94, jsxs as jsxs83 } from "react/jsx-runtime";
12075
+ import { jsx as jsx95, jsxs as jsxs83 } from "react/jsx-runtime";
12070
12076
  var CATEGORIES = [
12071
12077
  { key: "ooh", label: "OOH", icon: "flag-banner", color: "var(--ch-ooh)" },
12072
12078
  { key: "transit", label: "Transit", icon: "bus", color: "var(--ch-transit)" },
@@ -12079,7 +12085,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12079
12085
  const earned = Math.max(0, Math.min(1, bonusPct / bonusMax));
12080
12086
  const single = present.length <= 2;
12081
12087
  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) => {
12088
+ /* @__PURE__ */ jsx95("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: CATEGORIES.map((c) => {
12083
12089
  const on = present.includes(c.key);
12084
12090
  return /* @__PURE__ */ jsxs83(
12085
12091
  "span",
@@ -12087,8 +12093,8 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12087
12093
  title: c.label + (on ? " \u2014 present" : " \u2014 not bought"),
12088
12094
  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
12095
  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 })
12096
+ /* @__PURE__ */ jsx95("i", { className: "ph ph-" + c.icon, style: { fontSize: 19, color: on ? c.color : "var(--text-muted)" }, "aria-hidden": "true" }),
12097
+ /* @__PURE__ */ jsx95("span", { style: { fontSize: 10.5, fontWeight: 700 }, children: c.label })
12092
12098
  ]
12093
12099
  },
12094
12100
  c.key
@@ -12096,7 +12102,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12096
12102
  }) }),
12097
12103
  /* @__PURE__ */ jsxs83("div", { className: "fd-stack", style: { gap: 8 }, children: [
12098
12104
  /* @__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" }),
12105
+ /* @__PURE__ */ jsx95("span", { className: "fd-label-lg", children: "Surround-sound bonus earned" }),
12100
12106
  /* @__PURE__ */ jsxs83("span", { className: "fd-num", style: { color: single ? "var(--warn-text)" : "var(--csi-3-mark)", fontWeight: 700 }, children: [
12101
12107
  "+",
12102
12108
  bonusPct,
@@ -12105,7 +12111,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12105
12111
  "%"
12106
12112
  ] })
12107
12113
  ] }),
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)" } }) }),
12114
+ /* @__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
12115
  /* @__PURE__ */ jsxs83("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: [
12110
12116
  present.length,
12111
12117
  " of 6 channel categories present.",
@@ -12118,7 +12124,7 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
12118
12124
  }
12119
12125
 
12120
12126
  // src/components/planner/Importance.tsx
12121
- import { jsx as jsx95, jsxs as jsxs84 } from "react/jsx-runtime";
12127
+ import { jsx as jsx96, jsxs as jsxs84 } from "react/jsx-runtime";
12122
12128
  var IMPORTANCE_LEVELS = [
12123
12129
  { id: "nudge", rank: 1, label: "Nudge", icon: "feather", description: "Breaks a tie, nothing more." },
12124
12130
  { id: "lean", rank: 2, label: "Lean", icon: "arrow-bend-up-right", description: "A mild preference between otherwise equal options." },
@@ -12156,8 +12162,8 @@ function ImportanceTag({ level, showLabel = true, size = "sm", className = "", d
12156
12162
  title: lvl.label + " \u2014 " + lvl.description,
12157
12163
  "aria-disabled": disabled ? "true" : void 0,
12158
12164
  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 })
12165
+ /* @__PURE__ */ jsx96("i", { className: "ph ph-" + lvl.icon, "aria-hidden": "true" }),
12166
+ showLabel ? lvl.label : /* @__PURE__ */ jsx96("span", { className: "fd-sr", children: lvl.label })
12161
12167
  ]
12162
12168
  }
12163
12169
  );
@@ -12165,7 +12171,7 @@ function ImportanceTag({ level, showLabel = true, size = "sm", className = "", d
12165
12171
 
12166
12172
  // src/components/planner/PreferenceMeter.tsx
12167
12173
  import * as React68 from "react";
12168
- import { jsx as jsx96, jsxs as jsxs85 } from "react/jsx-runtime";
12174
+ import { jsx as jsx97, jsxs as jsxs85 } from "react/jsx-runtime";
12169
12175
  function preferenceScore(criteria) {
12170
12176
  const earned = criteria.reduce((n, c) => n + (Number(c.earned) || 0), 0);
12171
12177
  const weight = criteria.reduce((n, c) => n + (Number(c.weight) || 0), 0);
@@ -12195,7 +12201,7 @@ function PreferenceMeter({
12195
12201
  }) {
12196
12202
  const value = score == null ? preferenceScore(criteria) : score;
12197
12203
  const segments = React68.useMemo(() => preferenceSegments(criteria), [criteria]);
12198
- return /* @__PURE__ */ jsx96(
12204
+ return /* @__PURE__ */ jsx97(
12199
12205
  ScoreMeter,
12200
12206
  {
12201
12207
  score: value,
@@ -12209,20 +12215,20 @@ function PreferenceMeter({
12209
12215
  breakdownLabel: breakdownTitle,
12210
12216
  breakdown: /* @__PURE__ */ jsxs85("div", { className: "fd-prefbreak", children: [
12211
12217
  /* @__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) })
12218
+ /* @__PURE__ */ jsx97("span", { className: "fd-label-lg", children: breakdownTitle }),
12219
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-score fd-tabular", children: Math.round(value) })
12214
12220
  ] }),
12215
- /* @__PURE__ */ jsx96("ul", { className: "fd-prefbreak-list", children: criteria.map((c) => {
12221
+ /* @__PURE__ */ jsx97("ul", { className: "fd-prefbreak-list", children: criteria.map((c) => {
12216
12222
  const pct = c.weight > 0 ? Math.round((Number(c.earned) || 0) / c.weight * 100) : 0;
12217
12223
  return /* @__PURE__ */ jsxs85("li", { className: pct === 0 ? "fd-prefbreak-item is-unmet" : "fd-prefbreak-item", children: [
12218
- /* @__PURE__ */ jsx96(ImportanceTag, { level: c.importance }),
12224
+ /* @__PURE__ */ jsx97(ImportanceTag, { level: c.importance }),
12219
12225
  /* @__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
12226
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-label", children: c.label }),
12227
+ c.note ? /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-note", children: c.note }) : null
12222
12228
  ] }),
12223
12229
  /* @__PURE__ */ jsxs85("span", { className: "fd-prefbreak-val fd-tabular", children: [
12224
12230
  Math.round(Number(c.earned) || 0),
12225
- /* @__PURE__ */ jsx96("span", { className: "fd-prefbreak-sep", children: "/" }),
12231
+ /* @__PURE__ */ jsx97("span", { className: "fd-prefbreak-sep", children: "/" }),
12226
12232
  Math.round(c.weight)
12227
12233
  ] })
12228
12234
  ] }, c.id);
@@ -12650,7 +12656,7 @@ import * as React71 from "react";
12650
12656
 
12651
12657
  // src/components/chat/ChatTurn.tsx
12652
12658
  import * as React70 from "react";
12653
- import { jsx as jsx97, jsxs as jsxs86 } from "react/jsx-runtime";
12659
+ import { jsx as jsx98, jsxs as jsxs86 } from "react/jsx-runtime";
12654
12660
  function JsonView({ value }) {
12655
12661
  let text;
12656
12662
  try {
@@ -12658,7 +12664,7 @@ function JsonView({ value }) {
12658
12664
  } catch (e) {
12659
12665
  text = String(value);
12660
12666
  }
12661
- return /* @__PURE__ */ jsx97(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
12667
+ return /* @__PURE__ */ jsx98(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
12662
12668
  }
12663
12669
  function PacketCard({ packet, schema, render, onApply, applied }) {
12664
12670
  if (!packet) return null;
@@ -12667,19 +12673,19 @@ function PacketCard({ packet, schema, render, onApply, applied }) {
12667
12673
  const title = s.heading || packet.type;
12668
12674
  return /* @__PURE__ */ jsxs86("section", { className: "fdc-packet" + (invalid ? " is-invalid" : ""), "aria-label": title, children: [
12669
12675
  /* @__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
12676
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (s.icon || "package"), "aria-hidden": "true" }),
12677
+ /* @__PURE__ */ jsx98("span", { className: "fdc-packet-title", title: truncationTitle(title), children: title }),
12678
+ packet.repaired ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-badge", children: "Repaired" }) : null,
12679
+ invalid ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-badge is-danger", children: "Invalid" }) : null
12674
12680
  ] }),
12675
12681
  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 }) }),
12682
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12683
+ /* @__PURE__ */ jsx98("span", { children: packet.error || "This result failed validation and can\u2019t be applied." })
12684
+ ] }) : /* @__PURE__ */ jsx98("div", { className: "fdc-packet-body", children: render ? render(packet) : /* @__PURE__ */ jsx98(JsonView, { value: packet.payload }) }),
12679
12685
  !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", {}),
12686
+ packet.repaired ? /* @__PURE__ */ jsx98("span", { className: "fdc-packet-note", children: "Corrected by the backend after a first attempt." }) : /* @__PURE__ */ jsx98("span", {}),
12681
12687
  /* @__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" }),
12688
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (applied ? "check" : "arrow-square-in"), "aria-hidden": "true" }),
12683
12689
  applied ? "Applied" : s.applyLabel || "Apply"
12684
12690
  ] })
12685
12691
  ] }) : null
@@ -12690,16 +12696,16 @@ function ThinkingBlock({ text, durationMs, streaming, defaultOpen = false }) {
12690
12696
  if (!text) return null;
12691
12697
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-think" + (open2 ? " is-open" : ""), children: [
12692
12698
  /* @__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" }),
12699
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-brain", "aria-hidden": "true" }),
12700
+ /* @__PURE__ */ jsx98("span", { children: streaming ? "Thinking" : durationMs ? "Thought for " + formatDuration(durationMs) : "Thought process" }),
12695
12701
  streaming ? /* @__PURE__ */ jsxs86("span", { className: "fdc-dots", "aria-hidden": "true", children: [
12696
- /* @__PURE__ */ jsx97("span", {}),
12697
- /* @__PURE__ */ jsx97("span", {}),
12698
- /* @__PURE__ */ jsx97("span", {})
12702
+ /* @__PURE__ */ jsx98("span", {}),
12703
+ /* @__PURE__ */ jsx98("span", {}),
12704
+ /* @__PURE__ */ jsx98("span", {})
12699
12705
  ] }) : null,
12700
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12706
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12701
12707
  ] }),
12702
- open2 ? /* @__PURE__ */ jsx97("div", { className: "fdc-think-body", children: text }) : null
12708
+ open2 ? /* @__PURE__ */ jsx98("div", { className: "fdc-think-body", children: text }) : null
12703
12709
  ] });
12704
12710
  }
12705
12711
  function Citations({ items = [], onOpen }) {
@@ -12707,18 +12713,18 @@ function Citations({ items = [], onOpen }) {
12707
12713
  if (!items.length) return null;
12708
12714
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-cites", children: [
12709
12715
  /* @__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" }),
12716
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-quotes", "aria-hidden": "true" }),
12711
12717
  /* @__PURE__ */ jsxs86("span", { children: [
12712
12718
  items.length,
12713
12719
  " source",
12714
12720
  items.length === 1 ? "" : "s"
12715
12721
  ] }),
12716
- /* @__PURE__ */ jsx97("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12722
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-" + (open2 ? "up" : "down"), "aria-hidden": "true" })
12717
12723
  ] }),
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
12724
+ open2 ? /* @__PURE__ */ jsx98("ol", { className: "fdc-cites-list", children: items.map((c, i) => /* @__PURE__ */ jsxs86("li", { children: [
12725
+ /* @__PURE__ */ jsx98("span", { className: "fdc-cite-n fd-tabular", children: c.marker || i + 1 }),
12726
+ 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" }),
12727
+ c.detail ? /* @__PURE__ */ jsx98("span", { className: "fdc-cite-detail", children: c.detail }) : null
12722
12728
  ] }, c.id || i)) }) : null
12723
12729
  ] });
12724
12730
  }
@@ -12736,22 +12742,22 @@ function MessageBody({ message: m, ctx }) {
12736
12742
  const body = clamped != null ? clamped : raw;
12737
12743
  const showMd = ctx.markdown && !isUser;
12738
12744
  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,
12745
+ m.thinking && ctx.showThinking ? /* @__PURE__ */ jsx98(ThinkingBlock, { text: m.thinking, durationMs: m.thinkingMs, streaming: m.streaming && !m.text }) : null,
12746
+ 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
12747
  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
12748
+ showMd ? /* @__PURE__ */ jsx98(Markdown, { source: body, headingOffset: 2, codeProps: { collapseAfter: 22 }, renderCitation: ctx.renderCitation }) : /* @__PURE__ */ jsx98("div", { className: "fdc-plain", children: body }),
12749
+ m.streaming ? /* @__PURE__ */ jsx98("span", { className: "fdc-caret", "aria-hidden": "true" }) : null
12744
12750
  ] }) : null,
12745
12751
  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" }),
12752
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-down", "aria-hidden": "true" }),
12747
12753
  "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" })
12754
+ /* @__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
12755
  ] }) : 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" }),
12756
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-caret-up", "aria-hidden": "true" }),
12751
12757
  "Show less"
12752
12758
  ] }) : 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(
12759
+ m.attachments && m.attachments.length ? /* @__PURE__ */ jsx98(FileGrid, { files: m.attachments, onOpen: ctx.onOpenAttachment, tiles: true, maxHeight: ctx.attachmentHeight || 220, compact: ctx.narrow }) : null,
12760
+ m.packet ? /* @__PURE__ */ jsx98(
12755
12761
  PacketCard,
12756
12762
  {
12757
12763
  packet: m.packet,
@@ -12761,12 +12767,12 @@ function MessageBody({ message: m, ctx }) {
12761
12767
  applied: ctx.appliedPackets && ctx.appliedPackets[m.id]
12762
12768
  }
12763
12769
  ) : null,
12764
- m.citations && m.citations.length ? /* @__PURE__ */ jsx97(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
12770
+ m.citations && m.citations.length ? /* @__PURE__ */ jsx98(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
12765
12771
  m.working ? /* @__PURE__ */ jsxs86("div", { className: "fdc-working", role: "status", children: [
12766
12772
  /* @__PURE__ */ jsxs86("span", { className: "fdc-dots", "aria-hidden": "true", children: [
12767
- /* @__PURE__ */ jsx97("span", {}),
12768
- /* @__PURE__ */ jsx97("span", {}),
12769
- /* @__PURE__ */ jsx97("span", {})
12773
+ /* @__PURE__ */ jsx98("span", {}),
12774
+ /* @__PURE__ */ jsx98("span", {}),
12775
+ /* @__PURE__ */ jsx98("span", {})
12770
12776
  ] }),
12771
12777
  /* @__PURE__ */ jsxs86("span", { className: "fdc-working-label", children: [
12772
12778
  m.resumed ? "Resuming" : "Working",
@@ -12779,17 +12785,17 @@ function MessageBody({ message: m, ctx }) {
12779
12785
  m.job.detail
12780
12786
  ] }) : null
12781
12787
  ] }),
12782
- m.jobId ? /* @__PURE__ */ jsx97("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
12788
+ m.jobId ? /* @__PURE__ */ jsx98("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
12783
12789
  ] }) : null,
12784
12790
  m.stopped ? /* @__PURE__ */ jsxs86("div", { className: "fdc-stopped", children: [
12785
- /* @__PURE__ */ jsx97("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
12791
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
12786
12792
  "Stopped"
12787
12793
  ] }) : null,
12788
12794
  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 }),
12795
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
12796
+ /* @__PURE__ */ jsx98("span", { className: "fdc-error-text", children: ctx.errorCopy ? ctx.errorCopy(m.error) : m.error }),
12791
12797
  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" }),
12798
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12793
12799
  "Retry"
12794
12800
  ] }) : null
12795
12801
  ] }) : null
@@ -12804,14 +12810,14 @@ function RunActions({ group, ctx }) {
12804
12810
  if (!ctx.messageActions) return null;
12805
12811
  return /* @__PURE__ */ jsxs86("div", { className: "fdc-actions", role: "group", "aria-label": "Message actions", children: [
12806
12812
  /* @__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" })
12813
+ /* @__PURE__ */ jsx98("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
12814
+ /* @__PURE__ */ jsx98("span", { className: "fdc-act-label", children: copied ? "Copied" : "Copy" })
12809
12815
  ] }),
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,
12816
+ 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,
12817
+ 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
12818
  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" }) })
12819
+ /* @__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" }) }),
12820
+ /* @__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
12821
  ] }) : null,
12816
12822
  ctx.extraActions ? ctx.extraActions(group) : null
12817
12823
  ] });
@@ -12823,20 +12829,20 @@ function ChatTurn({ group, ctx }) {
12823
12829
  const stamp = group.messages[0].timestamp;
12824
12830
  return /* @__PURE__ */ jsxs86("article", { className: "fdc-turn is-" + group.role, "aria-label": String(name) + (stamp ? " at " + formatClock(stamp) : ""), children: [
12825
12831
  /* @__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
12832
+ 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,
12833
+ /* @__PURE__ */ jsx98("span", { className: "fdc-who", children: name }),
12834
+ stamp ? /* @__PURE__ */ jsx98(RelativeTime, { className: "fdc-when", value: stamp }) : null,
12835
+ group.messages.some((m) => m.model) ? /* @__PURE__ */ jsx98("span", { className: "fdc-turn-model", children: group.messages.find((m) => m.model).model }) : null
12830
12836
  ] }),
12831
12837
  /* @__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 })
12838
+ group.messages.map((m) => /* @__PURE__ */ jsx98("div", { className: "fdc-msg" + (m.pending ? " is-pending" : ""), children: /* @__PURE__ */ jsx98(MessageBody, { message: m, ctx }) }, m.id)),
12839
+ /* @__PURE__ */ jsx98(RunActions, { group, ctx })
12834
12840
  ] })
12835
12841
  ] });
12836
12842
  }
12837
12843
 
12838
12844
  // src/components/chat/ChatTranscript.tsx
12839
- import { jsx as jsx98, jsxs as jsxs87 } from "react/jsx-runtime";
12845
+ import { jsx as jsx99, jsxs as jsxs87 } from "react/jsx-runtime";
12840
12846
  var GROUP_WINDOW = 6e4;
12841
12847
  var STICK_PX = 100;
12842
12848
  function groupMessages(list) {
@@ -12869,25 +12875,25 @@ function dayLabel(key) {
12869
12875
  }
12870
12876
  function Suggestions({ items = [], onPick }) {
12871
12877
  if (!items.length) return null;
12872
- return /* @__PURE__ */ jsx98("div", { className: "fdc-suggest", children: items.map((s, i) => {
12878
+ return /* @__PURE__ */ jsx99("div", { className: "fdc-suggest", children: items.map((s, i) => {
12873
12879
  const it = typeof s === "string" ? { label: s, text: s } : s;
12874
12880
  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,
12881
+ it.icon ? /* @__PURE__ */ jsx99("i", { className: "ph ph-" + it.icon, "aria-hidden": "true" }) : null,
12876
12882
  /* @__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
12883
+ /* @__PURE__ */ jsx99("span", { className: "fdc-suggest-label", children: it.label }),
12884
+ it.description ? /* @__PURE__ */ jsx99("span", { className: "fdc-suggest-desc", children: it.description }) : null
12879
12885
  ] }),
12880
- /* @__PURE__ */ jsx98("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
12886
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
12881
12887
  ] }, it.id || i);
12882
12888
  }) });
12883
12889
  }
12884
12890
  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 } }),
12891
+ return /* @__PURE__ */ jsx99("div", { className: "fdc-skel", "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsxs87("div", { className: "fdc-skel-turn", children: [
12892
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel fd-skel-circle", style: { width: 22, height: 22 } }),
12887
12893
  /* @__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 } })
12894
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "62%" : "44%", height: 11 } }),
12895
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "94%" : "78%", height: 11 } }),
12896
+ /* @__PURE__ */ jsx99("div", { className: "fd-skel", style: { width: i ? "71%" : "56%", height: 11 } })
12891
12897
  ] })
12892
12898
  ] }, i)) });
12893
12899
  }
@@ -12948,34 +12954,34 @@ function ChatTranscript({
12948
12954
  const empty = !messages.length && status === "ready";
12949
12955
  return /* @__PURE__ */ jsxs87("div", { className: ["fdc-scroll", className].filter(Boolean).join(" "), ref: scroller, onScroll, children: [
12950
12956
  /* @__PURE__ */ jsxs87("div", { className: "fdc-log", role: "log", "aria-label": "Conversation", children: [
12951
- status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx98(LoadingTurns, {}) : null,
12957
+ status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx99(LoadingTurns, {}) : null,
12952
12958
  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." }),
12959
+ /* @__PURE__ */ jsx99("span", { className: "fdc-dead-icon", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-plugs", "aria-hidden": "true" }) }),
12960
+ /* @__PURE__ */ jsx99("h3", { className: "fdc-dead-title", children: ctx.deadTitle || "The assistant isn\u2019t reachable" }),
12961
+ /* @__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
12962
  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" }),
12963
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
12958
12964
  "Try again"
12959
12965
  ] }) : null
12960
12966
  ] }) : null,
12961
12967
  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 })
12968
+ /* @__PURE__ */ jsx99("span", { className: "fdc-empty-icon", children: /* @__PURE__ */ jsx99("i", { className: "ph ph-" + emptyIcon, "aria-hidden": "true" }) }),
12969
+ /* @__PURE__ */ jsx99("h3", { className: "fdc-empty-title", children: emptyTitle }),
12970
+ emptyDescription ? /* @__PURE__ */ jsx99("p", { className: "fdc-empty-body", children: emptyDescription }) : null,
12971
+ /* @__PURE__ */ jsx99(Suggestions, { items: suggestions, onPick })
12966
12972
  ] }) : null,
12967
12973
  groups.map((g, i) => {
12968
12974
  const prev = groups[i - 1];
12969
12975
  const k = dayKey(g.messages[0].timestamp);
12970
12976
  const showDay = !!k && (!prev || dayKey(prev.messages[0].timestamp) !== k);
12971
12977
  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 })
12978
+ showDay ? /* @__PURE__ */ jsx99("div", { className: "fdc-day", children: /* @__PURE__ */ jsx99("span", { children: dayLabel(k) }) }) : null,
12979
+ /* @__PURE__ */ jsx99(ChatTurn, { group: g, ctx })
12974
12980
  ] }, g.key || i);
12975
12981
  })
12976
12982
  ] }),
12977
12983
  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" }),
12984
+ /* @__PURE__ */ jsx99("i", { className: "ph ph-arrow-down", "aria-hidden": "true" }),
12979
12985
  pill,
12980
12986
  " new message",
12981
12987
  pill === 1 ? "" : "s"
@@ -12986,7 +12992,7 @@ var TranscriptKit = { groupMessages };
12986
12992
 
12987
12993
  // src/components/chat/ChatComposer.tsx
12988
12994
  import * as React72 from "react";
12989
- import { jsx as jsx99, jsxs as jsxs88 } from "react/jsx-runtime";
12995
+ import { jsx as jsx100, jsxs as jsxs88 } from "react/jsx-runtime";
12990
12996
  function ChatComposer({
12991
12997
  onSubmit,
12992
12998
  onStop,
@@ -13091,7 +13097,7 @@ function ChatComposer({
13091
13097
  description: it.description,
13092
13098
  icon: it.icon,
13093
13099
  meta: mention.meta,
13094
- shortcut: slash.shortcut ? /* @__PURE__ */ jsx99(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
13100
+ shortcut: slash.shortcut ? /* @__PURE__ */ jsx100(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
13095
13101
  onSelect: () => {
13096
13102
  const insert = trigger.type === "slash" ? slash.immediate ? "/" + slash.id : "/" + slash.id + " " : "@" + (mention.value || mention.label) + " ";
13097
13103
  editor.current && editor.current.replaceRange(trigger.from, trigger.to, insert);
@@ -13151,13 +13157,13 @@ function ChatComposer({
13151
13157
  };
13152
13158
  };
13153
13159
  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
13160
+ queue.length ? /* @__PURE__ */ jsx100("div", { className: "fdc-queue", "aria-label": "Queued messages", children: queue.map((q) => /* @__PURE__ */ jsxs88("div", { className: "fdc-queue-row", children: [
13161
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-clock-countdown", "aria-hidden": "true" }),
13162
+ /* @__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)" : "") }),
13163
+ 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
13164
  ] }, q.id)) }) : null,
13159
13165
  sessionBar,
13160
- /* @__PURE__ */ jsx99(
13166
+ /* @__PURE__ */ jsx100(
13161
13167
  Dropzone,
13162
13168
  {
13163
13169
  className: "fdc-field",
@@ -13172,8 +13178,8 @@ function ChatComposer({
13172
13178
  label: "Drop to attach",
13173
13179
  hint: acceptFiles ? acceptFiles.replace(/,/g, " \xB7 ") : void 0,
13174
13180
  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(
13181
+ 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,
13182
+ /* @__PURE__ */ jsx100(
13177
13183
  MarkdownEditor,
13178
13184
  {
13179
13185
  ref: editor,
@@ -13193,32 +13199,32 @@ function ChatComposer({
13193
13199
  }
13194
13200
  ),
13195
13201
  /* @__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,
13202
+ fileUploadHandler ? /* @__PURE__ */ jsx100(FilePickButton, { onFiles: staged.add, onReject: (r) => flash(r[0].message), accept: acceptFiles, maxFileSize, label: "Attach files", icon: "plus" }) : null,
13203
+ 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
13204
  toolbarExtras,
13199
- /* @__PURE__ */ jsx99("span", { className: "fdc-tools-gap" }),
13205
+ /* @__PURE__ */ jsx100("span", { className: "fdc-tools-gap" }),
13200
13206
  maxLength && text.length > maxLength * 0.6 ? /* @__PURE__ */ jsxs88("span", { className: "fdc-count fd-tabular" + (text.length > maxLength * 0.95 ? " is-hot" : ""), children: [
13201
13207
  text.length,
13202
13208
  "/",
13203
13209
  maxLength
13204
13210
  ] }) : null,
13205
13211
  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" })
13212
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
13213
+ /* @__PURE__ */ jsx100("span", { children: "Stop" })
13208
13214
  ] }) : /* @__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" })
13215
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-paper-plane-right", "aria-hidden": "true" }),
13216
+ /* @__PURE__ */ jsx100("span", { className: "fdc-send-label", children: "Send" })
13211
13217
  ] })
13212
13218
  ] })
13213
13219
  ] })
13214
13220
  }
13215
13221
  ),
13216
13222
  notice ? /* @__PURE__ */ jsxs88("div", { className: "fdc-notice", role: "status", children: [
13217
- /* @__PURE__ */ jsx99("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
13223
+ /* @__PURE__ */ jsx100("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
13218
13224
  notice
13219
13225
  ] }) : null,
13220
- hint && !notice ? /* @__PURE__ */ jsx99("div", { className: "fdc-hint", children: hint }) : null,
13221
- /* @__PURE__ */ jsx99(
13226
+ hint && !notice ? /* @__PURE__ */ jsx100("div", { className: "fdc-hint", children: hint }) : null,
13227
+ /* @__PURE__ */ jsx100(
13222
13228
  Popover,
13223
13229
  {
13224
13230
  open: menuOpen,
@@ -13232,12 +13238,12 @@ function ChatComposer({
13232
13238
  returnFocus: false,
13233
13239
  closeOnOutside: true,
13234
13240
  label: trigger && trigger.type === "slash" ? "Commands" : "Mentions",
13235
- children: /* @__PURE__ */ jsx99(
13241
+ children: /* @__PURE__ */ jsx100(
13236
13242
  Menu,
13237
13243
  {
13238
13244
  items: menuItems,
13239
13245
  autoFocus: false,
13240
- header: /* @__PURE__ */ jsx99("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
13246
+ header: /* @__PURE__ */ jsx100("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
13241
13247
  onClose: () => setTrigger(null)
13242
13248
  }
13243
13249
  )
@@ -13248,7 +13254,7 @@ function ChatComposer({
13248
13254
 
13249
13255
  // src/components/chat/ChatSessionBar.tsx
13250
13256
  import * as React73 from "react";
13251
- import { jsx as jsx100, jsxs as jsxs89 } from "react/jsx-runtime";
13257
+ import { jsx as jsx101, jsxs as jsxs89 } from "react/jsx-runtime";
13252
13258
  var compact2 = meterFormats.compact;
13253
13259
  function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extras }) {
13254
13260
  const [open2, setOpen] = React73.useState(false);
@@ -13280,15 +13286,15 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13280
13286
  "aria-expanded": expandable ? open2 : void 0,
13281
13287
  "aria-label": expandable ? "Usage details" : void 0,
13282
13288
  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
13289
+ cu ? /* @__PURE__ */ jsx101("span", { className: "fdc-bar-mini", "aria-hidden": "true", children: /* @__PURE__ */ jsx101(SegmentedMeter, { total, segments: cu.segments, height: 4, showTotal: false }) }) : null,
13290
+ /* @__PURE__ */ jsx101("span", { className: "fdc-bar-text", title: truncationTitle(bits.join(" \xB7 ")), children: bits.join(" \xB7 ") }),
13291
+ expandable ? /* @__PURE__ */ jsx101("i", { className: "ph ph-caret-right fdc-bar-caret", "aria-hidden": "true" }) : null
13286
13292
  ]
13287
13293
  }
13288
13294
  ),
13289
13295
  extras
13290
13296
  ] }),
13291
- /* @__PURE__ */ jsx100(
13297
+ /* @__PURE__ */ jsx101(
13292
13298
  Popover,
13293
13299
  {
13294
13300
  open: open2,
@@ -13303,11 +13309,11 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13303
13309
  setOpen(false);
13304
13310
  onClear();
13305
13311
  }, children: [
13306
- /* @__PURE__ */ jsx100("i", { className: "ph ph-trash", "aria-hidden": "true" }),
13312
+ /* @__PURE__ */ jsx101("i", { className: "ph ph-trash", "aria-hidden": "true" }),
13307
13313
  "Clear conversation"
13308
13314
  ] }) : void 0,
13309
13315
  children: /* @__PURE__ */ jsxs89("div", { className: "fdc-usage", children: [
13310
- cu ? /* @__PURE__ */ jsx100("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx100(
13316
+ cu ? /* @__PURE__ */ jsx101("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx101(
13311
13317
  SegmentedMeter,
13312
13318
  {
13313
13319
  total,
@@ -13320,8 +13326,8 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13320
13326
  }
13321
13327
  ) }) : null,
13322
13328
  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(
13329
+ /* @__PURE__ */ jsx101("h4", { className: "fdc-usage-h", children: "Usage limits" }),
13330
+ /* @__PURE__ */ jsx101("div", { className: "fdc-usage-rows", children: limits.map((l) => /* @__PURE__ */ jsx101(
13325
13331
  QuotaRow,
13326
13332
  {
13327
13333
  label: l.label,
@@ -13333,23 +13339,23 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
13333
13339
  ] }) : null,
13334
13340
  stats ? /* @__PURE__ */ jsxs89("section", { className: "fdc-usage-sec fdc-usage-stats", children: [
13335
13341
  stats.elapsedMs ? /* @__PURE__ */ jsxs89("div", { children: [
13336
- /* @__PURE__ */ jsx100("span", { children: "Session" }),
13337
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
13342
+ /* @__PURE__ */ jsx101("span", { children: "Session" }),
13343
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
13338
13344
  ] }) : null,
13339
13345
  stats.tokens ? /* @__PURE__ */ jsxs89("div", { children: [
13340
- /* @__PURE__ */ jsx100("span", { children: "Tokens" }),
13341
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
13346
+ /* @__PURE__ */ jsx101("span", { children: "Tokens" }),
13347
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
13342
13348
  ] }) : null,
13343
13349
  stats.costUsd != null ? /* @__PURE__ */ jsxs89("div", { children: [
13344
- /* @__PURE__ */ jsx100("span", { children: "Cost" }),
13350
+ /* @__PURE__ */ jsx101("span", { children: "Cost" }),
13345
13351
  /* @__PURE__ */ jsxs89("b", { className: "fd-tabular", children: [
13346
13352
  "$",
13347
13353
  Number(stats.costUsd).toFixed(3)
13348
13354
  ] })
13349
13355
  ] }) : null,
13350
13356
  stats.turns ? /* @__PURE__ */ jsxs89("div", { children: [
13351
- /* @__PURE__ */ jsx100("span", { children: "Turns" }),
13352
- /* @__PURE__ */ jsx100("b", { className: "fd-tabular", children: stats.turns })
13357
+ /* @__PURE__ */ jsx101("span", { children: "Turns" }),
13358
+ /* @__PURE__ */ jsx101("b", { className: "fd-tabular", children: stats.turns })
13353
13359
  ] }) : null
13354
13360
  ] }) : null
13355
13361
  ] })
@@ -13388,7 +13394,7 @@ function ModelControls({
13388
13394
  disabled: m.disabled,
13389
13395
  checked: m.id === (current2 && current2.id),
13390
13396
  meta: m.meta,
13391
- shortcut: m.shortcut ? /* @__PURE__ */ jsx100(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
13397
+ shortcut: m.shortcut ? /* @__PURE__ */ jsx101(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
13392
13398
  onSelect: () => onModelChange && onModelChange(m.id)
13393
13399
  });
13394
13400
  const items = [{ kind: "section", label: "Models" }].concat(flat.map(item));
@@ -13402,14 +13408,14 @@ function ModelControls({
13402
13408
  items.push({
13403
13409
  kind: "custom",
13404
13410
  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" }) })
13411
+ /* @__PURE__ */ jsx101("span", { children: fastModeLabel }),
13412
+ /* @__PURE__ */ jsx101("input", { type: "checkbox", className: "fd-sr", checked: !!fastMode, onChange: (e) => onFastModeChange(e.target.checked) }),
13413
+ /* @__PURE__ */ jsx101("span", { className: "fd-switch-track" + (fastMode ? " is-on" : ""), "aria-hidden": "true", children: /* @__PURE__ */ jsx101("span", { className: "fd-switch-thumb" }) })
13408
13414
  ] })
13409
13415
  });
13410
13416
  }
13411
13417
  return /* @__PURE__ */ jsxs89(React73.Fragment, { children: [
13412
- /* @__PURE__ */ jsx100(
13418
+ /* @__PURE__ */ jsx101(
13413
13419
  MenuButton,
13414
13420
  {
13415
13421
  items,
@@ -13420,7 +13426,7 @@ function ModelControls({
13420
13426
  title: "Choose a model"
13421
13427
  }
13422
13428
  ),
13423
- effortLevels && effortLevels.length ? /* @__PURE__ */ jsx100(
13429
+ effortLevels && effortLevels.length ? /* @__PURE__ */ jsx101(
13424
13430
  MenuButton,
13425
13431
  {
13426
13432
  placement: "top-end",
@@ -13441,7 +13447,7 @@ function ModelControls({
13441
13447
  }
13442
13448
 
13443
13449
  // src/components/chat/AgentChatPanel.tsx
13444
- import { jsx as jsx101, jsxs as jsxs90 } from "react/jsx-runtime";
13450
+ import { jsx as jsx102, jsxs as jsxs90 } from "react/jsx-runtime";
13445
13451
  var SURFACES = { sidebar: "is-sidebar", inline: "is-inline", page: "is-page", modal: "is-modal", sheet: "is-sheet" };
13446
13452
  function AgentChatPanel({
13447
13453
  /* required */
@@ -13595,7 +13601,7 @@ function AgentChatPanel({
13595
13601
  onReconnect: engine.reload,
13596
13602
  deadTitle: "The assistant isn\u2019t reachable"
13597
13603
  };
13598
- const sessionBar = /* @__PURE__ */ jsx101(
13604
+ const sessionBar = /* @__PURE__ */ jsx102(
13599
13605
  ChatSessionBar,
13600
13606
  {
13601
13607
  sessionStats,
@@ -13604,7 +13610,7 @@ function AgentChatPanel({
13604
13610
  onClear: engine.visible.length ? engine.clear : void 0
13605
13611
  }
13606
13612
  );
13607
- const modelControls = /* @__PURE__ */ jsx101(
13613
+ const modelControls = /* @__PURE__ */ jsx102(
13608
13614
  ModelControls,
13609
13615
  {
13610
13616
  models,
@@ -13619,7 +13625,7 @@ function AgentChatPanel({
13619
13625
  narrow
13620
13626
  }
13621
13627
  );
13622
- const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx101(
13628
+ const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx102(
13623
13629
  MenuButton,
13624
13630
  {
13625
13631
  variant: "ghost",
@@ -13657,7 +13663,7 @@ function AgentChatPanel({
13657
13663
  },
13658
13664
  "aria-label": title,
13659
13665
  children: [
13660
- surface === "sidebar" && resizable ? /* @__PURE__ */ jsx101(
13666
+ surface === "sidebar" && resizable ? /* @__PURE__ */ jsx102(
13661
13667
  "div",
13662
13668
  {
13663
13669
  className: "fdc-grip",
@@ -13673,19 +13679,19 @@ function AgentChatPanel({
13673
13679
  }
13674
13680
  ) : null,
13675
13681
  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 }) }),
13682
+ /* @__PURE__ */ jsx102("span", { className: "fdc-head-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx102("i", { className: "ph ph-" + assistantIcon }) }),
13677
13683
  /* @__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
13684
+ /* @__PURE__ */ jsx102("span", { className: "fdc-head-title", title: truncationTitle(title), children: title }),
13685
+ subtitle ? /* @__PURE__ */ jsx102("span", { className: "fdc-head-sub", title: truncationTitle(subtitle), children: subtitle }) : null
13680
13686
  ] }),
13681
13687
  /* @__PURE__ */ jsxs90("span", { className: "fdc-head-acts", children: [
13682
13688
  headerActions,
13683
13689
  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
13690
+ 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,
13691
+ 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
13692
  ] })
13687
13693
  ] }) : null,
13688
- /* @__PURE__ */ jsx101(
13694
+ /* @__PURE__ */ jsx102(
13689
13695
  ChatTranscript,
13690
13696
  {
13691
13697
  messages: engine.visible,
@@ -13700,7 +13706,7 @@ function AgentChatPanel({
13700
13706
  renderEmpty
13701
13707
  }
13702
13708
  ),
13703
- /* @__PURE__ */ jsx101(
13709
+ /* @__PURE__ */ jsx102(
13704
13710
  ChatComposer,
13705
13711
  {
13706
13712
  onSubmit: (text, atts) => engine.send(text, atts),
@@ -13734,7 +13740,7 @@ function AgentChatPanel({
13734
13740
 
13735
13741
  // src/components/files/FileViewer.tsx
13736
13742
  import * as React75 from "react";
13737
- import { jsx as jsx102, jsxs as jsxs91 } from "react/jsx-runtime";
13743
+ import { jsx as jsx103, jsxs as jsxs91 } from "react/jsx-runtime";
13738
13744
  function previewKindOf(file) {
13739
13745
  const mime = (file.mime || "").toLowerCase();
13740
13746
  const ext = extensionOf(file.name || "");
@@ -13829,16 +13835,16 @@ function usePreview(file, kind, resolveUrl) {
13829
13835
  return { ...state, retry: React75.useCallback(() => setAttempt((a) => a + 1), []) };
13830
13836
  }
13831
13837
  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 || "" });
13838
+ if (kind === "image") return /* @__PURE__ */ jsx103("img", { className: "fd-fv-image", src: state.url, alt: file.name || "Preview" });
13839
+ if (kind === "pdf") return /* @__PURE__ */ jsx103("iframe", { className: "fd-fv-pdf", src: state.url, title: file.name || "PDF preview" });
13840
+ if (kind === "markdown") return /* @__PURE__ */ jsx103(Markdown, { className: "fd-fv-markdown", source: state.text || "" });
13835
13841
  if (kind === "json") {
13836
13842
  let pretty = state.text || "";
13837
13843
  try {
13838
13844
  pretty = JSON.stringify(JSON.parse(pretty), null, 2);
13839
13845
  } catch {
13840
13846
  }
13841
- return /* @__PURE__ */ jsx102(CodeBlock, { code: pretty, language: "json" });
13847
+ return /* @__PURE__ */ jsx103(CodeBlock, { code: pretty, language: "json" });
13842
13848
  }
13843
13849
  if (kind === "csv") {
13844
13850
  const tsv = extensionOf(file.name || "") === "tsv" || (file.mime || "").toLowerCase().includes("tab-separated");
@@ -13848,8 +13854,8 @@ function PreviewBody({ file, kind, state }) {
13848
13854
  const shown = dataRows.slice(0, FILE_VIEWER_CSV_ROW_LIMIT);
13849
13855
  return /* @__PURE__ */ jsxs91("div", { className: "fd-fv-csv", children: [
13850
13856
  /* @__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)) })
13857
+ /* @__PURE__ */ jsx103("thead", { children: /* @__PURE__ */ jsx103("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx103("th", { children: c }, i)) }) }),
13858
+ /* @__PURE__ */ jsx103("tbody", { children: shown.map((r, ri) => /* @__PURE__ */ jsx103("tr", { children: head.map((_, ci) => /* @__PURE__ */ jsx103("td", { children: r[ci] ?? "" }, ci)) }, ri)) })
13853
13859
  ] }),
13854
13860
  dataRows.length > FILE_VIEWER_CSV_ROW_LIMIT ? /* @__PURE__ */ jsxs91("p", { className: "fd-fv-csv-note fd-body-sm fd-muted", children: [
13855
13861
  "Showing the first ",
@@ -13860,10 +13866,10 @@ function PreviewBody({ file, kind, state }) {
13860
13866
  ] }) : null
13861
13867
  ] });
13862
13868
  }
13863
- if (kind === "text") return /* @__PURE__ */ jsx102(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
13869
+ if (kind === "text") return /* @__PURE__ */ jsx103(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
13864
13870
  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" }),
13871
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-fallback-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13872
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-fallback-title", children: "No preview available" }),
13867
13873
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-fallback-meta", children: [
13868
13874
  file.mime || "Unknown type",
13869
13875
  file.size ? " \xB7 " + formatBytes(file.size) : ""
@@ -13900,9 +13906,9 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13900
13906
  "aria-label": file.name || "File",
13901
13907
  children: [
13902
13908
  /* @__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) }) }),
13909
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-head-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
13904
13910
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-titles", children: [
13905
- /* @__PURE__ */ jsx102("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
13911
+ /* @__PURE__ */ jsx103("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
13906
13912
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-meta", children: [
13907
13913
  file.mime || "Unknown type",
13908
13914
  file.size ? " \xB7 " + formatBytes(file.size) : ""
@@ -13910,12 +13916,12 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13910
13916
  ] }),
13911
13917
  /* @__PURE__ */ jsxs91("span", { className: "fd-fv-head-actions", children: [
13912
13918
  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
13919
+ /* @__PURE__ */ jsx103(Button, { variant: "secondary", size: "sm", icon: "download-simple", loading: downloading, onClick: download, children: "Download" }),
13920
+ onClose ? /* @__PURE__ */ jsx103(IconButton, { icon: "x", label: "Close", onClick: onClose }) : null
13915
13921
  ] })
13916
13922
  ] }),
13917
- downloadError ? /* @__PURE__ */ jsx102("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
13918
- hasSide ? /* @__PURE__ */ jsx102(
13923
+ downloadError ? /* @__PURE__ */ jsx103("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
13924
+ hasSide ? /* @__PURE__ */ jsx103(
13919
13925
  Tabs,
13920
13926
  {
13921
13927
  className: "fd-fv-tabs",
@@ -13925,18 +13931,18 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13925
13931
  }
13926
13932
  ) : null,
13927
13933
  /* @__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(
13934
+ /* @__PURE__ */ jsx103("div", { className: "fd-fv-preview", role: "region", "aria-label": "Preview of " + (file.name || "file"), children: /* @__PURE__ */ jsx103(
13929
13935
  LoadingRegion,
13930
13936
  {
13931
13937
  state: preview.status === "loading" ? "loading" : preview.status === "error" ? "error" : "ready",
13932
13938
  error: preview.error,
13933
13939
  label: "Loading preview of " + (file.name || "file"),
13934
13940
  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 })
13941
+ skeleton: /* @__PURE__ */ jsx103(Skeleton, { shape: "card", h: 220 }),
13942
+ children: /* @__PURE__ */ jsx103(PreviewBody, { file, kind, state: preview })
13937
13943
  }
13938
13944
  ) }),
13939
- hasSide ? /* @__PURE__ */ jsx102("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
13945
+ hasSide ? /* @__PURE__ */ jsx103("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
13940
13946
  ] })
13941
13947
  ]
13942
13948
  }
@@ -13945,7 +13951,7 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
13945
13951
 
13946
13952
  // src/components/files/FileBrowser.tsx
13947
13953
  import * as React76 from "react";
13948
- import { Fragment as Fragment30, jsx as jsx103, jsxs as jsxs92 } from "react/jsx-runtime";
13954
+ import { Fragment as Fragment30, jsx as jsx104, jsxs as jsxs92 } from "react/jsx-runtime";
13949
13955
  function childrenOf(folders, parentId) {
13950
13956
  return folders.filter((f) => f.parentId === parentId).sort((a, b) => a.name.localeCompare(b.name));
13951
13957
  }
@@ -14018,7 +14024,7 @@ function FolderPickerMenu({
14018
14024
  const panel = useInlinePanel();
14019
14025
  const { open: open2, setOpen, ref } = panel;
14020
14026
  return /* @__PURE__ */ jsxs92("span", { className: "fd-fb-menu-anchor", ref, children: [
14021
- /* @__PURE__ */ jsx103(
14027
+ /* @__PURE__ */ jsx104(
14022
14028
  IconButton,
14023
14029
  {
14024
14030
  icon: "arrows-out-cardinal",
@@ -14030,8 +14036,8 @@ function FolderPickerMenu({
14030
14036
  onClick: () => setOpen((v) => !v)
14031
14037
  }
14032
14038
  ),
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" }),
14039
+ /* @__PURE__ */ jsx104(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs92("div", { className: "fd-fb-menu", children: [
14040
+ /* @__PURE__ */ jsx104("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
14035
14041
  destinations.map((d) => /* @__PURE__ */ jsxs92(
14036
14042
  "button",
14037
14043
  {
@@ -14044,7 +14050,7 @@ function FolderPickerMenu({
14044
14050
  setOpen(false);
14045
14051
  },
14046
14052
  children: [
14047
- /* @__PURE__ */ jsx103("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14053
+ /* @__PURE__ */ jsx104("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14048
14054
  d.name
14049
14055
  ]
14050
14056
  },
@@ -14090,15 +14096,15 @@ function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropP
14090
14096
  draggable: !!draggableId,
14091
14097
  onDragStart: draggableId ? (e) => writeDragPayload(e, draggableId) : void 0,
14092
14098
  children: [
14093
- /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx103("i", { className: "ph ph-" + icon }) }),
14099
+ /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx104("i", { className: "ph ph-" + icon }) }),
14094
14100
  /* @__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
14101
+ /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-name", title: name, children: name }),
14102
+ meta ? /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-meta", children: meta }) : null
14097
14103
  ] })
14098
14104
  ]
14099
14105
  }
14100
14106
  ),
14101
- actions ? /* @__PURE__ */ jsx103("span", { className: "fd-fb-row-actions", children: actions }) : null
14107
+ actions ? /* @__PURE__ */ jsx104("span", { className: "fd-fb-row-actions", children: actions }) : null
14102
14108
  ] });
14103
14109
  }
14104
14110
  function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveInto, canMove }) {
@@ -14109,7 +14115,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14109
14115
  }, [currentFolderId, folder.id, folders]);
14110
14116
  const isCurrent = folder.id === currentFolderId;
14111
14117
  return /* @__PURE__ */ jsxs92("div", { className: "fd-fb-tree-node", children: [
14112
- /* @__PURE__ */ jsx103(
14118
+ /* @__PURE__ */ jsx104(
14113
14119
  RowShell,
14114
14120
  {
14115
14121
  icon: folder.id === currentFolderId ? "folder-open" : "folder-simple",
@@ -14119,7 +14125,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14119
14125
  isDropTarget: canMove,
14120
14126
  onDropPayload: (payload) => onMoveInto(payload, folder.id),
14121
14127
  className: ["fd-fb-tree-row", isCurrent ? "is-current" : ""].filter(Boolean).join(" "),
14122
- actions: kids.length ? /* @__PURE__ */ jsx103(
14128
+ actions: kids.length ? /* @__PURE__ */ jsx104(
14123
14129
  IconButton,
14124
14130
  {
14125
14131
  icon: expanded ? "caret-down" : "caret-right",
@@ -14131,7 +14137,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14131
14137
  ) : void 0
14132
14138
  }
14133
14139
  ),
14134
- expanded && kids.length ? /* @__PURE__ */ jsx103("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx103(
14140
+ expanded && kids.length ? /* @__PURE__ */ jsx104("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx104(
14135
14141
  TreeNode,
14136
14142
  {
14137
14143
  folder: k,
@@ -14220,7 +14226,7 @@ function FileBrowser({
14220
14226
  const content = /* @__PURE__ */ jsxs92("div", { className: ["fd-fb", className].filter(Boolean).join(" "), children: [
14221
14227
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-head", children: [
14222
14228
  /* @__PURE__ */ jsxs92("nav", { className: "fd-fb-crumbs", "aria-label": "Folder path", children: [
14223
- /* @__PURE__ */ jsx103(
14229
+ /* @__PURE__ */ jsx104(
14224
14230
  BreadcrumbCrumb,
14225
14231
  {
14226
14232
  label: "Home",
@@ -14230,7 +14236,7 @@ function FileBrowser({
14230
14236
  onDropPayload: (p) => moveIntoFolder(p, null)
14231
14237
  }
14232
14238
  ),
14233
- crumbFolders.map((f, i) => /* @__PURE__ */ jsx103(
14239
+ crumbFolders.map((f, i) => /* @__PURE__ */ jsx104(
14234
14240
  BreadcrumbCrumb,
14235
14241
  {
14236
14242
  label: f.name,
@@ -14243,10 +14249,10 @@ function FileBrowser({
14243
14249
  ))
14244
14250
  ] }),
14245
14251
  /* @__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,
14252
+ canCreateFolder ? /* @__PURE__ */ jsx104(Button, { variant: "secondary", size: "sm", icon: "folder-simple-plus", onClick: openCreate, children: "New folder" }) : null,
14247
14253
  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(
14254
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", size: "sm", icon: "upload-simple", onClick: () => uploadInputRef.current && uploadInputRef.current.click(), children: "Upload" }),
14255
+ /* @__PURE__ */ jsx104(
14250
14256
  "input",
14251
14257
  {
14252
14258
  ref: uploadInputRef,
@@ -14266,7 +14272,7 @@ function FileBrowser({
14266
14272
  ] }),
14267
14273
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-body", children: [
14268
14274
  /* @__PURE__ */ jsxs92("div", { className: "fd-fb-tree", role: "region", "aria-label": "Folder tree", children: [
14269
- /* @__PURE__ */ jsx103(
14275
+ /* @__PURE__ */ jsx104(
14270
14276
  RowShell,
14271
14277
  {
14272
14278
  icon: "house-simple",
@@ -14277,7 +14283,7 @@ function FileBrowser({
14277
14283
  className: ["fd-fb-tree-row", currentFolderId == null ? "is-current" : ""].filter(Boolean).join(" ")
14278
14284
  }
14279
14285
  ),
14280
- childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx103(
14286
+ childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx104(
14281
14287
  TreeNode,
14282
14288
  {
14283
14289
  folder: f,
@@ -14291,18 +14297,18 @@ function FileBrowser({
14291
14297
  f.id
14292
14298
  ))
14293
14299
  ] }),
14294
- /* @__PURE__ */ jsx103("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx103(
14300
+ /* @__PURE__ */ jsx104("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx104(
14295
14301
  LoadingRegion,
14296
14302
  {
14297
14303
  state: loading ? "loading" : "ready",
14298
14304
  label: "Loading folder contents",
14299
14305
  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" })
14306
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" }),
14307
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" }),
14308
+ /* @__PURE__ */ jsx104(Skeleton, { h: 44, radius: "10px" })
14303
14309
  ] }),
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(
14310
+ 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: [
14311
+ subfolders.map((f) => /* @__PURE__ */ jsx104(
14306
14312
  RowShell,
14307
14313
  {
14308
14314
  icon: "folder-simple",
@@ -14312,8 +14318,8 @@ function FileBrowser({
14312
14318
  isDropTarget: canMove,
14313
14319
  onDropPayload: (p) => moveIntoFolder(p, f.id),
14314
14320
  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(
14321
+ canRenameFolder ? /* @__PURE__ */ jsx104(IconButton, { icon: "pencil-simple", label: "Rename " + f.name, size: "sm", variant: "ghost", onClick: () => openRename(f) }) : null,
14322
+ canMove ? /* @__PURE__ */ jsx104(
14317
14323
  FolderPickerMenu,
14318
14324
  {
14319
14325
  label: "Move " + f.name,
@@ -14321,12 +14327,12 @@ function FileBrowser({
14321
14327
  onPick: (target) => moveIntoFolder({ kind: "folder", id: f.id }, target)
14322
14328
  }
14323
14329
  ) : null,
14324
- canDeleteFolder ? /* @__PURE__ */ jsx103(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14330
+ canDeleteFolder ? /* @__PURE__ */ jsx104(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14325
14331
  ] })
14326
14332
  },
14327
14333
  f.id
14328
14334
  )),
14329
- currentFiles.map((file) => /* @__PURE__ */ jsx103(
14335
+ currentFiles.map((file) => /* @__PURE__ */ jsx104(
14330
14336
  RowShell,
14331
14337
  {
14332
14338
  icon: iconForMime(file.mime, file.name),
@@ -14335,7 +14341,7 @@ function FileBrowser({
14335
14341
  onOpen: onOpenFile ? () => onOpenFile(file) : void 0,
14336
14342
  draggableId: canMove ? { kind: "file", id: file.id } : void 0,
14337
14343
  actions: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14338
- canMove ? /* @__PURE__ */ jsx103(
14344
+ canMove ? /* @__PURE__ */ jsx104(
14339
14345
  FolderPickerMenu,
14340
14346
  {
14341
14347
  label: "Move " + file.name,
@@ -14343,7 +14349,7 @@ function FileBrowser({
14343
14349
  onPick: (target) => onMoveFile && onMoveFile(file.id, target)
14344
14350
  }
14345
14351
  ) : null,
14346
- canRemoveFile ? /* @__PURE__ */ jsx103(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14352
+ canRemoveFile ? /* @__PURE__ */ jsx104(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14347
14353
  ] })
14348
14354
  },
14349
14355
  file.id
@@ -14352,10 +14358,10 @@ function FileBrowser({
14352
14358
  }
14353
14359
  ) })
14354
14360
  ] }),
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(
14361
+ /* @__PURE__ */ jsx104(Modal, { open: createOpen, title: "New folder", onClose: () => setCreateOpen(false), footer: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14362
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setCreateOpen(false), children: "Cancel" }),
14363
+ /* @__PURE__ */ jsx104(Button, { onClick: submitCreate, disabled: !createName.trim(), children: "Create" })
14364
+ ] }), children: /* @__PURE__ */ jsx104(
14359
14365
  "input",
14360
14366
  {
14361
14367
  className: "fd-fb-input",
@@ -14369,10 +14375,10 @@ function FileBrowser({
14369
14375
  autoFocus: true
14370
14376
  }
14371
14377
  ) }),
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(
14378
+ /* @__PURE__ */ jsx104(Modal, { open: renameTarget != null, title: "Rename folder", onClose: () => setRenameTarget(null), footer: /* @__PURE__ */ jsxs92(Fragment30, { children: [
14379
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setRenameTarget(null), children: "Cancel" }),
14380
+ /* @__PURE__ */ jsx104(Button, { onClick: submitRename, disabled: !renameValue.trim(), children: "Save" })
14381
+ ] }), children: /* @__PURE__ */ jsx104(
14376
14382
  "input",
14377
14383
  {
14378
14384
  className: "fd-fb-input",
@@ -14386,7 +14392,7 @@ function FileBrowser({
14386
14392
  autoFocus: true
14387
14393
  }
14388
14394
  ) }),
14389
- /* @__PURE__ */ jsx103(
14395
+ /* @__PURE__ */ jsx104(
14390
14396
  Modal,
14391
14397
  {
14392
14398
  open: deleteTarget != null,
@@ -14394,14 +14400,14 @@ function FileBrowser({
14394
14400
  description: "This can't be undone. The folder must be empty.",
14395
14401
  onClose: () => setDeleteTarget(null),
14396
14402
  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" })
14403
+ /* @__PURE__ */ jsx104(Button, { variant: "secondary", onClick: () => setDeleteTarget(null), children: "Cancel" }),
14404
+ /* @__PURE__ */ jsx104(Button, { variant: "danger", onClick: confirmDelete, children: "Delete" })
14399
14405
  ] })
14400
14406
  }
14401
14407
  )
14402
14408
  ] });
14403
14409
  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 });
14410
+ return /* @__PURE__ */ jsx104(Dropzone, { className: "fd-fb-dropzone", onFiles: (picked) => onUpload && onUpload(picked, currentFolderId), label: "Drop files to upload", children: content });
14405
14411
  }
14406
14412
  function BreadcrumbCrumb({
14407
14413
  label,
@@ -14436,7 +14442,7 @@ function BreadcrumbCrumb({
14436
14442
  if (payload && onDropPayload) onDropPayload(payload);
14437
14443
  }
14438
14444
  } : {};
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 }) });
14445
+ 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
14446
  }
14441
14447
 
14442
14448
  // src/kits/query.ts
@@ -15146,6 +15152,7 @@ export {
15146
15152
  SortMenu,
15147
15153
  Spinner,
15148
15154
  StackedLayerProvider,
15155
+ StatGrid,
15149
15156
  StatTile,
15150
15157
  StepList,
15151
15158
  SurroundSound,