@mt-gloss/ui 0.1.136 → 0.1.138

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.
@@ -1,31 +1,153 @@
1
- import { u as D, g as J, h as z, f as we, S as Te, b as xe, j as Ee } from "./COMMITS-B_qGBoy7.js";
2
- import { C as Rt, N as Ft, n as zt, o as Ht, k as Bt, c as Yt, m as Vt, P as Ut, l as Kt, e as qt, i as Gt, r as Qt, d as Wt } from "./COMMITS-B_qGBoy7.js";
3
- import { jsx as a, jsxs as y, Fragment as pe } from "react/jsx-runtime";
4
- import B, { useState as x, useRef as U, createContext as me, useContext as he, useMemo as re, useEffect as F, useCallback as L, useLayoutEffect as Ae } from "react";
5
- import { useSensors as De, useSensor as oe, PointerSensor as ke, KeyboardSensor as Le, DndContext as Me, closestCenter as Oe } from "@dnd-kit/core";
6
- import { sortableKeyboardCoordinates as Ie, SortableContext as $e, horizontalListSortingStrategy as Re, arrayMove as Fe, useSortable as ze } from "@dnd-kit/sortable";
7
- import { CSS as He } from "@dnd-kit/utilities";
8
- import { M as le } from "./MetricCard-DOPtBpek.js";
9
- function St() {
10
- const e = D();
1
+ import { u as O, g as ke, m as be, n as K, l as De, S as Le, e as Me, o as Oe } from "./COMMITS-aGwevMtR.js";
2
+ import { C as en, N as tn, w as nn, x as an, q as sn, f as rn, v as on, P as ln, t as cn, k as dn, j as un, i as pn, h as mn } from "./COMMITS-aGwevMtR.js";
3
+ import { jsx as a, jsxs as f, Fragment as q } from "react/jsx-runtime";
4
+ import * as H from "react";
5
+ import R, { useState as A, useRef as Q, createContext as ye, useContext as ve, useMemo as ce, useEffect as z, useCallback as M, useLayoutEffect as Ie } from "react";
6
+ import { SPIN_COMMIT_REDUCED as Re, SPIN_COMMIT_FULL as $e } from "@mt-gloss/motion";
7
+ import { useMotionValue as de, animate as B, motion as Fe } from "framer-motion";
8
+ import { useSensors as Ue, useSensor as ue, PointerSensor as ze, KeyboardSensor as He, DndContext as Be, closestCenter as Ye } from "@dnd-kit/core";
9
+ import { sortableKeyboardCoordinates as Ve, SortableContext as Ke, horizontalListSortingStrategy as qe, arrayMove as Qe, useSortable as We } from "@dnd-kit/sortable";
10
+ import { CSS as Ge } from "@dnd-kit/utilities";
11
+ import { M as pe } from "./MetricCard-DOPtBpek.js";
12
+ function Ht() {
13
+ const e = O();
11
14
  if (e?.state.activePanelId !== "settings") return null;
12
15
  const t = e.state.activeTrigger;
13
16
  return t?.kind === "card-overflow" ? t.cardId : null;
14
17
  }
15
- function fe({ span: e, rotating: t = !0, children: s }) {
16
- const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = s != null ? "full" : "fallback";
17
- return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: s });
18
+ function je({ span: e, rotating: t = !0, children: r }) {
19
+ const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = r != null ? "full" : "fallback";
20
+ return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: r });
18
21
  }
19
- function Pt({ primary: e, secondary: t }) {
20
- return /* @__PURE__ */ y("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
22
+ const Ze = 500, Xe = 1, Je = "var(--gloss-color-primary, #6366f1)";
23
+ function et({
24
+ children: e,
25
+ spinTrigger: t,
26
+ onSpinComplete: r,
27
+ spinDuration: l,
28
+ spinRotations: n,
29
+ accentColor: i
30
+ }) {
31
+ const u = de(0), o = de(1), s = H.useRef(null), c = H.useMemo(() => ke() === "reduced", []), d = H.useRef(t);
32
+ return H.useEffect(() => {
33
+ if (t === void 0 || t === d.current) return;
34
+ d.current = t;
35
+ const h = (l ?? Ze) / 1e3, y = n ?? Xe, p = s.current;
36
+ if (c) {
37
+ const _ = [];
38
+ if (p) {
39
+ const x = B(
40
+ p,
41
+ { opacity: [0, 0.4, 0] },
42
+ Re
43
+ );
44
+ _.push(x), x.then(() => {
45
+ r?.();
46
+ });
47
+ } else
48
+ Promise.resolve().then(() => {
49
+ r?.();
50
+ });
51
+ return () => {
52
+ _.forEach((x) => x.stop());
53
+ };
54
+ }
55
+ const v = { ...$e, duration: h }, T = B(u, [0, 360 * y], v), S = B(o, [1, 1.03, 1], v), b = [T, S];
56
+ if (p) {
57
+ const _ = B(
58
+ p,
59
+ { opacity: [0, 0.6, 0, 0] },
60
+ { ...v, times: [0, 0.3, 0.8, 1] }
61
+ );
62
+ b.push(_);
63
+ }
64
+ return T.then(() => {
65
+ r?.();
66
+ }), () => {
67
+ b.forEach((_) => _.stop());
68
+ };
69
+ }, [t, l, n, c, r, u, o]), /* @__PURE__ */ f(
70
+ Fe.div,
71
+ {
72
+ className: "clone-stage",
73
+ style: { rotateY: u, scale: o },
74
+ children: [
75
+ e,
76
+ /* @__PURE__ */ a(
77
+ "div",
78
+ {
79
+ ref: s,
80
+ className: "clone-stage__accent",
81
+ style: {
82
+ "--spin-accent-color": i ?? Je
83
+ }
84
+ }
85
+ )
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ function Bt({ primary: e, secondary: t }) {
91
+ return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
21
92
  /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
22
93
  t != null && /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
23
94
  ] });
24
95
  }
25
- function Be({ value: e, onChange: t }) {
26
- return /* @__PURE__ */ y("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
96
+ function tt({
97
+ value: e,
98
+ onChange: t,
99
+ enabled: r = !1,
100
+ onToggleEnabled: l
101
+ }) {
102
+ const n = "settings-threshold-enabled";
103
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
104
+ /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
105
+ /* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
106
+ /* @__PURE__ */ a(
107
+ "input",
108
+ {
109
+ id: n,
110
+ type: "checkbox",
111
+ role: "switch",
112
+ "aria-label": "Enable threshold indicator",
113
+ "aria-checked": r,
114
+ checked: r,
115
+ onChange: (i) => l?.(i.target.checked),
116
+ className: "settings-shell__toggle"
117
+ }
118
+ )
119
+ ] }),
120
+ r ? /* @__PURE__ */ f(q, { children: [
121
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
122
+ /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
123
+ /* @__PURE__ */ a(
124
+ "input",
125
+ {
126
+ id: "settings-threshold-input",
127
+ type: "range",
128
+ min: 0,
129
+ max: 100,
130
+ value: e,
131
+ onChange: t,
132
+ "aria-label": "Threshold",
133
+ "aria-valuenow": e,
134
+ "aria-valuemin": 0,
135
+ "aria-valuemax": 100,
136
+ className: "settings-shell__slider"
137
+ }
138
+ ),
139
+ /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
140
+ e,
141
+ "%"
142
+ ] })
143
+ ] })
144
+ ] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
145
+ ] });
146
+ }
147
+ function nt({ value: e, onChange: t }) {
148
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
27
149
  /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
28
- /* @__PURE__ */ y("div", { className: "settings-shell__slider-row", children: [
150
+ /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
29
151
  /* @__PURE__ */ a(
30
152
  "input",
31
153
  {
@@ -42,47 +164,25 @@ function Be({ value: e, onChange: t }) {
42
164
  className: "settings-shell__slider"
43
165
  }
44
166
  ),
45
- /* @__PURE__ */ y("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
167
+ /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
46
168
  e,
47
169
  " days"
48
170
  ] })
49
171
  ] })
50
172
  ] });
51
173
  }
