@mt-gloss/ui 0.1.142 → 0.1.144

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-BexFJUgk.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 Ce({ 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 }, S = K(u, [0, 360 * g], C), y = K(o, [1, 1.03, 1], C), P = [S, 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 S.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((S) => S === h.id), C = e.findIndex((S) => S === 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, S = c[0] ?? "timeframe", [y, P] = I.useState(u ?? S);
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(S);
219
+ }, [c, y, S]);
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
+ }, [N, 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: N, onSpinComplete: M, children: /* @__PURE__ */ a(Ce, { 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,55 @@ 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__ */ a("div", { className: "settings-shell__field settings-shell__field--timeframe", children: /* @__PURE__ */ a(
290
+ ze,
291
+ {
292
+ selectedPreset: $,
293
+ onSelect: W,
294
+ pinnedPreset: l ?? "30d",
295
+ onPin: j,
296
+ openGroup: T,
297
+ onOpenChange: (D, Ae) => k(Ae ? D : null),
298
+ disableHover: !0,
299
+ showCalendarEntry: !1
300
+ }
301
+ ) }),
302
+ y === "slots" && /* @__PURE__ */ a(at, { value: F, onChange: ie, naturalSlots: i })
315
303
  ]
316
304
  }
317
305
  ) })
318
306
  }
319
307
  );
320
308
  }
