@stackable-labs/embeddables 1.57.0 → 1.57.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.js CHANGED
@@ -5,7 +5,7 @@ import * as Sn from "react-dom";
5
5
  import ds from "react-dom";
6
6
  const Yl = () => {
7
7
  try {
8
- return "56bdfaeb-11c6-46ad-aa01-a99fedca2493";
8
+ return "4020d256-debd-4031-aba6-c9ccf4834c3c";
9
9
  } catch {
10
10
  return "dev";
11
11
  }
@@ -526,17 +526,11 @@ const ec = (e) => {
526
526
  fallback: r = null,
527
527
  render: s
528
528
  }) => {
529
- const { extensions: a, components: i, ready: l } = nc(), [d, u] = le({}), c = We(""), m = fn(
530
- () => a.filter((v) => v.enabled && v.manifest.targets.includes(e)),
531
- // eslint-disable-next-line react-hooks/exhaustive-deps
532
- [a.map((v) => v.id).join(","), e]
533
- ), g = fn(
534
- () => rc(i, { surfaceId: e, logPrefix: "[ExtensionSlot]" }),
535
- [e, i]
536
- );
529
+ const { extensions: a, components: i, ready: l } = nc(), [d, u] = le({}), c = We(""), m = fn(() => a.filter((v) => v.enabled && v.manifest.targets.includes(e)), [a.map((v) => v.id).join(","), e]), g = fn(() => rc(i, { surfaceId: e, logPrefix: "[ExtensionSlot]" }), [e, i]);
537
530
  if (ce(() => {
538
531
  const v = m.map((w) => w.id).join(",");
539
- if (c.current !== v && (c.current = v, u({})), !l || m.length === 0) return;
532
+ if (c.current !== v && (c.current = v, u({})), !l || m.length === 0)
533
+ return;
540
534
  const y = (w) => {
541
535
  const x = w.data;
542
536
  if (!(!x || typeof x != "object" || !m.some((N) => {
@@ -544,21 +538,22 @@ const ec = (e) => {
544
538
  return k && w.source === k.iframe.contentWindow;
545
539
  }))) {
546
540
  if (x.type === "surface-update" && x.surfaceId === e) {
547
- const N = m.find((E) => {
548
- const R = Ct(E.id);
549
- return R && w.source === R.iframe.contentWindow;
541
+ const N = m.find((R) => {
542
+ const E = Ct(R.id);
543
+ return E && w.source === E.iframe.contentWindow;
550
544
  });
551
- if (!N) return;
545
+ if (!N)
546
+ return;
552
547
  const k = g(x.tree, w.source ?? null);
553
- u((E) => ({
554
- ...E,
548
+ u((R) => ({
549
+ ...R,
555
550
  [N.id]: k
556
551
  }));
557
552
  }
558
553
  x.type === "surface-ready" && x.surfaceId === e && t && m.forEach((N) => {
559
- var E;
554
+ var R;
560
555
  const k = Ct(N.id);
561
- (E = k == null ? void 0 : k.iframe.contentWindow) == null || E.postMessage(
556
+ (R = k == null ? void 0 : k.iframe.contentWindow) == null || R.postMessage(
562
557
  { type: "context-update", surfaceId: e, context: t },
563
558
  "*"
564
559
  );
@@ -889,7 +884,7 @@ function Ac(e) {
889
884
  }
890
885
  const _c = (e) => {
891
886
  var t, n, o, r, s, a, i, l, d;
892
- const { invert: u, toast: c, unstyled: m, interacting: g, setHeights: b, visibleToasts: h, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: N, closeButton: k, style: E, cancelButtonStyle: R, actionButtonStyle: M, className: z = "", descriptionClassName: B = "", duration: U, position: j, gap: K, expandByDefault: I, classNames: S, icons: T, closeButtonAriaLabel: A = "Close toast" } = e, [O, P] = _.useState(null), [Q, ie] = _.useState(null), [G, Z] = _.useState(!1), [Y, X] = _.useState(!1), [F, H] = _.useState(!1), [J, se] = _.useState(!1), [oe, te] = _.useState(!1), [ue, fe] = _.useState(0), [st, qe] = _.useState(0), Ne = _.useRef(c.duration || U || hr), Yt = _.useRef(null), be = _.useRef(null), Ol = y === 0, Ll = y + 1 <= h, xe = c.type, gt = c.dismissible !== !1, Dl = c.className || "", zl = c.descriptionClassName || "", qt = _.useMemo(() => v.findIndex((ee) => ee.toastId === c.id) || 0, [
887
+ const { invert: u, toast: c, unstyled: m, interacting: g, setHeights: b, visibleToasts: h, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: N, closeButton: k, style: R, cancelButtonStyle: E, actionButtonStyle: M, className: z = "", descriptionClassName: B = "", duration: U, position: j, gap: K, expandByDefault: I, classNames: S, icons: T, closeButtonAriaLabel: A = "Close toast" } = e, [O, P] = _.useState(null), [Q, ie] = _.useState(null), [G, Z] = _.useState(!1), [Y, X] = _.useState(!1), [F, H] = _.useState(!1), [J, se] = _.useState(!1), [oe, te] = _.useState(!1), [ue, fe] = _.useState(0), [st, qe] = _.useState(0), Ne = _.useRef(c.duration || U || hr), Yt = _.useRef(null), be = _.useRef(null), Ol = y === 0, Ll = y + 1 <= h, xe = c.type, gt = c.dismissible !== !1, Dl = c.className || "", zl = c.descriptionClassName || "", qt = _.useMemo(() => v.findIndex((ee) => ee.toastId === c.id) || 0, [
893
888
  v,
894
889
  c.id
895
890
  ]), $l = _.useMemo(() => {
@@ -1039,7 +1034,7 @@ const _c = (e) => {
1039
1034
  "--z-index": w.length - y,
1040
1035
  "--offset": `${Y ? ue : vt.current}px`,
1041
1036
  "--initial-height": I ? "auto" : `${st}px`,
1042
- ...E,
1037
+ ...R,
1043
1038
  ...c.style
1044
1039
  },
1045
1040
  onDragEnd: () => {
@@ -1118,7 +1113,7 @@ const _c = (e) => {
1118
1113
  }, typeof c.description == "function" ? c.description() : c.description) : null), /* @__PURE__ */ _.isValidElement(c.cancel) ? c.cancel : c.cancel && Jt(c.cancel) ? /* @__PURE__ */ _.createElement("button", {
1119
1114
  "data-button": !0,
1120
1115
  "data-cancel": !0,
1121
- style: c.cancelButtonStyle || R,
1116
+ style: c.cancelButtonStyle || E,
1122
1117
  onClick: (ee) => {
1123
1118
  Jt(c.cancel) && gt && (c.cancel.onClick == null || c.cancel.onClick.call(c.cancel, ee), Ke());
1124
1119
  },
@@ -1169,16 +1164,16 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1169
1164
  const { id: o, invert: r, position: s = "bottom-right", hotkey: a = [
1170
1165
  "altKey",
1171
1166
  "KeyT"
1172
- ], expand: i, closeButton: l, className: d, offset: u, mobileOffset: c, theme: m = "light", richColors: g, duration: b, style: h, visibleToasts: v = Cc, toastOptions: y, dir: w = gr(), gap: x = Nc, icons: C, containerAriaLabel: N = "Notifications" } = t, [k, E] = _.useState([]), R = _.useMemo(() => o ? k.filter((G) => G.toasterId === o) : k.filter((G) => !G.toasterId), [
1167
+ ], expand: i, closeButton: l, className: d, offset: u, mobileOffset: c, theme: m = "light", richColors: g, duration: b, style: h, visibleToasts: v = Cc, toastOptions: y, dir: w = gr(), gap: x = Nc, icons: C, containerAriaLabel: N = "Notifications" } = t, [k, R] = _.useState([]), E = _.useMemo(() => o ? k.filter((G) => G.toasterId === o) : k.filter((G) => !G.toasterId), [
1173
1168
  k,
1174
1169
  o
1175
1170
  ]), M = _.useMemo(() => Array.from(new Set([
1176
1171
  s
1177
- ].concat(R.filter((G) => G.position).map((G) => G.position)))), [
1178
- R,
1172
+ ].concat(E.filter((G) => G.position).map((G) => G.position)))), [
1173
+ E,
1179
1174
  s
1180
1175
  ]), [z, B] = _.useState([]), [U, j] = _.useState(!1), [K, I] = _.useState(!1), [S, T] = _.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), A = _.useRef(null), O = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = _.useRef(null), Q = _.useRef(!1), ie = _.useCallback((G) => {
1181
- E((Z) => {
1176
+ R((Z) => {
1182
1177
  var Y;
1183
1178
  return (Y = Z.find((X) => X.id === G.id)) != null && Y.delete || ye.dismiss(G.id), Z.filter(({ id: X }) => X !== G.id);
1184
1179
  });
@@ -1186,7 +1181,7 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1186
1181
  return _.useEffect(() => ye.subscribe((G) => {
1187
1182
  if (G.dismiss) {
1188
1183
  requestAnimationFrame(() => {
1189
- E((Z) => Z.map((Y) => Y.id === G.id ? {
1184
+ R((Z) => Z.map((Y) => Y.id === G.id ? {
1190
1185
  ...Y,
1191
1186
  delete: !0
1192
1187
  } : Y));
@@ -1195,7 +1190,7 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1195
1190
  }
1196
1191
  setTimeout(() => {
1197
1192
  ds.flushSync(() => {
1198
- E((Z) => {
1193
+ R((Z) => {
1199
1194
  const Y = Z.findIndex((X) => X.id === G.id);
1200
1195
  return Y !== -1 ? [
1201
1196
  ...Z.slice(0, Y),
@@ -1272,7 +1267,7 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1272
1267
  }, M.map((G, Z) => {
1273
1268
  var Y;
1274
1269
  const [X, F] = G.split("-");
1275
- return R.length ? /* @__PURE__ */ _.createElement("ol", {
1270
+ return E.length ? /* @__PURE__ */ _.createElement("ol", {
1276
1271
  key: G,
1277
1272
  dir: w === "auto" ? gr() : w,
1278
1273
  tabIndex: -1,
@@ -1307,7 +1302,7 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1307
1302
  H.target instanceof HTMLElement && H.target.dataset.dismissible === "false" || I(!0);
1308
1303
  },
1309
1304
  onPointerUp: () => I(!1)
1310
- }, R.filter((H) => !H.position && Z === 0 || H.position === G).map((H, J) => {
1305
+ }, E.filter((H) => !H.position && Z === 0 || H.position === G).map((H, J) => {
1311
1306
  var se, oe;
1312
1307
  return /* @__PURE__ */ _.createElement(_c, {
1313
1308
  key: H.id,
@@ -1330,7 +1325,7 @@ const Mc = /* @__PURE__ */ _.forwardRef(function(t, n) {
1330
1325
  actionButtonStyle: y == null ? void 0 : y.actionButtonStyle,
1331
1326
  closeButtonAriaLabel: y == null ? void 0 : y.closeButtonAriaLabel,
1332
1327
  removeToast: ie,
1333
- toasts: R.filter((te) => te.position == H.position),
1328
+ toasts: E.filter((te) => te.position == H.position),
1334
1329
  heights: z.filter((te) => te.position == H.position),
1335
1330
  setHeights: B,
1336
1331
  expandByDefault: i,
@@ -2166,8 +2161,8 @@ const Wd = (e, t) => {
2166
2161
  a.push(C);
2167
2162
  const N = r(y, v);
2168
2163
  for (let k = 0; k < N.length; ++k) {
2169
- const E = N[k];
2170
- a.push(x + E);
2164
+ const R = N[k];
2165
+ a.push(x + R);
2171
2166
  }
2172
2167
  l = u + (l.length > 0 ? " " + l : l);
2173
2168
  }
@@ -2230,9 +2225,9 @@ const Wd = (e, t) => {
2230
2225
  "bottom-left",
2231
2226
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2232
2227
  "left-bottom"
2233
- ], N = () => [...C(), D, L], k = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], R = () => [D, L, l], M = () => [Xe, "full", "auto", ...R()], z = () => [Ze, "none", "subgrid", D, L], B = () => ["auto", {
2228
+ ], N = () => [...C(), D, L], k = () => ["auto", "hidden", "clip", "visible", "scroll"], R = () => ["auto", "contain", "none"], E = () => [D, L, l], M = () => [Xe, "full", "auto", ...E()], z = () => [Ze, "none", "subgrid", D, L], B = () => ["auto", {
2234
2229
  span: ["full", Ze, D, L]
2235
- }, Ze, D, L], U = () => [Ze, "auto", D, L], j = () => ["auto", "min", "max", "fr", D, L], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], I = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], S = () => ["auto", ...R()], T = () => [Xe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...R()], A = () => [Xe, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...R()], O = () => [Xe, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...R()], P = () => [e, D, L], Q = () => [...C(), Er, kr, {
2230
+ }, Ze, D, L], U = () => [Ze, "auto", D, L], j = () => ["auto", "min", "max", "fr", D, L], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], I = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], S = () => ["auto", ...E()], T = () => [Xe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], A = () => [Xe, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...E()], O = () => [Xe, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...E()], P = () => [e, D, L], Q = () => [...C(), Er, kr, {
2236
2231
  position: [D, L]
2237
2232
  }], ie = () => ["no-repeat", {
2238
2233
  repeat: ["", "x", "y", "space", "round"]
@@ -2253,7 +2248,7 @@ const Wd = (e, t) => {
2253
2248
  b,
2254
2249
  D,
2255
2250
  L
2256
- ], oe = () => ["none", ne, D, L], te = () => ["none", ne, D, L], ue = () => [ne, D, L], fe = () => [Xe, "full", ...R()];
2251
+ ], oe = () => ["none", ne, D, L], te = () => ["none", ne, D, L], ue = () => [ne, D, L], fe = () => [Xe, "full", ...E()];
2257
2252
  return {
2258
2253
  cacheSize: 500,
2259
2254
  theme: {
@@ -2405,21 +2400,21 @@ const Wd = (e, t) => {
2405
2400
  * @see https://tailwindcss.com/docs/overscroll-behavior
2406
2401
  */
2407
2402
  overscroll: [{
2408
- overscroll: E()
2403
+ overscroll: R()
2409
2404
  }],
2410
2405
  /**
2411
2406
  * Overscroll Behavior X
2412
2407
  * @see https://tailwindcss.com/docs/overscroll-behavior
2413
2408
  */
2414
2409
  "overscroll-x": [{
2415
- "overscroll-x": E()
2410
+ "overscroll-x": R()
2416
2411
  }],
2417
2412
  /**
2418
2413
  * Overscroll Behavior Y
2419
2414
  * @see https://tailwindcss.com/docs/overscroll-behavior
2420
2415
  */
2421
2416
  "overscroll-y": [{
2422
- "overscroll-y": E()
2417
+ "overscroll-y": R()
2423
2418
  }],
2424
2419
  /**
2425
2420
  * Position
@@ -2535,7 +2530,7 @@ const Wd = (e, t) => {
2535
2530
  * @see https://tailwindcss.com/docs/flex-basis
2536
2531
  */
2537
2532
  basis: [{
2538
- basis: [Xe, "full", "auto", i, ...R()]
2533
+ basis: [Xe, "full", "auto", i, ...E()]
2539
2534
  }],
2540
2535
  /**
2541
2536
  * Flex Direction
@@ -2661,21 +2656,21 @@ const Wd = (e, t) => {
2661
2656
  * @see https://tailwindcss.com/docs/gap
2662
2657
  */
2663
2658
  gap: [{
2664
- gap: R()
2659
+ gap: E()
2665
2660
  }],
2666
2661
  /**
2667
2662
  * Gap X
2668
2663
  * @see https://tailwindcss.com/docs/gap
2669
2664
  */
2670
2665
  "gap-x": [{
2671
- "gap-x": R()
2666
+ "gap-x": E()
2672
2667
  }],
2673
2668
  /**
2674
2669
  * Gap Y
2675
2670
  * @see https://tailwindcss.com/docs/gap
2676
2671
  */
2677
2672
  "gap-y": [{
2678
- "gap-y": R()
2673
+ "gap-y": E()
2679
2674
  }],
2680
2675
  /**
2681
2676
  * Justify Content
@@ -2750,77 +2745,77 @@ const Wd = (e, t) => {
2750
2745
  * @see https://tailwindcss.com/docs/padding
2751
2746
  */
2752
2747
  p: [{
2753
- p: R()
2748
+ p: E()
2754
2749
  }],
2755
2750
  /**
2756
2751
  * Padding Inline
2757
2752
  * @see https://tailwindcss.com/docs/padding
2758
2753
  */
2759
2754
  px: [{
2760
- px: R()
2755
+ px: E()
2761
2756
  }],
2762
2757
  /**
2763
2758
  * Padding Block
2764
2759
  * @see https://tailwindcss.com/docs/padding
2765
2760
  */
2766
2761
  py: [{
2767
- py: R()
2762
+ py: E()
2768
2763
  }],
2769
2764
  /**
2770
2765
  * Padding Inline Start
2771
2766
  * @see https://tailwindcss.com/docs/padding
2772
2767
  */
2773
2768
  ps: [{
2774
- ps: R()
2769
+ ps: E()
2775
2770
  }],
2776
2771
  /**
2777
2772
  * Padding Inline End
2778
2773
  * @see https://tailwindcss.com/docs/padding
2779
2774
  */
2780
2775
  pe: [{
2781
- pe: R()
2776
+ pe: E()
2782
2777
  }],
2783
2778
  /**
2784
2779
  * Padding Block Start
2785
2780
  * @see https://tailwindcss.com/docs/padding
2786
2781
  */
2787
2782
  pbs: [{
2788
- pbs: R()
2783
+ pbs: E()
2789
2784
  }],
2790
2785
  /**
2791
2786
  * Padding Block End
2792
2787
  * @see https://tailwindcss.com/docs/padding
2793
2788
  */
2794
2789
  pbe: [{
2795
- pbe: R()
2790
+ pbe: E()
2796
2791
  }],
2797
2792
  /**
2798
2793
  * Padding Top
2799
2794
  * @see https://tailwindcss.com/docs/padding
2800
2795
  */
2801
2796
  pt: [{
2802
- pt: R()
2797
+ pt: E()
2803
2798
  }],
2804
2799
  /**
2805
2800
  * Padding Right
2806
2801
  * @see https://tailwindcss.com/docs/padding
2807
2802
  */
2808
2803
  pr: [{
2809
- pr: R()
2804
+ pr: E()
2810
2805
  }],
2811
2806
  /**
2812
2807
  * Padding Bottom
2813
2808
  * @see https://tailwindcss.com/docs/padding
2814
2809
  */
2815
2810
  pb: [{
2816
- pb: R()
2811
+ pb: E()
2817
2812
  }],
2818
2813
  /**
2819
2814
  * Padding Left
2820
2815
  * @see https://tailwindcss.com/docs/padding
2821
2816
  */
2822
2817
  pl: [{
2823
- pl: R()
2818
+ pl: E()
2824
2819
  }],
2825
2820
  /**
2826
2821
  * Margin
@@ -2904,7 +2899,7 @@ const Wd = (e, t) => {
2904
2899
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
2905
2900
  */
2906
2901
  "space-x": [{
2907
- "space-x": R()
2902
+ "space-x": E()
2908
2903
  }],
2909
2904
  /**
2910
2905
  * Space Between X Reverse
@@ -2916,7 +2911,7 @@ const Wd = (e, t) => {
2916
2911
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
2917
2912
  */
2918
2913
  "space-y": [{
2919
- "space-y": R()
2914
+ "space-y": E()
2920
2915
  }],
2921
2916
  /**
2922
2917
  * Space Between Y Reverse
@@ -3134,7 +3129,7 @@ const Wd = (e, t) => {
3134
3129
  leading: [
3135
3130
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3136
3131
  s,
3137
- ...R()
3132
+ ...E()
3138
3133
  ]
3139
3134
  }],
3140
3135
  /**
@@ -3235,7 +3230,7 @@ const Wd = (e, t) => {
3235
3230
  * @see https://tailwindcss.com/docs/text-indent
3236
3231
  */
3237
3232
  indent: [{
3238
- indent: R()
3233
+ indent: E()
3239
3234
  }],
3240
3235
  /**
3241
3236
  * Vertical Alignment
@@ -4227,21 +4222,21 @@ const Wd = (e, t) => {
4227
4222
  * @see https://tailwindcss.com/docs/border-spacing
4228
4223
  */
4229
4224
  "border-spacing": [{
4230
- "border-spacing": R()
4225
+ "border-spacing": E()
4231
4226
  }],
4232
4227
  /**
4233
4228
  * Border Spacing X
4234
4229
  * @see https://tailwindcss.com/docs/border-spacing
4235
4230
  */
4236
4231
  "border-spacing-x": [{
4237
- "border-spacing-x": R()
4232
+ "border-spacing-x": E()
4238
4233
  }],
4239
4234
  /**
4240
4235
  * Border Spacing Y
4241
4236
  * @see https://tailwindcss.com/docs/border-spacing
4242
4237
  */
4243
4238
  "border-spacing-y": [{
4244
- "border-spacing-y": R()
4239
+ "border-spacing-y": E()
4245
4240
  }],
4246
4241
  /**
4247
4242
  * Table Layout
@@ -4533,154 +4528,154 @@ const Wd = (e, t) => {
4533
4528
  * @see https://tailwindcss.com/docs/scroll-margin
4534
4529
  */
4535
4530
  "scroll-m": [{
4536
- "scroll-m": R()
4531
+ "scroll-m": E()
4537
4532
  }],
4538
4533
  /**
4539
4534
  * Scroll Margin Inline
4540
4535
  * @see https://tailwindcss.com/docs/scroll-margin
4541
4536
  */
4542
4537
  "scroll-mx": [{
4543
- "scroll-mx": R()
4538
+ "scroll-mx": E()
4544
4539
  }],
4545
4540
  /**
4546
4541
  * Scroll Margin Block
4547
4542
  * @see https://tailwindcss.com/docs/scroll-margin
4548
4543
  */
4549
4544
  "scroll-my": [{
4550
- "scroll-my": R()
4545
+ "scroll-my": E()
4551
4546
  }],
4552
4547
  /**
4553
4548
  * Scroll Margin Inline Start
4554
4549
  * @see https://tailwindcss.com/docs/scroll-margin
4555
4550
  */
4556
4551
  "scroll-ms": [{
4557
- "scroll-ms": R()
4552
+ "scroll-ms": E()
4558
4553
  }],
4559
4554
  /**
4560
4555
  * Scroll Margin Inline End
4561
4556
  * @see https://tailwindcss.com/docs/scroll-margin
4562
4557
  */
4563
4558
  "scroll-me": [{
4564
- "scroll-me": R()
4559
+ "scroll-me": E()
4565
4560
  }],
4566
4561
  /**
4567
4562
  * Scroll Margin Block Start
4568
4563
  * @see https://tailwindcss.com/docs/scroll-margin
4569
4564
  */
4570
4565
  "scroll-mbs": [{
4571
- "scroll-mbs": R()
4566
+ "scroll-mbs": E()
4572
4567
  }],
4573
4568
  /**
4574
4569
  * Scroll Margin Block End
4575
4570
  * @see https://tailwindcss.com/docs/scroll-margin
4576
4571
  */
4577
4572
  "scroll-mbe": [{
4578
- "scroll-mbe": R()
4573
+ "scroll-mbe": E()
4579
4574
  }],
4580
4575
  /**
4581
4576
  * Scroll Margin Top
4582
4577
  * @see https://tailwindcss.com/docs/scroll-margin
4583
4578
  */
4584
4579
  "scroll-mt": [{
4585
- "scroll-mt": R()
4580
+ "scroll-mt": E()
4586
4581
  }],
4587
4582
  /**
4588
4583
  * Scroll Margin Right
4589
4584
  * @see https://tailwindcss.com/docs/scroll-margin
4590
4585
  */
4591
4586
  "scroll-mr": [{
4592
- "scroll-mr": R()
4587
+ "scroll-mr": E()
4593
4588
  }],
4594
4589
  /**
4595
4590
  * Scroll Margin Bottom
4596
4591
  * @see https://tailwindcss.com/docs/scroll-margin
4597
4592
  */
4598
4593
  "scroll-mb": [{
4599
- "scroll-mb": R()
4594
+ "scroll-mb": E()
4600
4595
  }],
4601
4596
  /**
4602
4597
  * Scroll Margin Left
4603
4598
  * @see https://tailwindcss.com/docs/scroll-margin
4604
4599
  */
4605
4600
  "scroll-ml": [{
4606
- "scroll-ml": R()
4601
+ "scroll-ml": E()
4607
4602
  }],
4608
4603
  /**
4609
4604
  * Scroll Padding
4610
4605
  * @see https://tailwindcss.com/docs/scroll-padding
4611
4606
  */
4612
4607
  "scroll-p": [{
4613
- "scroll-p": R()
4608
+ "scroll-p": E()
4614
4609
  }],
4615
4610
  /**
4616
4611
  * Scroll Padding Inline
4617
4612
  * @see https://tailwindcss.com/docs/scroll-padding
4618
4613
  */
4619
4614
  "scroll-px": [{
4620
- "scroll-px": R()
4615
+ "scroll-px": E()
4621
4616
  }],
4622
4617
  /**
4623
4618
  * Scroll Padding Block
4624
4619
  * @see https://tailwindcss.com/docs/scroll-padding
4625
4620
  */
4626
4621
  "scroll-py": [{
4627
- "scroll-py": R()
4622
+ "scroll-py": E()
4628
4623
  }],
4629
4624
  /**
4630
4625
  * Scroll Padding Inline Start
4631
4626
  * @see https://tailwindcss.com/docs/scroll-padding
4632
4627
  */
4633
4628
  "scroll-ps": [{
4634
- "scroll-ps": R()
4629
+ "scroll-ps": E()
4635
4630
  }],
4636
4631
  /**
4637
4632
  * Scroll Padding Inline End
4638
4633
  * @see https://tailwindcss.com/docs/scroll-padding
4639
4634
  */
4640
4635
  "scroll-pe": [{
4641
- "scroll-pe": R()
4636
+ "scroll-pe": E()
4642
4637
  }],
4643
4638
  /**
4644
4639
  * Scroll Padding Block Start
4645
4640
  * @see https://tailwindcss.com/docs/scroll-padding
4646
4641
  */
4647
4642
  "scroll-pbs": [{
4648
- "scroll-pbs": R()
4643
+ "scroll-pbs": E()
4649
4644
  }],
4650
4645
  /**
4651
4646
  * Scroll Padding Block End
4652
4647
  * @see https://tailwindcss.com/docs/scroll-padding
4653
4648
  */
4654
4649
  "scroll-pbe": [{
4655
- "scroll-pbe": R()
4650
+ "scroll-pbe": E()
4656
4651
  }],
4657
4652
  /**
4658
4653
  * Scroll Padding Top
4659
4654
  * @see https://tailwindcss.com/docs/scroll-padding
4660
4655
  */
4661
4656
  "scroll-pt": [{
4662
- "scroll-pt": R()
4657
+ "scroll-pt": E()
4663
4658
  }],
4664
4659
  /**
4665
4660
  * Scroll Padding Right
4666
4661
  * @see https://tailwindcss.com/docs/scroll-padding
4667
4662
  */
4668
4663
  "scroll-pr": [{
4669
- "scroll-pr": R()
4664
+ "scroll-pr": E()
4670
4665
  }],
4671
4666
  /**
4672
4667
  * Scroll Padding Bottom
4673
4668
  * @see https://tailwindcss.com/docs/scroll-padding
4674
4669
  */
4675
4670
  "scroll-pb": [{
4676
- "scroll-pb": R()
4671
+ "scroll-pb": E()
4677
4672
  }],
4678
4673
  /**
4679
4674
  * Scroll Padding Left
4680
4675
  * @see https://tailwindcss.com/docs/scroll-padding
4681
4676
  */
4682
4677
  "scroll-pl": [{
4683
- "scroll-pl": R()
4678
+ "scroll-pl": E()
4684
4679
  }],
4685
4680
  /**
4686
4681
  * Scroll Snap Align
@@ -5113,7 +5108,7 @@ function Ws(e) {
5113
5108
  if (!w) return [];
5114
5109
  const x = Array.from(w.querySelectorAll(`[${c}]`));
5115
5110
  return Array.from(v.itemMap.values()).sort(
5116
- (k, E) => x.indexOf(k.ref.current) - x.indexOf(E.ref.current)
5111
+ (k, R) => x.indexOf(k.ref.current) - x.indexOf(R.ref.current)
5117
5112
  );
5118
5113
  }, [v.collectionRef, v.itemMap]);
5119
5114
  }
@@ -5389,15 +5384,15 @@ var of = "DismissableLayer", ho = "dismissableLayer.update", rf = "dismissableLa
5389
5384
  onInteractOutside: a,
5390
5385
  onDismiss: i,
5391
5386
  ...l
5392
- } = e, d = f.useContext(qs), [u, c] = f.useState(null), m = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = f.useState({}), b = re(t, (E) => c(E)), h = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(v), w = u ? h.indexOf(u) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= y, N = cf((E) => {
5393
- const R = E.target, M = [...d.branches].some((z) => z.contains(R));
5394
- !C || M || (r == null || r(E), a == null || a(E), E.defaultPrevented || i == null || i());
5395
- }, m), k = df((E) => {
5396
- const R = E.target;
5397
- [...d.branches].some((z) => z.contains(R)) || (s == null || s(E), a == null || a(E), E.defaultPrevented || i == null || i());
5387
+ } = e, d = f.useContext(qs), [u, c] = f.useState(null), m = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = f.useState({}), b = re(t, (R) => c(R)), h = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(v), w = u ? h.indexOf(u) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= y, N = cf((R) => {
5388
+ const E = R.target, M = [...d.branches].some((z) => z.contains(E));
5389
+ !C || M || (r == null || r(R), a == null || a(R), R.defaultPrevented || i == null || i());
5390
+ }, m), k = df((R) => {
5391
+ const E = R.target;
5392
+ [...d.branches].some((z) => z.contains(E)) || (s == null || s(R), a == null || a(R), R.defaultPrevented || i == null || i());
5398
5393
  }, m);
5399
- return nf((E) => {
5400
- w === d.layers.size - 1 && (o == null || o(E), !E.defaultPrevented && i && (E.preventDefault(), i()));
5394
+ return nf((R) => {
5395
+ w === d.layers.size - 1 && (o == null || o(R), !R.defaultPrevented && i && (R.preventDefault(), i()));
5401
5396
  }, m), f.useEffect(() => {
5402
5397
  if (u)
5403
5398
  return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Pr = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(u)), d.layers.add(u), Ar(), () => {
@@ -5406,8 +5401,8 @@ var of = "DismissableLayer", ho = "dismissableLayer.update", rf = "dismissableLa
5406
5401
  }, [u, m, n, d]), f.useEffect(() => () => {
5407
5402
  u && (d.layers.delete(u), d.layersWithOutsidePointerEventsDisabled.delete(u), Ar());
5408
5403
  }, [u, d]), f.useEffect(() => {
5409
- const E = () => g({});
5410
- return document.addEventListener(ho, E), () => document.removeEventListener(ho, E);
5404
+ const R = () => g({});
5405
+ return document.addEventListener(ho, R), () => document.removeEventListener(ho, R);
5411
5406
  }, []), /* @__PURE__ */ p(
5412
5407
  W.div,
5413
5408
  {
@@ -5790,12 +5785,12 @@ var ea = Tf(), Qn = function() {
5790
5785
  onScrollCapture: Qn,
5791
5786
  onWheelCapture: Qn,
5792
5787
  onTouchMoveCapture: Qn
5793
- }), r = o[0], s = o[1], a = e.forwardProps, i = e.children, l = e.className, d = e.removeScrollBar, u = e.enabled, c = e.shards, m = e.sideCar, g = e.noRelative, b = e.noIsolation, h = e.inert, v = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, C = Js(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = m, k = Ef([n, t]), E = De(De({}, C), r);
5788
+ }), r = o[0], s = o[1], a = e.forwardProps, i = e.children, l = e.className, d = e.removeScrollBar, u = e.enabled, c = e.shards, m = e.sideCar, g = e.noRelative, b = e.noIsolation, h = e.inert, v = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, C = Js(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = m, k = Ef([n, t]), R = De(De({}, C), r);
5794
5789
  return f.createElement(
5795
5790
  f.Fragment,
5796
5791
  null,
5797
5792
  u && f.createElement(N, { sideCar: ea, removeScrollBar: d, shards: c, noRelative: g, noIsolation: b, inert: h, setCallbacks: s, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
5798
- a ? f.cloneElement(f.Children.only(i), De(De({}, E), { ref: k })) : f.createElement(w, De({}, E, { className: l, ref: k }), i)
5793
+ a ? f.cloneElement(f.Children.only(i), De(De({}, R), { ref: k })) : f.createElement(w, De({}, R, { className: l, ref: k }), i)
5799
5794
  );
5800
5795
  });
5801
5796
  Rn.defaultProps = {
@@ -6041,16 +6036,16 @@ function Qf(e) {
6041
6036
  var i = f.useCallback(function(h, v) {
6042
6037
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
6043
6038
  return !a.current.allowPinchZoom;
6044
- var y = on(h), w = n.current, x = "deltaX" in h ? h.deltaX : w[0] - y[0], C = "deltaY" in h ? h.deltaY : w[1] - y[1], N, k = h.target, E = Math.abs(x) > Math.abs(C) ? "h" : "v";
6045
- if ("touches" in h && E === "h" && k.type === "range")
6039
+ var y = on(h), w = n.current, x = "deltaX" in h ? h.deltaX : w[0] - y[0], C = "deltaY" in h ? h.deltaY : w[1] - y[1], N, k = h.target, R = Math.abs(x) > Math.abs(C) ? "h" : "v";
6040
+ if ("touches" in h && R === "h" && k.type === "range")
6046
6041
  return !1;
6047
- var R = window.getSelection(), M = R && R.anchorNode, z = M ? M === k || M.contains(k) : !1;
6042
+ var E = window.getSelection(), M = E && E.anchorNode, z = M ? M === k || M.contains(k) : !1;
6048
6043
  if (z)
6049
6044
  return !1;
6050
- var B = $r(E, k);
6045
+ var B = $r(R, k);
6051
6046
  if (!B)
6052
6047
  return !0;
6053
- if (B ? N = E : (N = E === "v" ? "h" : "v", B = $r(E, k)), !B)
6048
+ if (B ? N = R : (N = R === "v" ? "h" : "v", B = $r(R, k)), !B)
6054
6049
  return !1;
6055
6050
  if (!o.current && "changedTouches" in h && (x || C) && (o.current = N), !N)
6056
6051
  return !0;
@@ -6501,8 +6496,8 @@ var ba = "CheckboxBubbleInput", ya = f.forwardRef(
6501
6496
  "checked"
6502
6497
  ).set, k = !r.current;
6503
6498
  if (h !== s && N) {
6504
- const E = new Event("click", { bubbles: k });
6505
- w.indeterminate = Qe(s), N.call(w, Qe(s) ? !1 : s), w.dispatchEvent(E);
6499
+ const R = new Event("click", { bubbles: k });
6500
+ w.indeterminate = Qe(s), N.call(w, Qe(s) ? !1 : s), w.dispatchEvent(R);
6506
6501
  }
6507
6502
  }, [m, h, s, r]);
6508
6503
  const y = f.useRef(Qe(s) ? !1 : s);
@@ -6829,9 +6824,9 @@ const _p = 50, Ip = async (e, t, n) => {
6829
6824
  x: n,
6830
6825
  y: o
6831
6826
  }, g = jo(r), b = Uo(g), h = await a.getDimensions(d), v = g === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", C = s.reference[b] + s.reference[g] - m[g] - s.floating[b], N = m[g] - s.reference[g], k = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(d));
6832
- let E = k ? k[x] : 0;
6833
- (!E || !await (a.isElement == null ? void 0 : a.isElement(k))) && (E = i.floating[x] || s.floating[b]);
6834
- const R = C / 2 - N / 2, M = E / 2 - h[b] / 2 - 1, z = et(c[y], M), B = et(c[w], M), U = z, j = E - h[b] - B, K = E / 2 - h[b] / 2 + R, I = vo(U, K, j), S = !l.arrow && At(r) != null && K !== I && s.reference[b] / 2 - (K < U ? z : B) - h[b] / 2 < 0, T = S ? K < U ? K - U : K - j : 0;
6827
+ let R = k ? k[x] : 0;
6828
+ (!R || !await (a.isElement == null ? void 0 : a.isElement(k))) && (R = i.floating[x] || s.floating[b]);
6829
+ const E = C / 2 - N / 2, M = R / 2 - h[b] / 2 - 1, z = et(c[y], M), B = et(c[w], M), U = z, j = R - h[b] - B, K = R / 2 - h[b] / 2 + E, I = vo(U, K, j), S = !l.arrow && At(r) != null && K !== I && s.reference[b] / 2 - (K < U ? z : B) - h[b] / 2 < 0, T = S ? K < U ? K - U : K - j : 0;
6835
6830
  return {
6836
6831
  [g]: m[g] + T,
6837
6832
  data: {
@@ -6870,18 +6865,18 @@ const _p = 50, Ip = async (e, t, n) => {
6870
6865
  return {};
6871
6866
  const y = Ge(r), w = ze(i), x = Ge(i) === i, C = await (l.isRTL == null ? void 0 : l.isRTL(d.floating)), N = m || (x || !h ? [hn(i)] : kp(i)), k = b !== "none";
6872
6867
  !m && k && N.push(...Tp(i, h, b, C));
6873
- const E = [i, ...N], R = await l.detectOverflow(t, v), M = [];
6868
+ const R = [i, ...N], E = await l.detectOverflow(t, v), M = [];
6874
6869
  let z = ((o = s.flip) == null ? void 0 : o.overflows) || [];
6875
- if (u && M.push(R[y]), c) {
6870
+ if (u && M.push(E[y]), c) {
6876
6871
  const K = Cp(r, a, C);
6877
- M.push(R[K[0]], R[K[1]]);
6872
+ M.push(E[K[0]], E[K[1]]);
6878
6873
  }
6879
6874
  if (z = [...z, {
6880
6875
  placement: r,
6881
6876
  overflows: M
6882
6877
  }], !M.every((K) => K <= 0)) {
6883
6878
  var B, U;
6884
- const K = (((B = s.flip) == null ? void 0 : B.index) || 0) + 1, I = E[K];
6879
+ const K = (((B = s.flip) == null ? void 0 : B.index) || 0) + 1, I = R[K];
6885
6880
  if (I && (!(c === "alignment" ? w !== ze(I) : !1) || // We leave the current main axis only if every placement on that axis
6886
6881
  // overflows the main axis.
6887
6882
  z.every((A) => ze(A.placement) === w ? A.overflows[0] > 0 : !0)))
@@ -7150,15 +7145,15 @@ const zp = function(e) {
7150
7145
  let v, y;
7151
7146
  c === "top" || c === "bottom" ? (v = c, y = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = c, v = m === "end" ? "top" : "bottom");
7152
7147
  const w = h - u.top - u.bottom, x = b - u.left - u.right, C = et(h - u[v], w), N = et(b - u[y], x), k = !t.middlewareData.shift;
7153
- let E = C, R = N;
7154
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (o = t.middlewareData.shift) != null && o.enabled.y && (E = w), k && !m) {
7148
+ let R = C, E = N;
7149
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = x), (o = t.middlewareData.shift) != null && o.enabled.y && (R = w), k && !m) {
7155
7150
  const z = Ce(u.left, 0), B = Ce(u.right, 0), U = Ce(u.top, 0), j = Ce(u.bottom, 0);
7156
- g ? R = b - 2 * (z !== 0 || B !== 0 ? z + B : Ce(u.left, u.right)) : E = h - 2 * (U !== 0 || j !== 0 ? U + j : Ce(u.top, u.bottom));
7151
+ g ? E = b - 2 * (z !== 0 || B !== 0 ? z + B : Ce(u.left, u.right)) : R = h - 2 * (U !== 0 || j !== 0 ? U + j : Ce(u.top, u.bottom));
7157
7152
  }
7158
7153
  await l({
7159
7154
  ...t,
7160
- availableWidth: R,
7161
- availableHeight: E
7155
+ availableWidth: E,
7156
+ availableHeight: R
7162
7157
  });
7163
7158
  const M = await a.getDimensions(i.floating);
7164
7159
  return b !== M.width || h !== M.height ? {
@@ -7598,15 +7593,15 @@ function sm(e, t) {
7598
7593
  };
7599
7594
  let C = !0;
7600
7595
  function N(k) {
7601
- const E = k[0].intersectionRatio;
7602
- if (E !== l) {
7596
+ const R = k[0].intersectionRatio;
7597
+ if (R !== l) {
7603
7598
  if (!C)
7604
7599
  return a();
7605
- E ? a(!1, E) : o = setTimeout(() => {
7600
+ R ? a(!1, R) : o = setTimeout(() => {
7606
7601
  a(!1, 1e-7);
7607
7602
  }, 1e3);
7608
7603
  }
7609
- E === 1 && !Aa(d, e.getBoundingClientRect()) && a(), C = !1;
7604
+ R === 1 && !Aa(d, e.getBoundingClientRect()) && a(), C = !1;
7610
7605
  }
7611
7606
  try {
7612
7607
  n = new IntersectionObserver(N, {
@@ -7741,16 +7736,16 @@ function gm(e) {
7741
7736
  const [b, h] = f.useState(null), [v, y] = f.useState(null), w = f.useCallback((A) => {
7742
7737
  A !== k.current && (k.current = A, h(A));
7743
7738
  }, []), x = f.useCallback((A) => {
7744
- A !== E.current && (E.current = A, y(A));
7745
- }, []), C = s || b, N = a || v, k = f.useRef(null), E = f.useRef(null), R = f.useRef(u), M = l != null, z = ao(l), B = ao(r), U = ao(d), j = f.useCallback(() => {
7746
- if (!k.current || !E.current)
7739
+ A !== R.current && (R.current = A, y(A));
7740
+ }, []), C = s || b, N = a || v, k = f.useRef(null), R = f.useRef(null), E = f.useRef(u), M = l != null, z = ao(l), B = ao(r), U = ao(d), j = f.useCallback(() => {
7741
+ if (!k.current || !R.current)
7747
7742
  return;
7748
7743
  const A = {
7749
7744
  placement: t,
7750
7745
  strategy: n,
7751
7746
  middleware: m
7752
7747
  };
7753
- B.current && (A.platform = B.current), pm(k.current, E.current, A).then((O) => {
7748
+ B.current && (A.platform = B.current), pm(k.current, R.current, A).then((O) => {
7754
7749
  const P = {
7755
7750
  ...O,
7756
7751
  // The floating element's position may be recomputed while it's closed
@@ -7759,13 +7754,13 @@ function gm(e) {
7759
7754
  // setting it to `true` when `open === false` (must be specified).
7760
7755
  isPositioned: U.current !== !1
7761
7756
  };
7762
- K.current && !vn(R.current, P) && (R.current = P, Sn.flushSync(() => {
7757
+ K.current && !vn(E.current, P) && (E.current = P, Sn.flushSync(() => {
7763
7758
  c(P);
7764
7759
  }));
7765
7760
  });
7766
7761
  }, [m, t, n, B, U]);
7767
7762
  dn(() => {
7768
- d === !1 && R.current.isPositioned && (R.current.isPositioned = !1, c((A) => ({
7763
+ d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, c((A) => ({
7769
7764
  ...A,
7770
7765
  isPositioned: !1
7771
7766
  })));
@@ -7774,7 +7769,7 @@ function gm(e) {
7774
7769
  dn(() => (K.current = !0, () => {
7775
7770
  K.current = !1;
7776
7771
  }), []), dn(() => {
7777
- if (C && (k.current = C), N && (E.current = N), C && N) {
7772
+ if (C && (k.current = C), N && (R.current = N), C && N) {
7778
7773
  if (z.current)
7779
7774
  return z.current(C, N, j);
7780
7775
  j();
@@ -7782,7 +7777,7 @@ function gm(e) {
7782
7777
  }, [C, N, j, z, M]);
7783
7778
  const I = f.useMemo(() => ({
7784
7779
  reference: k,
7785
- floating: E,
7780
+ floating: R,
7786
7781
  setReference: w,
7787
7782
  setFloating: x
7788
7783
  }), [w, x]), S = f.useMemo(() => ({
@@ -7933,7 +7928,7 @@ var Xo = "PopperContent", [Tm, Pm] = Ma(Xo), $a = f.forwardRef(
7933
7928
  updatePositionStrategy: g = "optimized",
7934
7929
  onPlaced: b,
7935
7930
  ...h
7936
- } = e, v = Oa(Xo, n), [y, w] = f.useState(null), x = re(t, (ue) => w(ue)), [C, N] = f.useState(null), k = Tn(C), E = (k == null ? void 0 : k.width) ?? 0, R = (k == null ? void 0 : k.height) ?? 0, M = o + (s !== "center" ? "-" + s : ""), z = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, B = Array.isArray(d) ? d : [d], U = B.length > 0, j = {
7931
+ } = e, v = Oa(Xo, n), [y, w] = f.useState(null), x = re(t, (ue) => w(ue)), [C, N] = f.useState(null), k = Tn(C), R = (k == null ? void 0 : k.width) ?? 0, E = (k == null ? void 0 : k.height) ?? 0, M = o + (s !== "center" ? "-" + s : ""), z = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, B = Array.isArray(d) ? d : [d], U = B.length > 0, j = {
7937
7932
  padding: z,
7938
7933
  boundary: B.filter(_m),
7939
7934
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -7949,7 +7944,7 @@ var Xo = "PopperContent", [Tm, Pm] = Ma(Xo), $a = f.forwardRef(
7949
7944
  reference: v.anchor
7950
7945
  },
7951
7946
  middleware: [
7952
- bm({ mainAxis: r + R, alignmentAxis: a }),
7947
+ bm({ mainAxis: r + E, alignmentAxis: a }),
7953
7948
  l && ym({
7954
7949
  mainAxis: !0,
7955
7950
  crossAxis: !1,
@@ -7965,7 +7960,7 @@ var Xo = "PopperContent", [Tm, Pm] = Ma(Xo), $a = f.forwardRef(
7965
7960
  }
7966
7961
  }),
7967
7962
  C && km({ element: C, padding: i }),
7968
- Im({ arrowWidth: E, arrowHeight: R }),
7963
+ Im({ arrowWidth: R, arrowHeight: E }),
7969
7964
  m && Cm({ strategy: "referenceHidden", ...j })
7970
7965
  ]
7971
7966
  }), [O, P] = Ha(S), Q = ve(b);
@@ -8122,11 +8117,11 @@ var $m = f.forwardRef((e, t) => {
8122
8117
  defaultProp: i ?? null,
8123
8118
  onChange: l,
8124
8119
  caller: jt
8125
- }), [y, w] = f.useState(!1), x = ve(d), C = Ga(n), N = f.useRef(!1), [k, E] = f.useState(0);
8120
+ }), [y, w] = f.useState(!1), x = ve(d), C = Ga(n), N = f.useRef(!1), [k, R] = f.useState(0);
8126
8121
  return f.useEffect(() => {
8127
- const R = m.current;
8128
- if (R)
8129
- return R.addEventListener(io, x), () => R.removeEventListener(io, x);
8122
+ const E = m.current;
8123
+ if (E)
8124
+ return E.addEventListener(io, x), () => E.removeEventListener(io, x);
8130
8125
  }, [x]), /* @__PURE__ */ p(
8131
8126
  Dm,
8132
8127
  {
@@ -8136,16 +8131,16 @@ var $m = f.forwardRef((e, t) => {
8136
8131
  loop: r,
8137
8132
  currentTabStopId: h,
8138
8133
  onItemFocus: f.useCallback(
8139
- (R) => v(R),
8134
+ (E) => v(E),
8140
8135
  [v]
8141
8136
  ),
8142
8137
  onItemShiftTab: f.useCallback(() => w(!0), []),
8143
8138
  onFocusableItemAdd: f.useCallback(
8144
- () => E((R) => R + 1),
8139
+ () => R((E) => E + 1),
8145
8140
  []
8146
8141
  ),
8147
8142
  onFocusableItemRemove: f.useCallback(
8148
- () => E((R) => R - 1),
8143
+ () => R((E) => E - 1),
8149
8144
  []
8150
8145
  ),
8151
8146
  children: /* @__PURE__ */ p(
@@ -8159,11 +8154,11 @@ var $m = f.forwardRef((e, t) => {
8159
8154
  onMouseDown: q(e.onMouseDown, () => {
8160
8155
  N.current = !0;
8161
8156
  }),
8162
- onFocus: q(e.onFocus, (R) => {
8157
+ onFocus: q(e.onFocus, (E) => {
8163
8158
  const M = !N.current;
8164
- if (R.target === R.currentTarget && M && !y) {
8159
+ if (E.target === E.currentTarget && M && !y) {
8165
8160
  const z = new CustomEvent(io, Mm);
8166
- if (R.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
8161
+ if (E.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
8167
8162
  const B = C().filter((S) => S.focusable), U = B.find((S) => S.active), j = B.find((S) => S.id === h), I = [U, j, ...B].filter(
8168
8163
  Boolean
8169
8164
  ).map((S) => S.ref.current);
@@ -8580,7 +8575,7 @@ var er = "ScrollArea", [gi] = we(er), [fh, Re] = gi(er), vi = f.forwardRef(
8580
8575
  dir: r,
8581
8576
  scrollHideDelay: s = 600,
8582
8577
  ...a
8583
- } = e, [i, l] = f.useState(null), [d, u] = f.useState(null), [c, m] = f.useState(null), [g, b] = f.useState(null), [h, v] = f.useState(null), [y, w] = f.useState(0), [x, C] = f.useState(0), [N, k] = f.useState(!1), [E, R] = f.useState(!1), M = re(t, (B) => l(B)), z = Wt(r);
8578
+ } = e, [i, l] = f.useState(null), [d, u] = f.useState(null), [c, m] = f.useState(null), [g, b] = f.useState(null), [h, v] = f.useState(null), [y, w] = f.useState(0), [x, C] = f.useState(0), [N, k] = f.useState(!1), [R, E] = f.useState(!1), M = re(t, (B) => l(B)), z = Wt(r);
8584
8579
  return /* @__PURE__ */ p(
8585
8580
  fh,
8586
8581
  {
@@ -8599,8 +8594,8 @@ var er = "ScrollArea", [gi] = we(er), [fh, Re] = gi(er), vi = f.forwardRef(
8599
8594
  onScrollbarXEnabledChange: k,
8600
8595
  scrollbarY: h,
8601
8596
  onScrollbarYChange: v,
8602
- scrollbarYEnabled: E,
8603
- onScrollbarYEnabledChange: R,
8597
+ scrollbarYEnabled: R,
8598
+ onScrollbarYEnabledChange: E,
8604
8599
  onCornerWidthChange: w,
8605
8600
  onCornerHeightChange: C,
8606
8601
  children: /* @__PURE__ */ p(
@@ -8902,8 +8897,8 @@ var ph = f.forwardRef((e, t) => {
8902
8897
  onWheelScroll: u,
8903
8898
  onResize: c,
8904
8899
  ...m
8905
- } = e, g = Re(He, n), [b, h] = f.useState(null), v = re(t, (M) => h(M)), y = f.useRef(null), w = f.useRef(""), x = g.viewport, C = o.content - o.viewport, N = ve(u), k = ve(l), E = $n(c, 10);
8906
- function R(M) {
8900
+ } = e, g = Re(He, n), [b, h] = f.useState(null), v = re(t, (M) => h(M)), y = f.useRef(null), w = f.useRef(""), x = g.viewport, C = o.content - o.viewport, N = ve(u), k = ve(l), R = $n(c, 10);
8901
+ function E(M) {
8907
8902
  if (y.current) {
8908
8903
  const z = M.clientX - y.current.left, B = M.clientY - y.current.top;
8909
8904
  d({ x: z, y: B });
@@ -8915,7 +8910,7 @@ var ph = f.forwardRef((e, t) => {
8915
8910
  (b == null ? void 0 : b.contains(B)) && N(z, C);
8916
8911
  };
8917
8912
  return document.addEventListener("wheel", M, { passive: !1 }), () => document.removeEventListener("wheel", M, { passive: !1 });
8918
- }, [x, b, C, N]), f.useEffect(k, [o, k]), Tt(b, E), Tt(g.content, E), /* @__PURE__ */ p(
8913
+ }, [x, b, C, N]), f.useEffect(k, [o, k]), Tt(b, R), Tt(g.content, R), /* @__PURE__ */ p(
8919
8914
  vh,
8920
8915
  {
8921
8916
  scope: n,
@@ -8932,9 +8927,9 @@ var ph = f.forwardRef((e, t) => {
8932
8927
  ref: v,
8933
8928
  style: { position: "absolute", ...m.style },
8934
8929
  onPointerDown: q(e.onPointerDown, (M) => {
8935
- M.button === 0 && (M.target.setPointerCapture(M.pointerId), y.current = b.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), R(M));
8930
+ M.button === 0 && (M.target.setPointerCapture(M.pointerId), y.current = b.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), E(M));
8936
8931
  }),
8937
- onPointerMove: q(e.onPointerMove, R),
8932
+ onPointerMove: q(e.onPointerMove, E),
8938
8933
  onPointerUp: q(e.onPointerUp, (M) => {
8939
8934
  const z = M.target;
8940
8935
  z.hasPointerCapture(M.pointerId) && z.releasePointerCapture(M.pointerId), document.body.style.webkitUserSelect = w.current, g.viewport && (g.viewport.style.scrollBehavior = ""), y.current = null;
@@ -9098,7 +9093,7 @@ var Sh = vi, Ch = yi, kh = Ei, Eh = [" ", "Enter", "ArrowUp", "ArrowDown"], Rh =
9098
9093
  disabled: m,
9099
9094
  required: g,
9100
9095
  form: b
9101
- } = e, h = Hn(t), [v, y] = f.useState(null), [w, x] = f.useState(null), [C, N] = f.useState(!1), k = Wt(d), [E, R] = Ue({
9096
+ } = e, h = Hn(t), [v, y] = f.useState(null), [w, x] = f.useState(null), [C, N] = f.useState(!1), k = Wt(d), [R, E] = Ue({
9102
9097
  prop: o,
9103
9098
  defaultProp: r ?? !1,
9104
9099
  onChange: s,
@@ -9123,8 +9118,8 @@ var Sh = vi, Ch = yi, kh = Ei, Eh = [" ", "Enter", "ArrowUp", "ArrowDown"], Rh =
9123
9118
  contentId: ht(),
9124
9119
  value: M,
9125
9120
  onValueChange: z,
9126
- open: E,
9127
- onOpenChange: R,
9121
+ open: R,
9122
+ onOpenChange: E,
9128
9123
  dir: k,
9129
9124
  triggerPointerDownPosRef: B,
9130
9125
  disabled: m,
@@ -9277,7 +9272,7 @@ var Ae = 10, [zi, rt] = It(pt), Mh = "SelectContentImpl", Oh = /* @__PURE__ */ F
9277
9272
  avoidCollisions: v,
9278
9273
  //
9279
9274
  ...y
9280
- } = e, w = ot(pt, n), [x, C] = f.useState(null), [N, k] = f.useState(null), E = re(t, (F) => C(F)), [R, M] = f.useState(null), [z, B] = f.useState(
9275
+ } = e, w = ot(pt, n), [x, C] = f.useState(null), [N, k] = f.useState(null), R = re(t, (F) => C(F)), [E, M] = f.useState(null), [z, B] = f.useState(
9281
9276
  null
9282
9277
  ), U = Bn(n), [j, K] = f.useState(!1), I = f.useRef(!1);
9283
9278
  f.useEffect(() => {
@@ -9291,8 +9286,8 @@ var Ae = 10, [zi, rt] = It(pt), Mh = "SelectContentImpl", Oh = /* @__PURE__ */ F
9291
9286
  },
9292
9287
  [U, N]
9293
9288
  ), T = f.useCallback(
9294
- () => S([R, x]),
9295
- [S, R, x]
9289
+ () => S([E, x]),
9290
+ [S, E, x]
9296
9291
  );
9297
9292
  f.useEffect(() => {
9298
9293
  j && T();
@@ -9355,7 +9350,7 @@ var Ae = 10, [zi, rt] = It(pt), Mh = "SelectContentImpl", Oh = /* @__PURE__ */ F
9355
9350
  viewport: N,
9356
9351
  onViewportChange: k,
9357
9352
  itemRefCallback: ie,
9358
- selectedItem: R,
9353
+ selectedItem: E,
9359
9354
  onItemLeave: G,
9360
9355
  itemTextRefCallback: Z,
9361
9356
  focusSelectedItem: T,
@@ -9395,7 +9390,7 @@ var Ae = 10, [zi, rt] = It(pt), Mh = "SelectContentImpl", Oh = /* @__PURE__ */ F
9395
9390
  ...y,
9396
9391
  ...X,
9397
9392
  onPlaced: () => K(!0),
9398
- ref: E,
9393
+ ref: R,
9399
9394
  style: {
9400
9395
  // flex layout so we can place the scroll buttons properly
9401
9396
  display: "flex",
@@ -9427,11 +9422,11 @@ var Ae = 10, [zi, rt] = It(pt), Mh = "SelectContentImpl", Oh = /* @__PURE__ */ F
9427
9422
  );
9428
9423
  $i.displayName = Mh;
9429
9424
  var Lh = "SelectItemAlignedPosition", Fi = f.forwardRef((e, t) => {
9430
- const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ot(pt, n), a = rt(pt, n), [i, l] = f.useState(null), [d, u] = f.useState(null), c = re(t, (E) => u(E)), m = Bn(n), g = f.useRef(!1), b = f.useRef(!0), { viewport: h, selectedItem: v, selectedItemText: y, focusSelectedItem: w } = a, x = f.useCallback(() => {
9425
+ const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ot(pt, n), a = rt(pt, n), [i, l] = f.useState(null), [d, u] = f.useState(null), c = re(t, (R) => u(R)), m = Bn(n), g = f.useRef(!1), b = f.useRef(!0), { viewport: h, selectedItem: v, selectedItemText: y, focusSelectedItem: w } = a, x = f.useCallback(() => {
9431
9426
  if (s.trigger && s.valueNode && i && d && h && v && y) {
9432
- const E = s.trigger.getBoundingClientRect(), R = d.getBoundingClientRect(), M = s.valueNode.getBoundingClientRect(), z = y.getBoundingClientRect();
9427
+ const R = s.trigger.getBoundingClientRect(), E = d.getBoundingClientRect(), M = s.valueNode.getBoundingClientRect(), z = y.getBoundingClientRect();
9433
9428
  if (s.dir !== "rtl") {
9434
- const oe = z.left - R.left, te = M.left - oe, ue = E.left - te, fe = E.width + ue, st = Math.max(fe, R.width), qe = window.innerWidth - Ae, Ne = xo(te, [
9429
+ const oe = z.left - E.left, te = M.left - oe, ue = R.left - te, fe = R.width + ue, st = Math.max(fe, E.width), qe = window.innerWidth - Ae, Ne = xo(te, [
9435
9430
  Ae,
9436
9431
  // Prevents the content from going off the starting edge of the
9437
9432
  // viewport. It may still go off the ending edge, but this can be
@@ -9442,13 +9437,13 @@ var Lh = "SelectItemAlignedPosition", Fi = f.forwardRef((e, t) => {
9442
9437
  ]);
9443
9438
  i.style.minWidth = fe + "px", i.style.left = Ne + "px";
9444
9439
  } else {
9445
- const oe = R.right - z.right, te = window.innerWidth - M.right - oe, ue = window.innerWidth - E.right - te, fe = E.width + ue, st = Math.max(fe, R.width), qe = window.innerWidth - Ae, Ne = xo(te, [
9440
+ const oe = E.right - z.right, te = window.innerWidth - M.right - oe, ue = window.innerWidth - R.right - te, fe = R.width + ue, st = Math.max(fe, E.width), qe = window.innerWidth - Ae, Ne = xo(te, [
9446
9441
  Ae,
9447
9442
  Math.max(Ae, qe - st)
9448
9443
  ]);
9449
9444
  i.style.minWidth = fe + "px", i.style.right = Ne + "px";
9450
9445
  }
9451
- const B = m(), U = window.innerHeight - Ae * 2, j = h.scrollHeight, K = window.getComputedStyle(d), I = parseInt(K.borderTopWidth, 10), S = parseInt(K.paddingTop, 10), T = parseInt(K.borderBottomWidth, 10), A = parseInt(K.paddingBottom, 10), O = I + S + j + A + T, P = Math.min(v.offsetHeight * 5, O), Q = window.getComputedStyle(h), ie = parseInt(Q.paddingTop, 10), G = parseInt(Q.paddingBottom, 10), Z = E.top + E.height / 2 - Ae, Y = U - Z, X = v.offsetHeight / 2, F = v.offsetTop + X, H = I + S + F, J = O - H;
9446
+ const B = m(), U = window.innerHeight - Ae * 2, j = h.scrollHeight, K = window.getComputedStyle(d), I = parseInt(K.borderTopWidth, 10), S = parseInt(K.paddingTop, 10), T = parseInt(K.borderBottomWidth, 10), A = parseInt(K.paddingBottom, 10), O = I + S + j + A + T, P = Math.min(v.offsetHeight * 5, O), Q = window.getComputedStyle(h), ie = parseInt(Q.paddingTop, 10), G = parseInt(Q.paddingBottom, 10), Z = R.top + R.height / 2 - Ae, Y = U - Z, X = v.offsetHeight / 2, F = v.offsetTop + X, H = I + S + F, J = O - H;
9452
9447
  if (H <= Z) {
9453
9448
  const oe = B.length > 0 && v === B[B.length - 1].ref.current;
9454
9449
  i.style.bottom = "0px";
@@ -9488,8 +9483,8 @@ var Lh = "SelectItemAlignedPosition", Fi = f.forwardRef((e, t) => {
9488
9483
  d && N(window.getComputedStyle(d).zIndex);
9489
9484
  }, [d]);
9490
9485
  const k = f.useCallback(
9491
- (E) => {
9492
- E && b.current === !0 && (x(), w == null || w(), b.current = !1);
9486
+ (R) => {
9487
+ R && b.current === !0 && (x(), w == null || w(), b.current = !1);
9493
9488
  },
9494
9489
  [x, w]
9495
9490
  );
@@ -10207,8 +10202,8 @@ var Ht = "Tooltip", [kg, Gt] = Un(Ht), yl = (e) => {
10207
10202
  } = e, l = sr(Ht, e.__scopeTooltip), d = jn(t), [u, c] = f.useState(null), m = ht(), g = f.useRef(0), b = a ?? l.disableHoverableContent, h = i ?? l.delayDuration, v = f.useRef(!1), [y, w] = Ue({
10208
10203
  prop: o,
10209
10204
  defaultProp: r ?? !1,
10210
- onChange: (E) => {
10211
- E ? (l.onOpen(), document.dispatchEvent(new CustomEvent(No))) : l.onClose(), s == null || s(E);
10205
+ onChange: (R) => {
10206
+ R ? (l.onOpen(), document.dispatchEvent(new CustomEvent(No))) : l.onClose(), s == null || s(R);
10212
10207
  },
10213
10208
  caller: Ht
10214
10209
  }), x = f.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), C = f.useCallback(() => {
@@ -11749,8 +11744,8 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11749
11744
  ), { tokens: r, errors: s };
11750
11745
  }, yb = (e) => typeof e == "object" && e !== null && e.encrypted === !0 && Array.isArray(e.data), $b = ({
11751
11746
  instanceId: e,
11752
- apiBase: t,
11753
- hostBase: n,
11747
+ queryApiBase: t,
11748
+ apiBase: n,
11754
11749
  appId: o,
11755
11750
  children: r,
11756
11751
  customerId: s,
@@ -11766,16 +11761,16 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11766
11761
  console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"), d([]), y(!0);
11767
11762
  return;
11768
11763
  }
11769
- if (!t || !o) {
11764
+ if (!n || !o) {
11770
11765
  console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"), d([]), y(!0);
11771
11766
  return;
11772
11767
  }
11773
- const T = await fetch(Dt(t, `/instances/${o}/${S}`));
11768
+ const T = await fetch(Dt(n, `/instances/${o}/${S}`));
11774
11769
  if (!T.ok) {
11775
11770
  console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`), d([]), y(!0);
11776
11771
  return;
11777
11772
  }
11778
- const A = await T.json(), O = ms(typeof window < "u" ? window.location.search : ""), P = await zc(A, O), { tokens: Q, errors: ie } = await bb(P, t, o, O);
11773
+ const A = await T.json(), O = ms(typeof window < "u" ? window.location.search : ""), P = await zc(A, O), { tokens: Q, errors: ie } = await bb(P, n, o, O);
11779
11774
  d(P), c(O), g(new Map(Q)), h(ie);
11780
11775
  } catch (T) {
11781
11776
  console.error("Failed to load extensions:", T);
@@ -11783,14 +11778,14 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11783
11778
  y(!0);
11784
11779
  }
11785
11780
  })();
11786
- }, [e, o, t]), ce(() => {
11787
- if (!t || !o || l.length === 0)
11781
+ }, [e, o, n]), ce(() => {
11782
+ if (!n || !o || l.length === 0)
11788
11783
  return;
11789
11784
  const S = setInterval(async () => {
11790
11785
  const T = [];
11791
11786
  await Promise.all(
11792
11787
  l.filter((A) => A.manifest.permissions.includes("data:fetch")).map(async (A) => {
11793
- const O = u.find((Z) => Z.extensionId === A.id), P = O == null ? void 0 : O.token, Q = O == null ? void 0 : O.mode, ie = Dt(t, "/proxy-token"), G = await fetch(ie, {
11788
+ const O = u.find((Z) => Z.extensionId === A.id), P = O == null ? void 0 : O.token, Q = O == null ? void 0 : O.mode, ie = Dt(n, "/proxy-token"), G = await fetch(ie, {
11794
11789
  method: "POST",
11795
11790
  headers: { "Content-Type": "application/json" },
11796
11791
  body: JSON.stringify({
@@ -11814,7 +11809,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11814
11809
  });
11815
11810
  }, 3300 * 1e3);
11816
11811
  return () => clearInterval(S);
11817
- }, [l, u, t, o]), ce(() => {
11812
+ }, [l, u, n, o]), ce(() => {
11818
11813
  if (m.size === 0)
11819
11814
  return;
11820
11815
  const I = (S) => {
@@ -11832,7 +11827,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11832
11827
  };
11833
11828
  return window.addEventListener("message", I), () => window.removeEventListener("message", I);
11834
11829
  }, [l, u, m]);
11835
- const E = _e((I, S) => {
11830
+ const R = _e((I, S) => {
11836
11831
  const T = uo();
11837
11832
  for (const [A, O] of T)
11838
11833
  O.manifest.permissions.includes("identity:subscribe") && ct(A, {
@@ -11840,7 +11835,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11840
11835
  eventType: I,
11841
11836
  payload: { type: I, state: S, timestamp: (/* @__PURE__ */ new Date()).toISOString() }
11842
11837
  });
11843
- }, []), R = _e(async (I) => {
11838
+ }, []), E = _e(async (I) => {
11844
11839
  const S = uo(), T = [];
11845
11840
  for (const [O, P] of S) {
11846
11841
  if (!P.manifest.permissions.includes("identity:extend")) continue;
@@ -11864,9 +11859,9 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11864
11859
  const A = await Promise.all(T);
11865
11860
  return Object.assign({}, ...A);
11866
11861
  }, []), M = _e(async (I) => {
11867
- if (!t || !o || !e)
11868
- return console.warn("[embeddables] signIdentity skipped — missing:", { apiBase: !!t, appId: !!o, instanceId: !!e }), null;
11869
- const S = Dt(t, `/instances/${o}/${e}/identity`);
11862
+ if (!n || !o || !e)
11863
+ return console.warn("[embeddables] signIdentity skipped — missing:", { apiBase: !!n, appId: !!o, instanceId: !!e }), null;
11864
+ const S = Dt(n, `/instances/${o}/${e}/identity`);
11870
11865
  console.log("[embeddables] Calling identity sign:", { url: S, claims: Object.keys(I) });
11871
11866
  try {
11872
11867
  const T = await fetch(S, {
@@ -11881,7 +11876,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11881
11876
  } catch (T) {
11882
11877
  return console.warn("[embeddables] Identity sign request failed:", T), null;
11883
11878
  }
11884
- }, [t, o, e]), z = _e((I) => {
11879
+ }, [n, o, e]), z = _e((I) => {
11885
11880
  const S = window.zE;
11886
11881
  S && S("messenger", "loginUser", async (T) => {
11887
11882
  T(I);
@@ -11893,7 +11888,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11893
11888
  console.log("[embeddables] Running sign lifecycle for user:", I.id);
11894
11889
  const { email: S, name: T } = I, A = { external_id: String(I.id) };
11895
11890
  (async () => {
11896
- const O = await R({ ...A, email: S, name: T });
11891
+ const O = await E({ ...A, email: S, name: T });
11897
11892
  console.log("[embeddables] Enriched claims:", O);
11898
11893
  const P = await M({
11899
11894
  ...A,
@@ -11903,7 +11898,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11903
11898
  });
11904
11899
  console.log("[embeddables] Sign result:", { hasToken: !!P }), P && z(P);
11905
11900
  })();
11906
- }, [R, M, z]), j = _e((I) => {
11901
+ }, [E, M, z]), j = _e((I) => {
11907
11902
  if (k.length > 0 && N.current.size < k.length) {
11908
11903
  console.log(`[embeddables] Deferring sign lifecycle — waiting for identity:extend extensions: ${N.current.size}/${k.length} ready`), C.current = I;
11909
11904
  return;
@@ -11928,14 +11923,14 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11928
11923
  };
11929
11924
  x((S) => {
11930
11925
  var T, A;
11931
- return S.authenticated && ((T = S.user) == null ? void 0 : T.id) === ((A = I.user) == null ? void 0 : A.id) ? S : (console.log("[embeddables] Identity state changed (props), starting sign lifecycle"), j(I.user), E("identity.login", I), I);
11926
+ return S.authenticated && ((T = S.user) == null ? void 0 : T.id) === ((A = I.user) == null ? void 0 : A.id) ? S : (console.log("[embeddables] Identity state changed (props), starting sign lifecycle"), j(I.user), R("identity.login", I), I);
11932
11927
  });
11933
11928
  } else {
11934
11929
  if (s === void 0)
11935
11930
  return;
11936
- x((I) => I.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), B(), E("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : I);
11931
+ x((I) => I.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), B(), R("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : I);
11937
11932
  }
11938
- }, [v, s, a, i, k, j, E, B]), ce(() => {
11933
+ }, [v, s, a, i, k, j, R, B]), ce(() => {
11939
11934
  if (!v || s !== void 0)
11940
11935
  return;
11941
11936
  const I = () => {
@@ -11953,18 +11948,18 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
11953
11948
  };
11954
11949
  x((P) => {
11955
11950
  var Q, ie;
11956
- return P.authenticated && ((Q = P.user) == null ? void 0 : Q.id) === ((ie = O.user) == null ? void 0 : ie.id) ? P : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"), j(O.user), E("identity.login", O), O);
11951
+ return P.authenticated && ((Q = P.user) == null ? void 0 : Q.id) === ((ie = O.user) == null ? void 0 : ie.id) ? P : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"), j(O.user), R("identity.login", O), O);
11957
11952
  });
11958
11953
  } catch {
11959
11954
  console.warn("[embeddables] Failed to parse #stackable-identity JSON");
11960
11955
  }
11961
11956
  else
11962
- x((A) => A.authenticated ? (B(), E("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : A);
11957
+ x((A) => A.authenticated ? (B(), R("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : A);
11963
11958
  };
11964
11959
  I();
11965
11960
  const S = new MutationObserver(I);
11966
11961
  return S.observe(document.head, { childList: !0, subtree: !0 }), S.observe(document.body, { childList: !0, subtree: !0 }), () => S.disconnect();
11967
- }, [v, s, j, E, B]), ce(() => {
11962
+ }, [v, s, j, R, B]), ce(() => {
11968
11963
  if (!w.authenticated)
11969
11964
  return;
11970
11965
  const I = (S) => {
@@ -12008,7 +12003,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
12008
12003
  const K = fn(
12009
12004
  () => ({
12010
12005
  // TODO(data.query-deprecation): Remove when data.query is deprecated — host-native ecommerce route replaced by extension + data.fetch
12011
- "data.query": async (I) => Al(I, n),
12006
+ "data.query": async (I) => Al(I, t),
12012
12007
  "data.fetch": async (I, S) => {
12013
12008
  const T = m.get(I);
12014
12009
  if (!T)
@@ -12024,7 +12019,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
12024
12019
  method: S.method ?? "GET",
12025
12020
  headers: S.headers ?? {},
12026
12021
  body: S.body ?? null
12027
- }, O = Dt(t, "/proxy"), P = await fetch(O, {
12022
+ }, O = Dt(n, "/proxy"), P = await fetch(O, {
12028
12023
  method: "POST",
12029
12024
  headers: {
12030
12025
  "Content-Type": "application/json",
@@ -12090,7 +12085,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", Nl = {
12090
12085
  }),
12091
12086
  "identity.read": async () => w
12092
12087
  }),
12093
- [t, o, n, s, a, i, m, w]
12088
+ [n, o, t, s, a, i, m, w]
12094
12089
  );
12095
12090
  return v ? /* @__PURE__ */ $(Fe, { children: [
12096
12091
  /* @__PURE__ */ p(tc, { extensions: l, capabilityHandlers: K, components: ub(), children: r }),
@@ -12210,7 +12205,7 @@ const kb = ({ ...e }) => {
12210
12205
  }
12211
12206
  })();
12212
12207
  }, [e, t]), { customer: n, loading: r, error: a };
12213
- }, Pb = ({ customerId: e, customerEmail: t, hostBase: n, children: o }) => {
12208
+ }, Pb = ({ customerId: e, customerEmail: t, queryApiBase: n, children: o }) => {
12214
12209
  var l, d;
12215
12210
  const { customer: r, loading: s, error: a } = Tb(e, n);
12216
12211
  if (s)
@@ -12311,7 +12306,8 @@ const kb = ({ ...e }) => {
12311
12306
  }, lo = 25, co = 75, Hb = ({
12312
12307
  header: e,
12313
12308
  buttons: t,
12314
- hostBase: n,
12309
+ queryApiBase: n,
12310
+ // TODO(data.query-deprecation): Remove when data.query is deprecated — host-native ecommerce route replaced by extension + data.fetch
12315
12311
  customerId: o = "",
12316
12312
  customerEmail: r = "",
12317
12313
  primaryPercent: s = 50
@@ -12319,62 +12315,62 @@ const kb = ({ ...e }) => {
12319
12315
  const a = Math.max(
12320
12316
  lo,
12321
12317
  Math.min(co, s)
12322
- ), [i, l] = le("account"), [d, u] = le(a), [c, m] = le(!1), [g, b] = le(!1), [h, v] = le(!1), y = We(null), w = _e(() => !window.zE || !document.getElementById("widget_conversations") || !document.getElementById("widget_messages") ? !1 : (window.zE("messenger", "render", {
12318
+ ), [i, l] = le("extensions"), [d, u] = le(a), [c, m] = le(!1), [g, b] = le("loading"), [h, v] = le(!1), y = We(null), w = _e(() => !window.zE || !document.getElementById("widget_conversations") || !document.getElementById("widget_messages") ? !1 : (window.zE("messenger", "render", {
12323
12319
  mode: "embedded",
12324
- conversationList: { targetElement: "#widget_conversations" },
12325
- messageLog: { targetElement: "#widget_messages" }
12320
+ messageLog: { targetElement: "#widget_messages" },
12321
+ conversationList: { targetElement: "#widget_conversations" }
12326
12322
  }), window.zE("messenger:set", "customization", {
12327
12323
  common: { hideHeader: !1 },
12328
- conversationList: { hideHeader: !0, hideNewConversationButton: !0 },
12329
- messageLog: { hideHeader: !0 }
12324
+ messageLog: { hideHeader: !0 },
12325
+ conversationList: { hideHeader: !0, hideNewConversationButton: !0 }
12330
12326
  }), !0), []);
12331
12327
  ce(() => {
12332
12328
  if (w()) {
12333
- b(!0);
12329
+ b("ready");
12334
12330
  return;
12335
12331
  }
12336
12332
  const k = setInterval(() => {
12337
- w() && (b(!0), clearInterval(k));
12338
- }, 100), E = setTimeout(() => {
12339
- clearInterval(k), console.warn("Zendesk widget failed to load after 10 seconds");
12333
+ w() && (b("ready"), clearInterval(k));
12334
+ }, 100), R = setTimeout(() => {
12335
+ clearInterval(k), b((E) => E === "ready" ? E : (console.warn("Zendesk widget failed to load after 10 seconds"), "error"));
12340
12336
  }, 1e4);
12341
12337
  return () => {
12342
- clearInterval(k), clearTimeout(E);
12338
+ clearInterval(k), clearTimeout(R);
12343
12339
  };
12344
12340
  }, [w]);
12345
12341
  const x = _e((k) => {
12346
- const { detail: E } = k;
12347
- !window.zE || !(E != null && E.payload) || window.zE("messenger:ui", "newConversation", E.payload);
12342
+ const { detail: R } = k;
12343
+ !window.zE || !(R != null && R.payload) || window.zE("messenger:ui", "newConversation", R.payload);
12348
12344
  }, []);
12349
12345
  ce(() => (window.addEventListener("ext-action-newConversation", x), () => {
12350
12346
  window.removeEventListener("ext-action-newConversation", x);
12351
12347
  }), [x]), ce(() => {
12352
12348
  if (!h) return;
12353
- const k = (R) => {
12349
+ const k = (E) => {
12354
12350
  if (!y.current) return;
12355
12351
  const M = y.current.getBoundingClientRect();
12356
12352
  if ((c ? M.width : M.height) === 0) return;
12357
- const B = c ? (R.clientX - M.left) / M.width * 100 : (R.clientY - M.top) / M.height * 100, U = Math.max(
12353
+ const B = c ? (E.clientX - M.left) / M.width * 100 : (E.clientY - M.top) / M.height * 100, U = Math.max(
12358
12354
  lo,
12359
12355
  Math.min(co, B)
12360
12356
  );
12361
12357
  u(U);
12362
- }, E = () => {
12358
+ }, R = () => {
12363
12359
  v(!1), document.body.style.cursor = "", document.body.style.userSelect = "";
12364
12360
  };
12365
- return document.body.style.cursor = c ? "col-resize" : "row-resize", document.body.style.userSelect = "none", window.addEventListener("mousemove", k), window.addEventListener("mouseup", E), window.addEventListener("blur", E), () => {
12366
- window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", E), window.removeEventListener("blur", E), document.body.style.cursor = "", document.body.style.userSelect = "";
12361
+ return document.body.style.cursor = c ? "col-resize" : "row-resize", document.body.style.userSelect = "none", window.addEventListener("mousemove", k), window.addEventListener("mouseup", R), window.addEventListener("blur", R), () => {
12362
+ window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", R), window.removeEventListener("blur", R), document.body.style.cursor = "", document.body.style.userSelect = "";
12367
12363
  };
12368
12364
  }, [h, c]), ce(() => {
12369
12365
  if (!y.current) return;
12370
- const k = y.current, E = () => {
12366
+ const k = y.current, R = () => {
12371
12367
  const M = getComputedStyle(k).flexDirection === "row";
12372
12368
  m(M);
12373
12369
  };
12374
- E();
12375
- const R = new ResizeObserver(E);
12376
- return R.observe(k), () => {
12377
- R.disconnect();
12370
+ R();
12371
+ const E = new ResizeObserver(R);
12372
+ return E.observe(k), () => {
12373
+ E.disconnect();
12378
12374
  };
12379
12375
  }, []);
12380
12376
  const C = _e((k) => {
@@ -12398,7 +12394,7 @@ const kb = ({ ...e }) => {
12398
12394
  style: { flexBasis: `${d}%` },
12399
12395
  children: [
12400
12396
  /* @__PURE__ */ $("div", { className: "flex items-center justify-between px-4 py-3", children: [
12401
- /* @__PURE__ */ p("h2", { className: "font-semibold text-sm text-foreground", children: i === "account" ? "My Account" : "My Conversations" }),
12397
+ /* @__PURE__ */ p("h2", { className: "font-semibold text-sm text-foreground", children: i === "extensions" ? "My Profile" : "My Conversations" }),
12402
12398
  /* @__PURE__ */ $("div", { className: "flex items-center gap-1", children: [
12403
12399
  e && /* @__PURE__ */ p("div", { className: "flex mr-1 gap-1", children: e }),
12404
12400
  /* @__PURE__ */ $("div", { className: "flex rounded-lg bg-muted p-1", children: [
@@ -12406,13 +12402,13 @@ const kb = ({ ...e }) => {
12406
12402
  /* @__PURE__ */ p(
12407
12403
  "button",
12408
12404
  {
12409
- onClick: () => l("account"),
12405
+ onClick: () => l("extensions"),
12410
12406
  className: V(
12411
12407
  // eslint-disable-next-line @stylistic/max-len
12412
12408
  "rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
12413
- i === "account" ? "border-border bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
12409
+ i === "extensions" ? "border-border bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
12414
12410
  ),
12415
- title: "My Account",
12411
+ title: "My Profile",
12416
12412
  children: /* @__PURE__ */ p(xs, { className: "h-4 w-4" })
12417
12413
  }
12418
12414
  ),
@@ -12434,7 +12430,7 @@ const kb = ({ ...e }) => {
12434
12430
  ] }),
12435
12431
  /* @__PURE__ */ $("div", { className: "flex-1 overflow-y-auto p-4 relative", children: [
12436
12432
  /* @__PURE__ */ $("div", { className: V("flex flex-col gap-2", i === "conversations" && "hidden"), children: [
12437
- /* @__PURE__ */ p(Pb, { customerId: o, customerEmail: r, hostBase: n, children: /* @__PURE__ */ p(
12433
+ /* @__PURE__ */ p(Pb, { customerId: o, customerEmail: r, queryApiBase: n, children: /* @__PURE__ */ p(
12438
12434
  Zt,
12439
12435
  {
12440
12436
  target: "slot.header",
@@ -12453,8 +12449,8 @@ const kb = ({ ...e }) => {
12453
12449
  ] }),
12454
12450
  /* @__PURE__ */ p("div", { className: V(
12455
12451
  "h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",
12456
- i === "account" && "hidden"
12457
- ), children: /* @__PURE__ */ p(Ab, {}) })
12452
+ i === "extensions" && "hidden"
12453
+ ), children: g === "error" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground", children: /* @__PURE__ */ p("p", { children: "Error loading conversations." }) }) : /* @__PURE__ */ p(Ab, {}) })
12458
12454
  ] })
12459
12455
  ]
12460
12456
  }
@@ -12466,7 +12462,7 @@ const kb = ({ ...e }) => {
12466
12462
  className: "min-h-0 min-w-0 flex-none flex flex-col bg-white",
12467
12463
  style: { flexBasis: `${100 - d}%` },
12468
12464
  children: [
12469
- /* @__PURE__ */ p("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ p(_b, {}) }),
12465
+ /* @__PURE__ */ p("div", { className: "flex-1 overflow-hidden", children: g === "error" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground", children: /* @__PURE__ */ p("p", { children: "Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured." }) }) : /* @__PURE__ */ p(_b, {}) }),
12470
12466
  /* @__PURE__ */ $("div", { className: "flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500", children: [
12471
12467
  /* @__PURE__ */ p(
12472
12468
  Zt,
@@ -12487,8 +12483,8 @@ const kb = ({ ...e }) => {
12487
12483
  context: N,
12488
12484
  className: "flex items-center gap-1",
12489
12485
  separator: /* @__PURE__ */ p("span", { className: "text-zinc-300", children: "/" }),
12490
- render: ({ children: k, index: E }) => /* @__PURE__ */ $(Fe, { children: [
12491
- E === 0 && /* @__PURE__ */ p("span", { className: "text-zinc-300", children: "+" }),
12486
+ render: ({ children: k, index: R }) => /* @__PURE__ */ $(Fe, { children: [
12487
+ R === 0 && /* @__PURE__ */ p("span", { className: "text-zinc-300", children: "+" }),
12492
12488
  k
12493
12489
  ] })
12494
12490
  }