52
- function Ye({
53
- id: e,
54
- onActivate: t,
55
- disabled: s
56
- }) {
57
- const l = "settings-shell__slot-pill settings-shell__slot-pill--ghost" + (s ? " settings-shell__slot-pill--ghost-disabled" : "");
58
- return /* @__PURE__ */ a("li", { className: l, "data-ghost": "true", children: /* @__PURE__ */ a(
59
- "button",
60
- {
61
- type: "button",
62
- className: "settings-shell__slot-pill__ghost-activate",
63
- "aria-label": `Restore ${e}`,
64
- "aria-disabled": s ? "true" : void 0,
65
- onClick: s ? void 0 : t,
66
- children: /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e })
67
- }
68
- ) });
69
- }
70
- function Ve({
71
- id: e,
72
- onRemove: t,
73
- removeDisabled: s
74
- }) {
75
- const { attributes: l, listeners: n, setNodeRef: c, transform: p, transition: r, isDragging: i } = ze({ id: e }), o = {
76
- transform: He.Transform.toString(p),
77
- transition: r,
78
- opacity: i ? 0.6 : 1
174
+ function at({ id: e, onRemove: t }) {
175
+ const { attributes: r, listeners: l, setNodeRef: n, transform: i, transition: u, isDragging: o } = We({ id: e }), s = {
176
+ transform: Ge.Transform.toString(i),
177
+ transition: u,
178
+ opacity: o ? 0.6 : 1
79
179
  };
80
- return /* @__PURE__ */ y(
180
+ return /* @__PURE__ */ f(
81
181
  "li",
82
182
  {
83
- ref: c,
84
- style: o,
85
- className: `settings-shell__slot-pill${i ? " settings-shell__slot-pill--dragging" : ""}`,
183
+ ref: n,
184
+ style: s,
185
+ className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
86
186
  children: [
87
187
  /* @__PURE__ */ a(
88
188
  "button",
@@ -90,8 +190,8 @@ function Ve({
90
190
  type: "button",
91
191
  className: "settings-shell__slot-pill__handle",
92
192
  "aria-label": `Reorder ${e}`,
193
+ ...r,
93
194
  ...l,
94
- ...n,
95
195
  children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
96
196
  }
97
197
  ),
@@ -100,10 +200,9 @@ function Ve({
100
200
  "button",
101
201
  {
102
202
  type: "button",
103
- className: "settings-shell__slot-pill__remove" + (s ? " settings-shell__slot-pill__remove--disabled" : ""),
203
+ className: "settings-shell__slot-pill__remove",
104
204
  "aria-label": `Remove ${e}`,
105
- "aria-disabled": s ? "true" : void 0,
106
- onClick: s ? void 0 : t,
205
+ onClick: t,
107
206
  children: "×"
108
207
  }
109
208
  )
@@ -111,88 +210,124 @@ function Ve({
111
210
  }
112
211
  );
113
212
  }
114
- function Ue({
213
+ function st({ value: e, onChange: t }) {
214
+ const r = Ue(
215
+ ue(ze, { activationConstraint: { distance: 4 } }),
216
+ ue(He, { coordinateGetter: Ve })
217
+ ), l = R.useRef(!1), [n, i] = R.useState(!1), u = (s) => {
218
+ const { active: c, over: d } = s;
219
+ if (!d || c.id === d.id) return;
220
+ const m = e.findIndex((y) => y === c.id), h = e.findIndex((y) => y === d.id);
221
+ m === -1 || h === -1 || t(Qe([...e], m, h));
222
+ }, o = (s) => {
223
+ l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
224
+ };
225
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
226
+ /* @__PURE__ */ a(Be, { sensors: r, collisionDetection: Ye, onDragEnd: u, children: /* @__PURE__ */ a(Ke, { items: [...e], strategy: qe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ a(at, { id: s, onRemove: () => o(s) }, s)) }) }) }),
227
+ e.length === 0 && n && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
228
+ /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
229
+ ] });
230
+ }
231
+ const rt = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
232
+ function ot({
115
233
  value: e,
116
- onChange: t,
117
- naturalSlots: s
234
+ onSelect: t,
235
+ enabled: r = !1,
236
+ onToggleEnabled: l
118
237
  }) {
119
- const l = De(
120
- oe(ke, { activationConstraint: { distance: 4 } }),
121
- oe(Le, { coordinateGetter: Ie })
122
- ), n = (d) => {
123
- const { active: h, over: g } = d;
124
- if (!g || h.id === g.id) return;
125
- const m = e.findIndex((v) => v === h.id), _ = e.findIndex((v) => v === g.id);
126
- m === -1 || _ === -1 || t(Fe([...e], m, _));
127
- }, c = e.length === 1, p = (d) => {
128
- c || t(e.filter((h) => h !== d));
129
- }, r = B.useMemo(() => new Set(e), [e]), i = B.useMemo(
130
- () => (s ?? []).filter((d) => !r.has(d)),
131
- [s, r]
132
- ), o = e.length >= 3, u = (d) => {
133
- o || t([...e, d]);
134
- };
135
- return /* @__PURE__ */ y("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
136
- /* @__PURE__ */ a(Me, { sensors: l, collisionDetection: Oe, onDragEnd: n, children: /* @__PURE__ */ a($e, { items: [...e], strategy: Re, children: /* @__PURE__ */ y("ul", { className: "settings-shell__slots-list", role: "list", children: [
137
- e.map((d) => /* @__PURE__ */ a(
138
- Ve,
139
- {
140
- id: d,
141
- onRemove: () => p(d),
142
- removeDisabled: c
143
- },
144
- d
145
- )),
146
- i.map((d) => /* @__PURE__ */ a(
147
- Ye,
238
+ const n = "settings-accent-enabled";
239
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
240
+ /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
241
+ /* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Override default accent" }),
242
+ /* @__PURE__ */ a(
243
+ "input",
148
244
  {
149
- id: d,
150
- onActivate: () => u(d),
151
- disabled: o
152
- },
153
- `ghost:${d}`
154
- ))
155
- ] }) }) }),
156
- /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
245
+ id: n,
246
+ type: "checkbox",
247
+ role: "switch",
248
+ "aria-label": "Enable accent override",
249
+ "aria-checked": r,
250
+ checked: r,
251
+ onChange: (i) => l?.(i.target.checked),
252
+ className: "settings-shell__toggle"
253
+ }
254
+ )
255
+ ] }),
256
+ r ? /* @__PURE__ */ f(q, { children: [
257
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
258
+ /* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: rt.map((i) => {
259
+ const u = e === i;
260
+ return /* @__PURE__ */ a(
261
+ "button",
262
+ {
263
+ type: "button",
264
+ "aria-pressed": u,
265
+ "aria-label": `Accent ${i}`,
266
+ className: `settings-shell__swatch${u ? " settings-shell__swatch--active" : ""}`,
267
+ style: { backgroundColor: i },
268
+ onClick: () => t(i)
269
+ },
270
+ i
271
+ );
272
+ }) })
273
+ ] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
157
274
  ] });
158
275
  }
159
- const Ke = ["Orders", "Quota", "Unassigned"], qe = ["timeframe"];
160
- function wt({
276
+ const lt = ["Orders", "Quota", "Unassigned"], it = ["threshold", "timeframe", "color"];
277
+ function Yt({
161
278
  isOpen: e,
162
279
  cardSpan: t,
163
- cardLabel: s = "Metric",
280
+ cardLabel: r = "Metric",
164
281
  cardValue: l = "—",
165
282
  previewSlot: n,
166
- dimensions: c = qe,
167
- initialTab: p,
168
- initialValues: r,
169
- naturalSlots: i
283
+ dimensions: i = it,
284
+ initialTab: u,
285
+ initialValues: o
170
286
  }) {
171
- const o = D(), u = o?.state.activeTrigger, d = u?.kind === "card-overflow" ? u.cardId : null, h = J(), g = u?.span, m = t ?? g ?? 1, _ = c[0] ?? "timeframe", [v, N] = B.useState(p ?? _);
172
- B.useEffect(() => {
173
- c.includes(v) || N(_);
174
- }, [c, v, _]);
175
- const C = d != null ? o?.state?.bufferByCard?.[d]?.changes ?? {} : {}, O = typeof C.timeframe == "number" ? C.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, I = Array.isArray(C.slots) ? C.slots : Array.isArray(r?.slots) ? r.slots : Ke, $ = (R) => {
176
- d == null || o == null || o.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(R.target.value) });
177
- }, S = (R) => {
178
- d == null || o == null || o.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: R });
179
- }, E = o?.state.isDirty ?? !1, H = d;
287
+ const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = be(), h = c?.span, y = t ?? h ?? 1, p = i[0] ?? "threshold", [v, T] = R.useState(u ?? p);
288
+ R.useEffect(() => {
289
+ i.includes(v) || T(p);
290
+ }, [i, v, p]);
291
+ const b = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, _ = typeof b.threshold == "number" ? b.threshold : typeof o?.threshold == "number" ? o.threshold : 80, x = typeof b.timeframe == "number" ? b.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof b.accent == "string" ? b.accent : typeof o?.accent == "string" ? o.accent : null, F = Array.isArray(b.slots) ? b.slots : Array.isArray(o?.slots) ? o.slots : lt, E = typeof b.thresholdEnabled == "boolean" ? b.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, L = typeof b.accentEnabled == "boolean" ? b.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (w) => {
292
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(w.target.value) });
293
+ }, G = (w) => {
294
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(w.target.value) });
295
+ }, ie = (w) => {
296
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: w });
297
+ }, j = (w) => {
298
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: w });
299
+ }, Z = (w) => {
300
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: w });
301
+ }, g = (w) => {
302
+ d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: w });
303
+ }, N = s?.state.isDirty ?? !1, P = d, k = () => {
304
+ P != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: P });
305
+ }, [D, U] = R.useState(0), Ae = () => {
306
+ U((w) => w + 1), s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
307
+ }, xe = R.useCallback(() => {
308
+ }, []);
180
309
  return /* @__PURE__ */ a(
181
- z,
310
+ K,
182
311
  {
183
312
  variant: "with-stage",
184
- onClose: () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
185
- stage: /* @__PURE__ */ a(fe, { span: m, rotating: !h, children: n ?? /* @__PURE__ */ y(pe, { children: [
186
- /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: s }),
187
- /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
188
- ] }) }),
313
+ onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
314
+ stage: (
315
+ // M003-S004-MOT-02 CloneStage wraps CloneCard so the spin-commit
316
+ // gesture has a transform host that does NOT disturb the inner
317
+ // CloneCard's existing sway / span-N geometry. Counter is owned here
318
+ // (Option 3); reptime sees no spinTrigger plumbing.
319
+ /* @__PURE__ */ a(et, { spinTrigger: D, onSpinComplete: xe, children: /* @__PURE__ */ a(je, { span: y, rotating: !m, children: n ?? /* @__PURE__ */ f(q, { children: [
320
+ /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
321
+ /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
322
+ ] }) }) })
323
+ ),
189
324
  navigation: /* @__PURE__ */ a(
190
- we,
325
+ De,
191
326
  {
192
- dimensions: c,
327
+ dimensions: i,
193
328
  activeTab: v,
194
- onSelect: N,
195
- reduced: h
329
+ onSelect: T,
330
+ reduced: m
196
331
  }
197
332
  ),
198
333
  footer: {
@@ -202,10 +337,8 @@ function wt({
202
337
  id: "btn-reset",
203
338
  type: "button",
204
339
  className: "gloss-panel-chrome-v2__footer-btn",
205
- disabled: !E,
206
- onClick: () => {
207
- H != null && o?.dispatch({ type: "CLEAR_BUFFER", cardId: H });
208
- },
340
+ disabled: !N,
341
+ onClick: k,
209
342
  children: "Reset"
210
343
  }
211
344
  ),
@@ -215,13 +348,13 @@ function wt({
215
348
  id: "settings-apply",
216
349
  type: "button",
217
350
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
218
- disabled: !E,
219
- onClick: () => o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
351
+ disabled: !N,
352
+ onClick: Ae,
220
353
  children: "Apply"
221
354
  }
222
355
  )
223
356
  },
224
- children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ y(
357
+ children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
225
358
  "div",
226
359
  {
227
360
  role: "tabpanel",
@@ -230,51 +363,40 @@ function wt({
230
363
  tabIndex: 0,
231
364
  className: "settings-shell__tabpanel",
232
365
  children: [
233
- v === "timeframe" && /* @__PURE__ */ a(Be, { value: O, onChange: $ }),
234
- v === "slots" && /* @__PURE__ */ a(Ue, { value: I, onChange: S, naturalSlots: i })
366
+ v === "threshold" && /* @__PURE__ */ a(
367
+ tt,
368
+ {
369
+ value: _,
370
+ onChange: W,
371
+ enabled: E,
372
+ onToggleEnabled: Z
373
+ }
374
+ ),
375
+ v === "timeframe" && /* @__PURE__ */ a(nt, { value: x, onChange: G }),
376
+ v === "slots" && /* @__PURE__ */ a(st, { value: F, onChange: j }),
377
+ v === "color" && /* @__PURE__ */ a(
378
+ ot,
379
+ {
380
+ value: $,
381
+ onSelect: ie,
382
+ enabled: L,
383
+ onToggleEnabled: g
384
+ }
385
+ )
235
386
  ]
236
387
  }
237
388
  ) })
238
389
  }
239
390
  );
240
391
  }