321
- function st({
309
+ function rt({
322
310
  isOpen: e,
323
311
  cardSpan: t,
324
312
  previewSlot: s,
325
313
  metricInfo: r
326
314
  }) {
327
- const n = M(), c = n?.state.activeTrigger, p = ae(), o = c?.span;
315
+ const n = L(), c = n?.state.activeTrigger, u = se(), o = c?.span;
328
316
  return /* @__PURE__ */ a(
329
- z,
317
+ H,
330
318
  {
331
319
  variant: "with-stage",
332
320
  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(
321
+ stage: /* @__PURE__ */ a(Ce, { span: t ?? o ?? 1, rotating: !u, children: s }),
322
+ children: /* @__PURE__ */ _(
335
323
  "div",
336
324
  {
337
325
  className: "metric-info-shell",
@@ -346,7 +334,7 @@ function st({
346
334
  }
347
335
  );
348
336
  }
349
- st.displayName = "MetricInfoShell";
337
+ rt.displayName = "MetricInfoShell";
350
338
  const _e = [
351
339
  "Revenue",
352
340
  "Order flow",
@@ -354,7 +342,7 @@ const _e = [
354
342
  "Brand portfolio",
355
343
  "Account coverage",
356
344
  "Commission"
357
- ], Ce = "Revenue", Ne = {
345
+ ], Se = "Revenue", Ne = {
358
346
  Revenue: {
359
347
  headline: "Are we hitting our number?",
360
348
  helper: "Top-line sales, growth, average order value, and pace-to-plan signals."
@@ -379,7 +367,7 @@ const _e = [
379
367
  headline: "What's our commission rate?",
380
368
  helper: "Outstanding balances, aging buckets, and effective commission yield."
381
369
  }
382
- }, Se = {
370
+ }, Pe = {
383
371
  Revenue: {
384
372
  primary: [
385
373
  {
@@ -664,7 +652,7 @@ const _e = [
664
652
  ]
665
653
  }
666
654
  };
667
- function Pe({
655
+ function Te({
668
656
  lenses: e,
669
657
  activeLens: t,
670
658
  onLensChange: s,
@@ -672,17 +660,17 @@ function Pe({
672
660
  lensMeta: n = Ne
673
661
  }) {
674
662
  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(
663
+ const u = c === t, o = n[c], l = ["cat-pill"];
664
+ return u && l.push("active"), /* @__PURE__ */ _(
677
665
  "button",
678
666
  {
679
667
  type: "button",
680
668
  role: "tab",
681
- "aria-selected": p,
682
- className: i.join(" "),
669
+ "aria-selected": u,
670
+ className: l.join(" "),
683
671
  "data-lens": c,
684
672
  onClick: () => {
685
- p || s(c);
673
+ u || s(c);
686
674
  },
687
675
  children: [
688
676
  c,
@@ -691,19 +679,19 @@ function Pe({
691
679
  },
692
680
  c
693
681
  );
694
- }) }) }) : /* @__PURE__ */ a(ot, { lenses: e, activeLens: t, onLensChange: s });
682
+ }) }) }) : /* @__PURE__ */ a(lt, { lenses: e, activeLens: t, onLensChange: s });
695
683
  }
696
- function ot({
684
+ function lt({
697
685
  lenses: e,
698
686
  activeLens: t,
699
687
  onLensChange: s
700
688
  }) {
701
- const [r, n] = E(!1), c = K(null), p = () => {
689
+ const [r, n] = x(!1), c = Q(null), u = () => {
702
690
  c.current != null && (window.clearTimeout(c.current), c.current = null);
703
691
  }, 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: [
692
+ u(), c.current = window.setTimeout(() => n(!1), 100);
693
+ }, l = e.filter((i) => i !== t);
694
+ return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ _("div", { className: "cat-segmented", children: [
707
695
  /* @__PURE__ */ a(
708
696
  "button",
709
697
  {
@@ -714,12 +702,12 @@ function ot({
714
702
  children: t
715
703
  }
716
704
  ),
717
- /* @__PURE__ */ b(
705
+ /* @__PURE__ */ _(
718
706
  "div",
719
707
  {
720
708
  className: "cat-seg-more",
721
709
  onMouseEnter: () => {
722
- p(), n(!0);
710
+ u(), n(!0);
723
711
  },
724
712
  onMouseLeave: o,
725
713
  children: [
@@ -729,20 +717,20 @@ function ot({
729
717
  {
730
718
  className: "cat-seg-overflow",
731
719
  role: "menu",
732
- onMouseEnter: p,
720
+ onMouseEnter: u,
733
721
  onMouseLeave: o,
734
- children: i.map((l) => /* @__PURE__ */ a(
722
+ children: l.map((i) => /* @__PURE__ */ a(
735
723
  "button",
736
724
  {
737
725
  type: "button",
738
- "data-lens": l,
726
+ "data-lens": i,
739
727
  role: "menuitem",
740
728
  onClick: () => {
741
- s(l), n(!1);
729
+ s(i), n(!1);
742
730
  },
743
- children: l
731
+ children: i
744
732
  },
745
- l
733
+ i
746
734
  ))
747
735
  }
748
736
  )
@@ -751,30 +739,30 @@ function ot({
751
739
  )
752
740
  ] }) });
753
741
  }
754
- function te({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
742
+ function ne({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
755
743
  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;
744
+ const c = n.id === t, u = n.subStats != null && n.subStats.length > 0;
757
745
  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;
746
+ u ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
747
+ const l = ["cat-tile"];
748
+ 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");
749
+ const i = 1;
762
750
  let d = 0.7;
763
751
  if (n.donut) {
764
- const u = /([\d.]+)\s*%/.exec(n.value);
765
- if (u) {
766
- const h = parseFloat(u[1]);
752
+ const p = /([\d.]+)\s*%/.exec(n.value);
753
+ if (p) {
754
+ const h = parseFloat(p[1]);
767
755
  Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
768
756
  }
769
757
  }
770
- return /* @__PURE__ */ b(
758
+ return /* @__PURE__ */ _(
771
759
  "button",
772
760
  {
773
761
  type: "button",
774
- className: i.join(" "),
762
+ className: l.join(" "),
775
763
  "data-metric": n.id,
776
764
  "data-desc": n.desc,
777
- "data-col-span": String(l),
765
+ "data-col-span": String(i),
778
766
  "data-donut": n.donut ? "true" : void 0,
779
767
  "data-accent": n.accent,
780
768
  "aria-pressed": c,
@@ -798,7 +786,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
798
786
  donutValue: d,
799
787
  donutMax: 1,
800
788
  accentColor: n.accent,
801
- colSpan: l
789
+ colSpan: i
802
790
  }
803
791
  ) : /* @__PURE__ */ a(
804
792
  ue,
@@ -806,12 +794,12 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
806
794
  variant: "standard",
807
795
  label: n.label,
808
796
  value: n.value,
809
- colSpan: l
797
+ colSpan: i
810
798
  }
811
799
  )
812
800
  }
813
801
  ),
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)) }),
802
+ 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
803
  n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
816
804
  ]
817
805
  },
@@ -819,17 +807,17 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
819
807
  );
820
808
  }) });
821
809
  }
822
- const se = ye(null);
823
- function oe() {
824
- return be(se);
810
+ const oe = be(null);
811
+ function re() {
812
+ return ve(oe);
825
813
  }
826
- function zt({ mode: e, dispatch: t }) {
827
- const s = oe();
814
+ function Ut({ mode: e, dispatch: t }) {
815
+ const s = re();
828
816
  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: [
817
+ const r = s?.mode ?? e ?? "add", n = s?.selectedTileId ?? null, c = s?.description ?? null, u = n == null;
818
+ return /* @__PURE__ */ _("div", { className: "panel-footer catalog", children: [
831
819
  /* @__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: [
820
+ /* @__PURE__ */ _("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
833
821
  /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
834
822
  /* @__PURE__ */ a(
835
823
  "button",
@@ -847,7 +835,7 @@ function zt({ mode: e, dispatch: t }) {
847
835
  id: "btn-cat-add",
848
836
  type: "button",
849
837
  className: "btn btn-primary",
850
- disabled: p,
838
+ disabled: u,
851
839
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
852
840
  children: "Add metric"
853
841
  }
@@ -858,7 +846,7 @@ function zt({ mode: e, dispatch: t }) {
858
846
  id: "btn-cat-replace",
859
847
  type: "button",
860
848
  className: "btn btn-primary",
861
- disabled: p,
849
+ disabled: u,
862
850
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
863
851
  children: "Replace metric"
864
852
  }
@@ -866,7 +854,7 @@ function zt({ mode: e, dispatch: t }) {
866
854
  ] })
867
855
  ] });
868
856
  }
869
- function pe(e, t) {
857
+ function me(e, t) {
870
858
  if (t.length === 0) return !0;
871
859
  const s = t.toLowerCase();
872
860
  if (e.label.toLowerCase().includes(s) || e.value.toLowerCase().includes(s)) return !0;
@@ -876,53 +864,53 @@ function pe(e, t) {
876
864
  }
877
865
  return !1;
878
866
  }
879
- function rt() {
880
- const t = oe()?.description ?? null;
867
+ function it() {
868
+ const t = re()?.description ?? null;
881
869
  return t == null ? /* @__PURE__ */ a("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ a("span", { children: t });
882
870
  }
883
- function Ht({
871
+ function Bt({
884
872
  isOpen: e,
885
873
  lenses: t = _e,
886
- defaultLens: s = Ce,
887
- tilesByLens: r = Se,
874
+ defaultLens: s = Se,
875
+ tilesByLens: r = Pe,
888
876
  lensMeta: n = Ne,
889
877
  renderTile: c,
890
- onAdd: p
878
+ onAdd: u
891
879
  }) {
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;
880
+ const o = L(), [l, i] = x(s), [d, p] = x(null), [h, g] = x(null), [m, C] = x(""), S = r[l] ?? { primary: [] }, y = n[l], P = ce(
881
+ () => S.primary.filter((T) => me(T, m)),
882
+ [S.primary, m]
883
+ ), b = ce(
884
+ () => (S.secondary ?? []).filter((T) => me(T, m)),
885
+ [S.secondary, m]
886
+ ), w = () => {
887
+ d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
888
+ }, $ = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), F = d == null;
901
889
  return /* @__PURE__ */ a(
902
- se.Provider,
890
+ oe.Provider,
903
891
  {
904
892
  value: { mode: "add", selectedTileId: d, description: h },
905
893
  children: /* @__PURE__ */ a(
906
- z,
894
+ H,
907
895
  {
908
896
  variant: "no-stage",
909
897
  title: "Add a metric",
910
- onClose: R,
898
+ onClose: $,
911
899
  footer: {
912
- left: /* @__PURE__ */ a(rt, {}),
900
+ left: /* @__PURE__ */ a(it, {}),
913
901
  right: /* @__PURE__ */ a(
914
902
  "button",
915
903
  {
916
904
  id: "btn-cat-add",
917
905
  type: "button",
918
906
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
919
- disabled: $,
920
- onClick: x,
907
+ disabled: F,
908
+ onClick: w,
921
909
  children: "Add metric"
922
910
  }
923
911
  )
924
912
  },
925
- children: /* @__PURE__ */ b("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
913
+ children: /* @__PURE__ */ _("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
926
914
  /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
927
915
  "input",
928
916
  {
@@ -931,51 +919,51 @@ function Ht({
931
919
  placeholder: "Search metrics",
932
920
  "aria-label": "Search metrics",
933
921
  value: m,
934
- onChange: (P) => v(P.target.value)
922
+ onChange: (T) => C(T.target.value)
935
923
  }
936
924
  ) }),
937
925
  /* @__PURE__ */ a(
938
- Pe,
926
+ Te,
939
927
  {
940
928
  lenses: t,
941
- activeLens: i,
929
+ activeLens: l,
942
930
  lensMeta: n,
943
931
  variant: "pills",
944
- onLensChange: (P) => {
945
- l(P), u(null), y(null), v("");
932
+ onLensChange: (T) => {
933
+ i(T), p(null), g(null), C("");
946
934
  }
947
935
  }
948
936
  ),
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 })
937
+ y && /* @__PURE__ */ _("div", { className: "cat-lens-meta", children: [
938
+ /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: y.headline }),
939
+ /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: y.helper })
952
940
  ] }),
953
941
  /* @__PURE__ */ a(
954
- te,
942
+ ne,
955
943
  {
956
- tiles: w,
944
+ tiles: P,
957
945
  selectedTileId: d,
958
- onSelectTile: (P, A) => {
959
- u(P), y(A);
946
+ onSelectTile: (T, k) => {
947
+ p(T), g(k);
960
948
  },
961
949
  renderTile: c
962
950
  }
963
951
  ),
964
- g.length > 0 && /* @__PURE__ */ b("div", { className: "cat-more-in-lens", children: [
952
+ b.length > 0 && /* @__PURE__ */ _("div", { className: "cat-more-in-lens", children: [
965
953
  /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
966
954
  /* @__PURE__ */ a(
967
- te,
955
+ ne,
968
956
  {
969
- tiles: g,
957
+ tiles: b,
970
958
  selectedTileId: d,
971
- onSelectTile: (P, A) => {
972
- u(P), y(A);
959
+ onSelectTile: (T, k) => {
960
+ p(T), g(k);
973
961
  },
974
962
  renderTile: c
975
963
  }
976
964
  )
977
965
  ] }),
978
- w.length === 0 && g.length === 0 && m.length > 0 && /* @__PURE__ */ b("div", { className: "cat-empty", children: [
966
+ P.length === 0 && b.length === 0 && m.length > 0 && /* @__PURE__ */ _("div", { className: "cat-empty", children: [
979
967
  'No metrics match "',
980
968
  m,
981
969
  '".'
@@ -986,65 +974,65 @@ function Ht({
986
974
  }
987
975
  );
988
976
  }
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 });
977
+ function ct() {
978
+ const t = re()?.description ?? null;
979
+ return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(ye, { children: t });
992
980
  }
993
- function Ut({
981
+ function Vt({
994
982
  isOpen: e,
995
983
  replacingLabel: t,
996
984
  lenses: s = _e,
997
- defaultLens: r = Ce,
998
- tilesByLens: n = Se,
985
+ defaultLens: r = Se,
986
+ tilesByLens: n = Pe,
999
987
  renderTile: c
1000
988
  }) {
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;
989
+ 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" }), S = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), y = i == null;
1002
990
  return /* @__PURE__ */ a(
1003
- se.Provider,
991
+ oe.Provider,
1004
992
  {
1005
- value: { mode: "replace", selectedTileId: l, description: u },
993
+ value: { mode: "replace", selectedTileId: i, description: p },
1006
994
  children: /* @__PURE__ */ a(
1007
- z,
995
+ H,
1008
996
  {
1009
997
  variant: "no-stage",
1010
998
  title: "Replace metric",
1011
- onClose: _,
999
+ onClose: S,
1012
1000
  footer: {
1013
- left: /* @__PURE__ */ a(lt, {}),
1001
+ left: /* @__PURE__ */ a(ct, {}),
1014
1002
  right: /* @__PURE__ */ a(
1015
1003
  "button",
1016
1004
  {
1017
1005
  id: "btn-cat-replace",
1018
1006
  type: "button",
1019
1007
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
1020
- disabled: N,
1021
- onClick: v,
1008
+ disabled: y,
1009
+ onClick: C,
1022
1010
  children: "Replace metric"
1023
1011
  }
1024
1012
  )
1025
1013
  },
1026
- children: /* @__PURE__ */ b("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1027
- t && /* @__PURE__ */ b("p", { className: "cat-subtitle", children: [
1014
+ children: /* @__PURE__ */ _("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1015
+ t && /* @__PURE__ */ _("p", { className: "cat-subtitle", children: [
1028
1016
  "replacing ",
1029
1017
  t
1030
1018
  ] }),
1031
1019
  /* @__PURE__ */ a(
1032
- Pe,
1020
+ Te,
1033
1021
  {
1034
1022
  lenses: s,
1035
1023
  activeLens: o,
1036
- onLensChange: (w) => {
1037
- i(w), d(null), h(null);
1024
+ onLensChange: (P) => {
1025
+ l(P), d(null), h(null);
1038
1026
  }
1039
1027
  }
1040
1028
  ),
1041
1029
  /* @__PURE__ */ a(
1042
- te,
1030
+ ne,
1043
1031
  {
1044
1032
  tiles: m,
1045
- selectedTileId: l,
1046
- onSelectTile: (w, g) => {
1047
- d(w), h(g);
1033
+ selectedTileId: i,
1034
+ onSelectTile: (P, b) => {
1035
+ d(P), h(b);
1048
1036
  },
1049
1037
  renderTile: c
1050
1038
  }
@@ -1055,13 +1043,13 @@ function Ut({
1055
1043
  }
1056
1044
  );
1057
1045
  }
1058
- const Te = ye(null);
1046
+ const Ee = be(null);
1059
1047
  function we() {
1060
- return be(Te);
1048
+ return ve(Ee);
1061
1049
  }
1062
- function it(e = {}) {
1050
+ function dt(e = {}) {
1063
1051
  const t = we(), s = t?.createPage, r = t?.setPages;
1064
- return /* @__PURE__ */ b(
1052
+ return /* @__PURE__ */ _(
1065
1053
  "div",
1066
1054
  {
1067
1055
  className: "panel-footer pm",
@@ -1091,28 +1079,28 @@ function it(e = {}) {
1091
1079
  }
1092
1080
  );
1093
1081
  }
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));
1082
+ function he({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n }) {
1083
+ const c = we(), [u, o] = x(!1), l = Q(null);
1084
+ z(() => {
1085
+ if (!u) return;
1086
+ const m = (C) => {
1087
+ l.current && (l.current.contains(C.target) || o(!1));
1100
1088
  };
1101
1089
  return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
1102
- }, [p]);
1103
- const l = () => {
1090
+ }, [u]);
1091
+ const i = () => {
1104
1092
  if (o(!1), t) return t(e.id);
1105
1093
  if (!c?.renamePage) return;
1106
1094
  const m = window.prompt("Rename page", e.name);
1107
1095
  m != null && m.trim().length > 0 && c.renamePage(e.id, m.trim());
1108
1096
  }, d = () => {
1109
1097
  o(!1), c?.duplicatePage?.(e.id);
1110
- }, u = () => {
1098
+ }, p = () => {
1111
1099
  o(!1), c?.deletePage?.(e.id);
1112
1100
  }, h = (m) => {
1113
1101
  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: [
1102
+ }, g = ["pm-row"];
1103
+ return e.active && g.push("active"), /* @__PURE__ */ _("div", { ref: l, className: g.join(" "), "data-page-id": e.id, role: "listitem", children: [
1116
1104
  /* @__PURE__ */ a(
1117
1105
  "div",
1118
1106
  {
@@ -1143,17 +1131,17 @@ function me({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n
1143
1131
  className: "pm-kebab",
1144
1132
  "aria-label": "Page options",
1145
1133
  "aria-haspopup": "menu",
1146
- "aria-expanded": p,
1134
+ "aria-expanded": u,
1147
1135
  onPointerDown: (m) => m.stopPropagation(),
1148
1136
  onMouseDown: (m) => m.stopPropagation(),
1149
1137
  onClick: (m) => {
1150
1138
  if (m.stopPropagation(), s) return s(e.id);
1151
- o((v) => !v);
1139
+ o((C) => !C);
1152
1140
  },
1153
1141
  children: "⋯"
1154
1142
  }
1155
1143
  ),
1156
- p && /* @__PURE__ */ b(
1144
+ u && /* @__PURE__ */ _(
1157
1145
  "div",
1158
1146
  {
1159
1147
  className: "pm-kebab-menu",
@@ -1162,7 +1150,7 @@ function me({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n
1162
1150
  onPointerDown: (m) => m.stopPropagation(),
1163
1151
  onMouseDown: (m) => m.stopPropagation(),
1164
1152
  children: [
1165
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: l, children: "Rename" }),
1153
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: i, children: "Rename" }),
1166
1154
  /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
1167
1155
  /* @__PURE__ */ a(
1168
1156
  "button",
@@ -1170,7 +1158,7 @@ function me({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n
1170
1158
  type: "button",
1171
1159
  role: "menuitem",
1172
1160
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1173
- onClick: u,
1161
+ onClick: p,
1174
1162
  children: "Delete"
1175
1163
  }
1176
1164
  )
@@ -1179,121 +1167,121 @@ function me({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n
1179
1167
  )
1180
1168
  ] });
1181
1169
  }
1182
- const ct = [
1170
+ const ut = [
1183
1171
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1184
1172
  { id: "p-numbers", name: "My Numbers", active: !1 },
1185
1173
  { id: "p-morning", name: "My Morning", active: !1 },
1186
1174
  { id: "p-accounts", name: "My Accounts", active: !1 }
1187
1175
  ];
1188
- function Bt({
1176
+ function Yt({
1189
1177
  isOpen: e,
1190
- pages: t = ct,
1178
+ pages: t = ut,
1191
1179
  externalPages: s,
1192
1180
  activePageId: r,
1193
1181
  onRename: n,
1194
1182
  onDuplicate: c,
1195
- onDelete: p,
1183
+ onDelete: u,
1196
1184
  onReorder: o,
1197
- onCreatePage: i,
1198
- onSwitchPage: l
1185
+ onCreatePage: l,
1186
+ onSwitchPage: i
1199
1187
  }) {
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`,
1188
+ const d = L(), [p, h] = x(() => [...t]), g = O((f, N) => {
1189
+ h((E) => E.map((A) => A.id === f ? { ...A, name: N } : A));
1190
+ }, []), m = O((f) => {
1191
+ h((N) => {
1192
+ const E = N.find((V) => V.id === f);
1193
+ if (!E) return N;
1194
+ const A = {
1195
+ id: `${E.id}-copy-${Date.now()}`,
1196
+ name: `${E.name} copy`,
1209
1197
  active: !1
1210
- }, L = T.findIndex((W) => W.id === f);
1211
- return [...T.slice(0, L + 1), D, ...T.slice(L + 1)];
1198
+ }, M = N.findIndex((V) => V.id === f);
1199
+ return [...N.slice(0, M + 1), A, ...N.slice(M + 1)];
1212
1200
  });
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;
1201
+ }, []), C = O((f) => {
1202
+ h((N) => N.filter((E) => E.id !== f));
1203
+ }, []), S = O((f) => {
1204
+ h((N) => {
1205
+ const E = new Map(N.map((M) => [M.id, M])), A = f.map((M) => E.get(M)).filter(Boolean);
1206
+ return A.length === N.length ? A : N;
1219
1207
  });
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(
1208
+ }, []), 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 : S), k = O(
1221
1209
  (f) => {
1222
- N || h(f);
1210
+ y || h(f);
1223
1211
  },
1224
- [N]
1225
- ), H = k(
1212
+ [y]
1213
+ ), W = O(
1226
1214
  (f) => {
1227
- const T = f[0]?.items.map((S) => S.id) ?? [];
1228
- T.length > 0 && P && P(T);
1215
+ const N = f[0]?.items.map((E) => E.id) ?? [];
1216
+ N.length > 0 && T && T(N);
1229
1217
  },
1230
- [P]
1231
- ), q = g.map((f) => `${f.id}:${f.name}`).join("|"), G = P != null && g.length > 1 ? /* @__PURE__ */ a(
1232
- De,
1218
+ [T]
1219
+ ), j = b.map((f) => `${f.id}:${f.name}`).join("|"), U = T != null && b.length > 1 ? /* @__PURE__ */ a(
1220
+ Le,
1233
1221
  {
1234
1222
  zones: [
1235
1223
  {
1236
1224
  zoneKey: "pm-pages",
1237
- items: g.map((f) => ({ ...f, id: f.id }))
1225
+ items: b.map((f) => ({ ...f, id: f.id }))
1238
1226
  }
1239
1227
  ],
1240
- onZoneChange: H,
1241
- renderZone: (f, T, S) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: S }),
1228
+ onZoneChange: W,
1229
+ renderZone: (f, N, E) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: E }),
1242
1230
  renderItem: (f) => /* @__PURE__ */ a(
1243
- me,
1231
+ he,
1244
1232
  {
1245
1233
  page: f,
1246
- onSwitchPage: l
1234
+ onSwitchPage: i
1247
1235
  },
1248
1236
  f.id
1249
1237
  )
1250
1238
  },
1251
- q
1252
- ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: g.map((f) => /* @__PURE__ */ a(
1253
- me,
1239
+ j
1240
+ ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: b.map((f) => /* @__PURE__ */ a(
1241
+ he,
1254
1242
  {
1255
1243
  page: f,
1256
- onSwitchPage: l
1244
+ onSwitchPage: i
1257
1245
  },
1258
1246
  f.id
1259
- )) }), Q = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1247
+ )) }), B = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1260
1248
  return /* @__PURE__ */ a(
1261
- Te.Provider,
1249
+ Ee.Provider,
1262
1250
  {
1263
1251
  value: {
1264
- pages: g,
1265
- setPages: A,
1266
- renamePage: x,
1267
- duplicatePage: R,
1268
- deletePage: $,
1252
+ pages: b,
1253
+ setPages: k,
1254
+ renamePage: w,
1255
+ duplicatePage: $,
1256
+ deletePage: F,
1269
1257
  // Sprint 2026-05-20 — propagate live create binding for footer.
1270
- createPage: i
1258
+ createPage: l
1271
1259
  },
1272
1260
  children: /* @__PURE__ */ a(
1273
- z,
1261
+ H,
1274
1262
  {
1275
1263
  variant: "no-stage",
1276
1264
  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 })
1265
+ onClose: B,
1266
+ footer: { right: /* @__PURE__ */ a(dt, {}) },
1267
+ children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: U })
1280
1268
  }
1281
1269
  )
1282
1270
  }
1283
1271
  );
1284
1272
  }
1285
- const Yt = {
1273
+ const Kt = {
1286
1274
  SETTINGS: "settings",
1287
1275
  CATALOG_ADD: "catalog-add",
1288
1276
  CATALOG_REPLACE: "catalog-replace",
1289
1277
  PAGE_MGMT: "page-management",
1290
1278
  NOTIFICATION_CENTER: "notification-center"
1291
- }, dt = {
1279
+ }, pt = {
1292
1280
  position: "fixed",
1293
1281
  inset: 0,
1294
1282
  pointerEvents: "none",
1295
1283
  zIndex: 55
1296
- }, ut = {
1284
+ }, mt = {
1297
1285
  position: "absolute",
1298
1286
  inset: 0,
1299
1287
  zIndex: 1,
@@ -1302,19 +1290,19 @@ const Yt = {
1302
1290
  pointerEvents: "none",
1303
1291
  background: "rgba(0, 0, 0, 0.04)"
1304
1292
  };
1305
- function Vt() {
1306
- const { state: e, dispatch: t, getCloseLog: s } = Me();
1307
- F(() => {
1293
+ function qt() {
1294
+ const { state: e, dispatch: t, getCloseLog: s } = ke();
1295
+ z(() => {
1308
1296
  if (e.activePanelId == null) return;
1309
1297
  function n(c) {
1310
1298
  c.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1311
1299
  }
1312
1300
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1313
1301
  }, [e.activePanelId, t]);
1314
- const r = K(e);
1315
- return ke(() => {
1302
+ const r = Q(e);
1303
+ return Ie(() => {
1316
1304
  r.current = e;
1317
- }), F(() => {
1305
+ }), z(() => {
1318
1306
  if (process.env.NODE_ENV === "production") return;
1319
1307
  const n = window;
1320
1308
  return n.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), n.__panelsHostHandle = {
@@ -1324,18 +1312,18 @@ function Vt() {
1324
1312
  }, () => {
1325
1313
  n.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1326
1314
  };
1327
- }, [t, s]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: dt, children: e.activePanelId != null && /* @__PURE__ */ a(
1315
+ }, [t, s]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: pt, children: e.activePanelId != null && /* @__PURE__ */ a(
1328
1316
  "div",
1329
1317
  {
1330
1318
  "data-panel-scrim": "true",
1331
- style: ut
1319
+ style: mt
1332
1320
  }
1333
1321
  ) });
1334
1322
  }
1335
- const pt = 700;
1336
- function mt(e, t) {
1337
- const [s, r] = E(null), n = K(null);
1338
- return F(() => {
1323
+ const ht = 700;
1324
+ function ft(e, t) {
1325
+ const [s, r] = x(null), n = Q(null);
1326
+ return z(() => {
1339
1327
  if (e != null) {
1340
1328
  n.current != null && (clearTimeout(n.current), n.current = null), r(null);
1341
1329
  return;
@@ -1346,43 +1334,43 @@ function mt(e, t) {
1346
1334
  }
1347
1335
  return n.current = setTimeout(() => {
1348
1336
  r(null), n.current = null;
1349
- }, pt), () => {
1337
+ }, ht), () => {
1350
1338
  n.current != null && (clearTimeout(n.current), n.current = null);
1351
1339
  };
1352
- }, [e, t]), F(() => {
1340
+ }, [e, t]), z(() => {
1353
1341
  e != null && r(e);
1354
1342
  }, [e]), e != null ? { panelId: e, isOpen: !0 } : s != null ? { panelId: s, isOpen: !1 } : { panelId: null, isOpen: !1 };
1355
1343
  }
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);
1344
+ function Gt({ panelComponents: e, children: t }) {
1345
+ const s = L(), r = s?.state.lastClose?.reason === "section-hidden", n = ft(s?.state.activePanelId ?? null, r);
1358
1346
  if (s == null || n.panelId == null) return null;
1359
- const c = n.panelId, p = n.isOpen, o = e?.[c];
1347
+ const c = n.panelId, u = n.isOpen, o = e?.[c];
1360
1348
  return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1361
1349
  "[panels] No panel component registered for activePanelId:",
1362
1350
  c
1363
- ), null) : /* @__PURE__ */ a(Le, { isOpen: p, children: o != null ? /* @__PURE__ */ a(o, { isOpen: p }) : t });
1351
+ ), null) : /* @__PURE__ */ a(Oe, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
1364
1352
  }
1365
- function he(e) {
1353
+ function fe(e) {
1366
1354
  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
1355
  }
1368
- const ht = 685, fe = 627, ft = "cubic-bezier(0.22, 1, 0.36, 1)", gt = 200;
1369
- function Ee(e, t) {
1356
+ const gt = 685, ge = 627, yt = "cubic-bezier(0.22, 1, 0.36, 1)", bt = 200;
1357
+ function xe(e, t) {
1370
1358
  if (typeof window > "u") return t;
1371
1359
  const s = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1372
1360
  if (!s) return t;
1373
1361
  const r = parseFloat(s);
1374
1362
  return Number.isNaN(r) ? t : s.endsWith("s") && !s.endsWith("ms") ? r * 1e3 : r;
1375
1363
  }
1376
- function yt(e, t) {
1364
+ function vt(e, t) {
1377
1365
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1378
1366
  }
1379
- function Y(e) {
1367
+ function q(e) {
1380
1368
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1381
1369
  }
1382
- function bt(e) {
1370
+ function Ct(e) {
1383
1371
  const { mountEl: t, chromeEl: s, reducedMotion: r, onAssert: n } = e;
1384
1372
  if (t == null || s == null) {
1385
- Y(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1373
+ q(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1386
1374
  return;
1387
1375
  }
1388
1376
  if (r) {
@@ -1390,66 +1378,66 @@ function bt(e) {
1390
1378
  return;
1391
1379
  }
1392
1380
  if (typeof s.animate != "function") {
1393
- Y(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1381
+ q(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1394
1382
  return;
1395
1383
  }
1396
1384
  const c = s.cloneNode(!0);
1397
1385
  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(
1386
+ const u = xe("--panel-open-dur", gt), o = vt("--panel-easing", yt), l = s.animate(
1399
1387
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1400
- { duration: p, easing: o, fill: "forwards" }
1388
+ { duration: u, easing: o, fill: "forwards" }
1401
1389
  );
1402
- i.addEventListener(
1390
+ l.addEventListener(
1403
1391
  "finish",
1404
1392
  () => {
1405
- c.remove(), s.style.zIndex = "", i.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1393
+ c.remove(), s.style.zIndex = "", l.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1406
1394
  },
1407
1395
  { once: !0 }
1408
1396
  );
1409
1397
  }
1410
- function vt(e) {
1398
+ function _t(e) {
1411
1399
  const { mountEl: t, onAssert: s } = e;
1412
1400
  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() });
1401
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => q(e), ge), s?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1414
1402
  return;
1415
1403
  }
1416
- const r = Ee("--panel-close-dur", fe);
1404
+ const r = xe("--panel-close-dur", ge);
1417
1405
  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() }));
1406
+ const u = (l) => {
1407
+ 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
1408
  }, 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() }));
1409
+ 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
1410
  };
1423
- t.addEventListener("transitionend", p), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(o, r + gt);
1411
+ t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(o, r + bt);
1424
1412
  }
1425
- function _t(e) {
1413
+ function St(e) {
1426
1414
  const { state: t, onAssert: s } = e;
1427
1415
  if (t.activePanelId && t.isDirty) {
1428
1416
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "blocked-dirty", timestamp: Date.now() });
1429
1417
  return;
1430
1418
  }
1431
- const r = he(t.activeTrigger), n = he(e.trigger);
1419
+ const r = fe(t.activeTrigger), n = fe(e.trigger);
1432
1420
  if (!!t.activePanelId && r != null && r === n) {
1433
- bt(e);
1421
+ Ct(e);
1434
1422
  return;
1435
1423
  }
1436
1424
  if (t.activePanelId) {
1437
- vt(e);
1425
+ _t(e);
1438
1426
  return;
1439
1427
  }
1440
- Y(e), s?.({ branch: "fresh-open", timestamp: Date.now() });
1428
+ q(e), s?.({ branch: "fresh-open", timestamp: Date.now() });
1441
1429
  }
1442
- function Ct() {
1430
+ function Nt() {
1443
1431
  if (!(typeof window > "u"))
1444
1432
  return window.__panelsAsserter;
1445
1433
  }
1446
- function qt() {
1447
- const e = M(), t = ae();
1448
- return k(
1434
+ function Qt() {
1435
+ const e = L(), t = se();
1436
+ return O(
1449
1437
  (s, r) => {
1450
1438
  if (!e)
1451
1439
  return;
1452
- const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, p = {
1440
+ const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1453
1441
  panelId: s,
1454
1442
  trigger: r,
1455
1443
  state: e.state,
@@ -1458,16 +1446,16 @@ function qt() {
1458
1446
  chromeEl: c,
1459
1447
  reducedMotion: t,
1460
1448
  onAssert: (o) => {
1461
- Ct()?.recordTransition?.(o);
1449
+ Nt()?.recordTransition?.(o);
1462
1450
  }
1463
1451
  };
1464
- _t(p);
1452
+ St(u);
1465
1453
  },
1466
1454
  [e, t]
1467
1455
  );
1468
1456
  }
1469
- let V = !1, j = null;
1470
- function ne() {
1457
+ let G = !1, Z = null;
1458
+ function ae() {
1471
1459
  const e = [];
1472
1460
  let t = "cleaned";
1473
1461
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
@@ -1475,78 +1463,78 @@ function ne() {
1475
1463
  r.length > 1 && e.push(`mount-count=${r.length}`);
1476
1464
  const n = r[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1477
1465
  c.length > 1 && e.push(`chrome-count=${c.length}`);
1478
- const p = c[0] ?? null;
1479
- if (p) {
1480
- const d = p.style.zIndex;
1466
+ const u = c[0] ?? null;
1467
+ if (u) {
1468
+ const d = u.style.zIndex;
1481
1469
  d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1482
1470
  }
1483
- const o = n ? "present" : "absent", i = p ? "present" : "absent";
1471
+ const o = n ? "present" : "absent", l = u ? "present" : "absent";
1484
1472
  return {
1485
1473
  valid: e.length === 0,
1486
1474
  mount: o,
1487
- chrome: i,
1475
+ chrome: l,
1488
1476
  frozen: t,
1489
1477
  orphans: e,
1490
1478
  timestamp: Date.now()
1491
1479
  };
1492
1480
  }
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) {
1481
+ const X = "8px 8px 0px", J = "64px", ee = "inset(0px 0px 60px 0px)", te = "inset(0px -40px -40px -40px)";
1482
+ function v(e, t, s, r, n) {
1495
1483
  return { id: e, constraint: t, expected: s, actual: r, pass: n };
1496
1484
  }
1497
- function O(e) {
1485
+ function R(e) {
1498
1486
  const t = parseInt(e, 10);
1499
1487
  return Number.isFinite(t) ? t : NaN;
1500
1488
  }
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");
1489
+ function le() {
1490
+ 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
1491
  if (!t)
1504
- e.push(C("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1492
+ e.push(v("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1505
1493
  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;
1494
+ 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
1495
  e.push(
1508
- C(
1496
+ v(
1509
1497
  "C1",
1510
1498
  "mount --reveal-y matches clip-path inset-bottom Npx",
1511
1499
  `inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
1512
- `--reveal-y=${i || "n/a"} clip-path=${l || "n/a"}`,
1513
- y
1500
+ `--reveal-y=${l || "n/a"} clip-path=${i || "n/a"}`,
1501
+ g
1514
1502
  )
1515
1503
  );
1516
1504
  }
1517
1505
  if (!t)
1518
- e.push(C("C2", "mount padding constant", Z, "absent", !1));
1506
+ e.push(v("C2", "mount padding constant", X, "absent", !1));
1519
1507
  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));
1508
+ const o = t.style.padding, l = getComputedStyle(t), i = o || l.padding || "", d = i === X || i === "8px 8px 0px 8px";
1509
+ e.push(v("C2", "mount padding constant", X, i || "n/a", d));
1522
1510
  }
1523
1511
  if (!t)
1524
- e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", X, "absent", !1));
1512
+ e.push(v("C3", "mount.bottom resolves to var(--tb-h)=64px", J, "absent", !1));
1525
1513
  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));
1514
+ const l = getComputedStyle(t).bottom || t.style.bottom || "", i = l === J;
1515
+ e.push(v("C3", "mount.bottom resolves to var(--tb-h)=64px", J, l || "n/a", i));
1528
1516
  }
1529
1517
  if (!s)
1530
- e.push(C("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1518
+ e.push(v("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1531
1519
  else {
1532
- const o = getComputedStyle(s), i = O(
1520
+ const o = getComputedStyle(s), l = R(
1533
1521
  o.getPropertyValue("--row-h").trim() || s.style.getPropertyValue("--row-h").trim() || "0"
1534
- ), l = O(
1522
+ ), i = R(
1535
1523
  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;
1524
+ ), 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
1525
  e.push(
1538
- C(
1526
+ v(
1539
1527
  "C4",
1540
1528
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1541
- `${d}px (rh=${i} rg=${l})`,
1542
- `${u}px`,
1529
+ `${d}px (rh=${l} rg=${i})`,
1530
+ `${p}px`,
1543
1531
  h
1544
1532
  )
1545
1533
  );
1546
1534
  }
1547
1535
  if (!r || !s)
1548
1536
  e.push(
1549
- C(
1537
+ v(
1550
1538
  "C5",
1551
1539
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1552
1540
  "present",
@@ -1555,102 +1543,102 @@ function re() {
1555
1543
  )
1556
1544
  );
1557
1545
  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";
1546
+ 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
1547
  e.push(
1560
- C(
1548
+ v(
1561
1549
  "C5",
1562
1550
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1563
1551
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1564
- `perspective=${l} origin=${d} chrome-style=${u}`,
1565
- v
1552
+ `perspective=${i} origin=${d} chrome-style=${p}`,
1553
+ C
1566
1554
  )
1567
1555
  );
1568
1556
  }
1569
1557
  {
1570
- let o = !1, i = "absent";
1558
+ let o = !1, l = "absent";
1571
1559
  try {
1572
- for (const l of Array.from(document.styleSheets)) {
1560
+ for (const i of Array.from(document.styleSheets)) {
1573
1561
  let d = [];
1574
1562
  try {
1575
- d = Array.from(l.cssRules ?? []);
1563
+ d = Array.from(i.cssRules ?? []);
1576
1564
  } catch {
1577
1565
  continue;
1578
1566
  }
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"}`;
1567
+ for (const p of d)
1568
+ if (p.name === "stage-spin") {
1569
+ 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"), S = m?.style.transform ?? "", y = C?.style.transform ?? "", P = /rotateY\(\s*0(?:deg)?\s*\)/;
1570
+ o = P.test(S) && P.test(y), l = `0%=${S || "n/a"} 100%=${y || "n/a"}`;
1583
1571
  break;
1584
1572
  }
1585
- if (i !== "absent") break;
1573
+ if (l !== "absent") break;
1586
1574
  }
1587
1575
  } catch {
1588
- i = "inspection-error";
1576
+ l = "inspection-error";
1589
1577
  }
1590
1578
  e.push(
1591
- C(
1579
+ v(
1592
1580
  "C6",
1593
1581
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1594
1582
  "both frames rotateY(0)",
1595
- i,
1583
+ l,
1596
1584
  o
1597
1585
  )
1598
1586
  );
1599
1587
  }
1600
1588
  {
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;
1589
+ 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
1590
  e.push(
1603
- C("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${l || "n/a"} close=${d || "n/a"}`, y)
1591
+ v("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${i || "n/a"} close=${d || "n/a"}`, g)
1604
1592
  );
1605
1593
  }
1606
1594
  if (!n)
1607
- e.push(C("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1595
+ e.push(v("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1608
1596
  else {
1609
- const o = getComputedStyle(n), i = o.animationName || "", l = o.transitionProperty || "", d = (i === "" || i === "none") && (l === "" || l === "none" || l === "all");
1597
+ const o = getComputedStyle(n), l = o.animationName || "", i = o.transitionProperty || "", d = (l === "" || l === "none") && (i === "" || i === "none" || i === "all");
1610
1598
  e.push(
1611
- C(
1599
+ v(
1612
1600
  "C8",
1613
1601
  "BellCutout zero computed animation/transition",
1614
1602
  "animation:none AND transition:none",
1615
- `animation=${i || "n/a"} transition=${l || "n/a"}`,
1603
+ `animation=${l || "n/a"} transition=${i || "n/a"}`,
1616
1604
  d
1617
1605
  )
1618
1606
  );
1619
1607
  }
1620
1608
  if (!t)
1621
- e.push(C("C9", "mount closed-state clipPath", J, "absent", !1));
1609
+ e.push(v("C9", "mount closed-state clipPath", ee, "absent", !1));
1622
1610
  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));
1611
+ const o = t.style.clipPath, l = getComputedStyle(t), i = o || l.clipPath || "", d = i === ee;
1612
+ e.push(v("C9", "mount closed-state clipPath", ee, i || "n/a", d));
1625
1613
  }
1626
1614
  if (!c)
1627
- e.push(C("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1615
+ e.push(v("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1628
1616
  else {
1629
- const o = c.parentElement, i = o === document.body;
1617
+ const o = c.parentElement, l = o === document.body;
1630
1618
  e.push(
1631
- C(
1619
+ v(
1632
1620
  "C10",
1633
1621
  "bell-popover parentElement === document.body (open)",
1634
1622
  "body",
1635
1623
  o === document.body ? "body" : o?.tagName ?? "n/a",
1636
- i
1624
+ l
1637
1625
  )
1638
1626
  );
1639
1627
  }
1640
1628
  if (!r)
1641
- e.push(C("C11", "coordinator overflow === visible", "visible", "absent", !1));
1629
+ e.push(v("C11", "coordinator overflow === visible", "visible", "absent", !1));
1642
1630
  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));
1631
+ const l = getComputedStyle(r).overflow || r.style.overflow || "", i = l === "visible";
1632
+ e.push(v("C11", "coordinator overflow === visible", "visible", l || "n/a", i));
1645
1633
  }
1646
- if (!p)
1647
- e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, "absent", !1));
1634
+ if (!u)
1635
+ e.push(v("C12", "toolbar clipPath = inset(0 -40 -40 -40)", te, "absent", !1));
1648
1636
  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));
1637
+ const o = u.style.clipPath, l = getComputedStyle(u), i = o || l.clipPath || "", d = i === te;
1638
+ e.push(v("C12", "toolbar clipPath = inset(0 -40 -40 -40)", te, i || "n/a", d));
1651
1639
  }
1652
1640
  return e.push(
1653
- C(
1641
+ v(
1654
1642
  "C13",
1655
1643
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
1656
1644
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -1658,7 +1646,7 @@ function re() {
1658
1646
  "wiring_only"
1659
1647
  )
1660
1648
  ), e.push(
1661
- C(
1649
+ v(
1662
1650
  "C14",
1663
1651
  'cross-position handoff transitionend filtered by propertyName="max-height"',
1664
1652
  "transitionend filter wired in orchestrator (source-proof)",
@@ -1667,11 +1655,11 @@ function re() {
1667
1655
  )
1668
1656
  ), e;
1669
1657
  }
1670
- function Nt(e) {
1671
- return re().find((t) => t.id === e);
1658
+ function Pt(e) {
1659
+ return le().find((t) => t.id === e);
1672
1660
  }
1673
- function St() {
1674
- const e = ne();
1661
+ function Tt() {
1662
+ const e = ae();
1675
1663
  return { q12: [
1676
1664
  {
1677
1665
  id: "Q12-12",
@@ -1680,84 +1668,84 @@ function St() {
1680
1668
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${(e.orphans ?? []).join(",")}]`,
1681
1669
  pass: e.valid ?? !1
1682
1670
  }
1683
- ], cc: re() };
1671
+ ], cc: le() };
1684
1672
  }
1685
- function Pt() {
1673
+ function Et() {
1686
1674
  return {
1687
- enable: Tt,
1688
- disable: wt,
1689
- isEnabled: () => V,
1690
- getLastReport: () => j,
1675
+ enable: wt,
1676
+ disable: xt,
1677
+ isEnabled: () => G,
1678
+ getLastReport: () => Z,
1691
1679
  recordTransition: (e) => {
1692
- V && (j = { ...e, ...ne() });
1680
+ G && (Z = { ...e, ...ae() });
1693
1681
  },
1694
1682
  assertOnce: () => {
1695
- const e = ne();
1696
- return j = e, e;
1683
+ const e = ae();
1684
+ return Z = e, e;
1697
1685
  },
1698
- assertCcOnly: re,
1699
- getCcRowById: Nt,
1700
- assertPanelTruths: St
1686
+ assertCcOnly: le,
1687
+ getCcRowById: Pt,
1688
+ assertPanelTruths: Tt
1701
1689
  };
1702
1690
  }
1703
- function Tt() {
1704
- if (V = !0, typeof window > "u") return;
1705
- window.__panelsAsserter || (window.__panelsAsserter = Pt(), console.info(
1691
+ function wt() {
1692
+ if (G = !0, typeof window > "u") return;
1693
+ window.__panelsAsserter || (window.__panelsAsserter = Et(), console.info(
1706
1694
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1707
1695
  ));
1708
1696
  }
1709
- function wt() {
1710
- V = !1;
1697
+ function xt() {
1698
+ G = !1;
1711
1699
  }
1712
1700
  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,
1701
+ Zt as COMMITS,
1702
+ Bt as CatalogAddShell,
1703
+ Ut as CatalogFooter,
1704
+ Vt as CatalogReplaceShell,
1705
+ oe as CatalogStateContext,
1706
+ Ce as CloneCard,
1707
+ et as CloneStage,
1708
+ Se as MOCK_DEFAULT_LENS,
1721
1709
  _e as MOCK_LENSES,
1722
1710
  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,
1711
+ ut as MOCK_PAGES,
1712
+ Pe as MOCK_TILES_BY_LENS,
1713
+ rt as MetricInfoShell,
1714
+ Xt as NotificationCenterShell,
1715
+ Kt as PANEL_IDS,
1716
+ dt as PageMgmtFooter,
1717
+ Yt as PageMgmtShell,
1718
+ Ee as PageMgmtStateContext,
1719
+ Jt as PanelBody,
1720
+ H as PanelChromeV2,
1721
+ en as PanelFooter,
1722
+ zt as PanelFooterMessage,
1723
+ tn as PanelHeader,
1724
+ nn as PanelHost,
1725
+ qt as PanelHostShell,
1726
+ Oe as PanelMount,
1727
+ an as PanelNavigation,
1728
+ sn as PanelProvider,
1729
+ Gt as PanelSlot,
1730
+ on as PanelStage,
1731
+ Ht as SettingsShell,
1732
+ le as assertCcOnly,
1733
+ ae as assertPanelDomShape,
1734
+ Tt as assertPanelTruths,
1735
+ rn as deriveSurfaceState,
1736
+ xt as disablePanelAsserter,
1737
+ wt as enablePanelAsserter,
1738
+ Pt as getCcRowById,
1739
+ ln as initialState,
1740
+ fe as positionKey,
1741
+ cn as reducer,
1742
+ St as transitionToPanel,
1743
+ re as useCatalogState,
1744
+ Ft as useEditingCardId,
1757
1745
  we as usePageMgmtState,
1758
- Me as usePanelContext,
1759
- M as usePanelContextOptional,
1760
- ln as usePanelCoordinator,
1761
- ae as useReducedMotionPanel,
1762
- qt as useTransitionToPanel
1746
+ ke as usePanelContext,
1747
+ L as usePanelContextOptional,
1748
+ dn as usePanelCoordinator,
1749
+ se as useReducedMotionPanel,
1750
+ Qt as useTransitionToPanel
1763
1751
  };