@mt-gloss/ui 0.1.142 → 0.1.143

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