241
- function Ge({
242
- isOpen: e,
243
- cardSpan: t,
244
- previewSlot: s,
245
- metricInfo: l
246
- }) {
247
- const n = D(), c = n?.state.activeTrigger, p = J(), r = c?.span;
248
- return /* @__PURE__ */ a(
249
- z,
250
- {
251
- variant: "with-stage",
252
- onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
253
- stage: /* @__PURE__ */ a(fe, { span: t ?? r ?? 1, rotating: !p, children: s }),
254
- children: /* @__PURE__ */ y(
255
- "div",
256
- {
257
- className: "metric-info-shell",
258
- "data-shell": "metric-info",
259
- "aria-hidden": !e,
260
- children: [
261
- /* @__PURE__ */ a("h2", { className: "metric-info-shell__title", children: l.title }),
262
- /* @__PURE__ */ a("p", { className: "metric-info-shell__description", children: l.description })
263
- ]
264
- }
265
- )
266
- }
267
- );
268
- }
269
- Ge.displayName = "MetricInfoShell";
270
- const ge = [
392
+ const _e = [
271
393
  "Revenue",
272
394
  "Order flow",
273
395
  "Rep performance",
274
396
  "Brand portfolio",
275
397
  "Account coverage",
276
398
  "Commission"
277
- ], ye = "Revenue", be = {
399
+ ], Ce = "Revenue", Ne = {
278
400
  Revenue: {
279
401
  headline: "Are we hitting our number?",
280
402
  helper: "Top-line sales, growth, average order value, and pace-to-plan signals."
@@ -299,7 +421,7 @@ const ge = [
299
421
  headline: "What's our commission rate?",
300
422
  helper: "Outstanding balances, aging buckets, and effective commission yield."
301
423
  }
302
- }, ve = {
424
+ }, Se = {
303
425
  Revenue: {
304
426
  primary: [
305
427
  {
@@ -584,46 +706,46 @@ const ge = [
584
706
  ]
585
707
  }
586
708
  };
587
- function Ce({
709
+ function Ee({
588
710
  lenses: e,
589
711
  activeLens: t,
590
- onLensChange: s,
712
+ onLensChange: r,
591
713
  variant: l = "pills",
592
- lensMeta: n = be
714
+ lensMeta: n = Ne
593
715
  }) {
594
- return l === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((c) => {
595
- const p = c === t, r = n[c], i = ["cat-pill"];
596
- return p && i.push("active"), /* @__PURE__ */ y(
716
+ return l === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
717
+ const u = i === t, o = n[i], s = ["cat-pill"];
718
+ return u && s.push("active"), /* @__PURE__ */ f(
597
719
  "button",
598
720
  {
599
721
  type: "button",
600
722
  role: "tab",
601
- "aria-selected": p,
602
- className: i.join(" "),
603
- "data-lens": c,
723
+ "aria-selected": u,
724
+ className: s.join(" "),
725
+ "data-lens": i,
604
726
  onClick: () => {
605
- p || s(c);
727
+ u || r(i);
606
728
  },
607
729
  children: [
608
- c,
609
- r?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
730
+ i,
731
+ o?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
610
732
  ]
611
733
  },
612
- c
734
+ i
613
735
  );
614
- }) }) }) : /* @__PURE__ */ a(Qe, { lenses: e, activeLens: t, onLensChange: s });
736
+ }) }) }) : /* @__PURE__ */ a(ct, { lenses: e, activeLens: t, onLensChange: r });
615
737
  }
616
- function Qe({
738
+ function ct({
617
739
  lenses: e,
618
740
  activeLens: t,
619
- onLensChange: s
741
+ onLensChange: r
620
742
  }) {
621
- const [l, n] = x(!1), c = U(null), p = () => {
622
- c.current != null && (window.clearTimeout(c.current), c.current = null);
623
- }, r = () => {
624
- p(), c.current = window.setTimeout(() => n(!1), 100);
625
- }, i = e.filter((o) => o !== t);
626
- return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ y("div", { className: "cat-segmented", children: [
743
+ const [l, n] = A(!1), i = Q(null), u = () => {
744
+ i.current != null && (window.clearTimeout(i.current), i.current = null);
745
+ }, o = () => {
746
+ u(), i.current = window.setTimeout(() => n(!1), 100);
747
+ }, s = e.filter((c) => c !== t);
748
+ return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
627
749
  /* @__PURE__ */ a(
628
750
  "button",
629
751
  {
@@ -634,14 +756,14 @@ function Qe({
634
756
  children: t
635
757
  }
636
758
  ),
637
- /* @__PURE__ */ y(
759
+ /* @__PURE__ */ f(
638
760
  "div",
639
761
  {
640
762
  className: "cat-seg-more",
641
763
  onMouseEnter: () => {
642
- p(), n(!0);
764
+ u(), n(!0);
643
765
  },
644
- onMouseLeave: r,
766
+ onMouseLeave: o,
645
767
  children: [
646
768
  /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
647
769
  l && /* @__PURE__ */ a(
@@ -649,20 +771,20 @@ function Qe({
649
771
  {
650
772
  className: "cat-seg-overflow",
651
773
  role: "menu",
652
- onMouseEnter: p,
653
- onMouseLeave: r,
654
- children: i.map((o) => /* @__PURE__ */ a(
774
+ onMouseEnter: u,
775
+ onMouseLeave: o,
776
+ children: s.map((c) => /* @__PURE__ */ a(
655
777
  "button",
656
778
  {
657
779
  type: "button",
658
- "data-lens": o,
780
+ "data-lens": c,
659
781
  role: "menuitem",
660
782
  onClick: () => {
661
- s(o), n(!1);
783
+ r(c), n(!1);
662
784
  },
663
- children: o
785
+ children: c
664
786
  },
665
- o
787
+ c
666
788
  ))
667
789
  }
668
790
  )
@@ -671,34 +793,34 @@ function Qe({
671
793
  )
672
794
  ] }) });
673
795
  }
674
- function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: l }) {
796
+ function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
675
797
  return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
676
- const c = n.id === t, p = n.subStats != null && n.subStats.length > 0;
677
- let r = null;
678
- p ? n.subStats.length === 5 ? r = "span-5" : n.subStats.length === 3 ? r = "span-3" : r = "span-2" : n.stack === !0 && (r = "span-2");
679
- const i = ["cat-tile"];
680
- r && i.push(r), c && i.push("selected"), n.isNew && i.push("is-new"), n.startHere && i.push("start-here"), n.donut && i.push("has-donut");
681
- const o = 1;
682
- let u = 0.7;
798
+ const i = n.id === t, u = n.subStats != null && n.subStats.length > 0;
799
+ let o = null;
800
+ u ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
801
+ const s = ["cat-tile"];
802
+ o && s.push(o), i && s.push("selected"), n.isNew && s.push("is-new"), n.startHere && s.push("start-here"), n.donut && s.push("has-donut");
803
+ const c = 1;
804
+ let d = 0.7;
683
805
  if (n.donut) {
684
- const d = /([\d.]+)\s*%/.exec(n.value);
685
- if (d) {
686
- const h = parseFloat(d[1]);
687
- Number.isFinite(h) && (u = Math.max(0, Math.min(1, h / 100)));
806
+ const m = /([\d.]+)\s*%/.exec(n.value);
807
+ if (m) {
808
+ const h = parseFloat(m[1]);
809
+ Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
688
810
  }
689
811
  }
690
- return /* @__PURE__ */ y(
812
+ return /* @__PURE__ */ f(
691
813
  "button",
692
814
  {
693
815
  type: "button",
694
- className: i.join(" "),
816
+ className: s.join(" "),
695
817
  "data-metric": n.id,
696
818
  "data-desc": n.desc,
697
- "data-col-span": String(o),
819
+ "data-col-span": String(c),
698
820
  "data-donut": n.donut ? "true" : void 0,
699
821
  "data-accent": n.accent,
700
- "aria-pressed": c,
701
- onClick: () => s(n.id, n.desc),
822
+ "aria-pressed": i,
823
+ onClick: () => r(n.id, n.desc),
702
824
  style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
703
825
  children: [
704
826
  n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
@@ -710,28 +832,28 @@ function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: l }) {
710
832
  style: { pointerEvents: "none", width: "100%", height: "100%" },
711
833
  "aria-hidden": "true",
712
834
  children: n.donut ? /* @__PURE__ */ a(
713
- le,
835
+ pe,
714
836
  {
715
837
  variant: "donut",
716
838
  label: n.label,
717
839
  value: n.value,
718
- donutValue: u,
840
+ donutValue: d,
719
841
  donutMax: 1,
720
842
  accentColor: n.accent,
721
- colSpan: o
843
+ colSpan: c
722
844
  }
723
845
  ) : /* @__PURE__ */ a(
724
- le,
846
+ pe,
725
847
  {
726
848
  variant: "standard",
727
849
  label: n.label,
728
850
  value: n.value,
729
- colSpan: o
851
+ colSpan: c
730
852
  }
731
853
  )
732
854
  }
733
855
  ),
734
- n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((d) => /* @__PURE__ */ a("span", { children: d }, d)) }),
856
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((m) => /* @__PURE__ */ a("span", { children: m }, m)) }),
735
857
  n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
736
858
  ]
737
859
  },
@@ -739,17 +861,17 @@ function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: l }) {
739
861
  );
740
862
  }) });
741
863
  }
