@arturoliveira/vesta-ui 0.1.0 → 0.1.1
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +475 -452
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as h, jsxs as I, Fragment as ut } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as Es } from "clsx";
|
|
3
3
|
import { twMerge as Ts } from "tailwind-merge";
|
|
4
|
-
import { createContext as Je, useContext as fn, useRef as re, useLayoutEffect as Ns, useEffect as Ie, useSyncExternalStore as hn, useCallback as pn, useMemo as ze, memo as Cs, forwardRef as R, createElement as ws, Children as gn, isValidElement as
|
|
4
|
+
import { createContext as Je, useContext as fn, useRef as re, useLayoutEffect as Ns, useEffect as Ie, useSyncExternalStore as hn, useCallback as pn, useMemo as ze, memo as Cs, forwardRef as R, createElement as ws, Children as gn, isValidElement as xs, cloneElement as Ps, useId as mn, useState as dt } from "react";
|
|
5
5
|
import { createPortal as Os } from "react-dom";
|
|
6
6
|
import { X as yn, Check as Ss, ChevronDown as ks, Info as Is, AlertTriangle as Ds, AlertCircle as As, CheckCircle as Rs } from "lucide-react";
|
|
7
7
|
import { Select as H, createListCollection as Ls } from "@ark-ui/react";
|
|
8
8
|
function E(...e) {
|
|
9
9
|
return Ts(Es(e));
|
|
10
10
|
}
|
|
11
|
+
const Fs = {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
14
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
16
|
+
outline: "text-foreground"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function Ra({ className: e, variant: t = "default", children: n, ...s }) {
|
|
20
|
+
return /* @__PURE__ */ h(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: E(
|
|
24
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
25
|
+
Fs.variant[t],
|
|
26
|
+
e
|
|
27
|
+
),
|
|
28
|
+
...s,
|
|
29
|
+
children: n
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
11
33
|
const jt = {
|
|
12
34
|
variant: {
|
|
13
35
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -88,7 +110,7 @@ function Vt({
|
|
|
88
110
|
}
|
|
89
111
|
);
|
|
90
112
|
}
|
|
91
|
-
function
|
|
113
|
+
function La({ className: e, ...t }) {
|
|
92
114
|
return /* @__PURE__ */ h(
|
|
93
115
|
"div",
|
|
94
116
|
{
|
|
@@ -97,10 +119,10 @@ function Aa({ className: e, ...t }) {
|
|
|
97
119
|
}
|
|
98
120
|
);
|
|
99
121
|
}
|
|
100
|
-
function
|
|
122
|
+
function Fa({ className: e, ...t }) {
|
|
101
123
|
return /* @__PURE__ */ h("div", { className: E("flex flex-col space-y-1.5 p-6", e), ...t });
|
|
102
124
|
}
|
|
103
|
-
function
|
|
125
|
+
function Ma({ className: e, ...t }) {
|
|
104
126
|
return /* @__PURE__ */ h(
|
|
105
127
|
"h3",
|
|
106
128
|
{
|
|
@@ -109,16 +131,16 @@ function La({ className: e, ...t }) {
|
|
|
109
131
|
}
|
|
110
132
|
);
|
|
111
133
|
}
|
|
112
|
-
function
|
|
134
|
+
function _a({ className: e, ...t }) {
|
|
113
135
|
return /* @__PURE__ */ h("p", { className: E("text-sm text-muted-foreground", e), ...t });
|
|
114
136
|
}
|
|
115
|
-
function
|
|
137
|
+
function Ba({ className: e, ...t }) {
|
|
116
138
|
return /* @__PURE__ */ h("div", { className: E("p-6 pt-0", e), ...t });
|
|
117
139
|
}
|
|
118
|
-
function
|
|
140
|
+
function $a({ className: e, ...t }) {
|
|
119
141
|
return /* @__PURE__ */ h("div", { className: E("flex items-center p-6 pt-0", e), ...t });
|
|
120
142
|
}
|
|
121
|
-
function
|
|
143
|
+
function Ms(e, t) {
|
|
122
144
|
return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`;
|
|
123
145
|
}
|
|
124
146
|
function J(e = {}) {
|
|
@@ -135,27 +157,27 @@ function J(e = {}) {
|
|
|
135
157
|
var l;
|
|
136
158
|
const a = fn(i);
|
|
137
159
|
if (!a && n) {
|
|
138
|
-
const d = new Error(o ??
|
|
160
|
+
const d = new Error(o ?? Ms(s, r));
|
|
139
161
|
throw d.name = "ContextError", (l = Error.captureStackTrace) == null || l.call(Error, d, u), d;
|
|
140
162
|
}
|
|
141
163
|
return a;
|
|
142
164
|
}
|
|
143
165
|
return [i.Provider, u, i];
|
|
144
166
|
}
|
|
145
|
-
const [
|
|
167
|
+
const [_s, Qe] = J({
|
|
146
168
|
name: "CheckboxContext",
|
|
147
169
|
hookName: "useCheckboxContext",
|
|
148
170
|
providerName: "<CheckboxProvider />"
|
|
149
|
-
}),
|
|
150
|
-
let
|
|
151
|
-
const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) => e && (ht.has(e) ? ht.get(e) : ft(e) === Object.prototype || ft(e) === Array.prototype), Ut = (e) => typeof e == "object" && e !== null,
|
|
171
|
+
}), Bs = Symbol(), wt = Symbol(), we = "a", vn = "f", Gt = "p", bn = "c", En = "t", Tn = "h", Ue = "w", Nn = "o", Cn = "k";
|
|
172
|
+
let $s = (e, t) => new Proxy(e, t);
|
|
173
|
+
const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) => e && (ht.has(e) ? ht.get(e) : ft(e) === Object.prototype || ft(e) === Array.prototype), Ut = (e) => typeof e == "object" && e !== null, Hs = (e) => Object.values(Object.getOwnPropertyDescriptors(e)).some((t) => !t.configurable && !t.writable), js = (e) => {
|
|
152
174
|
if (Array.isArray(e))
|
|
153
175
|
return Array.from(e);
|
|
154
176
|
const t = Object.getOwnPropertyDescriptors(e);
|
|
155
177
|
return Object.values(t).forEach((n) => {
|
|
156
178
|
n.configurable = !0;
|
|
157
179
|
}), Object.create(ft(e), t);
|
|
158
|
-
},
|
|
180
|
+
}, Vs = (e, t) => {
|
|
159
181
|
const n = {
|
|
160
182
|
[vn]: t
|
|
161
183
|
};
|
|
@@ -174,10 +196,10 @@ const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) =
|
|
|
174
196
|
s = !0, n[we].delete(e);
|
|
175
197
|
}, c = {
|
|
176
198
|
get(i, u) {
|
|
177
|
-
return u === wt ? e : (r(Cn, u),
|
|
199
|
+
return u === wt ? e : (r(Cn, u), Pn(Reflect.get(i, u), n[we], n[bn], n[En]));
|
|
178
200
|
},
|
|
179
201
|
has(i, u) {
|
|
180
|
-
return u ===
|
|
202
|
+
return u === Bs ? (o(), !0) : (r(Tn, u), Reflect.has(i, u));
|
|
181
203
|
},
|
|
182
204
|
getOwnPropertyDescriptor(i, u) {
|
|
183
205
|
return r(Nn, u), Reflect.getOwnPropertyDescriptor(i, u);
|
|
@@ -187,22 +209,22 @@ const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) =
|
|
|
187
209
|
}
|
|
188
210
|
};
|
|
189
211
|
return t && (c.set = c.deleteProperty = () => !1), [c, n];
|
|
190
|
-
},
|
|
212
|
+
}, xn = (e) => (
|
|
191
213
|
// unwrap proxy
|
|
192
214
|
e[wt] || // otherwise
|
|
193
215
|
e
|
|
194
|
-
),
|
|
216
|
+
), Pn = (e, t, n, s) => {
|
|
195
217
|
if (!wn(e))
|
|
196
218
|
return e;
|
|
197
219
|
let r = s && s.get(e);
|
|
198
220
|
if (!r) {
|
|
199
|
-
const u =
|
|
200
|
-
|
|
221
|
+
const u = xn(e);
|
|
222
|
+
Hs(u) ? r = [u, js(u)] : r = [u], s == null || s.set(e, r);
|
|
201
223
|
}
|
|
202
224
|
const [o, c] = r;
|
|
203
225
|
let i = n && n.get(o);
|
|
204
|
-
return (!i || i[1][vn] !== !!c) && (i =
|
|
205
|
-
},
|
|
226
|
+
return (!i || i[1][vn] !== !!c) && (i = Vs(o, !!c), i[1][Gt] = $s(c || o, i[0]), n && n.set(o, i)), i[1][we] = t, i[1][bn] = n, i[1][En] = s, i[1][Gt];
|
|
227
|
+
}, Gs = (e, t) => {
|
|
206
228
|
const n = Reflect.ownKeys(e), s = Reflect.ownKeys(t);
|
|
207
229
|
return n.length !== s.length || n.some((r, o) => r !== s[o]);
|
|
208
230
|
}, On = (e, t, n, s, r = Object.is) => {
|
|
@@ -210,7 +232,7 @@ const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) =
|
|
|
210
232
|
return !1;
|
|
211
233
|
if (!Ut(e) || !Ut(t))
|
|
212
234
|
return !0;
|
|
213
|
-
const o = n.get(
|
|
235
|
+
const o = n.get(xn(e));
|
|
214
236
|
if (!o)
|
|
215
237
|
return !0;
|
|
216
238
|
if (s) {
|
|
@@ -223,7 +245,7 @@ const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) =
|
|
|
223
245
|
if (c = Reflect.has(e, i) !== Reflect.has(t, i), c)
|
|
224
246
|
return c;
|
|
225
247
|
if (o[Ue] === !0) {
|
|
226
|
-
if (c =
|
|
248
|
+
if (c = Gs(e, t), c)
|
|
227
249
|
return c;
|
|
228
250
|
} else
|
|
229
251
|
for (const i of o[Nn] || []) {
|
|
@@ -237,20 +259,20 @@ const ft = Object.getPrototypeOf, ht = /* @__PURE__ */ new WeakMap(), wn = (e) =
|
|
|
237
259
|
if (c === null)
|
|
238
260
|
throw new Error("invalid used");
|
|
239
261
|
return c;
|
|
240
|
-
},
|
|
262
|
+
}, Us = (e) => wn(e) && e[wt] || null, Kt = (e, t = !0) => {
|
|
241
263
|
ht.set(e, t);
|
|
242
264
|
};
|
|
243
|
-
function
|
|
265
|
+
function Ks() {
|
|
244
266
|
if (typeof globalThis < "u") return globalThis;
|
|
245
267
|
if (typeof self < "u") return self;
|
|
246
268
|
if (typeof window < "u") return window;
|
|
247
269
|
if (typeof global < "u") return global;
|
|
248
270
|
}
|
|
249
|
-
function
|
|
250
|
-
const n =
|
|
271
|
+
function xt(e, t) {
|
|
272
|
+
const n = Ks();
|
|
251
273
|
return n ? (n[e] || (n[e] = t()), n[e]) : t();
|
|
252
274
|
}
|
|
253
|
-
var
|
|
275
|
+
var Pe = xt("__zag__refSet", () => /* @__PURE__ */ new WeakSet()), Ws = (e) => typeof e == "object" && e !== null && "$$typeof" in e && "props" in e, zs = (e) => typeof e == "object" && e !== null && "__v_isVNode" in e, qs = (e) => typeof e == "object" && e !== null && "nodeType" in e && typeof e.nodeName == "string", Ys = (e) => Ws(e) || zs(e) || qs(e), pt = (e) => e !== null && typeof e == "object", gt = (e) => pt(e) && !Pe.has(e) && (Array.isArray(e) || !(Symbol.iterator in e)) && !Ys(e) && !(e instanceof WeakMap) && !(e instanceof WeakSet) && !(e instanceof Error) && !(e instanceof Number) && !(e instanceof Date) && !(e instanceof String) && !(e instanceof RegExp) && !(e instanceof ArrayBuffer) && !(e instanceof Promise), qe = () => process.env.NODE_ENV !== "production";
|
|
254
276
|
function Wt(e, t, n) {
|
|
255
277
|
typeof n.value == "object" && !gt(n.value) && (n.value = ce(n.value)), !n.enumerable || n.get || n.set || !n.configurable || !n.writable || t === "__proto__" ? Object.defineProperty(e, t, n) : e[t] = n.value;
|
|
256
278
|
}
|
|
@@ -269,14 +291,14 @@ function ce(e) {
|
|
|
269
291
|
}
|
|
270
292
|
return r || e;
|
|
271
293
|
}
|
|
272
|
-
var ae =
|
|
294
|
+
var ae = xt("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()), Xs = (e = Object.is, t = (i, u) => new Proxy(i, u), n = /* @__PURE__ */ new WeakMap(), s = (i, u) => {
|
|
273
295
|
const a = n.get(i);
|
|
274
296
|
if ((a == null ? void 0 : a[0]) === u)
|
|
275
297
|
return a[1];
|
|
276
298
|
const l = Array.isArray(i) ? [] : Object.create(Object.getPrototypeOf(i));
|
|
277
299
|
return Kt(l, !0), n.set(i, [u, l]), Reflect.ownKeys(i).forEach((d) => {
|
|
278
300
|
const f = Reflect.get(i, d);
|
|
279
|
-
|
|
301
|
+
Pe.has(f) ? (Kt(f, !1), l[d] = f) : ae.has(f) ? l[d] = ne(f) : l[d] = f;
|
|
280
302
|
}), Object.freeze(l);
|
|
281
303
|
}, r = /* @__PURE__ */ new WeakMap(), o = [1, 1], c = (i) => {
|
|
282
304
|
if (!pt(i))
|
|
@@ -286,70 +308,70 @@ var ae = Pt("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()), Ys = (
|
|
|
286
308
|
return u;
|
|
287
309
|
let a = o[0];
|
|
288
310
|
const l = /* @__PURE__ */ new Set(), d = (b, T = ++o[0]) => {
|
|
289
|
-
a !== T && (a = T, l.forEach((
|
|
311
|
+
a !== T && (a = T, l.forEach((P) => P(b, T)));
|
|
290
312
|
};
|
|
291
313
|
let f = o[1];
|
|
292
314
|
const p = (b = ++o[1]) => (f !== b && !l.size && (f = b, m.forEach(([T]) => {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
})), a), g = (b) => (T,
|
|
315
|
+
const P = T[1](b);
|
|
316
|
+
P > a && (a = P);
|
|
317
|
+
})), a), g = (b) => (T, P) => {
|
|
296
318
|
const M = [...T];
|
|
297
|
-
M[1] = [b, ...M[1]], d(M,
|
|
319
|
+
M[1] = [b, ...M[1]], d(M, P);
|
|
298
320
|
}, m = /* @__PURE__ */ new Map(), w = (b, T) => {
|
|
299
321
|
if (qe() && m.has(b))
|
|
300
322
|
throw new Error("prop listener already exists");
|
|
301
323
|
if (l.size) {
|
|
302
|
-
const
|
|
303
|
-
m.set(b, [T,
|
|
324
|
+
const P = T[3](g(b));
|
|
325
|
+
m.set(b, [T, P]);
|
|
304
326
|
} else
|
|
305
327
|
m.set(b, [T]);
|
|
306
328
|
}, v = (b) => {
|
|
307
|
-
var
|
|
329
|
+
var P;
|
|
308
330
|
const T = m.get(b);
|
|
309
|
-
T && (m.delete(b), (
|
|
310
|
-
}, O = (b) => (l.add(b), l.size === 1 && m.forEach(([
|
|
331
|
+
T && (m.delete(b), (P = T[1]) == null || P.call(T));
|
|
332
|
+
}, O = (b) => (l.add(b), l.size === 1 && m.forEach(([P, M], Q) => {
|
|
311
333
|
if (qe() && M)
|
|
312
334
|
throw new Error("remove already exists");
|
|
313
|
-
const ee =
|
|
314
|
-
m.set(Q, [
|
|
335
|
+
const ee = P[3](g(Q));
|
|
336
|
+
m.set(Q, [P, ee]);
|
|
315
337
|
}), () => {
|
|
316
|
-
l.delete(b), l.size === 0 && m.forEach(([
|
|
317
|
-
M && (M(), m.set(Q, [
|
|
338
|
+
l.delete(b), l.size === 0 && m.forEach(([P, M], Q) => {
|
|
339
|
+
M && (M(), m.set(Q, [P]));
|
|
318
340
|
});
|
|
319
|
-
}), N = Array.isArray(i) ? [] : Object.create(Object.getPrototypeOf(i)),
|
|
341
|
+
}), N = Array.isArray(i) ? [] : Object.create(Object.getPrototypeOf(i)), x = t(N, {
|
|
320
342
|
deleteProperty(b, T) {
|
|
321
|
-
const
|
|
343
|
+
const P = Reflect.get(b, T);
|
|
322
344
|
v(T);
|
|
323
345
|
const M = Reflect.deleteProperty(b, T);
|
|
324
|
-
return M && d(["delete", [T],
|
|
346
|
+
return M && d(["delete", [T], P]), M;
|
|
325
347
|
},
|
|
326
|
-
set(b, T,
|
|
348
|
+
set(b, T, P, M) {
|
|
327
349
|
var $t;
|
|
328
350
|
const Q = Reflect.has(b, T), ee = Reflect.get(b, T, M);
|
|
329
|
-
if (Q && (e(ee,
|
|
351
|
+
if (Q && (e(ee, P) || r.has(P) && e(ee, r.get(P))))
|
|
330
352
|
return !0;
|
|
331
|
-
v(T), pt(
|
|
332
|
-
let Me =
|
|
353
|
+
v(T), pt(P) && (P = Us(P) || P);
|
|
354
|
+
let Me = P;
|
|
333
355
|
if (!(($t = Object.getOwnPropertyDescriptor(b, T)) != null && $t.set)) {
|
|
334
|
-
!ae.has(
|
|
335
|
-
const Ht = !
|
|
356
|
+
!ae.has(P) && gt(P) && (Me = Pt(P));
|
|
357
|
+
const Ht = !Pe.has(Me) && ae.get(Me);
|
|
336
358
|
Ht && w(T, Ht);
|
|
337
359
|
}
|
|
338
|
-
return Reflect.set(b, T, Me, M), d(["set", [T],
|
|
360
|
+
return Reflect.set(b, T, Me, M), d(["set", [T], P, ee]), !0;
|
|
339
361
|
}
|
|
340
362
|
});
|
|
341
|
-
r.set(i,
|
|
363
|
+
r.set(i, x);
|
|
342
364
|
const D = [N, p, s, O];
|
|
343
|
-
return ae.set(
|
|
365
|
+
return ae.set(x, D), Reflect.ownKeys(i).forEach((b) => {
|
|
344
366
|
const T = Object.getOwnPropertyDescriptor(i, b);
|
|
345
|
-
T.get || T.set ? Object.defineProperty(N, b, T) :
|
|
346
|
-
}),
|
|
367
|
+
T.get || T.set ? Object.defineProperty(N, b, T) : x[b] = i[b];
|
|
368
|
+
}), x;
|
|
347
369
|
}) => [
|
|
348
370
|
// public functions
|
|
349
371
|
c,
|
|
350
372
|
// shared state
|
|
351
373
|
ae,
|
|
352
|
-
|
|
374
|
+
Pe,
|
|
353
375
|
// internal things
|
|
354
376
|
e,
|
|
355
377
|
t,
|
|
@@ -358,9 +380,9 @@ var ae = Pt("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()), Ys = (
|
|
|
358
380
|
s,
|
|
359
381
|
r,
|
|
360
382
|
o
|
|
361
|
-
], [
|
|
362
|
-
function
|
|
363
|
-
return
|
|
383
|
+
], [Zs] = Xs();
|
|
384
|
+
function Pt(e = {}) {
|
|
385
|
+
return Zs(e);
|
|
364
386
|
}
|
|
365
387
|
function Ye(e, t, n) {
|
|
366
388
|
const s = ae.get(e);
|
|
@@ -388,23 +410,23 @@ function ne(e) {
|
|
|
388
410
|
return r(n, s());
|
|
389
411
|
}
|
|
390
412
|
function De(e) {
|
|
391
|
-
return
|
|
413
|
+
return Pe.add(e), e;
|
|
392
414
|
}
|
|
393
|
-
function
|
|
415
|
+
function Js(e, t) {
|
|
394
416
|
Object.keys(t).forEach((r) => {
|
|
395
417
|
if (Object.getOwnPropertyDescriptor(e, r))
|
|
396
418
|
throw new Error("object property already defined");
|
|
397
419
|
const o = t[r], { get: c, set: i } = typeof o == "function" ? { get: o } : o, u = {};
|
|
398
420
|
u.get = () => c(ne(s)), i && (u.set = (a) => i(s, a)), Object.defineProperty(e, r, u);
|
|
399
421
|
});
|
|
400
|
-
const s =
|
|
422
|
+
const s = Pt(e);
|
|
401
423
|
return s;
|
|
402
424
|
}
|
|
403
|
-
function
|
|
425
|
+
function Qs(e) {
|
|
404
426
|
for (; e.length > 0; ) e.pop();
|
|
405
427
|
return e;
|
|
406
428
|
}
|
|
407
|
-
var zt = (e) => (e == null ? void 0 : e.constructor.name) === "Array",
|
|
429
|
+
var zt = (e) => (e == null ? void 0 : e.constructor.name) === "Array", er = (e, t) => {
|
|
408
430
|
if (e.length !== t.length) return !1;
|
|
409
431
|
for (let n = 0; n < e.length; n++)
|
|
410
432
|
if (!Ot(e[n], t[n])) return !1;
|
|
@@ -417,7 +439,7 @@ var zt = (e) => (e == null ? void 0 : e.constructor.name) === "Array", Qs = (e,
|
|
|
417
439
|
if (typeof e == "function" && typeof t == "function")
|
|
418
440
|
return e.toString() === t.toString();
|
|
419
441
|
if (zt(e) && zt(t))
|
|
420
|
-
return
|
|
442
|
+
return er(Array.from(e), Array.from(t));
|
|
421
443
|
if (typeof e != "object" || typeof t != "object") return !1;
|
|
422
444
|
const n = Object.keys(t ?? /* @__PURE__ */ Object.create(null)), s = n.length;
|
|
423
445
|
for (let r = 0; r < s; r++)
|
|
@@ -427,7 +449,7 @@ var zt = (e) => (e == null ? void 0 : e.constructor.name) === "Array", Qs = (e,
|
|
|
427
449
|
if (!Ot(e[o], t[o])) return !1;
|
|
428
450
|
}
|
|
429
451
|
return !0;
|
|
430
|
-
}, Oe = (e, ...t) => (typeof e == "function" ? e(...t) : e) ?? void 0, Z = (e) => e,
|
|
452
|
+
}, Oe = (e, ...t) => (typeof e == "function" ? e(...t) : e) ?? void 0, Z = (e) => e, tr = () => {
|
|
431
453
|
}, mt = (...e) => (...t) => {
|
|
432
454
|
e.forEach(function(n) {
|
|
433
455
|
n == null || n(...t);
|
|
@@ -435,15 +457,15 @@ var zt = (e) => (e == null ? void 0 : e.constructor.name) === "Array", Qs = (e,
|
|
|
435
457
|
}, yt = /* @__PURE__ */ (() => {
|
|
436
458
|
let e = 0;
|
|
437
459
|
return () => (e++, e.toString(36));
|
|
438
|
-
})(),
|
|
439
|
-
if (!Sn(e) ||
|
|
460
|
+
})(), nr = () => process.env.NODE_ENV !== "production", Xe = (e) => Array.isArray(e), Sn = (e) => e != null && typeof e == "object", Ke = (e) => Sn(e) && !Xe(e), sr = (e) => typeof e == "number" && !Number.isNaN(e), G = (e) => typeof e == "string", ve = (e) => typeof e == "function", kn = (e, t) => Object.prototype.hasOwnProperty.call(e, t), rr = (e) => Object.prototype.toString.call(e), In = Function.prototype.toString, or = In.call(Object), _e = (e) => {
|
|
461
|
+
if (!Sn(e) || rr(e) != "[object Object]") return !1;
|
|
440
462
|
const t = Object.getPrototypeOf(e);
|
|
441
463
|
if (t === null) return !0;
|
|
442
464
|
const n = kn(t, "constructor") && t.constructor;
|
|
443
|
-
return typeof n == "function" && n instanceof n && In.call(n) ==
|
|
465
|
+
return typeof n == "function" && n instanceof n && In.call(n) == or;
|
|
444
466
|
};
|
|
445
467
|
function ue(e) {
|
|
446
|
-
if (!
|
|
468
|
+
if (!ir(e) || e === void 0) return e;
|
|
447
469
|
const t = Reflect.ownKeys(e).filter((s) => typeof s == "string"), n = {};
|
|
448
470
|
for (const s of t) {
|
|
449
471
|
const r = e[s];
|
|
@@ -451,7 +473,7 @@ function ue(e) {
|
|
|
451
473
|
}
|
|
452
474
|
return n;
|
|
453
475
|
}
|
|
454
|
-
var
|
|
476
|
+
var ir = (e) => e && typeof e == "object" && e.constructor === Object;
|
|
455
477
|
function me(...e) {
|
|
456
478
|
const t = e.length === 1 ? e[0] : e[1];
|
|
457
479
|
(e.length === 2 ? e[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(t);
|
|
@@ -461,7 +483,7 @@ function We(...e) {
|
|
|
461
483
|
if ((e.length === 2 ? e[0] : !0) && process.env.NODE_ENV !== "production")
|
|
462
484
|
throw new Error(t);
|
|
463
485
|
}
|
|
464
|
-
var
|
|
486
|
+
var ar = Object.defineProperty, cr = (e, t, n) => t in e ? ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => cr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
465
487
|
function Dn(e, ...t) {
|
|
466
488
|
if (!_e(e))
|
|
467
489
|
throw new TypeError("Source argument must be a plain object");
|
|
@@ -485,31 +507,31 @@ function te(e) {
|
|
|
485
507
|
function An(e) {
|
|
486
508
|
return Ke(e) && e.predicate != null;
|
|
487
509
|
}
|
|
488
|
-
var
|
|
510
|
+
var lr = () => !0;
|
|
489
511
|
function St(e, t, n, s) {
|
|
490
512
|
return (r) => {
|
|
491
513
|
var o;
|
|
492
514
|
return G(r) ? !!((o = e[r]) != null && o.call(e, t, n, s)) : ve(r) ? r(t, n, s) : r.predicate(e)(t, n, s);
|
|
493
515
|
};
|
|
494
516
|
}
|
|
495
|
-
function
|
|
517
|
+
function ur(...e) {
|
|
496
518
|
return {
|
|
497
519
|
predicate: (t) => (n, s, r) => e.map(St(t, n, s, r)).some(Boolean)
|
|
498
520
|
};
|
|
499
521
|
}
|
|
500
|
-
function
|
|
522
|
+
function dr(...e) {
|
|
501
523
|
return {
|
|
502
524
|
predicate: (t) => (n, s, r) => e.map(St(t, n, s, r)).every(Boolean)
|
|
503
525
|
};
|
|
504
526
|
}
|
|
505
|
-
function
|
|
527
|
+
function fr(e) {
|
|
506
528
|
return {
|
|
507
529
|
predicate: (t) => (n, s, r) => !St(t, n, s, r)(e)
|
|
508
530
|
};
|
|
509
531
|
}
|
|
510
|
-
var Rn = { or:
|
|
532
|
+
var Rn = { or: ur, and: dr, not: fr };
|
|
511
533
|
function Ln(e, t) {
|
|
512
|
-
return e = e ??
|
|
534
|
+
return e = e ?? lr, (n, s, r) => {
|
|
513
535
|
if (G(e)) {
|
|
514
536
|
const o = t[e];
|
|
515
537
|
return ve(o) ? o(n, s, r) : o;
|
|
@@ -520,14 +542,14 @@ function Ln(e, t) {
|
|
|
520
542
|
function st(e, t) {
|
|
521
543
|
return (n, s, r) => An(e) ? e.predicate(t)(n, s, r) : e;
|
|
522
544
|
}
|
|
523
|
-
function
|
|
545
|
+
function hr(e) {
|
|
524
546
|
var o, c;
|
|
525
|
-
const t = e.computed ?? Z({}), n = e.context ?? Z({}), s = e.initial ? (c = (o = e.states) == null ? void 0 : o[e.initial]) == null ? void 0 : c.tags : [], r =
|
|
547
|
+
const t = e.computed ?? Z({}), n = e.context ?? Z({}), s = e.initial ? (c = (o = e.states) == null ? void 0 : o[e.initial]) == null ? void 0 : c.tags : [], r = Pt({
|
|
526
548
|
value: e.initial ?? "",
|
|
527
549
|
previousValue: "",
|
|
528
550
|
event: Z({}),
|
|
529
551
|
previousEvent: Z({}),
|
|
530
|
-
context:
|
|
552
|
+
context: Js(n, t),
|
|
531
553
|
done: !1,
|
|
532
554
|
tags: s ?? [],
|
|
533
555
|
hasTag(i) {
|
|
@@ -552,7 +574,7 @@ function fr(e) {
|
|
|
552
574
|
}
|
|
553
575
|
function Ee(e, t) {
|
|
554
576
|
return (n, s) => {
|
|
555
|
-
if (
|
|
577
|
+
if (sr(e)) return e;
|
|
556
578
|
if (ve(e))
|
|
557
579
|
return e(n, s);
|
|
558
580
|
if (G(e)) {
|
|
@@ -569,11 +591,11 @@ function Ee(e, t) {
|
|
|
569
591
|
}
|
|
570
592
|
};
|
|
571
593
|
}
|
|
572
|
-
function
|
|
594
|
+
function pr(e) {
|
|
573
595
|
return G(e) ? { target: e } : e;
|
|
574
596
|
}
|
|
575
|
-
function
|
|
576
|
-
return (n, s, r) => te(e).map(
|
|
597
|
+
function gr(e, t) {
|
|
598
|
+
return (n, s, r) => te(e).map(pr).find((o) => Ln(o.guard, t)(n, s, r) ?? o.target ?? o.actions);
|
|
577
599
|
}
|
|
578
600
|
var Fn = class {
|
|
579
601
|
// Let's get started!
|
|
@@ -589,7 +611,7 @@ var Fn = class {
|
|
|
589
611
|
"type",
|
|
590
612
|
"machine"
|
|
591
613
|
/* Machine */
|
|
592
|
-
), y(this, "activityEvents", /* @__PURE__ */ new Map()), y(this, "delayedEvents", /* @__PURE__ */ new Map()), y(this, "stateListeners", /* @__PURE__ */ new Set()), y(this, "doneListeners", /* @__PURE__ */ new Set()), y(this, "contextWatchers", /* @__PURE__ */ new Set()), y(this, "removeStateListener",
|
|
614
|
+
), y(this, "activityEvents", /* @__PURE__ */ new Map()), y(this, "delayedEvents", /* @__PURE__ */ new Map()), y(this, "stateListeners", /* @__PURE__ */ new Set()), y(this, "doneListeners", /* @__PURE__ */ new Set()), y(this, "contextWatchers", /* @__PURE__ */ new Set()), y(this, "removeStateListener", tr), y(this, "parent"), y(this, "children", /* @__PURE__ */ new Map()), y(this, "guardMap"), y(this, "actionMap"), y(this, "delayMap"), y(this, "activityMap"), y(this, "sync"), y(this, "options"), y(this, "config"), y(this, "_created", () => {
|
|
593
615
|
if (!this.config.created) return;
|
|
594
616
|
const i = q(
|
|
595
617
|
"machine.created"
|
|
@@ -692,7 +714,7 @@ var Fn = class {
|
|
|
692
714
|
}), y(this, "setState", (i) => {
|
|
693
715
|
this.state.previousValue = this.state.value, this.state.value = i;
|
|
694
716
|
const u = this.getStateNode(i);
|
|
695
|
-
i == null ?
|
|
717
|
+
i == null ? Qs(this.state.tags) : this.state.tags = te(u == null ? void 0 : u.tags);
|
|
696
718
|
}), y(this, "setContext", (i) => {
|
|
697
719
|
i && Dn(this.state.context, i);
|
|
698
720
|
}), y(this, "setOptions", (i) => {
|
|
@@ -826,7 +848,7 @@ var Fn = class {
|
|
|
826
848
|
const l = u.changed || u.reenter;
|
|
827
849
|
l && this.performExitEffects(i, a), this.performTransitionEffects(u.transition, a), this.setState(u.target), l && this.performEntryEffects(u.target, a);
|
|
828
850
|
}), y(this, "determineTransition", (i, u) => {
|
|
829
|
-
const a =
|
|
851
|
+
const a = gr(i, this.guardMap);
|
|
830
852
|
return a == null ? void 0 : a(this.contextSnapshot, u, this.guardMeta);
|
|
831
853
|
}), y(this, "sendParent", (i) => {
|
|
832
854
|
var a;
|
|
@@ -834,7 +856,7 @@ var Fn = class {
|
|
|
834
856
|
const u = q(i);
|
|
835
857
|
(a = this.parent) == null || a.send(u);
|
|
836
858
|
}), y(this, "log", (...i) => {
|
|
837
|
-
|
|
859
|
+
nr() && this.options.debug && console.log(...i);
|
|
838
860
|
}), y(this, "send", (i) => {
|
|
839
861
|
const u = q(i);
|
|
840
862
|
this.transition(this.state.value, u);
|
|
@@ -853,7 +875,7 @@ var Fn = class {
|
|
|
853
875
|
return this.performStateChangeEffects(this.state.value, f, l), f.stateNode;
|
|
854
876
|
}), y(this, "subscribe", (i) => (this.stateListeners.add(i), this.status === "Running" && i(this.stateSnapshot), () => {
|
|
855
877
|
this.stateListeners.delete(i);
|
|
856
|
-
})), y(this, "onDone", (i) => (this.doneListeners.add(i), this)), y(this, "onTransition", (i) => (this.stateListeners.add(i), this.status === "Running" && i(this.stateSnapshot), this)), this.config = ce(e), this.options = ce(t ?? {}), this.id = this.config.id ?? `machine-${yt()}`, this.guardMap = ((n = this.options) == null ? void 0 : n.guards) ?? {}, this.actionMap = ((s = this.options) == null ? void 0 : s.actions) ?? {}, this.delayMap = ((r = this.options) == null ? void 0 : r.delays) ?? {}, this.activityMap = ((o = this.options) == null ? void 0 : o.activities) ?? {}, this.sync = ((c = this.options) == null ? void 0 : c.sync) ?? !1, this.state =
|
|
878
|
+
})), y(this, "onDone", (i) => (this.doneListeners.add(i), this)), y(this, "onTransition", (i) => (this.stateListeners.add(i), this.status === "Running" && i(this.stateSnapshot), this)), this.config = ce(e), this.options = ce(t ?? {}), this.id = this.config.id ?? `machine-${yt()}`, this.guardMap = ((n = this.options) == null ? void 0 : n.guards) ?? {}, this.actionMap = ((s = this.options) == null ? void 0 : s.actions) ?? {}, this.delayMap = ((r = this.options) == null ? void 0 : r.delays) ?? {}, this.activityMap = ((o = this.options) == null ? void 0 : o.activities) ?? {}, this.sync = ((c = this.options) == null ? void 0 : c.sync) ?? !1, this.state = hr(this.config), this.initialContext = ne(this.state.context);
|
|
857
879
|
}
|
|
858
880
|
// immutable state value
|
|
859
881
|
get stateSnapshot() {
|
|
@@ -922,16 +944,16 @@ var Fn = class {
|
|
|
922
944
|
tags: e.tags
|
|
923
945
|
};
|
|
924
946
|
}
|
|
925
|
-
}, Re = (e, t) => new Fn(e, t),
|
|
947
|
+
}, Re = (e, t) => new Fn(e, t), mr = (e) => e instanceof Fn || (e == null ? void 0 : e.type) === "machine", yr = (...e) => e.map((t) => {
|
|
926
948
|
var n;
|
|
927
949
|
return (n = t == null ? void 0 : t.trim) == null ? void 0 : n.call(t);
|
|
928
|
-
}).filter(Boolean).join(" "),
|
|
950
|
+
}).filter(Boolean).join(" "), vr = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g, qt = (e) => {
|
|
929
951
|
const t = {};
|
|
930
952
|
let n;
|
|
931
|
-
for (; n =
|
|
953
|
+
for (; n = vr.exec(e); )
|
|
932
954
|
t[n[1]] = n[2];
|
|
933
955
|
return t;
|
|
934
|
-
},
|
|
956
|
+
}, br = (e, t) => {
|
|
935
957
|
if (G(e)) {
|
|
936
958
|
if (G(t)) return `${e};${t}`;
|
|
937
959
|
e = qt(e);
|
|
@@ -947,11 +969,11 @@ function k(...e) {
|
|
|
947
969
|
continue;
|
|
948
970
|
}
|
|
949
971
|
if (s === "className" || s === "class") {
|
|
950
|
-
t[s] =
|
|
972
|
+
t[s] = yr(t[s], n[s]);
|
|
951
973
|
continue;
|
|
952
974
|
}
|
|
953
975
|
if (s === "style") {
|
|
954
|
-
t[s] =
|
|
976
|
+
t[s] = br(t[s], n[s]);
|
|
955
977
|
continue;
|
|
956
978
|
}
|
|
957
979
|
t[s] = n[s] !== void 0 ? n[s] : t[s];
|
|
@@ -961,14 +983,14 @@ function k(...e) {
|
|
|
961
983
|
}
|
|
962
984
|
return t;
|
|
963
985
|
}
|
|
964
|
-
function
|
|
986
|
+
function Er(e) {
|
|
965
987
|
return new Proxy({}, {
|
|
966
988
|
get() {
|
|
967
989
|
return e;
|
|
968
990
|
}
|
|
969
991
|
});
|
|
970
992
|
}
|
|
971
|
-
var kt = () => (e) => Array.from(new Set(e)), Le =
|
|
993
|
+
var kt = () => (e) => Array.from(new Set(e)), Le = Er((e) => e), Yt = (e) => (e == null ? void 0 : e.constructor.name) === "Array", Tr = (e, t) => {
|
|
972
994
|
if (e.length !== t.length) return !1;
|
|
973
995
|
for (let n = 0; n < e.length; n++)
|
|
974
996
|
if (!It(e[n], t[n])) return !1;
|
|
@@ -981,7 +1003,7 @@ var kt = () => (e) => Array.from(new Set(e)), Le = br((e) => e), Yt = (e) => (e
|
|
|
981
1003
|
if (typeof e == "function" && typeof t == "function")
|
|
982
1004
|
return e.toString() === t.toString();
|
|
983
1005
|
if (Yt(e) && Yt(t))
|
|
984
|
-
return
|
|
1006
|
+
return Tr(Array.from(e), Array.from(t));
|
|
985
1007
|
if (typeof e != "object" || typeof t != "object") return !1;
|
|
986
1008
|
const n = Object.keys(t ?? /* @__PURE__ */ Object.create(null)), s = n.length;
|
|
987
1009
|
for (let r = 0; r < s; r++)
|
|
@@ -991,10 +1013,10 @@ var kt = () => (e) => Array.from(new Set(e)), Le = br((e) => e), Yt = (e) => (e
|
|
|
991
1013
|
if (!It(e[o], t[o])) return !1;
|
|
992
1014
|
}
|
|
993
1015
|
return !0;
|
|
994
|
-
},
|
|
995
|
-
|
|
1016
|
+
}, Nr = () => process.env.NODE_ENV !== "production", Cr = Function.prototype.toString;
|
|
1017
|
+
Cr.call(Object);
|
|
996
1018
|
function Mn(e) {
|
|
997
|
-
if (!
|
|
1019
|
+
if (!wr(e) || e === void 0) return e;
|
|
998
1020
|
const t = Reflect.ownKeys(e).filter((s) => typeof s == "string"), n = {};
|
|
999
1021
|
for (const s of t) {
|
|
1000
1022
|
const r = e[s];
|
|
@@ -1002,8 +1024,8 @@ function Mn(e) {
|
|
|
1002
1024
|
}
|
|
1003
1025
|
return n;
|
|
1004
1026
|
}
|
|
1005
|
-
var
|
|
1006
|
-
function
|
|
1027
|
+
var wr = (e) => e && typeof e == "object" && e.constructor === Object;
|
|
1028
|
+
function xr(e, t) {
|
|
1007
1029
|
const n = re(!1), s = re(!1);
|
|
1008
1030
|
Ie(() => {
|
|
1009
1031
|
if (n.current && s.current)
|
|
@@ -1013,7 +1035,7 @@ function wr(e, t) {
|
|
|
1013
1035
|
n.current = !1;
|
|
1014
1036
|
}), []);
|
|
1015
1037
|
}
|
|
1016
|
-
var Pr =
|
|
1038
|
+
var Pr = xt("__zag__targetCache", () => /* @__PURE__ */ new WeakMap());
|
|
1017
1039
|
function _n(e, t) {
|
|
1018
1040
|
const { actions: n, context: s, sync: r } = t ?? {}, o = re(void 0), c = re(void 0), i = hn(
|
|
1019
1041
|
pn((d) => Ye(e.state, d, r), [r]),
|
|
@@ -1030,7 +1052,7 @@ function _n(e, t) {
|
|
|
1030
1052
|
);
|
|
1031
1053
|
e.setOptions({ actions: n });
|
|
1032
1054
|
const u = ze(() => Mn(s ?? {}), [s]);
|
|
1033
|
-
|
|
1055
|
+
xr(() => {
|
|
1034
1056
|
const d = Object.entries(u), f = e.contextSnapshot ?? {};
|
|
1035
1057
|
d.map(([m, w]) => ({
|
|
1036
1058
|
key: m,
|
|
@@ -1044,42 +1066,42 @@ function _n(e, t) {
|
|
|
1044
1066
|
o.current = i, c.current = a;
|
|
1045
1067
|
});
|
|
1046
1068
|
const l = ze(() => /* @__PURE__ */ new WeakMap(), []);
|
|
1047
|
-
return
|
|
1069
|
+
return Pn(i, a, l, Pr);
|
|
1048
1070
|
}
|
|
1049
|
-
function
|
|
1071
|
+
function Or(e) {
|
|
1050
1072
|
return [_n(e), e.send];
|
|
1051
1073
|
}
|
|
1052
|
-
function
|
|
1074
|
+
function Sr(e) {
|
|
1053
1075
|
const t = re(void 0);
|
|
1054
1076
|
return t.current || (t.current = { v: e() }), t.current.v;
|
|
1055
1077
|
}
|
|
1056
|
-
var
|
|
1057
|
-
function
|
|
1058
|
-
const { state: n, context: s } = t ?? {}, r =
|
|
1078
|
+
var kr = typeof document < "u" ? Ns : Ie;
|
|
1079
|
+
function Ir(e, t) {
|
|
1080
|
+
const { state: n, context: s } = t ?? {}, r = Sr(() => {
|
|
1059
1081
|
const c = typeof e == "function" ? e() : e;
|
|
1060
1082
|
return s && c.setContext(s), c._created(), c;
|
|
1061
1083
|
}), o = re(void 0);
|
|
1062
|
-
return
|
|
1084
|
+
return kr(() => {
|
|
1063
1085
|
const c = n ?? o.current;
|
|
1064
1086
|
return r.start(c), () => {
|
|
1065
|
-
|
|
1087
|
+
Nr() && (o.current = r.getHydrationState()), r.stop();
|
|
1066
1088
|
};
|
|
1067
1089
|
}, []), r;
|
|
1068
1090
|
}
|
|
1069
1091
|
function et(e, t) {
|
|
1070
|
-
const n =
|
|
1092
|
+
const n = Ir(e, t);
|
|
1071
1093
|
return [_n(n, t), n.send, n];
|
|
1072
1094
|
}
|
|
1073
|
-
function
|
|
1095
|
+
function Dr(e, t) {
|
|
1074
1096
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1075
1097
|
}
|
|
1076
1098
|
function Dt(...e) {
|
|
1077
1099
|
return (t) => {
|
|
1078
1100
|
for (const n of e)
|
|
1079
|
-
|
|
1101
|
+
Dr(n, t);
|
|
1080
1102
|
};
|
|
1081
1103
|
}
|
|
1082
|
-
function
|
|
1104
|
+
function Ar(e) {
|
|
1083
1105
|
var s, r;
|
|
1084
1106
|
let t = (s = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1085
1107
|
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
@@ -1091,17 +1113,17 @@ const rt = (e) => {
|
|
|
1091
1113
|
if (!r)
|
|
1092
1114
|
return ws(e, { ...c, ref: s }, o);
|
|
1093
1115
|
const i = gn.only(o);
|
|
1094
|
-
if (!
|
|
1116
|
+
if (!xs(i))
|
|
1095
1117
|
return null;
|
|
1096
|
-
const u =
|
|
1097
|
-
return
|
|
1118
|
+
const u = Ar(i);
|
|
1119
|
+
return Ps(i, {
|
|
1098
1120
|
...k(c, i.props),
|
|
1099
1121
|
ref: s ? Dt(s, u) : u
|
|
1100
1122
|
});
|
|
1101
1123
|
})
|
|
1102
1124
|
);
|
|
1103
1125
|
return t.displayName = e.displayName || e.name, t;
|
|
1104
|
-
},
|
|
1126
|
+
}, Rr = () => {
|
|
1105
1127
|
const e = /* @__PURE__ */ new Map();
|
|
1106
1128
|
return new Proxy(rt, {
|
|
1107
1129
|
apply(t, n, s) {
|
|
@@ -1112,7 +1134,7 @@ const rt = (e) => {
|
|
|
1112
1134
|
return e.has(s) || e.set(s, rt(s)), e.get(s);
|
|
1113
1135
|
}
|
|
1114
1136
|
});
|
|
1115
|
-
}, F =
|
|
1137
|
+
}, F = Rr(), Bn = R((e, t) => {
|
|
1116
1138
|
const n = Qe(), s = k(n.getControlProps(), e);
|
|
1117
1139
|
return /* @__PURE__ */ h(F.div, { ...s, ref: t });
|
|
1118
1140
|
});
|
|
@@ -1126,7 +1148,7 @@ const At = () => (e, t) => t.reduce(
|
|
|
1126
1148
|
);
|
|
1127
1149
|
var ye = (e, t = []) => ({
|
|
1128
1150
|
parts: (...n) => {
|
|
1129
|
-
if (
|
|
1151
|
+
if (Lr(t))
|
|
1130
1152
|
return ye(e, n);
|
|
1131
1153
|
throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
|
|
1132
1154
|
},
|
|
@@ -1145,16 +1167,16 @@ var ye = (e, t = []) => ({
|
|
|
1145
1167
|
}),
|
|
1146
1168
|
{}
|
|
1147
1169
|
)
|
|
1148
|
-
}), he = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(),
|
|
1149
|
-
}, tt = (e) => typeof e == "object" && e !== null,
|
|
1150
|
-
function
|
|
1170
|
+
}), he = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Lr = (e) => e.length === 0, ot = (...e) => (t) => e.reduce((n, s) => s(n), t), Be = () => {
|
|
1171
|
+
}, tt = (e) => typeof e == "object" && e !== null, Fr = 2147483647, j = (e) => e ? "" : void 0, Mr = 1, _r = 9, Br = 11, $ = (e) => tt(e) && e.nodeType === Mr && typeof e.nodeName == "string", Rt = (e) => tt(e) && e.nodeType === _r, $r = (e) => tt(e) && e === e.window, $n = (e) => $(e) ? e.localName || "" : "#document";
|
|
1172
|
+
function Hr(e) {
|
|
1151
1173
|
return ["html", "body", "#document"].includes($n(e));
|
|
1152
1174
|
}
|
|
1153
|
-
var
|
|
1154
|
-
function
|
|
1175
|
+
var jr = (e) => tt(e) && e.nodeType !== void 0, Ae = (e) => jr(e) && e.nodeType === Br && "host" in e, Vr = (e) => $(e) && e.localName === "input", Gr = (e) => $(e) ? e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0 : !1, Ur = /(textarea|select)/;
|
|
1176
|
+
function Kr(e) {
|
|
1155
1177
|
if (e == null || !$(e)) return !1;
|
|
1156
1178
|
try {
|
|
1157
|
-
return
|
|
1179
|
+
return Vr(e) && e.selectionStart != null || Ur.test(e.localName) || e.isContentEditable || e.getAttribute("contenteditable") === "true" || e.getAttribute("contenteditable") === "";
|
|
1158
1180
|
} catch {
|
|
1159
1181
|
return !1;
|
|
1160
1182
|
}
|
|
@@ -1174,9 +1196,9 @@ function be(e, t) {
|
|
|
1174
1196
|
return !1;
|
|
1175
1197
|
}
|
|
1176
1198
|
function K(e) {
|
|
1177
|
-
return Rt(e) ? e :
|
|
1199
|
+
return Rt(e) ? e : $r(e) ? e.document : (e == null ? void 0 : e.ownerDocument) ?? document;
|
|
1178
1200
|
}
|
|
1179
|
-
function
|
|
1201
|
+
function Wr(e) {
|
|
1180
1202
|
return K(e).documentElement;
|
|
1181
1203
|
}
|
|
1182
1204
|
function U(e) {
|
|
@@ -1192,32 +1214,32 @@ function Hn(e) {
|
|
|
1192
1214
|
}
|
|
1193
1215
|
return t;
|
|
1194
1216
|
}
|
|
1195
|
-
function
|
|
1217
|
+
function zr(e) {
|
|
1196
1218
|
if ($n(e) === "html") return e;
|
|
1197
|
-
const t = e.assignedSlot || e.parentNode || Ae(e) && e.host ||
|
|
1219
|
+
const t = e.assignedSlot || e.parentNode || Ae(e) && e.host || Wr(e);
|
|
1198
1220
|
return Ae(t) ? t.host : t;
|
|
1199
1221
|
}
|
|
1200
1222
|
var it = /* @__PURE__ */ new WeakMap();
|
|
1201
|
-
function
|
|
1223
|
+
function qr(e) {
|
|
1202
1224
|
return it.has(e) || it.set(e, U(e).getComputedStyle(e)), it.get(e);
|
|
1203
1225
|
}
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1226
|
+
var Yr = () => typeof document < "u";
|
|
1227
|
+
function Xr() {
|
|
1206
1228
|
const e = navigator.userAgentData;
|
|
1207
1229
|
return (e == null ? void 0 : e.platform) ?? navigator.platform;
|
|
1208
1230
|
}
|
|
1209
|
-
var jn = (e) =>
|
|
1210
|
-
function
|
|
1231
|
+
var jn = (e) => Yr() && e.test(Xr()), Vn = () => jn(/^Mac/), Zr = () => jn(/iP(hone|ad|od)|iOS/);
|
|
1232
|
+
function Jr(e) {
|
|
1211
1233
|
var t, n, s;
|
|
1212
1234
|
return ((t = e.composedPath) == null ? void 0 : t.call(e)) ?? ((s = (n = e.nativeEvent) == null ? void 0 : n.composedPath) == null ? void 0 : s.call(n));
|
|
1213
1235
|
}
|
|
1214
1236
|
function z(e) {
|
|
1215
|
-
const t =
|
|
1237
|
+
const t = Jr(e);
|
|
1216
1238
|
return (t == null ? void 0 : t[0]) ?? e.target;
|
|
1217
1239
|
}
|
|
1218
|
-
var
|
|
1219
|
-
function
|
|
1220
|
-
const n =
|
|
1240
|
+
var Qr = (e) => e.button === 2 || Vn() && e.ctrlKey && e.button === 0, eo = (e) => "touches" in e && e.touches.length > 0;
|
|
1241
|
+
function to(e, t = "client") {
|
|
1242
|
+
const n = eo(e) ? e.touches[0] || e.changedTouches[0] : e;
|
|
1221
1243
|
return { x: n[`${t}X`], y: n[`${t}Y`] };
|
|
1222
1244
|
}
|
|
1223
1245
|
var A = (e, t, n, s) => {
|
|
@@ -1230,40 +1252,40 @@ function Gn(e, t) {
|
|
|
1230
1252
|
const { type: n = "HTMLInputElement", property: s = "value" } = t, r = U(e)[n].prototype;
|
|
1231
1253
|
return Object.getOwnPropertyDescriptor(r, s) ?? {};
|
|
1232
1254
|
}
|
|
1233
|
-
function
|
|
1255
|
+
function no(e) {
|
|
1234
1256
|
if (e.localName === "input") return "HTMLInputElement";
|
|
1235
1257
|
if (e.localName === "textarea") return "HTMLTextAreaElement";
|
|
1236
1258
|
if (e.localName === "select") return "HTMLSelectElement";
|
|
1237
1259
|
}
|
|
1238
|
-
function
|
|
1260
|
+
function so(e, t, n = "value") {
|
|
1239
1261
|
var r;
|
|
1240
|
-
const s =
|
|
1262
|
+
const s = no(e);
|
|
1241
1263
|
s && ((r = Gn(e, { type: s, property: n }).set) == null || r.call(e, t)), e.setAttribute(n, t);
|
|
1242
1264
|
}
|
|
1243
1265
|
function Un(e, t) {
|
|
1244
1266
|
var s;
|
|
1245
1267
|
(s = Gn(e, { type: "HTMLInputElement", property: "checked" }).set) == null || s.call(e, t), t ? e.setAttribute("checked", "") : e.removeAttribute("checked");
|
|
1246
1268
|
}
|
|
1247
|
-
function
|
|
1269
|
+
function ro(e, t) {
|
|
1248
1270
|
const { checked: n, bubbles: s = !0 } = t;
|
|
1249
1271
|
if (!e) return;
|
|
1250
1272
|
const r = U(e);
|
|
1251
1273
|
e instanceof r.HTMLInputElement && (Un(e, n), e.dispatchEvent(new r.Event("click", { bubbles: s })));
|
|
1252
1274
|
}
|
|
1253
|
-
function ro(e) {
|
|
1254
|
-
return oo(e) ? e.form : e.closest("form");
|
|
1255
|
-
}
|
|
1256
1275
|
function oo(e) {
|
|
1276
|
+
return io(e) ? e.form : e.closest("form");
|
|
1277
|
+
}
|
|
1278
|
+
function io(e) {
|
|
1257
1279
|
return e.matches("textarea, input, select, button");
|
|
1258
1280
|
}
|
|
1259
|
-
function
|
|
1281
|
+
function ao(e, t) {
|
|
1260
1282
|
if (!e) return;
|
|
1261
|
-
const n =
|
|
1283
|
+
const n = oo(e), s = (r) => {
|
|
1262
1284
|
r.defaultPrevented || t();
|
|
1263
1285
|
};
|
|
1264
1286
|
return n == null || n.addEventListener("reset", s, { passive: !0 }), () => n == null ? void 0 : n.removeEventListener("reset", s);
|
|
1265
1287
|
}
|
|
1266
|
-
function
|
|
1288
|
+
function co(e, t) {
|
|
1267
1289
|
const n = e == null ? void 0 : e.closest("fieldset");
|
|
1268
1290
|
if (!n) return;
|
|
1269
1291
|
t(n.disabled);
|
|
@@ -1273,12 +1295,12 @@ function ao(e, t) {
|
|
|
1273
1295
|
attributeFilter: ["disabled"]
|
|
1274
1296
|
}), () => r.disconnect();
|
|
1275
1297
|
}
|
|
1276
|
-
function
|
|
1298
|
+
function lo(e, t) {
|
|
1277
1299
|
if (!e) return;
|
|
1278
|
-
const { onFieldsetDisabledChange: n, onFormReset: s } = t, r = [
|
|
1300
|
+
const { onFieldsetDisabledChange: n, onFormReset: s } = t, r = [ao(e, s), co(e, n)];
|
|
1279
1301
|
return () => r.forEach((o) => o == null ? void 0 : o());
|
|
1280
1302
|
}
|
|
1281
|
-
var Kn = (e) => $(e) && e.tagName === "IFRAME",
|
|
1303
|
+
var Kn = (e) => $(e) && e.tagName === "IFRAME", uo = (e) => !Number.isNaN(parseInt(e.getAttribute("tabindex") || "0", 10)), fo = (e) => parseInt(e.getAttribute("tabindex") || "0", 10) < 0, Lt = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type", Wn = (e, t = !1) => {
|
|
1282
1304
|
if (!e) return [];
|
|
1283
1305
|
const n = Array.from(e.querySelectorAll(Lt));
|
|
1284
1306
|
(t == !0 || t == "if-empty" && n.length === 0) && $(e) && se(e) && n.unshift(e);
|
|
@@ -1291,7 +1313,7 @@ var Kn = (e) => $(e) && e.tagName === "IFRAME", lo = (e) => !Number.isNaN(parseI
|
|
|
1291
1313
|
}), r;
|
|
1292
1314
|
};
|
|
1293
1315
|
function se(e) {
|
|
1294
|
-
return !e || e.closest("[inert]") ? !1 : e.matches(Lt) &&
|
|
1316
|
+
return !e || e.closest("[inert]") ? !1 : e.matches(Lt) && Gr(e);
|
|
1295
1317
|
}
|
|
1296
1318
|
function zn(e, t) {
|
|
1297
1319
|
if (!e) return [];
|
|
@@ -1304,10 +1326,10 @@ function zn(e, t) {
|
|
|
1304
1326
|
}), s.length, s;
|
|
1305
1327
|
}
|
|
1306
1328
|
function ie(e) {
|
|
1307
|
-
return e != null && e.tabIndex > 0 ? !0 : se(e) && !
|
|
1329
|
+
return e != null && e.tabIndex > 0 ? !0 : se(e) && !fo(e);
|
|
1308
1330
|
}
|
|
1309
1331
|
function Te(e) {
|
|
1310
|
-
return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) ||
|
|
1332
|
+
return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) || Kr(e)) && !uo(e) ? 0 : e.tabIndex;
|
|
1311
1333
|
}
|
|
1312
1334
|
function Y(e) {
|
|
1313
1335
|
const t = globalThis.requestAnimationFrame(e);
|
|
@@ -1316,15 +1338,15 @@ function Y(e) {
|
|
|
1316
1338
|
};
|
|
1317
1339
|
}
|
|
1318
1340
|
function vt(e) {
|
|
1319
|
-
const t =
|
|
1320
|
-
return
|
|
1341
|
+
const t = zr(e);
|
|
1342
|
+
return Hr(t) ? K(t).body : $(t) && po(t) ? t : vt(t);
|
|
1321
1343
|
}
|
|
1322
|
-
var
|
|
1323
|
-
function
|
|
1344
|
+
var ho = /auto|scroll|overlay|hidden|clip/;
|
|
1345
|
+
function po(e) {
|
|
1324
1346
|
const t = U(e), { overflow: n, overflowX: s, overflowY: r, display: o } = t.getComputedStyle(e);
|
|
1325
|
-
return
|
|
1347
|
+
return ho.test(n + r + s) && !["inline", "contents"].includes(o);
|
|
1326
1348
|
}
|
|
1327
|
-
function
|
|
1349
|
+
function go(e) {
|
|
1328
1350
|
const {
|
|
1329
1351
|
pointerNode: t,
|
|
1330
1352
|
keyboardNode: n = t,
|
|
@@ -1337,7 +1359,7 @@ function po(e) {
|
|
|
1337
1359
|
const i = U(t), u = K(t);
|
|
1338
1360
|
let a = Be, l = Be, d = Be;
|
|
1339
1361
|
const f = (N) => ({
|
|
1340
|
-
point:
|
|
1362
|
+
point: to(N),
|
|
1341
1363
|
event: N
|
|
1342
1364
|
});
|
|
1343
1365
|
function p(N) {
|
|
@@ -1348,11 +1370,11 @@ function po(e) {
|
|
|
1348
1370
|
}
|
|
1349
1371
|
const w = A(t, "pointerdown", (N) => {
|
|
1350
1372
|
l();
|
|
1351
|
-
const
|
|
1373
|
+
const x = A(i, "pointerup", (b) => {
|
|
1352
1374
|
const T = z(b);
|
|
1353
1375
|
be(t, T) ? s == null || s(f(b)) : o == null || o(f(b));
|
|
1354
1376
|
}, { passive: !s }), D = A(i, "pointercancel", g, { passive: !o });
|
|
1355
|
-
l = ot(
|
|
1377
|
+
l = ot(x, D), u.activeElement === n && N.pointerType === "mouse" && N.preventDefault(), p(N);
|
|
1356
1378
|
}, { passive: !r }), v = A(n, "focus", O);
|
|
1357
1379
|
a = ot(w, v);
|
|
1358
1380
|
function O() {
|
|
@@ -1364,19 +1386,19 @@ function po(e) {
|
|
|
1364
1386
|
s == null || s(ee), o == null || o(ee);
|
|
1365
1387
|
};
|
|
1366
1388
|
l(), l = A(n, "keyup", T);
|
|
1367
|
-
const
|
|
1368
|
-
p(
|
|
1389
|
+
const P = new i.PointerEvent("pointerdown");
|
|
1390
|
+
p(P);
|
|
1369
1391
|
}, X = () => {
|
|
1370
1392
|
const b = new i.PointerEvent("pointercancel");
|
|
1371
1393
|
g(b);
|
|
1372
|
-
},
|
|
1373
|
-
d = ot(
|
|
1394
|
+
}, x = A(n, "keydown", N), D = A(n, "blur", X);
|
|
1395
|
+
d = ot(x, D);
|
|
1374
1396
|
}
|
|
1375
1397
|
return () => {
|
|
1376
1398
|
a(), l(), d();
|
|
1377
1399
|
};
|
|
1378
1400
|
}
|
|
1379
|
-
function
|
|
1401
|
+
function mo(e, t) {
|
|
1380
1402
|
return Array.from((e == null ? void 0 : e.querySelectorAll(t)) ?? []);
|
|
1381
1403
|
}
|
|
1382
1404
|
function Ft(e) {
|
|
@@ -1391,13 +1413,13 @@ function Ft(e) {
|
|
|
1391
1413
|
isActiveElement: (n, s) => s === t.getActiveElement(n),
|
|
1392
1414
|
getById: (n, s) => t.getRootNode(n).getElementById(s),
|
|
1393
1415
|
setValue: (n, s) => {
|
|
1394
|
-
n == null || s == null ||
|
|
1416
|
+
n == null || s == null || so(n, s.toString());
|
|
1395
1417
|
}
|
|
1396
1418
|
};
|
|
1397
1419
|
return { ...t, ...e };
|
|
1398
1420
|
}
|
|
1399
1421
|
var at = /* @__PURE__ */ new WeakMap();
|
|
1400
|
-
function
|
|
1422
|
+
function yo(e, t, n) {
|
|
1401
1423
|
at.has(e) || at.set(e, /* @__PURE__ */ new Map());
|
|
1402
1424
|
const s = at.get(e), r = s.get(t);
|
|
1403
1425
|
if (!r)
|
|
@@ -1412,8 +1434,8 @@ function mo(e, t, n) {
|
|
|
1412
1434
|
s.get(t) === c && (o(), s.set(t, r));
|
|
1413
1435
|
};
|
|
1414
1436
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return e ?
|
|
1437
|
+
function vo(e, t) {
|
|
1438
|
+
return e ? yo(e, "style", () => {
|
|
1417
1439
|
const s = e.style.cssText;
|
|
1418
1440
|
return Object.assign(e.style, t), () => {
|
|
1419
1441
|
e.style.cssText = s;
|
|
@@ -1421,7 +1443,7 @@ function yo(e, t) {
|
|
|
1421
1443
|
}) : () => {
|
|
1422
1444
|
};
|
|
1423
1445
|
}
|
|
1424
|
-
var
|
|
1446
|
+
var bo = {
|
|
1425
1447
|
border: "0",
|
|
1426
1448
|
clip: "rect(0 0 0 0)",
|
|
1427
1449
|
height: "1px",
|
|
@@ -1432,8 +1454,8 @@ var vo = {
|
|
|
1432
1454
|
width: "1px",
|
|
1433
1455
|
whiteSpace: "nowrap",
|
|
1434
1456
|
wordWrap: "normal"
|
|
1435
|
-
},
|
|
1436
|
-
function
|
|
1457
|
+
}, Eo = 1e3 / 60;
|
|
1458
|
+
function To(e, t) {
|
|
1437
1459
|
const n = e();
|
|
1438
1460
|
if ($(n) && n.isConnected)
|
|
1439
1461
|
return t(n), () => {
|
|
@@ -1442,31 +1464,31 @@ function Eo(e, t) {
|
|
|
1442
1464
|
const s = setInterval(() => {
|
|
1443
1465
|
const r = e();
|
|
1444
1466
|
$(r) && r.isConnected && (t(r), clearInterval(s));
|
|
1445
|
-
},
|
|
1467
|
+
}, Eo);
|
|
1446
1468
|
return () => clearInterval(s);
|
|
1447
1469
|
}
|
|
1448
1470
|
}
|
|
1449
|
-
function
|
|
1471
|
+
function No(e, t) {
|
|
1450
1472
|
const n = [];
|
|
1451
1473
|
return e == null || e.forEach((s) => {
|
|
1452
|
-
const r =
|
|
1474
|
+
const r = To(s, t);
|
|
1453
1475
|
n.push(r);
|
|
1454
1476
|
}), () => {
|
|
1455
1477
|
n.forEach((s) => s());
|
|
1456
1478
|
};
|
|
1457
1479
|
}
|
|
1458
|
-
function
|
|
1480
|
+
function Co(e) {
|
|
1459
1481
|
return e.mozInputSource === 0 && e.isTrusted ? !0 : e.detail === 0 && !e.pointerType;
|
|
1460
1482
|
}
|
|
1461
|
-
function
|
|
1483
|
+
function wo(e) {
|
|
1462
1484
|
return !(e.metaKey || !Vn() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
1463
1485
|
}
|
|
1464
|
-
var
|
|
1486
|
+
var xo = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
|
|
1465
1487
|
function Po(e, t, n) {
|
|
1466
1488
|
const s = n ? z(n) : null, r = U(s);
|
|
1467
|
-
return e = e || s instanceof r.HTMLInputElement && !
|
|
1489
|
+
return e = e || s instanceof r.HTMLInputElement && !xo.has(s == null ? void 0 : s.type) || s instanceof r.HTMLTextAreaElement || s instanceof r.HTMLElement && s.isContentEditable, !(e && t === "keyboard" && n instanceof r.KeyboardEvent && !Reflect.has(Oo, n.key));
|
|
1468
1490
|
}
|
|
1469
|
-
var de = null, bt = /* @__PURE__ */ new Set(), Se = /* @__PURE__ */ new Map(), le = !1, Et = !1,
|
|
1491
|
+
var de = null, bt = /* @__PURE__ */ new Set(), Se = /* @__PURE__ */ new Map(), le = !1, Et = !1, Oo = {
|
|
1470
1492
|
Tab: !0,
|
|
1471
1493
|
Escape: !0
|
|
1472
1494
|
};
|
|
@@ -1475,13 +1497,13 @@ function nt(e, t) {
|
|
|
1475
1497
|
n(e, t);
|
|
1476
1498
|
}
|
|
1477
1499
|
function Ze(e) {
|
|
1478
|
-
le = !0,
|
|
1500
|
+
le = !0, wo(e) && (de = "keyboard", nt("keyboard", e));
|
|
1479
1501
|
}
|
|
1480
1502
|
function W(e) {
|
|
1481
1503
|
de = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (le = !0, nt("pointer", e));
|
|
1482
1504
|
}
|
|
1483
1505
|
function qn(e) {
|
|
1484
|
-
|
|
1506
|
+
Co(e) && (le = !0, de = "virtual");
|
|
1485
1507
|
}
|
|
1486
1508
|
function Yn(e) {
|
|
1487
1509
|
const t = z(e);
|
|
@@ -1490,7 +1512,7 @@ function Yn(e) {
|
|
|
1490
1512
|
function Xn() {
|
|
1491
1513
|
le = !1, Et = !0;
|
|
1492
1514
|
}
|
|
1493
|
-
function
|
|
1515
|
+
function So(e) {
|
|
1494
1516
|
if (typeof window > "u" || Se.get(U(e)))
|
|
1495
1517
|
return;
|
|
1496
1518
|
const t = U(e), n = K(e);
|
|
@@ -1500,21 +1522,21 @@ function Oo(e) {
|
|
|
1500
1522
|
}, n.addEventListener("keydown", Ze, !0), n.addEventListener("keyup", Ze, !0), n.addEventListener("click", qn, !0), t.addEventListener("focus", Yn, !0), t.addEventListener("blur", Xn, !1), typeof t.PointerEvent < "u" ? (n.addEventListener("pointerdown", W, !0), n.addEventListener("pointermove", W, !0), n.addEventListener("pointerup", W, !0)) : (n.addEventListener("mousedown", W, !0), n.addEventListener("mousemove", W, !0), n.addEventListener("mouseup", W, !0)), t.addEventListener(
|
|
1501
1523
|
"beforeunload",
|
|
1502
1524
|
() => {
|
|
1503
|
-
|
|
1525
|
+
ko(e);
|
|
1504
1526
|
},
|
|
1505
1527
|
{ once: !0 }
|
|
1506
1528
|
), Se.set(t, { focus: s });
|
|
1507
1529
|
}
|
|
1508
|
-
var
|
|
1530
|
+
var ko = (e, t) => {
|
|
1509
1531
|
const n = U(e), s = K(e);
|
|
1510
1532
|
Se.has(n) && (n.HTMLElement.prototype.focus = Se.get(n).focus, s.removeEventListener("keydown", Ze, !0), s.removeEventListener("keyup", Ze, !0), s.removeEventListener("click", qn, !0), n.removeEventListener("focus", Yn, !0), n.removeEventListener("blur", Xn, !1), typeof n.PointerEvent < "u" ? (s.removeEventListener("pointerdown", W, !0), s.removeEventListener("pointermove", W, !0), s.removeEventListener("pointerup", W, !0)) : (s.removeEventListener("mousedown", W, !0), s.removeEventListener("mousemove", W, !0), s.removeEventListener("mouseup", W, !0)), Se.delete(n));
|
|
1511
1533
|
};
|
|
1512
1534
|
function Tt() {
|
|
1513
1535
|
return de === "keyboard";
|
|
1514
1536
|
}
|
|
1515
|
-
function
|
|
1537
|
+
function Io(e = {}) {
|
|
1516
1538
|
const { isTextInput: t, autoFocus: n, onChange: s, root: r } = e;
|
|
1517
|
-
|
|
1539
|
+
So(r), s == null || s({ isFocusVisible: n || Tt(), modality: de });
|
|
1518
1540
|
const o = (c, i) => {
|
|
1519
1541
|
Po(!!t, c, i) && (s == null || s({ isFocusVisible: Tt(), modality: c }));
|
|
1520
1542
|
};
|
|
@@ -1522,7 +1544,7 @@ function ko(e = {}) {
|
|
|
1522
1544
|
bt.delete(o);
|
|
1523
1545
|
};
|
|
1524
1546
|
}
|
|
1525
|
-
var
|
|
1547
|
+
var Do = ye("checkbox").parts("root", "label", "control", "indicator"), $e = Do.build(), L = Ft({
|
|
1526
1548
|
getRootId: (e) => {
|
|
1527
1549
|
var t;
|
|
1528
1550
|
return ((t = e.ids) == null ? void 0 : t.root) ?? `checkbox:${e.id}`;
|
|
@@ -1542,7 +1564,7 @@ var Io = ye("checkbox").parts("root", "label", "control", "indicator"), $e = Io.
|
|
|
1542
1564
|
getRootEl: (e) => L.getById(e, L.getRootId(e)),
|
|
1543
1565
|
getHiddenInputEl: (e) => L.getById(e, L.getHiddenInputId(e))
|
|
1544
1566
|
});
|
|
1545
|
-
function
|
|
1567
|
+
function Ao(e, t, n) {
|
|
1546
1568
|
const s = e.context.isDisabled, r = e.context.readOnly, o = !s && e.context.focused, c = !s && e.context.focusVisible, i = e.context.isChecked, u = e.context.isIndeterminate, a = {
|
|
1547
1569
|
"data-active": j(e.context.active),
|
|
1548
1570
|
"data-focus": j(o),
|
|
@@ -1620,7 +1642,7 @@ function Do(e, t, n) {
|
|
|
1620
1642
|
name: e.context.name,
|
|
1621
1643
|
form: e.context.form,
|
|
1622
1644
|
value: e.context.value,
|
|
1623
|
-
style:
|
|
1645
|
+
style: bo,
|
|
1624
1646
|
onFocus() {
|
|
1625
1647
|
const l = Tt();
|
|
1626
1648
|
t({ type: "CONTEXT.SET", context: { focused: !0, focusVisible: l } });
|
|
@@ -1641,7 +1663,7 @@ function Do(e, t, n) {
|
|
|
1641
1663
|
};
|
|
1642
1664
|
}
|
|
1643
1665
|
var { not: Xt } = Rn;
|
|
1644
|
-
function
|
|
1666
|
+
function Ro(e) {
|
|
1645
1667
|
const t = ue(e);
|
|
1646
1668
|
return Re(
|
|
1647
1669
|
{
|
|
@@ -1699,7 +1721,7 @@ function Ao(e) {
|
|
|
1699
1721
|
activities: {
|
|
1700
1722
|
trackPressEvent(n) {
|
|
1701
1723
|
if (!n.isDisabled)
|
|
1702
|
-
return
|
|
1724
|
+
return go({
|
|
1703
1725
|
pointerNode: L.getRootEl(n),
|
|
1704
1726
|
keyboardNode: L.getHiddenInputEl(n),
|
|
1705
1727
|
isValidKey: (s) => s.key === " ",
|
|
@@ -1710,10 +1732,10 @@ function Ao(e) {
|
|
|
1710
1732
|
},
|
|
1711
1733
|
trackFocusVisible(n) {
|
|
1712
1734
|
if (!n.isDisabled)
|
|
1713
|
-
return
|
|
1735
|
+
return Io({ root: L.getRootNode(n) });
|
|
1714
1736
|
},
|
|
1715
1737
|
trackFormControlState(n, s, { send: r, initialContext: o }) {
|
|
1716
|
-
return
|
|
1738
|
+
return lo(L.getHiddenInputEl(n), {
|
|
1717
1739
|
onFieldsetDisabledChange(c) {
|
|
1718
1740
|
n.fieldsetDisabled = c;
|
|
1719
1741
|
},
|
|
@@ -1743,7 +1765,7 @@ function Ao(e) {
|
|
|
1743
1765
|
},
|
|
1744
1766
|
dispatchChangeEvent(n) {
|
|
1745
1767
|
const s = L.getHiddenInputEl(n);
|
|
1746
|
-
|
|
1768
|
+
ro(s, { checked: Zt(n.checked) });
|
|
1747
1769
|
}
|
|
1748
1770
|
}
|
|
1749
1771
|
}
|
|
@@ -1755,14 +1777,14 @@ function Nt(e) {
|
|
|
1755
1777
|
function Zt(e) {
|
|
1756
1778
|
return Nt(e) ? !1 : !!e;
|
|
1757
1779
|
}
|
|
1758
|
-
var
|
|
1780
|
+
var Lo = {
|
|
1759
1781
|
change: (e) => {
|
|
1760
1782
|
var t;
|
|
1761
1783
|
(t = e.onCheckedChange) == null || t.call(e, { checked: e.checked });
|
|
1762
1784
|
}
|
|
1763
1785
|
}, Jt = {
|
|
1764
1786
|
checked: (e, t) => {
|
|
1765
|
-
Ot(e.checked, t) || (e.checked = t,
|
|
1787
|
+
Ot(e.checked, t) || (e.checked = t, Lo.change(e));
|
|
1766
1788
|
}
|
|
1767
1789
|
};
|
|
1768
1790
|
kt()([
|
|
@@ -1781,7 +1803,7 @@ kt()([
|
|
|
1781
1803
|
"value"
|
|
1782
1804
|
]);
|
|
1783
1805
|
function ke(e, t = {}) {
|
|
1784
|
-
const { sync: n = !1 } = t, s =
|
|
1806
|
+
const { sync: n = !1 } = t, s = Fo(e);
|
|
1785
1807
|
return pn(
|
|
1786
1808
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
1787
1809
|
(...r) => {
|
|
@@ -1794,16 +1816,16 @@ function ke(e, t = {}) {
|
|
|
1794
1816
|
[n, s]
|
|
1795
1817
|
);
|
|
1796
1818
|
}
|
|
1797
|
-
function
|
|
1819
|
+
function Fo(e) {
|
|
1798
1820
|
const t = re(e);
|
|
1799
1821
|
return t.current = e, t;
|
|
1800
1822
|
}
|
|
1801
|
-
const [
|
|
1823
|
+
const [Ha, Mo] = J({
|
|
1802
1824
|
name: "CheckboxGroupContext",
|
|
1803
1825
|
hookName: "useCheckboxGroupContext",
|
|
1804
1826
|
providerName: "<CheckboxGroupProvider />",
|
|
1805
1827
|
strict: !1
|
|
1806
|
-
}), [
|
|
1828
|
+
}), [ja, Zn] = J({
|
|
1807
1829
|
name: "FieldContext",
|
|
1808
1830
|
hookName: "useFieldContext",
|
|
1809
1831
|
providerName: "<FieldProvider />",
|
|
@@ -1827,7 +1849,7 @@ const es = R((e, t) => {
|
|
|
1827
1849
|
return /* @__PURE__ */ h(F.span, { ...s, ref: t });
|
|
1828
1850
|
});
|
|
1829
1851
|
es.displayName = "CheckboxLabel";
|
|
1830
|
-
const [
|
|
1852
|
+
const [Va, Mt] = J({
|
|
1831
1853
|
name: "EnvironmentContext",
|
|
1832
1854
|
hookName: "useEnvironmentContext",
|
|
1833
1855
|
providerName: "<EnvironmentProvider />",
|
|
@@ -1837,14 +1859,14 @@ const [Ha, Mt] = J({
|
|
|
1837
1859
|
getDocument: () => document,
|
|
1838
1860
|
getWindow: () => window
|
|
1839
1861
|
}
|
|
1840
|
-
}), [
|
|
1862
|
+
}), [Ga, ts] = J({
|
|
1841
1863
|
name: "LocaleContext",
|
|
1842
1864
|
hookName: "useLocaleContext",
|
|
1843
1865
|
providerName: "<LocaleProvider />",
|
|
1844
1866
|
strict: !1,
|
|
1845
1867
|
defaultValue: { dir: "ltr", locale: "en-US" }
|
|
1846
|
-
}),
|
|
1847
|
-
const t =
|
|
1868
|
+
}), _o = (e = {}) => {
|
|
1869
|
+
const t = Mo(), n = Zn(), s = ze(() => k(e, (t == null ? void 0 : t.getItemProps({ value: e.value })) ?? {}), [e, t]), { getRootNode: r } = Mt(), { dir: o } = ts(), c = {
|
|
1848
1870
|
id: mn(),
|
|
1849
1871
|
ids: {
|
|
1850
1872
|
label: n == null ? void 0 : n.ids.label,
|
|
@@ -1862,8 +1884,8 @@ const [Ha, Mt] = J({
|
|
|
1862
1884
|
...c,
|
|
1863
1885
|
checked: s.checked,
|
|
1864
1886
|
onCheckedChange: ke(s.onCheckedChange, { sync: !0 })
|
|
1865
|
-
}, [u, a] = et(
|
|
1866
|
-
return
|
|
1887
|
+
}, [u, a] = et(Ro(c), { context: i });
|
|
1888
|
+
return Ao(u, a, Le);
|
|
1867
1889
|
}, ns = R((e, t) => {
|
|
1868
1890
|
const [n, s] = At()(e, [
|
|
1869
1891
|
"checked",
|
|
@@ -1878,11 +1900,11 @@ const [Ha, Mt] = J({
|
|
|
1878
1900
|
"readOnly",
|
|
1879
1901
|
"required",
|
|
1880
1902
|
"value"
|
|
1881
|
-
]), r =
|
|
1882
|
-
return /* @__PURE__ */ h(
|
|
1903
|
+
]), r = _o(n), o = k(r.getRootProps(), s);
|
|
1904
|
+
return /* @__PURE__ */ h(_s, { value: r, children: /* @__PURE__ */ h(F.label, { ...o, ref: t }) });
|
|
1883
1905
|
});
|
|
1884
1906
|
ns.displayName = "CheckboxRoot";
|
|
1885
|
-
function
|
|
1907
|
+
function Ua({
|
|
1886
1908
|
children: e,
|
|
1887
1909
|
checked: t,
|
|
1888
1910
|
defaultChecked: n,
|
|
@@ -1944,12 +1966,12 @@ function Va({
|
|
|
1944
1966
|
}
|
|
1945
1967
|
);
|
|
1946
1968
|
}
|
|
1947
|
-
const [
|
|
1969
|
+
const [Bo, $o] = J({
|
|
1948
1970
|
name: "RenderStrategyContext",
|
|
1949
1971
|
hookName: "useRenderStrategyContext",
|
|
1950
1972
|
providerName: "<RenderStrategyPropsProvider />"
|
|
1951
|
-
}),
|
|
1952
|
-
function
|
|
1973
|
+
}), Ho = (e) => At()(e, ["lazyMount", "unmountOnExit"]);
|
|
1974
|
+
function jo(e, t, n) {
|
|
1953
1975
|
const s = e.matches("mounted", "unmountSuspended");
|
|
1954
1976
|
return {
|
|
1955
1977
|
skip: !e.context.initial && s,
|
|
@@ -1962,7 +1984,7 @@ function Ho(e, t, n) {
|
|
|
1962
1984
|
}
|
|
1963
1985
|
};
|
|
1964
1986
|
}
|
|
1965
|
-
function
|
|
1987
|
+
function Vo(e) {
|
|
1966
1988
|
return Re(
|
|
1967
1989
|
{
|
|
1968
1990
|
initial: e.present ? "mounted" : "unmounted",
|
|
@@ -2030,7 +2052,7 @@ function jo(e) {
|
|
|
2030
2052
|
delays: {
|
|
2031
2053
|
ANIMATION_DURATION(t) {
|
|
2032
2054
|
var n, s;
|
|
2033
|
-
return Qt((n = t.styles) == null ? void 0 : n.animationDuration) + Qt((s = t.styles) == null ? void 0 : s.animationDelay) +
|
|
2055
|
+
return Qt((n = t.styles) == null ? void 0 : n.animationDuration) + Qt((s = t.styles) == null ? void 0 : s.animationDelay) + Go;
|
|
2034
2056
|
}
|
|
2035
2057
|
},
|
|
2036
2058
|
actions: {
|
|
@@ -2105,14 +2127,14 @@ function He(e) {
|
|
|
2105
2127
|
function Qt(e) {
|
|
2106
2128
|
return parseFloat(e || "0") * 1e3;
|
|
2107
2129
|
}
|
|
2108
|
-
var
|
|
2130
|
+
var Go = 16.667;
|
|
2109
2131
|
kt()(["onExitComplete", "present", "immediate"]);
|
|
2110
2132
|
const ss = (e) => {
|
|
2111
2133
|
const { lazyMount: t, unmountOnExit: n, present: s, ...r } = e, o = re(!1), c = {
|
|
2112
2134
|
...r,
|
|
2113
2135
|
present: s,
|
|
2114
2136
|
onExitComplete: ke(e.onExitComplete)
|
|
2115
|
-
}, [i, u] = et(
|
|
2137
|
+
}, [i, u] = et(Vo(c), { context: c }), a = jo(i, u);
|
|
2116
2138
|
a.present && (o.current = !0);
|
|
2117
2139
|
const l = !a.present && !o.current && t || n && !a.present && o.current, d = () => ({
|
|
2118
2140
|
"data-state": s ? "open" : "closed",
|
|
@@ -2124,12 +2146,12 @@ const ss = (e) => {
|
|
|
2124
2146
|
present: a.present,
|
|
2125
2147
|
unmounted: l
|
|
2126
2148
|
};
|
|
2127
|
-
}, [
|
|
2149
|
+
}, [Uo, fe] = J({
|
|
2128
2150
|
name: "DialogContext",
|
|
2129
2151
|
hookName: "useDialogContext",
|
|
2130
2152
|
providerName: "<DialogProvider />"
|
|
2131
2153
|
}), rs = R((e, t) => {
|
|
2132
|
-
const n = fe(), s =
|
|
2154
|
+
const n = fe(), s = $o(), r = ss({ ...s, present: n.open }), o = k(n.getBackdropProps(), r.getPresenceProps(), e);
|
|
2133
2155
|
return r.unmounted ? null : /* @__PURE__ */ h(F.div, { ...o, ref: Dt(r.ref, t) });
|
|
2134
2156
|
});
|
|
2135
2157
|
rs.displayName = "DialogBackdrop";
|
|
@@ -2140,7 +2162,7 @@ const os = R(
|
|
|
2140
2162
|
}
|
|
2141
2163
|
);
|
|
2142
2164
|
os.displayName = "DialogCloseTrigger";
|
|
2143
|
-
const [
|
|
2165
|
+
const [Ko, _t] = J({
|
|
2144
2166
|
name: "PresenceContext",
|
|
2145
2167
|
hookName: "usePresenceContext",
|
|
2146
2168
|
providerName: "<PresenceProvider />"
|
|
@@ -2161,19 +2183,19 @@ const cs = R((e, t) => {
|
|
|
2161
2183
|
return _t().unmounted ? null : /* @__PURE__ */ h(F.div, { ...s, ref: t });
|
|
2162
2184
|
});
|
|
2163
2185
|
cs.displayName = "DialogPositioner";
|
|
2164
|
-
const
|
|
2186
|
+
const Wo = (e) => At()(e, [
|
|
2165
2187
|
"immediate",
|
|
2166
2188
|
"lazyMount",
|
|
2167
2189
|
"onExitComplete",
|
|
2168
2190
|
"present",
|
|
2169
2191
|
"unmountOnExit"
|
|
2170
2192
|
]);
|
|
2171
|
-
var pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Ve = {}, ct = 0, ls = (e) => e && (e.host || ls(e.parentNode)),
|
|
2193
|
+
var pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Ve = {}, ct = 0, ls = (e) => e && (e.host || ls(e.parentNode)), zo = (e, t) => t.map((n) => {
|
|
2172
2194
|
if (e.contains(n)) return n;
|
|
2173
2195
|
const s = ls(n);
|
|
2174
2196
|
return s && e.contains(s) ? s : (console.error("[zag-js > ariaHidden] target", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
2175
|
-
}).filter((n) => !!n),
|
|
2176
|
-
const { parentNode: n, markerName: s, controlAttribute: r, explicitBooleanValue: o } = t, c =
|
|
2197
|
+
}).filter((n) => !!n), qo = (e) => e.localName === "next-route-announcer" || e.localName === "script" || e.hasAttribute("aria-live") ? !0 : e.matches("[data-live-announcer]"), Yo = (e, t) => {
|
|
2198
|
+
const { parentNode: n, markerName: s, controlAttribute: r, explicitBooleanValue: o } = t, c = zo(n, Array.isArray(e) ? e : [e]);
|
|
2177
2199
|
Ve[s] || (Ve[s] = /* @__PURE__ */ new WeakMap());
|
|
2178
2200
|
const i = Ve[s], u = [], a = /* @__PURE__ */ new Set(), l = new Set(c), d = (p) => {
|
|
2179
2201
|
!p || a.has(p) || (a.add(p), d(p.parentNode));
|
|
@@ -2185,7 +2207,7 @@ var pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Ve =
|
|
|
2185
2207
|
f(g);
|
|
2186
2208
|
else
|
|
2187
2209
|
try {
|
|
2188
|
-
if (
|
|
2210
|
+
if (qo(g)) return;
|
|
2189
2211
|
const m = g.getAttribute(r), w = o ? m === "true" : m !== null && m !== "false", v = (pe.get(g) || 0) + 1, O = (i.get(g) || 0) + 1;
|
|
2190
2212
|
pe.set(g, v), i.set(g, O), u.push(g), v === 1 && w && je.set(g, !0), O === 1 && g.setAttribute(s, ""), w || g.setAttribute(r, o ? "true" : "");
|
|
2191
2213
|
} catch (m) {
|
|
@@ -2199,30 +2221,30 @@ var pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Ve =
|
|
|
2199
2221
|
pe.set(p, g), i.set(p, m), g || (je.has(p) || p.removeAttribute(r), je.delete(p)), m || p.removeAttribute(s);
|
|
2200
2222
|
}), ct--, ct || (pe = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Ve = {});
|
|
2201
2223
|
};
|
|
2202
|
-
},
|
|
2224
|
+
}, Xo = (e) => (Array.isArray(e) ? e[0] : e).ownerDocument.body, Zo = (e, t = Xo(e), n = "data-aria-hidden") => {
|
|
2203
2225
|
if (t)
|
|
2204
|
-
return
|
|
2226
|
+
return Yo(e, {
|
|
2205
2227
|
parentNode: t,
|
|
2206
2228
|
markerName: n,
|
|
2207
2229
|
controlAttribute: "aria-hidden",
|
|
2208
2230
|
explicitBooleanValue: !0
|
|
2209
2231
|
});
|
|
2210
|
-
},
|
|
2232
|
+
}, Jo = (e) => {
|
|
2211
2233
|
const t = requestAnimationFrame(() => e());
|
|
2212
2234
|
return () => cancelAnimationFrame(t);
|
|
2213
2235
|
};
|
|
2214
|
-
function
|
|
2215
|
-
const { defer: n = !0 } = t, s = n ?
|
|
2236
|
+
function Qo(e, t = {}) {
|
|
2237
|
+
const { defer: n = !0 } = t, s = n ? Jo : (o) => o(), r = [];
|
|
2216
2238
|
return r.push(
|
|
2217
2239
|
s(() => {
|
|
2218
2240
|
const c = (typeof e == "function" ? e() : e).filter(Boolean);
|
|
2219
|
-
c.length !== 0 && r.push(
|
|
2241
|
+
c.length !== 0 && r.push(Zo(c));
|
|
2220
2242
|
})
|
|
2221
2243
|
), () => {
|
|
2222
2244
|
r.forEach((o) => o == null ? void 0 : o());
|
|
2223
2245
|
};
|
|
2224
2246
|
}
|
|
2225
|
-
function
|
|
2247
|
+
function ei(e) {
|
|
2226
2248
|
const t = {
|
|
2227
2249
|
each(n) {
|
|
2228
2250
|
var s;
|
|
@@ -2255,7 +2277,7 @@ function Qo(e) {
|
|
|
2255
2277
|
};
|
|
2256
2278
|
return t;
|
|
2257
2279
|
}
|
|
2258
|
-
function
|
|
2280
|
+
function ti(e) {
|
|
2259
2281
|
const t = e.frameElement != null ? e.parent : null;
|
|
2260
2282
|
return {
|
|
2261
2283
|
addEventListener: (n, s, r) => {
|
|
@@ -2279,18 +2301,18 @@ function ei(e) {
|
|
|
2279
2301
|
};
|
|
2280
2302
|
}
|
|
2281
2303
|
var en = "pointerdown.outside", tn = "focus.outside";
|
|
2282
|
-
function
|
|
2304
|
+
function ni(e) {
|
|
2283
2305
|
for (const t of e)
|
|
2284
2306
|
if ($(t) && se(t)) return !0;
|
|
2285
2307
|
return !1;
|
|
2286
2308
|
}
|
|
2287
2309
|
var us = (e) => "clientY" in e;
|
|
2288
|
-
function
|
|
2310
|
+
function si(e, t) {
|
|
2289
2311
|
if (!us(t) || !e) return !1;
|
|
2290
2312
|
const n = e.getBoundingClientRect();
|
|
2291
2313
|
return n.width === 0 || n.height === 0 ? !1 : n.top <= t.clientY && t.clientY <= n.top + n.height && n.left <= t.clientX && t.clientX <= n.left + n.width;
|
|
2292
2314
|
}
|
|
2293
|
-
function
|
|
2315
|
+
function ri(e, t) {
|
|
2294
2316
|
return e.y <= t.y && t.y <= e.y + e.height && e.x <= t.x && t.x <= e.x + e.width;
|
|
2295
2317
|
}
|
|
2296
2318
|
function nn(e, t) {
|
|
@@ -2304,19 +2326,19 @@ function nn(e, t) {
|
|
|
2304
2326
|
x: e.clientX,
|
|
2305
2327
|
y: e.clientY
|
|
2306
2328
|
};
|
|
2307
|
-
return
|
|
2329
|
+
return ri(c, i) ? s || o : !1;
|
|
2308
2330
|
}
|
|
2309
|
-
function
|
|
2331
|
+
function oi(e, t) {
|
|
2310
2332
|
const { exclude: n, onFocusOutside: s, onPointerDownOutside: r, onInteractOutside: o, defer: c } = t;
|
|
2311
2333
|
if (!e) return;
|
|
2312
|
-
const i = K(e), u = U(e), a =
|
|
2334
|
+
const i = K(e), u = U(e), a = ei(u), l = ti(u);
|
|
2313
2335
|
function d(v) {
|
|
2314
2336
|
const O = z(v);
|
|
2315
|
-
if (!$(O) || !O.isConnected || be(e, O) ||
|
|
2337
|
+
if (!$(O) || !O.isConnected || be(e, O) || si(e, v)) return !1;
|
|
2316
2338
|
const N = i.querySelector(`[aria-controls="${e.id}"]`);
|
|
2317
2339
|
if (N) {
|
|
2318
|
-
const
|
|
2319
|
-
if (nn(v,
|
|
2340
|
+
const x = vt(N);
|
|
2341
|
+
if (nn(v, x)) return !1;
|
|
2320
2342
|
}
|
|
2321
2343
|
const X = vt(e);
|
|
2322
2344
|
return nn(v, X) ? !1 : !(n != null && n(O));
|
|
@@ -2324,8 +2346,8 @@ function ri(e, t) {
|
|
|
2324
2346
|
const f = /* @__PURE__ */ new Set();
|
|
2325
2347
|
function p(v) {
|
|
2326
2348
|
function O() {
|
|
2327
|
-
var
|
|
2328
|
-
const N = c ? Y : (D) => D(), X = ((
|
|
2349
|
+
var x;
|
|
2350
|
+
const N = c ? Y : (D) => D(), X = ((x = v.composedPath) == null ? void 0 : x.call(v)) ?? [v.target];
|
|
2329
2351
|
N(() => {
|
|
2330
2352
|
if (!(!e || !d(v))) {
|
|
2331
2353
|
if (r || o) {
|
|
@@ -2337,8 +2359,8 @@ function ri(e, t) {
|
|
|
2337
2359
|
cancelable: !0,
|
|
2338
2360
|
detail: {
|
|
2339
2361
|
originalEvent: v,
|
|
2340
|
-
contextmenu:
|
|
2341
|
-
focusable:
|
|
2362
|
+
contextmenu: Qr(v),
|
|
2363
|
+
focusable: ni(X)
|
|
2342
2364
|
}
|
|
2343
2365
|
});
|
|
2344
2366
|
}
|
|
@@ -2372,12 +2394,12 @@ function ri(e, t) {
|
|
|
2372
2394
|
clearTimeout(m), f.forEach((v) => v()), g.forEach((v) => v());
|
|
2373
2395
|
};
|
|
2374
2396
|
}
|
|
2375
|
-
function
|
|
2397
|
+
function ii(e, t) {
|
|
2376
2398
|
const { defer: n } = t, s = n ? Y : (o) => o(), r = [];
|
|
2377
2399
|
return r.push(
|
|
2378
2400
|
s(() => {
|
|
2379
2401
|
const o = typeof e == "function" ? e() : e;
|
|
2380
|
-
r.push(
|
|
2402
|
+
r.push(oi(o, t));
|
|
2381
2403
|
})
|
|
2382
2404
|
), () => {
|
|
2383
2405
|
r.forEach((o) => o == null ? void 0 : o());
|
|
@@ -2387,7 +2409,7 @@ function sn(e, t, n) {
|
|
|
2387
2409
|
const s = e.ownerDocument.defaultView || window, r = new s.CustomEvent(t, n);
|
|
2388
2410
|
return e.dispatchEvent(r);
|
|
2389
2411
|
}
|
|
2390
|
-
function
|
|
2412
|
+
function ai(e, t) {
|
|
2391
2413
|
const n = (s) => {
|
|
2392
2414
|
s.key === "Escape" && (s.isComposing || t == null || t(s));
|
|
2393
2415
|
};
|
|
@@ -2457,16 +2479,16 @@ function on() {
|
|
|
2457
2479
|
e.style.pointerEvents = V.isBelowPointerBlockingLayer(e) ? "none" : "auto";
|
|
2458
2480
|
});
|
|
2459
2481
|
}
|
|
2460
|
-
function
|
|
2482
|
+
function ci(e) {
|
|
2461
2483
|
e.style.pointerEvents = "";
|
|
2462
2484
|
}
|
|
2463
|
-
function
|
|
2485
|
+
function li(e, t) {
|
|
2464
2486
|
const n = K(e), s = [];
|
|
2465
2487
|
if (V.hasPointerBlockingLayer() && !n.body.hasAttribute("data-inert") && (rn = document.body.style.pointerEvents, queueMicrotask(() => {
|
|
2466
2488
|
n.body.style.pointerEvents = "none", n.body.setAttribute("data-inert", "");
|
|
2467
2489
|
})), t) {
|
|
2468
|
-
const r =
|
|
2469
|
-
s.push(
|
|
2490
|
+
const r = No(t, (o) => {
|
|
2491
|
+
s.push(vo(o, { pointerEvents: "auto" }));
|
|
2470
2492
|
});
|
|
2471
2493
|
s.push(r);
|
|
2472
2494
|
}
|
|
@@ -2476,7 +2498,7 @@ function ci(e, t) {
|
|
|
2476
2498
|
}), s.forEach((r) => r()));
|
|
2477
2499
|
};
|
|
2478
2500
|
}
|
|
2479
|
-
function
|
|
2501
|
+
function ui(e, t) {
|
|
2480
2502
|
if (!e) {
|
|
2481
2503
|
me("[@zag-js/dismissable] node is `null` or `undefined`");
|
|
2482
2504
|
return;
|
|
@@ -2504,26 +2526,26 @@ function li(e, t) {
|
|
|
2504
2526
|
return m && g.push(...m), g.some((v) => be(v, f)) || V.isInNestedLayer(e, f);
|
|
2505
2527
|
}
|
|
2506
2528
|
const d = [
|
|
2507
|
-
s ?
|
|
2508
|
-
|
|
2509
|
-
|
|
2529
|
+
s ? li(e, t.persistentElements) : void 0,
|
|
2530
|
+
ai(e, a),
|
|
2531
|
+
ii(e, { exclude: l, onFocusOutside: u, onPointerDownOutside: i, defer: t.defer })
|
|
2510
2532
|
];
|
|
2511
2533
|
return () => {
|
|
2512
|
-
V.remove(e), on(),
|
|
2534
|
+
V.remove(e), on(), ci(e), d.forEach((f) => f == null ? void 0 : f());
|
|
2513
2535
|
};
|
|
2514
2536
|
}
|
|
2515
|
-
function
|
|
2537
|
+
function di(e, t) {
|
|
2516
2538
|
const { defer: n } = t, s = n ? Y : (o) => o(), r = [];
|
|
2517
2539
|
return r.push(
|
|
2518
2540
|
s(() => {
|
|
2519
2541
|
const o = ve(e) ? e() : e;
|
|
2520
|
-
r.push(
|
|
2542
|
+
r.push(ui(o, t));
|
|
2521
2543
|
})
|
|
2522
2544
|
), () => {
|
|
2523
2545
|
r.forEach((o) => o == null ? void 0 : o());
|
|
2524
2546
|
};
|
|
2525
2547
|
}
|
|
2526
|
-
function
|
|
2548
|
+
function fi(e, t = {}) {
|
|
2527
2549
|
const { defer: n } = t, s = n ? Y : (o) => o(), r = [];
|
|
2528
2550
|
return r.push(
|
|
2529
2551
|
s(() => {
|
|
@@ -2540,7 +2562,7 @@ function di(e, t = {}) {
|
|
|
2540
2562
|
r.forEach((o) => o == null ? void 0 : o());
|
|
2541
2563
|
};
|
|
2542
2564
|
}
|
|
2543
|
-
var
|
|
2565
|
+
var hi = Object.defineProperty, pi = (e, t, n) => t in e ? hi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, S = (e, t, n) => pi(e, typeof t != "symbol" ? t + "" : t, n), an = {
|
|
2544
2566
|
activateTrap(e, t) {
|
|
2545
2567
|
if (e.length > 0) {
|
|
2546
2568
|
const s = e[e.length - 1];
|
|
@@ -2553,7 +2575,7 @@ var fi = Object.defineProperty, hi = (e, t, n) => t in e ? fi(e, t, { enumerable
|
|
|
2553
2575
|
const n = e.indexOf(t);
|
|
2554
2576
|
n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
|
|
2555
2577
|
}
|
|
2556
|
-
},
|
|
2578
|
+
}, gi = [], mi = class {
|
|
2557
2579
|
constructor(e, t) {
|
|
2558
2580
|
S(this, "trapStack"), S(this, "config"), S(this, "doc"), S(this, "state", {
|
|
2559
2581
|
containers: [],
|
|
@@ -2611,7 +2633,7 @@ var fi = Object.defineProperty, hi = (e, t, n) => t in e ? fi(e, t, { enumerable
|
|
|
2611
2633
|
Ne(s) && s.preventDefault(), this.tryFocus(o);
|
|
2612
2634
|
}
|
|
2613
2635
|
}), S(this, "handleEscapeKey", (s) => {
|
|
2614
|
-
|
|
2636
|
+
yi(s) && Ce(this.config.escapeDeactivates, s) !== !1 && (s.preventDefault(), this.deactivate());
|
|
2615
2637
|
}), S(this, "_mutationObserver"), S(this, "setupMutationObserver", () => {
|
|
2616
2638
|
const s = this.doc.defaultView || window;
|
|
2617
2639
|
this._mutationObserver = new s.MutationObserver((r) => {
|
|
@@ -2644,7 +2666,7 @@ var fi = Object.defineProperty, hi = (e, t, n) => t in e ? fi(e, t, { enumerable
|
|
|
2644
2666
|
this.tryFocus(this.getInitialFocusNode());
|
|
2645
2667
|
return;
|
|
2646
2668
|
}
|
|
2647
|
-
s.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = s,
|
|
2669
|
+
s.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = s, vi(s) && s.select();
|
|
2648
2670
|
}
|
|
2649
2671
|
}), S(this, "deactivate", (s) => {
|
|
2650
2672
|
if (!this.state.active) return this;
|
|
@@ -2735,7 +2757,7 @@ var fi = Object.defineProperty, hi = (e, t, n) => t in e ? fi(e, t, { enumerable
|
|
|
2735
2757
|
} else
|
|
2736
2758
|
i = this.getNodeForOption("fallbackFocus");
|
|
2737
2759
|
return i;
|
|
2738
|
-
}), this.trapStack = t.trapStack ||
|
|
2760
|
+
}), this.trapStack = t.trapStack || gi;
|
|
2739
2761
|
const n = {
|
|
2740
2762
|
returnFocusOnDeactivate: !0,
|
|
2741
2763
|
escapeDeactivates: !0,
|
|
@@ -2816,13 +2838,13 @@ var fi = Object.defineProperty, hi = (e, t, n) => t in e ? fi(e, t, { enumerable
|
|
|
2816
2838
|
};
|
|
2817
2839
|
return s ? (s(this.state.containers.concat()).then(r, r), this) : (r(), this);
|
|
2818
2840
|
}
|
|
2819
|
-
}, Ne = (e) => e.key === "Tab", Ce = (e, ...t) => typeof e == "function" ? e(...t) : e,
|
|
2820
|
-
function
|
|
2841
|
+
}, Ne = (e) => e.key === "Tab", Ce = (e, ...t) => typeof e == "function" ? e(...t) : e, yi = (e) => !e.isComposing && e.key === "Escape", cn = (e) => setTimeout(e, 0), vi = (e) => e.localName === "input" && "select" in e && typeof e.select == "function";
|
|
2842
|
+
function bi(e, t = {}) {
|
|
2821
2843
|
let n;
|
|
2822
2844
|
const s = Y(() => {
|
|
2823
2845
|
const r = typeof e == "function" ? e() : e;
|
|
2824
2846
|
if (r) {
|
|
2825
|
-
n = new
|
|
2847
|
+
n = new mi(r, {
|
|
2826
2848
|
escapeDeactivates: !1,
|
|
2827
2849
|
allowOutsideClick: !0,
|
|
2828
2850
|
preventScroll: !0,
|
|
@@ -2853,22 +2875,22 @@ function ln(e, t) {
|
|
|
2853
2875
|
Object.assign(e.style, n);
|
|
2854
2876
|
};
|
|
2855
2877
|
}
|
|
2856
|
-
function
|
|
2878
|
+
function Ei(e, t, n) {
|
|
2857
2879
|
if (!e) return;
|
|
2858
2880
|
const s = e.style.getPropertyValue(t);
|
|
2859
2881
|
return e.style.setProperty(t, n), () => {
|
|
2860
2882
|
s ? e.style.setProperty(t, s) : e.style.removeProperty(t);
|
|
2861
2883
|
};
|
|
2862
2884
|
}
|
|
2863
|
-
function
|
|
2885
|
+
function Ti(e) {
|
|
2864
2886
|
const t = e.getBoundingClientRect().left;
|
|
2865
2887
|
return Math.round(t) + e.scrollLeft ? "paddingLeft" : "paddingRight";
|
|
2866
2888
|
}
|
|
2867
|
-
function
|
|
2889
|
+
function Ni(e) {
|
|
2868
2890
|
const t = e ?? document, n = t.defaultView ?? window, { documentElement: s, body: r } = t;
|
|
2869
2891
|
if (r.hasAttribute(lt)) return;
|
|
2870
2892
|
r.setAttribute(lt, "");
|
|
2871
|
-
const c = n.innerWidth - s.clientWidth, i = () =>
|
|
2893
|
+
const c = n.innerWidth - s.clientWidth, i = () => Ei(s, "--scrollbar-width", `${c}px`), u = Ti(s), a = () => ln(r, {
|
|
2872
2894
|
overflow: "hidden",
|
|
2873
2895
|
[u]: `${c}px`
|
|
2874
2896
|
}), l = () => {
|
|
@@ -2883,12 +2905,12 @@ function Ti(e) {
|
|
|
2883
2905
|
return () => {
|
|
2884
2906
|
v == null || v(), n.scrollTo({ left: f, top: p, behavior: "instant" });
|
|
2885
2907
|
};
|
|
2886
|
-
}, d = [i(),
|
|
2908
|
+
}, d = [i(), Zr() ? l() : a()];
|
|
2887
2909
|
return () => {
|
|
2888
2910
|
d.forEach((f) => f == null ? void 0 : f()), r.removeAttribute(lt);
|
|
2889
2911
|
};
|
|
2890
2912
|
}
|
|
2891
|
-
var
|
|
2913
|
+
var Ci = ye("dialog").parts(
|
|
2892
2914
|
"trigger",
|
|
2893
2915
|
"backdrop",
|
|
2894
2916
|
"positioner",
|
|
@@ -2896,7 +2918,7 @@ var Ni = ye("dialog").parts(
|
|
|
2896
2918
|
"title",
|
|
2897
2919
|
"description",
|
|
2898
2920
|
"closeTrigger"
|
|
2899
|
-
), oe =
|
|
2921
|
+
), oe = Ci.build(), C = Ft({
|
|
2900
2922
|
getPositionerId: (e) => {
|
|
2901
2923
|
var t;
|
|
2902
2924
|
return ((t = e.ids) == null ? void 0 : t.positioner) ?? `dialog:${e.id}:positioner`;
|
|
@@ -2933,7 +2955,7 @@ var Ni = ye("dialog").parts(
|
|
|
2933
2955
|
getDescriptionEl: (e) => C.getById(e, C.getDescriptionId(e)),
|
|
2934
2956
|
getCloseTriggerEl: (e) => C.getById(e, C.getCloseTriggerId(e))
|
|
2935
2957
|
});
|
|
2936
|
-
function
|
|
2958
|
+
function wi(e, t, n) {
|
|
2937
2959
|
const s = e.context["aria-label"], r = e.matches("open"), o = e.context.renderedElements;
|
|
2938
2960
|
return {
|
|
2939
2961
|
open: r,
|
|
@@ -3016,7 +3038,7 @@ function Ci(e, t, n) {
|
|
|
3016
3038
|
}
|
|
3017
3039
|
};
|
|
3018
3040
|
}
|
|
3019
|
-
function
|
|
3041
|
+
function xi(e) {
|
|
3020
3042
|
const t = ue(e);
|
|
3021
3043
|
return Re(
|
|
3022
3044
|
{
|
|
@@ -3105,7 +3127,7 @@ function wi(e) {
|
|
|
3105
3127
|
},
|
|
3106
3128
|
activities: {
|
|
3107
3129
|
trackDismissableElement(n, s, { send: r }) {
|
|
3108
|
-
return
|
|
3130
|
+
return di(() => C.getContentEl(n), {
|
|
3109
3131
|
defer: !0,
|
|
3110
3132
|
pointerBlocking: n.modal,
|
|
3111
3133
|
exclude: [C.getTriggerEl(n)],
|
|
@@ -3127,10 +3149,10 @@ function wi(e) {
|
|
|
3127
3149
|
},
|
|
3128
3150
|
preventScroll(n) {
|
|
3129
3151
|
if (n.preventScroll)
|
|
3130
|
-
return
|
|
3152
|
+
return Ni(C.getDoc(n));
|
|
3131
3153
|
},
|
|
3132
3154
|
trapFocus(n) {
|
|
3133
|
-
return !n.trapFocus || !n.modal ? void 0 :
|
|
3155
|
+
return !n.trapFocus || !n.modal ? void 0 : bi(() => C.getContentEl(n), {
|
|
3134
3156
|
preventScroll: !0,
|
|
3135
3157
|
returnFocusOnDeactivate: !!n.restoreFocus,
|
|
3136
3158
|
initialFocus: n.initialFocusEl,
|
|
@@ -3141,7 +3163,7 @@ function wi(e) {
|
|
|
3141
3163
|
});
|
|
3142
3164
|
},
|
|
3143
3165
|
hideContentBelow(n) {
|
|
3144
|
-
return n.modal ?
|
|
3166
|
+
return n.modal ? Qo(() => [C.getContentEl(n)], { defer: !0 }) : void 0;
|
|
3145
3167
|
}
|
|
3146
3168
|
},
|
|
3147
3169
|
actions: {
|
|
@@ -3157,7 +3179,7 @@ function wi(e) {
|
|
|
3157
3179
|
Y(() => {
|
|
3158
3180
|
const s = C.getContentEl(n);
|
|
3159
3181
|
if (!s) return;
|
|
3160
|
-
const r =
|
|
3182
|
+
const r = qr(s);
|
|
3161
3183
|
[C.getPositionerEl(n), C.getBackdropEl(n)].forEach((c) => {
|
|
3162
3184
|
c == null || c.style.setProperty("--z-index", r.zIndex);
|
|
3163
3185
|
});
|
|
@@ -3218,11 +3240,11 @@ const Pi = (e = {}) => {
|
|
|
3218
3240
|
onOpenChange: ke(e.onOpenChange, { sync: !0 }),
|
|
3219
3241
|
onEscapeKeyDown: ke(e.onEscapeKeyDown),
|
|
3220
3242
|
onInteractOutside: ke(e.onInteractOutside)
|
|
3221
|
-
}, [o, c] = et(
|
|
3222
|
-
return
|
|
3223
|
-
},
|
|
3224
|
-
const [t, { children: n, ...s }] =
|
|
3225
|
-
return /* @__PURE__ */ h(
|
|
3243
|
+
}, [o, c] = et(xi(s), { context: r });
|
|
3244
|
+
return wi(o, c, Le);
|
|
3245
|
+
}, Oi = (e) => {
|
|
3246
|
+
const [t, { children: n, ...s }] = Wo(e), [r] = Ho(t), o = Pi(s), c = ss(k({ present: o.open }, t));
|
|
3247
|
+
return /* @__PURE__ */ h(Uo, { value: o, children: /* @__PURE__ */ h(Bo, { value: r, children: /* @__PURE__ */ h(Ko, { value: c, children: n }) }) });
|
|
3226
3248
|
}, ds = R((e, t) => {
|
|
3227
3249
|
const n = fe(), s = k(n.getTitleProps(), e);
|
|
3228
3250
|
return /* @__PURE__ */ h(F.h2, { ...s, ref: t });
|
|
@@ -3239,10 +3261,10 @@ const fs = R((e, t) => {
|
|
|
3239
3261
|
return /* @__PURE__ */ h(F.button, { ...r, ref: t });
|
|
3240
3262
|
});
|
|
3241
3263
|
fs.displayName = "DialogTrigger";
|
|
3242
|
-
const
|
|
3264
|
+
const Si = (e) => {
|
|
3243
3265
|
var u;
|
|
3244
3266
|
const { children: t, disabled: n } = e, [s, r] = dt((u = e.container) == null ? void 0 : u.current), o = hn(
|
|
3245
|
-
|
|
3267
|
+
Ii,
|
|
3246
3268
|
() => !1,
|
|
3247
3269
|
() => !0
|
|
3248
3270
|
), { getRootNode: c } = Mt();
|
|
@@ -3252,19 +3274,19 @@ const Oi = (e) => {
|
|
|
3252
3274
|
return (a = e.container) == null ? void 0 : a.current;
|
|
3253
3275
|
});
|
|
3254
3276
|
}, [e.container]), o || n) return /* @__PURE__ */ h(ut, { children: t });
|
|
3255
|
-
const i = s ??
|
|
3277
|
+
const i = s ?? ki(c);
|
|
3256
3278
|
return /* @__PURE__ */ h(ut, { children: gn.map(t, (a) => Os(a, i)) });
|
|
3257
|
-
},
|
|
3279
|
+
}, ki = (e) => {
|
|
3258
3280
|
const t = e == null ? void 0 : e(), n = t.getRootNode();
|
|
3259
3281
|
return Ae(n) ? n : K(t).body;
|
|
3260
|
-
},
|
|
3261
|
-
},
|
|
3282
|
+
}, Ii = () => () => {
|
|
3283
|
+
}, Di = Je({}), Ai = {
|
|
3262
3284
|
sm: "max-w-sm",
|
|
3263
3285
|
md: "max-w-md",
|
|
3264
3286
|
lg: "max-w-lg",
|
|
3265
3287
|
full: "max-w-full mx-4"
|
|
3266
3288
|
};
|
|
3267
|
-
function
|
|
3289
|
+
function Ri({
|
|
3268
3290
|
open: e,
|
|
3269
3291
|
onOpenChange: t,
|
|
3270
3292
|
children: n,
|
|
@@ -3273,7 +3295,7 @@ function Ai({
|
|
|
3273
3295
|
closeOnEscape: o = !0
|
|
3274
3296
|
}) {
|
|
3275
3297
|
return /* @__PURE__ */ h(
|
|
3276
|
-
|
|
3298
|
+
Oi,
|
|
3277
3299
|
{
|
|
3278
3300
|
open: e,
|
|
3279
3301
|
onOpenChange: t,
|
|
@@ -3284,16 +3306,16 @@ function Ai({
|
|
|
3284
3306
|
}
|
|
3285
3307
|
);
|
|
3286
3308
|
}
|
|
3287
|
-
function
|
|
3309
|
+
function Li({
|
|
3288
3310
|
children: e,
|
|
3289
3311
|
className: t
|
|
3290
3312
|
}) {
|
|
3291
3313
|
return /* @__PURE__ */ h(fs, { className: t, children: e });
|
|
3292
3314
|
}
|
|
3293
|
-
function
|
|
3294
|
-
return /* @__PURE__ */ h(
|
|
3315
|
+
function Fi({ children: e }) {
|
|
3316
|
+
return /* @__PURE__ */ h(Si, { children: e });
|
|
3295
3317
|
}
|
|
3296
|
-
function
|
|
3318
|
+
function Mi({ className: e }) {
|
|
3297
3319
|
return /* @__PURE__ */ h(
|
|
3298
3320
|
rs,
|
|
3299
3321
|
{
|
|
@@ -3307,7 +3329,7 @@ function Fi({ className: e }) {
|
|
|
3307
3329
|
}
|
|
3308
3330
|
);
|
|
3309
3331
|
}
|
|
3310
|
-
function
|
|
3332
|
+
function _i({ children: e }) {
|
|
3311
3333
|
return /* @__PURE__ */ h(
|
|
3312
3334
|
cs,
|
|
3313
3335
|
{
|
|
@@ -3317,12 +3339,12 @@ function Mi({ children: e }) {
|
|
|
3317
3339
|
}
|
|
3318
3340
|
);
|
|
3319
3341
|
}
|
|
3320
|
-
function
|
|
3342
|
+
function Bi({
|
|
3321
3343
|
children: e,
|
|
3322
3344
|
size: t = "md",
|
|
3323
3345
|
className: n
|
|
3324
3346
|
}) {
|
|
3325
|
-
return /* @__PURE__ */ h(
|
|
3347
|
+
return /* @__PURE__ */ h(Di.Provider, { value: { size: t }, children: /* @__PURE__ */ h(
|
|
3326
3348
|
is,
|
|
3327
3349
|
{
|
|
3328
3350
|
className: E(
|
|
@@ -3332,14 +3354,14 @@ function _i({
|
|
|
3332
3354
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3333
3355
|
"data-[state=closed]:slide-out-to-bottom-[2%] data-[state=open]:slide-in-from-bottom-[2%]",
|
|
3334
3356
|
"duration-200",
|
|
3335
|
-
|
|
3357
|
+
Ai[t],
|
|
3336
3358
|
n
|
|
3337
3359
|
),
|
|
3338
3360
|
children: e
|
|
3339
3361
|
}
|
|
3340
3362
|
) });
|
|
3341
3363
|
}
|
|
3342
|
-
function
|
|
3364
|
+
function $i({
|
|
3343
3365
|
children: e,
|
|
3344
3366
|
className: t
|
|
3345
3367
|
}) {
|
|
@@ -3354,31 +3376,31 @@ function Bi({
|
|
|
3354
3376
|
}
|
|
3355
3377
|
);
|
|
3356
3378
|
}
|
|
3357
|
-
function
|
|
3379
|
+
function Hi({
|
|
3358
3380
|
children: e,
|
|
3359
3381
|
className: t
|
|
3360
3382
|
}) {
|
|
3361
3383
|
return /* @__PURE__ */ h(ds, { className: E("text-lg font-semibold text-foreground", t), children: e });
|
|
3362
3384
|
}
|
|
3363
|
-
function
|
|
3385
|
+
function ji({
|
|
3364
3386
|
children: e,
|
|
3365
3387
|
className: t
|
|
3366
3388
|
}) {
|
|
3367
3389
|
return /* @__PURE__ */ h(as, { className: E("text-sm text-muted-foreground", t), children: e });
|
|
3368
3390
|
}
|
|
3369
|
-
function
|
|
3391
|
+
function Vi({
|
|
3370
3392
|
children: e,
|
|
3371
3393
|
className: t
|
|
3372
3394
|
}) {
|
|
3373
3395
|
return /* @__PURE__ */ h("div", { className: E("px-6 py-4", t), children: e });
|
|
3374
3396
|
}
|
|
3375
|
-
function
|
|
3397
|
+
function Gi({
|
|
3376
3398
|
children: e,
|
|
3377
3399
|
className: t
|
|
3378
3400
|
}) {
|
|
3379
3401
|
return /* @__PURE__ */ h("div", { className: E("flex justify-end gap-2 p-6 pt-4", t), children: e });
|
|
3380
3402
|
}
|
|
3381
|
-
function
|
|
3403
|
+
function Ui({
|
|
3382
3404
|
className: e
|
|
3383
3405
|
}) {
|
|
3384
3406
|
return /* @__PURE__ */ h(
|
|
@@ -3397,21 +3419,21 @@ function Gi({
|
|
|
3397
3419
|
}
|
|
3398
3420
|
);
|
|
3399
3421
|
}
|
|
3400
|
-
const
|
|
3401
|
-
Root:
|
|
3402
|
-
Trigger:
|
|
3403
|
-
Portal:
|
|
3404
|
-
Backdrop:
|
|
3405
|
-
Positioner:
|
|
3406
|
-
Content:
|
|
3407
|
-
Header:
|
|
3408
|
-
Title:
|
|
3409
|
-
Description:
|
|
3410
|
-
Body:
|
|
3411
|
-
Footer:
|
|
3412
|
-
CloseTrigger:
|
|
3422
|
+
const Ka = {
|
|
3423
|
+
Root: Ri,
|
|
3424
|
+
Trigger: Li,
|
|
3425
|
+
Portal: Fi,
|
|
3426
|
+
Backdrop: Mi,
|
|
3427
|
+
Positioner: _i,
|
|
3428
|
+
Content: Bi,
|
|
3429
|
+
Header: $i,
|
|
3430
|
+
Title: Hi,
|
|
3431
|
+
Description: ji,
|
|
3432
|
+
Body: Vi,
|
|
3433
|
+
Footer: Gi,
|
|
3434
|
+
CloseTrigger: Ui
|
|
3413
3435
|
};
|
|
3414
|
-
function
|
|
3436
|
+
function Wa({ className: e, type: t = "text", label: n, id: s, ...r }) {
|
|
3415
3437
|
const o = /* @__PURE__ */ h(
|
|
3416
3438
|
"input",
|
|
3417
3439
|
{
|
|
@@ -3434,17 +3456,17 @@ function Ua({ className: e, type: t = "text", label: n, id: s, ...r }) {
|
|
|
3434
3456
|
o
|
|
3435
3457
|
] }) : o;
|
|
3436
3458
|
}
|
|
3437
|
-
const
|
|
3459
|
+
const Ki = {
|
|
3438
3460
|
default: "bg-primary",
|
|
3439
3461
|
success: "bg-green-600",
|
|
3440
3462
|
warning: "bg-yellow-600",
|
|
3441
3463
|
error: "bg-destructive"
|
|
3442
|
-
},
|
|
3464
|
+
}, Wi = {
|
|
3443
3465
|
sm: "h-1",
|
|
3444
3466
|
md: "h-2",
|
|
3445
3467
|
lg: "h-3"
|
|
3446
3468
|
};
|
|
3447
|
-
function
|
|
3469
|
+
function za({
|
|
3448
3470
|
value: e = 0,
|
|
3449
3471
|
indeterminate: t = !1,
|
|
3450
3472
|
label: n,
|
|
@@ -3467,7 +3489,7 @@ function Ka({
|
|
|
3467
3489
|
{
|
|
3468
3490
|
className: E(
|
|
3469
3491
|
"w-full overflow-hidden rounded-full bg-muted",
|
|
3470
|
-
|
|
3492
|
+
Wi[o]
|
|
3471
3493
|
),
|
|
3472
3494
|
role: "progressbar",
|
|
3473
3495
|
"aria-valuenow": t ? void 0 : i,
|
|
@@ -3479,7 +3501,7 @@ function Ka({
|
|
|
3479
3501
|
{
|
|
3480
3502
|
className: E(
|
|
3481
3503
|
"h-full rounded-full transition-all duration-500 ease-out",
|
|
3482
|
-
|
|
3504
|
+
Ki[r],
|
|
3483
3505
|
t && "animate-pulse w-full"
|
|
3484
3506
|
),
|
|
3485
3507
|
style: {
|
|
@@ -3492,7 +3514,7 @@ function Ka({
|
|
|
3492
3514
|
] });
|
|
3493
3515
|
}
|
|
3494
3516
|
const hs = Je({});
|
|
3495
|
-
function
|
|
3517
|
+
function zi({
|
|
3496
3518
|
children: e,
|
|
3497
3519
|
variant: t = "default",
|
|
3498
3520
|
interactive: n = !1,
|
|
@@ -3500,13 +3522,13 @@ function Wi({
|
|
|
3500
3522
|
}) {
|
|
3501
3523
|
return /* @__PURE__ */ h(hs.Provider, { value: { variant: t, interactive: n }, children: /* @__PURE__ */ h("div", { className: E("relative w-full overflow-x-auto", s), children: /* @__PURE__ */ h("table", { className: "w-full caption-bottom text-sm", children: e }) }) });
|
|
3502
3524
|
}
|
|
3503
|
-
function
|
|
3525
|
+
function qi({ children: e, className: t }) {
|
|
3504
3526
|
return /* @__PURE__ */ h("thead", { className: E("[&_tr]:border-b", t), children: e });
|
|
3505
3527
|
}
|
|
3506
|
-
function
|
|
3528
|
+
function Yi({ children: e, className: t }) {
|
|
3507
3529
|
return /* @__PURE__ */ h("tbody", { className: E("[&_tr:last-child]:border-0", t), children: e });
|
|
3508
3530
|
}
|
|
3509
|
-
function
|
|
3531
|
+
function Xi({ children: e, onClick: t, selected: n = !1, className: s }) {
|
|
3510
3532
|
const { interactive: r } = fn(hs);
|
|
3511
3533
|
return /* @__PURE__ */ h(
|
|
3512
3534
|
"tr",
|
|
@@ -3528,7 +3550,7 @@ function Yi({ children: e, onClick: t, selected: n = !1, className: s }) {
|
|
|
3528
3550
|
}
|
|
3529
3551
|
);
|
|
3530
3552
|
}
|
|
3531
|
-
function
|
|
3553
|
+
function Zi({
|
|
3532
3554
|
children: e,
|
|
3533
3555
|
align: t = "left",
|
|
3534
3556
|
sortable: n = !1,
|
|
@@ -3573,7 +3595,7 @@ function Xi({
|
|
|
3573
3595
|
}
|
|
3574
3596
|
);
|
|
3575
3597
|
}
|
|
3576
|
-
function
|
|
3598
|
+
function Ji({ children: e, align: t = "left", className: n }) {
|
|
3577
3599
|
return /* @__PURE__ */ h(
|
|
3578
3600
|
"td",
|
|
3579
3601
|
{
|
|
@@ -3587,23 +3609,23 @@ function Zi({ children: e, align: t = "left", className: n }) {
|
|
|
3587
3609
|
}
|
|
3588
3610
|
);
|
|
3589
3611
|
}
|
|
3590
|
-
function
|
|
3612
|
+
function Qi({ children: e, className: t }) {
|
|
3591
3613
|
return /* @__PURE__ */ h("tfoot", { className: E("border-t font-medium", t), children: e });
|
|
3592
3614
|
}
|
|
3593
|
-
function
|
|
3615
|
+
function ea({ children: e, className: t }) {
|
|
3594
3616
|
return /* @__PURE__ */ h("caption", { className: E("mt-4 text-sm text-muted-foreground", t), children: e });
|
|
3595
3617
|
}
|
|
3596
3618
|
const B = {
|
|
3597
|
-
Root:
|
|
3598
|
-
Header:
|
|
3599
|
-
Body:
|
|
3600
|
-
Row:
|
|
3601
|
-
HeadCell:
|
|
3602
|
-
Cell:
|
|
3603
|
-
Footer:
|
|
3604
|
-
Caption:
|
|
3619
|
+
Root: zi,
|
|
3620
|
+
Header: qi,
|
|
3621
|
+
Body: Yi,
|
|
3622
|
+
Row: Xi,
|
|
3623
|
+
HeadCell: Zi,
|
|
3624
|
+
Cell: Ji,
|
|
3625
|
+
Footer: Qi,
|
|
3626
|
+
Caption: ea
|
|
3605
3627
|
};
|
|
3606
|
-
function
|
|
3628
|
+
function qa({
|
|
3607
3629
|
products: e,
|
|
3608
3630
|
isLoading: t = !1,
|
|
3609
3631
|
isError: n = !1,
|
|
@@ -3616,31 +3638,31 @@ function Wa({
|
|
|
3616
3638
|
sortDirection: a,
|
|
3617
3639
|
onSort: l
|
|
3618
3640
|
}) {
|
|
3619
|
-
const [d, f] = dt("name"), [p, g] = dt("asc"), m = u ?? d, w = a ?? p, v = (
|
|
3620
|
-
const D = m ===
|
|
3621
|
-
l ? l(
|
|
3622
|
-
}, O = [...e].sort((
|
|
3641
|
+
const [d, f] = dt("name"), [p, g] = dt("asc"), m = u ?? d, w = a ?? p, v = (x) => {
|
|
3642
|
+
const D = m === x && w === "asc" ? "desc" : "asc";
|
|
3643
|
+
l ? l(x, D) : (f(x), g(D));
|
|
3644
|
+
}, O = [...e].sort((x, D) => {
|
|
3623
3645
|
let b = 0;
|
|
3624
3646
|
switch (m) {
|
|
3625
3647
|
case "name":
|
|
3626
|
-
b =
|
|
3648
|
+
b = x.name.localeCompare(D.name);
|
|
3627
3649
|
break;
|
|
3628
3650
|
case "price":
|
|
3629
|
-
b =
|
|
3651
|
+
b = x.price - D.price;
|
|
3630
3652
|
break;
|
|
3631
3653
|
case "expiration":
|
|
3632
|
-
b = new Date(
|
|
3654
|
+
b = new Date(x.expiration).getTime() - new Date(D.expiration).getTime();
|
|
3633
3655
|
break;
|
|
3634
3656
|
}
|
|
3635
3657
|
return w === "asc" ? b : -b;
|
|
3636
|
-
}), N = (
|
|
3658
|
+
}), N = (x) => new Intl.NumberFormat("en-US", {
|
|
3637
3659
|
style: "currency",
|
|
3638
3660
|
currency: i || "USD"
|
|
3639
|
-
}).format(
|
|
3661
|
+
}).format(x), X = (x) => new Intl.DateTimeFormat("en-US", {
|
|
3640
3662
|
year: "numeric",
|
|
3641
3663
|
month: "short",
|
|
3642
3664
|
day: "numeric"
|
|
3643
|
-
}).format(new Date(
|
|
3665
|
+
}).format(new Date(x));
|
|
3644
3666
|
return n ? /* @__PURE__ */ I("div", { className: "flex flex-col items-center justify-center gap-4 p-8 border rounded-lg text-center", children: [
|
|
3645
3667
|
/* @__PURE__ */ h("h3", { className: "text-2xl font-semibold", children: "Error Loading Products" }),
|
|
3646
3668
|
/* @__PURE__ */ h("p", { className: "text-sm max-w-md", children: (s == null ? void 0 : s.message) || "Failed to load products" }),
|
|
@@ -3682,27 +3704,27 @@ function Wa({
|
|
|
3682
3704
|
}
|
|
3683
3705
|
)
|
|
3684
3706
|
] }) }),
|
|
3685
|
-
/* @__PURE__ */ h(B.Body, { children: t ? /* @__PURE__ */ h(B.Row, { children: /* @__PURE__ */ h(B.Cell, { align: "center", className: "py-8 text-center italic", children: "Loading products..." }) }) : O.length === 0 ? /* @__PURE__ */ h(B.Row, { children: /* @__PURE__ */ h(B.Cell, { align: "center", className: "py-8 text-center text-muted-foreground italic", children: "No products found" }) }) : O.map((
|
|
3707
|
+
/* @__PURE__ */ h(B.Body, { children: t ? /* @__PURE__ */ h(B.Row, { children: /* @__PURE__ */ h(B.Cell, { align: "center", className: "py-8 text-center italic", children: "Loading products..." }) }) : O.length === 0 ? /* @__PURE__ */ h(B.Row, { children: /* @__PURE__ */ h(B.Cell, { align: "center", className: "py-8 text-center text-muted-foreground italic", children: "No products found" }) }) : O.map((x) => /* @__PURE__ */ I(
|
|
3686
3708
|
B.Row,
|
|
3687
3709
|
{
|
|
3688
|
-
onClick: o ? () => o(
|
|
3710
|
+
onClick: o ? () => o(x) : void 0,
|
|
3689
3711
|
children: [
|
|
3690
|
-
/* @__PURE__ */ h(B.Cell, { children:
|
|
3712
|
+
/* @__PURE__ */ h(B.Cell, { children: x.name }),
|
|
3691
3713
|
/* @__PURE__ */ h(B.Cell, { align: "right", className: "font-medium", children: (() => {
|
|
3692
3714
|
var b;
|
|
3693
|
-
if (i === "USD") return N(
|
|
3694
|
-
const D = (b =
|
|
3695
|
-
return N(D ? D.convertedPrice :
|
|
3715
|
+
if (i === "USD") return N(x.price);
|
|
3716
|
+
const D = (b = x.rates) == null ? void 0 : b.find((T) => T.currency === i);
|
|
3717
|
+
return N(D ? D.convertedPrice : x.price);
|
|
3696
3718
|
})() }),
|
|
3697
|
-
/* @__PURE__ */ h(B.Cell, { align: "right", children: X(
|
|
3719
|
+
/* @__PURE__ */ h(B.Cell, { align: "right", children: X(x.expiration) })
|
|
3698
3720
|
]
|
|
3699
3721
|
},
|
|
3700
|
-
|
|
3722
|
+
x.id
|
|
3701
3723
|
)) })
|
|
3702
3724
|
] })
|
|
3703
3725
|
] });
|
|
3704
3726
|
}
|
|
3705
|
-
function
|
|
3727
|
+
function ta({ children: e, className: t }) {
|
|
3706
3728
|
return /* @__PURE__ */ h(H.Positioner, { style: { zIndex: 9999 }, children: /* @__PURE__ */ h(
|
|
3707
3729
|
H.Content,
|
|
3708
3730
|
{
|
|
@@ -3718,10 +3740,10 @@ function ea({ children: e, className: t }) {
|
|
|
3718
3740
|
}
|
|
3719
3741
|
) });
|
|
3720
3742
|
}
|
|
3721
|
-
function
|
|
3743
|
+
function na() {
|
|
3722
3744
|
return /* @__PURE__ */ h(H.HiddenSelect, {});
|
|
3723
3745
|
}
|
|
3724
|
-
function
|
|
3746
|
+
function sa({ className: e, children: t, ...n }) {
|
|
3725
3747
|
return /* @__PURE__ */ I(
|
|
3726
3748
|
H.Item,
|
|
3727
3749
|
{
|
|
@@ -3740,10 +3762,10 @@ function na({ className: e, children: t, ...n }) {
|
|
|
3740
3762
|
}
|
|
3741
3763
|
);
|
|
3742
3764
|
}
|
|
3743
|
-
function
|
|
3765
|
+
function ra({ className: e, children: t, ...n }) {
|
|
3744
3766
|
return /* @__PURE__ */ h(H.ItemGroup, { className: E("py-1", e), ...n, children: t });
|
|
3745
3767
|
}
|
|
3746
|
-
function
|
|
3768
|
+
function oa({ className: e, children: t, ...n }) {
|
|
3747
3769
|
return /* @__PURE__ */ h(
|
|
3748
3770
|
H.ItemGroupLabel,
|
|
3749
3771
|
{
|
|
@@ -3753,15 +3775,15 @@ function ra({ className: e, children: t, ...n }) {
|
|
|
3753
3775
|
}
|
|
3754
3776
|
);
|
|
3755
3777
|
}
|
|
3756
|
-
function
|
|
3778
|
+
function ia({ children: e, className: t }) {
|
|
3757
3779
|
return /* @__PURE__ */ h(H.Label, { className: E("mb-1 block text-sm font-medium text-gray-700", t), children: e });
|
|
3758
3780
|
}
|
|
3759
|
-
const
|
|
3760
|
-
function
|
|
3781
|
+
const aa = Je({});
|
|
3782
|
+
function ca(e) {
|
|
3761
3783
|
const { items: t, ...n } = e, s = ze(() => Ls({ items: t }), [t]);
|
|
3762
|
-
return /* @__PURE__ */ h(
|
|
3784
|
+
return /* @__PURE__ */ h(aa.Provider, { value: {}, children: /* @__PURE__ */ h(H.Root, { collection: s, positioning: { sameWidth: !0 }, ...n }) });
|
|
3763
3785
|
}
|
|
3764
|
-
function
|
|
3786
|
+
function la({ className: e, placeholder: t }) {
|
|
3765
3787
|
return /* @__PURE__ */ I(
|
|
3766
3788
|
H.Control,
|
|
3767
3789
|
{
|
|
@@ -3779,24 +3801,24 @@ function ca({ className: e, placeholder: t }) {
|
|
|
3779
3801
|
}
|
|
3780
3802
|
);
|
|
3781
3803
|
}
|
|
3782
|
-
const
|
|
3783
|
-
Root:
|
|
3784
|
-
Label:
|
|
3785
|
-
Trigger:
|
|
3786
|
-
Content:
|
|
3787
|
-
Item:
|
|
3788
|
-
ItemGroup:
|
|
3789
|
-
ItemGroupLabel:
|
|
3790
|
-
HiddenSelect:
|
|
3804
|
+
const Ya = {
|
|
3805
|
+
Root: ca,
|
|
3806
|
+
Label: ia,
|
|
3807
|
+
Trigger: la,
|
|
3808
|
+
Content: ta,
|
|
3809
|
+
Item: sa,
|
|
3810
|
+
ItemGroup: ra,
|
|
3811
|
+
ItemGroupLabel: oa,
|
|
3812
|
+
HiddenSelect: na
|
|
3791
3813
|
};
|
|
3792
|
-
var
|
|
3814
|
+
var ua = ye("toast").parts(
|
|
3793
3815
|
"group",
|
|
3794
3816
|
"root",
|
|
3795
3817
|
"title",
|
|
3796
3818
|
"description",
|
|
3797
3819
|
"actionTrigger",
|
|
3798
3820
|
"closeTrigger"
|
|
3799
|
-
), ge =
|
|
3821
|
+
), ge = ua.build(), _ = Ft({
|
|
3800
3822
|
getRegionId: (e) => `toast-group:${e}`,
|
|
3801
3823
|
getRegionEl: (e, t) => _.getById(e, `toast-group:${t}`),
|
|
3802
3824
|
getRootId: (e) => `toast:${e.id}`,
|
|
@@ -3818,7 +3840,7 @@ var un = {
|
|
|
3818
3840
|
function dn(e, t) {
|
|
3819
3841
|
return e ?? un[t] ?? un.DEFAULT;
|
|
3820
3842
|
}
|
|
3821
|
-
function
|
|
3843
|
+
function da(e, t) {
|
|
3822
3844
|
var l;
|
|
3823
3845
|
const n = e.offsets, s = typeof n == "string" ? { left: n, right: n, bottom: n, top: n } : n, r = e.dir === "rtl", o = t.replace("-start", r ? "-right" : "-left").replace("-end", r ? "-left" : "-right"), c = o.includes("right"), i = o.includes("left"), u = {
|
|
3824
3846
|
position: "fixed",
|
|
@@ -3827,7 +3849,7 @@ function ua(e, t) {
|
|
|
3827
3849
|
flexDirection: "column",
|
|
3828
3850
|
"--gap": `${e.gap}px`,
|
|
3829
3851
|
"--first-height": `${((l = e.heights[0]) == null ? void 0 : l.height) || 0}px`,
|
|
3830
|
-
zIndex:
|
|
3852
|
+
zIndex: Fr
|
|
3831
3853
|
};
|
|
3832
3854
|
let a = "center";
|
|
3833
3855
|
if (c && (a = "flex-end"), i && (a = "flex-start"), u.alignItems = a, o.includes("top")) {
|
|
@@ -3848,7 +3870,7 @@ function ua(e, t) {
|
|
|
3848
3870
|
}
|
|
3849
3871
|
return u;
|
|
3850
3872
|
}
|
|
3851
|
-
function
|
|
3873
|
+
function fa(e, t) {
|
|
3852
3874
|
const [n] = e.placement.split("-"), s = !e.frontmost, r = !e.stacked, o = {
|
|
3853
3875
|
position: "absolute",
|
|
3854
3876
|
pointerEvents: "auto",
|
|
@@ -3895,7 +3917,7 @@ function da(e, t) {
|
|
|
3895
3917
|
"--y": "calc(var(--lift) * -100%)"
|
|
3896
3918
|
}), o;
|
|
3897
3919
|
}
|
|
3898
|
-
function
|
|
3920
|
+
function ha(e, t) {
|
|
3899
3921
|
const n = {
|
|
3900
3922
|
position: "absolute",
|
|
3901
3923
|
inset: "0",
|
|
@@ -3906,7 +3928,7 @@ function fa(e, t) {
|
|
|
3906
3928
|
height: "calc(var(--initial-height) + 80%)"
|
|
3907
3929
|
}), n;
|
|
3908
3930
|
}
|
|
3909
|
-
function
|
|
3931
|
+
function pa(e, t) {
|
|
3910
3932
|
return {
|
|
3911
3933
|
position: "absolute",
|
|
3912
3934
|
left: "0",
|
|
@@ -3915,9 +3937,9 @@ function ha(e, t) {
|
|
|
3915
3937
|
width: "100%"
|
|
3916
3938
|
};
|
|
3917
3939
|
}
|
|
3918
|
-
function
|
|
3940
|
+
function ga(e, t, n) {
|
|
3919
3941
|
function s() {
|
|
3920
|
-
return
|
|
3942
|
+
return mr(e) ? e.getState() : e;
|
|
3921
3943
|
}
|
|
3922
3944
|
function r(l) {
|
|
3923
3945
|
return Bt(s().context.toasts, l);
|
|
@@ -4001,7 +4023,7 @@ function pa(e, t, n) {
|
|
|
4001
4023
|
"data-align": w,
|
|
4002
4024
|
"aria-live": "polite",
|
|
4003
4025
|
role: "region",
|
|
4004
|
-
style:
|
|
4026
|
+
style: da(p.context, d),
|
|
4005
4027
|
onMouseMove() {
|
|
4006
4028
|
t({ type: "REGION.POINTER_ENTER", placement: d });
|
|
4007
4029
|
},
|
|
@@ -4025,8 +4047,8 @@ function pa(e, t, n) {
|
|
|
4025
4047
|
}
|
|
4026
4048
|
};
|
|
4027
4049
|
}
|
|
4028
|
-
var { not:
|
|
4029
|
-
function
|
|
4050
|
+
var { not: ma, and: ya, or: va } = Rn;
|
|
4051
|
+
function ba(e) {
|
|
4030
4052
|
const { type: t = "info", duration: n, id: s = "1", placement: r = "bottom", removeDelay: o = 200, ...c } = e, i = ue(c), u = dn(n, t);
|
|
4031
4053
|
return Re(
|
|
4032
4054
|
{
|
|
@@ -4051,12 +4073,12 @@ function va(e) {
|
|
|
4051
4073
|
on: {
|
|
4052
4074
|
UPDATE: [
|
|
4053
4075
|
{
|
|
4054
|
-
guard:
|
|
4076
|
+
guard: ya("hasTypeChanged", "isChangingToLoading"),
|
|
4055
4077
|
target: "visible:persist",
|
|
4056
4078
|
actions: ["setContext"]
|
|
4057
4079
|
},
|
|
4058
4080
|
{
|
|
4059
|
-
guard:
|
|
4081
|
+
guard: va("hasDurationChanged", "hasTypeChanged"),
|
|
4060
4082
|
target: "visible:updating",
|
|
4061
4083
|
actions: ["setContext"]
|
|
4062
4084
|
},
|
|
@@ -4081,7 +4103,7 @@ function va(e) {
|
|
|
4081
4103
|
tags: ["visible", "paused"],
|
|
4082
4104
|
on: {
|
|
4083
4105
|
RESUME: {
|
|
4084
|
-
guard:
|
|
4106
|
+
guard: ma("isLoadingType"),
|
|
4085
4107
|
target: "visible",
|
|
4086
4108
|
actions: ["setCreatedAt"]
|
|
4087
4109
|
},
|
|
@@ -4124,7 +4146,7 @@ function va(e) {
|
|
|
4124
4146
|
const p = _.getRootEl(a);
|
|
4125
4147
|
if (!p) return;
|
|
4126
4148
|
a.mounted = !0;
|
|
4127
|
-
const g =
|
|
4149
|
+
const g = mo(p, "[data-ghost]");
|
|
4128
4150
|
me(
|
|
4129
4151
|
g.length !== 2,
|
|
4130
4152
|
"[toast] No ghost element found in toast. Render the `ghostBefore` and `ghostAfter` elements"
|
|
@@ -4206,7 +4228,7 @@ function va(e) {
|
|
|
4206
4228
|
}
|
|
4207
4229
|
);
|
|
4208
4230
|
}
|
|
4209
|
-
function
|
|
4231
|
+
function Ea(e) {
|
|
4210
4232
|
const t = ue(e);
|
|
4211
4233
|
return Re(
|
|
4212
4234
|
{
|
|
@@ -4357,7 +4379,7 @@ function ba(e) {
|
|
|
4357
4379
|
if (r && n._cleanup)
|
|
4358
4380
|
return;
|
|
4359
4381
|
const o = () => _.getRegionEl(n, n.placement);
|
|
4360
|
-
n._cleanup =
|
|
4382
|
+
n._cleanup = fi(o, { defer: !0 });
|
|
4361
4383
|
},
|
|
4362
4384
|
clearDismissableBranch(n) {
|
|
4363
4385
|
var s;
|
|
@@ -4406,7 +4428,7 @@ function ba(e) {
|
|
|
4406
4428
|
dir: n.dir,
|
|
4407
4429
|
getRootNode: n.getRootNode,
|
|
4408
4430
|
stacked: o().matches("stack")
|
|
4409
|
-
}, i =
|
|
4431
|
+
}, i = ba(c), u = r.spawn(i);
|
|
4410
4432
|
n.toasts = [u, ...n.toasts];
|
|
4411
4433
|
},
|
|
4412
4434
|
updateToast(n, s, { self: r }) {
|
|
@@ -4464,7 +4486,7 @@ function ba(e) {
|
|
|
4464
4486
|
function Ge(e, t) {
|
|
4465
4487
|
Bt(e.toasts, e.placement).forEach(t);
|
|
4466
4488
|
}
|
|
4467
|
-
function
|
|
4489
|
+
function Ta(e, t, n) {
|
|
4468
4490
|
const s = e.hasTag("visible"), r = e.hasTag("paused"), o = e.context.placement, c = e.context.type, [i, u = "center"] = o.split("-");
|
|
4469
4491
|
return {
|
|
4470
4492
|
type: c,
|
|
@@ -4503,7 +4525,7 @@ function Ea(e, t, n) {
|
|
|
4503
4525
|
"aria-describedby": e.context.description ? _.getDescriptionId(e.context) : void 0,
|
|
4504
4526
|
"aria-labelledby": e.context.title ? _.getTitleId(e.context) : void 0,
|
|
4505
4527
|
tabIndex: 0,
|
|
4506
|
-
style:
|
|
4528
|
+
style: fa(e.context, s),
|
|
4507
4529
|
onKeyDown(a) {
|
|
4508
4530
|
a.defaultPrevented || a.key == "Escape" && (t("DISMISS"), a.preventDefault());
|
|
4509
4531
|
}
|
|
@@ -4513,14 +4535,14 @@ function Ea(e, t, n) {
|
|
|
4513
4535
|
getGhostBeforeProps() {
|
|
4514
4536
|
return n.element({
|
|
4515
4537
|
"data-ghost": "before",
|
|
4516
|
-
style:
|
|
4538
|
+
style: ha(e.context, s)
|
|
4517
4539
|
});
|
|
4518
4540
|
},
|
|
4519
4541
|
/* Needed to avoid setting hover to false when in between toasts */
|
|
4520
4542
|
getGhostAfterProps() {
|
|
4521
4543
|
return n.element({
|
|
4522
4544
|
"data-ghost": "after",
|
|
4523
|
-
style:
|
|
4545
|
+
style: pa()
|
|
4524
4546
|
});
|
|
4525
4547
|
},
|
|
4526
4548
|
getTitleProps() {
|
|
@@ -4559,13 +4581,13 @@ function Ea(e, t, n) {
|
|
|
4559
4581
|
};
|
|
4560
4582
|
}
|
|
4561
4583
|
var Ct = {
|
|
4562
|
-
connect:
|
|
4563
|
-
machine:
|
|
4584
|
+
connect: ga,
|
|
4585
|
+
machine: Ea
|
|
4564
4586
|
};
|
|
4565
|
-
const
|
|
4587
|
+
const Na = (e) => {
|
|
4566
4588
|
const t = Ct.machine({ id: "1", ...e });
|
|
4567
4589
|
return { ...Ct.connect(t, t.send, Le), machine: t };
|
|
4568
|
-
}, [
|
|
4590
|
+
}, [Ca, Fe] = J({
|
|
4569
4591
|
name: "ToastContext",
|
|
4570
4592
|
hookName: "useToastContext",
|
|
4571
4593
|
providerName: "<ToastProvider />"
|
|
@@ -4604,18 +4626,18 @@ const vs = R((e, t) => {
|
|
|
4604
4626
|
vs.displayName = "ToastTitle";
|
|
4605
4627
|
const bs = R((e, t) => {
|
|
4606
4628
|
const { toaster: n, children: s, ...r } = e, [o, c] = et(n.machine), i = o.context.placement, u = Ct.connect(o, c, Le), a = u.getToastsByPlacement(i), l = k(u.getGroupProps({ placement: i }), r);
|
|
4607
|
-
return /* @__PURE__ */ h(F.div, { ...l, ref: t, children: a.map((d) => /* @__PURE__ */ h(
|
|
4629
|
+
return /* @__PURE__ */ h(F.div, { ...l, ref: t, children: a.map((d) => /* @__PURE__ */ h(wa, { value: d, children: (f) => s(f) }, d.id)) });
|
|
4608
4630
|
});
|
|
4609
4631
|
bs.displayName = "Toaster";
|
|
4610
|
-
const
|
|
4611
|
-
const [t, n] =
|
|
4612
|
-
return /* @__PURE__ */ h(
|
|
4613
|
-
},
|
|
4632
|
+
const wa = (e) => {
|
|
4633
|
+
const [t, n] = Or(e.value), s = Ta(t, n, Le);
|
|
4634
|
+
return /* @__PURE__ */ h(Ca, { value: s, children: e.children(t.context) });
|
|
4635
|
+
}, xe = Na({
|
|
4614
4636
|
placement: "bottom-end",
|
|
4615
4637
|
duration: 5e3,
|
|
4616
4638
|
overlap: !0,
|
|
4617
4639
|
gap: 16
|
|
4618
|
-
}),
|
|
4640
|
+
}), xa = {
|
|
4619
4641
|
success: {
|
|
4620
4642
|
container: "border-green-200 bg-green-50 text-green-900",
|
|
4621
4643
|
icon: "text-green-600",
|
|
@@ -4637,11 +4659,11 @@ const Ca = (e) => {
|
|
|
4637
4659
|
IconComponent: Is
|
|
4638
4660
|
}
|
|
4639
4661
|
};
|
|
4640
|
-
function
|
|
4662
|
+
function Xa({ children: e }) {
|
|
4641
4663
|
return /* @__PURE__ */ I(ut, { children: [
|
|
4642
4664
|
e,
|
|
4643
|
-
/* @__PURE__ */ h(bs, { toaster:
|
|
4644
|
-
const n = t.type || "info", s =
|
|
4665
|
+
/* @__PURE__ */ h(bs, { toaster: xe, children: (t) => {
|
|
4666
|
+
const n = t.type || "info", s = xa[n], r = s.IconComponent;
|
|
4645
4667
|
return /* @__PURE__ */ I(
|
|
4646
4668
|
ys,
|
|
4647
4669
|
{
|
|
@@ -4690,42 +4712,43 @@ function qa({ children: e }) {
|
|
|
4690
4712
|
} })
|
|
4691
4713
|
] });
|
|
4692
4714
|
}
|
|
4693
|
-
const
|
|
4694
|
-
success: (e) =>
|
|
4715
|
+
const Za = {
|
|
4716
|
+
success: (e) => xe.create({
|
|
4695
4717
|
...e,
|
|
4696
4718
|
type: "success"
|
|
4697
4719
|
}),
|
|
4698
|
-
error: (e) =>
|
|
4720
|
+
error: (e) => xe.create({
|
|
4699
4721
|
...e,
|
|
4700
4722
|
type: "error"
|
|
4701
4723
|
}),
|
|
4702
|
-
warning: (e) =>
|
|
4724
|
+
warning: (e) => xe.create({
|
|
4703
4725
|
...e,
|
|
4704
4726
|
type: "warning"
|
|
4705
4727
|
}),
|
|
4706
|
-
info: (e) =>
|
|
4728
|
+
info: (e) => xe.create({
|
|
4707
4729
|
...e,
|
|
4708
4730
|
type: "info"
|
|
4709
4731
|
})
|
|
4710
4732
|
};
|
|
4711
4733
|
export {
|
|
4734
|
+
Ra as Badge,
|
|
4712
4735
|
Vt as Button,
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4736
|
+
La as Card,
|
|
4737
|
+
Ba as CardContent,
|
|
4738
|
+
_a as CardDescription,
|
|
4739
|
+
$a as CardFooter,
|
|
4740
|
+
Fa as CardHeader,
|
|
4741
|
+
Ma as CardTitle,
|
|
4742
|
+
Ua as Checkbox,
|
|
4743
|
+
Ka as Dialog,
|
|
4744
|
+
Wa as Input,
|
|
4745
|
+
qa as ProductsTable,
|
|
4746
|
+
za as Progress,
|
|
4747
|
+
Ya as Select,
|
|
4725
4748
|
B as Table,
|
|
4726
|
-
|
|
4749
|
+
Xa as ToastProvider,
|
|
4727
4750
|
E as cn,
|
|
4728
|
-
|
|
4729
|
-
|
|
4751
|
+
Za as toast,
|
|
4752
|
+
xe as toaster
|
|
4730
4753
|
};
|
|
4731
4754
|
//# sourceMappingURL=index.mjs.map
|