@flytedan/flytebot-design-system 0.1.5 → 0.2.1

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
@@ -734,7 +734,7 @@ function Tip({ label, children }) {
734
734
  }
735
735
  function SidebarNav({ brand, groups = [], current: current2, onNavigate, footer, open = false, className = "", ...rest }) {
736
736
  return /* @__PURE__ */ jsxs9("nav", { className: ["fd-side", className].filter(Boolean).join(" "), "data-open": open ? "true" : "false", ...rest, children: [
737
- brand ? /* @__PURE__ */ jsx13("div", { style: { minHeight: "var(--topbar-h)", display: "flex", alignItems: "center", padding: "10px 18px", borderBottom: "1px solid var(--border)", flex: "none" }, children: brand }) : null,
737
+ brand ? /* @__PURE__ */ jsx13("div", { style: { height: "var(--topbar-h)", display: "flex", alignItems: "center", padding: "0 18px", borderBottom: "1px solid var(--border)", flex: "none", overflow: "hidden" }, children: brand }) : null,
738
738
  /* @__PURE__ */ jsx13("div", { style: { flex: 1, overflow: "auto", padding: "4px 10px 18px" }, children: groups.map((g, gi) => /* @__PURE__ */ jsxs9("div", { children: [
739
739
  g.label ? /* @__PURE__ */ jsx13("div", { className: "fd-side-group", children: g.label }) : null,
740
740
  /* @__PURE__ */ jsx13("div", { className: "fd-stack", style: { gap: 2 }, children: g.items.map((it) => /* @__PURE__ */ jsxs9(
@@ -760,14 +760,27 @@ function SidebarNav({ brand, groups = [], current: current2, onNavigate, footer,
760
760
  ] });
761
761
  }
762
762
 
763
- // src/components/navigation/Tabs.tsx
763
+ // src/components/navigation/FlytedeskBrand.tsx
764
764
  import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
765
+ var LOGO_SRC = "https://sponsored.flytedesk.com/logo-white-bg.png";
766
+ function FlytedeskMark({ size = "md", className = "", ...rest }) {
767
+ return /* @__PURE__ */ jsx14("span", { className: ["fd-brand-mark", size !== "md" ? "fd-brand-mark-" + size : "", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ jsx14("img", { src: LOGO_SRC, alt: "flytedesk" }) });
768
+ }
769
+ function FlytedeskBrand({ appName, size = "md", className = "", ...rest }) {
770
+ return /* @__PURE__ */ jsxs10("span", { className: ["fd-brand", size !== "md" ? "fd-brand-" + size : "", className].filter(Boolean).join(" "), ...rest, children: [
771
+ /* @__PURE__ */ jsx14(FlytedeskMark, { size }),
772
+ /* @__PURE__ */ jsx14("span", { className: "fd-overline fd-muted", children: appName })
773
+ ] });
774
+ }
775
+
776
+ // src/components/navigation/Tabs.tsx
777
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
765
778
  function Tabs({ tabs = [], value, onChange, className = "", ...rest }) {
766
- return /* @__PURE__ */ jsx14("div", { className: ["fd-tabs", className].filter(Boolean).join(" "), role: "tablist", ...rest, children: tabs.map((t) => {
779
+ return /* @__PURE__ */ jsx15("div", { className: ["fd-tabs", className].filter(Boolean).join(" "), role: "tablist", ...rest, children: tabs.map((t) => {
767
780
  const v = typeof t === "string" ? t : t.value;
768
781
  const label = typeof t === "string" ? t : t.label;
769
782
  const count = typeof t === "string" ? void 0 : t.count;
770
- return /* @__PURE__ */ jsxs10(
783
+ return /* @__PURE__ */ jsxs11(
771
784
  "button",
772
785
  {
773
786
  type: "button",
@@ -777,7 +790,7 @@ function Tabs({ tabs = [], value, onChange, className = "", ...rest }) {
777
790
  onClick: onChange ? () => onChange(v) : void 0,
778
791
  children: [
779
792
  label,
780
- count !== void 0 ? /* @__PURE__ */ jsx14("span", { className: "fd-badge fd-badge-neutral", style: { height: 20, padding: "0 7px" }, children: count }) : null
793
+ count !== void 0 ? /* @__PURE__ */ jsx15("span", { className: "fd-badge fd-badge-neutral", style: { height: 20, padding: "0 7px" }, children: count }) : null
781
794
  ]
782
795
  },
783
796
  v
@@ -787,82 +800,82 @@ function Tabs({ tabs = [], value, onChange, className = "", ...rest }) {
787
800
 
788
801
  // src/components/navigation/Topbar.tsx
789
802
  import * as React5 from "react";
790
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
803
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
791
804
  function Topbar({ crumbs = [], actions, loading = false, onMenu, className = "", ...rest }) {
792
- return /* @__PURE__ */ jsxs11("header", { className: ["fd-topbar", className].filter(Boolean).join(" "), ...rest, children: [
793
- onMenu ? /* @__PURE__ */ jsx15("button", { type: "button", className: "fd-btn-icon", "aria-label": "Menu", onClick: onMenu, children: /* @__PURE__ */ jsx15("i", { className: "ph ph-list" }) }) : null,
794
- /* @__PURE__ */ jsx15("nav", { className: "fd-crumb", "aria-label": "Breadcrumb", children: crumbs.map((c, i) => /* @__PURE__ */ jsxs11(React5.Fragment, { children: [
795
- i > 0 ? /* @__PURE__ */ jsx15("i", { className: "ph ph-caret-right", style: { fontSize: 11, opacity: 0.6 }, "aria-hidden": "true" }) : null,
796
- i === crumbs.length - 1 ? /* @__PURE__ */ jsx15("span", { className: "fd-crumb-current", children: c.label }) : /* @__PURE__ */ jsx15("a", { href: c.href || "#", children: c.label })
805
+ return /* @__PURE__ */ jsxs12("header", { className: ["fd-topbar", className].filter(Boolean).join(" "), ...rest, children: [
806
+ onMenu ? /* @__PURE__ */ jsx16("button", { type: "button", className: "fd-btn-icon", "aria-label": "Menu", onClick: onMenu, children: /* @__PURE__ */ jsx16("i", { className: "ph ph-list" }) }) : null,
807
+ /* @__PURE__ */ jsx16("nav", { className: "fd-crumb", "aria-label": "Breadcrumb", children: crumbs.map((c, i) => /* @__PURE__ */ jsxs12(React5.Fragment, { children: [
808
+ i > 0 ? /* @__PURE__ */ jsx16("i", { className: "ph ph-caret-right", style: { fontSize: 11, opacity: 0.6 }, "aria-hidden": "true" }) : null,
809
+ i === crumbs.length - 1 ? /* @__PURE__ */ jsx16("span", { className: "fd-crumb-current", children: c.label }) : /* @__PURE__ */ jsx16("a", { href: c.href || "#", children: c.label })
797
810
  ] }, i)) }),
798
- /* @__PURE__ */ jsx15("span", { style: { flex: 1 } }),
811
+ /* @__PURE__ */ jsx16("span", { style: { flex: 1 } }),
799
812
  actions,
800
- loading ? /* @__PURE__ */ jsx15("span", { className: "fd-topload", "aria-hidden": "true" }) : null
813
+ loading ? /* @__PURE__ */ jsx16("span", { className: "fd-topload", "aria-hidden": "true" }) : null
801
814
  ] });
802
815
  }
803
816
 
804
817
  // src/components/feedback/Avatar.tsx
805
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
818
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
806
819
  function Avatar({ name = "", src, size = "md", className = "", ...rest }) {
807
820
  const initials = name.split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join("").toUpperCase();
808
- return /* @__PURE__ */ jsx16(
821
+ return /* @__PURE__ */ jsx17(
809
822
  "span",
810
823
  {
811
824
  className: ["fd-avatar", size === "sm" ? "fd-avatar-sm" : size === "lg" ? "fd-avatar-lg" : "", className].filter(Boolean).join(" "),
812
825
  title: name || void 0,
813
826
  ...rest,
814
- children: src ? /* @__PURE__ */ jsx16("img", { src, alt: name }) : initials || /* @__PURE__ */ jsx16("i", { className: "ph ph-user", "aria-hidden": "true" })
827
+ children: src ? /* @__PURE__ */ jsx17("img", { src, alt: name }) : initials || /* @__PURE__ */ jsx17("i", { className: "ph ph-user", "aria-hidden": "true" })
815
828
  }
816
829
  );
817
830
  }
818
831
  function AvatarStack({ people = [], size = "sm", max = 4, className = "" }) {
819
832
  const shown = people.slice(0, max);
820
833
  const rest = people.length - shown.length;
821
- return /* @__PURE__ */ jsxs12("span", { className: ["fd-avatar-stack", className].filter(Boolean).join(" "), children: [
822
- shown.map((p, i) => /* @__PURE__ */ jsx16(Avatar, { name: typeof p === "string" ? p : p.name, src: typeof p === "string" ? void 0 : p.src, size }, i)),
823
- rest > 0 ? /* @__PURE__ */ jsx16(Avatar, { name: "+" + rest, size }) : null
834
+ return /* @__PURE__ */ jsxs13("span", { className: ["fd-avatar-stack", className].filter(Boolean).join(" "), children: [
835
+ shown.map((p, i) => /* @__PURE__ */ jsx17(Avatar, { name: typeof p === "string" ? p : p.name, src: typeof p === "string" ? void 0 : p.src, size }, i)),
836
+ rest > 0 ? /* @__PURE__ */ jsx17(Avatar, { name: "+" + rest, size }) : null
824
837
  ] });
825
838
  }
826
839
 
827
840
  // src/components/feedback/Badge.tsx
828
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
841
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
829
842
  var TONES = { neutral: "fd-badge-neutral", info: "fd-badge-info", success: "fd-badge-success", warning: "fd-badge-warning", danger: "fd-badge-danger", live: "fd-badge-live", approved: "fd-badge-approved", count: "fd-badge-count" };
830
843
  function Badge({ children, tone = "neutral", dot = false, icon, className = "", ...rest }) {
831
- return /* @__PURE__ */ jsxs13("span", { className: ["fd-badge", TONES[tone] || TONES.neutral, className].filter(Boolean).join(" "), ...rest, children: [
832
- dot ? /* @__PURE__ */ jsx17("span", { className: "fd-badge-dot", "aria-hidden": "true" }) : null,
833
- icon ? /* @__PURE__ */ jsx17("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
844
+ return /* @__PURE__ */ jsxs14("span", { className: ["fd-badge", TONES[tone] || TONES.neutral, className].filter(Boolean).join(" "), ...rest, children: [
845
+ dot ? /* @__PURE__ */ jsx18("span", { className: "fd-badge-dot", "aria-hidden": "true" }) : null,
846
+ icon ? /* @__PURE__ */ jsx18("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
834
847
  children
835
848
  ] });
836
849
  }
837
850
 
838
851
  // src/components/feedback/EmptyState.tsx
839
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
852
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
840
853
  function EmptyState({ icon = "tray", title, children, action, className = "", ...rest }) {
841
- return /* @__PURE__ */ jsxs14("div", { className: ["fd-empty", className].filter(Boolean).join(" "), ...rest, children: [
842
- /* @__PURE__ */ jsx18("span", { className: "fd-empty-icon", children: /* @__PURE__ */ jsx18("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }),
843
- /* @__PURE__ */ jsx18("span", { className: "fd-empty-title", children: title }),
844
- children ? /* @__PURE__ */ jsx18("span", { className: "fd-empty-body", children }) : null,
854
+ return /* @__PURE__ */ jsxs15("div", { className: ["fd-empty", className].filter(Boolean).join(" "), ...rest, children: [
855
+ /* @__PURE__ */ jsx19("span", { className: "fd-empty-icon", children: /* @__PURE__ */ jsx19("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }),
856
+ /* @__PURE__ */ jsx19("span", { className: "fd-empty-title", children: title }),
857
+ children ? /* @__PURE__ */ jsx19("span", { className: "fd-empty-body", children }) : null,
845
858
  action
846
859
  ] });
847
860
  }
848
861
 
849
862
  // src/components/feedback/Flag.tsx
850
- import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
863
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
851
864
  function Flag({ statement, cost, actions, tone = "warning", className = "", ...rest }) {
852
- return /* @__PURE__ */ jsxs15("div", { className: ["fd-flag", "fd-flag-" + tone, className].filter(Boolean).join(" "), role: "status", ...rest, children: [
853
- /* @__PURE__ */ jsxs15("span", { className: "fd-flag-text", children: [
865
+ return /* @__PURE__ */ jsxs16("div", { className: ["fd-flag", "fd-flag-" + tone, className].filter(Boolean).join(" "), role: "status", ...rest, children: [
866
+ /* @__PURE__ */ jsxs16("span", { className: "fd-flag-text", children: [
854
867
  statement,
855
- cost ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
868
+ cost ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
856
869
  " ",
857
- /* @__PURE__ */ jsx19("span", { className: "fd-flag-cost", children: cost })
870
+ /* @__PURE__ */ jsx20("span", { className: "fd-flag-cost", children: cost })
858
871
  ] }) : null
859
872
  ] }),
860
- actions ? /* @__PURE__ */ jsx19("span", { className: "fd-flag-actions", children: actions }) : null
873
+ actions ? /* @__PURE__ */ jsx20("span", { className: "fd-flag-actions", children: actions }) : null
861
874
  ] });
862
875
  }
863
876
 
864
877
  // src/components/feedback/KeyHint.tsx
865
- import { jsx as jsx20 } from "react/jsx-runtime";
878
+ import { jsx as jsx21 } from "react/jsx-runtime";
866
879
  var IS_MAC = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || "");
867
880
  var GLYPH = {
868
881
  mod: IS_MAC ? "\u2318" : "Ctrl",
@@ -890,10 +903,10 @@ var GLYPH = {
890
903
  function KeyHint({ keys, size = "md", tone = "quiet", className = "", ...rest }) {
891
904
  const parts = String(keys || "").split("+").map((p) => p.trim()).filter(Boolean);
892
905
  const cls = ["fd-keyhint", size === "sm" ? "fd-keyhint-sm" : "", tone === "solid" ? "fd-keyhint-solid" : "", className].filter(Boolean).join(" ");
893
- return /* @__PURE__ */ jsx20("span", { className: cls, "aria-hidden": "true", ...rest, children: parts.map((p, i) => {
906
+ return /* @__PURE__ */ jsx21("span", { className: cls, "aria-hidden": "true", ...rest, children: parts.map((p, i) => {
894
907
  const k = p.toLowerCase();
895
908
  const glyph = GLYPH[k] || (p.length === 1 ? p.toUpperCase() : p);
896
- return /* @__PURE__ */ jsx20("kbd", { children: glyph }, i);
909
+ return /* @__PURE__ */ jsx21("kbd", { children: glyph }, i);
897
910
  }) });
898
911
  }
899
912
  function modifierLabel() {
@@ -904,9 +917,9 @@ function hasModifier(e) {
904
917
  }
905
918
 
906
919
  // src/components/feedback/Tag.tsx
907
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
920
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
908
921
  function Tag({ children, icon, selected = false, onRemove, onClick, className = "", ...rest }) {
909
- return /* @__PURE__ */ jsxs16(
922
+ return /* @__PURE__ */ jsxs17(
910
923
  "button",
911
924
  {
912
925
  type: "button",
@@ -915,9 +928,9 @@ function Tag({ children, icon, selected = false, onRemove, onClick, className =
915
928
  onClick,
916
929
  ...rest,
917
930
  children: [
918
- icon ? /* @__PURE__ */ jsx21("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
931
+ icon ? /* @__PURE__ */ jsx22("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
919
932
  children,
920
- onRemove ? /* @__PURE__ */ jsx21(
933
+ onRemove ? /* @__PURE__ */ jsx22(
921
934
  "span",
922
935
  {
923
936
  className: "fd-tag-remove",
@@ -927,7 +940,7 @@ function Tag({ children, icon, selected = false, onRemove, onClick, className =
927
940
  e.stopPropagation();
928
941
  onRemove();
929
942
  },
930
- children: /* @__PURE__ */ jsx21("i", { className: "ph ph-x" })
943
+ children: /* @__PURE__ */ jsx22("i", { className: "ph ph-x" })
931
944
  }
932
945
  ) : null
933
946
  ]
@@ -936,7 +949,7 @@ function Tag({ children, icon, selected = false, onRemove, onClick, className =
936
949
  }
937
950
 
938
951
  // src/components/feedback/Toast.tsx
939
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
952
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
940
953
  var ICON = {
941
954
  success: { i: "check", bg: "var(--ok-solid)" },
942
955
  error: { i: "x", bg: "var(--danger-solid)" },
@@ -945,24 +958,24 @@ var ICON = {
945
958
  };
946
959
  function Toast({ title, children, tone = "success", onUndo, onDismiss, className = "", ...rest }) {
947
960
  const ic = ICON[tone] || ICON.info;
948
- return /* @__PURE__ */ jsxs17("div", { className: ["fd-toast", className].filter(Boolean).join(" "), role: "status", ...rest, children: [
949
- /* @__PURE__ */ jsx22("span", { className: "fd-toast-icon", style: { background: ic.bg }, "aria-hidden": "true", children: tone === "loading" ? /* @__PURE__ */ jsx22("span", { className: "fd-spinner", style: { width: 12, height: 12, borderWidth: 2, color: "#fff" } }) : /* @__PURE__ */ jsx22("i", { className: "ph ph-" + ic.i }) }),
950
- /* @__PURE__ */ jsxs17("span", { className: "fd-toast-body", children: [
951
- /* @__PURE__ */ jsx22("span", { className: "fd-toast-title", style: { display: "block" }, children: title }),
952
- children ? /* @__PURE__ */ jsx22("span", { className: "fd-secondary", style: { display: "block", marginTop: 2 }, children }) : null,
953
- onUndo ? /* @__PURE__ */ jsx22("button", { type: "button", className: "fd-btn fd-btn-link", style: { marginTop: 8 }, onClick: onUndo, children: "Undo" }) : null
961
+ return /* @__PURE__ */ jsxs18("div", { className: ["fd-toast", className].filter(Boolean).join(" "), role: "status", ...rest, children: [
962
+ /* @__PURE__ */ jsx23("span", { className: "fd-toast-icon", style: { background: ic.bg }, "aria-hidden": "true", children: tone === "loading" ? /* @__PURE__ */ jsx23("span", { className: "fd-spinner", style: { width: 12, height: 12, borderWidth: 2, color: "#fff" } }) : /* @__PURE__ */ jsx23("i", { className: "ph ph-" + ic.i }) }),
963
+ /* @__PURE__ */ jsxs18("span", { className: "fd-toast-body", children: [
964
+ /* @__PURE__ */ jsx23("span", { className: "fd-toast-title", style: { display: "block" }, children: title }),
965
+ children ? /* @__PURE__ */ jsx23("span", { className: "fd-secondary", style: { display: "block", marginTop: 2 }, children }) : null,
966
+ onUndo ? /* @__PURE__ */ jsx23("button", { type: "button", className: "fd-btn fd-btn-link", style: { marginTop: 8 }, onClick: onUndo, children: "Undo" }) : null
954
967
  ] }),
955
- onDismiss ? /* @__PURE__ */ jsx22("button", { type: "button", className: "fd-btn-icon fd-btn-icon-sm", "aria-label": "Dismiss", onClick: onDismiss, children: /* @__PURE__ */ jsx22("i", { className: "ph ph-x" }) }) : null
968
+ onDismiss ? /* @__PURE__ */ jsx23("button", { type: "button", className: "fd-btn-icon fd-btn-icon-sm", "aria-label": "Dismiss", onClick: onDismiss, children: /* @__PURE__ */ jsx23("i", { className: "ph ph-x" }) }) : null
956
969
  ] });
957
970
  }
958
971
 
959
972
  // src/components/feedback/Tooltip.tsx
960
973
  import * as React6 from "react";
961
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
974
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
962
975
  function Tooltip({ label, placement = "top", children, className = "" }) {
963
976
  const [show, setShow] = React6.useState(false);
964
977
  const pos = placement === "bottom" ? { top: "calc(100% + 8px)", left: "50%", transform: "translateX(-50%)" } : { bottom: "calc(100% + 8px)", left: "50%", transform: "translateX(-50%)" };
965
- return /* @__PURE__ */ jsxs18(
978
+ return /* @__PURE__ */ jsxs19(
966
979
  "span",
967
980
  {
968
981
  style: { position: "relative", display: "inline-flex" },
@@ -972,7 +985,7 @@ function Tooltip({ label, placement = "top", children, className = "" }) {
972
985
  onBlur: () => setShow(false),
973
986
  children: [
974
987
  children,
975
- show ? /* @__PURE__ */ jsx23("span", { className: ["fd-tooltip", className].filter(Boolean).join(" "), role: "tooltip", style: pos, children: label }) : null
988
+ show ? /* @__PURE__ */ jsx24("span", { className: ["fd-tooltip", className].filter(Boolean).join(" "), role: "tooltip", style: pos, children: label }) : null
976
989
  ]
977
990
  }
978
991
  );
@@ -980,7 +993,7 @@ function Tooltip({ label, placement = "top", children, className = "" }) {
980
993
 
981
994
  // src/components/data/Clamp.tsx
982
995
  import * as React7 from "react";
983
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
996
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
984
997
  function Clamp({
985
998
  children,
986
999
  text,
@@ -1021,17 +1034,17 @@ function Clamp({
1021
1034
  return !v;
1022
1035
  });
1023
1036
  };
1024
- return /* @__PURE__ */ jsxs19("div", { className: ["fd-clamp", clamped ? "is-clamped" : "", className].filter(Boolean).join(" "), children: [
1025
- /* @__PURE__ */ jsx24("div", { className: "fd-clamp-body", ref: bodyRef, style: !maxChars && clamped ? { maxHeight } : void 0, children: maxChars ? charClamped != null ? charClamped : text != null ? text : children : children }),
1026
- (maxChars ? charClamped != null || open : overflows) ? /* @__PURE__ */ jsxs19("button", { type: "button", className: "fd-clamp-more", onClick: toggle, "aria-expanded": open, children: [
1027
- /* @__PURE__ */ jsx24("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1037
+ return /* @__PURE__ */ jsxs20("div", { className: ["fd-clamp", clamped ? "is-clamped" : "", className].filter(Boolean).join(" "), children: [
1038
+ /* @__PURE__ */ jsx25("div", { className: "fd-clamp-body", ref: bodyRef, style: !maxChars && clamped ? { maxHeight } : void 0, children: maxChars ? charClamped != null ? charClamped : text != null ? text : children : children }),
1039
+ (maxChars ? charClamped != null || open : overflows) ? /* @__PURE__ */ jsxs20("button", { type: "button", className: "fd-clamp-more", onClick: toggle, "aria-expanded": open, children: [
1040
+ /* @__PURE__ */ jsx25("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1028
1041
  open ? lessLabel : moreLabel
1029
1042
  ] }) : null
1030
1043
  ] });
1031
1044
  }
1032
1045
 
1033
1046
  // src/components/data/CsiBadge.tsx
1034
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
1047
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1035
1048
  var BANDS = {
1036
1049
  weak: { n: 1, label: "Weak" },
1037
1050
  adequate: { n: 2, label: "Adequate" },
@@ -1040,7 +1053,7 @@ var BANDS = {
1040
1053
  };
1041
1054
  function CsiMeter({ band = "weak", size = 4, width = 5, gap = 2 }) {
1042
1055
  const n = (BANDS[band] || BANDS.weak).n;
1043
- return /* @__PURE__ */ jsx25("span", { className: "fd-meter", style: { gap: gap + "px" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx25(
1056
+ return /* @__PURE__ */ jsx26("span", { className: "fd-meter", style: { gap: gap + "px" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx26(
1044
1057
  "span",
1045
1058
  {
1046
1059
  className: "fd-meter-seg" + (i <= n ? " is-on" : ""),
@@ -1051,16 +1064,16 @@ function CsiMeter({ band = "weak", size = 4, width = 5, gap = 2 }) {
1051
1064
  }
1052
1065
  function CsiBadge({ band = "weak", crp, size = "compact", preview = false, alert = false, className = "", ...rest }) {
1053
1066
  const b = BANDS[band] || BANDS.weak;
1054
- return /* @__PURE__ */ jsxs20(
1067
+ return /* @__PURE__ */ jsxs21(
1055
1068
  "span",
1056
1069
  {
1057
1070
  className: ["fd-csi", "fd-csi-" + b.n, size === "medium" ? "fd-csi-medium" : "fd-csi-compact", preview ? "fd-csi-preview" : "", className].filter(Boolean).join(" "),
1058
1071
  ...rest,
1059
1072
  children: [
1060
- alert ? /* @__PURE__ */ jsx25("span", { className: "fd-badge-dot", style: { background: "var(--csi-alert)" }, "aria-label": "Fixable" }) : null,
1061
- /* @__PURE__ */ jsx25(CsiMeter, { band, size: size === "medium" ? 11 : 9, width: size === "medium" ? 4 : 3 }),
1073
+ alert ? /* @__PURE__ */ jsx26("span", { className: "fd-badge-dot", style: { background: "var(--csi-alert)" }, "aria-label": "Fixable" }) : null,
1074
+ /* @__PURE__ */ jsx26(CsiMeter, { band, size: size === "medium" ? 11 : 9, width: size === "medium" ? 4 : 3 }),
1062
1075
  b.label,
1063
- crp !== void 0 && crp !== null ? /* @__PURE__ */ jsx25("span", { className: "fd-csi-crp", children: crp }) : null
1076
+ crp !== void 0 && crp !== null ? /* @__PURE__ */ jsx26("span", { className: "fd-csi-crp", children: crp }) : null
1064
1077
  ]
1065
1078
  }
1066
1079
  );
@@ -1068,15 +1081,15 @@ function CsiBadge({ band = "weak", crp, size = "compact", preview = false, alert
1068
1081
  function CsiHero({ band = "weak", crp, label, className = "" }) {
1069
1082
  const b = BANDS[band] || BANDS.weak;
1070
1083
  const mark = "var(--csi-" + b.n + "-mark)";
1071
- return /* @__PURE__ */ jsxs20("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 10 }, children: [
1072
- /* @__PURE__ */ jsx25("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp }),
1073
- /* @__PURE__ */ jsx25("span", { className: "fd-label-lg", style: { color: "var(--text-2)" }, children: label || b.label }),
1074
- /* @__PURE__ */ jsx25("span", { className: "fd-meter", style: { gap: 3, color: mark, width: 120 }, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx25("span", { className: "fd-meter-seg" + (i <= b.n ? " is-on" : ""), style: { height: 6, flex: 1 } }, i)) })
1084
+ return /* @__PURE__ */ jsxs21("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 10 }, children: [
1085
+ /* @__PURE__ */ jsx26("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp }),
1086
+ /* @__PURE__ */ jsx26("span", { className: "fd-label-lg", style: { color: "var(--text-2)" }, children: label || b.label }),
1087
+ /* @__PURE__ */ jsx26("span", { className: "fd-meter", style: { gap: 3, color: mark, width: 120 }, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx26("span", { className: "fd-meter-seg" + (i <= b.n ? " is-on" : ""), style: { height: 6, flex: 1 } }, i)) })
1075
1088
  ] });
1076
1089
  }
1077
1090
 
1078
1091
  // src/components/data/DataTable.tsx
1079
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1092
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
1080
1093
  function DataTable({
1081
1094
  columns = [],
1082
1095
  rows = [],
@@ -1093,68 +1106,68 @@ function DataTable({
1093
1106
  ...rest
1094
1107
  }) {
1095
1108
  const stale = refreshing && !loading;
1096
- return /* @__PURE__ */ jsxs21("div", { className: "fd-table-host", children: [
1097
- /* @__PURE__ */ jsx26(
1109
+ return /* @__PURE__ */ jsxs22("div", { className: "fd-table-host", children: [
1110
+ /* @__PURE__ */ jsx27(
1098
1111
  "div",
1099
1112
  {
1100
1113
  className: ["fd-table-wrap", className].filter(Boolean).join(" "),
1101
1114
  "aria-busy": loading || refreshing ? "true" : void 0,
1102
1115
  ...rest,
1103
- children: /* @__PURE__ */ jsxs21("table", { className: ["fd-table", compact3 ? "fd-table-compact" : ""].filter(Boolean).join(" "), children: [
1104
- /* @__PURE__ */ jsx26("thead", { children: /* @__PURE__ */ jsx26("tr", { children: columns.map((c) => /* @__PURE__ */ jsx26(
1116
+ children: /* @__PURE__ */ jsxs22("table", { className: ["fd-table", compact3 ? "fd-table-compact" : ""].filter(Boolean).join(" "), children: [
1117
+ /* @__PURE__ */ jsx27("thead", { children: /* @__PURE__ */ jsx27("tr", { children: columns.map((c) => /* @__PURE__ */ jsx27(
1105
1118
  "th",
1106
1119
  {
1107
1120
  scope: "col",
1108
1121
  style: { width: c.width },
1109
1122
  className: [c.numeric ? "is-num" : "", sort && sort.key === c.key ? "is-sorted" : ""].filter(Boolean).join(" "),
1110
1123
  "aria-sort": sort && sort.key === c.key ? sort.dir === "asc" ? "ascending" : "descending" : void 0,
1111
- children: c.sortable && onSort ? /* @__PURE__ */ jsxs21("button", { type: "button", onClick: () => onSort(c.key), children: [
1124
+ children: c.sortable && onSort ? /* @__PURE__ */ jsxs22("button", { type: "button", onClick: () => onSort(c.key), children: [
1112
1125
  c.label,
1113
- sort && sort.key === c.key ? /* @__PURE__ */ jsx26("i", { className: "ph fd-caret ph-caret-" + (sort.dir === "asc" ? "up" : "down") }) : null
1126
+ sort && sort.key === c.key ? /* @__PURE__ */ jsx27("i", { className: "ph fd-caret ph-caret-" + (sort.dir === "asc" ? "up" : "down") }) : null
1114
1127
  ] }) : c.label
1115
1128
  },
1116
1129
  c.key
1117
1130
  )) }) }),
1118
- /* @__PURE__ */ jsx26("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsx26("tr", { children: columns.map((c) => /* @__PURE__ */ jsx26("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx26("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)) }, i)) : rows.map((r) => /* @__PURE__ */ jsx26(
1131
+ /* @__PURE__ */ jsx27("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsx27("tr", { children: columns.map((c) => /* @__PURE__ */ jsx27("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx27("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)) }, i)) : rows.map((r) => /* @__PURE__ */ jsx27(
1119
1132
  "tr",
1120
1133
  {
1121
1134
  "aria-selected": selectedId === r[rowKey] ? "true" : void 0,
1122
1135
  onClick: onRowClick ? () => onRowClick(r) : void 0,
1123
1136
  style: onRowClick ? { cursor: "pointer" } : void 0,
1124
- children: columns.map((c) => /* @__PURE__ */ jsx26("td", { className: c.numeric ? "is-num" : "", children: c.render ? c.render(r) : r[c.key] }, c.key))
1137
+ children: columns.map((c) => /* @__PURE__ */ jsx27("td", { className: c.numeric ? "is-num" : "", children: c.render ? c.render(r) : r[c.key] }, c.key))
1125
1138
  },
1126
1139
  r[rowKey]
1127
1140
  )) })
1128
1141
  ] })
1129
1142
  }
1130
1143
  ),
1131
- stale ? /* @__PURE__ */ jsx26("div", { className: "fd-table-stale", children: /* @__PURE__ */ jsxs21("span", { className: "fd-table-stale-pill", role: "status", children: [
1132
- /* @__PURE__ */ jsx26("span", { className: "fd-spinner", "aria-hidden": "true" }),
1144
+ stale ? /* @__PURE__ */ jsx27("div", { className: "fd-table-stale", children: /* @__PURE__ */ jsxs22("span", { className: "fd-table-stale-pill", role: "status", children: [
1145
+ /* @__PURE__ */ jsx27("span", { className: "fd-spinner", "aria-hidden": "true" }),
1133
1146
  " Updating\u2026"
1134
1147
  ] }) }) : null
1135
1148
  ] });
1136
1149
  }
1137
1150
 
1138
1151
  // src/components/data/StatTile.tsx
1139
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
1152
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
1140
1153
  function StatTile({ label, value, sub, delta, loading = false, compact: compact3 = false, className = "", ...rest }) {
1141
- return /* @__PURE__ */ jsxs22("div", { className: ["fd-stat", compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" "), ...rest, children: [
1142
- loading ? /* @__PURE__ */ jsx27("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: compact3 ? 20 : 28, width: "62%" } }) : /* @__PURE__ */ jsxs22("span", { className: "fd-stat-top", children: [
1143
- /* @__PURE__ */ jsx27("span", { className: "fd-stat-figure", children: value }),
1144
- delta ? /* @__PURE__ */ jsxs22("span", { className: delta.startsWith("-") ? "fd-stat-delta-down" : "fd-stat-delta-up", style: { fontWeight: 600, fontSize: "var(--body-sm-size)", flex: "none" }, children: [
1145
- /* @__PURE__ */ jsx27("i", { className: "ph ph-arrow-" + (delta.startsWith("-") ? "down" : "up") + "-right", "aria-hidden": "true" }),
1154
+ return /* @__PURE__ */ jsxs23("div", { className: ["fd-stat", compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" "), ...rest, children: [
1155
+ loading ? /* @__PURE__ */ jsx28("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: compact3 ? 20 : 28, width: "62%" } }) : /* @__PURE__ */ jsxs23("span", { className: "fd-stat-top", children: [
1156
+ /* @__PURE__ */ jsx28("span", { className: "fd-stat-figure", children: value }),
1157
+ delta ? /* @__PURE__ */ jsxs23("span", { className: delta.startsWith("-") ? "fd-stat-delta-down" : "fd-stat-delta-up", style: { fontWeight: 600, fontSize: "var(--body-sm-size)", flex: "none" }, children: [
1158
+ /* @__PURE__ */ jsx28("i", { className: "ph ph-arrow-" + (delta.startsWith("-") ? "down" : "up") + "-right", "aria-hidden": "true" }),
1146
1159
  " ",
1147
1160
  delta
1148
1161
  ] }) : null
1149
1162
  ] }),
1150
- !loading && sub ? /* @__PURE__ */ jsx27("span", { className: "fd-stat-sub", children: sub }) : null,
1151
- loading ? /* @__PURE__ */ jsx27("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 10, width: "40%", marginTop: 8 } }) : /* @__PURE__ */ jsx27("span", { className: "fd-stat-label", style: { display: "block" }, children: label })
1163
+ !loading && sub ? /* @__PURE__ */ jsx28("span", { className: "fd-stat-sub", children: sub }) : null,
1164
+ loading ? /* @__PURE__ */ jsx28("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 10, width: "40%", marginTop: 8 } }) : /* @__PURE__ */ jsx28("span", { className: "fd-stat-label", style: { display: "block" }, children: label })
1152
1165
  ] });
1153
1166
  }
1154
1167
 
1155
1168
  // src/components/data/CodeBlock.tsx
1156
1169
  import * as React8 from "react";
1157
- import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
1170
+ import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
1158
1171
  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)$/;
1159
1172
  var RULES = {
1160
1173
  js: [
@@ -1310,7 +1323,7 @@ function tokenize(src, lang) {
1310
1323
  }
1311
1324
  function Highlighted({ code, lang }) {
1312
1325
  const toks = React8.useMemo(() => tokenize(code, lang), [code, lang]);
1313
- return /* @__PURE__ */ jsx28(Fragment5, { children: toks.map((tk, i) => tk.c ? /* @__PURE__ */ jsx28("span", { className: "tok-" + tk.c, children: tk.t }, i) : tk.t) });
1326
+ return /* @__PURE__ */ jsx29(Fragment5, { children: toks.map((tk, i) => tk.c ? /* @__PURE__ */ jsx29("span", { className: "tok-" + tk.c, children: tk.t }, i) : tk.t) });
1314
1327
  }
1315
1328
  function useCopy() {
1316
1329
  const [done, setDone] = React8.useState(false);
@@ -1358,24 +1371,24 @@ function CodeBlock({
1358
1371
  const lines = body.split("\n");
1359
1372
  const foldable = collapseAfter > 0 && lines.length > collapseAfter + 6;
1360
1373
  const shown = foldable && !open ? lines.slice(0, collapseAfter).join("\n") : body;
1361
- return /* @__PURE__ */ jsxs23("div", { className: ["fd-code", wrap ? "is-wrap" : "", className].filter(Boolean).join(" "), children: [
1362
- /* @__PURE__ */ jsxs23("div", { className: "fd-code-head", children: [
1363
- filename ? /* @__PURE__ */ jsx28("span", { className: "fd-code-file", children: filename }) : null,
1364
- /* @__PURE__ */ jsx28("span", { className: "fd-code-lang", children: languageLabel(language) }),
1365
- /* @__PURE__ */ jsx28("span", { className: "fd-code-spacer" }),
1374
+ return /* @__PURE__ */ jsxs24("div", { className: ["fd-code", wrap ? "is-wrap" : "", className].filter(Boolean).join(" "), children: [
1375
+ /* @__PURE__ */ jsxs24("div", { className: "fd-code-head", children: [
1376
+ filename ? /* @__PURE__ */ jsx29("span", { className: "fd-code-file", children: filename }) : null,
1377
+ /* @__PURE__ */ jsx29("span", { className: "fd-code-lang", children: languageLabel(language) }),
1378
+ /* @__PURE__ */ jsx29("span", { className: "fd-code-spacer" }),
1366
1379
  actions,
1367
- /* @__PURE__ */ jsx28("button", { type: "button", className: "fd-code-act", onClick: () => setWrap((v) => !v), "aria-pressed": wrap, title: wrap ? "No wrap" : "Soft wrap", children: /* @__PURE__ */ jsx28("i", { className: "ph ph-text-" + (wrap ? "columns" : "align-left"), "aria-hidden": "true" }) }),
1368
- copyable ? /* @__PURE__ */ jsxs23("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(body), children: [
1369
- /* @__PURE__ */ jsx28("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
1370
- /* @__PURE__ */ jsx28("span", { children: copied ? "Copied" : "Copy" })
1380
+ /* @__PURE__ */ jsx29("button", { type: "button", className: "fd-code-act", onClick: () => setWrap((v) => !v), "aria-pressed": wrap, title: wrap ? "No wrap" : "Soft wrap", children: /* @__PURE__ */ jsx29("i", { className: "ph ph-text-" + (wrap ? "columns" : "align-left"), "aria-hidden": "true" }) }),
1381
+ copyable ? /* @__PURE__ */ jsxs24("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(body), children: [
1382
+ /* @__PURE__ */ jsx29("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
1383
+ /* @__PURE__ */ jsx29("span", { children: copied ? "Copied" : "Copy" })
1371
1384
  ] }) : null
1372
1385
  ] }),
1373
- /* @__PURE__ */ jsxs23("div", { className: "fd-code-body", children: [
1374
- lineNumbers ? /* @__PURE__ */ jsx28("pre", { className: "fd-code-gutter", "aria-hidden": "true", children: shown.split("\n").map((_, i) => i + 1 + "\n").join("") }) : null,
1375
- /* @__PURE__ */ jsx28("pre", { className: "fd-code-pre", tabIndex: 0, children: /* @__PURE__ */ jsx28("code", { children: /* @__PURE__ */ jsx28(Highlighted, { code: shown, lang: language }) }) })
1386
+ /* @__PURE__ */ jsxs24("div", { className: "fd-code-body", children: [
1387
+ lineNumbers ? /* @__PURE__ */ jsx29("pre", { className: "fd-code-gutter", "aria-hidden": "true", children: shown.split("\n").map((_, i) => i + 1 + "\n").join("") }) : null,
1388
+ /* @__PURE__ */ jsx29("pre", { className: "fd-code-pre", tabIndex: 0, children: /* @__PURE__ */ jsx29("code", { children: /* @__PURE__ */ jsx29(Highlighted, { code: shown, lang: language }) }) })
1376
1389
  ] }),
1377
- foldable ? /* @__PURE__ */ jsxs23("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
1378
- /* @__PURE__ */ jsx28("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1390
+ foldable ? /* @__PURE__ */ jsxs24("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
1391
+ /* @__PURE__ */ jsx29("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1379
1392
  open ? "Collapse" : "Show all " + lines.length + " lines"
1380
1393
  ] }) : null
1381
1394
  ] });
@@ -1395,32 +1408,32 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
1395
1408
  const dels = all.filter((l) => l.k === "del").length;
1396
1409
  const foldable = collapseAfter > 0 && all.length > collapseAfter + 6;
1397
1410
  const rows = foldable && !open ? all.slice(0, collapseAfter) : all;
1398
- return /* @__PURE__ */ jsxs23("div", { className: ["fd-code", "fd-diff", className].filter(Boolean).join(" "), children: [
1399
- /* @__PURE__ */ jsxs23("div", { className: "fd-code-head", children: [
1400
- /* @__PURE__ */ jsx28("i", { className: "ph ph-git-diff fd-code-icon", "aria-hidden": "true" }),
1401
- filename ? /* @__PURE__ */ jsx28("span", { className: "fd-code-file", children: filename }) : /* @__PURE__ */ jsx28("span", { className: "fd-code-lang", children: "Diff" }),
1402
- /* @__PURE__ */ jsxs23("span", { className: "fd-diff-stat fd-tabular", children: [
1403
- /* @__PURE__ */ jsxs23("span", { className: "is-add", children: [
1411
+ return /* @__PURE__ */ jsxs24("div", { className: ["fd-code", "fd-diff", className].filter(Boolean).join(" "), children: [
1412
+ /* @__PURE__ */ jsxs24("div", { className: "fd-code-head", children: [
1413
+ /* @__PURE__ */ jsx29("i", { className: "ph ph-git-diff fd-code-icon", "aria-hidden": "true" }),
1414
+ filename ? /* @__PURE__ */ jsx29("span", { className: "fd-code-file", children: filename }) : /* @__PURE__ */ jsx29("span", { className: "fd-code-lang", children: "Diff" }),
1415
+ /* @__PURE__ */ jsxs24("span", { className: "fd-diff-stat fd-tabular", children: [
1416
+ /* @__PURE__ */ jsxs24("span", { className: "is-add", children: [
1404
1417
  "+",
1405
1418
  adds
1406
1419
  ] }),
1407
- /* @__PURE__ */ jsxs23("span", { className: "is-del", children: [
1420
+ /* @__PURE__ */ jsxs24("span", { className: "is-del", children: [
1408
1421
  "\u2212",
1409
1422
  dels
1410
1423
  ] })
1411
1424
  ] }),
1412
- /* @__PURE__ */ jsx28("span", { className: "fd-code-spacer" }),
1413
- /* @__PURE__ */ jsxs23("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(raw), children: [
1414
- /* @__PURE__ */ jsx28("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
1415
- /* @__PURE__ */ jsx28("span", { children: copied ? "Copied" : "Copy" })
1425
+ /* @__PURE__ */ jsx29("span", { className: "fd-code-spacer" }),
1426
+ /* @__PURE__ */ jsxs24("button", { type: "button", className: "fd-code-act" + (copied ? " is-done" : ""), onClick: () => copy(raw), children: [
1427
+ /* @__PURE__ */ jsx29("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
1428
+ /* @__PURE__ */ jsx29("span", { children: copied ? "Copied" : "Copy" })
1416
1429
  ] })
1417
1430
  ] }),
1418
- /* @__PURE__ */ jsx28("div", { className: "fd-diff-body", children: rows.map((r, i) => /* @__PURE__ */ jsxs23("div", { className: "fd-diff-line is-" + r.k, children: [
1419
- /* @__PURE__ */ jsx28("span", { className: "fd-diff-mark", "aria-hidden": "true", children: r.k === "add" ? "+" : r.k === "del" ? "\u2212" : "" }),
1420
- /* @__PURE__ */ jsx28("code", { children: r.k === "add" || r.k === "del" ? r.line.slice(1) : r.line })
1431
+ /* @__PURE__ */ jsx29("div", { className: "fd-diff-body", children: rows.map((r, i) => /* @__PURE__ */ jsxs24("div", { className: "fd-diff-line is-" + r.k, children: [
1432
+ /* @__PURE__ */ jsx29("span", { className: "fd-diff-mark", "aria-hidden": "true", children: r.k === "add" ? "+" : r.k === "del" ? "\u2212" : "" }),
1433
+ /* @__PURE__ */ jsx29("code", { children: r.k === "add" || r.k === "del" ? r.line.slice(1) : r.line })
1421
1434
  ] }, i)) }),
1422
- foldable ? /* @__PURE__ */ jsxs23("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
1423
- /* @__PURE__ */ jsx28("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1435
+ foldable ? /* @__PURE__ */ jsxs24("button", { type: "button", className: "fd-code-fold", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
1436
+ /* @__PURE__ */ jsx29("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" }),
1424
1437
  open ? "Collapse" : "Show all " + all.length + " lines"
1425
1438
  ] }) : null
1426
1439
  ] });
@@ -1428,7 +1441,7 @@ function DiffBlock({ diff = "", filename, collapseAfter = 34, className = "" })
1428
1441
 
1429
1442
  // src/components/data/Markdown.tsx
1430
1443
  import * as React9 from "react";
1431
- import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
1444
+ import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
1432
1445
  var SAFE = /^(?:https?:|mailto:|tel:|#|\/|\.{1,2}\/)/i;
1433
1446
  var safeHref = (h) => SAFE.test(String(h || "").trim()) ? String(h).trim() : null;
1434
1447
  var INLINE = [
@@ -1458,22 +1471,22 @@ function inlineNodes(src, ctx, keyBase) {
1458
1471
  const { kind, m } = best;
1459
1472
  if (m.index > 0) out.push(rest.slice(0, m.index));
1460
1473
  const g = (i) => m[i];
1461
- if (kind === "code") out.push(/* @__PURE__ */ jsx29("code", { className: "fd-md-code", children: g(1) }, key()));
1474
+ if (kind === "code") out.push(/* @__PURE__ */ jsx30("code", { className: "fd-md-code", children: g(1) }, key()));
1462
1475
  else if (kind === "image") {
1463
1476
  const src2 = safeHref(g(2));
1464
- out.push(ctx.allowImages && src2 ? /* @__PURE__ */ jsx29("img", { className: "fd-md-img", src: src2, alt: g(1) || "", title: g(3) || void 0, loading: "lazy" }, key()) : /* @__PURE__ */ jsx29("span", { className: "fd-md-imgalt", children: g(1) || "image" }, key()));
1477
+ out.push(ctx.allowImages && src2 ? /* @__PURE__ */ jsx30("img", { className: "fd-md-img", src: src2, alt: g(1) || "", title: g(3) || void 0, loading: "lazy" }, key()) : /* @__PURE__ */ jsx30("span", { className: "fd-md-imgalt", children: g(1) || "image" }, key()));
1465
1478
  } else if (kind === "link") {
1466
1479
  const href = safeHref(g(2));
1467
- out.push(href ? /* @__PURE__ */ jsx29("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__ */ jsx29("span", { children: g(1) }, key()));
1480
+ out.push(href ? /* @__PURE__ */ jsx30("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__ */ jsx30("span", { children: g(1) }, key()));
1468
1481
  } else if (kind === "cite") {
1469
- out.push(ctx.renderCitation ? /* @__PURE__ */ jsx29(React9.Fragment, { children: ctx.renderCitation(g(1)) }, key()) : /* @__PURE__ */ jsx29("sup", { className: "fd-md-cite", children: g(1) }, key()));
1470
- } else if (kind === "strongem") out.push(/* @__PURE__ */ jsx29("strong", { children: /* @__PURE__ */ jsx29("em", { children: inlineNodes(g(1), ctx, key()) }) }, key()));
1471
- else if (kind === "strong") out.push(/* @__PURE__ */ jsx29("strong", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
1472
- else if (kind === "em") out.push(/* @__PURE__ */ jsx29("em", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
1473
- else if (kind === "del") out.push(/* @__PURE__ */ jsx29("del", { children: inlineNodes(g(1), ctx, key()) }, key()));
1482
+ out.push(ctx.renderCitation ? /* @__PURE__ */ jsx30(React9.Fragment, { children: ctx.renderCitation(g(1)) }, key()) : /* @__PURE__ */ jsx30("sup", { className: "fd-md-cite", children: g(1) }, key()));
1483
+ } else if (kind === "strongem") out.push(/* @__PURE__ */ jsx30("strong", { children: /* @__PURE__ */ jsx30("em", { children: inlineNodes(g(1), ctx, key()) }) }, key()));
1484
+ else if (kind === "strong") out.push(/* @__PURE__ */ jsx30("strong", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
1485
+ else if (kind === "em") out.push(/* @__PURE__ */ jsx30("em", { children: inlineNodes(g(1) || g(2), ctx, key()) }, key()));
1486
+ else if (kind === "del") out.push(/* @__PURE__ */ jsx30("del", { children: inlineNodes(g(1), ctx, key()) }, key()));
1474
1487
  else if (kind === "autolink" || kind === "bare") {
1475
1488
  const href = safeHref(g(1));
1476
- out.push(href ? /* @__PURE__ */ jsx29("a", { href, target: "_blank", rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: g(1).replace(/^mailto:/, "") }, key()) : g(1));
1489
+ out.push(href ? /* @__PURE__ */ jsx30("a", { href, target: "_blank", rel: "noopener noreferrer", onClick: ctx.onLinkClick, children: g(1).replace(/^mailto:/, "") }, key()) : g(1));
1477
1490
  }
1478
1491
  rest = rest.slice(m.index + m[0].length);
1479
1492
  }
@@ -1591,33 +1604,33 @@ function renderBlocks(blocks, ctx, path) {
1591
1604
  const k = path + "-" + i;
1592
1605
  switch (b.t) {
1593
1606
  case "code": {
1594
- if ((b.lang || "").toLowerCase() === "diff") return /* @__PURE__ */ jsx29(DiffBlock, { diff: b.code, filename: b.file || void 0 }, k);
1595
- return /* @__PURE__ */ jsx29(CodeBlock, { code: b.code, language: b.lang, filename: b.file || void 0, ...ctx.codeProps || {} }, k);
1607
+ if ((b.lang || "").toLowerCase() === "diff") return /* @__PURE__ */ jsx30(DiffBlock, { diff: b.code, filename: b.file || void 0 }, k);
1608
+ return /* @__PURE__ */ jsx30(CodeBlock, { code: b.code, language: b.lang, filename: b.file || void 0, ...ctx.codeProps || {} }, k);
1596
1609
  }
1597
1610
  case "h": {
1598
1611
  const lvl = Math.min(6, Math.max(1, b.level + (ctx.headingOffset || 0)));
1599
1612
  const Tag2 = "h" + lvl;
1600
- return /* @__PURE__ */ jsx29(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
1613
+ return /* @__PURE__ */ jsx30(Tag2, { className: "fd-md-h fd-md-h" + lvl, children: inlineNodes(b.text, ctx, k) }, k);
1601
1614
  }
1602
1615
  case "hr":
1603
- return /* @__PURE__ */ jsx29("hr", { className: "fd-md-hr" }, k);
1616
+ return /* @__PURE__ */ jsx30("hr", { className: "fd-md-hr" }, k);
1604
1617
  case "quote":
1605
- return /* @__PURE__ */ jsx29("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
1618
+ return /* @__PURE__ */ jsx30("blockquote", { className: "fd-md-quote", children: renderBlocks(b.children, ctx, k) }, k);
1606
1619
  case "list": {
1607
1620
  const Tag2 = b.ordered ? "ol" : "ul";
1608
1621
  const isTask = b.items.some((it) => it.checked != null);
1609
- return /* @__PURE__ */ jsx29(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__ */ jsxs24("li", { className: it.checked != null ? it.checked ? "is-done" : "is-todo" : void 0, children: [
1610
- it.checked != null ? /* @__PURE__ */ jsx29("span", { className: "fd-md-task", "aria-hidden": "true", children: /* @__PURE__ */ jsx29("i", { className: "ph ph-" + (it.checked ? "check-square" : "square") }) }) : null,
1611
- /* @__PURE__ */ jsx29("span", { className: "fd-md-li", children: renderBlocks(it.children, ctx, k + "-" + j) })
1622
+ return /* @__PURE__ */ jsx30(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__ */ jsxs25("li", { className: it.checked != null ? it.checked ? "is-done" : "is-todo" : void 0, children: [
1623
+ it.checked != null ? /* @__PURE__ */ jsx30("span", { className: "fd-md-task", "aria-hidden": "true", children: /* @__PURE__ */ jsx30("i", { className: "ph ph-" + (it.checked ? "check-square" : "square") }) }) : null,
1624
+ /* @__PURE__ */ jsx30("span", { className: "fd-md-li", children: renderBlocks(it.children, ctx, k + "-" + j) })
1612
1625
  ] }, k + "-" + j)) }, k);
1613
1626
  }
1614
1627
  case "table":
1615
- return /* @__PURE__ */ jsx29("div", { className: "fd-md-tablewrap", children: /* @__PURE__ */ jsxs24("table", { className: "fd-md-table", children: [
1616
- /* @__PURE__ */ jsx29("thead", { children: /* @__PURE__ */ jsx29("tr", { children: b.head.map((c, j) => /* @__PURE__ */ jsx29("th", { style: { textAlign: b.align[j] || "left" }, children: inlineNodes(c, ctx, k + "h" + j) }, j)) }) }),
1617
- /* @__PURE__ */ jsx29("tbody", { children: b.rows.map((r, ri) => /* @__PURE__ */ jsx29("tr", { children: b.head.map((_, ci) => /* @__PURE__ */ jsx29("td", { style: { textAlign: b.align[ci] || "left" }, children: inlineNodes(r[ci] || "", ctx, k + ri + "c" + ci) }, ci)) }, ri)) })
1628
+ return /* @__PURE__ */ jsx30("div", { className: "fd-md-tablewrap", children: /* @__PURE__ */ jsxs25("table", { className: "fd-md-table", children: [
1629
+ /* @__PURE__ */ jsx30("thead", { children: /* @__PURE__ */ jsx30("tr", { children: b.head.map((c, j) => /* @__PURE__ */ jsx30("th", { style: { textAlign: b.align[j] || "left" }, children: inlineNodes(c, ctx, k + "h" + j) }, j)) }) }),
1630
+ /* @__PURE__ */ jsx30("tbody", { children: b.rows.map((r, ri) => /* @__PURE__ */ jsx30("tr", { children: b.head.map((_, ci) => /* @__PURE__ */ jsx30("td", { style: { textAlign: b.align[ci] || "left" }, children: inlineNodes(r[ci] || "", ctx, k + ri + "c" + ci) }, ci)) }, ri)) })
1618
1631
  ] }) }, k);
1619
1632
  default:
1620
- return /* @__PURE__ */ jsx29("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
1633
+ return /* @__PURE__ */ jsx30("p", { className: "fd-md-p", children: inlineNodes(b.text, ctx, k) }, k);
1621
1634
  }
1622
1635
  });
1623
1636
  }
@@ -1632,24 +1645,24 @@ function Markdown({
1632
1645
  }) {
1633
1646
  const ctx = { allowImages, headingOffset, renderCitation, onLinkClick, codeProps };
1634
1647
  const blocks = React9.useMemo(() => parseBlocks(source), [source]);
1635
- return /* @__PURE__ */ jsx29("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
1648
+ return /* @__PURE__ */ jsx30("div", { className: ["fd-md", className].filter(Boolean).join(" "), children: renderBlocks(blocks, ctx, "b") });
1636
1649
  }
1637
1650
  function MarkdownInline({ source = "", className = "", onLinkClick }) {
1638
- return /* @__PURE__ */ jsx29("span", { className: ["fd-md-inline", className].filter(Boolean).join(" "), children: inlineNodes(source, { allowImages: false, onLinkClick }, "i") });
1651
+ return /* @__PURE__ */ jsx30("span", { className: ["fd-md-inline", className].filter(Boolean).join(" "), children: inlineNodes(source, { allowImages: false, onLinkClick }, "i") });
1639
1652
  }
1640
1653
  function markdownToText(src) {
1641
1654
  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();
1642
1655
  }
1643
1656
 
1644
1657
  // src/components/data/Meter.tsx
1645
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
1658
+ import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
1646
1659
  function Meter({ segments = [], unallocated = 0, height = 8, label, legend = false, className = "" }) {
1647
1660
  const total = segments.reduce((s, x) => s + x.value, 0) + unallocated;
1648
1661
  const pct = (v) => total ? v / total * 100 : 0;
1649
- return /* @__PURE__ */ jsxs25("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 8 }, children: [
1650
- label ? /* @__PURE__ */ jsx30("span", { className: "fd-label-lg fd-secondary", children: label }) : null,
1651
- /* @__PURE__ */ jsxs25("div", { className: "fd-meterbar", style: { height }, children: [
1652
- segments.map((s, i) => /* @__PURE__ */ jsx30(
1662
+ return /* @__PURE__ */ jsxs26("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 8 }, children: [
1663
+ label ? /* @__PURE__ */ jsx31("span", { className: "fd-label-lg fd-secondary", children: label }) : null,
1664
+ /* @__PURE__ */ jsxs26("div", { className: "fd-meterbar", style: { height }, children: [
1665
+ segments.map((s, i) => /* @__PURE__ */ jsx31(
1653
1666
  "span",
1654
1667
  {
1655
1668
  className: "fd-meterbar-seg",
@@ -1658,15 +1671,15 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
1658
1671
  },
1659
1672
  i
1660
1673
  )),
1661
- unallocated > 0 ? /* @__PURE__ */ jsx30("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
1674
+ unallocated > 0 ? /* @__PURE__ */ jsx31("span", { className: "fd-meterbar-seg fd-meterbar-unallocated", title: "Unallocated", style: { width: pct(unallocated) + "%" } }) : null
1662
1675
  ] }),
1663
- legend ? /* @__PURE__ */ jsxs25("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap" }, children: [
1664
- segments.map((s, i) => /* @__PURE__ */ jsxs25("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
1665
- /* @__PURE__ */ jsx30("span", { style: { width: 9, height: 9, borderRadius: 2, background: s.color || "var(--chart-" + (i % 8 + 1) + ")" } }),
1676
+ legend ? /* @__PURE__ */ jsxs26("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap" }, children: [
1677
+ segments.map((s, i) => /* @__PURE__ */ jsxs26("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
1678
+ /* @__PURE__ */ jsx31("span", { style: { width: 9, height: 9, borderRadius: 2, background: s.color || "var(--chart-" + (i % 8 + 1) + ")" } }),
1666
1679
  s.label
1667
1680
  ] }, i)),
1668
- unallocated > 0 ? /* @__PURE__ */ jsxs25("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
1669
- /* @__PURE__ */ jsx30("span", { className: "fd-meterbar-unallocated", style: { width: 9, height: 9, borderRadius: 2 } }),
1681
+ unallocated > 0 ? /* @__PURE__ */ jsxs26("span", { className: "fd-row fd-body-sm fd-secondary", style: { gap: 7 }, children: [
1682
+ /* @__PURE__ */ jsx31("span", { className: "fd-meterbar-unallocated", style: { width: 9, height: 9, borderRadius: 2 } }),
1670
1683
  "Unallocated"
1671
1684
  ] }) : null
1672
1685
  ] }) : null
@@ -1674,7 +1687,7 @@ function Meter({ segments = [], unallocated = 0, height = 8, label, legend = fal
1674
1687
  }
1675
1688
 
1676
1689
  // src/components/data/Pagination.tsx
1677
- import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
1690
+ import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
1678
1691
  function Pagination({
1679
1692
  page = 1,
1680
1693
  pageSize = 25,
@@ -1699,12 +1712,12 @@ function Pagination({
1699
1712
  if (i === 1 || i === totalPages || Math.abs(i - page) <= span) nums.push(i);
1700
1713
  else if (nums[nums.length - 1] !== "\u2026") nums.push("\u2026");
1701
1714
  }
1702
- return /* @__PURE__ */ jsxs26("div", { className: ["fd-pag", className].filter(Boolean).join(" "), ...rest, children: [
1703
- /* @__PURE__ */ jsx31("span", { className: "fd-pag-count", children: loading ? /* @__PURE__ */ jsx31("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 12, width: 108 } }) : total === 0 ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
1715
+ return /* @__PURE__ */ jsxs27("div", { className: ["fd-pag", className].filter(Boolean).join(" "), ...rest, children: [
1716
+ /* @__PURE__ */ jsx32("span", { className: "fd-pag-count", children: loading ? /* @__PURE__ */ jsx32("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 12, width: 108 } }) : total === 0 ? /* @__PURE__ */ jsxs27(Fragment7, { children: [
1704
1717
  "No ",
1705
1718
  unit
1706
- ] }) : /* @__PURE__ */ jsxs26(Fragment7, { children: [
1707
- /* @__PURE__ */ jsxs26("strong", { children: [
1719
+ ] }) : /* @__PURE__ */ jsxs27(Fragment7, { children: [
1720
+ /* @__PURE__ */ jsxs27("strong", { children: [
1708
1721
  from.toLocaleString(),
1709
1722
  "\u2013",
1710
1723
  to.toLocaleString()
@@ -1714,14 +1727,14 @@ function Pagination({
1714
1727
  " ",
1715
1728
  unit
1716
1729
  ] }) }),
1717
- onPageSizeChange ? /* @__PURE__ */ jsxs26("label", { className: "fd-pag-size", children: [
1718
- /* @__PURE__ */ jsx31("span", { children: "Rows" }),
1719
- /* @__PURE__ */ jsx31("select", { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), "aria-label": "Rows per page", children: pageSizes.map((n) => /* @__PURE__ */ jsx31("option", { value: n, children: n }, n)) })
1730
+ onPageSizeChange ? /* @__PURE__ */ jsxs27("label", { className: "fd-pag-size", children: [
1731
+ /* @__PURE__ */ jsx32("span", { children: "Rows" }),
1732
+ /* @__PURE__ */ jsx32("select", { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), "aria-label": "Rows per page", children: pageSizes.map((n) => /* @__PURE__ */ jsx32("option", { value: n, children: n }, n)) })
1720
1733
  ] }) : null,
1721
- /* @__PURE__ */ jsxs26("span", { className: "fd-pag-nav", children: [
1722
- /* @__PURE__ */ jsx31("button", { type: "button", onClick: () => go(1), disabled: page <= 1, "aria-label": "First page", children: /* @__PURE__ */ jsx31("i", { className: "ph ph-caret-double-left" }) }),
1723
- /* @__PURE__ */ jsx31("button", { type: "button", onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "Previous page", children: /* @__PURE__ */ jsx31("i", { className: "ph ph-caret-left" }) }),
1724
- nums.map((n, i) => n === "\u2026" ? /* @__PURE__ */ jsx31("span", { className: "fd-pag-gap", "aria-hidden": "true", children: "\u2026" }, "e" + i) : /* @__PURE__ */ jsx31(
1734
+ /* @__PURE__ */ jsxs27("span", { className: "fd-pag-nav", children: [
1735
+ /* @__PURE__ */ jsx32("button", { type: "button", onClick: () => go(1), disabled: page <= 1, "aria-label": "First page", children: /* @__PURE__ */ jsx32("i", { className: "ph ph-caret-double-left" }) }),
1736
+ /* @__PURE__ */ jsx32("button", { type: "button", onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "Previous page", children: /* @__PURE__ */ jsx32("i", { className: "ph ph-caret-left" }) }),
1737
+ nums.map((n, i) => n === "\u2026" ? /* @__PURE__ */ jsx32("span", { className: "fd-pag-gap", "aria-hidden": "true", children: "\u2026" }, "e" + i) : /* @__PURE__ */ jsx32(
1725
1738
  "button",
1726
1739
  {
1727
1740
  type: "button",
@@ -1732,15 +1745,15 @@ function Pagination({
1732
1745
  },
1733
1746
  n
1734
1747
  )),
1735
- /* @__PURE__ */ jsx31("button", { type: "button", onClick: () => go(page + 1), disabled: page >= totalPages, "aria-label": "Next page", children: /* @__PURE__ */ jsx31("i", { className: "ph ph-caret-right" }) }),
1736
- /* @__PURE__ */ jsx31("button", { type: "button", onClick: () => go(totalPages), disabled: page >= totalPages, "aria-label": "Last page", children: /* @__PURE__ */ jsx31("i", { className: "ph ph-caret-double-right" }) })
1748
+ /* @__PURE__ */ jsx32("button", { type: "button", onClick: () => go(page + 1), disabled: page >= totalPages, "aria-label": "Next page", children: /* @__PURE__ */ jsx32("i", { className: "ph ph-caret-right" }) }),
1749
+ /* @__PURE__ */ jsx32("button", { type: "button", onClick: () => go(totalPages), disabled: page >= totalPages, "aria-label": "Last page", children: /* @__PURE__ */ jsx32("i", { className: "ph ph-caret-double-right" }) })
1737
1750
  ] })
1738
1751
  ] });
1739
1752
  }
1740
1753
 
1741
1754
  // src/components/data/RelativeTime.tsx
1742
1755
  import * as React10 from "react";
1743
- import { jsxs as jsxs27 } from "react/jsx-runtime";
1756
+ import { jsxs as jsxs28 } from "react/jsx-runtime";
1744
1757
  var MIN = 6e4;
1745
1758
  var HOUR = 36e5;
1746
1759
  var DAY = 864e5;
@@ -1802,7 +1815,7 @@ function RelativeTime({ value, prefix, className = "", refresh: refresh2 = true,
1802
1815
  return () => clearInterval(id);
1803
1816
  }, [t, refresh2]);
1804
1817
  if (!t || isNaN(t)) return null;
1805
- return /* @__PURE__ */ jsxs27("time", { className, dateTime: new Date(t).toISOString(), title: formatAbsolute(new Date(t)), ...rest, children: [
1818
+ return /* @__PURE__ */ jsxs28("time", { className, dateTime: new Date(t).toISOString(), title: formatAbsolute(new Date(t)), ...rest, children: [
1806
1819
  prefix ? prefix + " " : "",
1807
1820
  formatRelative(new Date(t))
1808
1821
  ] });
@@ -1969,7 +1982,7 @@ var FileKit = {
1969
1982
  };
1970
1983
 
1971
1984
  // src/components/data/SegmentedMeter.tsx
1972
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
1985
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
1973
1986
  var VARIANT_FILL = {
1974
1987
  brand: "var(--brand)",
1975
1988
  neutral: "var(--n-400)",
@@ -2016,21 +2029,21 @@ function SegmentedMeter({
2016
2029
  const fill = (s, i) => s.color || (s.variant ? VARIANT_FILL[s.variant] : void 0) || CHART[i % CHART.length];
2017
2030
  const generatedId = React11.useId();
2018
2031
  const uid2 = id || generatedId;
2019
- return /* @__PURE__ */ jsxs28("div", { className: ["fd-segmeter", className].filter(Boolean).join(" "), onClick, children: [
2020
- label || showTotal ? /* @__PURE__ */ jsxs28("div", { className: "fd-segmeter-head", children: [
2021
- label ? /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-label", id: uid2 + "-l", children: label }) : /* @__PURE__ */ jsx32("span", {}),
2022
- showTotal ? /* @__PURE__ */ jsxs28("span", { className: "fd-segmeter-total fd-tabular", children: [
2032
+ return /* @__PURE__ */ jsxs29("div", { className: ["fd-segmeter", className].filter(Boolean).join(" "), onClick, children: [
2033
+ label || showTotal ? /* @__PURE__ */ jsxs29("div", { className: "fd-segmeter-head", children: [
2034
+ label ? /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-label", id: uid2 + "-l", children: label }) : /* @__PURE__ */ jsx33("span", {}),
2035
+ showTotal ? /* @__PURE__ */ jsxs29("span", { className: "fd-segmeter-total fd-tabular", children: [
2023
2036
  format(used),
2024
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-sep", children: " / " }),
2037
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-sep", children: " / " }),
2025
2038
  safeTotal ? format(safeTotal) : "\u2014",
2026
- showPercent ? /* @__PURE__ */ jsxs28("span", { className: "fd-segmeter-pct", children: [
2039
+ showPercent ? /* @__PURE__ */ jsxs29("span", { className: "fd-segmeter-pct", children: [
2027
2040
  " (",
2028
2041
  pct,
2029
2042
  "%)"
2030
2043
  ] }) : null
2031
2044
  ] }) : null
2032
2045
  ] }) : null,
2033
- /* @__PURE__ */ jsx32(
2046
+ /* @__PURE__ */ jsx33(
2034
2047
  "div",
2035
2048
  {
2036
2049
  className: "fd-segmeter-rail",
@@ -2042,7 +2055,7 @@ function SegmentedMeter({
2042
2055
  "aria-valuemin": 0,
2043
2056
  "aria-valuemax": safeTotal || 100,
2044
2057
  "aria-valuetext": format(used) + " of " + (safeTotal ? format(safeTotal) : "unknown") + " \u2014 " + pct + "%",
2045
- children: items.map((s, i) => /* @__PURE__ */ jsx32(
2058
+ children: items.map((s, i) => /* @__PURE__ */ jsx33(
2046
2059
  "span",
2047
2060
  {
2048
2061
  className: "fd-segmeter-seg",
@@ -2053,16 +2066,16 @@ function SegmentedMeter({
2053
2066
  ))
2054
2067
  }
2055
2068
  ),
2056
- legend ? /* @__PURE__ */ jsxs28("ul", { className: "fd-segmeter-legend", children: [
2057
- items.map((s, i) => /* @__PURE__ */ jsxs28("li", { children: [
2058
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-dot", style: { background: fill(s, i) }, "aria-hidden": "true" }),
2059
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-key", children: s.label }),
2060
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-val fd-tabular", children: format(s.value) })
2069
+ legend ? /* @__PURE__ */ jsxs29("ul", { className: "fd-segmeter-legend", children: [
2070
+ items.map((s, i) => /* @__PURE__ */ jsxs29("li", { children: [
2071
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-dot", style: { background: fill(s, i) }, "aria-hidden": "true" }),
2072
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-key", children: s.label }),
2073
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-val fd-tabular", children: format(s.value) })
2061
2074
  ] }, s.id || s.label || i)),
2062
- safeTotal && used < safeTotal ? /* @__PURE__ */ jsxs28("li", { className: "is-remainder", children: [
2063
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-dot is-empty", "aria-hidden": "true" }),
2064
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-key", children: remainderLabel }),
2065
- /* @__PURE__ */ jsx32("span", { className: "fd-segmeter-val fd-tabular", children: format(safeTotal - used) })
2075
+ safeTotal && used < safeTotal ? /* @__PURE__ */ jsxs29("li", { className: "is-remainder", children: [
2076
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-dot is-empty", "aria-hidden": "true" }),
2077
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-key", children: remainderLabel }),
2078
+ /* @__PURE__ */ jsx33("span", { className: "fd-segmeter-val fd-tabular", children: format(safeTotal - used) })
2066
2079
  ] }) : null
2067
2080
  ] }) : null
2068
2081
  ] });
@@ -2070,22 +2083,22 @@ function SegmentedMeter({
2070
2083
  function QuotaRow({ label, percent = 0, note, tone, className = "" }) {
2071
2084
  const p = Math.max(0, Math.min(100, Math.round(Number(percent) || 0)));
2072
2085
  const auto = p >= 90 ? "danger" : p >= 70 ? "warn" : "brand";
2073
- return /* @__PURE__ */ jsxs28("div", { className: ["fd-quota", className].filter(Boolean).join(" "), children: [
2074
- /* @__PURE__ */ jsxs28("div", { className: "fd-quota-head", children: [
2075
- /* @__PURE__ */ jsx32("span", { className: "fd-quota-label", children: label }),
2076
- note ? /* @__PURE__ */ jsx32("span", { className: "fd-quota-note", children: note }) : null,
2077
- /* @__PURE__ */ jsxs28("span", { className: "fd-quota-pct fd-tabular", children: [
2086
+ return /* @__PURE__ */ jsxs29("div", { className: ["fd-quota", className].filter(Boolean).join(" "), children: [
2087
+ /* @__PURE__ */ jsxs29("div", { className: "fd-quota-head", children: [
2088
+ /* @__PURE__ */ jsx33("span", { className: "fd-quota-label", children: label }),
2089
+ note ? /* @__PURE__ */ jsx33("span", { className: "fd-quota-note", children: note }) : null,
2090
+ /* @__PURE__ */ jsxs29("span", { className: "fd-quota-pct fd-tabular", children: [
2078
2091
  p,
2079
2092
  "%"
2080
2093
  ] })
2081
2094
  ] }),
2082
- /* @__PURE__ */ jsx32("div", { className: "fd-quota-rail", role: "meter", "aria-label": typeof label === "string" ? label : void 0, "aria-valuenow": p, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx32("span", { className: "fd-quota-fill", style: { width: p + "%", background: VARIANT_FILL[tone || auto] } }) })
2095
+ /* @__PURE__ */ jsx33("div", { className: "fd-quota-rail", role: "meter", "aria-label": typeof label === "string" ? label : void 0, "aria-valuenow": p, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx33("span", { className: "fd-quota-fill", style: { width: p + "%", background: VARIANT_FILL[tone || auto] } }) })
2083
2096
  ] });
2084
2097
  }
2085
2098
 
2086
2099
  // src/components/data/SortMenu.tsx
2087
2100
  import * as React12 from "react";
2088
- import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
2101
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
2089
2102
  function SortMenu({ fields = [], sort, onSort, align = "right", className = "", ...rest }) {
2090
2103
  const [open, setOpen] = React12.useState(false);
2091
2104
  const ref = React12.useRef(null);
@@ -2109,7 +2122,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", className = "",
2109
2122
  const arrow = (f, d) => {
2110
2123
  const on = cur && cur.key === f.key && dir === d;
2111
2124
  const label = d === "asc" ? f.numeric ? "lowest first" : "A to Z" : f.numeric ? "highest first" : "Z to A";
2112
- return /* @__PURE__ */ jsx33(
2125
+ return /* @__PURE__ */ jsx34(
2113
2126
  "button",
2114
2127
  {
2115
2128
  type: "button",
@@ -2127,21 +2140,21 @@ function SortMenu({ fields = [], sort, onSort, align = "right", className = "",
2127
2140
  background: on ? "var(--brand)" : "var(--surface)",
2128
2141
  color: on ? "#fff" : "var(--text-muted)"
2129
2142
  },
2130
- children: /* @__PURE__ */ jsx33("i", { className: "ph ph-arrow-" + (d === "asc" ? "up" : "down"), style: { fontSize: 13 } })
2143
+ children: /* @__PURE__ */ jsx34("i", { className: "ph ph-arrow-" + (d === "asc" ? "up" : "down"), style: { fontSize: 13 } })
2131
2144
  }
2132
2145
  );
2133
2146
  };
2134
- return /* @__PURE__ */ jsxs29("span", { className, style: { position: "relative", display: "inline-flex" }, ref, ...rest, children: [
2135
- /* @__PURE__ */ jsxs29(Button, { size: "sm", variant: "secondary", icon: dir === "asc" ? "sort-ascending" : "sort-descending", onClick: () => setOpen(!open), children: [
2147
+ return /* @__PURE__ */ jsxs30("span", { className, style: { position: "relative", display: "inline-flex" }, ref, ...rest, children: [
2148
+ /* @__PURE__ */ jsxs30(Button, { size: "sm", variant: "secondary", icon: dir === "asc" ? "sort-ascending" : "sort-descending", onClick: () => setOpen(!open), children: [
2136
2149
  cur ? cur.label : "Unsorted",
2137
- /* @__PURE__ */ jsx33("i", { className: "ph ph-" + (dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
2150
+ /* @__PURE__ */ jsx34("i", { className: "ph ph-" + (dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
2138
2151
  ] }),
2139
- open ? /* @__PURE__ */ jsx33("span", { className: "fd-view-enter", style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex: 120, width: 280, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 }, children: /* @__PURE__ */ jsxs29("span", { className: "fd-stack", style: { gap: 2 }, children: [
2140
- /* @__PURE__ */ jsx33("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
2152
+ open ? /* @__PURE__ */ jsx34("span", { className: "fd-view-enter", style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex: 120, width: 280, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 }, children: /* @__PURE__ */ jsxs30("span", { className: "fd-stack", style: { gap: 2 }, children: [
2153
+ /* @__PURE__ */ jsx34("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
2141
2154
  fields.map((f) => {
2142
2155
  const active = cur && cur.key === f.key;
2143
- return /* @__PURE__ */ jsxs29("span", { className: "fd-row", style: { gap: 8, padding: "4px 8px", borderRadius: 7, background: active ? "var(--surface-brand)" : "transparent" }, children: [
2144
- /* @__PURE__ */ jsx33("span", { className: "fd-body-sm", style: { flex: 1, fontWeight: active ? 700 : 500, color: active ? "var(--text-on-surface-brand)" : "var(--text)" }, children: f.label }),
2156
+ return /* @__PURE__ */ jsxs30("span", { className: "fd-row", style: { gap: 8, padding: "4px 8px", borderRadius: 7, background: active ? "var(--surface-brand)" : "transparent" }, children: [
2157
+ /* @__PURE__ */ jsx34("span", { className: "fd-body-sm", style: { flex: 1, fontWeight: active ? 700 : 500, color: active ? "var(--text-on-surface-brand)" : "var(--text)" }, children: f.label }),
2145
2158
  arrow(f, "asc"),
2146
2159
  arrow(f, "desc")
2147
2160
  ] }, f.key);
@@ -2152,7 +2165,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", className = "",
2152
2165
 
2153
2166
  // src/components/data/StepList.tsx
2154
2167
  import * as React13 from "react";
2155
- import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
2168
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
2156
2169
  var KIND_ICON = { tool: "wrench", search: "magnifying-glass", read: "file-text", write: "pencil-simple", reasoning: "brain", run: "terminal", fetch: "cloud-arrow-down" };
2157
2170
  function StepList({
2158
2171
  steps = [],
@@ -2178,30 +2191,30 @@ function StepList({
2178
2191
  if (openProp == null) setOpenState(next);
2179
2192
  onToggle && onToggle(next);
2180
2193
  };
2181
- return /* @__PURE__ */ jsxs30("div", { className: ["fd-steps", dense ? "is-dense" : "", open ? "is-open" : "", className].filter(Boolean).join(" "), children: [
2182
- /* @__PURE__ */ jsxs30("button", { type: "button", className: "fd-steps-head", onClick: toggle, "aria-expanded": open, children: [
2183
- running ? /* @__PURE__ */ jsx34("span", { className: "fd-steps-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx34("i", { className: "ph ph-" + (failed ? "warning-circle" : "check-circle"), "aria-hidden": "true" }),
2184
- /* @__PURE__ */ jsx34("span", { className: "fd-steps-title", children: summary }),
2185
- /* @__PURE__ */ jsxs30("span", { className: "fd-steps-count fd-tabular", children: [
2194
+ return /* @__PURE__ */ jsxs31("div", { className: ["fd-steps", dense ? "is-dense" : "", open ? "is-open" : "", className].filter(Boolean).join(" "), children: [
2195
+ /* @__PURE__ */ jsxs31("button", { type: "button", className: "fd-steps-head", onClick: toggle, "aria-expanded": open, children: [
2196
+ running ? /* @__PURE__ */ jsx35("span", { className: "fd-steps-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx35("i", { className: "ph ph-" + (failed ? "warning-circle" : "check-circle"), "aria-hidden": "true" }),
2197
+ /* @__PURE__ */ jsx35("span", { className: "fd-steps-title", children: summary }),
2198
+ /* @__PURE__ */ jsxs31("span", { className: "fd-steps-count fd-tabular", children: [
2186
2199
  steps.length,
2187
2200
  " step",
2188
2201
  steps.length === 1 ? "" : "s",
2189
- failed ? /* @__PURE__ */ jsxs30("span", { className: "fd-steps-failed", children: [
2202
+ failed ? /* @__PURE__ */ jsxs31("span", { className: "fd-steps-failed", children: [
2190
2203
  " \xB7 ",
2191
2204
  failed,
2192
2205
  " failed"
2193
2206
  ] }) : null
2194
2207
  ] }),
2195
- /* @__PURE__ */ jsx34("i", { className: "ph ph-caret-" + (open ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
2208
+ /* @__PURE__ */ jsx35("i", { className: "ph ph-caret-" + (open ? "up" : "down") + " fd-steps-caret", "aria-hidden": "true" })
2196
2209
  ] }),
2197
- open ? /* @__PURE__ */ jsx34("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
2210
+ open ? /* @__PURE__ */ jsx35("ol", { className: "fd-steps-list", children: steps.map((s, i) => {
2198
2211
  const id = s.id || i;
2199
2212
  const isOpen = !!expanded[id];
2200
2213
  const icon = KIND_ICON[s.kind || ""] || "dot-outline";
2201
- return /* @__PURE__ */ jsxs30("li", { className: "fd-step is-" + (s.status || "ok"), children: [
2202
- /* @__PURE__ */ jsxs30("div", { className: "fd-step-row", children: [
2203
- /* @__PURE__ */ jsx34("span", { className: "fd-step-icon", "aria-hidden": "true", children: s.status === "running" ? /* @__PURE__ */ jsx34("span", { className: "fd-steps-spin" }) : /* @__PURE__ */ jsx34("i", { className: "ph ph-" + icon }) }),
2204
- s.detail ? /* @__PURE__ */ jsxs30(
2214
+ return /* @__PURE__ */ jsxs31("li", { className: "fd-step is-" + (s.status || "ok"), children: [
2215
+ /* @__PURE__ */ jsxs31("div", { className: "fd-step-row", children: [
2216
+ /* @__PURE__ */ jsx35("span", { className: "fd-step-icon", "aria-hidden": "true", children: s.status === "running" ? /* @__PURE__ */ jsx35("span", { className: "fd-steps-spin" }) : /* @__PURE__ */ jsx35("i", { className: "ph ph-" + icon }) }),
2217
+ s.detail ? /* @__PURE__ */ jsxs31(
2205
2218
  "button",
2206
2219
  {
2207
2220
  type: "button",
@@ -2209,15 +2222,15 @@ function StepList({
2209
2222
  "aria-expanded": isOpen,
2210
2223
  onClick: () => setExpanded((m) => Object.assign({}, m, { [id]: !isOpen })),
2211
2224
  children: [
2212
- /* @__PURE__ */ jsx34("span", { children: s.label }),
2213
- /* @__PURE__ */ jsx34("i", { className: "ph ph-caret-" + (isOpen ? "up" : "down"), "aria-hidden": "true" })
2225
+ /* @__PURE__ */ jsx35("span", { children: s.label }),
2226
+ /* @__PURE__ */ jsx35("i", { className: "ph ph-caret-" + (isOpen ? "up" : "down"), "aria-hidden": "true" })
2214
2227
  ]
2215
2228
  }
2216
- ) : /* @__PURE__ */ jsx34("span", { className: "fd-step-label is-static", children: s.label }),
2217
- s.status === "error" ? /* @__PURE__ */ jsx34("span", { className: "fd-step-badge is-error", children: "failed" }) : null,
2218
- showDurations && s.durationMs ? /* @__PURE__ */ jsx34("span", { className: "fd-step-dur fd-tabular", children: formatDuration(s.durationMs) }) : null
2229
+ ) : /* @__PURE__ */ jsx35("span", { className: "fd-step-label is-static", children: s.label }),
2230
+ s.status === "error" ? /* @__PURE__ */ jsx35("span", { className: "fd-step-badge is-error", children: "failed" }) : null,
2231
+ showDurations && s.durationMs ? /* @__PURE__ */ jsx35("span", { className: "fd-step-dur fd-tabular", children: formatDuration(s.durationMs) }) : null
2219
2232
  ] }),
2220
- s.detail && isOpen ? /* @__PURE__ */ jsx34("pre", { className: "fd-step-detail", children: s.detail }) : null
2233
+ s.detail && isOpen ? /* @__PURE__ */ jsx35("pre", { className: "fd-step-detail", children: s.detail }) : null
2221
2234
  ] }, id);
2222
2235
  }) }) : null
2223
2236
  ] });
@@ -2225,54 +2238,54 @@ function StepList({
2225
2238
 
2226
2239
  // src/components/forms/Checkbox.tsx
2227
2240
  import * as React14 from "react";
2228
- import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
2241
+ import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
2229
2242
  function Checkbox({ label, description, card = false, indeterminate = false, className = "", ...rest }) {
2230
2243
  const ref = React14.useRef(null);
2231
2244
  React14.useEffect(() => {
2232
2245
  if (ref.current) ref.current.indeterminate = indeterminate;
2233
2246
  }, [indeterminate]);
2234
- return /* @__PURE__ */ jsxs31("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
2235
- /* @__PURE__ */ jsxs31("span", { className: "fd-choice-input", children: [
2236
- /* @__PURE__ */ jsx35("input", { ref, type: "checkbox", ...rest }),
2237
- /* @__PURE__ */ jsx35("span", { className: "fd-choice-box", "aria-hidden": "true", children: /* @__PURE__ */ jsx35("i", { className: indeterminate ? "ph ph-minus" : "ph ph-check" }) })
2247
+ return /* @__PURE__ */ jsxs32("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
2248
+ /* @__PURE__ */ jsxs32("span", { className: "fd-choice-input", children: [
2249
+ /* @__PURE__ */ jsx36("input", { ref, type: "checkbox", ...rest }),
2250
+ /* @__PURE__ */ jsx36("span", { className: "fd-choice-box", "aria-hidden": "true", children: /* @__PURE__ */ jsx36("i", { className: indeterminate ? "ph ph-minus" : "ph ph-check" }) })
2238
2251
  ] }),
2239
- /* @__PURE__ */ jsxs31("span", { className: "fd-choice-text", children: [
2240
- /* @__PURE__ */ jsx35("span", { className: "fd-choice-title", children: label }),
2241
- description ? /* @__PURE__ */ jsx35("span", { className: "fd-choice-desc", children: description }) : null
2252
+ /* @__PURE__ */ jsxs32("span", { className: "fd-choice-text", children: [
2253
+ /* @__PURE__ */ jsx36("span", { className: "fd-choice-title", children: label }),
2254
+ description ? /* @__PURE__ */ jsx36("span", { className: "fd-choice-desc", children: description }) : null
2242
2255
  ] })
2243
2256
  ] });
2244
2257
  }
2245
2258
 
2246
2259
  // src/components/forms/Radio.tsx
2247
- import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
2260
+ import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
2248
2261
  function Radio({ label, description, card = false, className = "", ...rest }) {
2249
- return /* @__PURE__ */ jsxs32("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
2250
- /* @__PURE__ */ jsxs32("span", { className: "fd-choice-input", children: [
2251
- /* @__PURE__ */ jsx36("input", { type: "radio", ...rest }),
2252
- /* @__PURE__ */ jsx36("span", { className: "fd-choice-box fd-choice-box-round", "aria-hidden": "true", children: /* @__PURE__ */ jsx36("span", { className: "fd-choice-dot" }) })
2262
+ return /* @__PURE__ */ jsxs33("label", { className: ["fd-choice", card ? "fd-choice-card" : "", className].filter(Boolean).join(" "), children: [
2263
+ /* @__PURE__ */ jsxs33("span", { className: "fd-choice-input", children: [
2264
+ /* @__PURE__ */ jsx37("input", { type: "radio", ...rest }),
2265
+ /* @__PURE__ */ jsx37("span", { className: "fd-choice-box fd-choice-box-round", "aria-hidden": "true", children: /* @__PURE__ */ jsx37("span", { className: "fd-choice-dot" }) })
2253
2266
  ] }),
2254
- /* @__PURE__ */ jsxs32("span", { className: "fd-choice-text", children: [
2255
- /* @__PURE__ */ jsx36("span", { className: "fd-choice-title", children: label }),
2256
- description ? /* @__PURE__ */ jsx36("span", { className: "fd-choice-desc", children: description }) : null
2267
+ /* @__PURE__ */ jsxs33("span", { className: "fd-choice-text", children: [
2268
+ /* @__PURE__ */ jsx37("span", { className: "fd-choice-title", children: label }),
2269
+ description ? /* @__PURE__ */ jsx37("span", { className: "fd-choice-desc", children: description }) : null
2257
2270
  ] })
2258
2271
  ] });
2259
2272
  }
2260
2273
 
2261
2274
  // src/components/forms/Switch.tsx
2262
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
2275
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
2263
2276
  function Switch({ label, description, className = "", ...rest }) {
2264
- return /* @__PURE__ */ jsxs33("label", { className: ["fd-switch", className].filter(Boolean).join(" "), children: [
2265
- /* @__PURE__ */ jsx37("input", { type: "checkbox", role: "switch", ...rest }),
2266
- /* @__PURE__ */ jsx37("span", { className: "fd-switch-track", children: /* @__PURE__ */ jsx37("span", { className: "fd-switch-thumb" }) }),
2267
- label ? /* @__PURE__ */ jsxs33("span", { className: "fd-choice-text", children: [
2268
- /* @__PURE__ */ jsx37("span", { className: "fd-switch-label", children: label }),
2269
- description ? /* @__PURE__ */ jsx37("span", { className: "fd-choice-desc", children: description }) : null
2277
+ return /* @__PURE__ */ jsxs34("label", { className: ["fd-switch", className].filter(Boolean).join(" "), children: [
2278
+ /* @__PURE__ */ jsx38("input", { type: "checkbox", role: "switch", ...rest }),
2279
+ /* @__PURE__ */ jsx38("span", { className: "fd-switch-track", children: /* @__PURE__ */ jsx38("span", { className: "fd-switch-thumb" }) }),
2280
+ label ? /* @__PURE__ */ jsxs34("span", { className: "fd-choice-text", children: [
2281
+ /* @__PURE__ */ jsx38("span", { className: "fd-switch-label", children: label }),
2282
+ description ? /* @__PURE__ */ jsx38("span", { className: "fd-choice-desc", children: description }) : null
2270
2283
  ] }) : null
2271
2284
  ] });
2272
2285
  }
2273
2286
 
2274
2287
  // src/components/forms/Input.tsx
2275
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
2288
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
2276
2289
  function Input({
2277
2290
  label,
2278
2291
  help,
@@ -2300,46 +2313,46 @@ function Input({
2300
2313
  size === "lg" ? "fd-input-lg" : "",
2301
2314
  className
2302
2315
  ].filter(Boolean).join(" ");
2303
- return /* @__PURE__ */ jsxs34("div", { className: "fd-field", style, children: [
2304
- label ? /* @__PURE__ */ jsxs34("label", { className: "fd-field-label", htmlFor: fieldId, children: [
2316
+ return /* @__PURE__ */ jsxs35("div", { className: "fd-field", style, children: [
2317
+ label ? /* @__PURE__ */ jsxs35("label", { className: "fd-field-label", htmlFor: fieldId, children: [
2305
2318
  label,
2306
- required ? /* @__PURE__ */ jsx38("span", { className: "fd-field-req", "aria-hidden": "true", children: "*" }) : null
2319
+ required ? /* @__PURE__ */ jsx39("span", { className: "fd-field-req", "aria-hidden": "true", children: "*" }) : null
2307
2320
  ] }) : null,
2308
- /* @__PURE__ */ jsxs34("div", { className: box, children: [
2309
- icon ? /* @__PURE__ */ jsx38("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx38("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
2310
- prefix ? /* @__PURE__ */ jsx38("span", { className: "fd-input-affix", children: prefix }) : null,
2311
- /* @__PURE__ */ jsx38("input", { id: fieldId, disabled, style: inputStyle, "aria-invalid": error ? "true" : void 0, ...rest }),
2312
- loading ? /* @__PURE__ */ jsx38("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading" }) : null,
2313
- suffix && !loading ? /* @__PURE__ */ jsx38("span", { className: "fd-input-affix", children: suffix }) : null
2321
+ /* @__PURE__ */ jsxs35("div", { className: box, children: [
2322
+ icon ? /* @__PURE__ */ jsx39("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx39("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
2323
+ prefix ? /* @__PURE__ */ jsx39("span", { className: "fd-input-affix", children: prefix }) : null,
2324
+ /* @__PURE__ */ jsx39("input", { id: fieldId, disabled, style: inputStyle, "aria-invalid": error ? "true" : void 0, ...rest }),
2325
+ loading ? /* @__PURE__ */ jsx39("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading" }) : null,
2326
+ suffix && !loading ? /* @__PURE__ */ jsx39("span", { className: "fd-input-affix", children: suffix }) : null
2314
2327
  ] }),
2315
- error ? /* @__PURE__ */ jsxs34("span", { className: "fd-field-error", children: [
2316
- /* @__PURE__ */ jsx38("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2328
+ error ? /* @__PURE__ */ jsxs35("span", { className: "fd-field-error", children: [
2329
+ /* @__PURE__ */ jsx39("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2317
2330
  error
2318
- ] }) : help ? /* @__PURE__ */ jsx38("span", { className: "fd-field-help", children: help }) : null
2331
+ ] }) : help ? /* @__PURE__ */ jsx39("span", { className: "fd-field-help", children: help }) : null
2319
2332
  ] });
2320
2333
  }
2321
2334
 
2322
2335
  // src/components/forms/Textarea.tsx
2323
- import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
2336
+ import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
2324
2337
  function Textarea({ label, help, error, required = false, rows = 4, disabled = false, id, className = "", style, ...rest }) {
2325
2338
  const fieldId = id || (rest.name ? "fd-" + rest.name : void 0);
2326
2339
  const box = ["fd-input", "fd-input-textarea", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : "", className].filter(Boolean).join(" ");
2327
- return /* @__PURE__ */ jsxs35("div", { className: "fd-field", style, children: [
2328
- label ? /* @__PURE__ */ jsxs35("label", { className: "fd-field-label", htmlFor: fieldId, children: [
2340
+ return /* @__PURE__ */ jsxs36("div", { className: "fd-field", style, children: [
2341
+ label ? /* @__PURE__ */ jsxs36("label", { className: "fd-field-label", htmlFor: fieldId, children: [
2329
2342
  label,
2330
- required ? /* @__PURE__ */ jsx39("span", { className: "fd-field-req", children: "*" }) : null
2343
+ required ? /* @__PURE__ */ jsx40("span", { className: "fd-field-req", children: "*" }) : null
2331
2344
  ] }) : null,
2332
- /* @__PURE__ */ jsx39("div", { className: box, children: /* @__PURE__ */ jsx39("textarea", { id: fieldId, rows, disabled, "aria-invalid": error ? "true" : void 0, ...rest }) }),
2333
- error ? /* @__PURE__ */ jsxs35("span", { className: "fd-field-error", children: [
2334
- /* @__PURE__ */ jsx39("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2345
+ /* @__PURE__ */ jsx40("div", { className: box, children: /* @__PURE__ */ jsx40("textarea", { id: fieldId, rows, disabled, "aria-invalid": error ? "true" : void 0, ...rest }) }),
2346
+ error ? /* @__PURE__ */ jsxs36("span", { className: "fd-field-error", children: [
2347
+ /* @__PURE__ */ jsx40("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2335
2348
  error
2336
- ] }) : help ? /* @__PURE__ */ jsx39("span", { className: "fd-field-help", children: help }) : null
2349
+ ] }) : help ? /* @__PURE__ */ jsx40("span", { className: "fd-field-help", children: help }) : null
2337
2350
  ] });
2338
2351
  }
2339
2352
 
2340
2353
  // src/components/forms/NumberInput.tsx
2341
2354
  import * as React15 from "react";
2342
- import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
2355
+ import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
2343
2356
  function NumberInput({
2344
2357
  label,
2345
2358
  help,
@@ -2398,14 +2411,14 @@ function NumberInput({
2398
2411
  return n == null ? "" : format ? n.toLocaleString() : String(n);
2399
2412
  })();
2400
2413
  const box = ["fd-input", "fd-input-num", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
2401
- return /* @__PURE__ */ jsxs36("div", { className: ["fd-field", className].filter(Boolean).join(" "), style, children: [
2402
- label ? /* @__PURE__ */ jsxs36("label", { className: "fd-field-label", children: [
2414
+ return /* @__PURE__ */ jsxs37("div", { className: ["fd-field", className].filter(Boolean).join(" "), style, children: [
2415
+ label ? /* @__PURE__ */ jsxs37("label", { className: "fd-field-label", children: [
2403
2416
  label,
2404
- required ? /* @__PURE__ */ jsx40("span", { className: "fd-field-req", children: "*" }) : null
2417
+ required ? /* @__PURE__ */ jsx41("span", { className: "fd-field-req", children: "*" }) : null
2405
2418
  ] }) : null,
2406
- /* @__PURE__ */ jsxs36("div", { className: box, style: { gap: 8 }, children: [
2407
- prefix ? /* @__PURE__ */ jsx40("span", { className: "fd-input-affix", children: prefix }) : null,
2408
- /* @__PURE__ */ jsx40(
2419
+ /* @__PURE__ */ jsxs37("div", { className: box, style: { gap: 8 }, children: [
2420
+ prefix ? /* @__PURE__ */ jsx41("span", { className: "fd-input-affix", children: prefix }) : null,
2421
+ /* @__PURE__ */ jsx41(
2409
2422
  "input",
2410
2423
  {
2411
2424
  inputMode: "numeric",
@@ -2438,9 +2451,9 @@ function NumberInput({
2438
2451
  }
2439
2452
  }
2440
2453
  ),
2441
- suffix ? /* @__PURE__ */ jsx40("span", { className: "fd-input-affix", children: suffix }) : null,
2442
- /* @__PURE__ */ jsxs36("span", { className: "fd-row", style: { gap: 4, flex: "none" }, children: [
2443
- /* @__PURE__ */ jsx40(
2454
+ suffix ? /* @__PURE__ */ jsx41("span", { className: "fd-input-affix", children: suffix }) : null,
2455
+ /* @__PURE__ */ jsxs37("span", { className: "fd-row", style: { gap: 4, flex: "none" }, children: [
2456
+ /* @__PURE__ */ jsx41(
2444
2457
  "button",
2445
2458
  {
2446
2459
  type: "button",
@@ -2450,10 +2463,10 @@ function NumberInput({
2450
2463
  onPointerDown: () => hold(-1),
2451
2464
  onPointerUp: release,
2452
2465
  onPointerLeave: release,
2453
- children: /* @__PURE__ */ jsx40("i", { className: "ph ph-minus" })
2466
+ children: /* @__PURE__ */ jsx41("i", { className: "ph ph-minus" })
2454
2467
  }
2455
2468
  ),
2456
- /* @__PURE__ */ jsx40(
2469
+ /* @__PURE__ */ jsx41(
2457
2470
  "button",
2458
2471
  {
2459
2472
  type: "button",
@@ -2463,22 +2476,22 @@ function NumberInput({
2463
2476
  onPointerDown: () => hold(1),
2464
2477
  onPointerUp: release,
2465
2478
  onPointerLeave: release,
2466
- children: /* @__PURE__ */ jsx40("i", { className: "ph ph-plus" })
2479
+ children: /* @__PURE__ */ jsx41("i", { className: "ph ph-plus" })
2467
2480
  }
2468
2481
  )
2469
2482
  ] })
2470
2483
  ] }),
2471
- error ? /* @__PURE__ */ jsxs36("span", { className: "fd-field-error", children: [
2472
- /* @__PURE__ */ jsx40("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2484
+ error ? /* @__PURE__ */ jsxs37("span", { className: "fd-field-error", children: [
2485
+ /* @__PURE__ */ jsx41("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2473
2486
  error
2474
- ] }) : help ? /* @__PURE__ */ jsx40("span", { className: "fd-field-help", children: help }) : null
2487
+ ] }) : help ? /* @__PURE__ */ jsx41("span", { className: "fd-field-help", children: help }) : null
2475
2488
  ] });
2476
2489
  }
2477
2490
 
2478
2491
  // src/components/forms/Select.tsx
2479
2492
  import * as React16 from "react";
2480
2493
  import { createPortal as createPortal4 } from "react-dom";
2481
- import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
2494
+ import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
2482
2495
  var norm = (o) => typeof o === "string" ? { value: o, label: o } : o;
2483
2496
  function usePopPos(open, ref, estH, estW) {
2484
2497
  const [pos, setPos] = React16.useState(null);
@@ -2643,13 +2656,13 @@ function Select({
2643
2656
  });
2644
2657
  const fieldId = id || (rest.name ? "fd-" + rest.name : void 0);
2645
2658
  const box = ["fd-input", "fd-select", error ? "fd-input-error" : "", disabled ? "fd-input-disabled" : ""].filter(Boolean).join(" ");
2646
- return /* @__PURE__ */ jsxs37("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
2647
- label ? /* @__PURE__ */ jsxs37("label", { className: "fd-field-label", htmlFor: fieldId, onClick: toggle, children: [
2659
+ return /* @__PURE__ */ jsxs38("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
2660
+ label ? /* @__PURE__ */ jsxs38("label", { className: "fd-field-label", htmlFor: fieldId, onClick: toggle, children: [
2648
2661
  label,
2649
- required ? /* @__PURE__ */ jsx41("span", { className: "fd-field-req", children: "*" }) : null
2662
+ required ? /* @__PURE__ */ jsx42("span", { className: "fd-field-req", children: "*" }) : null
2650
2663
  ] }) : null,
2651
- /* @__PURE__ */ jsxs37("div", { className: box, style: { cursor: disabled ? "not-allowed" : "pointer" }, ref: boxRef, children: [
2652
- /* @__PURE__ */ jsxs37(
2664
+ /* @__PURE__ */ jsxs38("div", { className: box, style: { cursor: disabled ? "not-allowed" : "pointer" }, ref: boxRef, children: [
2665
+ /* @__PURE__ */ jsxs38(
2653
2666
  "button",
2654
2667
  {
2655
2668
  type: "button",
@@ -2662,13 +2675,13 @@ function Select({
2662
2675
  "aria-haspopup": "listbox",
2663
2676
  style: { all: "unset", flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 8, cursor: "inherit", overflow: "hidden" },
2664
2677
  children: [
2665
- selected && selected.icon ? /* @__PURE__ */ jsx41("i", { className: "ph ph-" + selected.icon, style: { flex: "none", color: "var(--text-2)" } }) : null,
2666
- /* @__PURE__ */ jsx41("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: (multiple ? chosen.length : selected) ? "var(--text)" : "var(--text-muted)" }, children: boxText }),
2667
- multiple && chosen.length > 1 ? /* @__PURE__ */ jsx41("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
2678
+ selected && selected.icon ? /* @__PURE__ */ jsx42("i", { className: "ph ph-" + selected.icon, style: { flex: "none", color: "var(--text-2)" } }) : null,
2679
+ /* @__PURE__ */ jsx42("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: (multiple ? chosen.length : selected) ? "var(--text)" : "var(--text-muted)" }, children: boxText }),
2680
+ multiple && chosen.length > 1 ? /* @__PURE__ */ jsx42("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
2668
2681
  ]
2669
2682
  }
2670
2683
  ),
2671
- clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx41(
2684
+ clearable && (multiple ? chosen.length > 0 : selected) && !loading ? /* @__PURE__ */ jsx42(
2672
2685
  "button",
2673
2686
  {
2674
2687
  type: "button",
@@ -2678,22 +2691,22 @@ function Select({
2678
2691
  fire(multiple ? [] : "");
2679
2692
  },
2680
2693
  style: { all: "unset", cursor: "pointer", color: "var(--text-muted)", display: "grid", placeItems: "center", padding: 2 },
2681
- children: /* @__PURE__ */ jsx41("i", { className: "ph ph-x-circle", style: { fontSize: 15 } })
2694
+ children: /* @__PURE__ */ jsx42("i", { className: "ph ph-x-circle", style: { fontSize: 15 } })
2682
2695
  }
2683
2696
  ) : null,
2684
- loading ? /* @__PURE__ */ jsx41("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading options" }) : /* @__PURE__ */ jsx41("span", { className: "fd-select-caret", onClick: toggle, children: /* @__PURE__ */ jsx41("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
2697
+ loading ? /* @__PURE__ */ jsx42("span", { className: "fd-spinner", style: { color: "var(--text-muted)" }, "aria-label": "Loading options" }) : /* @__PURE__ */ jsx42("span", { className: "fd-select-caret", onClick: toggle, children: /* @__PURE__ */ jsx42("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
2685
2698
  ] }),
2686
2699
  open && pos ? createPortal4(
2687
- /* @__PURE__ */ jsxs37(
2700
+ /* @__PURE__ */ jsxs38(
2688
2701
  "div",
2689
2702
  {
2690
2703
  className: "fd-pop" + (pos.up ? " is-up" : ""),
2691
2704
  ref: popRef,
2692
2705
  style: popStyle(pos, { minWidth: Math.max(pos.width, 260), maxWidth: 380, zIndex: 130, overflowY: "hidden" }),
2693
2706
  children: [
2694
- hasSearch ? /* @__PURE__ */ jsxs37("div", { className: "fd-pop-search", children: [
2695
- /* @__PURE__ */ jsx41("i", { className: "ph ph-magnifying-glass", style: { color: "var(--text-muted)", fontSize: 14 } }),
2696
- /* @__PURE__ */ jsx41(
2707
+ hasSearch ? /* @__PURE__ */ jsxs38("div", { className: "fd-pop-search", children: [
2708
+ /* @__PURE__ */ jsx42("i", { className: "ph ph-magnifying-glass", style: { color: "var(--text-muted)", fontSize: 14 } }),
2709
+ /* @__PURE__ */ jsx42(
2697
2710
  "input",
2698
2711
  {
2699
2712
  autoFocus: true,
@@ -2706,15 +2719,15 @@ function Select({
2706
2719
  }
2707
2720
  }
2708
2721
  ),
2709
- q ? /* @__PURE__ */ jsx41("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
2722
+ q ? /* @__PURE__ */ jsx42("span", { className: "fd-body-sm fd-muted", children: visible.length }) : null
2710
2723
  ] }) : null,
2711
- /* @__PURE__ */ jsx41("div", { className: "fd-pop-list", role: "listbox", "aria-multiselectable": multiple || void 0, ref: listRef, style: { maxHeight: Math.max(120, pos.maxH - (hasSearch ? 64 : 12) - (multiple ? 42 : 0)) }, children: visible.length === 0 ? /* @__PURE__ */ jsxs37("div", { className: "fd-pop-empty", children: [
2724
+ /* @__PURE__ */ jsx42("div", { className: "fd-pop-list", role: "listbox", "aria-multiselectable": multiple || void 0, ref: listRef, style: { maxHeight: Math.max(120, pos.maxH - (hasSearch ? 64 : 12) - (multiple ? 42 : 0)) }, children: visible.length === 0 ? /* @__PURE__ */ jsxs38("div", { className: "fd-pop-empty", children: [
2712
2725
  'Nothing matches "',
2713
2726
  q,
2714
2727
  '".'
2715
- ] }) : groups.map((grp) => /* @__PURE__ */ jsxs37(React16.Fragment, { children: [
2716
- grp.g ? /* @__PURE__ */ jsx41("div", { className: "fd-pop-group", children: grp.g }) : null,
2717
- grp.items.map(({ o, i }) => /* @__PURE__ */ jsxs37(
2728
+ ] }) : groups.map((grp) => /* @__PURE__ */ jsxs38(React16.Fragment, { children: [
2729
+ grp.g ? /* @__PURE__ */ jsx42("div", { className: "fd-pop-group", children: grp.g }) : null,
2730
+ grp.items.map(({ o, i }) => /* @__PURE__ */ jsxs38(
2718
2731
  "button",
2719
2732
  {
2720
2733
  type: "button",
@@ -2726,21 +2739,21 @@ function Select({
2726
2739
  onMouseEnter: () => setActive(i),
2727
2740
  onClick: () => pick(o),
2728
2741
  children: [
2729
- multiple ? /* @__PURE__ */ jsx41("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__ */ jsx41("i", { className: "ph ph-check", style: { fontSize: 11 } }) : null }) : null,
2730
- o.icon ? /* @__PURE__ */ jsx41("span", { className: "fd-opt-icon", children: /* @__PURE__ */ jsx41("i", { className: "ph ph-" + o.icon }) }) : null,
2731
- /* @__PURE__ */ jsxs37("span", { style: { flex: 1, minWidth: 0 }, children: [
2732
- /* @__PURE__ */ jsx41("span", { className: "fd-opt-label", children: o.label }),
2733
- o.description ? /* @__PURE__ */ jsx41("span", { className: "fd-opt-desc", children: o.description }) : null
2742
+ multiple ? /* @__PURE__ */ jsx42("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__ */ jsx42("i", { className: "ph ph-check", style: { fontSize: 11 } }) : null }) : null,
2743
+ o.icon ? /* @__PURE__ */ jsx42("span", { className: "fd-opt-icon", children: /* @__PURE__ */ jsx42("i", { className: "ph ph-" + o.icon }) }) : null,
2744
+ /* @__PURE__ */ jsxs38("span", { style: { flex: 1, minWidth: 0 }, children: [
2745
+ /* @__PURE__ */ jsx42("span", { className: "fd-opt-label", children: o.label }),
2746
+ o.description ? /* @__PURE__ */ jsx42("span", { className: "fd-opt-desc", children: o.description }) : null
2734
2747
  ] }),
2735
- o.meta ? /* @__PURE__ */ jsx41("span", { className: "fd-opt-meta", children: o.meta }) : null,
2736
- multiple ? null : /* @__PURE__ */ jsx41("span", { className: "fd-opt-check", children: o.value === value ? /* @__PURE__ */ jsx41("i", { className: "ph ph-check" }) : null })
2748
+ o.meta ? /* @__PURE__ */ jsx42("span", { className: "fd-opt-meta", children: o.meta }) : null,
2749
+ multiple ? null : /* @__PURE__ */ jsx42("span", { className: "fd-opt-check", children: o.value === value ? /* @__PURE__ */ jsx42("i", { className: "ph ph-check" }) : null })
2737
2750
  ]
2738
2751
  },
2739
2752
  String(o.value)
2740
2753
  ))
2741
2754
  ] }, grp.g || "_")) }),
2742
- multiple ? /* @__PURE__ */ jsxs37("div", { className: "fd-row", style: { gap: 10, padding: "8px 12px", borderTop: "1px solid var(--border)" }, children: [
2743
- /* @__PURE__ */ jsx41(
2755
+ multiple ? /* @__PURE__ */ jsxs38("div", { className: "fd-row", style: { gap: 10, padding: "8px 12px", borderTop: "1px solid var(--border)" }, children: [
2756
+ /* @__PURE__ */ jsx42(
2744
2757
  "button",
2745
2758
  {
2746
2759
  type: "button",
@@ -2749,13 +2762,13 @@ function Select({
2749
2762
  children: "Select all"
2750
2763
  }
2751
2764
  ),
2752
- /* @__PURE__ */ jsx41("span", { style: { flex: 1 } }),
2753
- /* @__PURE__ */ jsxs37("span", { className: "fd-body-sm fd-muted", children: [
2765
+ /* @__PURE__ */ jsx42("span", { style: { flex: 1 } }),
2766
+ /* @__PURE__ */ jsxs38("span", { className: "fd-body-sm fd-muted", children: [
2754
2767
  vals.length,
2755
2768
  " of ",
2756
2769
  opts.length
2757
2770
  ] }),
2758
- /* @__PURE__ */ jsx41(
2771
+ /* @__PURE__ */ jsx42(
2759
2772
  "button",
2760
2773
  {
2761
2774
  type: "button",
@@ -2771,17 +2784,17 @@ function Select({
2771
2784
  ),
2772
2785
  document.body
2773
2786
  ) : null,
2774
- error ? /* @__PURE__ */ jsxs37("span", { className: "fd-field-error", children: [
2775
- /* @__PURE__ */ jsx41("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2787
+ error ? /* @__PURE__ */ jsxs38("span", { className: "fd-field-error", children: [
2788
+ /* @__PURE__ */ jsx42("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
2776
2789
  error
2777
- ] }) : help ? /* @__PURE__ */ jsx41("span", { className: "fd-field-help", children: help }) : null
2790
+ ] }) : help ? /* @__PURE__ */ jsx42("span", { className: "fd-field-help", children: help }) : null
2778
2791
  ] });
2779
2792
  }
2780
2793
 
2781
2794
  // src/components/forms/DatePicker.tsx
2782
2795
  import * as React17 from "react";
2783
2796
  import { createPortal as createPortal5 } from "react-dom";
2784
- import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
2797
+ import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
2785
2798
  var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
2786
2799
  var DOW = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
2787
2800
  var iso = (d) => d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
@@ -2880,9 +2893,9 @@ function Calendar({ value, range = false, onPick, initialMonth, months = 1 }) {
2880
2893
  const startPad = new Date(y, m, 1).getDay();
2881
2894
  const cells = [];
2882
2895
  for (let i = 0; i < 42; i++) cells.push(new Date(y, m, i - startPad + 1));
2883
- return /* @__PURE__ */ jsxs38("div", { className: "fd-cal-grid", style: { width: months > 1 ? 252 : "auto", flex: "none" }, onMouseLeave: () => setHover(null), children: [
2884
- DOW.map((d) => /* @__PURE__ */ jsx42("span", { className: "fd-cal-dow", children: d }, d)),
2885
- cells.map((d, i) => /* @__PURE__ */ jsx42(
2896
+ return /* @__PURE__ */ jsxs39("div", { className: "fd-cal-grid", style: { width: months > 1 ? 252 : "auto", flex: "none" }, onMouseLeave: () => setHover(null), children: [
2897
+ DOW.map((d) => /* @__PURE__ */ jsx43("span", { className: "fd-cal-dow", children: d }, d)),
2898
+ cells.map((d, i) => /* @__PURE__ */ jsx43(
2886
2899
  "button",
2887
2900
  {
2888
2901
  type: "button",
@@ -2896,20 +2909,20 @@ function Calendar({ value, range = false, onPick, initialMonth, months = 1 }) {
2896
2909
  ] });
2897
2910
  };
2898
2911
  const nextY = vm === 11 ? vy + 1 : vy, nextM = (vm + 1) % 12;
2899
- return /* @__PURE__ */ jsxs38("div", { className: "fd-cal", style: { width: months > 1 && mode2 === "days" ? "auto" : void 0 }, children: [
2900
- /* @__PURE__ */ jsxs38("div", { className: "fd-cal-head", children: [
2901
- /* @__PURE__ */ jsx42("button", { type: "button", className: "fd-btn-icon", "aria-label": "Previous", onClick: () => mode2 === "years" ? setVy(vy - 12) : mode2 === "months" ? setVy(vy - 1) : nav(-1), children: /* @__PURE__ */ jsx42("i", { className: "ph ph-caret-left" }) }),
2902
- /* @__PURE__ */ jsxs38("button", { type: "button", className: "fd-cal-title", onClick: () => setMode(mode2 === "days" ? "months" : mode2 === "months" ? "years" : "days"), children: [
2912
+ return /* @__PURE__ */ jsxs39("div", { className: "fd-cal", style: { width: months > 1 && mode2 === "days" ? "auto" : void 0 }, children: [
2913
+ /* @__PURE__ */ jsxs39("div", { className: "fd-cal-head", children: [
2914
+ /* @__PURE__ */ jsx43("button", { type: "button", className: "fd-btn-icon", "aria-label": "Previous", onClick: () => mode2 === "years" ? setVy(vy - 12) : mode2 === "months" ? setVy(vy - 1) : nav(-1), children: /* @__PURE__ */ jsx43("i", { className: "ph ph-caret-left" }) }),
2915
+ /* @__PURE__ */ jsxs39("button", { type: "button", className: "fd-cal-title", onClick: () => setMode(mode2 === "days" ? "months" : mode2 === "months" ? "years" : "days"), children: [
2903
2916
  mode2 === "days" ? MONTHS[vm] + " " + vy : mode2 === "months" ? vy : vy - 5 + " \u2013 " + (vy + 6),
2904
- /* @__PURE__ */ jsx42("i", { className: "ph ph-caret-down", style: { fontSize: 10, marginLeft: 6, color: "var(--text-muted)" } })
2917
+ /* @__PURE__ */ jsx43("i", { className: "ph ph-caret-down", style: { fontSize: 10, marginLeft: 6, color: "var(--text-muted)" } })
2905
2918
  ] }),
2906
- months > 1 && mode2 === "days" ? /* @__PURE__ */ jsx42("span", { className: "fd-cal-title", style: { cursor: "default", background: "none" }, children: MONTHS[nextM] + " " + nextY }) : null,
2907
- /* @__PURE__ */ jsx42("button", { type: "button", className: "fd-btn-icon", "aria-label": "Next", onClick: () => mode2 === "years" ? setVy(vy + 12) : mode2 === "months" ? setVy(vy + 1) : nav(1), children: /* @__PURE__ */ jsx42("i", { className: "ph ph-caret-right" }) })
2919
+ months > 1 && mode2 === "days" ? /* @__PURE__ */ jsx43("span", { className: "fd-cal-title", style: { cursor: "default", background: "none" }, children: MONTHS[nextM] + " " + nextY }) : null,
2920
+ /* @__PURE__ */ jsx43("button", { type: "button", className: "fd-btn-icon", "aria-label": "Next", onClick: () => mode2 === "years" ? setVy(vy + 12) : mode2 === "months" ? setVy(vy + 1) : nav(1), children: /* @__PURE__ */ jsx43("i", { className: "ph ph-caret-right" }) })
2908
2921
  ] }),
2909
- mode2 === "days" ? /* @__PURE__ */ jsxs38("div", { style: { display: "flex", gap: 18 }, children: [
2922
+ mode2 === "days" ? /* @__PURE__ */ jsxs39("div", { style: { display: "flex", gap: 18 }, children: [
2910
2923
  monthGrid(vy, vm),
2911
2924
  months > 1 ? monthGrid(nextY, nextM) : null
2912
- ] }) : mode2 === "months" ? /* @__PURE__ */ jsx42("div", { className: "fd-cal-grid-months", children: MONTHS.map((m, i) => /* @__PURE__ */ jsx42(
2925
+ ] }) : mode2 === "months" ? /* @__PURE__ */ jsx43("div", { className: "fd-cal-grid-months", children: MONTHS.map((m, i) => /* @__PURE__ */ jsx43(
2913
2926
  "button",
2914
2927
  {
2915
2928
  type: "button",
@@ -2921,7 +2934,7 @@ function Calendar({ value, range = false, onPick, initialMonth, months = 1 }) {
2921
2934
  children: m.slice(0, 3)
2922
2935
  },
2923
2936
  m
2924
- )) }) : /* @__PURE__ */ jsx42("div", { className: "fd-cal-grid-months", children: Array.from({ length: 12 }, (_, i) => vy - 5 + i).map((y) => /* @__PURE__ */ jsx42(
2937
+ )) }) : /* @__PURE__ */ jsx43("div", { className: "fd-cal-grid-months", children: Array.from({ length: 12 }, (_, i) => vy - 5 + i).map((y) => /* @__PURE__ */ jsx43(
2925
2938
  "button",
2926
2939
  {
2927
2940
  type: "button",
@@ -2934,8 +2947,8 @@ function Calendar({ value, range = false, onPick, initialMonth, months = 1 }) {
2934
2947
  },
2935
2948
  y
2936
2949
  )) }),
2937
- /* @__PURE__ */ jsxs38("div", { className: "fd-cal-foot", children: [
2938
- /* @__PURE__ */ jsx42(
2950
+ /* @__PURE__ */ jsxs39("div", { className: "fd-cal-foot", children: [
2951
+ /* @__PURE__ */ jsx43(
2939
2952
  "button",
2940
2953
  {
2941
2954
  type: "button",
@@ -2949,8 +2962,8 @@ function Calendar({ value, range = false, onPick, initialMonth, months = 1 }) {
2949
2962
  children: "Today"
2950
2963
  }
2951
2964
  ),
2952
- /* @__PURE__ */ jsx42("span", { style: { flex: 1 } }),
2953
- range && sel.start ? /* @__PURE__ */ jsxs38("span", { className: "fd-body-sm fd-muted", children: [
2965
+ /* @__PURE__ */ jsx43("span", { style: { flex: 1 } }),
2966
+ range && sel.start ? /* @__PURE__ */ jsxs39("span", { className: "fd-body-sm fd-muted", children: [
2954
2967
  fmt(sel.start),
2955
2968
  sel.end ? " \u2192 " + fmt(sel.end) : " \u2192 pick an end"
2956
2969
  ] }) : null
@@ -2984,14 +2997,14 @@ function DatePicker({ label, help, error, required = false, disabled = false, ra
2984
2997
  const toggle = () => {
2985
2998
  if (!disabled) setOpen(!open);
2986
2999
  };
2987
- return /* @__PURE__ */ jsxs38("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
2988
- label ? /* @__PURE__ */ jsxs38("label", { className: "fd-field-label", onClick: toggle, children: [
3000
+ return /* @__PURE__ */ jsxs39("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
3001
+ label ? /* @__PURE__ */ jsxs39("label", { className: "fd-field-label", onClick: toggle, children: [
2989
3002
  label,
2990
- required ? /* @__PURE__ */ jsx42("span", { className: "fd-field-req", children: "*" }) : null
3003
+ required ? /* @__PURE__ */ jsx43("span", { className: "fd-field-req", children: "*" }) : null
2991
3004
  ] }) : null,
2992
- /* @__PURE__ */ jsxs38("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: [
2993
- /* @__PURE__ */ jsx42("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx42("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }) }),
2994
- /* @__PURE__ */ jsx42(
3005
+ /* @__PURE__ */ jsxs39("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: [
3006
+ /* @__PURE__ */ jsx43("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx43("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }) }),
3007
+ /* @__PURE__ */ jsx43(
2995
3008
  "button",
2996
3009
  {
2997
3010
  type: "button",
@@ -3007,10 +3020,10 @@ function DatePicker({ label, help, error, required = false, disabled = false, ra
3007
3020
  children: display || placeholder || (range ? "Pick a date range" : "Pick a date")
3008
3021
  }
3009
3022
  ),
3010
- /* @__PURE__ */ jsx42("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx42("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
3023
+ /* @__PURE__ */ jsx43("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx43("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
3011
3024
  ] }),
3012
3025
  open && pos ? createPortal5(
3013
- /* @__PURE__ */ jsx42("div", { className: "fd-pop" + (pos.up ? " is-up" : ""), ref: popRef, style: popStyle2(pos, { width: "max-content", minWidth: 0, zIndex: 130 }), children: /* @__PURE__ */ jsx42(
3026
+ /* @__PURE__ */ jsx43("div", { className: "fd-pop" + (pos.up ? " is-up" : ""), ref: popRef, style: popStyle2(pos, { width: "max-content", minWidth: 0, zIndex: 130 }), children: /* @__PURE__ */ jsx43(
3014
3027
  Calendar,
3015
3028
  {
3016
3029
  range,
@@ -3024,17 +3037,17 @@ function DatePicker({ label, help, error, required = false, disabled = false, ra
3024
3037
  ) }),
3025
3038
  document.body
3026
3039
  ) : null,
3027
- error ? /* @__PURE__ */ jsxs38("span", { className: "fd-field-error", children: [
3028
- /* @__PURE__ */ jsx42("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3040
+ error ? /* @__PURE__ */ jsxs39("span", { className: "fd-field-error", children: [
3041
+ /* @__PURE__ */ jsx43("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3029
3042
  error
3030
- ] }) : help ? /* @__PURE__ */ jsx42("span", { className: "fd-field-help", children: help }) : null
3043
+ ] }) : help ? /* @__PURE__ */ jsx43("span", { className: "fd-field-help", children: help }) : null
3031
3044
  ] });
3032
3045
  }
3033
3046
 
3034
3047
  // src/components/forms/TimePicker.tsx
3035
3048
  import * as React18 from "react";
3036
3049
  import { createPortal as createPortal6 } from "react-dom";
3037
- import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
3050
+ import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
3038
3051
  var pad = (n) => String(n).padStart(2, "0");
3039
3052
  function usePopPos3(open, ref, estH, estW) {
3040
3053
  const [pos, setPos] = React18.useState(null);
@@ -3121,12 +3134,12 @@ function ClockFace({ value = "09:00", onChange }) {
3121
3134
  };
3122
3135
  const handAngle = mode2 === "h" ? h12 % 12 * 30 : m * 6;
3123
3136
  const minuteOff = mode2 === "m" && m % 5 !== 0;
3124
- return /* @__PURE__ */ jsxs39("div", { style: { padding: "4px 14px 14px" }, children: [
3125
- /* @__PURE__ */ jsxs39("div", { className: "fd-clock-digits", children: [
3126
- /* @__PURE__ */ jsx43("button", { type: "button", className: "fd-clock-digit" + (mode2 === "h" ? " is-active" : ""), onClick: () => setMode("h"), children: pad(h12) }),
3127
- /* @__PURE__ */ jsx43("span", { style: { fontSize: 24, fontWeight: 700, color: "var(--text-muted)" }, children: ":" }),
3128
- /* @__PURE__ */ jsx43("button", { type: "button", className: "fd-clock-digit" + (mode2 === "m" ? " is-active" : ""), onClick: () => setMode("m"), children: pad(m) }),
3129
- /* @__PURE__ */ jsx43("span", { className: "fd-stack", style: { gap: 3, marginLeft: 8 }, children: ["AM", "PM"].map((ap) => /* @__PURE__ */ jsx43(
3137
+ return /* @__PURE__ */ jsxs40("div", { style: { padding: "4px 14px 14px" }, children: [
3138
+ /* @__PURE__ */ jsxs40("div", { className: "fd-clock-digits", children: [
3139
+ /* @__PURE__ */ jsx44("button", { type: "button", className: "fd-clock-digit" + (mode2 === "h" ? " is-active" : ""), onClick: () => setMode("h"), children: pad(h12) }),
3140
+ /* @__PURE__ */ jsx44("span", { style: { fontSize: 24, fontWeight: 700, color: "var(--text-muted)" }, children: ":" }),
3141
+ /* @__PURE__ */ jsx44("button", { type: "button", className: "fd-clock-digit" + (mode2 === "m" ? " is-active" : ""), onClick: () => setMode("m"), children: pad(m) }),
3142
+ /* @__PURE__ */ jsx44("span", { className: "fd-stack", style: { gap: 3, marginLeft: 8 }, children: ["AM", "PM"].map((ap) => /* @__PURE__ */ jsx44(
3130
3143
  "button",
3131
3144
  {
3132
3145
  type: "button",
@@ -3137,13 +3150,13 @@ function ClockFace({ value = "09:00", onChange }) {
3137
3150
  ap
3138
3151
  )) })
3139
3152
  ] }),
3140
- /* @__PURE__ */ jsxs39("div", { className: "fd-clock", ref: faceRef, onPointerDown: down, onPointerMove: move, onPointerUp: upH, children: [
3141
- /* @__PURE__ */ jsx43("span", { className: "fd-clock-hand", style: { height: NR - (minuteOff ? 14 : 16), transform: "translateX(-50%) rotate(" + handAngle + "deg)", bottom: "50%" } }),
3142
- /* @__PURE__ */ jsx43("span", { className: "fd-clock-pivot" }),
3143
- minuteOff ? /* @__PURE__ */ jsx43("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,
3153
+ /* @__PURE__ */ jsxs40("div", { className: "fd-clock", ref: faceRef, onPointerDown: down, onPointerMove: move, onPointerUp: upH, children: [
3154
+ /* @__PURE__ */ jsx44("span", { className: "fd-clock-hand", style: { height: NR - (minuteOff ? 14 : 16), transform: "translateX(-50%) rotate(" + handAngle + "deg)", bottom: "50%" } }),
3155
+ /* @__PURE__ */ jsx44("span", { className: "fd-clock-pivot" }),
3156
+ minuteOff ? /* @__PURE__ */ jsx44("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,
3144
3157
  nums.map((n) => {
3145
3158
  const a = angleOf(n) * Math.PI / 180;
3146
- return /* @__PURE__ */ jsx43(
3159
+ return /* @__PURE__ */ jsx44(
3147
3160
  "span",
3148
3161
  {
3149
3162
  className: "fd-clock-num" + (n === selNum || mode2 === "m" && n === Math.round(m / 5) * 5 % 60 && m % 5 === 0 ? " is-sel" : ""),
@@ -3154,7 +3167,7 @@ function ClockFace({ value = "09:00", onChange }) {
3154
3167
  );
3155
3168
  })
3156
3169
  ] }),
3157
- /* @__PURE__ */ jsx43("div", { className: "fd-row", style: { justifyContent: "center", gap: 6 }, children: /* @__PURE__ */ jsx43("span", { className: "fd-body-sm fd-muted", children: mode2 === "h" ? "Pick the hour \u2014 drag or tap" : "Now the minutes" }) })
3170
+ /* @__PURE__ */ jsx44("div", { className: "fd-row", style: { justifyContent: "center", gap: 6 }, children: /* @__PURE__ */ jsx44("span", { className: "fd-body-sm fd-muted", children: mode2 === "h" ? "Pick the hour \u2014 drag or tap" : "Now the minutes" }) })
3158
3171
  ] });
3159
3172
  }
3160
3173
  function TimePicker({ label, help, error, required = false, disabled = false, value = "", onChange, placeholder = "Pick a time", className = "", style }) {
@@ -3188,14 +3201,14 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
3188
3201
  const toggle = () => {
3189
3202
  if (!disabled) setOpen(!open);
3190
3203
  };
3191
- return /* @__PURE__ */ jsxs39("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
3192
- label ? /* @__PURE__ */ jsxs39("label", { className: "fd-field-label", onClick: toggle, children: [
3204
+ return /* @__PURE__ */ jsxs40("div", { className: ["fd-field", "fd-popfield", open ? "is-open" : "", className].filter(Boolean).join(" "), style, ref: rootRef, children: [
3205
+ label ? /* @__PURE__ */ jsxs40("label", { className: "fd-field-label", onClick: toggle, children: [
3193
3206
  label,
3194
- required ? /* @__PURE__ */ jsx43("span", { className: "fd-field-req", children: "*" }) : null
3207
+ required ? /* @__PURE__ */ jsx44("span", { className: "fd-field-req", children: "*" }) : null
3195
3208
  ] }) : null,
3196
- /* @__PURE__ */ jsxs39("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: [
3197
- /* @__PURE__ */ jsx43("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx43("i", { className: "ph ph-clock", "aria-hidden": "true" }) }),
3198
- /* @__PURE__ */ jsx43(
3209
+ /* @__PURE__ */ jsxs40("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: [
3210
+ /* @__PURE__ */ jsx44("span", { className: "fd-input-icon", children: /* @__PURE__ */ jsx44("i", { className: "ph ph-clock", "aria-hidden": "true" }) }),
3211
+ /* @__PURE__ */ jsx44(
3199
3212
  "button",
3200
3213
  {
3201
3214
  type: "button",
@@ -3210,13 +3223,13 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
3210
3223
  children: disp() || placeholder
3211
3224
  }
3212
3225
  ),
3213
- /* @__PURE__ */ jsx43("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx43("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
3226
+ /* @__PURE__ */ jsx44("span", { className: "fd-select-caret", children: /* @__PURE__ */ jsx44("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
3214
3227
  ] }),
3215
3228
  open && pos ? createPortal6(
3216
- /* @__PURE__ */ jsxs39("div", { className: "fd-pop" + (pos.up ? " is-up" : ""), ref: popRef, style: popStyle3(pos, { width: 262, minWidth: 0, zIndex: 130 }), children: [
3217
- /* @__PURE__ */ jsx43(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) }),
3218
- /* @__PURE__ */ jsxs39("div", { className: "fd-cal-foot", style: { margin: "0 14px 12px", paddingTop: 10 }, children: [
3219
- /* @__PURE__ */ jsx43(
3229
+ /* @__PURE__ */ jsxs40("div", { className: "fd-pop" + (pos.up ? " is-up" : ""), ref: popRef, style: popStyle3(pos, { width: 262, minWidth: 0, zIndex: 130 }), children: [
3230
+ /* @__PURE__ */ jsx44(ClockFace, { value: value || "09:00", onChange: (v) => onChange && onChange({ target: { value: v } }) }),
3231
+ /* @__PURE__ */ jsxs40("div", { className: "fd-cal-foot", style: { margin: "0 14px 12px", paddingTop: 10 }, children: [
3232
+ /* @__PURE__ */ jsx44(
3220
3233
  "button",
3221
3234
  {
3222
3235
  type: "button",
@@ -3229,22 +3242,22 @@ function TimePicker({ label, help, error, required = false, disabled = false, va
3229
3242
  children: "Now"
3230
3243
  }
3231
3244
  ),
3232
- /* @__PURE__ */ jsx43("span", { style: { flex: 1 } }),
3233
- /* @__PURE__ */ jsx43("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", onClick: () => setOpen(false), children: "Done" })
3245
+ /* @__PURE__ */ jsx44("span", { style: { flex: 1 } }),
3246
+ /* @__PURE__ */ jsx44("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", onClick: () => setOpen(false), children: "Done" })
3234
3247
  ] })
3235
3248
  ] }),
3236
3249
  document.body
3237
3250
  ) : null,
3238
- error ? /* @__PURE__ */ jsxs39("span", { className: "fd-field-error", children: [
3239
- /* @__PURE__ */ jsx43("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3251
+ error ? /* @__PURE__ */ jsxs40("span", { className: "fd-field-error", children: [
3252
+ /* @__PURE__ */ jsx44("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3240
3253
  error
3241
- ] }) : help ? /* @__PURE__ */ jsx43("span", { className: "fd-field-help", children: help }) : null
3254
+ ] }) : help ? /* @__PURE__ */ jsx44("span", { className: "fd-field-help", children: help }) : null
3242
3255
  ] });
3243
3256
  }
3244
3257
 
3245
3258
  // src/components/forms/Slider.tsx
3246
3259
  import * as React19 from "react";
3247
- import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
3260
+ import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
3248
3261
  function Slider({
3249
3262
  label,
3250
3263
  min = 0,
@@ -3261,15 +3274,15 @@ function Slider({
3261
3274
  const [dragging, setDragging] = React19.useState(false);
3262
3275
  const v = value === void 0 ? min : Number(value);
3263
3276
  const pct = max === min ? 0 : (v - min) / (max - min) * 100;
3264
- return /* @__PURE__ */ jsxs40("div", { className: ["fd-field", className].filter(Boolean).join(" "), children: [
3265
- label ? /* @__PURE__ */ jsxs40("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
3266
- /* @__PURE__ */ jsx44("span", { className: "fd-field-label", children: label }),
3267
- /* @__PURE__ */ jsx44("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: format(v) })
3277
+ return /* @__PURE__ */ jsxs41("div", { className: ["fd-field", className].filter(Boolean).join(" "), children: [
3278
+ label ? /* @__PURE__ */ jsxs41("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
3279
+ /* @__PURE__ */ jsx45("span", { className: "fd-field-label", children: label }),
3280
+ /* @__PURE__ */ jsx45("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: format(v) })
3268
3281
  ] }) : null,
3269
- /* @__PURE__ */ jsxs40("div", { className: "fd-slider", children: [
3270
- /* @__PURE__ */ jsx44("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
3271
- showChip && dragging ? /* @__PURE__ */ jsx44("span", { className: "fd-slider-chip", style: { left: pct + "%" }, children: format(v) }) : null,
3272
- /* @__PURE__ */ jsx44(
3282
+ /* @__PURE__ */ jsxs41("div", { className: "fd-slider", children: [
3283
+ /* @__PURE__ */ jsx45("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
3284
+ showChip && dragging ? /* @__PURE__ */ jsx45("span", { className: "fd-slider-chip", style: { left: pct + "%" }, children: format(v) }) : null,
3285
+ /* @__PURE__ */ jsx45(
3273
3286
  "input",
3274
3287
  {
3275
3288
  type: "range",
@@ -3286,13 +3299,13 @@ function Slider({
3286
3299
  }
3287
3300
  )
3288
3301
  ] }),
3289
- help ? /* @__PURE__ */ jsx44("span", { className: "fd-field-help", children: help }) : null
3302
+ help ? /* @__PURE__ */ jsx45("span", { className: "fd-field-help", children: help }) : null
3290
3303
  ] });
3291
3304
  }
3292
3305
 
3293
3306
  // src/components/forms/RangeSlider.tsx
3294
3307
  import * as React20 from "react";
3295
- import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
3308
+ import { jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
3296
3309
  function RangeSlider({
3297
3310
  label,
3298
3311
  min = 0,
@@ -3349,7 +3362,7 @@ function RangeSlider({
3349
3362
  };
3350
3363
  const thin = S.length > 7 ? Math.ceil(S.length / 5) : 1;
3351
3364
  const pair = value || [S[0].value, S[S.length - 1].value];
3352
- return /* @__PURE__ */ jsx45(
3365
+ return /* @__PURE__ */ jsx46(
3353
3366
  RangeSlider,
3354
3367
  {
3355
3368
  ...rest,
@@ -3397,23 +3410,23 @@ function RangeSlider({
3397
3410
  };
3398
3411
  const showChip = (i) => drag === i || focus === i;
3399
3412
  const hasLabels = marks.some((m) => m.label);
3400
- return /* @__PURE__ */ jsxs41("div", { className: ["fd-field", className].filter(Boolean).join(" "), ...rest, children: [
3401
- label ? /* @__PURE__ */ jsxs41("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
3402
- /* @__PURE__ */ jsx45("span", { className: "fd-field-label", children: label }),
3403
- /* @__PURE__ */ jsxs41("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: [
3413
+ return /* @__PURE__ */ jsxs42("div", { className: ["fd-field", className].filter(Boolean).join(" "), ...rest, children: [
3414
+ label ? /* @__PURE__ */ jsxs42("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
3415
+ /* @__PURE__ */ jsx46("span", { className: "fd-field-label", children: label }),
3416
+ /* @__PURE__ */ jsxs42("span", { className: "fd-num", style: { color: "var(--text-2)" }, children: [
3404
3417
  fmt2(a),
3405
3418
  " \u2013 ",
3406
3419
  fmt2(b)
3407
3420
  ] })
3408
3421
  ] }) : null,
3409
- /* @__PURE__ */ jsxs41("div", { className: "fd-range" + (hasLabels ? " has-labels" : ""), onPointerDown: onRailDown, children: [
3410
- /* @__PURE__ */ jsx45("span", { className: "fd-range-rail", ref: railRef }),
3411
- /* @__PURE__ */ jsx45("span", { className: "fd-range-fill", style: { left: pct(a) + "%", width: pct(b) - pct(a) + "%" } }),
3412
- marks.map((m) => /* @__PURE__ */ jsxs41(React20.Fragment, { children: [
3413
- /* @__PURE__ */ jsx45("span", { className: "fd-range-mark" + (m.value >= a && m.value <= b ? " is-in" : ""), style: { left: pct(m.value) + "%" } }),
3414
- m.label ? /* @__PURE__ */ jsx45("span", { className: "fd-range-mark-label", style: { left: pct(m.value) + "%" }, children: m.label }) : null
3422
+ /* @__PURE__ */ jsxs42("div", { className: "fd-range" + (hasLabels ? " has-labels" : ""), onPointerDown: onRailDown, children: [
3423
+ /* @__PURE__ */ jsx46("span", { className: "fd-range-rail", ref: railRef }),
3424
+ /* @__PURE__ */ jsx46("span", { className: "fd-range-fill", style: { left: pct(a) + "%", width: pct(b) - pct(a) + "%" } }),
3425
+ marks.map((m) => /* @__PURE__ */ jsxs42(React20.Fragment, { children: [
3426
+ /* @__PURE__ */ jsx46("span", { className: "fd-range-mark" + (m.value >= a && m.value <= b ? " is-in" : ""), style: { left: pct(m.value) + "%" } }),
3427
+ m.label ? /* @__PURE__ */ jsx46("span", { className: "fd-range-mark-label", style: { left: pct(m.value) + "%" }, children: m.label }) : null
3415
3428
  ] }, m.value)),
3416
- [a, b].map((v, i) => /* @__PURE__ */ jsx45(
3429
+ [a, b].map((v, i) => /* @__PURE__ */ jsx46(
3417
3430
  "span",
3418
3431
  {
3419
3432
  className: "fd-range-thumb" + (drag === i ? " is-drag" : ""),
@@ -3428,18 +3441,18 @@ function RangeSlider({
3428
3441
  onKeyDown: key(i),
3429
3442
  onFocus: () => setFocus(i),
3430
3443
  onBlur: () => setFocus(null),
3431
- children: /* @__PURE__ */ jsx45("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
3444
+ children: /* @__PURE__ */ jsx46("span", { className: "fd-range-chip", style: { opacity: showChip(i) ? 1 : void 0 }, children: fmt2(v) })
3432
3445
  },
3433
3446
  i
3434
3447
  ))
3435
3448
  ] }),
3436
- help ? /* @__PURE__ */ jsx45("span", { className: "fd-field-help", children: help }) : null
3449
+ help ? /* @__PURE__ */ jsx46("span", { className: "fd-field-help", children: help }) : null
3437
3450
  ] });
3438
3451
  }
3439
3452
 
3440
3453
  // src/components/forms/Dropzone.tsx
3441
3454
  import * as React21 from "react";
3442
- import { jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
3455
+ import { jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
3443
3456
  function Dropzone({
3444
3457
  onFiles,
3445
3458
  onReject,
@@ -3484,7 +3497,7 @@ function Dropzone({
3484
3497
  if (rejected.length && onReject) onReject(rejected);
3485
3498
  if (accepted.length && onFiles) onFiles(accepted);
3486
3499
  };
3487
- return /* @__PURE__ */ jsxs42(
3500
+ return /* @__PURE__ */ jsxs43(
3488
3501
  "div",
3489
3502
  {
3490
3503
  className: ["fd-dropzone", over ? "is-over" : "", className].filter(Boolean).join(" "),
@@ -3495,10 +3508,10 @@ function Dropzone({
3495
3508
  onDrop: drop,
3496
3509
  children: [
3497
3510
  children,
3498
- over ? /* @__PURE__ */ jsx46("div", { className: "fd-dropzone-veil", "aria-hidden": "true", children: /* @__PURE__ */ jsxs42("div", { className: "fd-dropzone-card", children: [
3499
- /* @__PURE__ */ jsx46("i", { className: "ph ph-tray-arrow-down" }),
3500
- /* @__PURE__ */ jsx46("span", { className: "fd-dropzone-label", children: label }),
3501
- hint ? /* @__PURE__ */ jsx46("span", { className: "fd-dropzone-hint", children: hint }) : null
3511
+ over ? /* @__PURE__ */ jsx47("div", { className: "fd-dropzone-veil", "aria-hidden": "true", children: /* @__PURE__ */ jsxs43("div", { className: "fd-dropzone-card", children: [
3512
+ /* @__PURE__ */ jsx47("i", { className: "ph ph-tray-arrow-down" }),
3513
+ /* @__PURE__ */ jsx47("span", { className: "fd-dropzone-label", children: label }),
3514
+ hint ? /* @__PURE__ */ jsx47("span", { className: "fd-dropzone-hint", children: hint }) : null
3502
3515
  ] }) }) : null
3503
3516
  ]
3504
3517
  }
@@ -3517,8 +3530,8 @@ function FilePickButton({
3517
3530
  children
3518
3531
  }) {
3519
3532
  const ref = React21.useRef(null);
3520
- return /* @__PURE__ */ jsxs42(React21.Fragment, { children: [
3521
- /* @__PURE__ */ jsx46(
3533
+ return /* @__PURE__ */ jsxs43(React21.Fragment, { children: [
3534
+ /* @__PURE__ */ jsx47(
3522
3535
  "button",
3523
3536
  {
3524
3537
  type: "button",
@@ -3527,10 +3540,10 @@ function FilePickButton({
3527
3540
  "aria-label": label,
3528
3541
  title: label,
3529
3542
  onClick: () => ref.current && ref.current.click(),
3530
- children: children != null ? children : /* @__PURE__ */ jsx46("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
3543
+ children: children != null ? children : /* @__PURE__ */ jsx47("i", { className: "ph ph-" + icon, "aria-hidden": "true" })
3531
3544
  }
3532
3545
  ),
3533
- /* @__PURE__ */ jsx46(
3546
+ /* @__PURE__ */ jsx47(
3534
3547
  "input",
3535
3548
  {
3536
3549
  ref,
@@ -3607,7 +3620,7 @@ function useStagedFiles(upload, opts) {
3607
3620
  var DropzoneKit = { useStagedFiles };
3608
3621
 
3609
3622
  // src/components/forms/FileGrid.tsx
3610
- import { jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
3623
+ import { jsx as jsx48, jsxs as jsxs44 } from "react/jsx-runtime";
3611
3624
  var truncateMiddle = (name, max = 34) => {
3612
3625
  if (!name || name.length <= max) return name;
3613
3626
  const ext = /\.[A-Za-z0-9]+$/.exec(name);
@@ -3616,7 +3629,7 @@ var truncateMiddle = (name, max = 34) => {
3616
3629
  return head + "\u2026" + tail;
3617
3630
  };
3618
3631
  function Progress({ value }) {
3619
- return /* @__PURE__ */ jsx47("span", { className: "fd-file-prog", role: "progressbar", "aria-valuenow": Math.round(value), "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx47("span", { className: "fd-file-prog-fill", style: { width: Math.max(4, Math.min(100, value)) + "%" } }) });
3632
+ return /* @__PURE__ */ jsx48("span", { className: "fd-file-prog", role: "progressbar", "aria-valuenow": Math.round(value), "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ jsx48("span", { className: "fd-file-prog-fill", style: { width: Math.max(4, Math.min(100, value)) + "%" } }) });
3620
3633
  }
3621
3634
  function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false, className = "" }) {
3622
3635
  if (!file) return null;
@@ -3625,8 +3638,8 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
3625
3638
  const thumb = file.thumb && file.thumb.url || (image ? file.blobUrl || file.url : null);
3626
3639
  const meta = file.meta || (file.size ? formatBytes(file.size) : "");
3627
3640
  const clickable = !!onOpen && !uploading;
3628
- return /* @__PURE__ */ jsxs43("div", { className: ["fd-file", compact3 ? "is-compact" : "", file.error ? "is-error" : "", uploading ? "is-uploading" : "", className].filter(Boolean).join(" "), children: [
3629
- /* @__PURE__ */ jsxs43(
3641
+ return /* @__PURE__ */ jsxs44("div", { className: ["fd-file", compact3 ? "is-compact" : "", file.error ? "is-error" : "", uploading ? "is-uploading" : "", className].filter(Boolean).join(" "), children: [
3642
+ /* @__PURE__ */ jsxs44(
3630
3643
  "button",
3631
3644
  {
3632
3645
  type: "button",
@@ -3635,16 +3648,16 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
3635
3648
  onClick: clickable ? () => onOpen(file) : void 0,
3636
3649
  title: file.name + (meta ? " \xB7 " + meta : ""),
3637
3650
  children: [
3638
- /* @__PURE__ */ jsxs43("span", { className: "fd-file-icon", children: [
3639
- thumb ? /* @__PURE__ */ jsx47("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsx47("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
3640
- (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx47("i", { className: "ph ph-play fd-file-play", "aria-hidden": "true" }) : null
3651
+ /* @__PURE__ */ jsxs44("span", { className: "fd-file-icon", children: [
3652
+ thumb ? /* @__PURE__ */ jsx48("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsx48("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
3653
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx48("i", { className: "ph ph-play fd-file-play", "aria-hidden": "true" }) : null
3641
3654
  ] }),
3642
- /* @__PURE__ */ jsxs43("span", { className: "fd-file-text", children: [
3643
- /* @__PURE__ */ jsx47("span", { className: "fd-file-name", children: truncateMiddle(file.name, compact3 ? 26 : 40) }),
3644
- /* @__PURE__ */ jsx47("span", { className: "fd-file-meta", children: file.error ? /* @__PURE__ */ jsxs43("span", { className: "fd-file-err", children: [
3645
- /* @__PURE__ */ jsx47("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3655
+ /* @__PURE__ */ jsxs44("span", { className: "fd-file-text", children: [
3656
+ /* @__PURE__ */ jsx48("span", { className: "fd-file-name", children: truncateMiddle(file.name, compact3 ? 26 : 40) }),
3657
+ /* @__PURE__ */ jsx48("span", { className: "fd-file-meta", children: file.error ? /* @__PURE__ */ jsxs44("span", { className: "fd-file-err", children: [
3658
+ /* @__PURE__ */ jsx48("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3646
3659
  file.error
3647
- ] }) : uploading ? /* @__PURE__ */ jsxs43("span", { className: "fd-tabular", children: [
3660
+ ] }) : uploading ? /* @__PURE__ */ jsxs44("span", { className: "fd-tabular", children: [
3648
3661
  Math.round(file.progress),
3649
3662
  "% uploaded"
3650
3663
  ] }) : meta })
@@ -3652,29 +3665,29 @@ function FileChip({ file, onOpen, onRemove, onRetry, compact: compact3 = false,
3652
3665
  ]
3653
3666
  }
3654
3667
  ),
3655
- uploading ? /* @__PURE__ */ jsx47(Progress, { value: file.progress }) : null,
3656
- file.error && onRetry ? /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-file-act", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx47("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
3657
- onRemove ? /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-file-act", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx47("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3668
+ uploading ? /* @__PURE__ */ jsx48(Progress, { value: file.progress }) : null,
3669
+ file.error && onRetry ? /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-file-act", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx48("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
3670
+ onRemove ? /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-file-act", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx48("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3658
3671
  ] });
3659
3672
  }
3660
3673
  function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = "" }) {
3661
3674
  if (!file) return null;
3662
3675
  const src = file.thumb && file.thumb.url || file.blobUrl || file.url;
3663
3676
  const uploading = file.progress != null && file.progress < 100 && !file.error;
3664
- return /* @__PURE__ */ jsxs43("figure", { className: ["fd-tile", uploading ? "is-uploading" : "", file.error ? "is-error" : "", className].filter(Boolean).join(" "), children: [
3665
- /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-tile-btn", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen, children: src ? /* @__PURE__ */ jsx47("img", { src, alt: file.name || "", style: { maxHeight }, loading: "lazy" }) : /* @__PURE__ */ jsx47("span", { className: "fd-tile-fallback", children: /* @__PURE__ */ jsx47("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }) }) }),
3666
- uploading ? /* @__PURE__ */ jsx47(Progress, { value: file.progress }) : null,
3667
- file.error ? /* @__PURE__ */ jsxs43("figcaption", { className: "fd-tile-err", children: [
3668
- /* @__PURE__ */ jsx47("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3677
+ return /* @__PURE__ */ jsxs44("figure", { className: ["fd-tile", uploading ? "is-uploading" : "", file.error ? "is-error" : "", className].filter(Boolean).join(" "), children: [
3678
+ /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-tile-btn", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen, children: src ? /* @__PURE__ */ jsx48("img", { src, alt: file.name || "", style: { maxHeight }, loading: "lazy" }) : /* @__PURE__ */ jsx48("span", { className: "fd-tile-fallback", children: /* @__PURE__ */ jsx48("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }) }) }),
3679
+ uploading ? /* @__PURE__ */ jsx48(Progress, { value: file.progress }) : null,
3680
+ file.error ? /* @__PURE__ */ jsxs44("figcaption", { className: "fd-tile-err", children: [
3681
+ /* @__PURE__ */ jsx48("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
3669
3682
  file.error
3670
3683
  ] }) : null,
3671
- onRemove ? /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-tile-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx47("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3684
+ onRemove ? /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-tile-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx48("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3672
3685
  ] });
3673
3686
  }
3674
3687
  function FileStrip({ files = [], size = 68, onOpen, onRemove, onRetry, className = "" }) {
3675
3688
  const list = files.filter(Boolean);
3676
3689
  if (!list.length) return null;
3677
- return /* @__PURE__ */ jsx47("div", { className: ["fd-filestrip", className].filter(Boolean).join(" "), style: { "--fd-cell": size + "px" }, children: list.map((f) => /* @__PURE__ */ jsx47(FileCell, { file: f, onOpen, onRemove, onRetry }, f.id || f.name)) });
3690
+ return /* @__PURE__ */ jsx48("div", { className: ["fd-filestrip", className].filter(Boolean).join(" "), style: { "--fd-cell": size + "px" }, children: list.map((f) => /* @__PURE__ */ jsx48(FileCell, { file: f, onOpen, onRemove, onRetry }, f.id || f.name)) });
3678
3691
  }
3679
3692
  var shortName = (name, keep = 5) => {
3680
3693
  const s = String(name || "file");
@@ -3688,19 +3701,19 @@ function FileCell({ file, onOpen, onRemove, onRetry }) {
3688
3701
  const image = isImage(file.mime, file.name);
3689
3702
  const thumb = file.thumb && file.thumb.url || (image ? file.blobUrl || file.url : null);
3690
3703
  const label = file.name + (file.size ? " \xB7 " + formatBytes(file.size) : "");
3691
- return /* @__PURE__ */ jsxs43("div", { className: ["fd-cell", file.error ? "is-error" : "", uploading ? "is-uploading" : ""].filter(Boolean).join(" "), title: file.error ? file.name + " \u2014 " + file.error : label, children: [
3692
- /* @__PURE__ */ jsxs43("button", { type: "button", className: "fd-cell-main", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen || uploading, "aria-label": "Open " + file.name, children: [
3693
- thumb ? /* @__PURE__ */ jsx47("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsxs43("span", { className: "fd-cell-doc", children: [
3694
- /* @__PURE__ */ jsx47("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
3695
- /* @__PURE__ */ jsx47("span", { className: "fd-cell-name", children: shortName(file.name) }),
3696
- /* @__PURE__ */ jsx47("span", { className: "fd-cell-size", children: file.meta || formatBytes(file.size) })
3704
+ return /* @__PURE__ */ jsxs44("div", { className: ["fd-cell", file.error ? "is-error" : "", uploading ? "is-uploading" : ""].filter(Boolean).join(" "), title: file.error ? file.name + " \u2014 " + file.error : label, children: [
3705
+ /* @__PURE__ */ jsxs44("button", { type: "button", className: "fd-cell-main", onClick: onOpen ? () => onOpen(file) : void 0, disabled: !onOpen || uploading, "aria-label": "Open " + file.name, children: [
3706
+ thumb ? /* @__PURE__ */ jsx48("img", { src: thumb, alt: "" }) : /* @__PURE__ */ jsxs44("span", { className: "fd-cell-doc", children: [
3707
+ /* @__PURE__ */ jsx48("i", { className: "ph ph-" + iconForMime(file.mime, file.name), "aria-hidden": "true" }),
3708
+ /* @__PURE__ */ jsx48("span", { className: "fd-cell-name", children: shortName(file.name) }),
3709
+ /* @__PURE__ */ jsx48("span", { className: "fd-cell-size", children: file.meta || formatBytes(file.size) })
3697
3710
  ] }),
3698
- (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx47("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
3711
+ (file.mime || "").startsWith("video/") ? /* @__PURE__ */ jsx48("i", { className: "ph ph-play fd-cell-play", "aria-hidden": "true" }) : null
3699
3712
  ] }),
3700
- uploading ? /* @__PURE__ */ jsx47(Progress, { value: file.progress }) : null,
3701
- file.error ? /* @__PURE__ */ jsx47("span", { className: "fd-cell-err", "aria-hidden": "true", children: /* @__PURE__ */ jsx47("i", { className: "ph ph-warning-circle" }) }) : null,
3702
- file.error && onRetry ? /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-cell-x is-retry", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx47("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
3703
- onRemove ? /* @__PURE__ */ jsx47("button", { type: "button", className: "fd-cell-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx47("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3713
+ uploading ? /* @__PURE__ */ jsx48(Progress, { value: file.progress }) : null,
3714
+ file.error ? /* @__PURE__ */ jsx48("span", { className: "fd-cell-err", "aria-hidden": "true", children: /* @__PURE__ */ jsx48("i", { className: "ph ph-warning-circle" }) }) : null,
3715
+ file.error && onRetry ? /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-cell-x is-retry", onClick: () => onRetry(file), "aria-label": "Retry upload of " + file.name, children: /* @__PURE__ */ jsx48("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
3716
+ onRemove ? /* @__PURE__ */ jsx48("button", { type: "button", className: "fd-cell-x", onClick: () => onRemove(file), "aria-label": "Remove " + file.name, children: /* @__PURE__ */ jsx48("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
3704
3717
  ] });
3705
3718
  }
3706
3719
  function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeight = 200, compact: compact3 = false, className = "" }) {
@@ -3708,15 +3721,15 @@ function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeig
3708
3721
  if (!list.length) return null;
3709
3722
  const pics = tiles ? list.filter((f) => isImage(f.mime, f.name)) : [];
3710
3723
  const rest = list.filter((f) => pics.indexOf(f) === -1);
3711
- return /* @__PURE__ */ jsxs43("div", { className: ["fd-filegrid", className].filter(Boolean).join(" "), children: [
3712
- pics.length ? /* @__PURE__ */ jsx47("div", { className: "fd-filegrid-tiles", children: pics.map((f) => /* @__PURE__ */ jsx47(FileTile, { file: f, onOpen, onRemove, maxHeight }, f.id || f.name)) }) : null,
3713
- rest.length ? /* @__PURE__ */ jsx47("div", { className: "fd-filegrid-chips", children: rest.map((f) => /* @__PURE__ */ jsx47(FileChip, { file: f, onOpen, onRemove, onRetry, compact: compact3 }, f.id || f.name)) }) : null
3724
+ return /* @__PURE__ */ jsxs44("div", { className: ["fd-filegrid", className].filter(Boolean).join(" "), children: [
3725
+ pics.length ? /* @__PURE__ */ jsx48("div", { className: "fd-filegrid-tiles", children: pics.map((f) => /* @__PURE__ */ jsx48(FileTile, { file: f, onOpen, onRemove, maxHeight }, f.id || f.name)) }) : null,
3726
+ rest.length ? /* @__PURE__ */ jsx48("div", { className: "fd-filegrid-chips", children: rest.map((f) => /* @__PURE__ */ jsx48(FileChip, { file: f, onOpen, onRemove, onRetry, compact: compact3 }, f.id || f.name)) }) : null
3714
3727
  ] });
3715
3728
  }
3716
3729
 
3717
3730
  // src/components/forms/MarkdownEditor.tsx
3718
3731
  import * as React22 from "react";
3719
- import { jsx as jsx48, jsxs as jsxs44 } from "react/jsx-runtime";
3732
+ import { jsx as jsx49, jsxs as jsxs45 } from "react/jsx-runtime";
3720
3733
  var isMac = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || "");
3721
3734
  var INLINE_RE = /(\*\*\*[^*\n]+\*\*\*|\*\*[^*\n]+\*\*|__[^_\n]+__|~~[^~\n]+~~|`[^`\n]+`|\*[^*\s][^*\n]*\*|(?<![A-Za-z0-9_])_[^_\s][^_\n]*_|\[[^\]\n]*\]\([^)\s\n]*\)|https?:\/\/\S+)/g;
3722
3735
  function inlineParts(text) {
@@ -4140,8 +4153,8 @@ var MarkdownEditor = React22.forwardRef(function MarkdownEditor2({
4140
4153
  api.replaceRange(s.start, s.end, text.replace(/\r\n?/g, "\n"));
4141
4154
  };
4142
4155
  const lh = 1.55;
4143
- return /* @__PURE__ */ jsxs44("div", { className: ["fd-rme-wrap", disabled ? "is-disabled" : "", className].filter(Boolean).join(" "), children: [
4144
- /* @__PURE__ */ jsx48(
4156
+ return /* @__PURE__ */ jsxs45("div", { className: ["fd-rme-wrap", disabled ? "is-disabled" : "", className].filter(Boolean).join(" "), children: [
4157
+ /* @__PURE__ */ jsx49(
4145
4158
  "div",
4146
4159
  {
4147
4160
  ref: boxRef,
@@ -4174,7 +4187,7 @@ var MarkdownEditor = React22.forwardRef(function MarkdownEditor2({
4174
4187
  }
4175
4188
  }
4176
4189
  ),
4177
- !value ? /* @__PURE__ */ jsx48("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
4190
+ !value ? /* @__PURE__ */ jsx49("span", { className: "fd-rme-ph", "aria-hidden": "true", children: placeholder }) : null
4178
4191
  ] });
4179
4192
  });
4180
4193
 
@@ -5783,7 +5796,7 @@ var SessionKit = {
5783
5796
  };
5784
5797
 
5785
5798
  // src/components/platform/AccountMenu.tsx
5786
- import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs45 } from "react/jsx-runtime";
5799
+ import { Fragment as Fragment11, jsx as jsx50, jsxs as jsxs46 } from "react/jsx-runtime";
5787
5800
  var DEFAULT_LINKS = [
5788
5801
  { id: "profile", label: "Your profile", icon: "user-circle", href: "../admin/index.html#profile" },
5789
5802
  { id: "preferences", label: "Preferences", icon: "sliders-horizontal", href: "../admin/index.html#preferences" }
@@ -5794,7 +5807,7 @@ var DEFAULT_ADMIN_LINKS = [
5794
5807
  { id: "flags", label: "Feature flags", icon: "toggle-right", href: "../admin/index.html#flags", perm: "flags.manage" }
5795
5808
  ];
5796
5809
  function Item({ item, onPick }) {
5797
- return /* @__PURE__ */ jsxs45(
5810
+ return /* @__PURE__ */ jsxs46(
5798
5811
  "button",
5799
5812
  {
5800
5813
  type: "button",
@@ -5802,9 +5815,9 @@ function Item({ item, onPick }) {
5802
5815
  className: "fd-acct-item",
5803
5816
  onClick: () => onPick(item),
5804
5817
  children: [
5805
- /* @__PURE__ */ jsx49("i", { className: "ph ph-" + item.icon, "aria-hidden": "true" }),
5806
- /* @__PURE__ */ jsx49("span", { style: { flex: 1 }, children: item.label }),
5807
- item.badge ? /* @__PURE__ */ jsx49(Badge, { tone: "neutral", children: item.badge }) : null
5818
+ /* @__PURE__ */ jsx50("i", { className: "ph ph-" + item.icon, "aria-hidden": "true" }),
5819
+ /* @__PURE__ */ jsx50("span", { style: { flex: 1 }, children: item.label }),
5820
+ item.badge ? /* @__PURE__ */ jsx50(Badge, { tone: "neutral", children: item.badge }) : null
5808
5821
  ]
5809
5822
  }
5810
5823
  );
@@ -5836,8 +5849,8 @@ function AccountMenu({
5836
5849
  if (onSignOut) return onSignOut();
5837
5850
  window.alert("Signed out. (Simulated \u2014 no auth provider is wired up.)");
5838
5851
  };
5839
- return /* @__PURE__ */ jsxs45(Fragment11, { children: [
5840
- /* @__PURE__ */ jsxs45(
5852
+ return /* @__PURE__ */ jsxs46(Fragment11, { children: [
5853
+ /* @__PURE__ */ jsxs46(
5841
5854
  "button",
5842
5855
  {
5843
5856
  type: "button",
@@ -5849,32 +5862,32 @@ function AccountMenu({
5849
5862
  onClick: () => setOpen((o) => !o),
5850
5863
  ...rest,
5851
5864
  children: [
5852
- /* @__PURE__ */ jsx49(Avatar, { name: user.name, size: "sm" }),
5853
- /* @__PURE__ */ jsx49("i", { className: "ph ph-caret-down", "aria-hidden": "true", style: { fontSize: 11, color: "var(--text-muted)" } })
5865
+ /* @__PURE__ */ jsx50(Avatar, { name: user.name, size: "sm" }),
5866
+ /* @__PURE__ */ jsx50("i", { className: "ph ph-caret-down", "aria-hidden": "true", style: { fontSize: 11, color: "var(--text-muted)" } })
5854
5867
  ]
5855
5868
  }
5856
5869
  ),
5857
- /* @__PURE__ */ jsx49(Popover, { open, anchorRef: ref, onClose: () => setOpen(false), placement: "bottom-end", width: 272, children: /* @__PURE__ */ jsxs45("div", { role: "menu", className: "fd-stack", style: { gap: 0 }, children: [
5858
- /* @__PURE__ */ jsxs45("div", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
5859
- /* @__PURE__ */ jsx49(Avatar, { name: user.name }),
5860
- /* @__PURE__ */ jsxs45("span", { className: "fd-stack", style: { gap: 1, minWidth: 0, flex: 1 }, children: [
5861
- /* @__PURE__ */ jsx49("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: user.name }),
5862
- /* @__PURE__ */ jsx49("span", { className: "fd-body-sm fd-muted fd-table-trunc", children: user.email })
5870
+ /* @__PURE__ */ jsx50(Popover, { open, anchorRef: ref, onClose: () => setOpen(false), placement: "bottom-end", width: 272, children: /* @__PURE__ */ jsxs46("div", { role: "menu", className: "fd-stack", style: { gap: 0 }, children: [
5871
+ /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
5872
+ /* @__PURE__ */ jsx50(Avatar, { name: user.name }),
5873
+ /* @__PURE__ */ jsxs46("span", { className: "fd-stack", style: { gap: 1, minWidth: 0, flex: 1 }, children: [
5874
+ /* @__PURE__ */ jsx50("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: user.name }),
5875
+ /* @__PURE__ */ jsx50("span", { className: "fd-body-sm fd-muted fd-table-trunc", children: user.email })
5863
5876
  ] })
5864
5877
  ] }),
5865
- showRoles && session.roles.length ? /* @__PURE__ */ jsx49("div", { className: "fd-row", style: { gap: 6, padding: "10px 14px", flexWrap: "wrap", borderBottom: "1px solid var(--border)" }, children: session.roles.map((r) => /* @__PURE__ */ jsx49(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)) }) : null,
5866
- /* @__PURE__ */ jsx49("div", { className: "fd-acct-group", children: links.map((l) => /* @__PURE__ */ jsx49(Item, { item: l, onPick: pick }, l.id)) }),
5867
- visibleAdmin.length ? /* @__PURE__ */ jsxs45("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
5868
- /* @__PURE__ */ jsx49("span", { className: "fd-overline fd-muted", style: { padding: "8px 14px 4px", display: "block" }, children: "Administration" }),
5869
- visibleAdmin.map((l) => /* @__PURE__ */ jsx49(Item, { item: l, onPick: pick }, l.id))
5878
+ showRoles && session.roles.length ? /* @__PURE__ */ jsx50("div", { className: "fd-row", style: { gap: 6, padding: "10px 14px", flexWrap: "wrap", borderBottom: "1px solid var(--border)" }, children: session.roles.map((r) => /* @__PURE__ */ jsx50(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)) }) : null,
5879
+ /* @__PURE__ */ jsx50("div", { className: "fd-acct-group", children: links.map((l) => /* @__PURE__ */ jsx50(Item, { item: l, onPick: pick }, l.id)) }),
5880
+ visibleAdmin.length ? /* @__PURE__ */ jsxs46("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
5881
+ /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", style: { padding: "8px 14px 4px", display: "block" }, children: "Administration" }),
5882
+ visibleAdmin.map((l) => /* @__PURE__ */ jsx50(Item, { item: l, onPick: pick }, l.id))
5870
5883
  ] }) : null,
5871
- allowUserSwitch ? /* @__PURE__ */ jsxs45("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
5872
- /* @__PURE__ */ jsxs45("button", { type: "button", role: "menuitem", className: "fd-acct-item", onClick: () => setSwitching((s) => !s), children: [
5873
- /* @__PURE__ */ jsx49("i", { className: "ph ph-user-switch", "aria-hidden": "true" }),
5874
- /* @__PURE__ */ jsx49("span", { style: { flex: 1 }, children: "View as another member" }),
5875
- /* @__PURE__ */ jsx49("i", { className: "ph ph-caret-" + (switching ? "up" : "down"), "aria-hidden": "true", style: { fontSize: 11 } })
5884
+ allowUserSwitch ? /* @__PURE__ */ jsxs46("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: [
5885
+ /* @__PURE__ */ jsxs46("button", { type: "button", role: "menuitem", className: "fd-acct-item", onClick: () => setSwitching((s) => !s), children: [
5886
+ /* @__PURE__ */ jsx50("i", { className: "ph ph-user-switch", "aria-hidden": "true" }),
5887
+ /* @__PURE__ */ jsx50("span", { style: { flex: 1 }, children: "View as another member" }),
5888
+ /* @__PURE__ */ jsx50("i", { className: "ph ph-caret-" + (switching ? "up" : "down"), "aria-hidden": "true", style: { fontSize: 11 } })
5876
5889
  ] }),
5877
- switching ? /* @__PURE__ */ jsx49("div", { className: "fd-stack", style: { gap: 0, maxHeight: 208, overflowY: "auto" }, children: session.allUsers.filter((u) => u.status === "active").map((u) => /* @__PURE__ */ jsxs45(
5890
+ switching ? /* @__PURE__ */ jsx50("div", { className: "fd-stack", style: { gap: 0, maxHeight: 208, overflowY: "auto" }, children: session.allUsers.filter((u) => u.status === "active").map((u) => /* @__PURE__ */ jsxs46(
5878
5891
  "button",
5879
5892
  {
5880
5893
  type: "button",
@@ -5886,20 +5899,20 @@ function AccountMenu({
5886
5899
  setSwitching(false);
5887
5900
  },
5888
5901
  children: [
5889
- /* @__PURE__ */ jsx49(Avatar, { name: u.name, size: "sm" }),
5890
- /* @__PURE__ */ jsxs45("span", { className: "fd-stack", style: { gap: 0, flex: 1, minWidth: 0, alignItems: "flex-start" }, children: [
5891
- /* @__PURE__ */ jsx49("span", { style: { fontWeight: u.id === user.id ? 700 : 500 }, children: u.name }),
5892
- /* @__PURE__ */ jsx49("span", { className: "fd-muted", style: { fontSize: 11.5 }, children: u.roles.join(", ") })
5902
+ /* @__PURE__ */ jsx50(Avatar, { name: u.name, size: "sm" }),
5903
+ /* @__PURE__ */ jsxs46("span", { className: "fd-stack", style: { gap: 0, flex: 1, minWidth: 0, alignItems: "flex-start" }, children: [
5904
+ /* @__PURE__ */ jsx50("span", { style: { fontWeight: u.id === user.id ? 700 : 500 }, children: u.name }),
5905
+ /* @__PURE__ */ jsx50("span", { className: "fd-muted", style: { fontSize: 11.5 }, children: u.roles.join(", ") })
5893
5906
  ] }),
5894
- u.id === user.id ? /* @__PURE__ */ jsx49("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
5907
+ u.id === user.id ? /* @__PURE__ */ jsx50("i", { className: "ph ph-check", "aria-hidden": "true", style: { color: "var(--ok-text)" } }) : null
5895
5908
  ]
5896
5909
  },
5897
5910
  u.id
5898
5911
  )) }) : null
5899
5912
  ] }) : null,
5900
- /* @__PURE__ */ jsx49("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: /* @__PURE__ */ jsxs45("button", { type: "button", role: "menuitem", className: "fd-acct-item", "data-danger": "true", onClick: signOut, children: [
5901
- /* @__PURE__ */ jsx49("i", { className: "ph ph-sign-out", "aria-hidden": "true" }),
5902
- /* @__PURE__ */ jsx49("span", { style: { flex: 1 }, children: "Sign out" })
5913
+ /* @__PURE__ */ jsx50("div", { className: "fd-acct-group", style: { borderTop: "1px solid var(--border)" }, children: /* @__PURE__ */ jsxs46("button", { type: "button", role: "menuitem", className: "fd-acct-item", "data-danger": "true", onClick: signOut, children: [
5914
+ /* @__PURE__ */ jsx50("i", { className: "ph ph-sign-out", "aria-hidden": "true" }),
5915
+ /* @__PURE__ */ jsx50("span", { style: { flex: 1 }, children: "Sign out" })
5903
5916
  ] }) })
5904
5917
  ] }) })
5905
5918
  ] });
@@ -5907,10 +5920,10 @@ function AccountMenu({
5907
5920
 
5908
5921
  // src/components/platform/ApiSpecBrowser.tsx
5909
5922
  import * as React25 from "react";
5910
- import { jsx as jsx50, jsxs as jsxs46 } from "react/jsx-runtime";
5923
+ import { jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
5911
5924
  var METHOD_TONE = { GET: "success", POST: "info", PATCH: "warning", PUT: "warning", DELETE: "danger" };
5912
5925
  function Json({ obj }) {
5913
- return /* @__PURE__ */ jsx50("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
5926
+ return /* @__PURE__ */ jsx51("pre", { className: "fd-json", children: JSON.stringify(obj, null, 2) });
5914
5927
  }
5915
5928
  function Endpoint({ s, onRequest }) {
5916
5929
  const [tried, setTried] = React25.useState(null);
@@ -5924,50 +5937,50 @@ function Endpoint({ s, onRequest }) {
5924
5937
  setTried({ ms: Math.round((window.performance || Date).now() - t0), error: String(e && e.message || e) });
5925
5938
  }
5926
5939
  };
5927
- return /* @__PURE__ */ jsx50(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 0 }, children: [
5928
- /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 10, padding: "14px 18px", flexWrap: "wrap" }, children: [
5929
- /* @__PURE__ */ jsx50(Badge, { tone: METHOD_TONE[s.method] || "neutral", children: s.method }),
5930
- /* @__PURE__ */ jsx50("code", { className: "fd-mono", style: { fontSize: 12.5, fontWeight: 600, color: "var(--text)", wordBreak: "break-all" }, children: s.path }),
5931
- s.isList ? /* @__PURE__ */ jsx50(Badge, { tone: "neutral", icon: "rows", children: "Paged list" }) : null,
5932
- /* @__PURE__ */ jsx50("span", { style: { flex: 1 } }),
5933
- /* @__PURE__ */ jsxs46("span", { className: "fd-body-sm fd-muted fd-mono", children: [
5940
+ return /* @__PURE__ */ jsx51(Card, { elevation: "flat", padded: false, children: /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 0 }, children: [
5941
+ /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 10, padding: "14px 18px", flexWrap: "wrap" }, children: [
5942
+ /* @__PURE__ */ jsx51(Badge, { tone: METHOD_TONE[s.method] || "neutral", children: s.method }),
5943
+ /* @__PURE__ */ jsx51("code", { className: "fd-mono", style: { fontSize: 12.5, fontWeight: 600, color: "var(--text)", wordBreak: "break-all" }, children: s.path }),
5944
+ s.isList ? /* @__PURE__ */ jsx51(Badge, { tone: "neutral", icon: "rows", children: "Paged list" }) : null,
5945
+ /* @__PURE__ */ jsx51("span", { style: { flex: 1 } }),
5946
+ /* @__PURE__ */ jsxs47("span", { className: "fd-body-sm fd-muted fd-mono", children: [
5934
5947
  s.latency[0],
5935
5948
  "\u2013",
5936
5949
  s.latency[1],
5937
5950
  "ms"
5938
5951
  ] }),
5939
- /* @__PURE__ */ jsx50(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
5952
+ /* @__PURE__ */ jsx51(Button, { size: "sm", variant: "secondary", icon: "play", loading: tried === "busy", onClick: run, children: "Try it" })
5940
5953
  ] }),
5941
- /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 14, padding: "0 18px 16px" }, children: [
5942
- /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 6 }, children: [
5943
- /* @__PURE__ */ jsx50("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: s.title }),
5944
- /* @__PURE__ */ jsx50("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: s.purpose }),
5945
- s.usedBy && s.usedBy.length ? /* @__PURE__ */ jsx50("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: s.usedBy.map((u) => /* @__PURE__ */ jsx50(Tag, { children: u }, u)) }) : null
5954
+ /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 14, padding: "0 18px 16px" }, children: [
5955
+ /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 6 }, children: [
5956
+ /* @__PURE__ */ jsx51("span", { className: "fd-body-sm", style: { fontWeight: 700 }, children: s.title }),
5957
+ /* @__PURE__ */ jsx51("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: s.purpose }),
5958
+ s.usedBy && s.usedBy.length ? /* @__PURE__ */ jsx51("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: s.usedBy.map((u) => /* @__PURE__ */ jsx51(Tag, { children: u }, u)) }) : null
5946
5959
  ] }),
5947
- /* @__PURE__ */ jsxs46("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(280px,1fr))", gap: 12, alignItems: "start" }, children: [
5948
- s.request ? /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 6 }, children: [
5949
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: "Request body" }),
5950
- /* @__PURE__ */ jsx50(Json, { obj: s.request })
5960
+ /* @__PURE__ */ jsxs47("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(280px,1fr))", gap: 12, alignItems: "start" }, children: [
5961
+ s.request ? /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 6 }, children: [
5962
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Request body" }),
5963
+ /* @__PURE__ */ jsx51(Json, { obj: s.request })
5951
5964
  ] }) : null,
5952
- s.query ? /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 6 }, children: [
5953
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: "Query" }),
5954
- /* @__PURE__ */ jsx50(Json, { obj: s.query })
5965
+ s.query ? /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 6 }, children: [
5966
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Query" }),
5967
+ /* @__PURE__ */ jsx51(Json, { obj: s.query })
5955
5968
  ] }) : null,
5956
- /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 6 }, children: [
5957
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: "Response 200" }),
5958
- /* @__PURE__ */ jsx50(Json, { obj: s.response })
5969
+ /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 6 }, children: [
5970
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Response 200" }),
5971
+ /* @__PURE__ */ jsx51(Json, { obj: s.response })
5959
5972
  ] })
5960
5973
  ] }),
5961
- s.notes ? /* @__PURE__ */ jsx50(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
5962
- tried && tried !== "busy" ? /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 6 }, children: [
5963
- /* @__PURE__ */ jsxs46("span", { className: "fd-row", style: { gap: 8 }, children: [
5964
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
5965
- /* @__PURE__ */ jsxs46(Badge, { tone: tried.error ? "danger" : "success", icon: "timer", children: [
5974
+ s.notes ? /* @__PURE__ */ jsx51(Flag, { tone: "info", statement: "Implementation note", cost: s.notes, actions: null }) : null,
5975
+ tried && tried !== "busy" ? /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 6 }, children: [
5976
+ /* @__PURE__ */ jsxs47("span", { className: "fd-row", style: { gap: 8 }, children: [
5977
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Simulated response" }),
5978
+ /* @__PURE__ */ jsxs47(Badge, { tone: tried.error ? "danger" : "success", icon: "timer", children: [
5966
5979
  tried.ms,
5967
5980
  "ms"
5968
5981
  ] })
5969
5982
  ] }),
5970
- /* @__PURE__ */ jsx50(Json, { obj: tried.error ? { error: tried.error } : tried.data })
5983
+ /* @__PURE__ */ jsx51(Json, { obj: tried.error ? { error: tried.error } : tried.data })
5971
5984
  ] }) : null
5972
5985
  ] })
5973
5986
  ] }) });
@@ -5995,49 +6008,49 @@ function ApiSpecBrowser({
5995
6008
  const effGroups = groups && groups.length ? groups : [["All endpoints", spec.map((s) => s.id)]];
5996
6009
  const methods = [...new Set(spec.map((s) => s.method))];
5997
6010
  const listCount = spec.filter((s) => s.isList).length;
5998
- return /* @__PURE__ */ jsxs46("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 1100 }, ...rest, children: [
5999
- /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 10 }, children: [
6000
- kicker ? /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: kicker }) : null,
6001
- /* @__PURE__ */ jsx50("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
6002
- lede ? /* @__PURE__ */ jsx50("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede }) : null
6011
+ return /* @__PURE__ */ jsxs47("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 1100 }, ...rest, children: [
6012
+ /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 10 }, children: [
6013
+ kicker ? /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: kicker }) : null,
6014
+ /* @__PURE__ */ jsx51("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
6015
+ lede ? /* @__PURE__ */ jsx51("p", { className: "fd-body fd-secondary fd-prose", style: { margin: 0 }, children: lede }) : null
6003
6016
  ] }),
6004
- modules && modules.length ? /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 8 }, children: [
6005
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", children: "Filter by screen \u2014 every endpoint that screen depends on" }),
6006
- /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
6007
- /* @__PURE__ */ jsxs46(Tag, { icon: "stack", selected: !mod, onClick: () => setMod(null), children: [
6017
+ modules && modules.length ? /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 8 }, children: [
6018
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Filter by screen \u2014 every endpoint that screen depends on" }),
6019
+ /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
6020
+ /* @__PURE__ */ jsxs47(Tag, { icon: "stack", selected: !mod, onClick: () => setMod(null), children: [
6008
6021
  "All screens ",
6009
- /* @__PURE__ */ jsx50("span", { className: "fd-mono", children: spec.length })
6022
+ /* @__PURE__ */ jsx51("span", { className: "fd-mono", children: spec.length })
6010
6023
  ] }),
6011
- modules.map((m) => /* @__PURE__ */ jsxs46(Tag, { icon: m.icon, selected: mod === m.id, onClick: () => setMod(mod === m.id ? null : m.id), children: [
6024
+ modules.map((m) => /* @__PURE__ */ jsxs47(Tag, { icon: m.icon, selected: mod === m.id, onClick: () => setMod(mod === m.id ? null : m.id), children: [
6012
6025
  m.label,
6013
6026
  " ",
6014
- /* @__PURE__ */ jsx50("span", { className: "fd-mono", children: m.endpoints.length })
6027
+ /* @__PURE__ */ jsx51("span", { className: "fd-mono", children: m.endpoints.length })
6015
6028
  ] }, m.id))
6016
6029
  ] }),
6017
- activeModule ? /* @__PURE__ */ jsx50(
6030
+ activeModule ? /* @__PURE__ */ jsx51(
6018
6031
  Flag,
6019
6032
  {
6020
6033
  tone: "info",
6021
6034
  statement: activeModule.label + " calls " + activeModule.endpoints.length + " endpoints.",
6022
6035
  cost: "Integration checklist for this screen: " + activeModule.endpoints.join(", ") + ". Wire these and the screen is done.",
6023
- actions: /* @__PURE__ */ jsx50(Button, { size: "sm", variant: "ghost", icon: "x", onClick: () => setMod(null), children: "Show all screens" })
6036
+ actions: /* @__PURE__ */ jsx51(Button, { size: "sm", variant: "ghost", icon: "x", onClick: () => setMod(null), children: "Show all screens" })
6024
6037
  }
6025
6038
  ) : null
6026
6039
  ] }) : null,
6027
- sourceNote ? /* @__PURE__ */ jsx50(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
6028
- /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
6029
- /* @__PURE__ */ jsx50(Input, { icon: "magnifying-glass", placeholder: "Find an endpoint, screen, or behavior", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
6030
- methods.map((m) => /* @__PURE__ */ jsxs46(Tag, { selected: method === m, onClick: () => setMethod(method === m ? null : m), children: [
6040
+ sourceNote ? /* @__PURE__ */ jsx51(Flag, { tone: "info", statement: "Design-first: this page is the spec.", cost: sourceNote, actions: null }) : null,
6041
+ /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
6042
+ /* @__PURE__ */ jsx51(Input, { icon: "magnifying-glass", placeholder: "Find an endpoint, screen, or behavior", value: q, onChange: (e) => setQ(e.target.value), style: { width: 300 } }),
6043
+ methods.map((m) => /* @__PURE__ */ jsxs47(Tag, { selected: method === m, onClick: () => setMethod(method === m ? null : m), children: [
6031
6044
  m,
6032
6045
  " ",
6033
- /* @__PURE__ */ jsx50("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
6046
+ /* @__PURE__ */ jsx51("span", { className: "fd-mono", children: spec.filter((s) => s.method === m).length })
6034
6047
  ] }, m)),
6035
- listCount ? /* @__PURE__ */ jsxs46(Tag, { icon: "rows", selected: listOnly, onClick: () => setListOnly(!listOnly), children: [
6048
+ listCount ? /* @__PURE__ */ jsxs47(Tag, { icon: "rows", selected: listOnly, onClick: () => setListOnly(!listOnly), children: [
6036
6049
  "Paged lists ",
6037
- /* @__PURE__ */ jsx50("span", { className: "fd-mono", children: listCount })
6050
+ /* @__PURE__ */ jsx51("span", { className: "fd-mono", children: listCount })
6038
6051
  ] }) : null,
6039
- /* @__PURE__ */ jsx50("span", { style: { flex: 1 } }),
6040
- /* @__PURE__ */ jsxs46("span", { className: "fd-body-sm fd-muted", children: [
6052
+ /* @__PURE__ */ jsx51("span", { style: { flex: 1 } }),
6053
+ /* @__PURE__ */ jsxs47("span", { className: "fd-body-sm fd-muted", children: [
6041
6054
  hits.length,
6042
6055
  " of ",
6043
6056
  spec.length,
@@ -6045,23 +6058,23 @@ function ApiSpecBrowser({
6045
6058
  listCount ? " \xB7 " + listCount + " paged" : ""
6046
6059
  ] })
6047
6060
  ] }),
6048
- hits.length === 0 ? /* @__PURE__ */ jsx50(Card, { elevation: "flat", children: /* @__PURE__ */ jsx50("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No endpoint matches those filters." }) }) : effGroups.map(([g, ids]) => {
6061
+ hits.length === 0 ? /* @__PURE__ */ jsx51(Card, { elevation: "flat", children: /* @__PURE__ */ jsx51("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: "No endpoint matches those filters." }) }) : effGroups.map(([g, ids]) => {
6049
6062
  const items = hits.filter((s) => ids.indexOf(s.id) >= 0);
6050
6063
  if (!items.length) return null;
6051
- return /* @__PURE__ */ jsxs46("div", { className: "fd-stack", style: { gap: 12 }, children: [
6052
- /* @__PURE__ */ jsx50("span", { className: "fd-label-lg", children: g }),
6053
- items.map((s) => /* @__PURE__ */ jsx50(Endpoint, { s, onRequest }, s.id))
6064
+ return /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 12 }, children: [
6065
+ /* @__PURE__ */ jsx51("span", { className: "fd-label-lg", children: g }),
6066
+ items.map((s) => /* @__PURE__ */ jsx51(Endpoint, { s, onRequest }, s.id))
6054
6067
  ] }, g);
6055
6068
  }),
6056
- conventions && conventions.length ? /* @__PURE__ */ jsx50(Card, { title: "Cross-cutting conventions", elevation: "flat", children: /* @__PURE__ */ jsx50("div", { className: "fd-stack", style: { gap: 10 }, children: conventions.map(([k, v]) => /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 12, alignItems: "flex-start" }, children: [
6057
- /* @__PURE__ */ jsx50("span", { className: "fd-overline fd-muted", style: { width: 110, flex: "none", paddingTop: 2 }, children: k }),
6058
- /* @__PURE__ */ jsx50("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: v })
6069
+ conventions && conventions.length ? /* @__PURE__ */ jsx51(Card, { title: "Cross-cutting conventions", elevation: "flat", children: /* @__PURE__ */ jsx51("div", { className: "fd-stack", style: { gap: 10 }, children: conventions.map(([k, v]) => /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 12, alignItems: "flex-start" }, children: [
6070
+ /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", style: { width: 110, flex: "none", paddingTop: 2 }, children: k }),
6071
+ /* @__PURE__ */ jsx51("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: v })
6059
6072
  ] }, k)) }) }) : null,
6060
- openQuestions && openQuestions.length ? /* @__PURE__ */ jsx50(Collapsible, { icon: "list-checks", title: "Open questions before implementation", subtitle: openQuestions.length + " unresolved", children: /* @__PURE__ */ jsx50("div", { className: "fd-stack", style: { gap: 8 }, children: openQuestions.map(([id, question, why]) => /* @__PURE__ */ jsxs46("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start", padding: "8px 0", borderTop: "1px solid var(--border)" }, children: [
6061
- /* @__PURE__ */ jsx50(Badge, { tone: "danger", children: id }),
6062
- /* @__PURE__ */ jsxs46("span", { className: "fd-stack", style: { gap: 2, flex: 1 }, children: [
6063
- /* @__PURE__ */ jsx50("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: question }),
6064
- /* @__PURE__ */ jsx50("span", { className: "fd-body-sm fd-muted", children: why })
6073
+ openQuestions && openQuestions.length ? /* @__PURE__ */ jsx51(Collapsible, { icon: "list-checks", title: "Open questions before implementation", subtitle: openQuestions.length + " unresolved", children: /* @__PURE__ */ jsx51("div", { className: "fd-stack", style: { gap: 8 }, children: openQuestions.map(([id, question, why]) => /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start", padding: "8px 0", borderTop: "1px solid var(--border)" }, children: [
6074
+ /* @__PURE__ */ jsx51(Badge, { tone: "danger", children: id }),
6075
+ /* @__PURE__ */ jsxs47("span", { className: "fd-stack", style: { gap: 2, flex: 1 }, children: [
6076
+ /* @__PURE__ */ jsx51("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: question }),
6077
+ /* @__PURE__ */ jsx51("span", { className: "fd-body-sm fd-muted", children: why })
6065
6078
  ] })
6066
6079
  ] }, id)) }) }) : null
6067
6080
  ] });
@@ -6069,7 +6082,7 @@ function ApiSpecBrowser({
6069
6082
 
6070
6083
  // src/components/platform/ProfilePage.tsx
6071
6084
  import * as React26 from "react";
6072
- import { jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
6085
+ import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
6073
6086
  var TIMEZONES = ["America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", "Pacific/Honolulu", "Europe/London", "Europe/Berlin"];
6074
6087
  var NOTIFY = [
6075
6088
  { key: "planShared", label: "A plan is shared with me", detail: "Someone sends you a plan or a client link." },
@@ -6113,43 +6126,43 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6113
6126
  { id: "s2", device: "iPhone 15 \xB7 Safari", where: "Denver, CO", when: "2 hours ago" },
6114
6127
  { id: "s3", device: "Windows \xB7 Edge", where: "Chicago, IL", when: "Aug 12" }
6115
6128
  ];
6116
- return /* @__PURE__ */ jsxs47("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 860 }, ...rest, children: [
6117
- /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 10 }, children: [
6118
- /* @__PURE__ */ jsx51("span", { className: "fd-overline fd-muted", children: "Account" }),
6119
- /* @__PURE__ */ jsx51("h1", { className: "fd-h1", style: { margin: 0 }, children: "Your profile" }),
6120
- /* @__PURE__ */ jsx51("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." })
6129
+ return /* @__PURE__ */ jsxs48("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 20, maxWidth: 860 }, ...rest, children: [
6130
+ /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 10 }, children: [
6131
+ /* @__PURE__ */ jsx52("span", { className: "fd-overline fd-muted", children: "Account" }),
6132
+ /* @__PURE__ */ jsx52("h1", { className: "fd-h1", style: { margin: 0 }, children: "Your profile" }),
6133
+ /* @__PURE__ */ jsx52("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." })
6121
6134
  ] }),
6122
- /* @__PURE__ */ jsx51(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap", alignItems: "flex-start" }, children: [
6123
- /* @__PURE__ */ jsx51(Avatar, { name: draft.name || user.name, size: "lg" }),
6124
- /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 4, flex: 1, minWidth: 200 }, children: [
6125
- /* @__PURE__ */ jsx51("span", { className: "fd-h3", style: { margin: 0 }, children: draft.name || user.name }),
6126
- /* @__PURE__ */ jsxs47("span", { className: "fd-body-sm fd-muted", children: [
6135
+ /* @__PURE__ */ jsx52(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 16, flexWrap: "wrap", alignItems: "flex-start" }, children: [
6136
+ /* @__PURE__ */ jsx52(Avatar, { name: draft.name || user.name, size: "lg" }),
6137
+ /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 4, flex: 1, minWidth: 200 }, children: [
6138
+ /* @__PURE__ */ jsx52("span", { className: "fd-h3", style: { margin: 0 }, children: draft.name || user.name }),
6139
+ /* @__PURE__ */ jsxs48("span", { className: "fd-body-sm fd-muted", children: [
6127
6140
  draft.title || "No title set",
6128
6141
  " \xB7 ",
6129
6142
  user.team || "No team"
6130
6143
  ] }),
6131
- /* @__PURE__ */ jsxs47("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 4 }, children: [
6132
- session.roles.map((r) => /* @__PURE__ */ jsx51(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)),
6133
- user.sso ? /* @__PURE__ */ jsx51(Badge, { tone: "info", icon: "shield-check", children: "SSO" }) : null
6144
+ /* @__PURE__ */ jsxs48("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 4 }, children: [
6145
+ session.roles.map((r) => /* @__PURE__ */ jsx52(Badge, { tone: r.id === "owner" ? "success" : "neutral", children: r.name }, r.id)),
6146
+ user.sso ? /* @__PURE__ */ jsx52(Badge, { tone: "info", icon: "shield-check", children: "SSO" }) : null
6134
6147
  ] })
6135
6148
  ] }),
6136
- /* @__PURE__ */ jsx51(Button, { variant: "secondary", size: "sm", icon: "image", children: "Change photo" })
6149
+ /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "sm", icon: "image", children: "Change photo" })
6137
6150
  ] }) }),
6138
- /* @__PURE__ */ jsx51(
6151
+ /* @__PURE__ */ jsx52(
6139
6152
  Card,
6140
6153
  {
6141
- title: /* @__PURE__ */ jsxs47("span", { className: "fd-stack", style: { gap: 2 }, children: [
6142
- /* @__PURE__ */ jsx51("span", { children: "Identity" }),
6143
- /* @__PURE__ */ jsx51("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "Name and title appear on plans you share" })
6154
+ title: /* @__PURE__ */ jsxs48("span", { className: "fd-stack", style: { gap: 2 }, children: [
6155
+ /* @__PURE__ */ jsx52("span", { children: "Identity" }),
6156
+ /* @__PURE__ */ jsx52("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "Name and title appear on plans you share" })
6144
6157
  ] }),
6145
6158
  elevation: "flat",
6146
- children: /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 14 }, children: [
6147
- /* @__PURE__ */ jsxs47("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6148
- /* @__PURE__ */ jsx51(Input, { label: "Full name", value: draft.name, onChange: (e) => set("name", e.target.value) }),
6149
- /* @__PURE__ */ jsx51(Input, { label: "Job title", value: draft.title, onChange: (e) => set("title", e.target.value), placeholder: "e.g. Senior media planner" })
6159
+ children: /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 14 }, children: [
6160
+ /* @__PURE__ */ jsxs48("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6161
+ /* @__PURE__ */ jsx52(Input, { label: "Full name", value: draft.name, onChange: (e) => set("name", e.target.value) }),
6162
+ /* @__PURE__ */ jsx52(Input, { label: "Job title", value: draft.title, onChange: (e) => set("title", e.target.value), placeholder: "e.g. Senior media planner" })
6150
6163
  ] }),
6151
- /* @__PURE__ */ jsxs47("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6152
- /* @__PURE__ */ jsx51(
6164
+ /* @__PURE__ */ jsxs48("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6165
+ /* @__PURE__ */ jsx52(
6153
6166
  Input,
6154
6167
  {
6155
6168
  label: "Work email",
@@ -6159,9 +6172,9 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6159
6172
  help: user.sso ? "Managed by your identity provider \u2014 change it there." : "Contact an administrator to change this."
6160
6173
  }
6161
6174
  ),
6162
- /* @__PURE__ */ jsx51(Input, { label: "Phone", value: draft.phone, onChange: (e) => set("phone", e.target.value), placeholder: "Optional" })
6175
+ /* @__PURE__ */ jsx52(Input, { label: "Phone", value: draft.phone, onChange: (e) => set("phone", e.target.value), placeholder: "Optional" })
6163
6176
  ] }),
6164
- /* @__PURE__ */ jsx51(
6177
+ /* @__PURE__ */ jsx52(
6165
6178
  Textarea,
6166
6179
  {
6167
6180
  label: "Short bio",
@@ -6175,8 +6188,8 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6175
6188
  ] })
6176
6189
  }
6177
6190
  ),
6178
- /* @__PURE__ */ jsx51(Card, { title: "Working preferences", elevation: "flat", children: /* @__PURE__ */ jsxs47("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6179
- /* @__PURE__ */ jsx51(
6191
+ /* @__PURE__ */ jsx52(Card, { title: "Working preferences", elevation: "flat", children: /* @__PURE__ */ jsxs48("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit,minmax(220px,1fr))", gap: 14 }, children: [
6192
+ /* @__PURE__ */ jsx52(
6180
6193
  Select,
6181
6194
  {
6182
6195
  label: "Time zone",
@@ -6186,28 +6199,28 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6186
6199
  help: "Flight dates and schedules render in this zone."
6187
6200
  }
6188
6201
  ),
6189
- /* @__PURE__ */ jsx51(Select, { label: "Start of week", options: ["Monday", "Sunday"], placeholder: "Monday" })
6202
+ /* @__PURE__ */ jsx52(Select, { label: "Start of week", options: ["Monday", "Sunday"], placeholder: "Monday" })
6190
6203
  ] }) }),
6191
- /* @__PURE__ */ jsx51(
6204
+ /* @__PURE__ */ jsx52(
6192
6205
  Card,
6193
6206
  {
6194
- title: /* @__PURE__ */ jsxs47("span", { className: "fd-stack", style: { gap: 2 }, children: [
6195
- /* @__PURE__ */ jsx51("span", { children: "Notifications" }),
6196
- /* @__PURE__ */ jsx51("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "Email only for now \u2014 in-app notifications are on the roadmap" })
6207
+ title: /* @__PURE__ */ jsxs48("span", { className: "fd-stack", style: { gap: 2 }, children: [
6208
+ /* @__PURE__ */ jsx52("span", { children: "Notifications" }),
6209
+ /* @__PURE__ */ jsx52("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "Email only for now \u2014 in-app notifications are on the roadmap" })
6197
6210
  ] }),
6198
6211
  elevation: "flat",
6199
- children: /* @__PURE__ */ jsx51("div", { className: "fd-stack", style: { gap: 14 }, children: NOTIFY.map((n) => /* @__PURE__ */ jsx51(Switch, { checked: !!draft.notify[n.key], onChange: () => setNotify(n.key), label: n.label, description: n.detail }, n.key)) })
6212
+ children: /* @__PURE__ */ jsx52("div", { className: "fd-stack", style: { gap: 14 }, children: NOTIFY.map((n) => /* @__PURE__ */ jsx52(Switch, { checked: !!draft.notify[n.key], onChange: () => setNotify(n.key), label: n.label, description: n.detail }, n.key)) })
6200
6213
  }
6201
6214
  ),
6202
- /* @__PURE__ */ jsxs47(
6215
+ /* @__PURE__ */ jsxs48(
6203
6216
  Card,
6204
6217
  {
6205
- title: /* @__PURE__ */ jsxs47("span", { className: "fd-stack", style: { gap: 2 }, children: [
6206
- /* @__PURE__ */ jsx51("span", { children: "Access" }),
6207
- /* @__PURE__ */ jsx51("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "What your roles grant you" })
6218
+ title: /* @__PURE__ */ jsxs48("span", { className: "fd-stack", style: { gap: 2 }, children: [
6219
+ /* @__PURE__ */ jsx52("span", { children: "Access" }),
6220
+ /* @__PURE__ */ jsx52("span", { className: "fd-body-sm fd-muted", style: { fontWeight: 400 }, children: "What your roles grant you" })
6208
6221
  ] }),
6209
6222
  elevation: "flat",
6210
- action: /* @__PURE__ */ jsx51(
6223
+ action: /* @__PURE__ */ jsx52(
6211
6224
  Button,
6212
6225
  {
6213
6226
  size: "sm",
@@ -6218,39 +6231,39 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6218
6231
  }
6219
6232
  ),
6220
6233
  children: [
6221
- /* @__PURE__ */ jsxs47("div", { className: "fd-stack", style: { gap: 0 }, children: [
6222
- /* @__PURE__ */ jsx51(CardRow, { label: "Roles", children: session.roles.map((r) => r.name).join(", ") || "None" }),
6223
- /* @__PURE__ */ jsxs47(CardRow, { label: "Permissions", children: [
6234
+ /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 0 }, children: [
6235
+ /* @__PURE__ */ jsx52(CardRow, { label: "Roles", children: session.roles.map((r) => r.name).join(", ") || "None" }),
6236
+ /* @__PURE__ */ jsxs48(CardRow, { label: "Permissions", children: [
6224
6237
  session.permissions.length,
6225
6238
  " granted"
6226
6239
  ] }),
6227
- /* @__PURE__ */ jsx51(CardRow, { label: "Member since", children: user.joined || "\u2014" })
6240
+ /* @__PURE__ */ jsx52(CardRow, { label: "Member since", children: user.joined || "\u2014" })
6228
6241
  ] }),
6229
- /* @__PURE__ */ jsx51("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." })
6242
+ /* @__PURE__ */ jsx52("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." })
6230
6243
  ]
6231
6244
  }
6232
6245
  ),
6233
- showSessions ? /* @__PURE__ */ jsx51(
6246
+ showSessions ? /* @__PURE__ */ jsx52(
6234
6247
  Card,
6235
6248
  {
6236
6249
  title: "Signed-in devices",
6237
6250
  elevation: "flat",
6238
- action: /* @__PURE__ */ jsx51(Button, { size: "sm", variant: "ghost", icon: "sign-out", children: "Sign out everywhere" }),
6239
- children: /* @__PURE__ */ jsx51("div", { className: "fd-stack", style: { gap: 0 }, children: liveSessions.map((s) => /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: { gap: 12, padding: "10px 0", borderTop: "1px solid var(--border)", flexWrap: "wrap" }, children: [
6240
- /* @__PURE__ */ jsx51("i", { className: "ph ph-device-mobile", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
6241
- /* @__PURE__ */ jsxs47("span", { className: "fd-stack", style: { gap: 1, flex: 1, minWidth: 160 }, children: [
6242
- /* @__PURE__ */ jsx51("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: s.device }),
6243
- /* @__PURE__ */ jsxs47("span", { className: "fd-body-sm fd-muted", children: [
6251
+ action: /* @__PURE__ */ jsx52(Button, { size: "sm", variant: "ghost", icon: "sign-out", children: "Sign out everywhere" }),
6252
+ children: /* @__PURE__ */ jsx52("div", { className: "fd-stack", style: { gap: 0 }, children: liveSessions.map((s) => /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 12, padding: "10px 0", borderTop: "1px solid var(--border)", flexWrap: "wrap" }, children: [
6253
+ /* @__PURE__ */ jsx52("i", { className: "ph ph-device-mobile", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
6254
+ /* @__PURE__ */ jsxs48("span", { className: "fd-stack", style: { gap: 1, flex: 1, minWidth: 160 }, children: [
6255
+ /* @__PURE__ */ jsx52("span", { className: "fd-body-sm", style: { fontWeight: 600 }, children: s.device }),
6256
+ /* @__PURE__ */ jsxs48("span", { className: "fd-body-sm fd-muted", children: [
6244
6257
  s.where,
6245
6258
  " \xB7 ",
6246
6259
  s.when
6247
6260
  ] })
6248
6261
  ] }),
6249
- s.current ? /* @__PURE__ */ jsx51(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx51(Button, { size: "sm", variant: "ghost", children: "Revoke" })
6262
+ s.current ? /* @__PURE__ */ jsx52(Badge, { tone: "success", dot: true, children: "This device" }) : /* @__PURE__ */ jsx52(Button, { size: "sm", variant: "ghost", children: "Revoke" })
6250
6263
  ] }, s.id)) })
6251
6264
  }
6252
6265
  ) : null,
6253
- /* @__PURE__ */ jsxs47("div", { className: "fd-row", style: {
6266
+ /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: {
6254
6267
  gap: 10,
6255
6268
  flexWrap: "wrap",
6256
6269
  position: "sticky",
@@ -6261,8 +6274,8 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6261
6274
  border: "1px solid var(--border)",
6262
6275
  boxShadow: "0 -4px 16px rgba(11,13,17,.06)"
6263
6276
  }, children: [
6264
- /* @__PURE__ */ jsx51("span", { className: "fd-body-sm", style: { fontWeight: 600, flex: 1 }, children: saved ? "Saved." : dirty ? "Unsaved changes" : "No pending changes" }),
6265
- /* @__PURE__ */ jsx51(
6277
+ /* @__PURE__ */ jsx52("span", { className: "fd-body-sm", style: { fontWeight: 600, flex: 1 }, children: saved ? "Saved." : dirty ? "Unsaved changes" : "No pending changes" }),
6278
+ /* @__PURE__ */ jsx52(
6266
6279
  Button,
6267
6280
  {
6268
6281
  size: "sm",
@@ -6275,7 +6288,7 @@ function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSession
6275
6288
  children: "Discard"
6276
6289
  }
6277
6290
  ),
6278
- /* @__PURE__ */ jsx51(Button, { size: "sm", icon: "check", disabled: !dirty, loading: saving, onClick: save, children: "Save changes" })
6291
+ /* @__PURE__ */ jsx52(Button, { size: "sm", icon: "check", disabled: !dirty, loading: saving, onClick: save, children: "Save changes" })
6279
6292
  ] })
6280
6293
  ] });
6281
6294
  }
@@ -6465,7 +6478,7 @@ var UseRuntimeMode = useRuntimeMode;
6465
6478
  var UseFeatureStatus = useFeatureStatus;
6466
6479
 
6467
6480
  // src/components/platform/RoadmapTimeline.tsx
6468
- import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
6481
+ import { jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
6469
6482
  var STATUS = {
6470
6483
  shipped: { tone: "success", icon: "check-circle", label: "Wired" },
6471
6484
  next: { tone: "warning", icon: "traffic-cone", label: "Not wired" },
@@ -6480,45 +6493,45 @@ function RoadmapCard({ item, byKey, onOpenFlag }) {
6480
6493
  const s = STATUS[item.status] || STATUS.planned;
6481
6494
  const deps = (item.dependsOn || []).map((k) => byKey[k]).filter(Boolean);
6482
6495
  const blocking = deps.filter((d) => !d.implemented);
6483
- return /* @__PURE__ */ jsx52(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 10 }, children: [
6484
- /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
6485
- /* @__PURE__ */ jsx52("span", { className: "fd-body", style: { fontWeight: 700, flex: 1, minWidth: 140 }, children: item.label }),
6486
- /* @__PURE__ */ jsx52(Badge, { tone: "neutral", icon: PROJECT_ICON[item.project] || "squares-four", children: item.project }),
6487
- /* @__PURE__ */ jsx52(Badge, { tone: s.tone, icon: s.icon, children: s.label })
6496
+ return /* @__PURE__ */ jsx53(Card, { elevation: "flat", children: /* @__PURE__ */ jsxs49("div", { className: "fd-stack", style: { gap: 10 }, children: [
6497
+ /* @__PURE__ */ jsxs49("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: [
6498
+ /* @__PURE__ */ jsx53("span", { className: "fd-body", style: { fontWeight: 700, flex: 1, minWidth: 140 }, children: item.label }),
6499
+ /* @__PURE__ */ jsx53(Badge, { tone: "neutral", icon: PROJECT_ICON[item.project] || "squares-four", children: item.project }),
6500
+ /* @__PURE__ */ jsx53(Badge, { tone: s.tone, icon: s.icon, children: s.label })
6488
6501
  ] }),
6489
- /* @__PURE__ */ jsx52("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
6490
- item.backend ? /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start" }, children: [
6491
- /* @__PURE__ */ jsx52("span", { className: "fd-overline fd-muted", style: { width: 62, flex: "none", paddingTop: 2 }, children: "Backend" }),
6492
- /* @__PURE__ */ jsx52("span", { className: "fd-body-sm", style: { flex: 1, textWrap: "pretty" }, children: item.backend })
6502
+ /* @__PURE__ */ jsx53("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: item.description }),
6503
+ item.backend ? /* @__PURE__ */ jsxs49("div", { className: "fd-row", style: { gap: 10, alignItems: "flex-start" }, children: [
6504
+ /* @__PURE__ */ jsx53("span", { className: "fd-overline fd-muted", style: { width: 62, flex: "none", paddingTop: 2 }, children: "Backend" }),
6505
+ /* @__PURE__ */ jsx53("span", { className: "fd-body-sm", style: { flex: 1, textWrap: "pretty" }, children: item.backend })
6493
6506
  ] }) : null,
6494
- /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
6495
- item.effort ? /* @__PURE__ */ jsxs48("span", { className: "fd-body-sm fd-muted", children: [
6496
- /* @__PURE__ */ jsx52("i", { className: "ph ph-hourglass-medium" }),
6507
+ /* @__PURE__ */ jsxs49("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
6508
+ item.effort ? /* @__PURE__ */ jsxs49("span", { className: "fd-body-sm fd-muted", children: [
6509
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-hourglass-medium" }),
6497
6510
  " ",
6498
6511
  item.effort
6499
6512
  ] }) : null,
6500
- /* @__PURE__ */ jsxs48("span", { className: "fd-body-sm fd-muted", children: [
6501
- /* @__PURE__ */ jsx52("i", { className: "ph ph-user" }),
6513
+ /* @__PURE__ */ jsxs49("span", { className: "fd-body-sm fd-muted", children: [
6514
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-user" }),
6502
6515
  " ",
6503
6516
  item.owner
6504
6517
  ] }),
6505
- item.screen ? /* @__PURE__ */ jsx52(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
6506
- /* @__PURE__ */ jsx52("span", { style: { flex: 1 } }),
6507
- /* @__PURE__ */ jsx52(
6518
+ item.screen ? /* @__PURE__ */ jsx53(Badge, { tone: "neutral", icon: "browser", children: "screen" }) : null,
6519
+ /* @__PURE__ */ jsx53("span", { style: { flex: 1 } }),
6520
+ /* @__PURE__ */ jsx53(
6508
6521
  "button",
6509
6522
  {
6510
6523
  type: "button",
6511
6524
  onClick: () => onOpenFlag && onOpenFlag(item.key),
6512
6525
  style: { all: "unset", cursor: "pointer", display: "inline-flex", alignItems: "center", gap: 5 },
6513
- children: /* @__PURE__ */ jsx52("code", { className: "fd-mono", style: { fontSize: 11, color: "var(--brand)" }, children: item.key })
6526
+ children: /* @__PURE__ */ jsx53("code", { className: "fd-mono", style: { fontSize: 11, color: "var(--brand)" }, children: item.key })
6514
6527
  }
6515
6528
  )
6516
6529
  ] }),
6517
- deps.length ? /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 6, borderTop: "1px solid var(--border)" }, children: [
6518
- /* @__PURE__ */ jsx52("span", { className: "fd-overline fd-muted", style: { paddingTop: 3 }, children: "After" }),
6519
- deps.map((d) => /* @__PURE__ */ jsx52(Tag, { icon: d.implemented ? "check" : "clock", children: d.label }, d.key))
6530
+ deps.length ? /* @__PURE__ */ jsxs49("div", { className: "fd-row", style: { gap: 6, flexWrap: "wrap", paddingTop: 6, borderTop: "1px solid var(--border)" }, children: [
6531
+ /* @__PURE__ */ jsx53("span", { className: "fd-overline fd-muted", style: { paddingTop: 3 }, children: "After" }),
6532
+ deps.map((d) => /* @__PURE__ */ jsx53(Tag, { icon: d.implemented ? "check" : "clock", children: d.label }, d.key))
6520
6533
  ] }) : null,
6521
- blocking.length && !item.implemented ? /* @__PURE__ */ jsxs48("span", { className: "fd-body-sm", style: { color: "var(--warn-text)" }, children: [
6534
+ blocking.length && !item.implemented ? /* @__PURE__ */ jsxs49("span", { className: "fd-body-sm", style: { color: "var(--warn-text)" }, children: [
6522
6535
  "Blocked until ",
6523
6536
  blocking.map((d) => d.label).join(" and "),
6524
6537
  " ",
@@ -6571,23 +6584,23 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
6571
6584
  }, 0);
6572
6585
  const nextPhase = items.find((i) => !i.implemented);
6573
6586
  let lastPhase = null;
6574
- return /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 16, maxWidth: 1e3 }, children: [
6575
- /* @__PURE__ */ jsxs48("div", { className: "fd-stack", style: { gap: 10 }, children: [
6576
- /* @__PURE__ */ jsx52("span", { className: "fd-overline fd-muted", children: "Architecture" }),
6577
- /* @__PURE__ */ jsx52("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
6578
- /* @__PURE__ */ jsx52("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." })
6587
+ return /* @__PURE__ */ jsxs49("div", { className: "fd-stack", style: { gap: 16, maxWidth: 1e3 }, children: [
6588
+ /* @__PURE__ */ jsxs49("div", { className: "fd-stack", style: { gap: 10 }, children: [
6589
+ /* @__PURE__ */ jsx53("span", { className: "fd-overline fd-muted", children: "Architecture" }),
6590
+ /* @__PURE__ */ jsx53("h1", { className: "fd-h1", style: { margin: 0 }, children: title }),
6591
+ /* @__PURE__ */ jsx53("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." })
6579
6592
  ] }),
6580
- /* @__PURE__ */ jsxs48("div", { className: "fd-grid-stats is-thin", children: [
6581
- /* @__PURE__ */ jsx52(StatTile, { compact: true, label: "Wired", value: String(rm.shipped), sub: "of " + rm.items.length + " features" }),
6582
- /* @__PURE__ */ jsx52(StatTile, { compact: true, label: "Remaining", value: String(rm.remaining), sub: "backend work" }),
6583
- /* @__PURE__ */ jsx52(StatTile, { compact: true, label: "Est. effort", value: days ? days + " days" : "\u2014", sub: "sum of estimates, not calendar" }),
6584
- /* @__PURE__ */ jsx52(StatTile, { compact: true, label: "Up next", value: nextPhase ? "Phase " + nextPhase.phase : "\u2014", sub: nextPhase ? nextPhase.phaseName : "all wired" })
6593
+ /* @__PURE__ */ jsxs49("div", { className: "fd-grid-stats is-thin", children: [
6594
+ /* @__PURE__ */ jsx53(StatTile, { compact: true, label: "Wired", value: String(rm.shipped), sub: "of " + rm.items.length + " features" }),
6595
+ /* @__PURE__ */ jsx53(StatTile, { compact: true, label: "Remaining", value: String(rm.remaining), sub: "backend work" }),
6596
+ /* @__PURE__ */ jsx53(StatTile, { compact: true, label: "Est. effort", value: days ? days + " days" : "\u2014", sub: "sum of estimates, not calendar" }),
6597
+ /* @__PURE__ */ jsx53(StatTile, { compact: true, label: "Up next", value: nextPhase ? "Phase " + nextPhase.phase : "\u2014", sub: nextPhase ? nextPhase.phaseName : "all wired" })
6585
6598
  ] }),
6586
- /* @__PURE__ */ jsxs48("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
6587
- /* @__PURE__ */ jsx52(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 } }),
6588
- /* @__PURE__ */ jsx52(Select, { placeholder: "All projects", value: project, onChange: (e) => setProject(e.target.value), options: projects, style: { width: 190 } }),
6589
- /* @__PURE__ */ jsx52("span", { style: { flex: 1 } }),
6590
- /* @__PURE__ */ jsx52(
6599
+ /* @__PURE__ */ jsxs49("div", { className: "fd-row", style: { gap: 10, flexWrap: "wrap" }, children: [
6600
+ /* @__PURE__ */ jsx53(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 } }),
6601
+ /* @__PURE__ */ jsx53(Select, { placeholder: "All projects", value: project, onChange: (e) => setProject(e.target.value), options: projects, style: { width: 190 } }),
6602
+ /* @__PURE__ */ jsx53("span", { style: { flex: 1 } }),
6603
+ /* @__PURE__ */ jsx53(
6591
6604
  Button,
6592
6605
  {
6593
6606
  size: "sm",
@@ -6601,7 +6614,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
6601
6614
  }
6602
6615
  )
6603
6616
  ] }),
6604
- /* @__PURE__ */ jsx52(
6617
+ /* @__PURE__ */ jsx53(
6605
6618
  Flag,
6606
6619
  {
6607
6620
  tone: "info",
@@ -6610,51 +6623,51 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
6610
6623
  actions: null
6611
6624
  }
6612
6625
  ),
6613
- /* @__PURE__ */ jsx52("div", { className: "fd-rm", children: /* @__PURE__ */ jsx52("div", { className: "fd-rm-scroll", ref: scrollRef, children: /* @__PURE__ */ jsxs48("div", { className: "fd-rm-track", children: [
6614
- /* @__PURE__ */ jsx52("span", { className: "fd-rm-spine", children: /* @__PURE__ */ jsx52("span", { className: "fd-rm-spine-done", style: { height: items.length ? 100 * shippedShown / items.length + "%" : "0%" } }) }),
6626
+ /* @__PURE__ */ jsx53("div", { className: "fd-rm", children: /* @__PURE__ */ jsx53("div", { className: "fd-rm-scroll", ref: scrollRef, children: /* @__PURE__ */ jsxs49("div", { className: "fd-rm-track", children: [
6627
+ /* @__PURE__ */ jsx53("span", { className: "fd-rm-spine", children: /* @__PURE__ */ jsx53("span", { className: "fd-rm-spine-done", style: { height: items.length ? 100 * shippedShown / items.length + "%" : "0%" } }) }),
6615
6628
  items.map((item, n) => {
6616
6629
  const showPhase = item.phase !== lastPhase;
6617
6630
  lastPhase = item.phase;
6618
6631
  const inPhase = items.filter((i) => i.phase === item.phase).length;
6619
6632
  const isBoundary = n === firstPending;
6620
- return /* @__PURE__ */ jsxs48(React28.Fragment, { children: [
6621
- showPhase ? /* @__PURE__ */ jsxs48("div", { className: "fd-rm-era", children: [
6622
- /* @__PURE__ */ jsxs48("span", { className: "fd-row", style: { gap: 8, flexWrap: "wrap", alignItems: "baseline" }, children: [
6623
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 700 }, children: item.phase === 0 ? "Shipped" : "Phase " + item.phase + " \u2014 " + item.phaseName }),
6624
- item.phase === 0 ? null : /* @__PURE__ */ jsxs48("span", { className: "fd-mono", style: { opacity: 0.7, fontWeight: 400 }, children: [
6633
+ return /* @__PURE__ */ jsxs49(React28.Fragment, { children: [
6634
+ showPhase ? /* @__PURE__ */ jsxs49("div", { className: "fd-rm-era", children: [
6635
+ /* @__PURE__ */ jsxs49("span", { className: "fd-row", style: { gap: 8, flexWrap: "wrap", alignItems: "baseline" }, children: [
6636
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 700 }, children: item.phase === 0 ? "Shipped" : "Phase " + item.phase + " \u2014 " + item.phaseName }),
6637
+ item.phase === 0 ? null : /* @__PURE__ */ jsxs49("span", { className: "fd-mono", style: { opacity: 0.7, fontWeight: 400 }, children: [
6625
6638
  fmtDate(item.phaseStart),
6626
6639
  " \u2013 ",
6627
6640
  fmtDate(item.date)
6628
6641
  ] }),
6629
- /* @__PURE__ */ jsxs48("span", { style: { opacity: 0.7, fontWeight: 400 }, children: [
6642
+ /* @__PURE__ */ jsxs49("span", { style: { opacity: 0.7, fontWeight: 400 }, children: [
6630
6643
  "\xB7 ",
6631
6644
  inPhase,
6632
6645
  " feature",
6633
6646
  inPhase === 1 ? "" : "s"
6634
6647
  ] })
6635
6648
  ] }),
6636
- item.phaseWhy ? /* @__PURE__ */ jsx52("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
6649
+ item.phaseWhy ? /* @__PURE__ */ jsx53("p", { className: "fd-rm-era-why", children: item.phaseWhy }) : null
6637
6650
  ] }) : null,
6638
- isBoundary ? /* @__PURE__ */ jsx52("div", { className: "fd-rm-now", ref: nowRef, children: /* @__PURE__ */ jsxs48("span", { className: "fd-rm-now-pill", children: [
6639
- /* @__PURE__ */ jsx52("i", { className: "ph ph-map-pin" }),
6651
+ isBoundary ? /* @__PURE__ */ jsx53("div", { className: "fd-rm-now", ref: nowRef, children: /* @__PURE__ */ jsxs49("span", { className: "fd-rm-now-pill", children: [
6652
+ /* @__PURE__ */ jsx53("i", { className: "ph ph-map-pin" }),
6640
6653
  " You are here \u2014 everything above is wired"
6641
6654
  ] }) }) : null,
6642
- /* @__PURE__ */ jsxs48("div", { className: "fd-rm-row", children: [
6643
- /* @__PURE__ */ jsx52("span", { className: "fd-rm-dot " + (item.implemented ? "is-shipped" : item.status === "next" ? "is-next" : "") }),
6644
- /* @__PURE__ */ jsxs48("div", { className: "fd-rm-date", children: [
6655
+ /* @__PURE__ */ jsxs49("div", { className: "fd-rm-row", children: [
6656
+ /* @__PURE__ */ jsx53("span", { className: "fd-rm-dot " + (item.implemented ? "is-shipped" : item.status === "next" ? "is-next" : "") }),
6657
+ /* @__PURE__ */ jsxs49("div", { className: "fd-rm-date", children: [
6645
6658
  fmtDate(item.date),
6646
- /* @__PURE__ */ jsx52("br", {}),
6647
- /* @__PURE__ */ jsx52("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
6659
+ /* @__PURE__ */ jsx53("br", {}),
6660
+ /* @__PURE__ */ jsx53("span", { style: { opacity: 0.75 }, children: item.implemented ? "shipped" : "phase " + item.phase })
6648
6661
  ] }),
6649
- /* @__PURE__ */ jsx52(RoadmapCard, { item, byKey, onOpenFlag })
6662
+ /* @__PURE__ */ jsx53(RoadmapCard, { item, byKey, onOpenFlag })
6650
6663
  ] })
6651
6664
  ] }, item.key);
6652
6665
  }),
6653
- !items.length ? /* @__PURE__ */ jsx52("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
6666
+ !items.length ? /* @__PURE__ */ jsx53("p", { className: "fd-body-sm fd-muted", children: "Nothing matches that filter." }) : null
6654
6667
  ] }) }) }),
6655
- /* @__PURE__ */ jsxs48("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: [
6668
+ /* @__PURE__ */ jsxs49("p", { className: "fd-body-sm fd-muted", style: { margin: 0 }, children: [
6656
6669
  "Derived from the feature-flag registry \u2014 each entry's status is its flag's ",
6657
- /* @__PURE__ */ jsx52("code", { className: "fd-mono", children: "implemented" }),
6670
+ /* @__PURE__ */ jsx53("code", { className: "fd-mono", children: "implemented" }),
6658
6671
  " field, so this page cannot drift from what the apps actually do."
6659
6672
  ] })
6660
6673
  ] });
@@ -6663,7 +6676,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
6663
6676
  // src/components/platform/ComingSoon.tsx
6664
6677
  import * as React29 from "react";
6665
6678
  import { createPortal as createPortal7 } from "react-dom";
6666
- import { Fragment as Fragment13, jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
6679
+ import { Fragment as Fragment13, jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
6667
6680
  var BYPASS_STORE = "fd.soon.bypass.v1";
6668
6681
  function readBypassed() {
6669
6682
  try {
@@ -6693,35 +6706,35 @@ function useBypass(key) {
6693
6706
  return [on, set];
6694
6707
  }
6695
6708
  function SoonCard({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass }) {
6696
- return /* @__PURE__ */ jsxs49(Fragment13, { children: [
6697
- /* @__PURE__ */ jsxs49("span", { className: "fd-soon-badge", children: [
6698
- /* @__PURE__ */ jsx53("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
6709
+ return /* @__PURE__ */ jsxs50(Fragment13, { children: [
6710
+ /* @__PURE__ */ jsxs50("span", { className: "fd-soon-badge", children: [
6711
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
6699
6712
  label
6700
6713
  ] }),
6701
- detail ? /* @__PURE__ */ jsx53("span", { className: "fd-soon-detail", children: detail }) : null,
6702
- backend ? /* @__PURE__ */ jsxs49("span", { className: "fd-soon-backend", children: [
6703
- /* @__PURE__ */ jsx53("span", { className: "fd-overline", children: "Needs" }),
6714
+ detail ? /* @__PURE__ */ jsx54("span", { className: "fd-soon-detail", children: detail }) : null,
6715
+ backend ? /* @__PURE__ */ jsxs50("span", { className: "fd-soon-backend", children: [
6716
+ /* @__PURE__ */ jsx54("span", { className: "fd-overline", children: "Needs" }),
6704
6717
  " ",
6705
6718
  backend
6706
6719
  ] }) : null,
6707
- eta || effort || onRoadmap ? /* @__PURE__ */ jsxs49("span", { className: "fd-soon-meta", children: [
6708
- eta ? /* @__PURE__ */ jsxs49("span", { children: [
6709
- /* @__PURE__ */ jsx53("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
6720
+ eta || effort || onRoadmap ? /* @__PURE__ */ jsxs50("span", { className: "fd-soon-meta", children: [
6721
+ eta ? /* @__PURE__ */ jsxs50("span", { children: [
6722
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-calendar-blank", "aria-hidden": "true" }),
6710
6723
  " ",
6711
6724
  eta
6712
6725
  ] }) : null,
6713
- effort ? /* @__PURE__ */ jsxs49("span", { children: [
6714
- /* @__PURE__ */ jsx53("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
6726
+ effort ? /* @__PURE__ */ jsxs50("span", { children: [
6727
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-hourglass-medium", "aria-hidden": "true" }),
6715
6728
  " ",
6716
6729
  effort
6717
6730
  ] }) : null,
6718
- onRoadmap ? /* @__PURE__ */ jsxs49("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
6731
+ onRoadmap ? /* @__PURE__ */ jsxs50("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
6719
6732
  "See the roadmap ",
6720
- /* @__PURE__ */ jsx53("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
6733
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
6721
6734
  ] }) : null
6722
6735
  ] }) : null,
6723
- allowed ? /* @__PURE__ */ jsxs49("button", { type: "button", className: "fd-soon-view", onClick: onBypass, children: [
6724
- /* @__PURE__ */ jsx53("i", { className: "ph ph-eye", "aria-hidden": "true" }),
6736
+ allowed ? /* @__PURE__ */ jsxs50("button", { type: "button", className: "fd-soon-view", onClick: onBypass, children: [
6737
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-eye", "aria-hidden": "true" }),
6725
6738
  " View and use it anyway"
6726
6739
  ] }) : null
6727
6740
  ] });
@@ -6781,9 +6794,9 @@ function ComingSoon({
6781
6794
  const tip = [label, detail, backend ? "Needs " + backend : null, eta ? "ETA " + eta : null, effort].filter(Boolean).join(" \xB7 ");
6782
6795
  if (inline) {
6783
6796
  if (allowed && bypassed) {
6784
- return /* @__PURE__ */ jsxs49("span", { className: ["fd-soon-inline-on", className].filter(Boolean).join(" "), ...rest, children: [
6797
+ return /* @__PURE__ */ jsxs50("span", { className: ["fd-soon-inline-on", className].filter(Boolean).join(" "), ...rest, children: [
6785
6798
  children,
6786
- /* @__PURE__ */ jsx53(
6799
+ /* @__PURE__ */ jsx54(
6787
6800
  "button",
6788
6801
  {
6789
6802
  type: "button",
@@ -6791,12 +6804,12 @@ function ComingSoon({
6791
6804
  title: "Unwired \u2014 writes go to the simulated backend. " + tip + " Click to re-blur.",
6792
6805
  onClick: () => setBypassed(false),
6793
6806
  "aria-label": "Re-blur this unwired feature",
6794
- children: /* @__PURE__ */ jsx53("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
6807
+ children: /* @__PURE__ */ jsx54("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
6795
6808
  }
6796
6809
  )
6797
6810
  ] });
6798
6811
  }
6799
- return /* @__PURE__ */ jsx53(
6812
+ return /* @__PURE__ */ jsx54(
6800
6813
  InlineSoon,
6801
6814
  {
6802
6815
  label,
@@ -6816,20 +6829,20 @@ function ComingSoon({
6816
6829
  );
6817
6830
  }
6818
6831
  if (allowed && bypassed) {
6819
- return /* @__PURE__ */ jsxs49("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, ...rest, children: [
6820
- /* @__PURE__ */ jsxs49("div", { className: "fd-soon-bar", role: "status", children: [
6821
- /* @__PURE__ */ jsxs49("span", { className: "fd-soon-badge", children: [
6822
- /* @__PURE__ */ jsx53("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
6832
+ return /* @__PURE__ */ jsxs50("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, ...rest, children: [
6833
+ /* @__PURE__ */ jsxs50("div", { className: "fd-soon-bar", role: "status", children: [
6834
+ /* @__PURE__ */ jsxs50("span", { className: "fd-soon-badge", children: [
6835
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" }),
6823
6836
  "Unwired feature \u2014 you are using it anyway"
6824
6837
  ] }),
6825
- /* @__PURE__ */ jsx53("span", { className: "fd-soon-bar-detail", children: "Every action here writes to the simulated backend, so nothing you do persists beyond this session." }),
6826
- /* @__PURE__ */ jsxs49("span", { className: "fd-soon-bar-actions", children: [
6827
- onRoadmap ? /* @__PURE__ */ jsxs49("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
6838
+ /* @__PURE__ */ jsx54("span", { className: "fd-soon-bar-detail", children: "Every action here writes to the simulated backend, so nothing you do persists beyond this session." }),
6839
+ /* @__PURE__ */ jsxs50("span", { className: "fd-soon-bar-actions", children: [
6840
+ onRoadmap ? /* @__PURE__ */ jsxs50("button", { type: "button", className: "fd-soon-link", onClick: onRoadmap, children: [
6828
6841
  "Roadmap ",
6829
- /* @__PURE__ */ jsx53("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
6842
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
6830
6843
  ] }) : null,
6831
- /* @__PURE__ */ jsxs49("button", { type: "button", className: "fd-soon-link", onClick: () => setBypassed(false), children: [
6832
- /* @__PURE__ */ jsx53("i", { className: "ph ph-eye-slash", "aria-hidden": "true" }),
6844
+ /* @__PURE__ */ jsxs50("button", { type: "button", className: "fd-soon-link", onClick: () => setBypassed(false), children: [
6845
+ /* @__PURE__ */ jsx54("i", { className: "ph ph-eye-slash", "aria-hidden": "true" }),
6833
6846
  " Re-blur"
6834
6847
  ] })
6835
6848
  ] })
@@ -6837,10 +6850,10 @@ function ComingSoon({
6837
6850
  children
6838
6851
  ] });
6839
6852
  }
6840
- return /* @__PURE__ */ jsxs49("div", { className: ["fd-soon", className].filter(Boolean).join(" "), style: minHeight ? { minHeight } : void 0, ...rest, children: [
6841
- /* @__PURE__ */ jsx53("div", { className: "fd-soon-under", style: { filter: "blur(" + blur + "px) saturate(.62)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
6842
- /* @__PURE__ */ jsx53("div", { className: "fd-soon-veil" }),
6843
- /* @__PURE__ */ jsx53("div", { className: "fd-soon-note", role: "note", children: /* @__PURE__ */ jsx53(
6853
+ return /* @__PURE__ */ jsxs50("div", { className: ["fd-soon", className].filter(Boolean).join(" "), style: minHeight ? { minHeight } : void 0, ...rest, children: [
6854
+ /* @__PURE__ */ jsx54("div", { className: "fd-soon-under", style: { filter: "blur(" + blur + "px) saturate(.62)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
6855
+ /* @__PURE__ */ jsx54("div", { className: "fd-soon-veil" }),
6856
+ /* @__PURE__ */ jsx54("div", { className: "fd-soon-note", role: "note", children: /* @__PURE__ */ jsx54(
6844
6857
  SoonCard,
6845
6858
  {
6846
6859
  label,
@@ -6877,7 +6890,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
6877
6890
  React29.useEffect(() => () => {
6878
6891
  if (close.current) clearTimeout(close.current);
6879
6892
  }, []);
6880
- return /* @__PURE__ */ jsxs49(
6893
+ return /* @__PURE__ */ jsxs50(
6881
6894
  "span",
6882
6895
  {
6883
6896
  ref: anchor,
@@ -6888,8 +6901,8 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
6888
6901
  onBlur: hide,
6889
6902
  ...rest,
6890
6903
  children: [
6891
- /* @__PURE__ */ jsx53("span", { className: "fd-soon-under", style: { filter: "blur(" + Math.min(blur, 1.1) + "px) saturate(.66)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
6892
- /* @__PURE__ */ jsx53(
6904
+ /* @__PURE__ */ jsx54("span", { className: "fd-soon-under", style: { filter: "blur(" + Math.min(blur, 1.1) + "px) saturate(.66)" }, ...{ inert: "" }, "aria-hidden": "true", children }),
6905
+ /* @__PURE__ */ jsx54(
6893
6906
  "button",
6894
6907
  {
6895
6908
  type: "button",
@@ -6900,11 +6913,11 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
6900
6913
  onFocus: show,
6901
6914
  onBlur: hide,
6902
6915
  onClick: () => open ? setOpen(false) : show(),
6903
- children: /* @__PURE__ */ jsx53("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
6916
+ children: /* @__PURE__ */ jsx54("i", { className: "ph ph-traffic-cone", "aria-hidden": "true" })
6904
6917
  }
6905
6918
  ),
6906
6919
  open && pos ? createPortal7(
6907
- /* @__PURE__ */ jsx53(
6920
+ /* @__PURE__ */ jsx54(
6908
6921
  "div",
6909
6922
  {
6910
6923
  className: "fd-soon-note fd-soon-hovercard",
@@ -6912,7 +6925,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
6912
6925
  style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width },
6913
6926
  onMouseEnter: show,
6914
6927
  onMouseLeave: hide,
6915
- children: /* @__PURE__ */ jsx53(
6928
+ children: /* @__PURE__ */ jsx54(
6916
6929
  SoonCard,
6917
6930
  {
6918
6931
  label,
@@ -6942,10 +6955,10 @@ function formatEta(iso2) {
6942
6955
  var FormatEta = formatEta;
6943
6956
 
6944
6957
  // src/components/platform/Gate.tsx
6945
- import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
6958
+ import { jsx as jsx55, jsxs as jsxs51 } from "react/jsx-runtime";
6946
6959
  function PermissionDenied({ permission, title, detail, compact: compact3 = false, className = "", ...rest }) {
6947
6960
  const need = Array.isArray(permission) ? permission : [permission].filter(Boolean);
6948
- return /* @__PURE__ */ jsxs50(
6961
+ return /* @__PURE__ */ jsxs51(
6949
6962
  "div",
6950
6963
  {
6951
6964
  className: ["fd-stack", className].filter(Boolean).join(" "),
@@ -6961,14 +6974,14 @@ function PermissionDenied({ permission, title, detail, compact: compact3 = false
6961
6974
  },
6962
6975
  ...rest,
6963
6976
  children: [
6964
- /* @__PURE__ */ jsxs50("span", { className: "fd-row", style: { gap: 8 }, children: [
6965
- /* @__PURE__ */ jsx54("i", { className: "ph ph-lock-simple", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
6966
- /* @__PURE__ */ jsx54("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: title || "You do not have access to this" })
6977
+ /* @__PURE__ */ jsxs51("span", { className: "fd-row", style: { gap: 8 }, children: [
6978
+ /* @__PURE__ */ jsx55("i", { className: "ph ph-lock-simple", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
6979
+ /* @__PURE__ */ jsx55("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: title || "You do not have access to this" })
6967
6980
  ] }),
6968
- /* @__PURE__ */ jsx54("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." }),
6969
- need.length ? /* @__PURE__ */ jsxs50("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: [
6970
- /* @__PURE__ */ jsx54("span", { className: "fd-overline fd-muted", children: "Requires" }),
6971
- need.map((p) => /* @__PURE__ */ jsx54("code", { className: "fd-mono", style: {
6981
+ /* @__PURE__ */ jsx55("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." }),
6982
+ need.length ? /* @__PURE__ */ jsxs51("span", { className: "fd-row", style: { gap: 6, flexWrap: "wrap" }, children: [
6983
+ /* @__PURE__ */ jsx55("span", { className: "fd-overline fd-muted", children: "Requires" }),
6984
+ need.map((p) => /* @__PURE__ */ jsx55("code", { className: "fd-mono", style: {
6972
6985
  fontSize: 11.5,
6973
6986
  padding: "2px 7px",
6974
6987
  borderRadius: 5,
@@ -6989,7 +7002,7 @@ function Gate({ perm, anyOf, role, silent = false, fallback, compact: compact3 =
6989
7002
  if (ok) return children;
6990
7003
  if (fallback !== void 0) return fallback;
6991
7004
  if (silent) return null;
6992
- return /* @__PURE__ */ jsx54(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
7005
+ return /* @__PURE__ */ jsx55(PermissionDenied, { permission: perm || anyOf, compact: compact3 });
6993
7006
  }
6994
7007
  function FeatureGate({
6995
7008
  flag,
@@ -7010,7 +7023,7 @@ function FeatureGate({
7010
7023
  if (!preview) return fallback;
7011
7024
  const f = SessionKit.findFlag(flag) || {};
7012
7025
  const missing = rt.missing || [];
7013
- return /* @__PURE__ */ jsx54(
7026
+ return /* @__PURE__ */ jsx55(
7014
7027
  ComingSoon,
7015
7028
  {
7016
7029
  label: label || (variant === "inline" ? f.label || "Not wired yet" : "Designed \u2014 backend not wired yet"),
@@ -7031,20 +7044,20 @@ function FeatureGate({
7031
7044
  function PermissionHint({ perm, children }) {
7032
7045
  SessionKit.useSession();
7033
7046
  if (SessionKit.can(perm)) return children;
7034
- return /* @__PURE__ */ jsx54(
7047
+ return /* @__PURE__ */ jsx55(
7035
7048
  "span",
7036
7049
  {
7037
7050
  title: "Requires " + (Array.isArray(perm) ? perm.join(", ") : perm),
7038
7051
  style: { display: "inline-flex", opacity: 0.45, cursor: "not-allowed" },
7039
7052
  "aria-disabled": "true",
7040
- children: /* @__PURE__ */ jsx54("span", { style: { pointerEvents: "none" }, children })
7053
+ children: /* @__PURE__ */ jsx55("span", { style: { pointerEvents: "none" }, children })
7041
7054
  }
7042
7055
  );
7043
7056
  }
7044
7057
 
7045
7058
  // src/components/platform/ModeSwitch.tsx
7046
7059
  import * as React30 from "react";
7047
- import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs51 } from "react/jsx-runtime";
7060
+ import { Fragment as Fragment14, jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
7048
7061
  function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
7049
7062
  const mode2 = useRuntimeMode();
7050
7063
  const [open, setOpen] = React30.useState(false);
@@ -7071,8 +7084,8 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
7071
7084
  RuntimeKit.setMode(next);
7072
7085
  setOpen(false);
7073
7086
  };
7074
- return /* @__PURE__ */ jsxs51("span", { style: { position: "relative", display: "inline-flex" }, ref, children: [
7075
- /* @__PURE__ */ jsxs51(
7087
+ return /* @__PURE__ */ jsxs52("span", { style: { position: "relative", display: "inline-flex" }, ref, children: [
7088
+ /* @__PURE__ */ jsxs52(
7076
7089
  "button",
7077
7090
  {
7078
7091
  type: "button",
@@ -7082,29 +7095,29 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
7082
7095
  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.",
7083
7096
  className: "fd-mode-btn" + (test ? " is-test" : "") + (open ? " is-open" : ""),
7084
7097
  children: [
7085
- /* @__PURE__ */ jsx55("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), style: { fontSize: 17 } }),
7086
- test && requestCount ? /* @__PURE__ */ jsx55("span", { className: "fd-mono fd-mode-count", children: requestCount > 99 ? "99+" : requestCount }, requestCount) : null
7098
+ /* @__PURE__ */ jsx56("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), style: { fontSize: 17 } }),
7099
+ test && requestCount ? /* @__PURE__ */ jsx56("span", { className: "fd-mono fd-mode-count", children: requestCount > 99 ? "99+" : requestCount }, requestCount) : null
7087
7100
  ]
7088
7101
  }
7089
7102
  ),
7090
- open ? /* @__PURE__ */ jsxs51("span", { className: "fd-view-enter fd-mode-pop", children: [
7091
- /* @__PURE__ */ jsxs51("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
7092
- /* @__PURE__ */ jsxs51("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
7093
- /* @__PURE__ */ jsx55("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
7103
+ open ? /* @__PURE__ */ jsxs52("span", { className: "fd-view-enter fd-mode-pop", children: [
7104
+ /* @__PURE__ */ jsxs52("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
7105
+ /* @__PURE__ */ jsxs52("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
7106
+ /* @__PURE__ */ jsx56("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
7094
7107
  test ? "Test mode" : "Live mode"
7095
7108
  ] }),
7096
- test ? /* @__PURE__ */ jsxs51("span", { className: "fd-body-sm fd-muted fd-mono", children: [
7109
+ test ? /* @__PURE__ */ jsxs52("span", { className: "fd-body-sm fd-muted fd-mono", children: [
7097
7110
  requestCount,
7098
7111
  " simulated request",
7099
7112
  requestCount === 1 ? "" : "s"
7100
7113
  ] }) : null,
7101
- /* @__PURE__ */ jsx55("span", { style: { flex: 1 } }),
7102
- test && onClearLog ? /* @__PURE__ */ jsx55("button", { type: "button", className: "fd-soon-link", onClick: onClearLog, children: "Clear" }) : null
7114
+ /* @__PURE__ */ jsx56("span", { style: { flex: 1 } }),
7115
+ test && onClearLog ? /* @__PURE__ */ jsx56("button", { type: "button", className: "fd-soon-link", onClick: onClearLog, children: "Clear" }) : null
7103
7116
  ] }),
7104
- /* @__PURE__ */ jsxs51("span", { style: { display: "block", padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
7105
- /* @__PURE__ */ jsx55("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." }),
7106
- /* @__PURE__ */ jsxs51("span", { className: "fd-row", style: { gap: 8, marginTop: 10, flexWrap: "wrap" }, children: [
7107
- /* @__PURE__ */ jsxs51("span", { className: "fd-body-sm fd-muted fd-mono", children: [
7117
+ /* @__PURE__ */ jsxs52("span", { style: { display: "block", padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
7118
+ /* @__PURE__ */ jsx56("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." }),
7119
+ /* @__PURE__ */ jsxs52("span", { className: "fd-row", style: { gap: 8, marginTop: 10, flexWrap: "wrap" }, children: [
7120
+ /* @__PURE__ */ jsxs52("span", { className: "fd-body-sm fd-muted fd-mono", children: [
7108
7121
  s.endpointsWired,
7109
7122
  " endpoint",
7110
7123
  s.endpointsWired === 1 ? "" : "s",
@@ -7114,58 +7127,58 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
7114
7127
  s.total,
7115
7128
  " features complete"
7116
7129
  ] }),
7117
- onOpenSpec ? /* @__PURE__ */ jsxs51(Fragment14, { children: [
7118
- /* @__PURE__ */ jsx55("span", { style: { flex: 1 } }),
7119
- /* @__PURE__ */ jsxs51("button", { type: "button", className: "fd-soon-link", onClick: () => {
7130
+ onOpenSpec ? /* @__PURE__ */ jsxs52(Fragment14, { children: [
7131
+ /* @__PURE__ */ jsx56("span", { style: { flex: 1 } }),
7132
+ /* @__PURE__ */ jsxs52("button", { type: "button", className: "fd-soon-link", onClick: () => {
7120
7133
  setOpen(false);
7121
7134
  onOpenSpec();
7122
7135
  }, children: [
7123
7136
  "API spec ",
7124
- /* @__PURE__ */ jsx55("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
7137
+ /* @__PURE__ */ jsx56("i", { className: "ph ph-arrow-right", "aria-hidden": "true" })
7125
7138
  ] })
7126
7139
  ] }) : null
7127
7140
  ] })
7128
7141
  ] }),
7129
- /* @__PURE__ */ jsxs51("span", { className: "fd-mode-choice", children: [
7130
- /* @__PURE__ */ jsxs51("button", { type: "button", className: "fd-mode-opt" + (!test ? " is-on" : ""), onClick: () => go("live"), children: [
7131
- /* @__PURE__ */ jsx55("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
7132
- /* @__PURE__ */ jsxs51("span", { className: "fd-mode-opt-text", children: [
7133
- /* @__PURE__ */ jsx55("span", { className: "fd-mode-opt-title", children: "Live mode" }),
7134
- /* @__PURE__ */ jsx55("span", { className: "fd-mode-opt-desc", children: "Incomplete features under construction" })
7142
+ /* @__PURE__ */ jsxs52("span", { className: "fd-mode-choice", children: [
7143
+ /* @__PURE__ */ jsxs52("button", { type: "button", className: "fd-mode-opt" + (!test ? " is-on" : ""), onClick: () => go("live"), children: [
7144
+ /* @__PURE__ */ jsx56("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
7145
+ /* @__PURE__ */ jsxs52("span", { className: "fd-mode-opt-text", children: [
7146
+ /* @__PURE__ */ jsx56("span", { className: "fd-mode-opt-title", children: "Live mode" }),
7147
+ /* @__PURE__ */ jsx56("span", { className: "fd-mode-opt-desc", children: "Incomplete features under construction" })
7135
7148
  ] }),
7136
- !test ? /* @__PURE__ */ jsx55("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
7149
+ !test ? /* @__PURE__ */ jsx56("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
7137
7150
  ] }),
7138
- /* @__PURE__ */ jsxs51("button", { type: "button", className: "fd-mode-opt" + (test ? " is-on" : ""), onClick: () => go("test"), children: [
7139
- /* @__PURE__ */ jsx55("i", { className: "ph ph-flask", "aria-hidden": "true" }),
7140
- /* @__PURE__ */ jsxs51("span", { className: "fd-mode-opt-text", children: [
7141
- /* @__PURE__ */ jsx55("span", { className: "fd-mode-opt-title", children: "Test mode" }),
7142
- /* @__PURE__ */ jsx55("span", { className: "fd-mode-opt-desc", children: "Everything usable, all data simulated" })
7151
+ /* @__PURE__ */ jsxs52("button", { type: "button", className: "fd-mode-opt" + (test ? " is-on" : ""), onClick: () => go("test"), children: [
7152
+ /* @__PURE__ */ jsx56("i", { className: "ph ph-flask", "aria-hidden": "true" }),
7153
+ /* @__PURE__ */ jsxs52("span", { className: "fd-mode-opt-text", children: [
7154
+ /* @__PURE__ */ jsx56("span", { className: "fd-mode-opt-title", children: "Test mode" }),
7155
+ /* @__PURE__ */ jsx56("span", { className: "fd-mode-opt-desc", children: "Everything usable, all data simulated" })
7143
7156
  ] }),
7144
- test ? /* @__PURE__ */ jsx55("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
7157
+ test ? /* @__PURE__ */ jsx56("i", { className: "ph ph-check", "aria-hidden": "true" }) : null
7145
7158
  ] })
7146
7159
  ] }),
7147
- test && renderLog ? /* @__PURE__ */ jsx55("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
7160
+ test && renderLog ? /* @__PURE__ */ jsx56("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
7148
7161
  ] }) : null
7149
7162
  ] });
7150
7163
  }
7151
7164
  function TestModeBar({ onExit }) {
7152
7165
  const mode2 = useRuntimeMode();
7153
7166
  if (mode2 !== "test") return null;
7154
- return /* @__PURE__ */ jsxs51("div", { className: "fd-testbar", role: "status", children: [
7155
- /* @__PURE__ */ jsxs51("span", { className: "fd-badge fd-badge-warning", children: [
7156
- /* @__PURE__ */ jsx55("i", { className: "ph ph-flask", "aria-hidden": "true" }),
7167
+ return /* @__PURE__ */ jsxs52("div", { className: "fd-testbar", role: "status", children: [
7168
+ /* @__PURE__ */ jsxs52("span", { className: "fd-badge fd-badge-warning", children: [
7169
+ /* @__PURE__ */ jsx56("i", { className: "ph ph-flask", "aria-hidden": "true" }),
7157
7170
  "Test mode"
7158
7171
  ] }),
7159
- /* @__PURE__ */ jsx55("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
7160
- /* @__PURE__ */ jsxs51("button", { type: "button", className: "fd-soon-link", onClick: () => onExit ? onExit() : RuntimeKit.setMode("live"), children: [
7161
- /* @__PURE__ */ jsx55("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
7172
+ /* @__PURE__ */ jsx56("span", { className: "fd-testbar-detail", children: "Every feature is unlocked and every response is simulated \u2014 nothing here persists." }),
7173
+ /* @__PURE__ */ jsxs52("button", { type: "button", className: "fd-soon-link", onClick: () => onExit ? onExit() : RuntimeKit.setMode("live"), children: [
7174
+ /* @__PURE__ */ jsx56("i", { className: "ph ph-lightning", "aria-hidden": "true" }),
7162
7175
  " Back to live mode"
7163
7176
  ] })
7164
7177
  ] });
7165
7178
  }
7166
7179
 
7167
7180
  // src/components/planner/ChannelMeta.tsx
7168
- import { jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
7181
+ import { jsx as jsx57, jsxs as jsxs53 } from "react/jsx-runtime";
7169
7182
  var CHANNEL_WEIGHTS = {
7170
7183
  "OOH": 50,
7171
7184
  "DOOH": 50,
@@ -7218,9 +7231,9 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
7218
7231
  const m = ChannelMeta(channel);
7219
7232
  const wt = channelWeightOf(channel || "");
7220
7233
  if (dot) {
7221
- return /* @__PURE__ */ jsx56("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
7234
+ return /* @__PURE__ */ jsx57("span", { className: ["fd-chan-dot", className].filter(Boolean).join(" "), title: m.name, style: { background: m.color }, ...rest });
7222
7235
  }
7223
- return /* @__PURE__ */ jsxs52(
7236
+ return /* @__PURE__ */ jsxs53(
7224
7237
  "span",
7225
7238
  {
7226
7239
  className: ["fd-chan", size === "sm" ? "fd-chan-sm" : "", className].filter(Boolean).join(" "),
@@ -7228,16 +7241,16 @@ function ChannelTag({ channel, size = "md", showLabel = true, dot = false, weigh
7228
7241
  style: { "--chan": m.color },
7229
7242
  ...rest,
7230
7243
  children: [
7231
- /* @__PURE__ */ jsx56("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }),
7232
- showLabel ? /* @__PURE__ */ jsx56("span", { className: "fd-chan-label", children: m.label }) : null,
7233
- weight ? /* @__PURE__ */ jsx56("span", { className: "fd-chan-weight", children: wt || 0 }) : null
7244
+ /* @__PURE__ */ jsx57("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }),
7245
+ showLabel ? /* @__PURE__ */ jsx57("span", { className: "fd-chan-label", children: m.label }) : null,
7246
+ weight ? /* @__PURE__ */ jsx57("span", { className: "fd-chan-weight", children: wt || 0 }) : null
7234
7247
  ]
7235
7248
  }
7236
7249
  );
7237
7250
  }
7238
7251
 
7239
7252
  // src/components/planner/SaturationDistribution.tsx
7240
- import { jsx as jsx57, jsxs as jsxs53 } from "react/jsx-runtime";
7253
+ import { jsx as jsx58, jsxs as jsxs54 } from "react/jsx-runtime";
7241
7254
  var BANDS2 = [
7242
7255
  { key: "weak", label: "Weak", n: 1, range: "< 50" },
7243
7256
  { key: "adequate", label: "Adequate", n: 2, range: "50\u2013100" },
@@ -7248,18 +7261,18 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
7248
7261
  const grouped = BANDS2.map((b) => ({ ...b, items: campuses.filter((c) => c.band === b.key) }));
7249
7262
  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));
7250
7263
  const floor = BANDS2.find((b) => b.key === floorBand) || BANDS2[0];
7251
- return /* @__PURE__ */ jsxs53("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
7252
- /* @__PURE__ */ jsx57("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,1fr)", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
7264
+ return /* @__PURE__ */ jsxs54("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
7265
+ /* @__PURE__ */ jsx58("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,1fr)", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
7253
7266
  const mark = "var(--csi-" + g.n + "-mark)";
7254
7267
  const active = selectedBand === g.key;
7255
- return /* @__PURE__ */ jsxs53(
7268
+ return /* @__PURE__ */ jsxs54(
7256
7269
  "button",
7257
7270
  {
7258
7271
  type: "button",
7259
7272
  onClick: onSelectBand ? () => onSelectBand(active ? null : g.key) : void 0,
7260
7273
  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, transition: "background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)" },
7261
7274
  children: [
7262
- /* @__PURE__ */ jsx57("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx57("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => /* @__PURE__ */ jsx57(
7275
+ /* @__PURE__ */ jsx58("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx58("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => /* @__PURE__ */ jsx58(
7263
7276
  "span",
7264
7277
  {
7265
7278
  title: c.name + " \xB7 " + c.crp,
@@ -7268,13 +7281,13 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
7268
7281
  },
7269
7282
  c.name
7270
7283
  )) }),
7271
- /* @__PURE__ */ jsxs53("span", { className: "fd-row", style: { gap: 8, alignItems: "baseline" }, children: [
7272
- /* @__PURE__ */ jsx57("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),
7273
- /* @__PURE__ */ jsx57("span", { className: "fd-meter", style: { gap: 2, color: mark }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx57("span", { className: "fd-meter-seg" + (i <= g.n ? " is-on" : ""), style: { width: 4, height: 9 } }, i)) })
7284
+ /* @__PURE__ */ jsxs54("span", { className: "fd-row", style: { gap: 8, alignItems: "baseline" }, children: [
7285
+ /* @__PURE__ */ jsx58("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),
7286
+ /* @__PURE__ */ jsx58("span", { className: "fd-meter", style: { gap: 2, color: mark }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx58("span", { className: "fd-meter-seg" + (i <= g.n ? " is-on" : ""), style: { width: 4, height: 9 } }, i)) })
7274
7287
  ] }),
7275
- /* @__PURE__ */ jsxs53("span", { className: "fd-stack", style: { gap: 1 }, children: [
7276
- /* @__PURE__ */ jsx57("span", { className: "fd-label-lg", children: g.label }),
7277
- /* @__PURE__ */ jsxs53("span", { className: "fd-body-sm fd-muted", style: { fontSize: 11.5 }, children: [
7288
+ /* @__PURE__ */ jsxs54("span", { className: "fd-stack", style: { gap: 1 }, children: [
7289
+ /* @__PURE__ */ jsx58("span", { className: "fd-label-lg", children: g.label }),
7290
+ /* @__PURE__ */ jsxs54("span", { className: "fd-body-sm fd-muted", style: { fontSize: 11.5 }, children: [
7278
7291
  "CRP ",
7279
7292
  g.range
7280
7293
  ] })
@@ -7284,10 +7297,10 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
7284
7297
  g.key
7285
7298
  );
7286
7299
  }) }),
7287
- floorBand ? /* @__PURE__ */ jsxs53("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: [
7288
- /* @__PURE__ */ jsx57("span", { className: "fd-meter", style: { gap: 2, color: "var(--csi-" + floor.n + "-mark)" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx57("span", { className: "fd-meter-seg" + (i <= floor.n ? " is-on" : ""), style: { width: 5, height: 12 } }, i)) }),
7289
- /* @__PURE__ */ jsxs53("span", { className: "fd-body-sm fd-secondary", style: { flex: 1, minWidth: 240 }, children: [
7290
- /* @__PURE__ */ jsxs53("strong", { style: { color: "var(--text)" }, children: [
7300
+ floorBand ? /* @__PURE__ */ jsxs54("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: [
7301
+ /* @__PURE__ */ jsx58("span", { className: "fd-meter", style: { gap: 2, color: "var(--csi-" + floor.n + "-mark)" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx58("span", { className: "fd-meter-seg" + (i <= floor.n ? " is-on" : ""), style: { width: 5, height: 12 } }, i)) }),
7302
+ /* @__PURE__ */ jsxs54("span", { className: "fd-body-sm fd-secondary", style: { flex: 1, minWidth: 240 }, children: [
7303
+ /* @__PURE__ */ jsxs54("strong", { style: { color: "var(--text)" }, children: [
7291
7304
  "Plan floor ",
7292
7305
  floorScore
7293
7306
  ] }),
@@ -7299,20 +7312,20 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
7299
7312
 
7300
7313
  // src/components/planner/MixGap.tsx
7301
7314
  import * as React31 from "react";
7302
- import { Fragment as Fragment15, jsx as jsx58, jsxs as jsxs54 } from "react/jsx-runtime";
7315
+ import { Fragment as Fragment15, jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
7303
7316
  function MixGap({ rows = [], loading = false, className = "" }) {
7304
7317
  const max = Math.max(1, ...rows.flatMap((r) => [r.target, r.realized]));
7305
7318
  const [hover, setHover] = React31.useState(null);
7306
7319
  const toneOf = (gap) => gap >= -1 ? "ok" : gap >= -4 ? "warn" : "danger";
7307
7320
  const TONE = { ok: "var(--ok-solid)", warn: "var(--warn-solid)", danger: "var(--danger-solid)" };
7308
- return /* @__PURE__ */ jsxs54("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 4 }, children: [
7309
- /* @__PURE__ */ jsxs54("div", { className: "fd-row", style: { gap: 16, justifyContent: "flex-end", paddingBottom: 6, flexWrap: "wrap" }, children: [
7310
- [["On target", TONE.ok], ["Close", TONE.warn], ["Short", TONE.danger]].map(([l, c]) => /* @__PURE__ */ jsxs54("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
7311
- /* @__PURE__ */ jsx58("span", { style: { width: 14, height: 9, borderRadius: 2, background: c } }),
7321
+ return /* @__PURE__ */ jsxs55("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 4 }, children: [
7322
+ /* @__PURE__ */ jsxs55("div", { className: "fd-row", style: { gap: 16, justifyContent: "flex-end", paddingBottom: 6, flexWrap: "wrap" }, children: [
7323
+ [["On target", TONE.ok], ["Close", TONE.warn], ["Short", TONE.danger]].map(([l, c]) => /* @__PURE__ */ jsxs55("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
7324
+ /* @__PURE__ */ jsx59("span", { style: { width: 14, height: 9, borderRadius: 2, background: c } }),
7312
7325
  l
7313
7326
  ] }, l)),
7314
- /* @__PURE__ */ jsxs54("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
7315
- /* @__PURE__ */ jsx58("span", { style: { width: 3, height: 14, background: "var(--n-500)" } }),
7327
+ /* @__PURE__ */ jsxs55("span", { className: "fd-row fd-body-sm fd-muted", style: { gap: 6 }, children: [
7328
+ /* @__PURE__ */ jsx59("span", { style: { width: 3, height: 14, background: "var(--n-500)" } }),
7316
7329
  "Target"
7317
7330
  ] })
7318
7331
  ] }),
@@ -7320,7 +7333,7 @@ function MixGap({ rows = [], loading = false, className = "" }) {
7320
7333
  const gap = r.realized - r.target;
7321
7334
  const tone = toneOf(gap);
7322
7335
  const tip = "Realized " + r.realized + "% vs " + r.target + "% target" + (gap < -1 ? " \xB7 " + Math.abs(gap).toFixed(0) + " pts short" : gap > 1 ? " \xB7 " + gap.toFixed(0) + " pts over" : " \xB7 on target") + (r.note ? " \u2014 " + r.note : "");
7323
- return /* @__PURE__ */ jsxs54(
7336
+ return /* @__PURE__ */ jsxs55(
7324
7337
  "div",
7325
7338
  {
7326
7339
  className: "fd-row",
@@ -7328,15 +7341,15 @@ function MixGap({ rows = [], loading = false, className = "" }) {
7328
7341
  onMouseEnter: () => setHover(r.channel),
7329
7342
  onMouseLeave: () => setHover(null),
7330
7343
  children: [
7331
- /* @__PURE__ */ jsx58("span", { style: { width: 128, flex: "none" }, children: /* @__PURE__ */ jsx58(ChannelTag, { channel: r.channel, size: "sm" }) }),
7332
- /* @__PURE__ */ jsx58("span", { style: { position: "relative", flex: 1, height: 22, minWidth: 120 }, children: loading ? /* @__PURE__ */ jsx58("span", { className: "fd-skel", style: { position: "absolute", inset: "5px 0", borderRadius: 3 } }) : /* @__PURE__ */ jsxs54(Fragment15, { children: [
7333
- /* @__PURE__ */ jsx58("span", { style: { position: "absolute", left: 0, top: 5, height: 12, width: r.realized / max * 100 + "%", background: TONE[tone], borderRadius: "2px 3px 3px 2px", transition: "width var(--dur-slow) var(--ease), background var(--dur-base) var(--ease)" } }),
7334
- /* @__PURE__ */ jsx58("span", { style: { position: "absolute", left: r.target / max * 100 + "%", top: 0, width: 3, height: 22, background: "var(--n-500)", borderRadius: 1 } }),
7335
- /* @__PURE__ */ jsxs54("span", { className: "fd-num", style: { position: "absolute", right: Math.max(r.realized, r.target) / max > 0.82 ? 0 : "auto", left: Math.max(r.realized, r.target) / max > 0.82 ? "auto" : "calc(" + Math.max(r.realized, r.target) / max * 100 + "% + 10px)", top: 2, fontSize: 12, color: "var(--text-muted)", whiteSpace: "nowrap", background: Math.max(r.realized, r.target) / max > 0.82 ? "var(--surface)" : "none", paddingLeft: 3 }, children: [
7344
+ /* @__PURE__ */ jsx59("span", { style: { width: 128, flex: "none" }, children: /* @__PURE__ */ jsx59(ChannelTag, { channel: r.channel, size: "sm" }) }),
7345
+ /* @__PURE__ */ jsx59("span", { style: { position: "relative", flex: 1, height: 22, minWidth: 120 }, children: loading ? /* @__PURE__ */ jsx59("span", { className: "fd-skel", style: { position: "absolute", inset: "5px 0", borderRadius: 3 } }) : /* @__PURE__ */ jsxs55(Fragment15, { children: [
7346
+ /* @__PURE__ */ jsx59("span", { style: { position: "absolute", left: 0, top: 5, height: 12, width: r.realized / max * 100 + "%", background: TONE[tone], borderRadius: "2px 3px 3px 2px", transition: "width var(--dur-slow) var(--ease), background var(--dur-base) var(--ease)" } }),
7347
+ /* @__PURE__ */ jsx59("span", { style: { position: "absolute", left: r.target / max * 100 + "%", top: 0, width: 3, height: 22, background: "var(--n-500)", borderRadius: 1 } }),
7348
+ /* @__PURE__ */ jsxs55("span", { className: "fd-num", style: { position: "absolute", right: Math.max(r.realized, r.target) / max > 0.82 ? 0 : "auto", left: Math.max(r.realized, r.target) / max > 0.82 ? "auto" : "calc(" + Math.max(r.realized, r.target) / max * 100 + "% + 10px)", top: 2, fontSize: 12, color: "var(--text-muted)", whiteSpace: "nowrap", background: Math.max(r.realized, r.target) / max > 0.82 ? "var(--surface)" : "none", paddingLeft: 3 }, children: [
7336
7349
  r.realized,
7337
7350
  "%"
7338
7351
  ] }),
7339
- hover === r.channel ? /* @__PURE__ */ jsx58("span", { className: "fd-tooltip", role: "tooltip", style: { position: "absolute", left: 0, right: "auto", bottom: 26, maxWidth: "min(340px, 100%)", whiteSpace: "normal", textAlign: "left", width: "max-content" }, children: tip }) : null
7352
+ hover === r.channel ? /* @__PURE__ */ jsx59("span", { className: "fd-tooltip", role: "tooltip", style: { position: "absolute", left: 0, right: "auto", bottom: 26, maxWidth: "min(340px, 100%)", whiteSpace: "normal", textAlign: "left", width: "max-content" }, children: tip }) : null
7340
7353
  ] }) })
7341
7354
  ]
7342
7355
  },
@@ -7347,7 +7360,7 @@ function MixGap({ rows = [], loading = false, className = "" }) {
7347
7360
  }
7348
7361
 
7349
7362
  // src/components/planner/ChannelContribution.tsx
7350
- import { jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
7363
+ import { jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
7351
7364
  var money = (n) => "$" + Math.round(n).toLocaleString();
7352
7365
  function ChannelContribution({
7353
7366
  channels = [],
@@ -7363,9 +7376,9 @@ function ChannelContribution({
7363
7376
  const grand = total !== void 0 ? total : base + bonus;
7364
7377
  const pct = (v) => grand ? v / grand * 100 : 0;
7365
7378
  const spendTotal = channels.reduce((s, c) => s + Number(String(c.spend || 0).replace(/[^0-9.]/g, "")), 0);
7366
- return /* @__PURE__ */ jsxs55("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
7367
- loading ? /* @__PURE__ */ jsx59("span", { className: "fd-skel", style: { height: 34, borderRadius: "var(--r-sm)" } }) : /* @__PURE__ */ jsxs55("div", { className: "fd-row", style: { height: 34, borderRadius: "var(--r-sm)", overflow: "hidden", gap: 2, background: "var(--surface-3)" }, children: [
7368
- channels.map((c) => /* @__PURE__ */ jsx59(
7379
+ return /* @__PURE__ */ jsxs56("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
7380
+ loading ? /* @__PURE__ */ jsx60("span", { className: "fd-skel", style: { height: 34, borderRadius: "var(--r-sm)" } }) : /* @__PURE__ */ jsxs56("div", { className: "fd-row", style: { height: 34, borderRadius: "var(--r-sm)", overflow: "hidden", gap: 2, background: "var(--surface-3)" }, children: [
7381
+ channels.map((c) => /* @__PURE__ */ jsx60(
7369
7382
  "span",
7370
7383
  {
7371
7384
  title: c.name + " \xB7 " + c.crp.toFixed(1) + " CRP",
@@ -7374,7 +7387,7 @@ function ChannelContribution({
7374
7387
  },
7375
7388
  c.name
7376
7389
  )),
7377
- bonus > 0 ? /* @__PURE__ */ jsx59(
7390
+ bonus > 0 ? /* @__PURE__ */ jsx60(
7378
7391
  "span",
7379
7392
  {
7380
7393
  title: "Surround-sound bonus +" + bonusPct + "%",
@@ -7383,18 +7396,18 @@ function ChannelContribution({
7383
7396
  }
7384
7397
  ) : null
7385
7398
  ] }),
7386
- showTable ? /* @__PURE__ */ jsxs55("table", { className: "fd-table", style: { fontSize: "var(--body-sm-size)" }, children: [
7387
- /* @__PURE__ */ jsx59("thead", { children: /* @__PURE__ */ jsxs55("tr", { children: [
7388
- /* @__PURE__ */ jsx59("th", { style: { width: "34%" }, children: "Channel" }),
7389
- /* @__PURE__ */ jsx59("th", { style: { width: "16%" }, children: "Weight" }),
7390
- /* @__PURE__ */ jsx59("th", { className: "is-num", style: { width: "16%" }, children: "Spend" }),
7391
- /* @__PURE__ */ jsx59("th", { className: "is-num", style: { width: "17%" }, children: "CRP" }),
7392
- /* @__PURE__ */ jsx59("th", { className: "is-num", style: { width: "17%" }, children: "Share" })
7399
+ showTable ? /* @__PURE__ */ jsxs56("table", { className: "fd-table", style: { fontSize: "var(--body-sm-size)" }, children: [
7400
+ /* @__PURE__ */ jsx60("thead", { children: /* @__PURE__ */ jsxs56("tr", { children: [
7401
+ /* @__PURE__ */ jsx60("th", { style: { width: "34%" }, children: "Channel" }),
7402
+ /* @__PURE__ */ jsx60("th", { style: { width: "16%" }, children: "Weight" }),
7403
+ /* @__PURE__ */ jsx60("th", { className: "is-num", style: { width: "16%" }, children: "Spend" }),
7404
+ /* @__PURE__ */ jsx60("th", { className: "is-num", style: { width: "17%" }, children: "CRP" }),
7405
+ /* @__PURE__ */ jsx60("th", { className: "is-num", style: { width: "17%" }, children: "Share" })
7393
7406
  ] }) }),
7394
- /* @__PURE__ */ jsxs55("tbody", { children: [
7395
- channels.map((c) => /* @__PURE__ */ jsxs55("tr", { children: [
7396
- /* @__PURE__ */ jsx59("td", { children: /* @__PURE__ */ jsx59(ChannelTag, { channel: c.name, size: "sm" }) }),
7397
- /* @__PURE__ */ jsx59("td", { children: /* @__PURE__ */ jsx59(
7407
+ /* @__PURE__ */ jsxs56("tbody", { children: [
7408
+ channels.map((c) => /* @__PURE__ */ jsxs56("tr", { children: [
7409
+ /* @__PURE__ */ jsx60("td", { children: /* @__PURE__ */ jsx60(ChannelTag, { channel: c.name, size: "sm" }) }),
7410
+ /* @__PURE__ */ jsx60("td", { children: /* @__PURE__ */ jsx60(
7398
7411
  "span",
7399
7412
  {
7400
7413
  className: "fd-badge fd-badge-neutral",
@@ -7403,38 +7416,38 @@ function ChannelContribution({
7403
7416
  children: "weight " + (channelWeightOf(c.name) || 0)
7404
7417
  }
7405
7418
  ) }),
7406
- /* @__PURE__ */ jsx59("td", { className: "is-num", children: c.spend }),
7407
- /* @__PURE__ */ jsx59("td", { className: "is-num", children: c.crp.toFixed(1) }),
7408
- /* @__PURE__ */ jsxs55("td", { className: "is-num", children: [
7419
+ /* @__PURE__ */ jsx60("td", { className: "is-num", children: c.spend }),
7420
+ /* @__PURE__ */ jsx60("td", { className: "is-num", children: c.crp.toFixed(1) }),
7421
+ /* @__PURE__ */ jsxs56("td", { className: "is-num", children: [
7409
7422
  pct(c.crp).toFixed(0),
7410
7423
  "%"
7411
7424
  ] })
7412
7425
  ] }, c.name)),
7413
- bonus > 0 ? /* @__PURE__ */ jsxs55("tr", { children: [
7414
- /* @__PURE__ */ jsx59("td", { children: /* @__PURE__ */ jsxs55("span", { className: "fd-row", style: { gap: 9, fontWeight: 600 }, children: [
7415
- /* @__PURE__ */ jsx59("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" } }),
7426
+ bonus > 0 ? /* @__PURE__ */ jsxs56("tr", { children: [
7427
+ /* @__PURE__ */ jsx60("td", { children: /* @__PURE__ */ jsxs56("span", { className: "fd-row", style: { gap: 9, fontWeight: 600 }, children: [
7428
+ /* @__PURE__ */ jsx60("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" } }),
7416
7429
  "Surround-sound bonus"
7417
7430
  ] }) }),
7418
- /* @__PURE__ */ jsx59("td", { children: /* @__PURE__ */ jsxs55("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
7431
+ /* @__PURE__ */ jsx60("td", { children: /* @__PURE__ */ jsxs56("span", { className: "fd-badge fd-badge-success", style: { height: 20, fontSize: 11 }, children: [
7419
7432
  "+",
7420
7433
  bonusPct,
7421
7434
  "% of +",
7422
7435
  bonusMax,
7423
7436
  "%"
7424
7437
  ] }) }),
7425
- /* @__PURE__ */ jsx59("td", { className: "is-num fd-muted", children: "\u2014" }),
7426
- /* @__PURE__ */ jsx59("td", { className: "is-num", children: bonus.toFixed(1) }),
7427
- /* @__PURE__ */ jsxs55("td", { className: "is-num", children: [
7438
+ /* @__PURE__ */ jsx60("td", { className: "is-num fd-muted", children: "\u2014" }),
7439
+ /* @__PURE__ */ jsx60("td", { className: "is-num", children: bonus.toFixed(1) }),
7440
+ /* @__PURE__ */ jsxs56("td", { className: "is-num", children: [
7428
7441
  pct(bonus).toFixed(0),
7429
7442
  "%"
7430
7443
  ] })
7431
7444
  ] }) : null,
7432
- /* @__PURE__ */ jsxs55("tr", { style: { background: "var(--surface-2)" }, children: [
7433
- /* @__PURE__ */ jsx59("td", { style: { fontWeight: 700 }, children: "Campus total" }),
7434
- /* @__PURE__ */ jsx59("td", {}),
7435
- /* @__PURE__ */ jsx59("td", { className: "is-num", style: { fontWeight: 700 }, children: money(spendTotal) }),
7436
- /* @__PURE__ */ jsx59("td", { className: "is-num", style: { fontWeight: 700 }, children: grand.toFixed(1) }),
7437
- /* @__PURE__ */ jsx59("td", { className: "is-num", style: { fontWeight: 700 }, children: "100%" })
7445
+ /* @__PURE__ */ jsxs56("tr", { style: { background: "var(--surface-2)" }, children: [
7446
+ /* @__PURE__ */ jsx60("td", { style: { fontWeight: 700 }, children: "Campus total" }),
7447
+ /* @__PURE__ */ jsx60("td", {}),
7448
+ /* @__PURE__ */ jsx60("td", { className: "is-num", style: { fontWeight: 700 }, children: money(spendTotal) }),
7449
+ /* @__PURE__ */ jsx60("td", { className: "is-num", style: { fontWeight: 700 }, children: grand.toFixed(1) }),
7450
+ /* @__PURE__ */ jsx60("td", { className: "is-num", style: { fontWeight: 700 }, children: "100%" })
7438
7451
  ] })
7439
7452
  ] })
7440
7453
  ] }) : null
@@ -7443,7 +7456,7 @@ function ChannelContribution({
7443
7456
 
7444
7457
  // src/components/planner/BudgetReallocator.tsx
7445
7458
  import * as React32 from "react";
7446
- import { Fragment as Fragment16, jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
7459
+ import { Fragment as Fragment16, jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
7447
7460
  var bandFor = (crp) => crp >= 200 ? "dominant" : crp >= 100 ? "strong" : crp >= 50 ? "adequate" : "weak";
7448
7461
  function BudgetReallocator({
7449
7462
  campus,
@@ -7474,24 +7487,24 @@ function BudgetReallocator({
7474
7487
  setDraft(spend);
7475
7488
  if (onCancel) onCancel();
7476
7489
  };
7477
- return /* @__PURE__ */ jsxs56(
7490
+ return /* @__PURE__ */ jsxs57(
7478
7491
  "div",
7479
7492
  {
7480
7493
  className: ["fd-stack", className].filter(Boolean).join(" "),
7481
7494
  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)" },
7482
7495
  children: [
7483
- /* @__PURE__ */ jsxs56("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
7484
- /* @__PURE__ */ jsx60("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
7485
- /* @__PURE__ */ jsx60(CsiBadge, { band: nowBand, crp: Number(crp.toFixed(1)), size: "medium" }),
7486
- dirty ? /* @__PURE__ */ jsxs56(Fragment16, { children: [
7487
- /* @__PURE__ */ jsx60("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
7488
- /* @__PURE__ */ jsx60(CsiBadge, { band: nextBand, crp: Number(nextCrp.toFixed(1)), size: "medium", preview: true })
7496
+ /* @__PURE__ */ jsxs57("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
7497
+ /* @__PURE__ */ jsx61("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
7498
+ /* @__PURE__ */ jsx61(CsiBadge, { band: nowBand, crp: Number(crp.toFixed(1)), size: "medium" }),
7499
+ dirty ? /* @__PURE__ */ jsxs57(Fragment16, { children: [
7500
+ /* @__PURE__ */ jsx61("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
7501
+ /* @__PURE__ */ jsx61(CsiBadge, { band: nextBand, crp: Number(nextCrp.toFixed(1)), size: "medium", preview: true })
7489
7502
  ] }) : null
7490
7503
  ] }),
7491
- /* @__PURE__ */ jsxs56("div", { className: "fd-slider", children: [
7492
- /* @__PURE__ */ jsx60("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
7493
- dirty ? /* @__PURE__ */ jsx60("span", { className: "fd-slider-chip", style: { left: pct + "%", background: delta < 0 ? "var(--danger-solid)" : "var(--ok-solid)" }, children: (delta < 0 ? "\u2212$" : "+$") + Math.abs(delta).toLocaleString() }) : null,
7494
- /* @__PURE__ */ jsx60(
7504
+ /* @__PURE__ */ jsxs57("div", { className: "fd-slider", children: [
7505
+ /* @__PURE__ */ jsx61("span", { className: "fd-slider-fill", style: { width: pct + "%" } }),
7506
+ dirty ? /* @__PURE__ */ jsx61("span", { className: "fd-slider-chip", style: { left: pct + "%", background: delta < 0 ? "var(--danger-solid)" : "var(--ok-solid)" }, children: (delta < 0 ? "\u2212$" : "+$") + Math.abs(delta).toLocaleString() }) : null,
7507
+ /* @__PURE__ */ jsx61(
7495
7508
  "input",
7496
7509
  {
7497
7510
  type: "range",
@@ -7507,13 +7520,13 @@ function BudgetReallocator({
7507
7520
  }
7508
7521
  )
7509
7522
  ] }),
7510
- /* @__PURE__ */ jsxs56("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
7511
- /* @__PURE__ */ jsxs56("span", { className: "fd-stack", style: { gap: 2, flex: 1, minWidth: 150 }, children: [
7512
- /* @__PURE__ */ jsx60("span", { className: "fd-num", style: { fontSize: 19, fontWeight: 700 }, children: "$" + draft.toLocaleString() }),
7513
- /* @__PURE__ */ jsx60("span", { className: "fd-body-sm fd-muted", children: "Arrow keys step $100, shift+arrow $1,000. Escape reverts." })
7523
+ /* @__PURE__ */ jsxs57("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
7524
+ /* @__PURE__ */ jsxs57("span", { className: "fd-stack", style: { gap: 2, flex: 1, minWidth: 150 }, children: [
7525
+ /* @__PURE__ */ jsx61("span", { className: "fd-num", style: { fontSize: 19, fontWeight: 700 }, children: "$" + draft.toLocaleString() }),
7526
+ /* @__PURE__ */ jsx61("span", { className: "fd-body-sm fd-muted", children: "Arrow keys step $100, shift+arrow $1,000. Escape reverts." })
7514
7527
  ] }),
7515
- /* @__PURE__ */ jsx60("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
7516
- /* @__PURE__ */ jsx60(
7528
+ /* @__PURE__ */ jsx61("button", { type: "button", className: "fd-btn fd-btn-ghost", disabled: !dirty, onClick: revert, children: "Cancel" }),
7529
+ /* @__PURE__ */ jsx61(
7517
7530
  "button",
7518
7531
  {
7519
7532
  type: "button",
@@ -7532,7 +7545,7 @@ function BudgetReallocator({
7532
7545
  }
7533
7546
 
7534
7547
  // src/components/planner/SurroundSound.tsx
7535
- import { jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
7548
+ import { jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
7536
7549
  var CATEGORIES = [
7537
7550
  { key: "ooh", label: "OOH", icon: "flag-banner", color: "var(--ch-ooh)" },
7538
7551
  { key: "transit", label: "Transit", icon: "bus", color: "var(--ch-transit)" },
@@ -7544,26 +7557,26 @@ var CATEGORIES = [
7544
7557
  function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost, className = "" }) {
7545
7558
  const earned = Math.max(0, Math.min(1, bonusPct / bonusMax));
7546
7559
  const single = present.length <= 2;
7547
- return /* @__PURE__ */ jsxs57("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, children: [
7548
- /* @__PURE__ */ jsx61("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: CATEGORIES.map((c) => {
7560
+ return /* @__PURE__ */ jsxs58("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 14 }, children: [
7561
+ /* @__PURE__ */ jsx62("div", { className: "fd-row", style: { gap: 8, flexWrap: "wrap" }, children: CATEGORIES.map((c) => {
7549
7562
  const on = present.includes(c.key);
7550
- return /* @__PURE__ */ jsxs57(
7563
+ return /* @__PURE__ */ jsxs58(
7551
7564
  "span",
7552
7565
  {
7553
7566
  title: c.label + (on ? " \u2014 present" : " \u2014 not bought"),
7554
7567
  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)" },
7555
7568
  children: [
7556
- /* @__PURE__ */ jsx61("i", { className: "ph ph-" + c.icon, style: { fontSize: 19, color: on ? c.color : "var(--text-muted)" }, "aria-hidden": "true" }),
7557
- /* @__PURE__ */ jsx61("span", { style: { fontSize: 10.5, fontWeight: 700 }, children: c.label })
7569
+ /* @__PURE__ */ jsx62("i", { className: "ph ph-" + c.icon, style: { fontSize: 19, color: on ? c.color : "var(--text-muted)" }, "aria-hidden": "true" }),
7570
+ /* @__PURE__ */ jsx62("span", { style: { fontSize: 10.5, fontWeight: 700 }, children: c.label })
7558
7571
  ]
7559
7572
  },
7560
7573
  c.key
7561
7574
  );
7562
7575
  }) }),
7563
- /* @__PURE__ */ jsxs57("div", { className: "fd-stack", style: { gap: 8 }, children: [
7564
- /* @__PURE__ */ jsxs57("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
7565
- /* @__PURE__ */ jsx61("span", { className: "fd-label-lg", children: "Surround-sound bonus earned" }),
7566
- /* @__PURE__ */ jsxs57("span", { className: "fd-num", style: { color: single ? "var(--warn-text)" : "var(--csi-3-mark)", fontWeight: 700 }, children: [
7576
+ /* @__PURE__ */ jsxs58("div", { className: "fd-stack", style: { gap: 8 }, children: [
7577
+ /* @__PURE__ */ jsxs58("div", { className: "fd-row", style: { justifyContent: "space-between", gap: 12 }, children: [
7578
+ /* @__PURE__ */ jsx62("span", { className: "fd-label-lg", children: "Surround-sound bonus earned" }),
7579
+ /* @__PURE__ */ jsxs58("span", { className: "fd-num", style: { color: single ? "var(--warn-text)" : "var(--csi-3-mark)", fontWeight: 700 }, children: [
7567
7580
  "+",
7568
7581
  bonusPct,
7569
7582
  "% of +",
@@ -7571,8 +7584,8 @@ function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost,
7571
7584
  "%"
7572
7585
  ] })
7573
7586
  ] }),
7574
- /* @__PURE__ */ jsx61("div", { style: { height: 8, borderRadius: "var(--r-xs)", background: "var(--surface-3)", overflow: "hidden" }, children: /* @__PURE__ */ jsx61("div", { style: { height: "100%", width: earned * 100 + "%", background: "var(--csi-3-mark)", borderRadius: "inherit", transition: "width var(--dur-slow) var(--ease)" } }) }),
7575
- /* @__PURE__ */ jsxs57("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: [
7587
+ /* @__PURE__ */ jsx62("div", { style: { height: 8, borderRadius: "var(--r-xs)", background: "var(--surface-3)", overflow: "hidden" }, children: /* @__PURE__ */ jsx62("div", { style: { height: "100%", width: earned * 100 + "%", background: "var(--csi-3-mark)", borderRadius: "inherit", transition: "width var(--dur-slow) var(--ease)" } }) }),
7588
+ /* @__PURE__ */ jsxs58("span", { className: "fd-body-sm fd-secondary", style: { textWrap: "pretty" }, children: [
7576
7589
  present.length,
7577
7590
  " of 6 channel categories present.",
7578
7591
  " ",
@@ -8001,7 +8014,7 @@ import * as React35 from "react";
8001
8014
 
8002
8015
  // src/components/chat/ChatTurn.tsx
8003
8016
  import * as React34 from "react";
8004
- import { jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
8017
+ import { jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
8005
8018
  function JsonView({ value }) {
8006
8019
  let text;
8007
8020
  try {
@@ -8009,28 +8022,28 @@ function JsonView({ value }) {
8009
8022
  } catch (e) {
8010
8023
  text = String(value);
8011
8024
  }
8012
- return /* @__PURE__ */ jsx62(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
8025
+ return /* @__PURE__ */ jsx63(CodeBlock, { code: text, language: "json", collapseAfter: 18 });
8013
8026
  }
8014
8027
  function PacketCard({ packet, schema, render, onApply, applied }) {
8015
8028
  if (!packet) return null;
8016
8029
  const s = schema || {};
8017
8030
  const invalid = packet.valid === false;
8018
8031
  const title = s.heading || packet.type;
8019
- return /* @__PURE__ */ jsxs58("section", { className: "fdc-packet" + (invalid ? " is-invalid" : ""), "aria-label": title, children: [
8020
- /* @__PURE__ */ jsxs58("header", { className: "fdc-packet-head", children: [
8021
- /* @__PURE__ */ jsx62("i", { className: "ph ph-" + (s.icon || "package"), "aria-hidden": "true" }),
8022
- /* @__PURE__ */ jsx62("span", { className: "fdc-packet-title", children: title }),
8023
- packet.repaired ? /* @__PURE__ */ jsx62("span", { className: "fdc-packet-badge", children: "Repaired" }) : null,
8024
- invalid ? /* @__PURE__ */ jsx62("span", { className: "fdc-packet-badge is-danger", children: "Invalid" }) : null
8032
+ return /* @__PURE__ */ jsxs59("section", { className: "fdc-packet" + (invalid ? " is-invalid" : ""), "aria-label": title, children: [
8033
+ /* @__PURE__ */ jsxs59("header", { className: "fdc-packet-head", children: [
8034
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-" + (s.icon || "package"), "aria-hidden": "true" }),
8035
+ /* @__PURE__ */ jsx63("span", { className: "fdc-packet-title", children: title }),
8036
+ packet.repaired ? /* @__PURE__ */ jsx63("span", { className: "fdc-packet-badge", children: "Repaired" }) : null,
8037
+ invalid ? /* @__PURE__ */ jsx63("span", { className: "fdc-packet-badge is-danger", children: "Invalid" }) : null
8025
8038
  ] }),
8026
- invalid ? /* @__PURE__ */ jsxs58("div", { className: "fdc-packet-alert", role: "alert", children: [
8027
- /* @__PURE__ */ jsx62("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8028
- /* @__PURE__ */ jsx62("span", { children: packet.error || "This result failed validation and can\u2019t be applied." })
8029
- ] }) : /* @__PURE__ */ jsx62("div", { className: "fdc-packet-body", children: render ? render(packet) : /* @__PURE__ */ jsx62(JsonView, { value: packet.payload }) }),
8030
- !invalid && onApply ? /* @__PURE__ */ jsxs58("footer", { className: "fdc-packet-foot", children: [
8031
- packet.repaired ? /* @__PURE__ */ jsx62("span", { className: "fdc-packet-note", children: "Corrected by the backend after a first attempt." }) : /* @__PURE__ */ jsx62("span", {}),
8032
- /* @__PURE__ */ jsxs58("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", disabled: applied, onClick: () => onApply(packet), children: [
8033
- /* @__PURE__ */ jsx62("i", { className: "ph ph-" + (applied ? "check" : "arrow-square-in"), "aria-hidden": "true" }),
8039
+ invalid ? /* @__PURE__ */ jsxs59("div", { className: "fdc-packet-alert", role: "alert", children: [
8040
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8041
+ /* @__PURE__ */ jsx63("span", { children: packet.error || "This result failed validation and can\u2019t be applied." })
8042
+ ] }) : /* @__PURE__ */ jsx63("div", { className: "fdc-packet-body", children: render ? render(packet) : /* @__PURE__ */ jsx63(JsonView, { value: packet.payload }) }),
8043
+ !invalid && onApply ? /* @__PURE__ */ jsxs59("footer", { className: "fdc-packet-foot", children: [
8044
+ packet.repaired ? /* @__PURE__ */ jsx63("span", { className: "fdc-packet-note", children: "Corrected by the backend after a first attempt." }) : /* @__PURE__ */ jsx63("span", {}),
8045
+ /* @__PURE__ */ jsxs59("button", { type: "button", className: "fd-btn fd-btn-primary fd-btn-sm", disabled: applied, onClick: () => onApply(packet), children: [
8046
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-" + (applied ? "check" : "arrow-square-in"), "aria-hidden": "true" }),
8034
8047
  applied ? "Applied" : s.applyLabel || "Apply"
8035
8048
  ] })
8036
8049
  ] }) : null
@@ -8039,37 +8052,37 @@ function PacketCard({ packet, schema, render, onApply, applied }) {
8039
8052
  function ThinkingBlock({ text, durationMs, streaming, defaultOpen = false }) {
8040
8053
  const [open, setOpen] = React34.useState(defaultOpen);
8041
8054
  if (!text) return null;
8042
- return /* @__PURE__ */ jsxs58("div", { className: "fdc-think" + (open ? " is-open" : ""), children: [
8043
- /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-think-head", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
8044
- /* @__PURE__ */ jsx62("i", { className: "ph ph-brain", "aria-hidden": "true" }),
8045
- /* @__PURE__ */ jsx62("span", { children: streaming ? "Thinking" : durationMs ? "Thought for " + formatDuration(durationMs) : "Thought process" }),
8046
- streaming ? /* @__PURE__ */ jsxs58("span", { className: "fdc-dots", "aria-hidden": "true", children: [
8047
- /* @__PURE__ */ jsx62("span", {}),
8048
- /* @__PURE__ */ jsx62("span", {}),
8049
- /* @__PURE__ */ jsx62("span", {})
8055
+ return /* @__PURE__ */ jsxs59("div", { className: "fdc-think" + (open ? " is-open" : ""), children: [
8056
+ /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-think-head", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
8057
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-brain", "aria-hidden": "true" }),
8058
+ /* @__PURE__ */ jsx63("span", { children: streaming ? "Thinking" : durationMs ? "Thought for " + formatDuration(durationMs) : "Thought process" }),
8059
+ streaming ? /* @__PURE__ */ jsxs59("span", { className: "fdc-dots", "aria-hidden": "true", children: [
8060
+ /* @__PURE__ */ jsx63("span", {}),
8061
+ /* @__PURE__ */ jsx63("span", {}),
8062
+ /* @__PURE__ */ jsx63("span", {})
8050
8063
  ] }) : null,
8051
- /* @__PURE__ */ jsx62("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" })
8064
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" })
8052
8065
  ] }),
8053
- open ? /* @__PURE__ */ jsx62("div", { className: "fdc-think-body", children: text }) : null
8066
+ open ? /* @__PURE__ */ jsx63("div", { className: "fdc-think-body", children: text }) : null
8054
8067
  ] });
8055
8068
  }
8056
8069
  function Citations({ items = [], onOpen }) {
8057
8070
  const [open, setOpen] = React34.useState(false);
8058
8071
  if (!items.length) return null;
8059
- return /* @__PURE__ */ jsxs58("div", { className: "fdc-cites", children: [
8060
- /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-cites-head", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
8061
- /* @__PURE__ */ jsx62("i", { className: "ph ph-quotes", "aria-hidden": "true" }),
8062
- /* @__PURE__ */ jsxs58("span", { children: [
8072
+ return /* @__PURE__ */ jsxs59("div", { className: "fdc-cites", children: [
8073
+ /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-cites-head", onClick: () => setOpen((v) => !v), "aria-expanded": open, children: [
8074
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-quotes", "aria-hidden": "true" }),
8075
+ /* @__PURE__ */ jsxs59("span", { children: [
8063
8076
  items.length,
8064
8077
  " source",
8065
8078
  items.length === 1 ? "" : "s"
8066
8079
  ] }),
8067
- /* @__PURE__ */ jsx62("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" })
8080
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-caret-" + (open ? "up" : "down"), "aria-hidden": "true" })
8068
8081
  ] }),
8069
- open ? /* @__PURE__ */ jsx62("ol", { className: "fdc-cites-list", children: items.map((c, i) => /* @__PURE__ */ jsxs58("li", { children: [
8070
- /* @__PURE__ */ jsx62("span", { className: "fdc-cite-n fd-tabular", children: c.marker || i + 1 }),
8071
- c.url ? /* @__PURE__ */ jsx62("a", { href: c.url, target: "_blank", rel: "noopener noreferrer", onClick: onOpen ? (e) => onOpen(c, e) : void 0, children: c.title || c.url }) : /* @__PURE__ */ jsx62("span", { children: c.title || "Source" }),
8072
- c.detail ? /* @__PURE__ */ jsx62("span", { className: "fdc-cite-detail", children: c.detail }) : null
8082
+ open ? /* @__PURE__ */ jsx63("ol", { className: "fdc-cites-list", children: items.map((c, i) => /* @__PURE__ */ jsxs59("li", { children: [
8083
+ /* @__PURE__ */ jsx63("span", { className: "fdc-cite-n fd-tabular", children: c.marker || i + 1 }),
8084
+ c.url ? /* @__PURE__ */ jsx63("a", { href: c.url, target: "_blank", rel: "noopener noreferrer", onClick: onOpen ? (e) => onOpen(c, e) : void 0, children: c.title || c.url }) : /* @__PURE__ */ jsx63("span", { children: c.title || "Source" }),
8085
+ c.detail ? /* @__PURE__ */ jsx63("span", { className: "fdc-cite-detail", children: c.detail }) : null
8073
8086
  ] }, c.id || i)) }) : null
8074
8087
  ] });
8075
8088
  }
@@ -8086,23 +8099,23 @@ function MessageBody({ message: m, ctx }) {
8086
8099
  const clamped = !expanded && !m.streaming ? clampText(raw, ctx.maxVisibleChars) : null;
8087
8100
  const body = clamped != null ? clamped : raw;
8088
8101
  const showMd = ctx.markdown && !isUser;
8089
- return /* @__PURE__ */ jsxs58("div", { className: "fdc-body", children: [
8090
- m.thinking && ctx.showThinking ? /* @__PURE__ */ jsx62(ThinkingBlock, { text: m.thinking, durationMs: m.thinkingMs, streaming: m.streaming && !m.text }) : null,
8091
- m.steps && m.steps.length && ctx.showSteps ? /* @__PURE__ */ jsx62(StepList, { steps: m.steps, defaultOpen: m.steps.some((s) => s.status === "running"), dense: true }) : null,
8092
- body ? /* @__PURE__ */ jsxs58("div", { className: "fdc-text" + (isUser ? " is-user" : ""), children: [
8093
- showMd ? /* @__PURE__ */ jsx62(Markdown, { source: body, headingOffset: 2, codeProps: { collapseAfter: 22 }, renderCitation: ctx.renderCitation }) : /* @__PURE__ */ jsx62("div", { className: "fdc-plain", children: body }),
8094
- m.streaming ? /* @__PURE__ */ jsx62("span", { className: "fdc-caret", "aria-hidden": "true" }) : null
8102
+ return /* @__PURE__ */ jsxs59("div", { className: "fdc-body", children: [
8103
+ m.thinking && ctx.showThinking ? /* @__PURE__ */ jsx63(ThinkingBlock, { text: m.thinking, durationMs: m.thinkingMs, streaming: m.streaming && !m.text }) : null,
8104
+ m.steps && m.steps.length && ctx.showSteps ? /* @__PURE__ */ jsx63(StepList, { steps: m.steps, defaultOpen: m.steps.some((s) => s.status === "running"), dense: true }) : null,
8105
+ body ? /* @__PURE__ */ jsxs59("div", { className: "fdc-text" + (isUser ? " is-user" : ""), children: [
8106
+ showMd ? /* @__PURE__ */ jsx63(Markdown, { source: body, headingOffset: 2, codeProps: { collapseAfter: 22 }, renderCitation: ctx.renderCitation }) : /* @__PURE__ */ jsx63("div", { className: "fdc-plain", children: body }),
8107
+ m.streaming ? /* @__PURE__ */ jsx63("span", { className: "fdc-caret", "aria-hidden": "true" }) : null
8095
8108
  ] }) : null,
8096
- clamped != null ? /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(true), children: [
8097
- /* @__PURE__ */ jsx62("i", { className: "ph ph-caret-down", "aria-hidden": "true" }),
8109
+ clamped != null ? /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(true), children: [
8110
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-caret-down", "aria-hidden": "true" }),
8098
8111
  "Show more",
8099
- /* @__PURE__ */ jsx62("span", { className: "fdc-more-len fd-tabular", children: raw.length < 2e3 ? raw.length.toLocaleString() + " characters" : Math.round(raw.length / 100) / 10 + "k characters" })
8100
- ] }) : expanded && ctx.maxVisibleChars && raw.length > ctx.maxVisibleChars ? /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(false), children: [
8101
- /* @__PURE__ */ jsx62("i", { className: "ph ph-caret-up", "aria-hidden": "true" }),
8112
+ /* @__PURE__ */ jsx63("span", { className: "fdc-more-len fd-tabular", children: raw.length < 2e3 ? raw.length.toLocaleString() + " characters" : Math.round(raw.length / 100) / 10 + "k characters" })
8113
+ ] }) : expanded && ctx.maxVisibleChars && raw.length > ctx.maxVisibleChars ? /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-more", onClick: () => setExpanded(false), children: [
8114
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-caret-up", "aria-hidden": "true" }),
8102
8115
  "Show less"
8103
8116
  ] }) : null,
8104
- m.attachments && m.attachments.length ? /* @__PURE__ */ jsx62(FileGrid, { files: m.attachments, onOpen: ctx.onOpenAttachment, tiles: true, maxHeight: ctx.attachmentHeight || 220, compact: ctx.narrow }) : null,
8105
- m.packet ? /* @__PURE__ */ jsx62(
8117
+ m.attachments && m.attachments.length ? /* @__PURE__ */ jsx63(FileGrid, { files: m.attachments, onOpen: ctx.onOpenAttachment, tiles: true, maxHeight: ctx.attachmentHeight || 220, compact: ctx.narrow }) : null,
8118
+ m.packet ? /* @__PURE__ */ jsx63(
8106
8119
  PacketCard,
8107
8120
  {
8108
8121
  packet: m.packet,
@@ -8112,35 +8125,35 @@ function MessageBody({ message: m, ctx }) {
8112
8125
  applied: ctx.appliedPackets && ctx.appliedPackets[m.id]
8113
8126
  }
8114
8127
  ) : null,
8115
- m.citations && m.citations.length ? /* @__PURE__ */ jsx62(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
8116
- m.working ? /* @__PURE__ */ jsxs58("div", { className: "fdc-working", role: "status", children: [
8117
- /* @__PURE__ */ jsxs58("span", { className: "fdc-dots", "aria-hidden": "true", children: [
8118
- /* @__PURE__ */ jsx62("span", {}),
8119
- /* @__PURE__ */ jsx62("span", {}),
8120
- /* @__PURE__ */ jsx62("span", {})
8128
+ m.citations && m.citations.length ? /* @__PURE__ */ jsx63(Citations, { items: m.citations, onOpen: ctx.onOpenCitation }) : null,
8129
+ m.working ? /* @__PURE__ */ jsxs59("div", { className: "fdc-working", role: "status", children: [
8130
+ /* @__PURE__ */ jsxs59("span", { className: "fdc-dots", "aria-hidden": "true", children: [
8131
+ /* @__PURE__ */ jsx63("span", {}),
8132
+ /* @__PURE__ */ jsx63("span", {}),
8133
+ /* @__PURE__ */ jsx63("span", {})
8121
8134
  ] }),
8122
- /* @__PURE__ */ jsxs58("span", { className: "fdc-working-label", children: [
8135
+ /* @__PURE__ */ jsxs59("span", { className: "fdc-working-label", children: [
8123
8136
  m.resumed ? "Resuming" : "Working",
8124
- m.job && m.job.status ? /* @__PURE__ */ jsxs58("span", { className: "fdc-working-job", children: [
8137
+ m.job && m.job.status ? /* @__PURE__ */ jsxs59("span", { className: "fdc-working-job", children: [
8125
8138
  " \xB7 ",
8126
8139
  m.job.status
8127
8140
  ] }) : null,
8128
- m.job && m.job.detail ? /* @__PURE__ */ jsxs58("span", { className: "fdc-working-job", children: [
8141
+ m.job && m.job.detail ? /* @__PURE__ */ jsxs59("span", { className: "fdc-working-job", children: [
8129
8142
  " \xB7 ",
8130
8143
  m.job.detail
8131
8144
  ] }) : null
8132
8145
  ] }),
8133
- m.jobId ? /* @__PURE__ */ jsx62("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
8146
+ m.jobId ? /* @__PURE__ */ jsx63("span", { className: "fdc-working-id fd-mono", children: String(m.jobId).slice(0, 12) }) : null
8134
8147
  ] }) : null,
8135
- m.stopped ? /* @__PURE__ */ jsxs58("div", { className: "fdc-stopped", children: [
8136
- /* @__PURE__ */ jsx62("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
8148
+ m.stopped ? /* @__PURE__ */ jsxs59("div", { className: "fdc-stopped", children: [
8149
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
8137
8150
  "Stopped"
8138
8151
  ] }) : null,
8139
- m.error ? /* @__PURE__ */ jsxs58("div", { className: "fdc-error", role: "alert", children: [
8140
- /* @__PURE__ */ jsx62("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8141
- /* @__PURE__ */ jsx62("span", { className: "fdc-error-text", children: ctx.errorCopy ? ctx.errorCopy(m.error) : m.error }),
8142
- m.retryable && ctx.onRetry ? /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-error-retry", onClick: ctx.onRetry, children: [
8143
- /* @__PURE__ */ jsx62("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
8152
+ m.error ? /* @__PURE__ */ jsxs59("div", { className: "fdc-error", role: "alert", children: [
8153
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8154
+ /* @__PURE__ */ jsx63("span", { className: "fdc-error-text", children: ctx.errorCopy ? ctx.errorCopy(m.error) : m.error }),
8155
+ m.retryable && ctx.onRetry ? /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-error-retry", onClick: ctx.onRetry, children: [
8156
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
8144
8157
  "Retry"
8145
8158
  ] }) : null
8146
8159
  ] }) : null
@@ -8169,16 +8182,16 @@ function RunActions({ group, ctx }) {
8169
8182
  const isAssistant = group.role === "assistant";
8170
8183
  const fb = last.feedback;
8171
8184
  if (!ctx.messageActions) return null;
8172
- return /* @__PURE__ */ jsxs58("div", { className: "fdc-actions", role: "group", "aria-label": "Message actions", children: [
8173
- /* @__PURE__ */ jsxs58("button", { type: "button", className: "fdc-act" + (copied ? " is-done" : ""), onClick: () => copy(markdownToText(text)), "aria-label": "Copy message", children: [
8174
- /* @__PURE__ */ jsx62("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
8175
- /* @__PURE__ */ jsx62("span", { className: "fdc-act-label", children: copied ? "Copied" : "Copy" })
8185
+ return /* @__PURE__ */ jsxs59("div", { className: "fdc-actions", role: "group", "aria-label": "Message actions", children: [
8186
+ /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-act" + (copied ? " is-done" : ""), onClick: () => copy(markdownToText(text)), "aria-label": "Copy message", children: [
8187
+ /* @__PURE__ */ jsx63("i", { className: "ph ph-" + (copied ? "check" : "copy"), "aria-hidden": "true" }),
8188
+ /* @__PURE__ */ jsx63("span", { className: "fdc-act-label", children: copied ? "Copied" : "Copy" })
8176
8189
  ] }),
8177
- isAssistant && ctx.onRetry ? /* @__PURE__ */ jsx62("button", { type: "button", className: "fdc-act", onClick: ctx.onRetry, "aria-label": "Retry this turn", children: /* @__PURE__ */ jsx62("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
8178
- group.role === "user" && ctx.onEdit ? /* @__PURE__ */ jsx62("button", { type: "button", className: "fdc-act", onClick: () => ctx.onEdit(last), "aria-label": "Edit and resend", children: /* @__PURE__ */ jsx62("i", { className: "ph ph-pencil-simple", "aria-hidden": "true" }) }) : null,
8179
- isAssistant && ctx.onFeedback ? /* @__PURE__ */ jsxs58(React34.Fragment, { children: [
8180
- /* @__PURE__ */ jsx62("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__ */ jsx62("i", { className: "ph ph-thumbs-up", "aria-hidden": "true" }) }),
8181
- /* @__PURE__ */ jsx62("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__ */ jsx62("i", { className: "ph ph-thumbs-down", "aria-hidden": "true" }) })
8190
+ isAssistant && ctx.onRetry ? /* @__PURE__ */ jsx63("button", { type: "button", className: "fdc-act", onClick: ctx.onRetry, "aria-label": "Retry this turn", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }) }) : null,
8191
+ group.role === "user" && ctx.onEdit ? /* @__PURE__ */ jsx63("button", { type: "button", className: "fdc-act", onClick: () => ctx.onEdit(last), "aria-label": "Edit and resend", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-pencil-simple", "aria-hidden": "true" }) }) : null,
8192
+ isAssistant && ctx.onFeedback ? /* @__PURE__ */ jsxs59(React34.Fragment, { children: [
8193
+ /* @__PURE__ */ jsx63("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__ */ jsx63("i", { className: "ph ph-thumbs-up", "aria-hidden": "true" }) }),
8194
+ /* @__PURE__ */ jsx63("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__ */ jsx63("i", { className: "ph ph-thumbs-down", "aria-hidden": "true" }) })
8182
8195
  ] }) : null,
8183
8196
  ctx.extraActions ? ctx.extraActions(group) : null
8184
8197
  ] });
@@ -8188,22 +8201,22 @@ function ChatTurn({ group, ctx }) {
8188
8201
  const name = isUser ? ctx.userName : group.author || ctx.assistantName;
8189
8202
  const avatar = isUser ? ctx.userAvatar : ctx.assistantAvatar;
8190
8203
  const stamp = group.messages[0].timestamp;
8191
- return /* @__PURE__ */ jsxs58("article", { className: "fdc-turn is-" + group.role, "aria-label": String(name) + (stamp ? " at " + formatClock(stamp) : ""), children: [
8192
- /* @__PURE__ */ jsxs58("div", { className: "fdc-turn-head", children: [
8193
- ctx.showAvatars ? /* @__PURE__ */ jsx62("span", { className: "fdc-avatar is-" + group.role, "aria-hidden": "true", children: avatar ? /* @__PURE__ */ jsx62("img", { src: avatar, alt: "" }) : isUser ? /* @__PURE__ */ jsx62("span", { className: "fdc-avatar-txt", children: (name || "You").slice(0, 1).toUpperCase() }) : /* @__PURE__ */ jsx62("i", { className: "ph ph-" + (ctx.assistantIcon || "sparkle") }) }) : null,
8194
- /* @__PURE__ */ jsx62("span", { className: "fdc-who", children: name }),
8195
- stamp ? /* @__PURE__ */ jsx62(RelativeTime, { className: "fdc-when", value: stamp }) : null,
8196
- group.messages.some((m) => m.model) ? /* @__PURE__ */ jsx62("span", { className: "fdc-turn-model", children: group.messages.find((m) => m.model).model }) : null
8204
+ return /* @__PURE__ */ jsxs59("article", { className: "fdc-turn is-" + group.role, "aria-label": String(name) + (stamp ? " at " + formatClock(stamp) : ""), children: [
8205
+ /* @__PURE__ */ jsxs59("div", { className: "fdc-turn-head", children: [
8206
+ ctx.showAvatars ? /* @__PURE__ */ jsx63("span", { className: "fdc-avatar is-" + group.role, "aria-hidden": "true", children: avatar ? /* @__PURE__ */ jsx63("img", { src: avatar, alt: "" }) : isUser ? /* @__PURE__ */ jsx63("span", { className: "fdc-avatar-txt", children: (name || "You").slice(0, 1).toUpperCase() }) : /* @__PURE__ */ jsx63("i", { className: "ph ph-" + (ctx.assistantIcon || "sparkle") }) }) : null,
8207
+ /* @__PURE__ */ jsx63("span", { className: "fdc-who", children: name }),
8208
+ stamp ? /* @__PURE__ */ jsx63(RelativeTime, { className: "fdc-when", value: stamp }) : null,
8209
+ group.messages.some((m) => m.model) ? /* @__PURE__ */ jsx63("span", { className: "fdc-turn-model", children: group.messages.find((m) => m.model).model }) : null
8197
8210
  ] }),
8198
- /* @__PURE__ */ jsxs58("div", { className: "fdc-turn-body", children: [
8199
- group.messages.map((m) => /* @__PURE__ */ jsx62("div", { className: "fdc-msg" + (m.pending ? " is-pending" : ""), children: /* @__PURE__ */ jsx62(MessageBody, { message: m, ctx }) }, m.id)),
8200
- /* @__PURE__ */ jsx62(RunActions, { group, ctx })
8211
+ /* @__PURE__ */ jsxs59("div", { className: "fdc-turn-body", children: [
8212
+ group.messages.map((m) => /* @__PURE__ */ jsx63("div", { className: "fdc-msg" + (m.pending ? " is-pending" : ""), children: /* @__PURE__ */ jsx63(MessageBody, { message: m, ctx }) }, m.id)),
8213
+ /* @__PURE__ */ jsx63(RunActions, { group, ctx })
8201
8214
  ] })
8202
8215
  ] });
8203
8216
  }
8204
8217
 
8205
8218
  // src/components/chat/ChatTranscript.tsx
8206
- import { jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
8219
+ import { jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
8207
8220
  var GROUP_WINDOW = 6e4;
8208
8221
  var STICK_PX = 100;
8209
8222
  function groupMessages(list) {
@@ -8236,25 +8249,25 @@ function dayLabel(key) {
8236
8249
  }
8237
8250
  function Suggestions({ items = [], onPick }) {
8238
8251
  if (!items.length) return null;
8239
- return /* @__PURE__ */ jsx63("div", { className: "fdc-suggest", children: items.map((s, i) => {
8252
+ return /* @__PURE__ */ jsx64("div", { className: "fdc-suggest", children: items.map((s, i) => {
8240
8253
  const it = typeof s === "string" ? { label: s, text: s } : s;
8241
- return /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-suggest-item", onClick: () => onPick && onPick(it.text || it.label), children: [
8242
- it.icon ? /* @__PURE__ */ jsx63("i", { className: "ph ph-" + it.icon, "aria-hidden": "true" }) : null,
8243
- /* @__PURE__ */ jsxs59("span", { className: "fdc-suggest-text", children: [
8244
- /* @__PURE__ */ jsx63("span", { className: "fdc-suggest-label", children: it.label }),
8245
- it.description ? /* @__PURE__ */ jsx63("span", { className: "fdc-suggest-desc", children: it.description }) : null
8254
+ return /* @__PURE__ */ jsxs60("button", { type: "button", className: "fdc-suggest-item", onClick: () => onPick && onPick(it.text || it.label), children: [
8255
+ it.icon ? /* @__PURE__ */ jsx64("i", { className: "ph ph-" + it.icon, "aria-hidden": "true" }) : null,
8256
+ /* @__PURE__ */ jsxs60("span", { className: "fdc-suggest-text", children: [
8257
+ /* @__PURE__ */ jsx64("span", { className: "fdc-suggest-label", children: it.label }),
8258
+ it.description ? /* @__PURE__ */ jsx64("span", { className: "fdc-suggest-desc", children: it.description }) : null
8246
8259
  ] }),
8247
- /* @__PURE__ */ jsx63("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
8260
+ /* @__PURE__ */ jsx64("i", { className: "ph ph-arrow-up-right fdc-suggest-go", "aria-hidden": "true" })
8248
8261
  ] }, it.id || i);
8249
8262
  }) });
8250
8263
  }
8251
8264
  function LoadingTurns() {
8252
- return /* @__PURE__ */ jsx63("div", { className: "fdc-skel", "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsxs59("div", { className: "fdc-skel-turn", children: [
8253
- /* @__PURE__ */ jsx63("div", { className: "fd-skel fd-skel-circle", style: { width: 22, height: 22 } }),
8254
- /* @__PURE__ */ jsxs59("div", { className: "fdc-skel-lines", children: [
8255
- /* @__PURE__ */ jsx63("div", { className: "fd-skel", style: { width: i ? "62%" : "44%", height: 11 } }),
8256
- /* @__PURE__ */ jsx63("div", { className: "fd-skel", style: { width: i ? "94%" : "78%", height: 11 } }),
8257
- /* @__PURE__ */ jsx63("div", { className: "fd-skel", style: { width: i ? "71%" : "56%", height: 11 } })
8265
+ return /* @__PURE__ */ jsx64("div", { className: "fdc-skel", "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsxs60("div", { className: "fdc-skel-turn", children: [
8266
+ /* @__PURE__ */ jsx64("div", { className: "fd-skel fd-skel-circle", style: { width: 22, height: 22 } }),
8267
+ /* @__PURE__ */ jsxs60("div", { className: "fdc-skel-lines", children: [
8268
+ /* @__PURE__ */ jsx64("div", { className: "fd-skel", style: { width: i ? "62%" : "44%", height: 11 } }),
8269
+ /* @__PURE__ */ jsx64("div", { className: "fd-skel", style: { width: i ? "94%" : "78%", height: 11 } }),
8270
+ /* @__PURE__ */ jsx64("div", { className: "fd-skel", style: { width: i ? "71%" : "56%", height: 11 } })
8258
8271
  ] })
8259
8272
  ] }, i)) });
8260
8273
  }
@@ -8313,36 +8326,36 @@ function ChatTranscript({
8313
8326
  }, []);
8314
8327
  const groups = React35.useMemo(() => groupMessages(messages), [messages]);
8315
8328
  const empty = !messages.length && status === "ready";
8316
- return /* @__PURE__ */ jsxs59("div", { className: ["fdc-scroll", className].filter(Boolean).join(" "), ref: scroller, onScroll, children: [
8317
- /* @__PURE__ */ jsxs59("div", { className: "fdc-log", role: "log", "aria-label": "Conversation", children: [
8318
- status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx63(LoadingTurns, {}) : null,
8319
- status === "disconnected" ? /* @__PURE__ */ jsxs59("div", { className: "fdc-dead", children: [
8320
- /* @__PURE__ */ jsx63("span", { className: "fdc-dead-icon", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-plugs", "aria-hidden": "true" }) }),
8321
- /* @__PURE__ */ jsx63("h3", { className: "fdc-dead-title", children: ctx.deadTitle || "The assistant isn\u2019t reachable" }),
8322
- /* @__PURE__ */ jsx63("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." }),
8323
- ctx.onReconnect ? /* @__PURE__ */ jsxs59("button", { type: "button", className: "fd-btn fd-btn-secondary fd-btn-sm", onClick: ctx.onReconnect, children: [
8324
- /* @__PURE__ */ jsx63("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
8329
+ return /* @__PURE__ */ jsxs60("div", { className: ["fdc-scroll", className].filter(Boolean).join(" "), ref: scroller, onScroll, children: [
8330
+ /* @__PURE__ */ jsxs60("div", { className: "fdc-log", role: "log", "aria-label": "Conversation", children: [
8331
+ status === "loading" || status === "resolving" ? /* @__PURE__ */ jsx64(LoadingTurns, {}) : null,
8332
+ status === "disconnected" ? /* @__PURE__ */ jsxs60("div", { className: "fdc-dead", children: [
8333
+ /* @__PURE__ */ jsx64("span", { className: "fdc-dead-icon", children: /* @__PURE__ */ jsx64("i", { className: "ph ph-plugs", "aria-hidden": "true" }) }),
8334
+ /* @__PURE__ */ jsx64("h3", { className: "fdc-dead-title", children: ctx.deadTitle || "The assistant isn\u2019t reachable" }),
8335
+ /* @__PURE__ */ jsx64("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." }),
8336
+ ctx.onReconnect ? /* @__PURE__ */ jsxs60("button", { type: "button", className: "fd-btn fd-btn-secondary fd-btn-sm", onClick: ctx.onReconnect, children: [
8337
+ /* @__PURE__ */ jsx64("i", { className: "ph ph-arrow-clockwise", "aria-hidden": "true" }),
8325
8338
  "Try again"
8326
8339
  ] }) : null
8327
8340
  ] }) : null,
8328
- empty ? renderEmpty ? renderEmpty() : /* @__PURE__ */ jsxs59("div", { className: "fdc-empty", children: [
8329
- /* @__PURE__ */ jsx63("span", { className: "fdc-empty-icon", children: /* @__PURE__ */ jsx63("i", { className: "ph ph-" + emptyIcon, "aria-hidden": "true" }) }),
8330
- /* @__PURE__ */ jsx63("h3", { className: "fdc-empty-title", children: emptyTitle }),
8331
- emptyDescription ? /* @__PURE__ */ jsx63("p", { className: "fdc-empty-body", children: emptyDescription }) : null,
8332
- /* @__PURE__ */ jsx63(Suggestions, { items: suggestions, onPick })
8341
+ empty ? renderEmpty ? renderEmpty() : /* @__PURE__ */ jsxs60("div", { className: "fdc-empty", children: [
8342
+ /* @__PURE__ */ jsx64("span", { className: "fdc-empty-icon", children: /* @__PURE__ */ jsx64("i", { className: "ph ph-" + emptyIcon, "aria-hidden": "true" }) }),
8343
+ /* @__PURE__ */ jsx64("h3", { className: "fdc-empty-title", children: emptyTitle }),
8344
+ emptyDescription ? /* @__PURE__ */ jsx64("p", { className: "fdc-empty-body", children: emptyDescription }) : null,
8345
+ /* @__PURE__ */ jsx64(Suggestions, { items: suggestions, onPick })
8333
8346
  ] }) : null,
8334
8347
  groups.map((g, i) => {
8335
8348
  const prev = groups[i - 1];
8336
8349
  const k = dayKey(g.messages[0].timestamp);
8337
8350
  const showDay = !!k && (!prev || dayKey(prev.messages[0].timestamp) !== k);
8338
- return /* @__PURE__ */ jsxs59(React35.Fragment, { children: [
8339
- showDay ? /* @__PURE__ */ jsx63("div", { className: "fdc-day", children: /* @__PURE__ */ jsx63("span", { children: dayLabel(k) }) }) : null,
8340
- /* @__PURE__ */ jsx63(ChatTurn, { group: g, ctx })
8351
+ return /* @__PURE__ */ jsxs60(React35.Fragment, { children: [
8352
+ showDay ? /* @__PURE__ */ jsx64("div", { className: "fdc-day", children: /* @__PURE__ */ jsx64("span", { children: dayLabel(k) }) }) : null,
8353
+ /* @__PURE__ */ jsx64(ChatTurn, { group: g, ctx })
8341
8354
  ] }, g.key || i);
8342
8355
  })
8343
8356
  ] }),
8344
- pill ? /* @__PURE__ */ jsxs59("button", { type: "button", className: "fdc-pill", onClick: () => toBottom(true), children: [
8345
- /* @__PURE__ */ jsx63("i", { className: "ph ph-arrow-down", "aria-hidden": "true" }),
8357
+ pill ? /* @__PURE__ */ jsxs60("button", { type: "button", className: "fdc-pill", onClick: () => toBottom(true), children: [
8358
+ /* @__PURE__ */ jsx64("i", { className: "ph ph-arrow-down", "aria-hidden": "true" }),
8346
8359
  pill,
8347
8360
  " new message",
8348
8361
  pill === 1 ? "" : "s"
@@ -8353,7 +8366,7 @@ var TranscriptKit = { groupMessages };
8353
8366
 
8354
8367
  // src/components/chat/ChatComposer.tsx
8355
8368
  import * as React36 from "react";
8356
- import { jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
8369
+ import { jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
8357
8370
  function ChatComposer({
8358
8371
  onSubmit,
8359
8372
  onStop,
@@ -8456,7 +8469,7 @@ function ChatComposer({
8456
8469
  description: it.description,
8457
8470
  icon: it.icon,
8458
8471
  meta: mention.meta,
8459
- shortcut: slash.shortcut ? /* @__PURE__ */ jsx64(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
8472
+ shortcut: slash.shortcut ? /* @__PURE__ */ jsx65(KeyHint, { keys: slash.shortcut, size: "sm" }) : void 0,
8460
8473
  onSelect: () => {
8461
8474
  const insert = trigger.type === "slash" ? slash.immediate ? "/" + slash.id : "/" + slash.id + " " : "@" + (mention.value || mention.label) + " ";
8462
8475
  editor.current && editor.current.replaceRange(trigger.from, trigger.to, insert);
@@ -8519,14 +8532,14 @@ function ChatComposer({
8519
8532
  stopVoice.current = typeof res === "function" ? res : () => {
8520
8533
  };
8521
8534
  };
8522
- return /* @__PURE__ */ jsxs60("div", { className: "fdc-composer" + (disabled ? " is-disabled" : "") + (narrow ? " is-narrow" : ""), children: [
8523
- queue.length ? /* @__PURE__ */ jsx64("div", { className: "fdc-queue", "aria-label": "Queued messages", children: queue.map((q) => /* @__PURE__ */ jsxs60("div", { className: "fdc-queue-row", children: [
8524
- /* @__PURE__ */ jsx64("i", { className: "ph ph-clock-countdown", "aria-hidden": "true" }),
8525
- /* @__PURE__ */ jsx64("span", { className: "fdc-queue-text", children: q.text || (q.attachments ? q.attachments.length + " file(s)" : "") }),
8526
- onRemoveQueued ? /* @__PURE__ */ jsx64("button", { type: "button", className: "fdc-queue-x", onClick: () => onRemoveQueued(q.id), "aria-label": "Remove queued message", children: /* @__PURE__ */ jsx64("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
8535
+ return /* @__PURE__ */ jsxs61("div", { className: "fdc-composer" + (disabled ? " is-disabled" : "") + (narrow ? " is-narrow" : ""), children: [
8536
+ queue.length ? /* @__PURE__ */ jsx65("div", { className: "fdc-queue", "aria-label": "Queued messages", children: queue.map((q) => /* @__PURE__ */ jsxs61("div", { className: "fdc-queue-row", children: [
8537
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-clock-countdown", "aria-hidden": "true" }),
8538
+ /* @__PURE__ */ jsx65("span", { className: "fdc-queue-text", children: q.text || (q.attachments ? q.attachments.length + " file(s)" : "") }),
8539
+ onRemoveQueued ? /* @__PURE__ */ jsx65("button", { type: "button", className: "fdc-queue-x", onClick: () => onRemoveQueued(q.id), "aria-label": "Remove queued message", children: /* @__PURE__ */ jsx65("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
8527
8540
  ] }, q.id)) }) : null,
8528
8541
  sessionBar,
8529
- /* @__PURE__ */ jsx64(
8542
+ /* @__PURE__ */ jsx65(
8530
8543
  Dropzone,
8531
8544
  {
8532
8545
  className: "fdc-field",
@@ -8540,9 +8553,9 @@ function ChatComposer({
8540
8553
  disabled: !fileUploadHandler || disabled,
8541
8554
  label: "Drop to attach",
8542
8555
  hint: acceptFiles ? acceptFiles.replace(/,/g, " \xB7 ") : void 0,
8543
- children: /* @__PURE__ */ jsxs60("div", { ref: wrap, className: "fdc-field-inner", children: [
8544
- staged.items.length ? /* @__PURE__ */ jsx64("div", { className: "fdc-staged", children: /* @__PURE__ */ jsx64(FileStrip, { files: staged.items, size: narrow ? 60 : 68, onRemove: staged.remove, onRetry: staged.retry, onOpen: onOpenAttachment }) }) : null,
8545
- /* @__PURE__ */ jsx64(
8556
+ children: /* @__PURE__ */ jsxs61("div", { ref: wrap, className: "fdc-field-inner", children: [
8557
+ staged.items.length ? /* @__PURE__ */ jsx65("div", { className: "fdc-staged", children: /* @__PURE__ */ jsx65(FileStrip, { files: staged.items, size: narrow ? 60 : 68, onRemove: staged.remove, onRetry: staged.retry, onOpen: onOpenAttachment }) }) : null,
8558
+ /* @__PURE__ */ jsx65(
8546
8559
  MarkdownEditor,
8547
8560
  {
8548
8561
  ref: editor,
@@ -8561,33 +8574,33 @@ function ChatComposer({
8561
8574
  ariaLabel: "Message"
8562
8575
  }
8563
8576
  ),
8564
- /* @__PURE__ */ jsxs60("div", { className: "fdc-tools", children: [
8565
- fileUploadHandler ? /* @__PURE__ */ jsx64(FilePickButton, { onFiles: staged.add, onReject: (r) => flash(r[0].message), accept: acceptFiles, maxFileSize, label: "Attach files", icon: "plus" }) : null,
8566
- voiceHandler ? /* @__PURE__ */ jsx64("button", { type: "button", className: "fd-attachbtn" + (listening ? " is-live" : ""), onClick: voice, "aria-pressed": listening, "aria-label": listening ? "Stop dictation" : "Dictate", children: /* @__PURE__ */ jsx64("i", { className: "ph ph-" + (listening ? "waveform" : "microphone"), "aria-hidden": "true" }) }) : null,
8577
+ /* @__PURE__ */ jsxs61("div", { className: "fdc-tools", children: [
8578
+ fileUploadHandler ? /* @__PURE__ */ jsx65(FilePickButton, { onFiles: staged.add, onReject: (r) => flash(r[0].message), accept: acceptFiles, maxFileSize, label: "Attach files", icon: "plus" }) : null,
8579
+ voiceHandler ? /* @__PURE__ */ jsx65("button", { type: "button", className: "fd-attachbtn" + (listening ? " is-live" : ""), onClick: voice, "aria-pressed": listening, "aria-label": listening ? "Stop dictation" : "Dictate", children: /* @__PURE__ */ jsx65("i", { className: "ph ph-" + (listening ? "waveform" : "microphone"), "aria-hidden": "true" }) }) : null,
8567
8580
  toolbarExtras,
8568
- /* @__PURE__ */ jsx64("span", { className: "fdc-tools-gap" }),
8569
- maxLength && text.length > maxLength * 0.6 ? /* @__PURE__ */ jsxs60("span", { className: "fdc-count fd-tabular" + (text.length > maxLength * 0.95 ? " is-hot" : ""), children: [
8581
+ /* @__PURE__ */ jsx65("span", { className: "fdc-tools-gap" }),
8582
+ maxLength && text.length > maxLength * 0.6 ? /* @__PURE__ */ jsxs61("span", { className: "fdc-count fd-tabular" + (text.length > maxLength * 0.95 ? " is-hot" : ""), children: [
8570
8583
  text.length,
8571
8584
  "/",
8572
8585
  maxLength
8573
8586
  ] }) : null,
8574
- busy ? /* @__PURE__ */ jsxs60("button", { type: "button", className: "fdc-stop", onClick: onStop, "aria-label": "Stop generating", children: [
8575
- /* @__PURE__ */ jsx64("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
8576
- /* @__PURE__ */ jsx64("span", { children: "Stop" })
8577
- ] }) : /* @__PURE__ */ jsxs60("button", { type: "button", className: "fdc-send", onClick: submit, disabled: !canSend, "aria-label": "Send message", children: [
8578
- /* @__PURE__ */ jsx64("i", { className: "ph ph-paper-plane-right", "aria-hidden": "true" }),
8579
- /* @__PURE__ */ jsx64("span", { className: "fdc-send-label", children: "Send" })
8587
+ busy ? /* @__PURE__ */ jsxs61("button", { type: "button", className: "fdc-stop", onClick: onStop, "aria-label": "Stop generating", children: [
8588
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-stop-circle", "aria-hidden": "true" }),
8589
+ /* @__PURE__ */ jsx65("span", { children: "Stop" })
8590
+ ] }) : /* @__PURE__ */ jsxs61("button", { type: "button", className: "fdc-send", onClick: submit, disabled: !canSend, "aria-label": "Send message", children: [
8591
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-paper-plane-right", "aria-hidden": "true" }),
8592
+ /* @__PURE__ */ jsx65("span", { className: "fdc-send-label", children: "Send" })
8580
8593
  ] })
8581
8594
  ] })
8582
8595
  ] })
8583
8596
  }
8584
8597
  ),
8585
- notice ? /* @__PURE__ */ jsxs60("div", { className: "fdc-notice", role: "status", children: [
8586
- /* @__PURE__ */ jsx64("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8598
+ notice ? /* @__PURE__ */ jsxs61("div", { className: "fdc-notice", role: "status", children: [
8599
+ /* @__PURE__ */ jsx65("i", { className: "ph ph-warning-circle", "aria-hidden": "true" }),
8587
8600
  notice
8588
8601
  ] }) : null,
8589
- hint && !notice ? /* @__PURE__ */ jsx64("div", { className: "fdc-hint", children: hint }) : null,
8590
- /* @__PURE__ */ jsx64(
8602
+ hint && !notice ? /* @__PURE__ */ jsx65("div", { className: "fdc-hint", children: hint }) : null,
8603
+ /* @__PURE__ */ jsx65(
8591
8604
  Popover,
8592
8605
  {
8593
8606
  open: menuOpen,
@@ -8601,12 +8614,12 @@ function ChatComposer({
8601
8614
  returnFocus: false,
8602
8615
  closeOnOutside: true,
8603
8616
  label: trigger && trigger.type === "slash" ? "Commands" : "Mentions",
8604
- children: /* @__PURE__ */ jsx64(
8617
+ children: /* @__PURE__ */ jsx65(
8605
8618
  Menu,
8606
8619
  {
8607
8620
  items: menuItems,
8608
8621
  autoFocus: false,
8609
- header: /* @__PURE__ */ jsx64("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
8622
+ header: /* @__PURE__ */ jsx65("div", { className: "fd-pop-group", children: trigger && trigger.type === "slash" ? "Commands" : "Attach context" }),
8610
8623
  onClose: () => setTrigger(null)
8611
8624
  }
8612
8625
  )
@@ -8617,7 +8630,7 @@ function ChatComposer({
8617
8630
 
8618
8631
  // src/components/chat/ChatSessionBar.tsx
8619
8632
  import * as React37 from "react";
8620
- import { jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
8633
+ import { jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
8621
8634
  var compact2 = meterFormats.compact;
8622
8635
  function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extras }) {
8623
8636
  const [open, setOpen] = React37.useState(false);
@@ -8636,9 +8649,9 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
8636
8649
  if (stats && stats.runningTasks) bits.push(stats.runningTasks + " running task" + (stats.runningTasks === 1 ? "" : "s"));
8637
8650
  if (cu) bits.push(pct + "% context");
8638
8651
  const expandable = !!(cu || limits);
8639
- return /* @__PURE__ */ jsxs61(React37.Fragment, { children: [
8640
- /* @__PURE__ */ jsxs61("div", { className: "fdc-bar", children: [
8641
- /* @__PURE__ */ jsxs61(
8652
+ return /* @__PURE__ */ jsxs62(React37.Fragment, { children: [
8653
+ /* @__PURE__ */ jsxs62("div", { className: "fdc-bar", children: [
8654
+ /* @__PURE__ */ jsxs62(
8642
8655
  "button",
8643
8656
  {
8644
8657
  type: "button",
@@ -8649,16 +8662,16 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
8649
8662
  "aria-expanded": expandable ? open : void 0,
8650
8663
  "aria-label": expandable ? "Usage details" : void 0,
8651
8664
  children: [
8652
- cu ? /* @__PURE__ */ jsx65("span", { className: "fdc-bar-mini", "aria-hidden": "true", children: /* @__PURE__ */ jsx65(SegmentedMeter, { total, segments: cu.segments, height: 4, showTotal: false }) }) : null,
8653
- /* @__PURE__ */ jsx65("span", { className: "fdc-bar-text", children: bits.join(" \xB7 ") }),
8654
- expandable ? /* @__PURE__ */ jsx65("i", { className: "ph ph-caret-right fdc-bar-caret", "aria-hidden": "true" }) : null
8665
+ cu ? /* @__PURE__ */ jsx66("span", { className: "fdc-bar-mini", "aria-hidden": "true", children: /* @__PURE__ */ jsx66(SegmentedMeter, { total, segments: cu.segments, height: 4, showTotal: false }) }) : null,
8666
+ /* @__PURE__ */ jsx66("span", { className: "fdc-bar-text", children: bits.join(" \xB7 ") }),
8667
+ expandable ? /* @__PURE__ */ jsx66("i", { className: "ph ph-caret-right fdc-bar-caret", "aria-hidden": "true" }) : null
8655
8668
  ]
8656
8669
  }
8657
8670
  ),
8658
8671
  extras
8659
8672
  ] }),
8660
- /* @__PURE__ */ jsx65(Popover, { open, anchorRef: anchor, placement: "top-start", onClose: () => setOpen(false), minWidth: 330, maxHeight: 460, padded: true, label: "Usage", children: /* @__PURE__ */ jsxs61("div", { className: "fdc-usage", children: [
8661
- cu ? /* @__PURE__ */ jsx65("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx65(
8673
+ /* @__PURE__ */ jsx66(Popover, { open, anchorRef: anchor, placement: "top-start", onClose: () => setOpen(false), minWidth: 330, maxHeight: 460, padded: true, label: "Usage", children: /* @__PURE__ */ jsxs62("div", { className: "fdc-usage", children: [
8674
+ cu ? /* @__PURE__ */ jsx66("section", { className: "fdc-usage-sec", children: /* @__PURE__ */ jsx66(
8662
8675
  SegmentedMeter,
8663
8676
  {
8664
8677
  total,
@@ -8670,9 +8683,9 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
8670
8683
  remainderLabel: "Free"
8671
8684
  }
8672
8685
  ) }) : null,
8673
- limits && limits.length ? /* @__PURE__ */ jsxs61("section", { className: "fdc-usage-sec", children: [
8674
- /* @__PURE__ */ jsx65("h4", { className: "fdc-usage-h", children: "Usage limits" }),
8675
- /* @__PURE__ */ jsx65("div", { className: "fdc-usage-rows", children: limits.map((l) => /* @__PURE__ */ jsx65(
8686
+ limits && limits.length ? /* @__PURE__ */ jsxs62("section", { className: "fdc-usage-sec", children: [
8687
+ /* @__PURE__ */ jsx66("h4", { className: "fdc-usage-h", children: "Usage limits" }),
8688
+ /* @__PURE__ */ jsx66("div", { className: "fdc-usage-rows", children: limits.map((l) => /* @__PURE__ */ jsx66(
8676
8689
  QuotaRow,
8677
8690
  {
8678
8691
  label: l.label,
@@ -8682,32 +8695,32 @@ function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extr
8682
8695
  l.id
8683
8696
  )) })
8684
8697
  ] }) : null,
8685
- stats ? /* @__PURE__ */ jsxs61("section", { className: "fdc-usage-sec fdc-usage-stats", children: [
8686
- stats.elapsedMs ? /* @__PURE__ */ jsxs61("div", { children: [
8687
- /* @__PURE__ */ jsx65("span", { children: "Session" }),
8688
- /* @__PURE__ */ jsx65("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
8698
+ stats ? /* @__PURE__ */ jsxs62("section", { className: "fdc-usage-sec fdc-usage-stats", children: [
8699
+ stats.elapsedMs ? /* @__PURE__ */ jsxs62("div", { children: [
8700
+ /* @__PURE__ */ jsx66("span", { children: "Session" }),
8701
+ /* @__PURE__ */ jsx66("b", { className: "fd-tabular", children: formatDuration(stats.elapsedMs) })
8689
8702
  ] }) : null,
8690
- stats.tokens ? /* @__PURE__ */ jsxs61("div", { children: [
8691
- /* @__PURE__ */ jsx65("span", { children: "Tokens" }),
8692
- /* @__PURE__ */ jsx65("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
8703
+ stats.tokens ? /* @__PURE__ */ jsxs62("div", { children: [
8704
+ /* @__PURE__ */ jsx66("span", { children: "Tokens" }),
8705
+ /* @__PURE__ */ jsx66("b", { className: "fd-tabular", children: stats.tokens.toLocaleString() })
8693
8706
  ] }) : null,
8694
- stats.costUsd != null ? /* @__PURE__ */ jsxs61("div", { children: [
8695
- /* @__PURE__ */ jsx65("span", { children: "Cost" }),
8696
- /* @__PURE__ */ jsxs61("b", { className: "fd-tabular", children: [
8707
+ stats.costUsd != null ? /* @__PURE__ */ jsxs62("div", { children: [
8708
+ /* @__PURE__ */ jsx66("span", { children: "Cost" }),
8709
+ /* @__PURE__ */ jsxs62("b", { className: "fd-tabular", children: [
8697
8710
  "$",
8698
8711
  Number(stats.costUsd).toFixed(3)
8699
8712
  ] })
8700
8713
  ] }) : null,
8701
- stats.turns ? /* @__PURE__ */ jsxs61("div", { children: [
8702
- /* @__PURE__ */ jsx65("span", { children: "Turns" }),
8703
- /* @__PURE__ */ jsx65("b", { className: "fd-tabular", children: stats.turns })
8714
+ stats.turns ? /* @__PURE__ */ jsxs62("div", { children: [
8715
+ /* @__PURE__ */ jsx66("span", { children: "Turns" }),
8716
+ /* @__PURE__ */ jsx66("b", { className: "fd-tabular", children: stats.turns })
8704
8717
  ] }) : null
8705
8718
  ] }) : null,
8706
- onClear ? /* @__PURE__ */ jsx65("footer", { className: "fdc-usage-foot", children: /* @__PURE__ */ jsxs61("button", { type: "button", className: "fdc-usage-clear", onClick: () => {
8719
+ onClear ? /* @__PURE__ */ jsx66("footer", { className: "fdc-usage-foot", children: /* @__PURE__ */ jsxs62("button", { type: "button", className: "fdc-usage-clear", onClick: () => {
8707
8720
  setOpen(false);
8708
8721
  onClear();
8709
8722
  }, children: [
8710
- /* @__PURE__ */ jsx65("i", { className: "ph ph-trash", "aria-hidden": "true" }),
8723
+ /* @__PURE__ */ jsx66("i", { className: "ph ph-trash", "aria-hidden": "true" }),
8711
8724
  "Clear conversation"
8712
8725
  ] }) }) : null
8713
8726
  ] }) })
@@ -8744,7 +8757,7 @@ function ModelControls({
8744
8757
  disabled: m.disabled,
8745
8758
  checked: m.id === (current2 && current2.id),
8746
8759
  meta: m.meta,
8747
- shortcut: m.shortcut ? /* @__PURE__ */ jsx65(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
8760
+ shortcut: m.shortcut ? /* @__PURE__ */ jsx66(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
8748
8761
  onSelect: () => onModelChange && onModelChange(m.id)
8749
8762
  });
8750
8763
  const items = [{ kind: "section", label: "Models" }].concat(flat.map(item));
@@ -8757,15 +8770,15 @@ function ModelControls({
8757
8770
  items.push({ kind: "section", label: "Fast mode" });
8758
8771
  items.push({
8759
8772
  kind: "custom",
8760
- render: () => /* @__PURE__ */ jsxs61("label", { className: "fdc-switchrow", children: [
8761
- /* @__PURE__ */ jsx65("span", { children: fastModeLabel }),
8762
- /* @__PURE__ */ jsx65("input", { type: "checkbox", className: "fd-sr", checked: !!fastMode, onChange: (e) => onFastModeChange(e.target.checked) }),
8763
- /* @__PURE__ */ jsx65("span", { className: "fd-switch-track" + (fastMode ? " is-on" : ""), "aria-hidden": "true", children: /* @__PURE__ */ jsx65("span", { className: "fd-switch-thumb" }) })
8773
+ render: () => /* @__PURE__ */ jsxs62("label", { className: "fdc-switchrow", children: [
8774
+ /* @__PURE__ */ jsx66("span", { children: fastModeLabel }),
8775
+ /* @__PURE__ */ jsx66("input", { type: "checkbox", className: "fd-sr", checked: !!fastMode, onChange: (e) => onFastModeChange(e.target.checked) }),
8776
+ /* @__PURE__ */ jsx66("span", { className: "fd-switch-track" + (fastMode ? " is-on" : ""), "aria-hidden": "true", children: /* @__PURE__ */ jsx66("span", { className: "fd-switch-thumb" }) })
8764
8777
  ] })
8765
8778
  });
8766
8779
  }
8767
- return /* @__PURE__ */ jsxs61(React37.Fragment, { children: [
8768
- /* @__PURE__ */ jsx65(
8780
+ return /* @__PURE__ */ jsxs62(React37.Fragment, { children: [
8781
+ /* @__PURE__ */ jsx66(
8769
8782
  MenuButton,
8770
8783
  {
8771
8784
  items,
@@ -8776,7 +8789,7 @@ function ModelControls({
8776
8789
  title: "Choose a model"
8777
8790
  }
8778
8791
  ),
8779
- effortLevels && effortLevels.length ? /* @__PURE__ */ jsx65(
8792
+ effortLevels && effortLevels.length ? /* @__PURE__ */ jsx66(
8780
8793
  MenuButton,
8781
8794
  {
8782
8795
  placement: "top-end",
@@ -8797,7 +8810,7 @@ function ModelControls({
8797
8810
  }
8798
8811
 
8799
8812
  // src/components/chat/AgentChatPanel.tsx
8800
- import { jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
8813
+ import { jsx as jsx67, jsxs as jsxs63 } from "react/jsx-runtime";
8801
8814
  var SURFACES = { sidebar: "is-sidebar", inline: "is-inline", page: "is-page", modal: "is-modal", sheet: "is-sheet" };
8802
8815
  function AgentChatPanel({
8803
8816
  /* required */
@@ -8951,7 +8964,7 @@ function AgentChatPanel({
8951
8964
  onReconnect: engine.reload,
8952
8965
  deadTitle: "The assistant isn\u2019t reachable"
8953
8966
  };
8954
- const sessionBar = /* @__PURE__ */ jsx66(
8967
+ const sessionBar = /* @__PURE__ */ jsx67(
8955
8968
  ChatSessionBar,
8956
8969
  {
8957
8970
  sessionStats,
@@ -8960,7 +8973,7 @@ function AgentChatPanel({
8960
8973
  onClear: engine.visible.length ? engine.clear : void 0
8961
8974
  }
8962
8975
  );
8963
- const modelControls = /* @__PURE__ */ jsx66(
8976
+ const modelControls = /* @__PURE__ */ jsx67(
8964
8977
  ModelControls,
8965
8978
  {
8966
8979
  models,
@@ -8975,7 +8988,7 @@ function AgentChatPanel({
8975
8988
  narrow
8976
8989
  }
8977
8990
  );
8978
- const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx66(
8991
+ const threadMenu = threads && threads.length ? /* @__PURE__ */ jsx67(
8979
8992
  MenuButton,
8980
8993
  {
8981
8994
  variant: "ghost",
@@ -9002,7 +9015,7 @@ function AgentChatPanel({
9002
9015
  })))
9003
9016
  }
9004
9017
  ) : null;
9005
- return /* @__PURE__ */ jsxs62(
9018
+ return /* @__PURE__ */ jsxs63(
9006
9019
  "aside",
9007
9020
  {
9008
9021
  className: ["fdc-panel", SURFACES[surface] || SURFACES.sidebar, narrow ? "is-narrow" : "", className].filter(Boolean).join(" "),
@@ -9013,7 +9026,7 @@ function AgentChatPanel({
9013
9026
  },
9014
9027
  "aria-label": title,
9015
9028
  children: [
9016
- surface === "sidebar" && resizable ? /* @__PURE__ */ jsx66(
9029
+ surface === "sidebar" && resizable ? /* @__PURE__ */ jsx67(
9017
9030
  "div",
9018
9031
  {
9019
9032
  className: "fdc-grip",
@@ -9028,20 +9041,20 @@ function AgentChatPanel({
9028
9041
  }
9029
9042
  }
9030
9043
  ) : null,
9031
- showHeader ? /* @__PURE__ */ jsxs62("header", { className: "fdc-head", children: [
9032
- /* @__PURE__ */ jsx66("span", { className: "fdc-head-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx66("i", { className: "ph ph-" + assistantIcon }) }),
9033
- /* @__PURE__ */ jsxs62("span", { className: "fdc-head-titles", children: [
9034
- /* @__PURE__ */ jsx66("span", { className: "fdc-head-title", children: title }),
9035
- subtitle ? /* @__PURE__ */ jsx66("span", { className: "fdc-head-sub", children: subtitle }) : null
9044
+ showHeader ? /* @__PURE__ */ jsxs63("header", { className: "fdc-head", children: [
9045
+ /* @__PURE__ */ jsx67("span", { className: "fdc-head-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx67("i", { className: "ph ph-" + assistantIcon }) }),
9046
+ /* @__PURE__ */ jsxs63("span", { className: "fdc-head-titles", children: [
9047
+ /* @__PURE__ */ jsx67("span", { className: "fdc-head-title", children: title }),
9048
+ subtitle ? /* @__PURE__ */ jsx67("span", { className: "fdc-head-sub", children: subtitle }) : null
9036
9049
  ] }),
9037
- /* @__PURE__ */ jsxs62("span", { className: "fdc-head-acts", children: [
9050
+ /* @__PURE__ */ jsxs63("span", { className: "fdc-head-acts", children: [
9038
9051
  headerActions,
9039
9052
  threadMenu,
9040
- onNewThread ? /* @__PURE__ */ jsx66("button", { type: "button", className: "fdc-iconbtn", onClick: onNewThread, "aria-label": "New conversation", title: "New conversation", children: /* @__PURE__ */ jsx66("i", { className: "ph ph-plus", "aria-hidden": "true" }) }) : null,
9041
- onClose ? /* @__PURE__ */ jsx66("button", { type: "button", className: "fdc-iconbtn", onClick: onClose, "aria-label": "Close panel", title: "Close", children: /* @__PURE__ */ jsx66("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
9053
+ onNewThread ? /* @__PURE__ */ jsx67("button", { type: "button", className: "fdc-iconbtn", onClick: onNewThread, "aria-label": "New conversation", title: "New conversation", children: /* @__PURE__ */ jsx67("i", { className: "ph ph-plus", "aria-hidden": "true" }) }) : null,
9054
+ onClose ? /* @__PURE__ */ jsx67("button", { type: "button", className: "fdc-iconbtn", onClick: onClose, "aria-label": "Close panel", title: "Close", children: /* @__PURE__ */ jsx67("i", { className: "ph ph-x", "aria-hidden": "true" }) }) : null
9042
9055
  ] })
9043
9056
  ] }) : null,
9044
- /* @__PURE__ */ jsx66(
9057
+ /* @__PURE__ */ jsx67(
9045
9058
  ChatTranscript,
9046
9059
  {
9047
9060
  messages: engine.visible,
@@ -9056,7 +9069,7 @@ function AgentChatPanel({
9056
9069
  renderEmpty
9057
9070
  }
9058
9071
  ),
9059
- /* @__PURE__ */ jsx66(
9072
+ /* @__PURE__ */ jsx67(
9060
9073
  ChatComposer,
9061
9074
  {
9062
9075
  onSubmit: (text, atts) => engine.send(text, atts),
@@ -9482,6 +9495,8 @@ export {
9482
9495
  FileStrip,
9483
9496
  FileTile,
9484
9497
  Flag,
9498
+ FlytedeskBrand,
9499
+ FlytedeskMark,
9485
9500
  FormatEta,
9486
9501
  Gate,
9487
9502
  IconButton,