742
- const ee = me(null);
743
- function te() {
744
- return he(ee);
864
+ const re = ye(null);
865
+ function oe() {
866
+ return ve(re);
745
867
  }
746
- function Tt({ mode: e, dispatch: t }) {
747
- const s = te();
748
- if (s == null && e == null) return null;
749
- const l = s?.mode ?? e ?? "add", n = s?.selectedTileId ?? null, c = s?.description ?? null, p = n == null;
750
- return /* @__PURE__ */ y("div", { className: "panel-footer catalog", children: [
751
- /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: c ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
752
- /* @__PURE__ */ y("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
868
+ function Vt({ mode: e, dispatch: t }) {
869
+ const r = oe();
870
+ if (r == null && e == null) return null;
871
+ const l = r?.mode ?? e ?? "add", n = r?.selectedTileId ?? null, i = r?.description ?? null, u = n == null;
872
+ return /* @__PURE__ */ f("div", { className: "panel-footer catalog", children: [
873
+ /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
874
+ /* @__PURE__ */ f("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
753
875
  /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
754
876
  /* @__PURE__ */ a(
755
877
  "button",
@@ -767,7 +889,7 @@ function Tt({ mode: e, dispatch: t }) {
767
889
  id: "btn-cat-add",
768
890
  type: "button",
769
891
  className: "btn btn-primary",
770
- disabled: p,
892
+ disabled: u,
771
893
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
772
894
  children: "Add metric"
773
895
  }
@@ -778,7 +900,7 @@ function Tt({ mode: e, dispatch: t }) {
778
900
  id: "btn-cat-replace",
779
901
  type: "button",
780
902
  className: "btn btn-primary",
781
- disabled: p,
903
+ disabled: u,
782
904
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
783
905
  children: "Replace metric"
784
906
  }
@@ -786,63 +908,63 @@ function Tt({ mode: e, dispatch: t }) {
786
908
  ] })
787
909
  ] });
788
910
  }
789
- function ie(e, t) {
911
+ function me(e, t) {
790
912
  if (t.length === 0) return !0;
791
- const s = t.toLowerCase();
792
- if (e.label.toLowerCase().includes(s) || e.value.toLowerCase().includes(s)) return !0;
913
+ const r = t.toLowerCase();
914
+ if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
793
915
  if (e.subStats) {
794
916
  for (const l of e.subStats)
795
- if (l.label.toLowerCase().includes(s) || l.value.toLowerCase().includes(s)) return !0;
917
+ if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
796
918
  }
797
919
  return !1;
798
920
  }
799
- function We() {
800
- const t = te()?.description ?? null;
921
+ function dt() {
922
+ const t = oe()?.description ?? null;
801
923
  return t == null ? /* @__PURE__ */ a("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ a("span", { children: t });
802
924
  }
803
- function xt({
925
+ function Kt({
804
926
  isOpen: e,
805
- lenses: t = ge,
806
- defaultLens: s = ye,
807
- tilesByLens: l = ve,
808
- lensMeta: n = be,
809
- renderTile: c,
810
- onAdd: p
927
+ lenses: t = _e,
928
+ defaultLens: r = Ce,
929
+ tilesByLens: l = Se,
930
+ lensMeta: n = Ne,
931
+ renderTile: i,
932
+ onAdd: u
811
933
  }) {
812
- const r = D(), [i, o] = x(s), [u, d] = x(null), [h, g] = x(null), [m, _] = x(""), v = l[i] ?? { primary: [] }, N = n[i], w = re(
813
- () => v.primary.filter((S) => ie(S, m)),
814
- [v.primary, m]
815
- ), C = re(
816
- () => (v.secondary ?? []).filter((S) => ie(S, m)),
817
- [v.secondary, m]
818
- ), O = () => {
819
- u != null && p?.(u), r?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
820
- }, I = () => r?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), $ = u == null;
934
+ const o = O(), [s, c] = A(r), [d, m] = A(null), [h, y] = A(null), [p, v] = A(""), T = l[s] ?? { primary: [] }, S = n[s], b = ce(
935
+ () => T.primary.filter((E) => me(E, p)),
936
+ [T.primary, p]
937
+ ), _ = ce(
938
+ () => (T.secondary ?? []).filter((E) => me(E, p)),
939
+ [T.secondary, p]
940
+ ), x = () => {
941
+ d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
942
+ }, $ = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), F = d == null;
821
943
  return /* @__PURE__ */ a(
822
- ee.Provider,
944
+ re.Provider,
823
945
  {
824
- value: { mode: "add", selectedTileId: u, description: h },
946
+ value: { mode: "add", selectedTileId: d, description: h },
825
947
  children: /* @__PURE__ */ a(
826
- z,
948
+ K,
827
949
  {
828
950
  variant: "no-stage",
829
951
  title: "Add a metric",
830
- onClose: I,
952
+ onClose: $,
831
953
  footer: {
832
- left: /* @__PURE__ */ a(We, {}),
954
+ left: /* @__PURE__ */ a(dt, {}),
833
955
  right: /* @__PURE__ */ a(
834
956
  "button",
835
957
  {
836
958
  id: "btn-cat-add",
837
959
  type: "button",
838
960
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
839
- disabled: $,
840
- onClick: O,
961
+ disabled: F,
962
+ onClick: x,
841
963
  children: "Add metric"
842
964
  }
843
965
  )
844
966
  },
845
- children: /* @__PURE__ */ y("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
967
+ children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
846
968
  /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
847
969
  "input",
848
970
  {
@@ -850,54 +972,54 @@ function xt({
850
972
  className: "cat-search-input",
851
973
  placeholder: "Search metrics",
852
974
  "aria-label": "Search metrics",
853
- value: m,
854
- onChange: (S) => _(S.target.value)
975
+ value: p,
976
+ onChange: (E) => v(E.target.value)
855
977
  }
856
978
  ) }),
857
979
  /* @__PURE__ */ a(
858
- Ce,
980
+ Ee,
859
981
  {
860
982
  lenses: t,
861
- activeLens: i,
983
+ activeLens: s,
862
984
  lensMeta: n,
863
985
  variant: "pills",
864
- onLensChange: (S) => {
865
- o(S), d(null), g(null), _("");
986
+ onLensChange: (E) => {
987
+ c(E), m(null), y(null), v("");
866
988
  }
867
989
  }
868
990
  ),
869
- N && /* @__PURE__ */ y("div", { className: "cat-lens-meta", children: [
870
- /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: N.headline }),
871
- /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: N.helper })
991
+ S && /* @__PURE__ */ f("div", { className: "cat-lens-meta", children: [
992
+ /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: S.headline }),
993
+ /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: S.helper })
872
994
  ] }),
873
995
  /* @__PURE__ */ a(
874
- Z,
996
+ ae,
875
997
  {
876
- tiles: w,
877
- selectedTileId: u,
878
- onSelectTile: (S, E) => {
879
- d(S), g(E);
998
+ tiles: b,
999
+ selectedTileId: d,
1000
+ onSelectTile: (E, L) => {
1001
+ m(E), y(L);
880
1002
  },
881
- renderTile: c
1003
+ renderTile: i
882
1004
  }
883
1005
  ),
884
- C.length > 0 && /* @__PURE__ */ y("div", { className: "cat-more-in-lens", children: [
1006
+ _.length > 0 && /* @__PURE__ */ f("div", { className: "cat-more-in-lens", children: [
885
1007
  /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
886
1008
  /* @__PURE__ */ a(
887
- Z,
1009
+ ae,
888
1010
  {
889
- tiles: C,
890
- selectedTileId: u,
891
- onSelectTile: (S, E) => {
892
- d(S), g(E);
1011
+ tiles: _,
1012
+ selectedTileId: d,
1013
+ onSelectTile: (E, L) => {
1014
+ m(E), y(L);
893
1015
  },
894
- renderTile: c
1016
+ renderTile: i
895
1017
  }
896
1018
  )
897
1019
  ] }),
898
- w.length === 0 && C.length === 0 && m.length > 0 && /* @__PURE__ */ y("div", { className: "cat-empty", children: [
1020
+ b.length === 0 && _.length === 0 && p.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
899
1021
  'No metrics match "',
900
- m,
1022
+ p,
901
1023
  '".'
902
1024
  ] })
903
1025
  ] })
@@ -906,67 +1028,67 @@ function xt({
906
1028
  }
907
1029
  );
908
1030
  }
909
- function je() {
910
- const t = te()?.description ?? null;
911
- return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(pe, { children: t });
1031
+ function ut() {
1032
+ const t = oe()?.description ?? null;
1033
+ return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(q, { children: t });
912
1034
  }
913
- function Et({
1035
+ function qt({
914
1036
  isOpen: e,
915
1037
  replacingLabel: t,
916
- lenses: s = ge,
917
- defaultLens: l = ye,
918
- tilesByLens: n = ve,
919
- renderTile: c
1038
+ lenses: r = _e,
1039
+ defaultLens: l = Ce,
1040
+ tilesByLens: n = Se,
1041
+ renderTile: i
920
1042
  }) {
921
- const p = D(), [r, i] = x(l), [o, u] = x(null), [d, h] = x(null), g = n[r] ?? { primary: [] }, m = [...g.primary, ...g.secondary ?? []], _ = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), v = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), N = o == null;
1043
+ const u = O(), [o, s] = A(l), [c, d] = A(null), [m, h] = A(null), y = n[o] ?? { primary: [] }, p = [...y.primary, ...y.secondary ?? []], v = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), T = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), S = c == null;
922
1044
  return /* @__PURE__ */ a(
923
- ee.Provider,
1045
+ re.Provider,
924
1046
  {
925
- value: { mode: "replace", selectedTileId: o, description: d },
1047
+ value: { mode: "replace", selectedTileId: c, description: m },
926
1048
  children: /* @__PURE__ */ a(
927
- z,
1049
+ K,
928
1050
  {
929
1051
  variant: "no-stage",
930
1052
  title: "Replace metric",
931
- onClose: v,
1053
+ onClose: T,
932
1054
  footer: {
933
- left: /* @__PURE__ */ a(je, {}),
1055
+ left: /* @__PURE__ */ a(ut, {}),
934
1056
  right: /* @__PURE__ */ a(
935
1057
  "button",
936
1058
  {
937
1059
  id: "btn-cat-replace",
938
1060
  type: "button",
939
1061
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
940
- disabled: N,
941
- onClick: _,
1062
+ disabled: S,
1063
+ onClick: v,
942
1064
  children: "Replace metric"
943
1065
  }
944
1066
  )
945
1067
  },
946
- children: /* @__PURE__ */ y("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
947
- t && /* @__PURE__ */ y("p", { className: "cat-subtitle", children: [
1068
+ children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1069
+ t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
948
1070
  "replacing ",
949
1071
  t
950
1072
  ] }),
951
1073
  /* @__PURE__ */ a(
952
- Ce,
1074
+ Ee,
953
1075
  {
954
- lenses: s,
955
- activeLens: r,
956
- onLensChange: (w) => {
957
- i(w), u(null), h(null);
1076
+ lenses: r,
1077
+ activeLens: o,
1078
+ onLensChange: (b) => {
1079
+ s(b), d(null), h(null);
958
1080
  }
959
1081
  }
960
1082
  ),
961
1083
  /* @__PURE__ */ a(
962
- Z,
1084
+ ae,
963
1085
  {
964
- tiles: m,
965
- selectedTileId: o,
966
- onSelectTile: (w, C) => {
967
- u(w), h(C);
1086
+ tiles: p,
1087
+ selectedTileId: c,
1088
+ onSelectTile: (b, _) => {
1089
+ d(b), h(_);
968
1090
  },
969
- renderTile: c
1091
+ renderTile: i
970
1092
  }
971
1093
  )
972
1094
  ] })
@@ -975,13 +1097,13 @@ function Et({
975
1097
  }
976
1098
  );
977
1099
  }
978
- const _e = me(null);
979
- function Ne() {
980
- return he(_e);
1100
+ const Te = ye(null);
1101
+ function Pe() {
1102
+ return ve(Te);
981
1103
  }
982
- function Ze(e = {}) {
983
- const t = Ne(), s = t?.createPage, l = t?.setPages;
984
- return /* @__PURE__ */ y(
1104
+ function pt(e = {}) {
1105
+ const t = Pe(), r = t?.createPage, l = t?.setPages;
1106
+ return /* @__PURE__ */ f(
985
1107
  "div",
986
1108
  {
987
1109
  className: "panel-footer pm",
@@ -995,8 +1117,8 @@ function Ze(e = {}) {
995
1117
  type: "button",
996
1118
  className: "btn btn-primary",
997
1119
  onClick: () => {
998
- if (s) {
999
- s();
1120
+ if (r) {
1121
+ r();
1000
1122
  return;
1001
1123
  }
1002
1124
  l && l((n) => [
@@ -1011,28 +1133,28 @@ function Ze(e = {}) {
1011
1133
  }
1012
1134
  );
1013
1135
  }
1014
- function ce({ page: e, onRename: t, onKebab: s, onDragStart: l, onSwitchPage: n }) {
1015
- const c = Ne(), [p, r] = x(!1), i = U(null);
1016
- F(() => {
1017
- if (!p) return;
1018
- const m = (_) => {
1019
- i.current && (i.current.contains(_.target) || r(!1));
1136
+ function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n }) {
1137
+ const i = Pe(), [u, o] = A(!1), s = Q(null);
1138
+ z(() => {
1139
+ if (!u) return;
1140
+ const p = (v) => {
1141
+ s.current && (s.current.contains(v.target) || o(!1));
1020
1142
  };
1021
- return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
1022
- }, [p]);
1023
- const o = () => {
1024
- if (r(!1), t) return t(e.id);
1025
- if (!c?.renamePage) return;
1026
- const m = window.prompt("Rename page", e.name);
1027
- m != null && m.trim().length > 0 && c.renamePage(e.id, m.trim());
1028
- }, u = () => {
1029
- r(!1), c?.duplicatePage?.(e.id);
1143
+ return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
1144
+ }, [u]);
1145
+ const c = () => {
1146
+ if (o(!1), t) return t(e.id);
1147
+ if (!i?.renamePage) return;
1148
+ const p = window.prompt("Rename page", e.name);
1149
+ p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
1030
1150
  }, d = () => {
1031
- r(!1), c?.deletePage?.(e.id);
1032
- }, h = (m) => {
1033
- m.stopPropagation(), n && !e.active && n(e.id);
1034
- }, g = ["pm-row"];
1035
- return e.active && g.push("active"), /* @__PURE__ */ y("div", { ref: i, className: g.join(" "), "data-page-id": e.id, role: "listitem", children: [
1151
+ o(!1), i?.duplicatePage?.(e.id);
1152
+ }, m = () => {
1153
+ o(!1), i?.deletePage?.(e.id);
1154
+ }, h = (p) => {
1155
+ p.stopPropagation(), n && !e.active && n(e.id);
1156
+ }, y = ["pm-row"];
1157
+ return e.active && y.push("active"), /* @__PURE__ */ f("div", { ref: s, className: y.join(" "), "data-page-id": e.id, role: "listitem", children: [
1036
1158
  /* @__PURE__ */ a(
1037
1159
  "div",
1038
1160
  {
@@ -1049,8 +1171,8 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: l, onSwitchPage: n
1049
1171
  role: n && !e.active ? "button" : void 0,
1050
1172
  tabIndex: n && !e.active ? 0 : void 0,
1051
1173
  onClick: n ? h : void 0,
1052
- onKeyDown: (m) => {
1053
- !n || e.active || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), n(e.id));
1174
+ onKeyDown: (p) => {
1175
+ !n || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), n(e.id));
1054
1176
  },
1055
1177
  "aria-label": n && !e.active ? `Switch to ${e.name}` : void 0,
1056
1178
  children: e.name
@@ -1063,34 +1185,34 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: l, onSwitchPage: n
1063
1185
  className: "pm-kebab",
1064
1186
  "aria-label": "Page options",
1065
1187
  "aria-haspopup": "menu",
1066
- "aria-expanded": p,
1067
- onPointerDown: (m) => m.stopPropagation(),
1068
- onMouseDown: (m) => m.stopPropagation(),
1069
- onClick: (m) => {
1070
- if (m.stopPropagation(), s) return s(e.id);
1071
- r((_) => !_);
1188
+ "aria-expanded": u,
1189
+ onPointerDown: (p) => p.stopPropagation(),
1190
+ onMouseDown: (p) => p.stopPropagation(),
1191
+ onClick: (p) => {
1192
+ if (p.stopPropagation(), r) return r(e.id);
1193
+ o((v) => !v);
1072
1194
  },
1073
1195
  children: "⋯"
1074
1196
  }
1075
1197
  ),
1076
- p && /* @__PURE__ */ y(
1198
+ u && /* @__PURE__ */ f(
1077
1199
  "div",
1078
1200
  {
1079
1201
  className: "pm-kebab-menu",
1080
1202
  role: "menu",
1081
1203
  "data-page-id": e.id,
1082
- onPointerDown: (m) => m.stopPropagation(),
1083
- onMouseDown: (m) => m.stopPropagation(),
1204
+ onPointerDown: (p) => p.stopPropagation(),
1205
+ onMouseDown: (p) => p.stopPropagation(),
1084
1206
  children: [
1085
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Rename" }),
1086
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: u, children: "Duplicate" }),
1207
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
1208
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
1087
1209
  /* @__PURE__ */ a(
1088
1210
  "button",
1089
1211
  {
1090
1212
  type: "button",
1091
1213
  role: "menuitem",
1092
1214
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1093
- onClick: d,
1215
+ onClick: m,
1094
1216
  children: "Delete"
1095
1217
  }
1096
1218
  )
@@ -1099,121 +1221,121 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: l, onSwitchPage: n
1099
1221
  )
1100
1222
  ] });
1101
1223
  }
1102
- const Xe = [
1224
+ const mt = [
1103
1225
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1104
1226
  { id: "p-numbers", name: "My Numbers", active: !1 },
1105
1227
  { id: "p-morning", name: "My Morning", active: !1 },
1106
1228
  { id: "p-accounts", name: "My Accounts", active: !1 }
1107
1229
  ];
1108
- function At({
1230
+ function Qt({
1109
1231
  isOpen: e,
1110
- pages: t = Xe,
1111
- externalPages: s,
1232
+ pages: t = mt,
1233
+ externalPages: r,
1112
1234
  activePageId: l,
1113
1235
  onRename: n,
1114
- onDuplicate: c,
1115
- onDelete: p,
1116
- onReorder: r,
1117
- onCreatePage: i,
1118
- onSwitchPage: o
1236
+ onDuplicate: i,
1237
+ onDelete: u,
1238
+ onReorder: o,
1239
+ onCreatePage: s,
1240
+ onSwitchPage: c
1119
1241
  }) {
1120
- const u = D(), [d, h] = x(() => [...t]), g = L((f, P) => {
1121
- h((T) => T.map((A) => A.id === f ? { ...A, name: P } : A));
1122
- }, []), m = L((f) => {
1123
- h((P) => {
1124
- const T = P.find((K) => K.id === f);
1125
- if (!T) return P;
1126
- const A = {
1127
- id: `${T.id}-copy-${Date.now()}`,
1128
- name: `${T.name} copy`,
1242
+ const d = O(), [m, h] = A(() => [...t]), y = M((g, N) => {
1243
+ h((P) => P.map((k) => k.id === g ? { ...k, name: N } : k));
1244
+ }, []), p = M((g) => {
1245
+ h((N) => {
1246
+ const P = N.find((U) => U.id === g);
1247
+ if (!P) return N;
1248
+ const k = {
1249
+ id: `${P.id}-copy-${Date.now()}`,
1250
+ name: `${P.name} copy`,
1129
1251
  active: !1
1130
- }, k = P.findIndex((K) => K.id === f);
1131
- return [...P.slice(0, k + 1), A, ...P.slice(k + 1)];
1252
+ }, D = N.findIndex((U) => U.id === g);
1253
+ return [...N.slice(0, D + 1), k, ...N.slice(D + 1)];
1132
1254
  });
1133
- }, []), _ = L((f) => {
1134
- h((P) => P.filter((T) => T.id !== f));
1135
- }, []), v = L((f) => {
1136
- h((P) => {
1137
- const T = new Map(P.map((k) => [k.id, k])), A = f.map((k) => T.get(k)).filter(Boolean);
1138
- return A.length === P.length ? A : P;
1255
+ }, []), v = M((g) => {
1256
+ h((N) => N.filter((P) => P.id !== g));
1257
+ }, []), T = M((g) => {
1258
+ h((N) => {
1259
+ const P = new Map(N.map((D) => [D.id, D])), k = g.map((D) => P.get(D)).filter(Boolean);
1260
+ return k.length === N.length ? k : N;
1139
1261
  });
1140
- }, []), N = s != null, w = N ? s : d, C = l != null ? w.map((f) => ({ ...f, active: f.id === l })) : [...w], O = n ?? (N ? void 0 : g), I = c ?? (N ? void 0 : m), $ = p ?? (N ? void 0 : _), S = r ?? (N ? void 0 : v), E = L(
1141
- (f) => {
1142
- N || h(f);
1143
- },
1144
- [N]
1145
- ), H = L(
1146
- (f) => {
1147
- const P = f[0]?.items.map((T) => T.id) ?? [];
1148
- P.length > 0 && S && S(P);
1262
+ }, []), S = r != null, b = S ? r : m, _ = l != null ? b.map((g) => ({ ...g, active: g.id === l })) : [...b], x = n ?? (S ? void 0 : y), $ = i ?? (S ? void 0 : p), F = u ?? (S ? void 0 : v), E = o ?? (S ? void 0 : T), L = M(
1263
+ (g) => {
1264
+ S || h(g);
1149
1265
  },
1150
1266
  [S]
1151
- ), ae = C.map((f) => `${f.id}:${f.name}`).join("|"), se = S != null && C.length > 1 ? /* @__PURE__ */ a(
1152
- Te,
1267
+ ), W = M(
1268
+ (g) => {
1269
+ const N = g[0]?.items.map((P) => P.id) ?? [];
1270
+ N.length > 0 && E && E(N);
1271
+ },
1272
+ [E]
1273
+ ), G = _.map((g) => `${g.id}:${g.name}`).join("|"), j = E != null && _.length > 1 ? /* @__PURE__ */ a(
1274
+ Le,
1153
1275
  {
1154
1276
  zones: [
1155
1277
  {
1156
1278
  zoneKey: "pm-pages",
1157
- items: C.map((f) => ({ ...f, id: f.id }))
1279
+ items: _.map((g) => ({ ...g, id: g.id }))
1158
1280
  }
1159
1281
  ],
1160
- onZoneChange: H,
1161
- renderZone: (f, P, T) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: T }),
1162
- renderItem: (f) => /* @__PURE__ */ a(
1163
- ce,
1282
+ onZoneChange: W,
1283
+ renderZone: (g, N, P) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: P }),
1284
+ renderItem: (g) => /* @__PURE__ */ a(
1285
+ he,
1164
1286
  {
1165
- page: f,
1166
- onSwitchPage: o
1287
+ page: g,
1288
+ onSwitchPage: c
1167
1289
  },
1168
- f.id
1290
+ g.id
1169
1291
  )
1170
1292
  },
1171
- ae
1172
- ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: C.map((f) => /* @__PURE__ */ a(
1173
- ce,
1293
+ G
1294
+ ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: _.map((g) => /* @__PURE__ */ a(
1295
+ he,
1174
1296
  {
1175
- page: f,
1176
- onSwitchPage: o
1297
+ page: g,
1298
+ onSwitchPage: c
1177
1299
  },
1178
- f.id
1179
- )) }), R = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1300
+ g.id
1301
+ )) }), Z = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1180
1302
  return /* @__PURE__ */ a(
1181
- _e.Provider,
1303
+ Te.Provider,
1182
1304
  {
1183
1305
  value: {
1184
- pages: C,
1185
- setPages: E,
1186
- renamePage: O,
1187
- duplicatePage: I,
1188
- deletePage: $,
1306
+ pages: _,
1307
+ setPages: L,
1308
+ renamePage: x,
1309
+ duplicatePage: $,
1310
+ deletePage: F,
1189
1311
  // Sprint 2026-05-20 — propagate live create binding for footer.
1190
- createPage: i
1312
+ createPage: s
1191
1313
  },
1192
1314
  children: /* @__PURE__ */ a(
1193
- z,
1315
+ K,
1194
1316
  {
1195
1317
  variant: "no-stage",
1196
1318
  title: "Manage pages",
1197
- onClose: R,
1198
- footer: { right: /* @__PURE__ */ a(Ze, {}) },
1199
- children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: se })
1319
+ onClose: Z,
1320
+ footer: { right: /* @__PURE__ */ a(pt, {}) },
1321
+ children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: j })
1200
1322
  }
1201
1323
  )
1202
1324
  }
1203
1325
  );
1204
1326
  }
1205
- const Dt = {
1327
+ const Wt = {
1206
1328
  SETTINGS: "settings",
1207
1329
  CATALOG_ADD: "catalog-add",
1208
1330
  CATALOG_REPLACE: "catalog-replace",
1209
1331
  PAGE_MGMT: "page-management",
1210
1332
  NOTIFICATION_CENTER: "notification-center"
1211
- }, Je = {
1333
+ }, ht = {
1212
1334
  position: "fixed",
1213
1335
  inset: 0,
1214
1336
  pointerEvents: "none",
1215
1337
  zIndex: 55
1216
- }, et = {
1338
+ }, ft = {
1217
1339
  position: "absolute",
1218
1340
  inset: 0,
1219
1341
  zIndex: 1,
@@ -1222,40 +1344,40 @@ const Dt = {
1222
1344
  pointerEvents: "none",
1223
1345
  background: "rgba(0, 0, 0, 0.04)"
1224
1346
  };
1225
- function kt() {
1226
- const { state: e, dispatch: t, getCloseLog: s } = xe();
1227
- F(() => {
1347
+ function Gt() {
1348
+ const { state: e, dispatch: t, getCloseLog: r } = Me();
1349
+ z(() => {
1228
1350
  if (e.activePanelId == null) return;
1229
- function n(c) {
1230
- c.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1351
+ function n(i) {
1352
+ i.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1231
1353
  }
1232
1354
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1233
1355
  }, [e.activePanelId, t]);
1234
- const l = U(e);
1235
- return Ae(() => {
1356
+ const l = Q(e);
1357
+ return Ie(() => {
1236
1358
  l.current = e;
1237
- }), F(() => {
1359
+ }), z(() => {
1238
1360
  if (process.env.NODE_ENV === "production") return;
1239
1361
  const n = window;
1240
1362
  return n.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), n.__panelsHostHandle = {
1241
1363
  dispatch: t,
1242
1364
  getState: () => l.current,
1243
- getCloseLog: s
1365
+ getCloseLog: r
1244
1366
  }, () => {
1245
1367
  n.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1246
1368
  };
1247
- }, [t, s]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: Je, children: e.activePanelId != null && /* @__PURE__ */ a(
1369
+ }, [t, r]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: ht, children: e.activePanelId != null && /* @__PURE__ */ a(
1248
1370
  "div",
1249
1371
  {
1250
1372
  "data-panel-scrim": "true",
1251
- style: et
1373
+ style: ft
1252
1374
  }
1253
1375
  ) });
1254
1376
  }
1255
- const tt = 700;
1256
- function nt(e, t) {
1257
- const [s, l] = x(null), n = U(null);
1258
- return F(() => {
1377
+ const gt = 700;
1378
+ function bt(e, t) {
1379
+ const [r, l] = A(null), n = Q(null);
1380
+ return z(() => {
1259
1381
  if (e != null) {
1260
1382
  n.current != null && (clearTimeout(n.current), n.current = null), l(null);
1261
1383
  return;
@@ -1266,42 +1388,42 @@ function nt(e, t) {
1266
1388
  }
1267
1389
  return n.current = setTimeout(() => {
1268
1390
  l(null), n.current = null;
1269
- }, tt), () => {
1391
+ }, gt), () => {
1270
1392
  n.current != null && (clearTimeout(n.current), n.current = null);
1271
1393
  };
1272
- }, [e, t]), F(() => {
1394
+ }, [e, t]), z(() => {
1273
1395
  e != null && l(e);
1274
- }, [e]), e != null ? { panelId: e, isOpen: !0 } : s != null ? { panelId: s, isOpen: !1 } : { panelId: null, isOpen: !1 };
1396
+ }, [e]), e != null ? { panelId: e, isOpen: !0 } : r != null ? { panelId: r, isOpen: !1 } : { panelId: null, isOpen: !1 };
1275
1397
  }
1276
- function Lt({ panelComponents: e, children: t }) {
1277
- const s = D(), l = s?.state.lastClose?.reason === "section-hidden", n = nt(s?.state.activePanelId ?? null, l);
1278
- if (s == null || n.panelId == null) return null;
1279
- const c = n.panelId, p = n.isOpen, r = e?.[c];
1280
- return r == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1398
+ function jt({ panelComponents: e, children: t }) {
1399
+ const r = O(), l = r?.state.lastClose?.reason === "section-hidden", n = bt(r?.state.activePanelId ?? null, l);
1400
+ if (r == null || n.panelId == null) return null;
1401
+ const i = n.panelId, u = n.isOpen, o = e?.[i];
1402
+ return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1281
1403
  "[panels] No panel component registered for activePanelId:",
1282
- c
1283
- ), null) : /* @__PURE__ */ a(Ee, { isOpen: p, children: r != null ? /* @__PURE__ */ a(r, { isOpen: p }) : t });
1404
+ i
1405
+ ), null) : /* @__PURE__ */ a(Oe, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
1284
1406
  }
1285
- function de(e) {
1407
+ function fe(e) {
1286
1408
  return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
1287
1409
  }
1288
- const at = 685, ue = 627, st = "cubic-bezier(0.22, 1, 0.36, 1)", rt = 200;
1289
- function Se(e, t) {
1410
+ const yt = 685, ge = 627, vt = "cubic-bezier(0.22, 1, 0.36, 1)", _t = 200;
1411
+ function we(e, t) {
1290
1412
  if (typeof window > "u") return t;
1291
- const s = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1292
- if (!s) return t;
1293
- const l = parseFloat(s);
1294
- return Number.isNaN(l) ? t : s.endsWith("s") && !s.endsWith("ms") ? l * 1e3 : l;
1413
+ const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1414
+ if (!r) return t;
1415
+ const l = parseFloat(r);
1416
+ return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
1295
1417
  }
1296
- function ot(e, t) {
1418
+ function Ct(e, t) {
1297
1419
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1298
1420
  }
1299
1421
  function Y(e) {
1300
1422
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1301
1423
  }
1302
- function lt(e) {
1303
- const { mountEl: t, chromeEl: s, reducedMotion: l, onAssert: n } = e;
1304
- if (t == null || s == null) {
1424
+ function Nt(e) {
1425
+ const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: n } = e;
1426
+ if (t == null || r == null) {
1305
1427
  Y(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1306
1428
  return;
1307
1429
  }
@@ -1309,271 +1431,268 @@ function lt(e) {
1309
1431
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1310
1432
  return;
1311
1433
  }
1312
- if (typeof s.animate != "function") {
1434
+ if (typeof r.animate != "function") {
1313
1435
  Y(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1314
1436
  return;
1315
1437
  }
1316
- const c = s.cloneNode(!0);
1317
- c.id = "panel-chrome-frozen", c.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(c), s.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1318
- const p = Se("--panel-open-dur", at), r = ot("--panel-easing", st), i = s.animate(
1438
+ const i = r.cloneNode(!0);
1439
+ i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1440
+ const u = we("--panel-open-dur", yt), o = Ct("--panel-easing", vt), s = r.animate(
1319
1441
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1320
- { duration: p, easing: r, fill: "forwards" }
1442
+ { duration: u, easing: o, fill: "forwards" }
1321
1443
  );
1322
- i.addEventListener(
1444
+ s.addEventListener(
1323
1445
  "finish",
1324
1446
  () => {
1325
- c.remove(), s.style.zIndex = "", i.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1447
+ i.remove(), r.style.zIndex = "", s.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1326
1448
  },
1327
1449
  { once: !0 }
1328
1450
  );
1329
1451
  }
1330
- function it(e) {
1331
- const { mountEl: t, onAssert: s } = e;
1452
+ function St(e) {
1453
+ const { mountEl: t, onAssert: r } = e;
1332
1454
  if (t == null) {
1333
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), ue), s?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1455
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), ge), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1334
1456
  return;
1335
1457
  }
1336
- const l = Se("--panel-close-dur", ue);
1337
- let n = !1, c = null;
1338
- const p = (i) => {
1339
- i.target !== t || i.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-complete", timestamp: Date.now() }));
1340
- }, r = () => {
1341
- n || (n = !0, t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-forced", timestamp: Date.now() }));
1458
+ const l = we("--panel-close-dur", ge);
1459
+ let n = !1, i = null;
1460
+ const u = (s) => {
1461
+ s.target !== t || s.propertyName !== "max-height" || n || (n = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
1462
+ }, o = () => {
1463
+ n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
1342
1464
  };
1343
- t.addEventListener("transitionend", p), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(r, l + rt);
1465
+ t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(o, l + _t);
1344
1466
  }
1345
- function ct(e) {
1346
- const { state: t, onAssert: s } = e;
1467
+ function Et(e) {
1468
+ const { state: t, onAssert: r } = e;
1347
1469
  if (t.activePanelId && t.isDirty) {
1348
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "blocked-dirty", timestamp: Date.now() });
1470
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
1349
1471
  return;
1350
1472
  }
1351
- const l = de(t.activeTrigger), n = de(e.trigger);
1473
+ const l = fe(t.activeTrigger), n = fe(e.trigger);
1352
1474
  if (!!t.activePanelId && l != null && l === n) {
1353
- lt(e);
1475
+ Nt(e);
1354
1476
  return;
1355
1477
  }
1356
1478
  if (t.activePanelId) {
1357
- it(e);
1479
+ St(e);
1358
1480
  return;
1359
1481
  }
1360
- Y(e), s?.({ branch: "fresh-open", timestamp: Date.now() });
1482
+ Y(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
1361
1483
  }
1362
- function dt() {
1484
+ function Tt() {
1363
1485
  if (!(typeof window > "u"))
1364
1486
  return window.__panelsAsserter;
1365
1487
  }
1366
- function Mt() {
1367
- const e = D(), t = J();
1368
- return L(
1369
- (s, l) => {
1488
+ function Zt() {
1489
+ const e = O(), t = be();
1490
+ return M(
1491
+ (r, l) => {
1370
1492
  if (!e)
1371
1493
  return;
1372
- const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, p = {
1373
- panelId: s,
1494
+ const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1495
+ panelId: r,
1374
1496
  trigger: l,
1375
1497
  state: e.state,
1376
1498
  dispatch: e.dispatch,
1377
1499
  mountEl: n,
1378
- chromeEl: c,
1500
+ chromeEl: i,
1379
1501
  reducedMotion: t,
1380
- onAssert: (r) => {
1381
- dt()?.recordTransition?.(r);
1502
+ onAssert: (o) => {
1503
+ Tt()?.recordTransition?.(o);
1382
1504
  }
1383
1505
  };
1384
- ct(p);
1506
+ Et(u);
1385
1507
  },
1386
1508
  [e, t]
1387
1509
  );
1388
1510
  }
1389
- function Ot({ children: e }) {
1390
- return /* @__PURE__ */ a("div", { className: "clone-stage", children: e });
1391
- }
1392
- let V = !1, q = null;
1393
- function X() {
1511
+ let V = !1, X = null;
1512
+ function se() {
1394
1513
  const e = [];
1395
1514
  let t = "cleaned";
1396
1515
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
1397
1516
  const l = document.querySelectorAll(".gloss-panel-mount");
1398
1517
  l.length > 1 && e.push(`mount-count=${l.length}`);
1399
- const n = l[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1400
- c.length > 1 && e.push(`chrome-count=${c.length}`);
1401
- const p = c[0] ?? null;
1402
- if (p) {
1403
- const u = p.style.zIndex;
1404
- u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
1518
+ const n = l[0] ?? null, i = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1519
+ i.length > 1 && e.push(`chrome-count=${i.length}`);
1520
+ const u = i[0] ?? null;
1521
+ if (u) {
1522
+ const d = u.style.zIndex;
1523
+ d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1405
1524
  }
1406
- const r = n ? "present" : "absent", i = p ? "present" : "absent";
1525
+ const o = n ? "present" : "absent", s = u ? "present" : "absent";
1407
1526
  return {
1408
1527
  valid: e.length === 0,
1409
- mount: r,
1410
- chrome: i,
1528
+ mount: o,
1529
+ chrome: s,
1411
1530
  frozen: t,
1412
1531
  orphans: e,
1413
1532
  timestamp: Date.now()
1414
1533
  };
1415
1534
  }
1416
- const G = "8px 8px 0px", Q = "64px", W = "inset(0px 0px 60px 0px)", j = "inset(0px -40px -40px -40px)";
1417
- function b(e, t, s, l, n) {
1418
- return { id: e, constraint: t, expected: s, actual: l, pass: n };
1535
+ const J = "8px 8px 0px", ee = "64px", te = "inset(0px 0px 60px 0px)", ne = "inset(0px -40px -40px -40px)";
1536
+ function C(e, t, r, l, n) {
1537
+ return { id: e, constraint: t, expected: r, actual: l, pass: n };
1419
1538
  }
1420
- function M(e) {
1539
+ function I(e) {
1421
1540
  const t = parseInt(e, 10);
1422
1541
  return Number.isFinite(t) ? t : NaN;
1423
1542
  }
1424
- function ne() {
1425
- const e = [], t = document.querySelector(".gloss-panel-mount"), s = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), p = document.querySelector(".gloss-bottom-toolbar");
1543
+ function le() {
1544
+ const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1426
1545
  if (!t)
1427
- e.push(b("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1546
+ e.push(C("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1428
1547
  else {
1429
- const r = getComputedStyle(t), i = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = r.clipPath || t.style.clipPath || "", u = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), d = u ? parseInt(u[1], 10) : NaN, h = M(i), g = Number.isFinite(d) && Number.isFinite(h) && d === h;
1548
+ const o = getComputedStyle(t), s = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = o.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = d ? parseInt(d[1], 10) : NaN, h = I(s), y = Number.isFinite(m) && Number.isFinite(h) && m === h;
1430
1549
  e.push(
1431
- b(
1550
+ C(
1432
1551
  "C1",
1433
1552
  "mount --reveal-y matches clip-path inset-bottom Npx",
1434
1553
  `inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
1435
- `--reveal-y=${i || "n/a"} clip-path=${o || "n/a"}`,
1436
- g
1554
+ `--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
1555
+ y
1437
1556
  )
1438
1557
  );
1439
1558
  }
1440
1559
  if (!t)
1441
- e.push(b("C2", "mount padding constant", G, "absent", !1));
1560
+ e.push(C("C2", "mount padding constant", J, "absent", !1));
1442
1561
  else {
1443
- const r = t.style.padding, i = getComputedStyle(t), o = r || i.padding || "", u = o === G || o === "8px 8px 0px 8px";
1444
- e.push(b("C2", "mount padding constant", G, o || "n/a", u));
1562
+ const o = t.style.padding, s = getComputedStyle(t), c = o || s.padding || "", d = c === J || c === "8px 8px 0px 8px";
1563
+ e.push(C("C2", "mount padding constant", J, c || "n/a", d));
1445
1564
  }
1446
1565
  if (!t)
1447
- e.push(b("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, "absent", !1));
1566
+ e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, "absent", !1));
1448
1567
  else {
1449
- const i = getComputedStyle(t).bottom || t.style.bottom || "", o = i === Q;
1450
- e.push(b("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, i || "n/a", o));
1568
+ const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === ee;
1569
+ e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, s || "n/a", c));
1451
1570
  }
1452
- if (!s)
1453
- e.push(b("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1571
+ if (!r)
1572
+ e.push(C("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1454
1573
  else {
1455
- const r = getComputedStyle(s), i = M(
1456
- r.getPropertyValue("--row-h").trim() || s.style.getPropertyValue("--row-h").trim() || "0"
1457
- ), o = M(
1458
- r.getPropertyValue("--row-gap").trim() || s.style.getPropertyValue("--row-gap").trim() || "0"
1459
- ), u = i * 3 + o * 3 - 8, d = M(r.height || s.style.height || ""), h = Number.isFinite(i) && Number.isFinite(o) && Number.isFinite(d) && Number.isFinite(u) && d === u;
1574
+ const o = getComputedStyle(r), s = I(
1575
+ o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1576
+ ), c = I(
1577
+ o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1578
+ ), d = s * 3 + c * 3 - 8, m = I(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(d) && m === d;
1460
1579
  e.push(
1461
- b(
1580
+ C(
1462
1581
  "C4",
1463
1582
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1464
- `${u}px (rh=${i} rg=${o})`,
1465
- `${d}px`,
1583
+ `${d}px (rh=${s} rg=${c})`,
1584
+ `${m}px`,
1466
1585
  h
1467
1586
  )
1468
1587
  );
1469
1588
  }
1470
- if (!l || !s)
1589
+ if (!l || !r)
1471
1590
  e.push(
1472
- b(
1591
+ C(
1473
1592
  "C5",
1474
1593
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1475
1594
  "present",
1476
- `coordinator=${l ? "present" : "absent"} chrome=${s ? "present" : "absent"}`,
1595
+ `coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
1477
1596
  !1
1478
1597
  )
1479
1598
  );
1480
1599
  else {
1481
- const r = getComputedStyle(l), i = getComputedStyle(s), o = r.perspective || l.style.perspective || "", u = (r.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), d = i.perspectiveStyle || s.style.perspectiveStyle || "", _ = o !== "" && o !== "none" && (u === "center bottom" || u === "50% 100%") && d === "flat";
1600
+ const o = getComputedStyle(l), s = getComputedStyle(r), c = o.perspective || l.style.perspective || "", d = (o.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), m = s.perspectiveStyle || r.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
1482
1601
  e.push(
1483
- b(
1602
+ C(
1484
1603
  "C5",
1485
1604
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1486
1605
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1487
- `perspective=${o} origin=${u} chrome-style=${d}`,
1488
- _
1606
+ `perspective=${c} origin=${d} chrome-style=${m}`,
1607
+ v
1489
1608
  )
1490
1609
  );
1491
1610
  }
1492
1611
  {
1493
- let r = !1, i = "absent";
1612
+ let o = !1, s = "absent";
1494
1613
  try {
1495
- for (const o of Array.from(document.styleSheets)) {
1496
- let u = [];
1614
+ for (const c of Array.from(document.styleSheets)) {
1615
+ let d = [];
1497
1616
  try {
1498
- u = Array.from(o.cssRules ?? []);
1617
+ d = Array.from(c.cssRules ?? []);
1499
1618
  } catch {
1500
1619
  continue;
1501
1620
  }
1502
- for (const d of u)
1503
- if (d.name === "stage-spin") {
1504
- const g = Array.from(d.cssRules), m = g.find((C) => C.keyText === "0%" || C.keyText === "from"), _ = g.find((C) => C.keyText === "100%" || C.keyText === "to"), v = m?.style.transform ?? "", N = _?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
1505
- r = w.test(v) && w.test(N), i = `0%=${v || "n/a"} 100%=${N || "n/a"}`;
1621
+ for (const m of d)
1622
+ if (m.name === "stage-spin") {
1623
+ const y = Array.from(m.cssRules), p = y.find((_) => _.keyText === "0%" || _.keyText === "from"), v = y.find((_) => _.keyText === "100%" || _.keyText === "to"), T = p?.style.transform ?? "", S = v?.style.transform ?? "", b = /rotateY\(\s*0(?:deg)?\s*\)/;
1624
+ o = b.test(T) && b.test(S), s = `0%=${T || "n/a"} 100%=${S || "n/a"}`;
1506
1625
  break;
1507
1626
  }
1508
- if (i !== "absent") break;
1627
+ if (s !== "absent") break;
1509
1628
  }
1510
1629
  } catch {
1511
- i = "inspection-error";
1630
+ s = "inspection-error";
1512
1631
  }
1513
1632
  e.push(
1514
- b(
1633
+ C(
1515
1634
  "C6",
1516
1635
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1517
1636
  "both frames rotateY(0)",
1518
- i,
1519
- r
1637
+ s,
1638
+ o
1520
1639
  )
1521
1640
  );
1522
1641
  }
1523
1642
  {
1524
- const r = document.documentElement, i = getComputedStyle(r), o = i.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), u = i.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), d = M(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), h = M(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), g = Number.isFinite(d) && Number.isFinite(h) && d > h;
1643
+ const o = document.documentElement, s = getComputedStyle(o), c = s.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), m = I(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), h = I(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), y = Number.isFinite(m) && Number.isFinite(h) && m > h;
1525
1644
  e.push(
1526
- b("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${u || "n/a"}`, g)
1645
+ C("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, y)
1527
1646
  );
1528
1647
  }
1529
1648
  if (!n)
1530
- e.push(b("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1649
+ e.push(C("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1531
1650
  else {
1532
- const r = getComputedStyle(n), i = r.animationName || "", o = r.transitionProperty || "", u = (i === "" || i === "none") && (o === "" || o === "none" || o === "all");
1651
+ const o = getComputedStyle(n), s = o.animationName || "", c = o.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
1533
1652
  e.push(
1534
- b(
1653
+ C(
1535
1654
  "C8",
1536
1655
  "BellCutout zero computed animation/transition",
1537
1656
  "animation:none AND transition:none",
1538
- `animation=${i || "n/a"} transition=${o || "n/a"}`,
1539
- u
1657
+ `animation=${s || "n/a"} transition=${c || "n/a"}`,
1658
+ d
1540
1659
  )
1541
1660
  );
1542
1661
  }
1543
1662
  if (!t)
1544
- e.push(b("C9", "mount closed-state clipPath", W, "absent", !1));
1663
+ e.push(C("C9", "mount closed-state clipPath", te, "absent", !1));
1545
1664
  else {
1546
- const r = t.style.clipPath, i = getComputedStyle(t), o = r || i.clipPath || "", u = o === W;
1547
- e.push(b("C9", "mount closed-state clipPath", W, o || "n/a", u));
1665
+ const o = t.style.clipPath, s = getComputedStyle(t), c = o || s.clipPath || "", d = c === te;
1666
+ e.push(C("C9", "mount closed-state clipPath", te, c || "n/a", d));
1548
1667
  }
1549
- if (!c)
1550
- e.push(b("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1668
+ if (!i)
1669
+ e.push(C("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1551
1670
  else {
1552
- const r = c.parentElement, i = r === document.body;
1671
+ const o = i.parentElement, s = o === document.body;
1553
1672
  e.push(
1554
- b(
1673
+ C(
1555
1674
  "C10",
1556
1675
  "bell-popover parentElement === document.body (open)",
1557
1676
  "body",
1558
- r === document.body ? "body" : r?.tagName ?? "n/a",
1559
- i
1677
+ o === document.body ? "body" : o?.tagName ?? "n/a",
1678
+ s
1560
1679
  )
1561
1680
  );
1562
1681
  }
1563
1682
  if (!l)
1564
- e.push(b("C11", "coordinator overflow === visible", "visible", "absent", !1));
1683
+ e.push(C("C11", "coordinator overflow === visible", "visible", "absent", !1));
1565
1684
  else {
1566
- const i = getComputedStyle(l).overflow || l.style.overflow || "", o = i === "visible";
1567
- e.push(b("C11", "coordinator overflow === visible", "visible", i || "n/a", o));
1685
+ const s = getComputedStyle(l).overflow || l.style.overflow || "", c = s === "visible";
1686
+ e.push(C("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
1568
1687
  }
1569
- if (!p)
1570
- e.push(b("C12", "toolbar clipPath = inset(0 -40 -40 -40)", j, "absent", !1));
1688
+ if (!u)
1689
+ e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, "absent", !1));
1571
1690
  else {
1572
- const r = p.style.clipPath, i = getComputedStyle(p), o = r || i.clipPath || "", u = o === j;
1573
- e.push(b("C12", "toolbar clipPath = inset(0 -40 -40 -40)", j, o || "n/a", u));
1691
+ const o = u.style.clipPath, s = getComputedStyle(u), c = o || s.clipPath || "", d = c === ne;
1692
+ e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, c || "n/a", d));
1574
1693
  }
1575
1694
  return e.push(
1576
- b(
1695
+ C(
1577
1696
  "C13",
1578
1697
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
1579
1698
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -1581,7 +1700,7 @@ function ne() {
1581
1700
  "wiring_only"
1582
1701
  )
1583
1702
  ), e.push(
1584
- b(
1703
+ C(
1585
1704
  "C14",
1586
1705
  'cross-position handoff transitionend filtered by propertyName="max-height"',
1587
1706
  "transitionend filter wired in orchestrator (source-proof)",
@@ -1590,11 +1709,11 @@ function ne() {
1590
1709
  )
1591
1710
  ), e;
1592
1711
  }
1593
- function ut(e) {
1594
- return ne().find((t) => t.id === e);
1712
+ function Pt(e) {
1713
+ return le().find((t) => t.id === e);
1595
1714
  }
1596
- function pt() {
1597
- const e = X();
1715
+ function wt() {
1716
+ const e = se();
1598
1717
  return { q12: [
1599
1718
  {
1600
1719
  id: "Q12-12",
@@ -1603,84 +1722,83 @@ function pt() {
1603
1722
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
1604
1723
  pass: e.valid
1605
1724
  }
1606
- ], cc: ne() };
1725
+ ], cc: le() };
1607
1726
  }
1608
- function mt() {
1727
+ function At() {
1609
1728
  return {
1610
- enable: ht,
1611
- disable: ft,
1729
+ enable: xt,
1730
+ disable: kt,
1612
1731
  isEnabled: () => V,
1613
- getLastReport: () => q,
1732
+ getLastReport: () => X,
1614
1733
  recordTransition: (e) => {
1615
- V && (q = { ...e, ...X() });
1734
+ V && (X = { ...e, ...se() });
1616
1735
  },
1617
1736
  assertOnce: () => {
1618
- const e = X();
1619
- return q = e, e;
1737
+ const e = se();
1738
+ return X = e, e;
1620
1739
  },
1621
- assertCcOnly: ne,
1622
- getCcRowById: ut,
1623
- assertPanelTruths: pt
1740
+ assertCcOnly: le,
1741
+ getCcRowById: Pt,
1742
+ assertPanelTruths: wt
1624
1743
  };
1625
1744
  }
1626
- function ht() {
1745
+ function xt() {
1627
1746
  if (V = !0, typeof window > "u") return;
1628
- window.__panelsAsserter || (window.__panelsAsserter = mt(), console.info(
1747
+ window.__panelsAsserter || (window.__panelsAsserter = At(), console.info(
1629
1748
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1630
1749
  ));
1631
1750
  }
1632
- function ft() {
1751
+ function kt() {
1633
1752
  V = !1;
1634
1753
  }
1635
1754
  export {
1636
- Rt as COMMITS,
1637
- xt as CatalogAddShell,
1638
- Tt as CatalogFooter,
1639
- Et as CatalogReplaceShell,
1640
- ee as CatalogStateContext,
1641
- fe as CloneCard,
1642
- Ot as CloneStage,
1643
- ye as MOCK_DEFAULT_LENS,
1644
- ge as MOCK_LENSES,
1645
- be as MOCK_LENS_META,
1646
- Xe as MOCK_PAGES,
1647
- ve as MOCK_TILES_BY_LENS,
1648
- Ge as MetricInfoShell,
1649
- Ft as NotificationCenterShell,
1650
- Dt as PANEL_IDS,
1651
- Ze as PageMgmtFooter,
1652
- At as PageMgmtShell,
1653
- _e as PageMgmtStateContext,
1654
- zt as PanelBody,
1655
- z as PanelChromeV2,
1656
- Ht as PanelFooter,
1657
- Pt as PanelFooterMessage,
1658
- Bt as PanelHeader,
1659
- Yt as PanelHost,
1660
- kt as PanelHostShell,
1661
- Ee as PanelMount,
1662
- Vt as PanelNavigation,
1663
- Ut as PanelProvider,
1664
- Lt as PanelSlot,
1665
- Kt as PanelStage,
1666
- wt as SettingsShell,
1667
- ne as assertCcOnly,
1668
- X as assertPanelDomShape,
1669
- pt as assertPanelTruths,
1670
- qt as deriveSurfaceState,
1671
- ft as disablePanelAsserter,
1672
- ht as enablePanelAsserter,
1673
- ut as getCcRowById,
1674
- Gt as initialState,
1675
- de as positionKey,
1676
- Qt as reducer,
1677
- ct as transitionToPanel,
1678
- te as useCatalogState,
1679
- St as useEditingCardId,
1680
- Ne as usePageMgmtState,
1681
- xe as usePanelContext,
1682
- D as usePanelContextOptional,
1683
- Wt as usePanelCoordinator,
1684
- J as useReducedMotionPanel,
1685
- Mt as useTransitionToPanel
1755
+ en as COMMITS,
1756
+ Kt as CatalogAddShell,
1757
+ Vt as CatalogFooter,
1758
+ qt as CatalogReplaceShell,
1759
+ re as CatalogStateContext,
1760
+ je as CloneCard,
1761
+ et as CloneStage,
1762
+ Ce as MOCK_DEFAULT_LENS,
1763
+ _e as MOCK_LENSES,
1764
+ Ne as MOCK_LENS_META,
1765
+ mt as MOCK_PAGES,
1766
+ Se as MOCK_TILES_BY_LENS,
1767
+ tn as NotificationCenterShell,
1768
+ Wt as PANEL_IDS,
1769
+ pt as PageMgmtFooter,
1770
+ Qt as PageMgmtShell,
1771
+ Te as PageMgmtStateContext,
1772
+ nn as PanelBody,
1773
+ K as PanelChromeV2,
1774
+ an as PanelFooter,
1775
+ Bt as PanelFooterMessage,
1776
+ sn as PanelHeader,
1777
+ rn as PanelHost,
1778
+ Gt as PanelHostShell,
1779
+ Oe as PanelMount,
1780
+ on as PanelNavigation,
1781
+ ln as PanelProvider,
1782
+ jt as PanelSlot,
1783
+ cn as PanelStage,
1784
+ Yt as SettingsShell,
1785
+ le as assertCcOnly,
1786
+ se as assertPanelDomShape,
1787
+ wt as assertPanelTruths,
1788
+ dn as deriveSurfaceState,
1789
+ kt as disablePanelAsserter,
1790
+ xt as enablePanelAsserter,
1791
+ Pt as getCcRowById,
1792
+ un as initialState,
1793
+ fe as positionKey,
1794
+ pn as reducer,
1795
+ Et as transitionToPanel,
1796
+ oe as useCatalogState,
1797
+ Ht as useEditingCardId,
1798
+ Pe as usePageMgmtState,
1799
+ Me as usePanelContext,
1800
+ O as usePanelContextOptional,
1801
+ mn as usePanelCoordinator,
1802
+ be as useReducedMotionPanel,
1803
+ Zt as useTransitionToPanel
1686
1804
  };