@stackable-labs/embeddables 1.70.0 → 1.72.0
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 +223 -224
- package/dist/stackable-widget.external.js +2 -2
- package/dist/stackable-widget.js +12 -12
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as Cn from "react-dom";
|
|
|
5
5
|
import ps from "react-dom";
|
|
6
6
|
const el = () => {
|
|
7
7
|
try {
|
|
8
|
-
return "
|
|
8
|
+
return "e97eddcb-fe89-49f5-8ae9-20795ca2f44a";
|
|
9
9
|
} catch {
|
|
10
10
|
return "dev";
|
|
11
11
|
}
|
|
@@ -890,8 +890,8 @@ hl("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;
|
|
|
890
890
|
function en(e) {
|
|
891
891
|
return e.label !== void 0;
|
|
892
892
|
}
|
|
893
|
-
const Il = 3, _l = "24px", Ml = "16px", br = 4e3, Ol = 356, Ll = 14,
|
|
894
|
-
function
|
|
893
|
+
const Il = 3, _l = "24px", Ml = "16px", br = 4e3, Ol = 356, Ll = 14, zl = 45, Dl = 200;
|
|
894
|
+
function De(...e) {
|
|
895
895
|
return e.filter(Boolean).join(" ");
|
|
896
896
|
}
|
|
897
897
|
function $l(e) {
|
|
@@ -900,7 +900,7 @@ function $l(e) {
|
|
|
900
900
|
}
|
|
901
901
|
const Fl = (e) => {
|
|
902
902
|
var t, n, o, r, s, a, i, c, d;
|
|
903
|
-
const { invert: p, toast: l, unstyled: m, interacting: h, setHeights: b, visibleToasts: g, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: N, closeButton: R, style: E, cancelButtonStyle: k, actionButtonStyle: L, className: W = "", descriptionClassName: M = "", duration: F, position: H, gap: O, expandByDefault: K, classNames: P, icons:
|
|
903
|
+
const { invert: p, toast: l, unstyled: m, interacting: h, setHeights: b, visibleToasts: g, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: N, closeButton: R, style: E, cancelButtonStyle: k, actionButtonStyle: L, className: W = "", descriptionClassName: M = "", duration: F, position: H, gap: O, expandByDefault: K, classNames: P, icons: z, closeButtonAriaLabel: U = "Close toast" } = e, [T, S] = _.useState(null), [A, D] = _.useState(null), [I, $] = _.useState(!1), [B, J] = _.useState(!1), [j, Y] = _.useState(!1), [ee, te] = _.useState(!1), [se, oe] = _.useState(!1), [ue, fe] = _.useState(0), [at, Ke] = _.useState(0), Te = _.useRef(l.duration || F || br), Kt = _.useRef(null), ye = _.useRef(null), Hc = y === 0, Vc = y + 1 <= g, Se = l.type, gt = l.dismissible !== !1, Wc = l.className || "", Uc = l.descriptionClassName || "", Xt = _.useMemo(() => v.findIndex((ne) => ne.toastId === l.id) || 0, [
|
|
904
904
|
v,
|
|
905
905
|
l.id
|
|
906
906
|
]), jc = _.useMemo(() => {
|
|
@@ -970,7 +970,7 @@ const Fl = (e) => {
|
|
|
970
970
|
const Xe = _.useCallback(() => {
|
|
971
971
|
J(!0), fe(vt.current), b((ne) => ne.filter((me) => me.toastId !== l.id)), setTimeout(() => {
|
|
972
972
|
C(l);
|
|
973
|
-
},
|
|
973
|
+
}, Dl);
|
|
974
974
|
}, [
|
|
975
975
|
l,
|
|
976
976
|
C,
|
|
@@ -1006,24 +1006,24 @@ const Fl = (e) => {
|
|
|
1006
1006
|
]);
|
|
1007
1007
|
function Kc() {
|
|
1008
1008
|
var ne;
|
|
1009
|
-
if (
|
|
1009
|
+
if (z != null && z.loading) {
|
|
1010
1010
|
var me;
|
|
1011
1011
|
return /* @__PURE__ */ _.createElement("div", {
|
|
1012
|
-
className:
|
|
1012
|
+
className: De(P == null ? void 0 : P.loader, l == null || (me = l.classNames) == null ? void 0 : me.loader, "sonner-loader"),
|
|
1013
1013
|
"data-visible": Se === "loading"
|
|
1014
|
-
},
|
|
1014
|
+
}, z.loading);
|
|
1015
1015
|
}
|
|
1016
1016
|
return /* @__PURE__ */ _.createElement(bl, {
|
|
1017
|
-
className:
|
|
1017
|
+
className: De(P == null ? void 0 : P.loader, l == null || (ne = l.classNames) == null ? void 0 : ne.loader),
|
|
1018
1018
|
visible: Se === "loading"
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
|
-
const Xc = l.icon || (
|
|
1021
|
+
const Xc = l.icon || (z == null ? void 0 : z[Se]) || gl(Se);
|
|
1022
1022
|
var mr, hr;
|
|
1023
1023
|
return /* @__PURE__ */ _.createElement("li", {
|
|
1024
1024
|
tabIndex: 0,
|
|
1025
1025
|
ref: ye,
|
|
1026
|
-
className:
|
|
1026
|
+
className: De(W, Wc, P == null ? void 0 : P.toast, l == null || (t = l.classNames) == null ? void 0 : t.toast, P == null ? void 0 : P.default, P == null ? void 0 : P[Se], l == null || (n = l.classNames) == null ? void 0 : n[Se]),
|
|
1027
1027
|
"data-sonner-toast": "",
|
|
1028
1028
|
"data-rich-colors": (mr = l.richColors) != null ? mr : N,
|
|
1029
1029
|
"data-styled": !(l.jsx || l.unstyled || m),
|
|
@@ -1067,8 +1067,8 @@ const Fl = (e) => {
|
|
|
1067
1067
|
if (ee || !gt) return;
|
|
1068
1068
|
bt.current = null;
|
|
1069
1069
|
const Ce = Number(((ne = ye.current) == null ? void 0 : ne.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Zt = Number(((me = ye.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((ge = Kt.current) == null ? void 0 : ge.getTime()), Ne = T === "x" ? Ce : Zt, Jt = Math.abs(Ne) / he;
|
|
1070
|
-
if (Math.abs(Ne) >=
|
|
1071
|
-
fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l),
|
|
1070
|
+
if (Math.abs(Ne) >= zl || Jt > 0.11) {
|
|
1071
|
+
fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l), D(T === "x" ? Ce > 0 ? "right" : "left" : Zt > 0 ? "down" : "up"), Xe(), te(!0);
|
|
1072
1072
|
return;
|
|
1073
1073
|
} else {
|
|
1074
1074
|
var Pe, Ae;
|
|
@@ -1113,19 +1113,19 @@ const Fl = (e) => {
|
|
|
1113
1113
|
} : () => {
|
|
1114
1114
|
Xe(), l.onDismiss == null || l.onDismiss.call(l, l);
|
|
1115
1115
|
},
|
|
1116
|
-
className:
|
|
1117
|
-
}, (hr =
|
|
1116
|
+
className: De(P == null ? void 0 : P.closeButton, l == null || (o = l.classNames) == null ? void 0 : o.closeButton)
|
|
1117
|
+
}, (hr = z == null ? void 0 : z.close) != null ? hr : Cl) : null, (Se || l.icon || l.promise) && l.icon !== null && ((z == null ? void 0 : z[Se]) !== null || l.icon) ? /* @__PURE__ */ _.createElement("div", {
|
|
1118
1118
|
"data-icon": "",
|
|
1119
|
-
className:
|
|
1119
|
+
className: De(P == null ? void 0 : P.icon, l == null || (r = l.classNames) == null ? void 0 : r.icon)
|
|
1120
1120
|
}, l.promise || l.type === "loading" && !l.icon ? l.icon || Kc() : null, l.type !== "loading" ? Xc : null) : null, /* @__PURE__ */ _.createElement("div", {
|
|
1121
1121
|
"data-content": "",
|
|
1122
|
-
className:
|
|
1122
|
+
className: De(P == null ? void 0 : P.content, l == null || (s = l.classNames) == null ? void 0 : s.content)
|
|
1123
1123
|
}, /* @__PURE__ */ _.createElement("div", {
|
|
1124
1124
|
"data-title": "",
|
|
1125
|
-
className:
|
|
1125
|
+
className: De(P == null ? void 0 : P.title, l == null || (a = l.classNames) == null ? void 0 : a.title)
|
|
1126
1126
|
}, l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title), l.description ? /* @__PURE__ */ _.createElement("div", {
|
|
1127
1127
|
"data-description": "",
|
|
1128
|
-
className:
|
|
1128
|
+
className: De(M, Uc, P == null ? void 0 : P.description, l == null || (i = l.classNames) == null ? void 0 : i.description)
|
|
1129
1129
|
}, typeof l.description == "function" ? l.description() : l.description) : null), /* @__PURE__ */ _.isValidElement(l.cancel) ? l.cancel : l.cancel && en(l.cancel) ? /* @__PURE__ */ _.createElement("button", {
|
|
1130
1130
|
"data-button": !0,
|
|
1131
1131
|
"data-cancel": !0,
|
|
@@ -1133,7 +1133,7 @@ const Fl = (e) => {
|
|
|
1133
1133
|
onClick: (ne) => {
|
|
1134
1134
|
en(l.cancel) && gt && (l.cancel.onClick == null || l.cancel.onClick.call(l.cancel, ne), Xe());
|
|
1135
1135
|
},
|
|
1136
|
-
className:
|
|
1136
|
+
className: De(P == null ? void 0 : P.cancelButton, l == null || (c = l.classNames) == null ? void 0 : c.cancelButton)
|
|
1137
1137
|
}, l.cancel.label) : null, /* @__PURE__ */ _.isValidElement(l.action) ? l.action : l.action && en(l.action) ? /* @__PURE__ */ _.createElement("button", {
|
|
1138
1138
|
"data-button": !0,
|
|
1139
1139
|
"data-action": !0,
|
|
@@ -1141,7 +1141,7 @@ const Fl = (e) => {
|
|
|
1141
1141
|
onClick: (ne) => {
|
|
1142
1142
|
en(l.action) && (l.action.onClick == null || l.action.onClick.call(l.action, ne), !ne.defaultPrevented && Xe());
|
|
1143
1143
|
},
|
|
1144
|
-
className:
|
|
1144
|
+
className: De(P == null ? void 0 : P.actionButton, l == null || (d = l.classNames) == null ? void 0 : d.actionButton)
|
|
1145
1145
|
}, l.action.label) : null);
|
|
1146
1146
|
};
|
|
1147
1147
|
function yr() {
|
|
@@ -1188,7 +1188,7 @@ const Hl = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1188
1188
|
].concat(k.filter((I) => I.position).map((I) => I.position)))), [
|
|
1189
1189
|
k,
|
|
1190
1190
|
s
|
|
1191
|
-
]), [W, M] = _.useState([]), [F, H] = _.useState(!1), [O, K] = _.useState(!1), [P,
|
|
1191
|
+
]), [W, M] = _.useState([]), [F, H] = _.useState(!1), [O, K] = _.useState(!1), [P, z] = _.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), U = _.useRef(null), T = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), S = _.useRef(null), A = _.useRef(!1), D = _.useCallback((I) => {
|
|
1192
1192
|
E(($) => {
|
|
1193
1193
|
var B;
|
|
1194
1194
|
return (B = $.find((J) => J.id === I.id)) != null && B.delete || we.dismiss(I.id), $.filter(({ id: J }) => J !== I.id);
|
|
@@ -1226,19 +1226,19 @@ const Hl = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1226
1226
|
R
|
|
1227
1227
|
]), _.useEffect(() => {
|
|
1228
1228
|
if (m !== "system") {
|
|
1229
|
-
|
|
1229
|
+
z(m);
|
|
1230
1230
|
return;
|
|
1231
1231
|
}
|
|
1232
|
-
if (m === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
1232
|
+
if (m === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? z("dark") : z("light")), typeof window > "u") return;
|
|
1233
1233
|
const I = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1234
1234
|
try {
|
|
1235
1235
|
I.addEventListener("change", ({ matches: $ }) => {
|
|
1236
|
-
|
|
1236
|
+
z($ ? "dark" : "light");
|
|
1237
1237
|
});
|
|
1238
1238
|
} catch {
|
|
1239
1239
|
I.addListener(({ matches: B }) => {
|
|
1240
1240
|
try {
|
|
1241
|
-
|
|
1241
|
+
z(B ? "dark" : "light");
|
|
1242
1242
|
} catch (J) {
|
|
1243
1243
|
console.error(J);
|
|
1244
1244
|
}
|
|
@@ -1340,7 +1340,7 @@ const Hl = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1340
1340
|
cancelButtonStyle: y == null ? void 0 : y.cancelButtonStyle,
|
|
1341
1341
|
actionButtonStyle: y == null ? void 0 : y.actionButtonStyle,
|
|
1342
1342
|
closeButtonAriaLabel: y == null ? void 0 : y.closeButtonAriaLabel,
|
|
1343
|
-
removeToast:
|
|
1343
|
+
removeToast: D,
|
|
1344
1344
|
toasts: k.filter((oe) => oe.position == Y.position),
|
|
1345
1345
|
heights: W.filter((oe) => oe.position == Y.position),
|
|
1346
1346
|
setHeights: M,
|
|
@@ -1801,7 +1801,7 @@ const Od = [
|
|
|
1801
1801
|
* This source code is licensed under the ISC license.
|
|
1802
1802
|
* See the LICENSE file in the root directory of this source tree.
|
|
1803
1803
|
*/
|
|
1804
|
-
const
|
|
1804
|
+
const zd = [
|
|
1805
1805
|
[
|
|
1806
1806
|
"path",
|
|
1807
1807
|
{
|
|
@@ -1809,14 +1809,14 @@ const Dd = [
|
|
|
1809
1809
|
key: "1sd12s"
|
|
1810
1810
|
}
|
|
1811
1811
|
]
|
|
1812
|
-
], Es = ae("message-circle",
|
|
1812
|
+
], Es = ae("message-circle", zd);
|
|
1813
1813
|
/**
|
|
1814
1814
|
* @license lucide-react v0.577.0 - ISC
|
|
1815
1815
|
*
|
|
1816
1816
|
* This source code is licensed under the ISC license.
|
|
1817
1817
|
* See the LICENSE file in the root directory of this source tree.
|
|
1818
1818
|
*/
|
|
1819
|
-
const
|
|
1819
|
+
const Dd = [
|
|
1820
1820
|
[
|
|
1821
1821
|
"path",
|
|
1822
1822
|
{
|
|
@@ -1824,7 +1824,7 @@ const zd = [
|
|
|
1824
1824
|
key: "18887p"
|
|
1825
1825
|
}
|
|
1826
1826
|
]
|
|
1827
|
-
],
|
|
1827
|
+
], zo = ae("message-square", Dd);
|
|
1828
1828
|
/**
|
|
1829
1829
|
* @license lucide-react v0.577.0 - ISC
|
|
1830
1830
|
*
|
|
@@ -2068,10 +2068,10 @@ const ru = (e, t) => {
|
|
|
2068
2068
|
const n = As();
|
|
2069
2069
|
for (const o in e) {
|
|
2070
2070
|
const r = e[o];
|
|
2071
|
-
|
|
2071
|
+
Do(r, n, o, t);
|
|
2072
2072
|
}
|
|
2073
2073
|
return n;
|
|
2074
|
-
},
|
|
2074
|
+
}, Do = (e, t, n, o) => {
|
|
2075
2075
|
const r = e.length;
|
|
2076
2076
|
for (let s = 0; s < r; s++) {
|
|
2077
2077
|
const a = e[s];
|
|
@@ -2092,7 +2092,7 @@ const ru = (e, t) => {
|
|
|
2092
2092
|
o.classGroupId = n;
|
|
2093
2093
|
}, pu = (e, t, n, o) => {
|
|
2094
2094
|
if (hu(e)) {
|
|
2095
|
-
|
|
2095
|
+
Do(e(o), t, n, o);
|
|
2096
2096
|
return;
|
|
2097
2097
|
}
|
|
2098
2098
|
t.validators === null && (t.validators = []), t.validators.push(su(n, e));
|
|
@@ -2100,7 +2100,7 @@ const ru = (e, t) => {
|
|
|
2100
2100
|
const r = Object.entries(e), s = r.length;
|
|
2101
2101
|
for (let a = 0; a < s; a++) {
|
|
2102
2102
|
const [i, c] = r[a];
|
|
2103
|
-
|
|
2103
|
+
Do(c, _s(t, i), n, o);
|
|
2104
2104
|
}
|
|
2105
2105
|
}, _s = (e, t) => {
|
|
2106
2106
|
let n = e;
|
|
@@ -2278,18 +2278,18 @@ const ru = (e, t) => {
|
|
|
2278
2278
|
}, Eu = [], pe = (e) => {
|
|
2279
2279
|
const t = (n) => n[e] || Eu;
|
|
2280
2280
|
return t.isThemeGetter = !0, t;
|
|
2281
|
-
}, Os = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ls = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Nu = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ru = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Tu = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Pu = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Au = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Iu = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ze = (e) => Nu.test(e), re = (e) => !!e && !Number.isNaN(Number(e)), Je = (e) => !!e && Number.isInteger(Number(e)), Xn = (e) => e.endsWith("%") && re(e.slice(0, -1)), Ue = (e) => Ru.test(e),
|
|
2281
|
+
}, Os = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ls = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Nu = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ru = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Tu = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Pu = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Au = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Iu = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ze = (e) => Nu.test(e), re = (e) => !!e && !Number.isNaN(Number(e)), Je = (e) => !!e && Number.isInteger(Number(e)), Xn = (e) => e.endsWith("%") && re(e.slice(0, -1)), Ue = (e) => Ru.test(e), zs = () => !0, _u = (e) => (
|
|
2282
2282
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2283
2283
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2284
2284
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2285
2285
|
Tu.test(e) && !Pu.test(e)
|
|
2286
|
-
), $o = () => !1, Mu = (e) => Au.test(e), Ou = (e) => Iu.test(e), Lu = (e) => !V(e) && !G(e),
|
|
2286
|
+
), $o = () => !1, Mu = (e) => Au.test(e), Ou = (e) => Iu.test(e), Lu = (e) => !V(e) && !G(e), zu = (e) => ot(e, Fs, $o), V = (e) => Os.test(e), ct = (e) => ot(e, Bs, _u), Nr = (e) => ot(e, Uu, re), Du = (e) => ot(e, Vs, zs), $u = (e) => ot(e, Hs, $o), Rr = (e) => ot(e, Ds, $o), Fu = (e) => ot(e, $s, Ou), tn = (e) => ot(e, Ws, Mu), G = (e) => Ls.test(e), Lt = (e) => mt(e, Bs), Bu = (e) => mt(e, Hs), Tr = (e) => mt(e, Ds), Hu = (e) => mt(e, Fs), Vu = (e) => mt(e, $s), nn = (e) => mt(e, Ws, !0), Wu = (e) => mt(e, Vs, !0), ot = (e, t, n) => {
|
|
2287
2287
|
const o = Os.exec(e);
|
|
2288
2288
|
return o ? o[1] ? t(o[1]) : n(o[2]) : !1;
|
|
2289
2289
|
}, mt = (e, t, n = !1) => {
|
|
2290
2290
|
const o = Ls.exec(e);
|
|
2291
2291
|
return o ? o[1] ? t(o[1]) : n : !1;
|
|
2292
|
-
},
|
|
2292
|
+
}, Ds = (e) => e === "position" || e === "percentage", $s = (e) => e === "image" || e === "url", Fs = (e) => e === "length" || e === "size" || e === "bg-size", Bs = (e) => e === "length", Uu = (e) => e === "number", Hs = (e) => e === "family-name", Vs = (e) => e === "number" || e === "weight", Ws = (e) => e === "shadow", ju = () => {
|
|
2293
2293
|
const e = pe("color"), t = pe("font"), n = pe("text"), o = pe("font-weight"), r = pe("tracking"), s = pe("leading"), a = pe("breakpoint"), i = pe("container"), c = pe("spacing"), d = pe("radius"), p = pe("shadow"), l = pe("inset-shadow"), m = pe("text-shadow"), h = pe("drop-shadow"), b = pe("blur"), g = pe("perspective"), v = pe("aspect"), y = pe("ease"), w = pe("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], C = () => [
|
|
2294
2294
|
"center",
|
|
2295
2295
|
"top",
|
|
@@ -2310,11 +2310,11 @@ const ru = (e, t) => {
|
|
|
2310
2310
|
"left-bottom"
|
|
2311
2311
|
], N = () => [...C(), G, V], R = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], k = () => [G, V, c], L = () => [Ze, "full", "auto", ...k()], W = () => [Je, "none", "subgrid", G, V], M = () => ["auto", {
|
|
2312
2312
|
span: ["full", Je, G, V]
|
|
2313
|
-
}, Je, G, V], F = () => [Je, "auto", G, V], H = () => ["auto", "min", "max", "fr", G, V], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...k()],
|
|
2313
|
+
}, Je, G, V], F = () => [Je, "auto", G, V], H = () => ["auto", "min", "max", "fr", G, V], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...k()], z = () => [Ze, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], U = () => [Ze, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...k()], T = () => [Ze, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...k()], S = () => [e, G, V], A = () => [...C(), Tr, Rr, {
|
|
2314
2314
|
position: [G, V]
|
|
2315
|
-
}],
|
|
2315
|
+
}], D = () => ["no-repeat", {
|
|
2316
2316
|
repeat: ["", "x", "y", "space", "round"]
|
|
2317
|
-
}], I = () => ["auto", "cover", "contain", Hu,
|
|
2317
|
+
}], I = () => ["auto", "cover", "contain", Hu, zu, {
|
|
2318
2318
|
size: [G, V]
|
|
2319
2319
|
}], $ = () => [Xn, Lt, ct], B = () => [
|
|
2320
2320
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -2339,7 +2339,7 @@ const ru = (e, t) => {
|
|
|
2339
2339
|
aspect: ["video"],
|
|
2340
2340
|
blur: [Ue],
|
|
2341
2341
|
breakpoint: [Ue],
|
|
2342
|
-
color: [
|
|
2342
|
+
color: [zs],
|
|
2343
2343
|
container: [Ue],
|
|
2344
2344
|
"drop-shadow": [Ue],
|
|
2345
2345
|
ease: ["in", "out", "in-out"],
|
|
@@ -3009,7 +3009,7 @@ const ru = (e, t) => {
|
|
|
3009
3009
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
3010
3010
|
*/
|
|
3011
3011
|
size: [{
|
|
3012
|
-
size:
|
|
3012
|
+
size: z()
|
|
3013
3013
|
}],
|
|
3014
3014
|
/**
|
|
3015
3015
|
* Inline Size
|
|
@@ -3058,7 +3058,7 @@ const ru = (e, t) => {
|
|
|
3058
3058
|
* @see https://tailwindcss.com/docs/width
|
|
3059
3059
|
*/
|
|
3060
3060
|
w: [{
|
|
3061
|
-
w: [i, "screen", ...
|
|
3061
|
+
w: [i, "screen", ...z()]
|
|
3062
3062
|
}],
|
|
3063
3063
|
/**
|
|
3064
3064
|
* Min-Width
|
|
@@ -3070,7 +3070,7 @@ const ru = (e, t) => {
|
|
|
3070
3070
|
"screen",
|
|
3071
3071
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
3072
3072
|
"none",
|
|
3073
|
-
...
|
|
3073
|
+
...z()
|
|
3074
3074
|
]
|
|
3075
3075
|
}],
|
|
3076
3076
|
/**
|
|
@@ -3088,7 +3088,7 @@ const ru = (e, t) => {
|
|
|
3088
3088
|
{
|
|
3089
3089
|
screen: [a]
|
|
3090
3090
|
},
|
|
3091
|
-
...
|
|
3091
|
+
...z()
|
|
3092
3092
|
]
|
|
3093
3093
|
}],
|
|
3094
3094
|
/**
|
|
@@ -3096,21 +3096,21 @@ const ru = (e, t) => {
|
|
|
3096
3096
|
* @see https://tailwindcss.com/docs/height
|
|
3097
3097
|
*/
|
|
3098
3098
|
h: [{
|
|
3099
|
-
h: ["screen", "lh", ...
|
|
3099
|
+
h: ["screen", "lh", ...z()]
|
|
3100
3100
|
}],
|
|
3101
3101
|
/**
|
|
3102
3102
|
* Min-Height
|
|
3103
3103
|
* @see https://tailwindcss.com/docs/min-height
|
|
3104
3104
|
*/
|
|
3105
3105
|
"min-h": [{
|
|
3106
|
-
"min-h": ["screen", "lh", "none", ...
|
|
3106
|
+
"min-h": ["screen", "lh", "none", ...z()]
|
|
3107
3107
|
}],
|
|
3108
3108
|
/**
|
|
3109
3109
|
* Max-Height
|
|
3110
3110
|
* @see https://tailwindcss.com/docs/max-height
|
|
3111
3111
|
*/
|
|
3112
3112
|
"max-h": [{
|
|
3113
|
-
"max-h": ["screen", "lh", ...
|
|
3113
|
+
"max-h": ["screen", "lh", ...z()]
|
|
3114
3114
|
}],
|
|
3115
3115
|
// ------------------
|
|
3116
3116
|
// --- Typography ---
|
|
@@ -3137,7 +3137,7 @@ const ru = (e, t) => {
|
|
|
3137
3137
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3138
3138
|
*/
|
|
3139
3139
|
"font-weight": [{
|
|
3140
|
-
font: [o, Wu,
|
|
3140
|
+
font: [o, Wu, Du]
|
|
3141
3141
|
}],
|
|
3142
3142
|
/**
|
|
3143
3143
|
* Font Stretch
|
|
@@ -3393,7 +3393,7 @@ const ru = (e, t) => {
|
|
|
3393
3393
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
3394
3394
|
*/
|
|
3395
3395
|
"bg-repeat": [{
|
|
3396
|
-
bg:
|
|
3396
|
+
bg: D()
|
|
3397
3397
|
}],
|
|
3398
3398
|
/**
|
|
3399
3399
|
* Background Size
|
|
@@ -4098,7 +4098,7 @@ const ru = (e, t) => {
|
|
|
4098
4098
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
4099
4099
|
*/
|
|
4100
4100
|
"mask-repeat": [{
|
|
4101
|
-
mask:
|
|
4101
|
+
mask: D()
|
|
4102
4102
|
}],
|
|
4103
4103
|
/**
|
|
4104
4104
|
* Mask Size
|
|
@@ -5260,11 +5260,11 @@ function af(e) {
|
|
|
5260
5260
|
function cf(e, t) {
|
|
5261
5261
|
return f.useReducer((n, o) => t[n][o] ?? n, e);
|
|
5262
5262
|
}
|
|
5263
|
-
var
|
|
5263
|
+
var ze = (e) => {
|
|
5264
5264
|
const { present: t, children: n } = e, o = lf(t), r = typeof n == "function" ? n({ present: o.isPresent }) : f.Children.only(n), s = ie(o.ref, df(r));
|
|
5265
5265
|
return typeof n == "function" || o.isPresent ? f.cloneElement(r, { ref: s }) : null;
|
|
5266
5266
|
};
|
|
5267
|
-
|
|
5267
|
+
ze.displayName = "Presence";
|
|
5268
5268
|
function lf(e) {
|
|
5269
5269
|
const [t, n] = f.useState(), o = f.useRef(null), r = f.useRef(e), s = f.useRef("none"), a = e ? "mounted" : "unmounted", [i, c] = cf(a, {
|
|
5270
5270
|
mounted: {
|
|
@@ -5390,7 +5390,7 @@ Js.displayName = Zs;
|
|
|
5390
5390
|
var Bo = "CollapsibleContent", Qs = f.forwardRef(
|
|
5391
5391
|
(e, t) => {
|
|
5392
5392
|
const { forceMount: n, ...o } = e, r = Fo(Bo, e.__scopeCollapsible);
|
|
5393
|
-
return /* @__PURE__ */ u(
|
|
5393
|
+
return /* @__PURE__ */ u(ze, { present: n || r.open, children: ({ present: s }) => /* @__PURE__ */ u(hf, { ...o, ref: t, present: s }) });
|
|
5394
5394
|
}
|
|
5395
5395
|
);
|
|
5396
5396
|
Qs.displayName = Bo;
|
|
@@ -5608,7 +5608,7 @@ var Zn = "focusScope.autoFocusOnMount", Jn = "focusScope.autoFocusOnUnmount", Or
|
|
|
5608
5608
|
}
|
|
5609
5609
|
}, [o, i, h.paused]), f.useEffect(() => {
|
|
5610
5610
|
if (i) {
|
|
5611
|
-
|
|
5611
|
+
zr.add(h);
|
|
5612
5612
|
const g = document.activeElement;
|
|
5613
5613
|
if (!i.contains(g)) {
|
|
5614
5614
|
const y = new CustomEvent(Zn, Or);
|
|
@@ -5617,7 +5617,7 @@ var Zn = "focusScope.autoFocusOnMount", Jn = "focusScope.autoFocusOnUnmount", Or
|
|
|
5617
5617
|
return () => {
|
|
5618
5618
|
i.removeEventListener(Zn, d), setTimeout(() => {
|
|
5619
5619
|
const y = new CustomEvent(Jn, Or);
|
|
5620
|
-
i.addEventListener(Jn, p), i.dispatchEvent(y), y.defaultPrevented || Qe(g ?? document.body, { select: !0 }), i.removeEventListener(Jn, p),
|
|
5620
|
+
i.addEventListener(Jn, p), i.dispatchEvent(y), y.defaultPrevented || Qe(g ?? document.body, { select: !0 }), i.removeEventListener(Jn, p), zr.remove(h);
|
|
5621
5621
|
}, 0);
|
|
5622
5622
|
};
|
|
5623
5623
|
}
|
|
@@ -5677,21 +5677,21 @@ function Qe(e, { select: t = !1 } = {}) {
|
|
|
5677
5677
|
e.focus({ preventScroll: !0 }), e !== n && Af(e) && t && e.select();
|
|
5678
5678
|
}
|
|
5679
5679
|
}
|
|
5680
|
-
var
|
|
5680
|
+
var zr = If();
|
|
5681
5681
|
function If() {
|
|
5682
5682
|
let e = [];
|
|
5683
5683
|
return {
|
|
5684
5684
|
add(t) {
|
|
5685
5685
|
const n = e[0];
|
|
5686
|
-
t !== n && (n == null || n.pause()), e =
|
|
5686
|
+
t !== n && (n == null || n.pause()), e = Dr(e, t), e.unshift(t);
|
|
5687
5687
|
},
|
|
5688
5688
|
remove(t) {
|
|
5689
5689
|
var n;
|
|
5690
|
-
e =
|
|
5690
|
+
e = Dr(e, t), (n = e[0]) == null || n.resume();
|
|
5691
5691
|
}
|
|
5692
5692
|
};
|
|
5693
5693
|
}
|
|
5694
|
-
function
|
|
5694
|
+
function Dr(e, t) {
|
|
5695
5695
|
const n = [...e], o = n.indexOf(t);
|
|
5696
5696
|
return o !== -1 && n.splice(o, 1), n;
|
|
5697
5697
|
}
|
|
@@ -5741,7 +5741,7 @@ function Lf(e, t, n) {
|
|
|
5741
5741
|
(s || !(o in t)) && (s || (s = Array.prototype.slice.call(t, 0, o)), s[o] = t[o]);
|
|
5742
5742
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
5743
5743
|
}
|
|
5744
|
-
var dn = "right-scroll-bar-position", un = "width-before-scroll-bar",
|
|
5744
|
+
var dn = "right-scroll-bar-position", un = "width-before-scroll-bar", zf = "with-scroll-bars-hidden", Df = "--removed-body-scroll-bar-size";
|
|
5745
5745
|
function eo(e, t) {
|
|
5746
5746
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
5747
5747
|
}
|
|
@@ -5952,7 +5952,7 @@ var Kf = function() {
|
|
|
5952
5952
|
}, ep = ia(), Et = "data-scroll-locked", tp = function(e, t, n, o) {
|
|
5953
5953
|
var r = e.left, s = e.top, a = e.right, i = e.gap;
|
|
5954
5954
|
return n === void 0 && (n = "margin"), `
|
|
5955
|
-
.`.concat(
|
|
5955
|
+
.`.concat(zf, ` {
|
|
5956
5956
|
overflow: hidden `).concat(o, `;
|
|
5957
5957
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
5958
5958
|
}
|
|
@@ -5990,7 +5990,7 @@ var Kf = function() {
|
|
|
5990
5990
|
}
|
|
5991
5991
|
|
|
5992
5992
|
body[`).concat(Et, `] {
|
|
5993
|
-
`).concat(
|
|
5993
|
+
`).concat(Df, ": ").concat(i, `px;
|
|
5994
5994
|
}
|
|
5995
5995
|
`);
|
|
5996
5996
|
}, Br = function() {
|
|
@@ -6538,7 +6538,7 @@ var Sa = "CheckboxIndicator", Ca = f.forwardRef(
|
|
|
6538
6538
|
(e, t) => {
|
|
6539
6539
|
const { __scopeCheckbox: n, forceMount: o, ...r } = e, s = jo(Sa, n);
|
|
6540
6540
|
return /* @__PURE__ */ u(
|
|
6541
|
-
|
|
6541
|
+
ze,
|
|
6542
6542
|
{
|
|
6543
6543
|
present: o || et(s.checked) || s.checked === !0,
|
|
6544
6544
|
children: /* @__PURE__ */ u(
|
|
@@ -6624,10 +6624,10 @@ function et(e) {
|
|
|
6624
6624
|
function Na(e) {
|
|
6625
6625
|
return et(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
6626
6626
|
}
|
|
6627
|
-
const
|
|
6627
|
+
const zp = ["top", "right", "bottom", "left"], tt = Math.min, ke = Math.max, hn = Math.round, ln = Math.floor, He = (e) => ({
|
|
6628
6628
|
x: e,
|
|
6629
6629
|
y: e
|
|
6630
|
-
}),
|
|
6630
|
+
}), Dp = {
|
|
6631
6631
|
left: "right",
|
|
6632
6632
|
right: "left",
|
|
6633
6633
|
bottom: "top",
|
|
@@ -6691,7 +6691,7 @@ function Wp(e, t, n, o) {
|
|
|
6691
6691
|
}
|
|
6692
6692
|
function gn(e) {
|
|
6693
6693
|
const t = Ye(e);
|
|
6694
|
-
return
|
|
6694
|
+
return Dp[t] + e.slice(t.length);
|
|
6695
6695
|
}
|
|
6696
6696
|
function Up(e) {
|
|
6697
6697
|
return {
|
|
@@ -6909,14 +6909,14 @@ const Gp = 50, Yp = async (e, t, n) => {
|
|
|
6909
6909
|
}, h = qo(r), b = Yo(h), g = await a.getDimensions(d), v = h === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", C = s.reference[b] + s.reference[h] - m[h] - s.floating[b], N = m[h] - s.reference[h], R = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(d));
|
|
6910
6910
|
let E = R ? R[x] : 0;
|
|
6911
6911
|
(!E || !await (a.isElement == null ? void 0 : a.isElement(R))) && (E = i.floating[x] || s.floating[b]);
|
|
6912
|
-
const k = C / 2 - N / 2, L = E / 2 - g[b] / 2 - 1, W = tt(l[y], L), M = tt(l[w], L), F = W, H = E - g[b] - M, O = E / 2 - g[b] / 2 + k, K = yo(F, O, H), P = !c.arrow && It(r) != null && O !== K && s.reference[b] / 2 - (O < F ? W : M) - g[b] / 2 < 0,
|
|
6912
|
+
const k = C / 2 - N / 2, L = E / 2 - g[b] / 2 - 1, W = tt(l[y], L), M = tt(l[w], L), F = W, H = E - g[b] - M, O = E / 2 - g[b] / 2 + k, K = yo(F, O, H), P = !c.arrow && It(r) != null && O !== K && s.reference[b] / 2 - (O < F ? W : M) - g[b] / 2 < 0, z = P ? O < F ? O - F : O - H : 0;
|
|
6913
6913
|
return {
|
|
6914
|
-
[h]: m[h] +
|
|
6914
|
+
[h]: m[h] + z,
|
|
6915
6915
|
data: {
|
|
6916
6916
|
[h]: K,
|
|
6917
|
-
centerOffset: O - K -
|
|
6917
|
+
centerOffset: O - K - z,
|
|
6918
6918
|
...P && {
|
|
6919
|
-
alignmentOffset:
|
|
6919
|
+
alignmentOffset: z
|
|
6920
6920
|
}
|
|
6921
6921
|
},
|
|
6922
6922
|
reset: P
|
|
@@ -6972,12 +6972,12 @@ const Gp = 50, Yp = async (e, t, n) => {
|
|
|
6972
6972
|
placement: K
|
|
6973
6973
|
}
|
|
6974
6974
|
};
|
|
6975
|
-
let P = (F = W.filter((
|
|
6975
|
+
let P = (F = W.filter((z) => z.overflows[0] <= 0).sort((z, U) => z.overflows[1] - U.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
6976
6976
|
if (!P)
|
|
6977
6977
|
switch (h) {
|
|
6978
6978
|
case "bestFit": {
|
|
6979
6979
|
var H;
|
|
6980
|
-
const
|
|
6980
|
+
const z = (H = W.filter((U) => {
|
|
6981
6981
|
if (R) {
|
|
6982
6982
|
const T = Be(U.placement);
|
|
6983
6983
|
return T === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -6986,7 +6986,7 @@ const Gp = 50, Yp = async (e, t, n) => {
|
|
|
6986
6986
|
}
|
|
6987
6987
|
return !0;
|
|
6988
6988
|
}).map((U) => [U.placement, U.overflows.filter((T) => T > 0).reduce((T, S) => T + S, 0)]).sort((U, T) => U[1] - T[1])[0]) == null ? void 0 : H[0];
|
|
6989
|
-
|
|
6989
|
+
z && (P = z);
|
|
6990
6990
|
break;
|
|
6991
6991
|
}
|
|
6992
6992
|
case "initialPlacement":
|
|
@@ -7013,7 +7013,7 @@ function Xr(e, t) {
|
|
|
7013
7013
|
};
|
|
7014
7014
|
}
|
|
7015
7015
|
function Zr(e) {
|
|
7016
|
-
return
|
|
7016
|
+
return zp.some((t) => e[t] >= 0);
|
|
7017
7017
|
}
|
|
7018
7018
|
const Xp = function(e) {
|
|
7019
7019
|
return e === void 0 && (e = {}), {
|
|
@@ -7650,7 +7650,7 @@ const ym = {
|
|
|
7650
7650
|
isElement: Oe,
|
|
7651
7651
|
isRTL: bm
|
|
7652
7652
|
};
|
|
7653
|
-
function
|
|
7653
|
+
function za(e, t) {
|
|
7654
7654
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
7655
7655
|
}
|
|
7656
7656
|
function wm(e, t) {
|
|
@@ -7684,7 +7684,7 @@ function wm(e, t) {
|
|
|
7684
7684
|
a(!1, 1e-7);
|
|
7685
7685
|
}, 1e3);
|
|
7686
7686
|
}
|
|
7687
|
-
E === 1 && !
|
|
7687
|
+
E === 1 && !za(d, e.getBoundingClientRect()) && a(), C = !1;
|
|
7688
7688
|
}
|
|
7689
7689
|
try {
|
|
7690
7690
|
n = new IntersectionObserver(N, {
|
|
@@ -7726,7 +7726,7 @@ function xm(e, t, n, o) {
|
|
|
7726
7726
|
c && v();
|
|
7727
7727
|
function v() {
|
|
7728
7728
|
const y = ut(e);
|
|
7729
|
-
g && !
|
|
7729
|
+
g && !za(g, y) && n(), g = y, b = requestAnimationFrame(v);
|
|
7730
7730
|
}
|
|
7731
7731
|
return n(), () => {
|
|
7732
7732
|
var y;
|
|
@@ -7780,11 +7780,11 @@ function bn(e, t) {
|
|
|
7780
7780
|
}
|
|
7781
7781
|
return e !== e && t !== t;
|
|
7782
7782
|
}
|
|
7783
|
-
function
|
|
7783
|
+
function Da(e) {
|
|
7784
7784
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
7785
7785
|
}
|
|
7786
7786
|
function os(e, t) {
|
|
7787
|
-
const n =
|
|
7787
|
+
const n = Da(e);
|
|
7788
7788
|
return Math.round(t * n) / n;
|
|
7789
7789
|
}
|
|
7790
7790
|
function co(e) {
|
|
@@ -7866,7 +7866,7 @@ function Im(e) {
|
|
|
7866
7866
|
}), [w, x]), P = f.useMemo(() => ({
|
|
7867
7867
|
reference: C,
|
|
7868
7868
|
floating: N
|
|
7869
|
-
}), [C, N]),
|
|
7869
|
+
}), [C, N]), z = f.useMemo(() => {
|
|
7870
7870
|
const U = {
|
|
7871
7871
|
position: n,
|
|
7872
7872
|
left: 0,
|
|
@@ -7878,7 +7878,7 @@ function Im(e) {
|
|
|
7878
7878
|
return i ? {
|
|
7879
7879
|
...U,
|
|
7880
7880
|
transform: "translate(" + T + "px, " + S + "px)",
|
|
7881
|
-
...
|
|
7881
|
+
...Da(P.floating) >= 1.5 && {
|
|
7882
7882
|
willChange: "transform"
|
|
7883
7883
|
}
|
|
7884
7884
|
} : {
|
|
@@ -7892,8 +7892,8 @@ function Im(e) {
|
|
|
7892
7892
|
update: H,
|
|
7893
7893
|
refs: K,
|
|
7894
7894
|
elements: P,
|
|
7895
|
-
floatingStyles:
|
|
7896
|
-
}), [p, H, K, P,
|
|
7895
|
+
floatingStyles: z
|
|
7896
|
+
}), [p, H, K, P, z]);
|
|
7897
7897
|
}
|
|
7898
7898
|
const _m = (e) => {
|
|
7899
7899
|
function t(n) {
|
|
@@ -7933,14 +7933,14 @@ const _m = (e) => {
|
|
|
7933
7933
|
}, Lm = (e, t) => ({
|
|
7934
7934
|
fn: Rm(e).fn,
|
|
7935
7935
|
options: [e, t]
|
|
7936
|
-
}),
|
|
7936
|
+
}), zm = (e, t) => {
|
|
7937
7937
|
const n = km(e);
|
|
7938
7938
|
return {
|
|
7939
7939
|
name: n.name,
|
|
7940
7940
|
fn: n.fn,
|
|
7941
7941
|
options: [e, t]
|
|
7942
7942
|
};
|
|
7943
|
-
},
|
|
7943
|
+
}, Dm = (e, t) => {
|
|
7944
7944
|
const n = Em(e);
|
|
7945
7945
|
return {
|
|
7946
7946
|
name: n.name,
|
|
@@ -8016,7 +8016,7 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8016
8016
|
boundary: M.filter(Gm),
|
|
8017
8017
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
8018
8018
|
altBoundary: F
|
|
8019
|
-
}, { refs: O, floatingStyles: K, placement: P, isPositioned:
|
|
8019
|
+
}, { refs: O, floatingStyles: K, placement: P, isPositioned: z, middlewareData: U } = Im({
|
|
8020
8020
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
8021
8021
|
strategy: "fixed",
|
|
8022
8022
|
placement: L,
|
|
@@ -8034,8 +8034,8 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8034
8034
|
limiter: l === "partial" ? Lm() : void 0,
|
|
8035
8035
|
...H
|
|
8036
8036
|
}),
|
|
8037
|
-
c &&
|
|
8038
|
-
|
|
8037
|
+
c && zm({ ...H }),
|
|
8038
|
+
Dm({
|
|
8039
8039
|
...H,
|
|
8040
8040
|
apply: ({ elements: ue, rects: fe, availableWidth: at, availableHeight: Ke }) => {
|
|
8041
8041
|
const { width: Te, height: Kt } = fe.reference, ye = ue.floating.style;
|
|
@@ -8048,9 +8048,9 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8048
8048
|
]
|
|
8049
8049
|
}), [T, S] = Ya(P), A = be(b);
|
|
8050
8050
|
de(() => {
|
|
8051
|
-
|
|
8052
|
-
}, [
|
|
8053
|
-
const
|
|
8051
|
+
z && (A == null || A());
|
|
8052
|
+
}, [z, A]);
|
|
8053
|
+
const D = (j = U.arrow) == null ? void 0 : j.x, I = (Y = U.arrow) == null ? void 0 : Y.y, $ = ((ee = U.arrow) == null ? void 0 : ee.centerOffset) !== 0, [B, J] = f.useState();
|
|
8054
8054
|
return de(() => {
|
|
8055
8055
|
y && J(window.getComputedStyle(y).zIndex);
|
|
8056
8056
|
}, [y]), /* @__PURE__ */ u(
|
|
@@ -8060,7 +8060,7 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8060
8060
|
"data-radix-popper-content-wrapper": "",
|
|
8061
8061
|
style: {
|
|
8062
8062
|
...K,
|
|
8063
|
-
transform:
|
|
8063
|
+
transform: z ? K.transform : "translate(0, -200%)",
|
|
8064
8064
|
// keep off the page when measuring
|
|
8065
8065
|
minWidth: "max-content",
|
|
8066
8066
|
zIndex: B,
|
|
@@ -8083,7 +8083,7 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8083
8083
|
scope: n,
|
|
8084
8084
|
placedSide: T,
|
|
8085
8085
|
onArrowChange: N,
|
|
8086
|
-
arrowX:
|
|
8086
|
+
arrowX: D,
|
|
8087
8087
|
arrowY: I,
|
|
8088
8088
|
shouldHideArrow: $,
|
|
8089
8089
|
children: /* @__PURE__ */ u(
|
|
@@ -8097,7 +8097,7 @@ var Qo = "PopperContent", [Wm, Um] = Fa(Qo), Ua = f.forwardRef(
|
|
|
8097
8097
|
...g.style,
|
|
8098
8098
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
8099
8099
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
8100
|
-
animation:
|
|
8100
|
+
animation: z ? void 0 : "none"
|
|
8101
8101
|
}
|
|
8102
8102
|
}
|
|
8103
8103
|
)
|
|
@@ -8176,7 +8176,7 @@ function Ya(e) {
|
|
|
8176
8176
|
const [t, n = "center"] = e.split("-");
|
|
8177
8177
|
return [t, n];
|
|
8178
8178
|
}
|
|
8179
|
-
var qa = Ha, Ka = Wa, Xa = Ua, Za = Ga, lo = "rovingFocusGroup.onEntryFocus", qm = { bubbles: !1, cancelable: !0 }, Yt = "RovingFocusGroup", [So, Ja, Km] = Ks(Yt), [Xm,
|
|
8179
|
+
var qa = Ha, Ka = Wa, Xa = Ua, Za = Ga, lo = "rovingFocusGroup.onEntryFocus", qm = { bubbles: !1, cancelable: !0 }, Yt = "RovingFocusGroup", [So, Ja, Km] = Ks(Yt), [Xm, zn] = xe(
|
|
8180
8180
|
Yt,
|
|
8181
8181
|
[Km]
|
|
8182
8182
|
), [Zm, Jm] = Xm(Yt), Qa = f.forwardRef(
|
|
@@ -8481,7 +8481,7 @@ ui.displayName = nr;
|
|
|
8481
8481
|
var fi = "RadioIndicator", pi = f.forwardRef(
|
|
8482
8482
|
(e, t) => {
|
|
8483
8483
|
const { __scopeRadio: n, forceMount: o, ...r } = e, s = gh(fi, n);
|
|
8484
|
-
return /* @__PURE__ */ u(
|
|
8484
|
+
return /* @__PURE__ */ u(ze, { present: o || s.checked, children: /* @__PURE__ */ u(
|
|
8485
8485
|
Z.span,
|
|
8486
8486
|
{
|
|
8487
8487
|
"data-state": hi(s.checked),
|
|
@@ -8538,10 +8538,10 @@ mi.displayName = vh;
|
|
|
8538
8538
|
function hi(e) {
|
|
8539
8539
|
return e ? "checked" : "unchecked";
|
|
8540
8540
|
}
|
|
8541
|
-
var bh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"],
|
|
8542
|
-
|
|
8541
|
+
var bh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Dn = "RadioGroup", [yh] = xe(Dn, [
|
|
8542
|
+
zn,
|
|
8543
8543
|
di
|
|
8544
|
-
]), gi =
|
|
8544
|
+
]), gi = zn(), vi = di(), [wh, xh] = yh(Dn), bi = f.forwardRef(
|
|
8545
8545
|
(e, t) => {
|
|
8546
8546
|
const {
|
|
8547
8547
|
__scopeRadioGroup: n,
|
|
@@ -8559,7 +8559,7 @@ var bh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
|
|
|
8559
8559
|
prop: s,
|
|
8560
8560
|
defaultProp: r ?? null,
|
|
8561
8561
|
onChange: l,
|
|
8562
|
-
caller:
|
|
8562
|
+
caller: Dn
|
|
8563
8563
|
});
|
|
8564
8564
|
return /* @__PURE__ */ u(
|
|
8565
8565
|
wh,
|
|
@@ -8596,7 +8596,7 @@ var bh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
|
|
|
8596
8596
|
);
|
|
8597
8597
|
}
|
|
8598
8598
|
);
|
|
8599
|
-
bi.displayName =
|
|
8599
|
+
bi.displayName = Dn;
|
|
8600
8600
|
var yi = "RadioGroupItem", wi = f.forwardRef(
|
|
8601
8601
|
(e, t) => {
|
|
8602
8602
|
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = xh(yi, n), a = s.disabled || o, i = gi(n), c = vi(n), d = f.useRef(null), p = ie(t, d), l = s.value === r.value, m = f.useRef(!1);
|
|
@@ -8767,7 +8767,7 @@ var Th = f.forwardRef((e, t) => {
|
|
|
8767
8767
|
window.clearTimeout(c), i.removeEventListener("pointerenter", d), i.removeEventListener("pointerleave", p);
|
|
8768
8768
|
};
|
|
8769
8769
|
}
|
|
8770
|
-
}, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ u(
|
|
8770
|
+
}, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ u(ze, { present: n || s, children: /* @__PURE__ */ u(
|
|
8771
8771
|
Ri,
|
|
8772
8772
|
{
|
|
8773
8773
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -8809,7 +8809,7 @@ var Th = f.forwardRef((e, t) => {
|
|
|
8809
8809
|
};
|
|
8810
8810
|
return d.addEventListener("scroll", m), () => d.removeEventListener("scroll", m);
|
|
8811
8811
|
}
|
|
8812
|
-
}, [r.viewport, s, c, a]), /* @__PURE__ */ u(
|
|
8812
|
+
}, [r.viewport, s, c, a]), /* @__PURE__ */ u(ze, { present: n || i !== "hidden", children: /* @__PURE__ */ u(
|
|
8813
8813
|
rr,
|
|
8814
8814
|
{
|
|
8815
8815
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
@@ -8826,7 +8826,7 @@ var Th = f.forwardRef((e, t) => {
|
|
|
8826
8826
|
a(i ? d : p);
|
|
8827
8827
|
}
|
|
8828
8828
|
}, 10);
|
|
8829
|
-
return Pt(n.viewport, c), Pt(n.content, c), /* @__PURE__ */ u(
|
|
8829
|
+
return Pt(n.viewport, c), Pt(n.content, c), /* @__PURE__ */ u(ze, { present: o || s, children: /* @__PURE__ */ u(
|
|
8830
8830
|
rr,
|
|
8831
8831
|
{
|
|
8832
8832
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -9024,7 +9024,7 @@ var Th = f.forwardRef((e, t) => {
|
|
|
9024
9024
|
}), wn = "ScrollAreaThumb", Ai = f.forwardRef(
|
|
9025
9025
|
(e, t) => {
|
|
9026
9026
|
const { forceMount: n, ...o } = e, r = Ti(wn, e.__scopeScrollArea);
|
|
9027
|
-
return /* @__PURE__ */ u(
|
|
9027
|
+
return /* @__PURE__ */ u(ze, { present: n || r.hasThumb, children: /* @__PURE__ */ u(Mh, { ref: t, ...o }) });
|
|
9028
9028
|
}
|
|
9029
9029
|
), Mh = f.forwardRef(
|
|
9030
9030
|
(e, t) => {
|
|
@@ -9039,7 +9039,7 @@ var Th = f.forwardRef((e, t) => {
|
|
|
9039
9039
|
if (l) {
|
|
9040
9040
|
const m = () => {
|
|
9041
9041
|
if (p(), !d.current) {
|
|
9042
|
-
const h =
|
|
9042
|
+
const h = zh(l, i);
|
|
9043
9043
|
d.current = h, i();
|
|
9044
9044
|
}
|
|
9045
9045
|
};
|
|
@@ -9129,7 +9129,7 @@ function Mi(e, t) {
|
|
|
9129
9129
|
function Oi(e, t) {
|
|
9130
9130
|
return e > 0 && e < t;
|
|
9131
9131
|
}
|
|
9132
|
-
var
|
|
9132
|
+
var zh = (e, t = () => {
|
|
9133
9133
|
}) => {
|
|
9134
9134
|
let n = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
9135
9135
|
return (function r() {
|
|
@@ -9157,7 +9157,7 @@ function Pt(e, t) {
|
|
|
9157
9157
|
}
|
|
9158
9158
|
}, [e, n]);
|
|
9159
9159
|
}
|
|
9160
|
-
var
|
|
9160
|
+
var Dh = Ci, $h = Ei, Fh = Ii, Bh = [" ", "Enter", "ArrowUp", "ArrowDown"], Hh = [" ", "Enter"], ft = "Select", [Bn, Hn, Vh] = Ks(ft), [Mt] = xe(ft, [
|
|
9161
9161
|
Vh,
|
|
9162
9162
|
Ln
|
|
9163
9163
|
]), Vn = Ln(), [Wh, rt] = Mt(ft), [Uh, jh] = Mt(ft), Li = (e) => {
|
|
@@ -9212,11 +9212,11 @@ var zh = Ci, $h = Ei, Fh = Ii, Bh = [" ", "Enter", "ArrowUp", "ArrowDown"], Hh =
|
|
|
9212
9212
|
{
|
|
9213
9213
|
scope: e.__scopeSelect,
|
|
9214
9214
|
onNativeOptionAdd: f.useCallback((P) => {
|
|
9215
|
-
O((
|
|
9215
|
+
O((z) => new Set(z).add(P));
|
|
9216
9216
|
}, []),
|
|
9217
9217
|
onNativeOptionRemove: f.useCallback((P) => {
|
|
9218
|
-
O((
|
|
9219
|
-
const U = new Set(
|
|
9218
|
+
O((z) => {
|
|
9219
|
+
const U = new Set(z);
|
|
9220
9220
|
return U.delete(P), U;
|
|
9221
9221
|
});
|
|
9222
9222
|
}, []),
|
|
@@ -9247,9 +9247,9 @@ var zh = Ci, $h = Ei, Fh = Ii, Bh = [" ", "Enter", "ArrowUp", "ArrowDown"], Hh =
|
|
|
9247
9247
|
) });
|
|
9248
9248
|
};
|
|
9249
9249
|
Li.displayName = ft;
|
|
9250
|
-
var
|
|
9250
|
+
var zi = "SelectTrigger", Di = f.forwardRef(
|
|
9251
9251
|
(e, t) => {
|
|
9252
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = Vn(n), a = rt(
|
|
9252
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = Vn(n), a = rt(zi, n), i = a.disabled || o, c = ie(t, a.onTriggerChange), d = Hn(n), p = f.useRef("touch"), [l, m, h] = sc((g) => {
|
|
9253
9253
|
const v = d().filter((x) => !x.disabled), y = v.find((x) => x.value === a.value), w = ac(v, g, y);
|
|
9254
9254
|
w !== void 0 && a.onValueChange(w.value);
|
|
9255
9255
|
}), b = (g) => {
|
|
@@ -9290,7 +9290,7 @@ var Di = "SelectTrigger", zi = f.forwardRef(
|
|
|
9290
9290
|
) });
|
|
9291
9291
|
}
|
|
9292
9292
|
);
|
|
9293
|
-
|
|
9293
|
+
Di.displayName = zi;
|
|
9294
9294
|
var $i = "SelectValue", Fi = f.forwardRef(
|
|
9295
9295
|
(e, t) => {
|
|
9296
9296
|
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: a = "", ...i } = e, c = rt($i, n), { onValueNodeHasChildrenChange: d } = c, p = s !== void 0, l = ie(t, c.onValueNodeChange);
|
|
@@ -9368,13 +9368,13 @@ var Ie = 10, [Wi, st] = Mt(pt), qh = "SelectContentImpl", Kh = /* @__PURE__ */ H
|
|
|
9368
9368
|
if (oe === se || (oe == null || oe.scrollIntoView({ block: "nearest" }), oe === Y && N && (N.scrollTop = 0), oe === te && N && (N.scrollTop = N.scrollHeight), oe == null || oe.focus(), document.activeElement !== se)) return;
|
|
9369
9369
|
},
|
|
9370
9370
|
[F, N]
|
|
9371
|
-
),
|
|
9371
|
+
), z = f.useCallback(
|
|
9372
9372
|
() => P([k, x]),
|
|
9373
9373
|
[P, k, x]
|
|
9374
9374
|
);
|
|
9375
9375
|
f.useEffect(() => {
|
|
9376
|
-
H &&
|
|
9377
|
-
}, [H,
|
|
9376
|
+
H && z();
|
|
9377
|
+
}, [H, z]);
|
|
9378
9378
|
const { onOpenChange: U, triggerPointerDownPosRef: T } = w;
|
|
9379
9379
|
f.useEffect(() => {
|
|
9380
9380
|
if (x) {
|
|
@@ -9401,7 +9401,7 @@ var Ie = 10, [Wi, st] = Mt(pt), qh = "SelectContentImpl", Kh = /* @__PURE__ */ H
|
|
|
9401
9401
|
const [S, A] = sc((j) => {
|
|
9402
9402
|
const Y = F().filter((se) => !se.disabled), ee = Y.find((se) => se.ref.current === document.activeElement), te = ac(Y, j, ee);
|
|
9403
9403
|
te && setTimeout(() => te.ref.current.focus());
|
|
9404
|
-
}),
|
|
9404
|
+
}), D = f.useCallback(
|
|
9405
9405
|
(j, Y, ee) => {
|
|
9406
9406
|
const te = !K.current && !ee;
|
|
9407
9407
|
(w.value !== void 0 && w.value === Y || te) && (L(j), te && (K.current = !0));
|
|
@@ -9432,11 +9432,11 @@ var Ie = 10, [Wi, st] = Mt(pt), qh = "SelectContentImpl", Kh = /* @__PURE__ */ H
|
|
|
9432
9432
|
content: x,
|
|
9433
9433
|
viewport: N,
|
|
9434
9434
|
onViewportChange: R,
|
|
9435
|
-
itemRefCallback:
|
|
9435
|
+
itemRefCallback: D,
|
|
9436
9436
|
selectedItem: k,
|
|
9437
9437
|
onItemLeave: I,
|
|
9438
9438
|
itemTextRefCallback: $,
|
|
9439
|
-
focusSelectedItem:
|
|
9439
|
+
focusSelectedItem: z,
|
|
9440
9440
|
selectedItemText: W,
|
|
9441
9441
|
position: o,
|
|
9442
9442
|
isPositioned: H,
|
|
@@ -9526,14 +9526,14 @@ var Xh = "SelectItemAlignedPosition", ji = f.forwardRef((e, t) => {
|
|
|
9526
9526
|
]);
|
|
9527
9527
|
i.style.minWidth = fe + "px", i.style.right = Te + "px";
|
|
9528
9528
|
}
|
|
9529
|
-
const M = m(), F = window.innerHeight - Ie * 2, H = g.scrollHeight, O = window.getComputedStyle(d), K = parseInt(O.borderTopWidth, 10), P = parseInt(O.paddingTop, 10),
|
|
9529
|
+
const M = m(), F = window.innerHeight - Ie * 2, H = g.scrollHeight, O = window.getComputedStyle(d), K = parseInt(O.borderTopWidth, 10), P = parseInt(O.paddingTop, 10), z = parseInt(O.borderBottomWidth, 10), U = parseInt(O.paddingBottom, 10), T = K + P + H + U + z, S = Math.min(v.offsetHeight * 5, T), A = window.getComputedStyle(g), D = parseInt(A.paddingTop, 10), I = parseInt(A.paddingBottom, 10), $ = E.top + E.height / 2 - Ie, B = F - $, J = v.offsetHeight / 2, j = v.offsetTop + J, Y = K + P + j, ee = T - Y;
|
|
9530
9530
|
if (Y <= $) {
|
|
9531
9531
|
const se = M.length > 0 && v === M[M.length - 1].ref.current;
|
|
9532
9532
|
i.style.bottom = "0px";
|
|
9533
9533
|
const oe = d.clientHeight - g.offsetTop - g.offsetHeight, ue = Math.max(
|
|
9534
9534
|
B,
|
|
9535
9535
|
J + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
9536
|
-
(se ? I : 0) + oe +
|
|
9536
|
+
(se ? I : 0) + oe + z
|
|
9537
9537
|
), fe = Y + ue;
|
|
9538
9538
|
i.style.height = fe + "px";
|
|
9539
9539
|
} else {
|
|
@@ -9542,7 +9542,7 @@ var Xh = "SelectItemAlignedPosition", ji = f.forwardRef((e, t) => {
|
|
|
9542
9542
|
const ue = Math.max(
|
|
9543
9543
|
$,
|
|
9544
9544
|
K + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
9545
|
-
(se ?
|
|
9545
|
+
(se ? D : 0) + J
|
|
9546
9546
|
) + ee;
|
|
9547
9547
|
i.style.height = ue + "px", g.scrollTop = Y - $ + g.offsetTop;
|
|
9548
9548
|
}
|
|
@@ -9789,9 +9789,9 @@ var Sn = "SelectItem", [og, Ki] = Mt(Sn), Xi = f.forwardRef(
|
|
|
9789
9789
|
}
|
|
9790
9790
|
);
|
|
9791
9791
|
Xi.displayName = Sn;
|
|
9792
|
-
var
|
|
9792
|
+
var zt = "SelectItemText", Zi = f.forwardRef(
|
|
9793
9793
|
(e, t) => {
|
|
9794
|
-
const { __scopeSelect: n, className: o, style: r, ...s } = e, a = rt(
|
|
9794
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, a = rt(zt, n), i = st(zt, n), c = Ki(zt, n), d = jh(zt, n), [p, l] = f.useState(null), m = ie(
|
|
9795
9795
|
t,
|
|
9796
9796
|
(y) => l(y),
|
|
9797
9797
|
c.onItemTextChange,
|
|
@@ -9809,7 +9809,7 @@ var Dt = "SelectItemText", Zi = f.forwardRef(
|
|
|
9809
9809
|
] });
|
|
9810
9810
|
}
|
|
9811
9811
|
);
|
|
9812
|
-
Zi.displayName =
|
|
9812
|
+
Zi.displayName = zt;
|
|
9813
9813
|
var Ji = "SelectItemIndicator", Qi = f.forwardRef(
|
|
9814
9814
|
(e, t) => {
|
|
9815
9815
|
const { __scopeSelect: n, ...o } = e;
|
|
@@ -9961,7 +9961,7 @@ function ac(e, t, n) {
|
|
|
9961
9961
|
function cg(e, t) {
|
|
9962
9962
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
9963
9963
|
}
|
|
9964
|
-
var lg = Li, dg =
|
|
9964
|
+
var lg = Li, dg = Di, ug = Fi, fg = Bi, pg = Hi, mg = Vi, hg = Gi, gg = Xi, vg = Zi, bg = Qi, yg = ec, wg = tc, xg = "Separator", is = "horizontal", Sg = ["horizontal", "vertical"], ic = f.forwardRef((e, t) => {
|
|
9965
9965
|
const { decorative: n, orientation: o = is, ...r } = e, s = Cg(o) ? o : is, i = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
9966
9966
|
return /* @__PURE__ */ u(
|
|
9967
9967
|
Z.div,
|
|
@@ -10094,8 +10094,8 @@ function fc(e) {
|
|
|
10094
10094
|
return e ? "checked" : "unchecked";
|
|
10095
10095
|
}
|
|
10096
10096
|
var Pg = cc, Ag = dc, Un = "Tabs", [Ig] = xe(Un, [
|
|
10097
|
-
|
|
10098
|
-
]), pc =
|
|
10097
|
+
zn
|
|
10098
|
+
]), pc = zn(), [_g, ir] = Ig(Un), mc = f.forwardRef(
|
|
10099
10099
|
(e, t) => {
|
|
10100
10100
|
const {
|
|
10101
10101
|
__scopeTabs: n,
|
|
@@ -10207,7 +10207,7 @@ var yc = "TabsContent", wc = f.forwardRef(
|
|
|
10207
10207
|
return f.useEffect(() => {
|
|
10208
10208
|
const m = requestAnimationFrame(() => l.current = !1);
|
|
10209
10209
|
return () => cancelAnimationFrame(m);
|
|
10210
|
-
}, []), /* @__PURE__ */ u(
|
|
10210
|
+
}, []), /* @__PURE__ */ u(ze, { present: r || p, children: ({ present: m }) => /* @__PURE__ */ u(
|
|
10211
10211
|
Z.div,
|
|
10212
10212
|
{
|
|
10213
10213
|
"data-state": p ? "active" : "inactive",
|
|
@@ -10235,12 +10235,12 @@ function xc(e, t) {
|
|
|
10235
10235
|
function Sc(e, t) {
|
|
10236
10236
|
return `${e}-content-${t}`;
|
|
10237
10237
|
}
|
|
10238
|
-
var Mg = mc, Og = gc, Lg = bc,
|
|
10238
|
+
var Mg = mc, Og = gc, Lg = bc, zg = wc, [jn] = xe("Tooltip", [
|
|
10239
10239
|
Ln
|
|
10240
|
-
]), Gn = Ln(), Cc = "TooltipProvider",
|
|
10240
|
+
]), Gn = Ln(), Cc = "TooltipProvider", Dg = 700, Po = "tooltip.open", [$g, cr] = jn(Cc), kc = (e) => {
|
|
10241
10241
|
const {
|
|
10242
10242
|
__scopeTooltip: t,
|
|
10243
|
-
delayDuration: n =
|
|
10243
|
+
delayDuration: n = Dg,
|
|
10244
10244
|
skipDelayDuration: o = 300,
|
|
10245
10245
|
disableHoverableContent: r = !1,
|
|
10246
10246
|
children: s
|
|
@@ -10356,13 +10356,13 @@ var lr = "TooltipPortal", [Bg, Hg] = jn(lr, {
|
|
|
10356
10356
|
forceMount: void 0
|
|
10357
10357
|
}), Rc = (e) => {
|
|
10358
10358
|
const { __scopeTooltip: t, forceMount: n, children: o, container: r } = e, s = qt(lr, t);
|
|
10359
|
-
return /* @__PURE__ */ u(Bg, { scope: t, forceMount: n, children: /* @__PURE__ */ u(
|
|
10359
|
+
return /* @__PURE__ */ u(Bg, { scope: t, forceMount: n, children: /* @__PURE__ */ u(ze, { present: n || s.open, children: /* @__PURE__ */ u(Wo, { asChild: !0, container: r, children: o }) }) });
|
|
10360
10360
|
};
|
|
10361
10361
|
Rc.displayName = lr;
|
|
10362
10362
|
var At = "TooltipContent", Tc = f.forwardRef(
|
|
10363
10363
|
(e, t) => {
|
|
10364
10364
|
const n = Hg(At, e.__scopeTooltip), { forceMount: o = n.forceMount, side: r = "top", ...s } = e, a = qt(At, e.__scopeTooltip);
|
|
10365
|
-
return /* @__PURE__ */ u(
|
|
10365
|
+
return /* @__PURE__ */ u(ze, { present: o || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u(Pc, { side: r, ...s, ref: t }) : /* @__PURE__ */ u(Vg, { side: r, ...s, ref: t }) });
|
|
10366
10366
|
}
|
|
10367
10367
|
), Vg = f.forwardRef((e, t) => {
|
|
10368
10368
|
const n = qt(At, e.__scopeTooltip), o = cr(At, e.__scopeTooltip), r = f.useRef(null), s = ie(t, r), [a, i] = f.useState(null), { trigger: c, onClose: d } = n, p = r.current, { onPointerInTransitChange: l } = o, m = f.useCallback(() => {
|
|
@@ -10993,7 +10993,7 @@ function Rv({
|
|
|
10993
10993
|
...t
|
|
10994
10994
|
}) {
|
|
10995
10995
|
return /* @__PURE__ */ u(
|
|
10996
|
-
|
|
10996
|
+
zg,
|
|
10997
10997
|
{
|
|
10998
10998
|
"data-slot": "tabs-content",
|
|
10999
10999
|
className: X("flex-1 outline-none", e),
|
|
@@ -11007,7 +11007,7 @@ function Tv({
|
|
|
11007
11007
|
...n
|
|
11008
11008
|
}) {
|
|
11009
11009
|
return /* @__PURE__ */ q(
|
|
11010
|
-
|
|
11010
|
+
Dh,
|
|
11011
11011
|
{
|
|
11012
11012
|
"data-slot": "scroll-area",
|
|
11013
11013
|
className: X("relative", e),
|
|
@@ -11182,7 +11182,7 @@ function Lv({
|
|
|
11182
11182
|
}
|
|
11183
11183
|
);
|
|
11184
11184
|
}
|
|
11185
|
-
const
|
|
11185
|
+
const zv = En(
|
|
11186
11186
|
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
11187
11187
|
{
|
|
11188
11188
|
variants: {
|
|
@@ -11196,7 +11196,7 @@ const Dv = En(
|
|
|
11196
11196
|
}
|
|
11197
11197
|
}
|
|
11198
11198
|
);
|
|
11199
|
-
function
|
|
11199
|
+
function Dv({
|
|
11200
11200
|
className: e,
|
|
11201
11201
|
variant: t,
|
|
11202
11202
|
...n
|
|
@@ -11206,7 +11206,7 @@ function zv({
|
|
|
11206
11206
|
{
|
|
11207
11207
|
"data-slot": "alert",
|
|
11208
11208
|
role: "alert",
|
|
11209
|
-
className: X(
|
|
11209
|
+
className: X(zv({ variant: t }), e),
|
|
11210
11210
|
...n
|
|
11211
11211
|
}
|
|
11212
11212
|
);
|
|
@@ -11282,7 +11282,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11282
11282
|
mail: ho,
|
|
11283
11283
|
"map-pin": Ld,
|
|
11284
11284
|
"message-circle": Es,
|
|
11285
|
-
"message-square":
|
|
11285
|
+
"message-square": zo,
|
|
11286
11286
|
package: Hd,
|
|
11287
11287
|
phone: Wd,
|
|
11288
11288
|
search: Yd,
|
|
@@ -11455,7 +11455,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11455
11455
|
destructive: Ss
|
|
11456
11456
|
}, mb = ({ children: e, variant: t, title: n, className: o }) => {
|
|
11457
11457
|
const r = t, s = pb[r || "default"] || kn;
|
|
11458
|
-
return /* @__PURE__ */ q(
|
|
11458
|
+
return /* @__PURE__ */ q(Dv, { variant: r, className: o, children: [
|
|
11459
11459
|
/* @__PURE__ */ u(s, { className: "size-4" }),
|
|
11460
11460
|
n ? /* @__PURE__ */ u($v, { children: String(n) }) : null,
|
|
11461
11461
|
e ? /* @__PURE__ */ u(Fv, { children: e }) : null
|
|
@@ -11549,7 +11549,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11549
11549
|
"ui-collapsible": hb,
|
|
11550
11550
|
"ui-collapsible-trigger": gb,
|
|
11551
11551
|
"ui-collapsible-content": vb
|
|
11552
|
-
}), ls = "/api/ecommerce",
|
|
11552
|
+
}), ls = "/api/ecommerce", zc = async (e, t) => {
|
|
11553
11553
|
const n = t ? `${t.replace(/\/$/, "")}${ls}` : ls, o = await fetch(n, {
|
|
11554
11554
|
method: "POST",
|
|
11555
11555
|
headers: { "Content-Type": "application/json" },
|
|
@@ -11806,11 +11806,11 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11806
11806
|
]
|
|
11807
11807
|
}
|
|
11808
11808
|
);
|
|
11809
|
-
}, _b = 800,
|
|
11809
|
+
}, _b = 800, Dt = (e, t) => e ? `${e.replace(/\/$/, "")}${t}` : t, Mb = async (e, t, n, o) => {
|
|
11810
11810
|
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
11811
11811
|
return await Promise.all(
|
|
11812
11812
|
e.filter((a) => a.manifest.permissions.includes("data:fetch")).map(async (a) => {
|
|
11813
|
-
const i = o.find((m) => m.extensionId === a.id), c = i == null ? void 0 : i.token, d = i == null ? void 0 : i.mode, p =
|
|
11813
|
+
const i = o.find((m) => m.extensionId === a.id), c = i == null ? void 0 : i.token, d = i == null ? void 0 : i.mode, p = Dt(t, "/proxy-token"), l = await fetch(p, {
|
|
11814
11814
|
method: "POST",
|
|
11815
11815
|
headers: { "Content-Type": "application/json" },
|
|
11816
11816
|
body: JSON.stringify({
|
|
@@ -11847,7 +11847,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11847
11847
|
ce(() => {
|
|
11848
11848
|
window.stackable || (window.stackable = {
|
|
11849
11849
|
emit: (T, S = {}) => {
|
|
11850
|
-
const [A, ...
|
|
11850
|
+
const [A, ...D] = T.split(":"), I = D.join(":");
|
|
11851
11851
|
window.dispatchEvent(new CustomEvent(`stackable:${A}`, {
|
|
11852
11852
|
detail: { eventName: I, data: S }
|
|
11853
11853
|
}));
|
|
@@ -11867,12 +11867,12 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11867
11867
|
console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"), d([]), y(!0);
|
|
11868
11868
|
return;
|
|
11869
11869
|
}
|
|
11870
|
-
const A = await fetch(
|
|
11870
|
+
const A = await fetch(Dt(n, `/instances/${o}/${S}`));
|
|
11871
11871
|
if (!A.ok) {
|
|
11872
11872
|
console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`), d([]), y(!0);
|
|
11873
11873
|
return;
|
|
11874
11874
|
}
|
|
11875
|
-
const
|
|
11875
|
+
const D = await A.json(), I = bs(typeof window < "u" ? window.location.search : ""), $ = await jl(D, I), { tokens: B, errors: J } = await Mb($, n, o, I);
|
|
11876
11876
|
d($), l(I), h(new Map(B)), g(J);
|
|
11877
11877
|
} catch (A) {
|
|
11878
11878
|
console.error("Failed to load extensions:", A);
|
|
@@ -11886,25 +11886,25 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11886
11886
|
const S = setInterval(async () => {
|
|
11887
11887
|
const A = [];
|
|
11888
11888
|
await Promise.all(
|
|
11889
|
-
c.filter((
|
|
11890
|
-
const I = p.find((Y) => Y.extensionId ===
|
|
11889
|
+
c.filter((D) => D.manifest.permissions.includes("data:fetch")).map(async (D) => {
|
|
11890
|
+
const I = p.find((Y) => Y.extensionId === D.id), $ = I == null ? void 0 : I.token, B = I == null ? void 0 : I.mode, J = Dt(n, "/proxy-token"), j = await fetch(J, {
|
|
11891
11891
|
method: "POST",
|
|
11892
11892
|
headers: { "Content-Type": "application/json" },
|
|
11893
11893
|
body: JSON.stringify({
|
|
11894
11894
|
appId: o,
|
|
11895
|
-
extensionId:
|
|
11895
|
+
extensionId: D.id,
|
|
11896
11896
|
...B && { mode: B },
|
|
11897
11897
|
...$ && { devSessionToken: $ }
|
|
11898
11898
|
})
|
|
11899
11899
|
});
|
|
11900
11900
|
if (j.ok) {
|
|
11901
11901
|
const { token: Y, encryptionKey: ee } = await j.json();
|
|
11902
|
-
A.push([
|
|
11902
|
+
A.push([D.id, { token: Y, encryptionKey: ee }]);
|
|
11903
11903
|
} else
|
|
11904
|
-
console.warn(`[embeddables] Proxy token refresh failed for extension ${
|
|
11904
|
+
console.warn(`[embeddables] Proxy token refresh failed for extension ${D.id} (${j.status}) — using stale token`);
|
|
11905
11905
|
})
|
|
11906
|
-
), A.length > 0 && h((
|
|
11907
|
-
const I = new Map(
|
|
11906
|
+
), A.length > 0 && h((D) => {
|
|
11907
|
+
const I = new Map(D);
|
|
11908
11908
|
for (const [$, B] of A)
|
|
11909
11909
|
I.set($, B);
|
|
11910
11910
|
return I;
|
|
@@ -11918,24 +11918,24 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11918
11918
|
const A = S.data;
|
|
11919
11919
|
if ((A == null ? void 0 : A.type) !== "extension-ready")
|
|
11920
11920
|
return;
|
|
11921
|
-
const
|
|
11921
|
+
const D = A.extensionId, I = c.find((J) => J.id === D);
|
|
11922
11922
|
if (!(I != null && I.bundleUrl))
|
|
11923
11923
|
return;
|
|
11924
|
-
const $ = p.find((J) => J.extensionId ===
|
|
11924
|
+
const $ = p.find((J) => J.extensionId === D);
|
|
11925
11925
|
if (Vl(I.bundleUrl) && ($ == null ? void 0 : $.mode) !== "staging")
|
|
11926
11926
|
return;
|
|
11927
|
-
const B = m.get(
|
|
11928
|
-
B && $e(
|
|
11927
|
+
const B = m.get(D);
|
|
11928
|
+
B && $e(D, { type: "extension-encryption-key", encryptionKey: B.encryptionKey });
|
|
11929
11929
|
};
|
|
11930
11930
|
return window.addEventListener("message", T), () => window.removeEventListener("message", T);
|
|
11931
11931
|
}, [c, p, m]);
|
|
11932
11932
|
const L = ve((T, S) => {
|
|
11933
11933
|
const A = Ct();
|
|
11934
|
-
for (const [
|
|
11934
|
+
for (const [D, I] of A) {
|
|
11935
11935
|
if (!I.manifest.permissions.includes("events:identity"))
|
|
11936
11936
|
continue;
|
|
11937
11937
|
const $ = I.manifest.events ?? [];
|
|
11938
|
-
!$.includes("identity") && !$.includes(`identity:${T}`) || $e(
|
|
11938
|
+
!$.includes("identity") && !$.includes(`identity:${T}`) || $e(D, {
|
|
11939
11939
|
type: "extension-event",
|
|
11940
11940
|
eventType: "identity",
|
|
11941
11941
|
payload: { eventName: T, data: { state: S, timestamp: Kn((/* @__PURE__ */ new Date()).toISOString()) } }
|
|
@@ -11943,10 +11943,10 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11943
11943
|
}
|
|
11944
11944
|
}, []), W = ve((T) => {
|
|
11945
11945
|
const S = Ct();
|
|
11946
|
-
for (const [A,
|
|
11947
|
-
if (!
|
|
11946
|
+
for (const [A, D] of S) {
|
|
11947
|
+
if (!D.manifest.permissions.includes("events:messaging"))
|
|
11948
11948
|
continue;
|
|
11949
|
-
const I =
|
|
11949
|
+
const I = D.manifest.events ?? [];
|
|
11950
11950
|
!I.includes("messaging") && !I.includes("messaging:postback") && !I.includes(`messaging:postback:${T.data.actionName}`) || $e(A, {
|
|
11951
11951
|
type: "extension-event",
|
|
11952
11952
|
eventType: "messaging",
|
|
@@ -11955,10 +11955,10 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11955
11955
|
}
|
|
11956
11956
|
}, []), M = ve((T) => {
|
|
11957
11957
|
const S = Ct();
|
|
11958
|
-
for (const [A,
|
|
11959
|
-
if (!
|
|
11958
|
+
for (const [A, D] of S) {
|
|
11959
|
+
if (!D.manifest.permissions.includes("events:activity"))
|
|
11960
11960
|
continue;
|
|
11961
|
-
const I =
|
|
11961
|
+
const I = D.manifest.events ?? [];
|
|
11962
11962
|
!I.includes("activity") && !I.includes(`activity:${T.eventName}`) || $e(A, {
|
|
11963
11963
|
type: "extension-event",
|
|
11964
11964
|
eventType: "activity",
|
|
@@ -11987,12 +11987,12 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
11987
11987
|
}
|
|
11988
11988
|
if (A.length === 0)
|
|
11989
11989
|
return {};
|
|
11990
|
-
const
|
|
11991
|
-
return Object.assign({}, ...
|
|
11990
|
+
const D = await Promise.all(A);
|
|
11991
|
+
return Object.assign({}, ...D);
|
|
11992
11992
|
}, []), H = ve(async (T) => {
|
|
11993
11993
|
if (!n || !o || !e)
|
|
11994
11994
|
return console.warn("[embeddables] signIdentity skipped — missing:", { apiBase: !!n, appId: !!o, instanceId: !!e }), null;
|
|
11995
|
-
const S =
|
|
11995
|
+
const S = Dt(n, `/instances/${o}/${e}/identity`);
|
|
11996
11996
|
console.log("[embeddables] Calling identity sign:", { url: S, claims: Object.keys(T) });
|
|
11997
11997
|
try {
|
|
11998
11998
|
const A = await fetch(S, {
|
|
@@ -12002,8 +12002,8 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12002
12002
|
});
|
|
12003
12003
|
if (!A.ok)
|
|
12004
12004
|
return console.warn(`[embeddables] Identity sign failed (${A.status})`), null;
|
|
12005
|
-
const { token:
|
|
12006
|
-
return
|
|
12005
|
+
const { token: D } = await A.json();
|
|
12006
|
+
return D;
|
|
12007
12007
|
} catch (A) {
|
|
12008
12008
|
return console.warn("[embeddables] Identity sign request failed:", A), null;
|
|
12009
12009
|
}
|
|
@@ -12017,19 +12017,19 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12017
12017
|
T && T("messenger", "logoutUser");
|
|
12018
12018
|
}, []), P = ve((T) => {
|
|
12019
12019
|
console.log("[embeddables] Running sign lifecycle for user:", T.id);
|
|
12020
|
-
const { email: S, name: A } = T,
|
|
12020
|
+
const { email: S, name: A } = T, D = { external_id: String(T.id) };
|
|
12021
12021
|
(async () => {
|
|
12022
|
-
const I = await F({ ...
|
|
12022
|
+
const I = await F({ ...D, email: S, name: A });
|
|
12023
12023
|
console.log("[embeddables] Enriched claims:", I);
|
|
12024
12024
|
const $ = await H({
|
|
12025
|
-
...
|
|
12025
|
+
...D,
|
|
12026
12026
|
...I,
|
|
12027
12027
|
email: S,
|
|
12028
12028
|
name: A
|
|
12029
12029
|
});
|
|
12030
12030
|
console.log("[embeddables] Sign result:", { hasToken: !!$ }), $ && O($);
|
|
12031
12031
|
})();
|
|
12032
|
-
}, [F, H, O]),
|
|
12032
|
+
}, [F, H, O]), z = ve((T) => {
|
|
12033
12033
|
if (k.length > 0 && E.current.size < k.length) {
|
|
12034
12034
|
console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${E.current.size}/${k.length} ready`), R.current = T;
|
|
12035
12035
|
return;
|
|
@@ -12053,55 +12053,55 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12053
12053
|
}
|
|
12054
12054
|
};
|
|
12055
12055
|
x((S) => {
|
|
12056
|
-
var A,
|
|
12057
|
-
return S.authenticated && ((A = S.user) == null ? void 0 : A.id) === ((
|
|
12056
|
+
var A, D;
|
|
12057
|
+
return S.authenticated && ((A = S.user) == null ? void 0 : A.id) === ((D = T.user) == null ? void 0 : D.id) ? S : (console.log("[embeddables] Identity state changed (props), starting sign lifecycle"), z(T.user), L("login", T), T);
|
|
12058
12058
|
});
|
|
12059
12059
|
} else {
|
|
12060
12060
|
if (s === void 0)
|
|
12061
12061
|
return;
|
|
12062
12062
|
x((T) => T.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : T);
|
|
12063
12063
|
}
|
|
12064
|
-
}, [v, s, a, i, k,
|
|
12064
|
+
}, [v, s, a, i, k, z, L, K]), ce(() => {
|
|
12065
12065
|
if (!v || s !== void 0)
|
|
12066
12066
|
return;
|
|
12067
12067
|
const T = () => {
|
|
12068
12068
|
const A = document.getElementById("stackable-identity");
|
|
12069
12069
|
if (A)
|
|
12070
12070
|
try {
|
|
12071
|
-
const
|
|
12071
|
+
const D = JSON.parse(A.textContent ?? "{}"), I = {
|
|
12072
12072
|
authenticated: !0,
|
|
12073
12073
|
user: {
|
|
12074
|
-
id: String(
|
|
12075
|
-
email:
|
|
12076
|
-
name:
|
|
12074
|
+
id: String(D.customerId ?? ""),
|
|
12075
|
+
email: D.customerEmail,
|
|
12076
|
+
name: D.customerName,
|
|
12077
12077
|
provider: "shopify"
|
|
12078
12078
|
}
|
|
12079
12079
|
};
|
|
12080
12080
|
x(($) => {
|
|
12081
12081
|
var B, J;
|
|
12082
|
-
return $.authenticated && ((B = $.user) == null ? void 0 : B.id) === ((J = I.user) == null ? void 0 : J.id) ? $ : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),
|
|
12082
|
+
return $.authenticated && ((B = $.user) == null ? void 0 : B.id) === ((J = I.user) == null ? void 0 : J.id) ? $ : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"), z(I.user), L("login", I), I);
|
|
12083
12083
|
});
|
|
12084
12084
|
} catch {
|
|
12085
12085
|
console.warn("[embeddables] Failed to parse #stackable-identity JSON");
|
|
12086
12086
|
}
|
|
12087
12087
|
else
|
|
12088
|
-
x((
|
|
12088
|
+
x((D) => D.authenticated ? (K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : D);
|
|
12089
12089
|
};
|
|
12090
12090
|
T();
|
|
12091
12091
|
const S = new MutationObserver(T);
|
|
12092
12092
|
return S.observe(document.head, { childList: !0, subtree: !0 }), S.observe(document.body, { childList: !0, subtree: !0 }), () => S.disconnect();
|
|
12093
|
-
}, [v, s,
|
|
12093
|
+
}, [v, s, z, L, K]), ce(() => {
|
|
12094
12094
|
if (!w.authenticated)
|
|
12095
12095
|
return;
|
|
12096
12096
|
const T = (S) => {
|
|
12097
12097
|
const A = S.data;
|
|
12098
12098
|
if ((A == null ? void 0 : A.type) !== "extension-ready")
|
|
12099
12099
|
return;
|
|
12100
|
-
const
|
|
12100
|
+
const D = A.extensionId, I = c.find((B) => B.id === D);
|
|
12101
12101
|
if (!(I != null && I.manifest.permissions.includes("events:identity")))
|
|
12102
12102
|
return;
|
|
12103
12103
|
const $ = I.manifest.events ?? [];
|
|
12104
|
-
!$.includes("identity") && !$.includes("identity:login") || $e(
|
|
12104
|
+
!$.includes("identity") && !$.includes("identity:login") || $e(D, {
|
|
12105
12105
|
type: "extension-event",
|
|
12106
12106
|
eventType: "identity",
|
|
12107
12107
|
payload: { eventName: "login", data: { state: w, timestamp: Kn((/* @__PURE__ */ new Date()).toISOString()) } }
|
|
@@ -12112,10 +12112,10 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12112
12112
|
if (k.length === 0)
|
|
12113
12113
|
return;
|
|
12114
12114
|
const T = (A) => {
|
|
12115
|
-
const
|
|
12116
|
-
if ((
|
|
12115
|
+
const D = A.data;
|
|
12116
|
+
if ((D == null ? void 0 : D.type) !== "extension-ready")
|
|
12117
12117
|
return;
|
|
12118
|
-
const I =
|
|
12118
|
+
const I = D.extensionId;
|
|
12119
12119
|
if (k.includes(I) && (E.current.add(I), console.log(`[embeddables] extend:identity extension ready: ${I} (${E.current.size}/${k.length})`), E.current.size >= k.length && R.current)) {
|
|
12120
12120
|
console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");
|
|
12121
12121
|
const $ = R.current;
|
|
@@ -12143,7 +12143,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12143
12143
|
conversationId: A.data.conversationId ?? "",
|
|
12144
12144
|
timestamp: Kn((/* @__PURE__ */ new Date()).toISOString())
|
|
12145
12145
|
}
|
|
12146
|
-
}) : A.eventName === "context" && N((
|
|
12146
|
+
}) : A.eventName === "context" && N((D) => ({ ...D, ...A.data })));
|
|
12147
12147
|
};
|
|
12148
12148
|
return window.addEventListener("stackable:messaging", T), () => window.removeEventListener("stackable:messaging", T);
|
|
12149
12149
|
}, [W]), ce(() => {
|
|
@@ -12165,13 +12165,13 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12165
12165
|
messaging: C,
|
|
12166
12166
|
identity: w
|
|
12167
12167
|
}, S = Ct();
|
|
12168
|
-
for (const [A,
|
|
12169
|
-
|
|
12168
|
+
for (const [A, D] of S)
|
|
12169
|
+
D.manifest.permissions.includes("context:read") && $e(A, { type: "context-push", context: T });
|
|
12170
12170
|
}, [v, s, a, i, w, C]);
|
|
12171
12171
|
const U = Bt(
|
|
12172
12172
|
() => ({
|
|
12173
12173
|
// TODO(data.query-deprecation): Remove when data.query is deprecated — host-native ecommerce route replaced by extension + data.fetch
|
|
12174
|
-
"data.query": async (T) =>
|
|
12174
|
+
"data.query": async (T) => zc(T, t),
|
|
12175
12175
|
"data.fetch": async (T, S) => {
|
|
12176
12176
|
const A = m.get(T);
|
|
12177
12177
|
if (!A)
|
|
@@ -12182,12 +12182,12 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12182
12182
|
error: "data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"
|
|
12183
12183
|
}
|
|
12184
12184
|
};
|
|
12185
|
-
const
|
|
12185
|
+
const D = Ob(S) ? S : {
|
|
12186
12186
|
url: S.url,
|
|
12187
12187
|
method: S.method ?? "GET",
|
|
12188
12188
|
headers: S.headers ?? {},
|
|
12189
12189
|
body: S.body ?? null
|
|
12190
|
-
}, I =
|
|
12190
|
+
}, I = Dt(n, "/proxy"), $ = await fetch(I, {
|
|
12191
12191
|
method: "POST",
|
|
12192
12192
|
headers: {
|
|
12193
12193
|
"Content-Type": "application/json",
|
|
@@ -12195,7 +12195,7 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12195
12195
|
"X-Application-Id": o ?? "",
|
|
12196
12196
|
Authorization: `Bearer ${A.token}`
|
|
12197
12197
|
},
|
|
12198
|
-
body: JSON.stringify(
|
|
12198
|
+
body: JSON.stringify(D)
|
|
12199
12199
|
}), B = await $.json();
|
|
12200
12200
|
return {
|
|
12201
12201
|
status: B.status ?? $.status,
|
|
@@ -12212,9 +12212,9 @@ const Ot = (e) => e == null ? void 0 : e === !0 || e === "true", Mc = {
|
|
|
12212
12212
|
...S.closeButton != null && { closeButton: S.closeButton }
|
|
12213
12213
|
};
|
|
12214
12214
|
if (S.fetch) {
|
|
12215
|
-
const
|
|
12215
|
+
const D = ($) => new Promise((B) => setTimeout(B, $)), I = Promise.all([
|
|
12216
12216
|
U["data.fetch"](T, S.fetch),
|
|
12217
|
-
|
|
12217
|
+
D(_b)
|
|
12218
12218
|
]).then(([$]) => $);
|
|
12219
12219
|
yt.promise(I, {
|
|
12220
12220
|
loading: S.loading ?? S.message,
|
|
@@ -12283,10 +12283,10 @@ var Lb = (e, t, n, o, r, s, a, i) => {
|
|
|
12283
12283
|
p(b);
|
|
12284
12284
|
} catch {
|
|
12285
12285
|
}
|
|
12286
|
-
},
|
|
12286
|
+
}, zb = f.createContext(void 0), Db = { setTheme: (e) => {
|
|
12287
12287
|
}, themes: [] }, $b = () => {
|
|
12288
12288
|
var e;
|
|
12289
|
-
return (e = f.useContext(
|
|
12289
|
+
return (e = f.useContext(zb)) != null ? e : Db;
|
|
12290
12290
|
};
|
|
12291
12291
|
f.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: o, enableColorScheme: r, defaultTheme: s, value: a, themes: i, nonce: c, scriptProps: d }) => {
|
|
12292
12292
|
let p = JSON.stringify([n, t, s, e, i, a, o, r]).slice(1, -1);
|
|
@@ -12315,13 +12315,13 @@ const Fb = ({ ...e }) => {
|
|
|
12315
12315
|
...e
|
|
12316
12316
|
}
|
|
12317
12317
|
);
|
|
12318
|
-
}, Bb = { dark: "dark", light: "widget-theme-light" }, Hb = { dark: "dark", light: "light" },
|
|
12318
|
+
}, Bb = { dark: "dark", light: "widget-theme-light" }, Hb = { dark: "dark", light: "light" }, Dc = ({ children: e, theme: t = "inherit" }) => /* @__PURE__ */ q("div", { "data-id": "widget-body", className: Bb[t], style: { position: "relative", transform: "translateZ(0)" }, children: [
|
|
12319
12319
|
/* @__PURE__ */ u("div", { className: "h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300", children: /* @__PURE__ */ u("div", { className: "flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground", children: e }) }),
|
|
12320
12320
|
/* @__PURE__ */ u(Fb, { position: "bottom-center", theme: Hb[t] ?? "system", toastOptions: { descriptionClassName: "!text-muted-foreground" } })
|
|
12321
12321
|
] }), Vb = {
|
|
12322
12322
|
airplay: Jl,
|
|
12323
12323
|
"message-circle": Es,
|
|
12324
|
-
"message-square":
|
|
12324
|
+
"message-square": zo,
|
|
12325
12325
|
headphones: Ad,
|
|
12326
12326
|
"help-circle": ks,
|
|
12327
12327
|
bot: rd,
|
|
@@ -12391,12 +12391,12 @@ const Fb = ({ ...e }) => {
|
|
|
12391
12391
|
"overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",
|
|
12392
12392
|
o ? "opacity-100 scale-100 translate-y-0 pointer-events-auto" : "opacity-0 scale-95 translate-y-2 pointer-events-none"
|
|
12393
12393
|
),
|
|
12394
|
-
children: /* @__PURE__ */ u(
|
|
12394
|
+
children: /* @__PURE__ */ u(Dc, { theme: n, children: e })
|
|
12395
12395
|
}
|
|
12396
12396
|
)
|
|
12397
12397
|
] });
|
|
12398
12398
|
}, s0 = {
|
|
12399
|
-
Body:
|
|
12399
|
+
Body: Dc,
|
|
12400
12400
|
Launcher: Fc
|
|
12401
12401
|
}, Gb = ({ href: e, children: t }) => /* @__PURE__ */ u(
|
|
12402
12402
|
"a",
|
|
@@ -12417,7 +12417,7 @@ const Fb = ({ ...e }) => {
|
|
|
12417
12417
|
(async () => {
|
|
12418
12418
|
s(!0), i(null);
|
|
12419
12419
|
try {
|
|
12420
|
-
const d = await
|
|
12420
|
+
const d = await zc({
|
|
12421
12421
|
action: "getCustomer",
|
|
12422
12422
|
customerId: e
|
|
12423
12423
|
}, t);
|
|
@@ -12556,9 +12556,9 @@ const Fb = ({ ...e }) => {
|
|
|
12556
12556
|
ce(() => {
|
|
12557
12557
|
var K, P;
|
|
12558
12558
|
const M = document.querySelector('script[src*="zdassets.com/ekr/snippet"]'), F = (P = (K = M == null ? void 0 : M.src) == null ? void 0 : K.match(/key=([a-f0-9-]+)/)) == null ? void 0 : P[1];
|
|
12559
|
-
if (F && fetch(`https://ekr.zdassets.com/compose/${F}`).then((
|
|
12559
|
+
if (F && fetch(`https://ekr.zdassets.com/compose/${F}`).then((z) => z.text()).then((z) => {
|
|
12560
12560
|
var T;
|
|
12561
|
-
const U = (T =
|
|
12561
|
+
const U = (T = z.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/)) == null ? void 0 : T[1];
|
|
12562
12562
|
U && uo({ appId: U });
|
|
12563
12563
|
}).catch(() => {
|
|
12564
12564
|
}), C()) {
|
|
@@ -12568,22 +12568,21 @@ const Fb = ({ ...e }) => {
|
|
|
12568
12568
|
const H = setInterval(() => {
|
|
12569
12569
|
C() && (w("ready"), clearInterval(H));
|
|
12570
12570
|
}, 100), O = setTimeout(() => {
|
|
12571
|
-
clearInterval(H), w((
|
|
12571
|
+
clearInterval(H), w((z) => z === "ready" ? z : (console.warn("Zendesk widget failed to load after 10 seconds"), "error"));
|
|
12572
12572
|
}, 1e4);
|
|
12573
12573
|
return () => {
|
|
12574
12574
|
clearInterval(H), clearTimeout(O);
|
|
12575
12575
|
};
|
|
12576
12576
|
}, [C]);
|
|
12577
12577
|
const N = ve((M) => {
|
|
12578
|
-
!window.zE || !M.length || window.zE("messenger:set", "conversationTags", M);
|
|
12578
|
+
!window.zE || !M.length || (console.log("[ZendeskMessenger] setConversationTags", M, { zE: !!window.zE }), window.zE("messenger:set", "conversationTags", M));
|
|
12579
12579
|
}, []), R = ve((M) => {
|
|
12580
|
-
!window.zE || !M.length || window.zE("messenger:set", "conversationFields", M);
|
|
12580
|
+
!window.zE || !M.length || (console.log("[ZendeskMessenger] setConversationFields", M, { zE: !!window.zE }), window.zE("messenger:set", "conversationFields", M));
|
|
12581
12581
|
}, []), E = ve((M) => {
|
|
12582
12582
|
if (!window.zE)
|
|
12583
12583
|
return;
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
window.zE("messenger:ui", "newConversation", Object.keys(O).length ? O : void 0);
|
|
12584
|
+
const { tags: F = [], fields: H = [], ...O } = M ?? {};
|
|
12585
|
+
N(F), R(H), window.zE("messenger:ui", "newConversation", Object.keys(O).length ? O : void 0);
|
|
12587
12586
|
}, [N, R]), k = ve((M) => {
|
|
12588
12587
|
const { detail: F } = M;
|
|
12589
12588
|
F != null && F.payload && E(F.payload);
|
|
@@ -12605,12 +12604,12 @@ const Fb = ({ ...e }) => {
|
|
|
12605
12604
|
if (y !== "ready" || !window.zE)
|
|
12606
12605
|
return;
|
|
12607
12606
|
const M = window.zE("messenger:on", "conversationStarted", (O) => {
|
|
12608
|
-
var P,
|
|
12609
|
-
const K = (
|
|
12607
|
+
var P, z;
|
|
12608
|
+
const K = (z = (P = O == null ? void 0 : O.payload) == null ? void 0 : P.conversation) == null ? void 0 : z.id;
|
|
12610
12609
|
K && uo({ conversationId: K });
|
|
12611
12610
|
}), F = window.zE("messenger:on", "messagesShown", (O) => {
|
|
12612
|
-
var P,
|
|
12613
|
-
const K = (
|
|
12611
|
+
var P, z;
|
|
12612
|
+
const K = (z = (P = O == null ? void 0 : O.payload) == null ? void 0 : P.conversation) == null ? void 0 : z.id;
|
|
12614
12613
|
K && uo({ conversationId: K });
|
|
12615
12614
|
}), H = window.zE("messenger:on", "postbackButtonClicked", (O) => {
|
|
12616
12615
|
var P;
|
|
@@ -12637,11 +12636,11 @@ const Fb = ({ ...e }) => {
|
|
|
12637
12636
|
const O = x.current.getBoundingClientRect();
|
|
12638
12637
|
if ((l ? O.width : O.height) === 0)
|
|
12639
12638
|
return;
|
|
12640
|
-
const P = l ? (H.clientX - O.left) / O.width * 100 : (H.clientY - O.top) / O.height * 100,
|
|
12639
|
+
const P = l ? (H.clientX - O.left) / O.width * 100 : (H.clientY - O.top) / O.height * 100, z = Math.max(
|
|
12641
12640
|
fo,
|
|
12642
12641
|
Math.min(po, P)
|
|
12643
12642
|
);
|
|
12644
|
-
v(
|
|
12643
|
+
v(z);
|
|
12645
12644
|
}, F = () => {
|
|
12646
12645
|
p(!1), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
12647
12646
|
};
|
|
@@ -12706,7 +12705,7 @@ const Fb = ({ ...e }) => {
|
|
|
12706
12705
|
h === "conversations" ? "border-border bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
12707
12706
|
),
|
|
12708
12707
|
title: "Conversations",
|
|
12709
|
-
children: /* @__PURE__ */ u(
|
|
12708
|
+
children: /* @__PURE__ */ u(zo, { className: "h-4 w-4" })
|
|
12710
12709
|
}
|
|
12711
12710
|
),
|
|
12712
12711
|
/* @__PURE__ */ u(
|