@veevarts/design-system 1.8.0 → 1.9.1-alpha.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/README.md +34 -1
- package/dist/index.cjs +9 -9
- package/dist/index.js +1134 -1129
- package/dist/patterns/MembershipSelectCards/types.d.ts +2 -0
- package/dist/patterns/TicketSelection/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u, jsxs as A, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
-
import { HeroUIProvider as ml, Button as gl, cn as
|
|
2
|
+
import { HeroUIProvider as ml, Button as gl, cn as L, Select as pi, SelectItem as mi, Alert as In, Card as Ee, CardBody as Le, Divider as As, Tooltip as Tt, Dropdown as Ns, DropdownTrigger as Es, DropdownMenu as Ts, DropdownItem as Ms, Input as ur, Popover as Os, PopoverTrigger as Is, PopoverContent as Ds, ButtonGroup as yl, useInput as bl, NumberInput as Ls, CardHeader as Fs, Image as xl, CardFooter as kl, Chip as gi, Skeleton as me, Autocomplete as vl, AutocompleteItem as Sl, Checkbox as Cl, Switch as wl } from "@heroui/react";
|
|
3
3
|
export * from "@heroui/react";
|
|
4
|
-
import B, { forwardRef as tn, useState as J, useRef as It, useEffect as qe, useReducer as Al, useCallback as ce, useMemo as
|
|
4
|
+
import B, { forwardRef as tn, useState as J, useRef as It, useEffect as qe, useReducer as Al, useCallback as ce, useMemo as it, createElement as dr, useId as Nl } from "react";
|
|
5
5
|
import { Globe as yi, User as bi, Heading as Ps, Check as Rs, ListTodo as $s, ListOrdered as Vs, List as Pr, AlignJustify as El, AlignRight as Tl, AlignCenter as Ml, AlignLeft as zs, CornerDownLeft as Ol, Redo2 as Il, Undo2 as Dl, Eraser as xi, Minus as Ll, Quote as Fl, CodeSquare as Pl, FileText as Rl, Link2 as $l, Highlighter as Bs, Palette as _s, Code as Vl, Underline as zl, Strikethrough as Bl, Italic as _l, Bold as Hl, X as Ul, ZoomOut as ql, ZoomIn as Kl, Link as jl, Clock as ki, CheckCircle as Wl, AlertCircle as Jl } from "lucide-react";
|
|
6
6
|
import { LazyMotion as Gl, domAnimation as Zl, m as fr, motion as hr, AnimatePresence as pr } from "framer-motion";
|
|
7
7
|
import { EditorProvider as Ql, useCurrentEditor as Hs } from "@tiptap/react";
|
|
@@ -143,7 +143,7 @@ function ph({
|
|
|
143
143
|
"nav",
|
|
144
144
|
{
|
|
145
145
|
"data-testid": "navbar",
|
|
146
|
-
className:
|
|
146
|
+
className: L(
|
|
147
147
|
"w-full px-4 md:px-8 py-3 bg-white border-b border-zinc-100 flex items-center justify-between",
|
|
148
148
|
d
|
|
149
149
|
),
|
|
@@ -191,9 +191,9 @@ function $r(t, e, n) {
|
|
|
191
191
|
ha(() => {
|
|
192
192
|
s.current = a;
|
|
193
193
|
});
|
|
194
|
-
let [, c] = Al(() => ({}), {}), d = ce((f, ...
|
|
194
|
+
let [, c] = Al(() => ({}), {}), d = ce((f, ...h) => {
|
|
195
195
|
let m = typeof f == "function" ? f(s.current) : f;
|
|
196
|
-
Object.is(s.current, m) || (s.current = m, i(m), c(), n?.(m, ...
|
|
196
|
+
Object.is(s.current, m) || (s.current = m, i(m), c(), n?.(m, ...h));
|
|
197
197
|
}, [
|
|
198
198
|
n
|
|
199
199
|
]);
|
|
@@ -234,9 +234,9 @@ const ma = B.forwardRef(
|
|
|
234
234
|
isDisabled: c = !1,
|
|
235
235
|
...d
|
|
236
236
|
}, f) => {
|
|
237
|
-
const [
|
|
238
|
-
let
|
|
239
|
-
const
|
|
237
|
+
const [h, m] = $r(s, n, i), v = B.useMemo(() => {
|
|
238
|
+
let y, b;
|
|
239
|
+
const k = [
|
|
240
240
|
"[--active-fg-color:hsl(var(--step-fg-color))]",
|
|
241
241
|
"[--active-border-color:hsl(var(--step-color))]",
|
|
242
242
|
"[--active-color:hsl(var(--step-color))]",
|
|
@@ -247,35 +247,35 @@ const ma = B.forwardRef(
|
|
|
247
247
|
];
|
|
248
248
|
switch (t) {
|
|
249
249
|
case "primary":
|
|
250
|
-
|
|
250
|
+
y = "[--step-color:var(--heroui-primary)]", b = "[--step-fg-color:var(--heroui-primary-foreground)]";
|
|
251
251
|
break;
|
|
252
252
|
case "secondary":
|
|
253
|
-
|
|
253
|
+
y = "[--step-color:var(--heroui-secondary)]", b = "[--step-fg-color:var(--heroui-secondary-foreground)]";
|
|
254
254
|
break;
|
|
255
255
|
case "success":
|
|
256
|
-
|
|
256
|
+
y = "[--step-color:var(--heroui-success)]", b = "[--step-fg-color:var(--heroui-success-foreground)]";
|
|
257
257
|
break;
|
|
258
258
|
case "warning":
|
|
259
|
-
|
|
259
|
+
y = "[--step-color:var(--heroui-warning)]", b = "[--step-fg-color:var(--heroui-warning-foreground)]";
|
|
260
260
|
break;
|
|
261
261
|
case "danger":
|
|
262
|
-
|
|
262
|
+
y = "[--step-color:var(--heroui-danger)]", b = "[--step-fg-color:var(--heroui-danger-foreground)]";
|
|
263
263
|
break;
|
|
264
264
|
case "default":
|
|
265
|
-
|
|
265
|
+
y = "[--step-color:var(--heroui-default)]", b = "[--step-fg-color:var(--heroui-default-foreground)]";
|
|
266
266
|
break;
|
|
267
267
|
default:
|
|
268
|
-
|
|
268
|
+
y = "[--step-color:var(--heroui-primary)]", b = "[--step-fg-color:var(--heroui-primary-foreground)]";
|
|
269
269
|
break;
|
|
270
270
|
}
|
|
271
|
-
return
|
|
271
|
+
return k.unshift(b), k.unshift(y), k;
|
|
272
272
|
}, [t]);
|
|
273
273
|
return /* @__PURE__ */ A(
|
|
274
274
|
"nav",
|
|
275
275
|
{
|
|
276
276
|
ref: f,
|
|
277
277
|
"aria-label": "Progress",
|
|
278
|
-
className:
|
|
278
|
+
className: L("flex max-w-fit items-center overflow-x-auto", a),
|
|
279
279
|
"data-testid": "stepper-root",
|
|
280
280
|
...d,
|
|
281
281
|
children: [
|
|
@@ -287,34 +287,34 @@ const ma = B.forwardRef(
|
|
|
287
287
|
children: r
|
|
288
288
|
}
|
|
289
289
|
),
|
|
290
|
-
/* @__PURE__ */ u("ol", { className:
|
|
291
|
-
const
|
|
290
|
+
/* @__PURE__ */ u("ol", { className: L("flex flex-row flex-nowrap gap-x-3", v, a), "data-testid": "stepper-list", children: Array.from({ length: e })?.map((y, b) => {
|
|
291
|
+
const k = h === b ? "active" : h < b ? "inactive" : "complete";
|
|
292
292
|
return /* @__PURE__ */ u(
|
|
293
293
|
"li",
|
|
294
294
|
{
|
|
295
295
|
className: "relative flex shrink-0 items-center pr-12",
|
|
296
|
-
"data-testid": `stepper-step-${
|
|
296
|
+
"data-testid": `stepper-step-${b}`,
|
|
297
297
|
children: /* @__PURE__ */ A(
|
|
298
298
|
"button",
|
|
299
299
|
{
|
|
300
|
-
"aria-current":
|
|
301
|
-
className:
|
|
300
|
+
"aria-current": k === "active" ? "step" : void 0,
|
|
301
|
+
className: L(
|
|
302
302
|
"group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",
|
|
303
303
|
{ "cursor-not-allowed opacity-50": c },
|
|
304
304
|
l
|
|
305
305
|
),
|
|
306
|
-
onClick: () => !c && m(
|
|
306
|
+
onClick: () => !c && m(b),
|
|
307
307
|
disabled: c,
|
|
308
|
-
"data-testid": `stepper-step-btn-${
|
|
308
|
+
"data-testid": `stepper-step-btn-${b}`,
|
|
309
309
|
children: [
|
|
310
|
-
/* @__PURE__ */ u("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ u(Gl, { features: Zl, children: /* @__PURE__ */ u(fr.div, { animate:
|
|
310
|
+
/* @__PURE__ */ u("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ u(Gl, { features: Zl, children: /* @__PURE__ */ u(fr.div, { animate: k, className: "relative", children: /* @__PURE__ */ u(
|
|
311
311
|
fr.div,
|
|
312
312
|
{
|
|
313
|
-
animate:
|
|
314
|
-
className:
|
|
313
|
+
animate: k,
|
|
314
|
+
className: L(
|
|
315
315
|
"border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",
|
|
316
316
|
{
|
|
317
|
-
"shadow-lg":
|
|
317
|
+
"shadow-lg": k === "complete"
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
320
|
initial: !1,
|
|
@@ -336,16 +336,16 @@ const ma = B.forwardRef(
|
|
|
336
336
|
color: "var(--active-fg-color)"
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
|
-
children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center", children:
|
|
339
|
+
children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center", children: k === "complete" ? /* @__PURE__ */ u(
|
|
340
340
|
pa,
|
|
341
341
|
{
|
|
342
342
|
className: "h-5 w-5 text-(--active-fg-color)",
|
|
343
|
-
"data-testid": `stepper-step-check-${
|
|
343
|
+
"data-testid": `stepper-step-check-${b}`
|
|
344
344
|
}
|
|
345
345
|
) : /* @__PURE__ */ u("span", {}) })
|
|
346
346
|
}
|
|
347
347
|
) }) }) }),
|
|
348
|
-
|
|
348
|
+
b < e - 1 && !o && /* @__PURE__ */ u(
|
|
349
349
|
"div",
|
|
350
350
|
{
|
|
351
351
|
"aria-hidden": "true",
|
|
@@ -353,16 +353,16 @@ const ma = B.forwardRef(
|
|
|
353
353
|
style: {
|
|
354
354
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
355
355
|
// @ts-expect-error
|
|
356
|
-
"--idx":
|
|
356
|
+
"--idx": b
|
|
357
357
|
},
|
|
358
358
|
children: /* @__PURE__ */ u(
|
|
359
359
|
"div",
|
|
360
360
|
{
|
|
361
|
-
className:
|
|
361
|
+
className: L(
|
|
362
362
|
"bg-default-200 relative h-0.5 w-full transition-colors duration-300",
|
|
363
363
|
"after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",
|
|
364
364
|
{
|
|
365
|
-
"after:w-full":
|
|
365
|
+
"after:w-full": b < h
|
|
366
366
|
}
|
|
367
367
|
)
|
|
368
368
|
}
|
|
@@ -371,10 +371,10 @@ const ma = B.forwardRef(
|
|
|
371
371
|
)
|
|
372
372
|
]
|
|
373
373
|
},
|
|
374
|
-
|
|
374
|
+
b
|
|
375
375
|
)
|
|
376
376
|
},
|
|
377
|
-
|
|
377
|
+
b
|
|
378
378
|
);
|
|
379
379
|
}) })
|
|
380
380
|
]
|
|
@@ -408,7 +408,7 @@ function yh() {
|
|
|
408
408
|
);
|
|
409
409
|
}
|
|
410
410
|
const bh = (t) => {
|
|
411
|
-
const e =
|
|
411
|
+
const e = it(
|
|
412
412
|
() => JSON.stringify({ allItems: t.allItems, selected: t.selected }),
|
|
413
413
|
[t.allItems, t.selected]
|
|
414
414
|
);
|
|
@@ -422,64 +422,64 @@ const bh = (t) => {
|
|
|
422
422
|
}) => {
|
|
423
423
|
const [s, o] = J([]), [l, a] = J([]), [c, d] = J(
|
|
424
424
|
null
|
|
425
|
-
), [f,
|
|
425
|
+
), [f, h] = J(
|
|
426
426
|
null
|
|
427
|
-
), m =
|
|
428
|
-
() => t.filter((
|
|
427
|
+
), m = it(() => new Set(e), [e]), v = it(() => new Set(t), [t]), y = it(
|
|
428
|
+
() => t.filter((V) => !m.has(V)),
|
|
429
429
|
[t, m]
|
|
430
|
-
),
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
433
|
-
n(
|
|
434
|
-
},
|
|
435
|
-
if (
|
|
436
|
-
const
|
|
437
|
-
n(e.filter((
|
|
430
|
+
), b = (V) => {
|
|
431
|
+
if (V.length === 0) return;
|
|
432
|
+
const M = Array.from(/* @__PURE__ */ new Set([...e, ...V]));
|
|
433
|
+
n(M);
|
|
434
|
+
}, k = (V) => {
|
|
435
|
+
if (V.length === 0) return;
|
|
436
|
+
const M = new Set(V);
|
|
437
|
+
n(e.filter((P) => !M.has(P)));
|
|
438
|
+
}, S = () => {
|
|
439
|
+
s.length !== 0 && (b(s), o([]));
|
|
440
|
+
}, I = () => {
|
|
441
|
+
l.length !== 0 && (k(l), a([]));
|
|
438
442
|
}, C = () => {
|
|
439
|
-
|
|
443
|
+
y.length !== 0 && (b(y), o([]));
|
|
440
444
|
}, w = () => {
|
|
441
|
-
l.length !== 0 && (x(l), a([]));
|
|
442
|
-
}, S = () => {
|
|
443
|
-
b.length !== 0 && (y(b), o([]));
|
|
444
|
-
}, N = () => {
|
|
445
445
|
e.length !== 0 && (n([]), a([]));
|
|
446
|
-
}, T = (
|
|
447
|
-
const
|
|
448
|
-
return
|
|
449
|
-
},
|
|
450
|
-
if (
|
|
451
|
-
o(T(
|
|
446
|
+
}, T = (V, M, P) => {
|
|
447
|
+
const R = Math.min(M, P), H = Math.max(M, P);
|
|
448
|
+
return V.slice(R, H + 1);
|
|
449
|
+
}, N = (V, M, P) => {
|
|
450
|
+
if (P && c !== null) {
|
|
451
|
+
o(T(y, c, M)), a([]), d(M);
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
|
-
const
|
|
454
|
+
const R = s.includes(V);
|
|
455
455
|
o(
|
|
456
|
-
|
|
457
|
-
), a([]), d(
|
|
458
|
-
},
|
|
459
|
-
if (
|
|
460
|
-
a(T(e, f,
|
|
456
|
+
R ? s.filter((H) => H !== V) : [...s, V]
|
|
457
|
+
), a([]), d(M);
|
|
458
|
+
}, $ = (V, M, P) => {
|
|
459
|
+
if (P && f !== null) {
|
|
460
|
+
a(T(e, f, M)), o([]), h(M);
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const R = l.includes(V);
|
|
464
464
|
a(
|
|
465
|
-
|
|
466
|
-
), o([]),
|
|
467
|
-
},
|
|
468
|
-
const
|
|
469
|
-
|
|
465
|
+
R ? l.filter((H) => H !== V) : [...l, V]
|
|
466
|
+
), o([]), h(M);
|
|
467
|
+
}, _ = (V, M, P) => {
|
|
468
|
+
const R = P === "available" ? s.includes(M) ? s : [M] : l.includes(M) ? l : [M];
|
|
469
|
+
V.dataTransfer.setData(
|
|
470
470
|
"text/plain",
|
|
471
|
-
JSON.stringify({ source:
|
|
472
|
-
),
|
|
473
|
-
}, U = (
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
if (
|
|
471
|
+
JSON.stringify({ source: P, items: R })
|
|
472
|
+
), V.dataTransfer.effectAllowed = "move";
|
|
473
|
+
}, U = (V, M) => {
|
|
474
|
+
V.preventDefault();
|
|
475
|
+
const P = V.dataTransfer.getData("text/plain");
|
|
476
|
+
if (P)
|
|
477
477
|
try {
|
|
478
|
-
const
|
|
479
|
-
(
|
|
478
|
+
const R = JSON.parse(P), H = (R.items || []).filter(
|
|
479
|
+
(Q) => v.has(Q)
|
|
480
480
|
);
|
|
481
|
-
if (
|
|
482
|
-
|
|
481
|
+
if (H.length === 0 || R.source === M) return;
|
|
482
|
+
M === "selected" ? (b(H), o([])) : (k(H), a([]));
|
|
483
483
|
} catch {
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
@@ -491,26 +491,26 @@ const bh = (t) => {
|
|
|
491
491
|
Le,
|
|
492
492
|
{
|
|
493
493
|
className: "h-60 gap-2 overflow-y-auto",
|
|
494
|
-
onDragOver: (
|
|
495
|
-
onDrop: (
|
|
496
|
-
children:
|
|
497
|
-
const
|
|
494
|
+
onDragOver: (V) => V.preventDefault(),
|
|
495
|
+
onDrop: (V) => U(V, "available"),
|
|
496
|
+
children: y.map((V, M) => {
|
|
497
|
+
const P = s.includes(V);
|
|
498
498
|
return /* @__PURE__ */ u(
|
|
499
499
|
"button",
|
|
500
500
|
{
|
|
501
501
|
type: "button",
|
|
502
|
-
onClick: (
|
|
503
|
-
|
|
502
|
+
onClick: (R) => {
|
|
503
|
+
N(V, M, R.shiftKey);
|
|
504
504
|
},
|
|
505
|
-
onMouseDown: (
|
|
506
|
-
|
|
505
|
+
onMouseDown: (R) => {
|
|
506
|
+
R.shiftKey && R.preventDefault();
|
|
507
507
|
},
|
|
508
508
|
draggable: !0,
|
|
509
|
-
onDragStart: (
|
|
510
|
-
className: `rounded-md px-3 py-2 text-left text-sm transition ${
|
|
511
|
-
children:
|
|
509
|
+
onDragStart: (R) => _(R, V, "available"),
|
|
510
|
+
className: `rounded-md px-3 py-2 text-left text-sm transition ${P ? "bg-[#E4571E]/10 text-[#E4571E]" : "text-gray-700 hover:bg-gray-100"}`,
|
|
511
|
+
children: V
|
|
512
512
|
},
|
|
513
|
-
|
|
513
|
+
V
|
|
514
514
|
);
|
|
515
515
|
})
|
|
516
516
|
}
|
|
@@ -524,7 +524,7 @@ const bh = (t) => {
|
|
|
524
524
|
className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
|
|
525
525
|
isIconOnly: !0,
|
|
526
526
|
"data-testid": "move-selected-to-available",
|
|
527
|
-
onPress:
|
|
527
|
+
onPress: S,
|
|
528
528
|
isDisabled: s.length === 0,
|
|
529
529
|
"aria-label": "Move selected to right",
|
|
530
530
|
children: "›"
|
|
@@ -537,7 +537,7 @@ const bh = (t) => {
|
|
|
537
537
|
className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
|
|
538
538
|
isIconOnly: !0,
|
|
539
539
|
"data-testid": "move-selected-to-available",
|
|
540
|
-
onPress:
|
|
540
|
+
onPress: I,
|
|
541
541
|
isDisabled: l.length === 0,
|
|
542
542
|
"aria-label": "Move selected to left",
|
|
543
543
|
children: "‹"
|
|
@@ -550,8 +550,8 @@ const bh = (t) => {
|
|
|
550
550
|
className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
|
|
551
551
|
isIconOnly: !0,
|
|
552
552
|
"data-testid": "move-all-to-selected",
|
|
553
|
-
onPress:
|
|
554
|
-
isDisabled:
|
|
553
|
+
onPress: C,
|
|
554
|
+
isDisabled: y.length === 0,
|
|
555
555
|
"aria-label": "Move all to right",
|
|
556
556
|
children: "»"
|
|
557
557
|
}
|
|
@@ -562,7 +562,7 @@ const bh = (t) => {
|
|
|
562
562
|
variant: "light",
|
|
563
563
|
className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
|
|
564
564
|
isIconOnly: !0,
|
|
565
|
-
onPress:
|
|
565
|
+
onPress: w,
|
|
566
566
|
"data-testid": "move-all-to-available",
|
|
567
567
|
isDisabled: e.length === 0,
|
|
568
568
|
"aria-label": "Move all to left",
|
|
@@ -576,26 +576,26 @@ const bh = (t) => {
|
|
|
576
576
|
Le,
|
|
577
577
|
{
|
|
578
578
|
className: "h-60 gap-2 overflow-y-auto",
|
|
579
|
-
onDragOver: (
|
|
580
|
-
onDrop: (
|
|
581
|
-
children: e.map((
|
|
582
|
-
const
|
|
579
|
+
onDragOver: (V) => V.preventDefault(),
|
|
580
|
+
onDrop: (V) => U(V, "selected"),
|
|
581
|
+
children: e.map((V, M) => {
|
|
582
|
+
const P = l.includes(V);
|
|
583
583
|
return /* @__PURE__ */ u(
|
|
584
584
|
"button",
|
|
585
585
|
{
|
|
586
586
|
type: "button",
|
|
587
|
-
onClick: (
|
|
588
|
-
V
|
|
587
|
+
onClick: (R) => {
|
|
588
|
+
$(V, M, R.shiftKey);
|
|
589
589
|
},
|
|
590
|
-
onMouseDown: (
|
|
591
|
-
|
|
590
|
+
onMouseDown: (R) => {
|
|
591
|
+
R.shiftKey && R.preventDefault();
|
|
592
592
|
},
|
|
593
593
|
draggable: !0,
|
|
594
|
-
onDragStart: (
|
|
595
|
-
className: `rounded-md px-3 py-2 text-left text-sm transition ${
|
|
596
|
-
children:
|
|
594
|
+
onDragStart: (R) => _(R, V, "selected"),
|
|
595
|
+
className: `rounded-md px-3 py-2 text-left text-sm transition ${P ? "bg-[#E4571E]/10 text-[#E4571E]" : "text-gray-700 hover:bg-gray-100"}`,
|
|
596
|
+
children: V
|
|
597
597
|
},
|
|
598
|
-
|
|
598
|
+
V
|
|
599
599
|
);
|
|
600
600
|
})
|
|
601
601
|
}
|
|
@@ -606,10 +606,10 @@ const bh = (t) => {
|
|
|
606
606
|
function Jt(t) {
|
|
607
607
|
return typeof t == "string" ? t : t.type;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function ct({ className: t }) {
|
|
610
610
|
return /* @__PURE__ */ u("div", { className: `flex items-center h-6 ${t || ""}`, children: /* @__PURE__ */ u(As, { orientation: "vertical" }) });
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function ut({
|
|
613
613
|
icon: t,
|
|
614
614
|
label: e,
|
|
615
615
|
isActive: n = !1,
|
|
@@ -1124,17 +1124,17 @@ function Aa({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
|
|
|
1124
1124
|
] });
|
|
1125
1125
|
}
|
|
1126
1126
|
function Ci({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
|
|
1127
|
-
const [s, o] = J(!1), [l, a] = J(""), c = e === "textColor" ? va : Sa, d = (
|
|
1128
|
-
const y = Ze[e];
|
|
1129
|
-
y && y.execute({
|
|
1130
|
-
editor: t,
|
|
1131
|
-
config: { type: e, color: b }
|
|
1132
|
-
}), o(!1), a("");
|
|
1133
|
-
}, f = (b) => {
|
|
1134
|
-
d(b);
|
|
1135
|
-
}, p = () => {
|
|
1127
|
+
const [s, o] = J(!1), [l, a] = J(""), c = e === "textColor" ? va : Sa, d = (y) => {
|
|
1136
1128
|
const b = Ze[e];
|
|
1137
1129
|
b && b.execute({
|
|
1130
|
+
editor: t,
|
|
1131
|
+
config: { type: e, color: y }
|
|
1132
|
+
}), o(!1), a("");
|
|
1133
|
+
}, f = (y) => {
|
|
1134
|
+
d(y);
|
|
1135
|
+
}, h = () => {
|
|
1136
|
+
const y = Ze[e];
|
|
1137
|
+
y && y.execute({
|
|
1138
1138
|
editor: t,
|
|
1139
1139
|
config: { type: e, color: "" }
|
|
1140
1140
|
}), o(!1);
|
|
@@ -1162,7 +1162,7 @@ function Ci({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
|
|
|
1162
1162
|
size: "sm",
|
|
1163
1163
|
variant: "light",
|
|
1164
1164
|
isIconOnly: !0,
|
|
1165
|
-
onPress:
|
|
1165
|
+
onPress: h,
|
|
1166
1166
|
"aria-label": "Clear color",
|
|
1167
1167
|
children: /* @__PURE__ */ u(Ul, { size: 16 })
|
|
1168
1168
|
}
|
|
@@ -1253,21 +1253,21 @@ function Na({
|
|
|
1253
1253
|
function Ea({ editor: t, isDisabled: e = !1 }) {
|
|
1254
1254
|
const [n, r] = J(!1), [i, s] = J(""), [o, l] = J(""), [a, c] = J(!1), d = t.isActive("link"), f = (m) => {
|
|
1255
1255
|
if (m) {
|
|
1256
|
-
const { from: v, to:
|
|
1257
|
-
let
|
|
1258
|
-
if (
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1256
|
+
const { from: v, to: y } = t.state.selection, b = t.isActive("link");
|
|
1257
|
+
let k = "";
|
|
1258
|
+
if (b) {
|
|
1259
|
+
const I = t.schema.marks.link, C = t.state.doc.resolve(v), w = vi(C, I);
|
|
1260
|
+
w && (k = t.state.doc.textBetween(w.from, w.to, ""));
|
|
1261
1261
|
} else
|
|
1262
|
-
|
|
1263
|
-
const
|
|
1264
|
-
s(
|
|
1262
|
+
k = t.state.doc.textBetween(v, y, "");
|
|
1263
|
+
const S = t.getAttributes("link").href || "";
|
|
1264
|
+
s(k), l(S), c(b);
|
|
1265
1265
|
}
|
|
1266
1266
|
r(m);
|
|
1267
|
-
},
|
|
1267
|
+
}, h = () => {
|
|
1268
1268
|
if (o.trim()) {
|
|
1269
|
-
const { from: m, to: v } = t.state.selection,
|
|
1270
|
-
i.trim() && i !==
|
|
1269
|
+
const { from: m, to: v } = t.state.selection, y = t.schema.marks.link, b = t.state.doc.resolve(m), k = vi(b, y), S = k?.from ?? m, I = k?.to ?? v, C = t.state.doc.textBetween(S, I, "");
|
|
1270
|
+
i.trim() && i !== C ? t.chain().focus().setTextSelection({ from: S, to: I }).deleteSelection().insertContent(`<a href="${o.trim()}">${i.trim()}</a>`).run() : t.chain().focus().extendMarkRange("link").updateAttributes("link", { href: o.trim() }).run();
|
|
1271
1271
|
}
|
|
1272
1272
|
r(!1);
|
|
1273
1273
|
};
|
|
@@ -1311,7 +1311,7 @@ function Ea({ editor: t, isDisabled: e = !1 }) {
|
|
|
1311
1311
|
placeholder: "https://example.com",
|
|
1312
1312
|
value: o,
|
|
1313
1313
|
onChange: (m) => l(m.target.value),
|
|
1314
|
-
onKeyDown: (m) => m.key === "Enter" &&
|
|
1314
|
+
onKeyDown: (m) => m.key === "Enter" && h(),
|
|
1315
1315
|
classNames: {
|
|
1316
1316
|
inputWrapper: "focus-within:border-default-400"
|
|
1317
1317
|
}
|
|
@@ -1322,7 +1322,7 @@ function Ea({ editor: t, isDisabled: e = !1 }) {
|
|
|
1322
1322
|
{
|
|
1323
1323
|
size: "sm",
|
|
1324
1324
|
color: "primary",
|
|
1325
|
-
onPress:
|
|
1325
|
+
onPress: h,
|
|
1326
1326
|
isDisabled: !o.trim(),
|
|
1327
1327
|
children: a ? "Update" : "Apply"
|
|
1328
1328
|
}
|
|
@@ -1334,7 +1334,7 @@ function Ta({ children: t, id: e, label: n, className: r, useButtonGroup: i = !0
|
|
|
1334
1334
|
return i ? /* @__PURE__ */ u(yl, { size: "sm", id: e, "aria-label": n, className: r, children: t }) : /* @__PURE__ */ u("div", { id: e, role: "group", "aria-label": n, className: `flex items-center gap-2 ${r || ""}`, children: t });
|
|
1335
1335
|
}
|
|
1336
1336
|
function Us(t, e) {
|
|
1337
|
-
const n =
|
|
1337
|
+
const n = it(() => {
|
|
1338
1338
|
if (!t)
|
|
1339
1339
|
return {};
|
|
1340
1340
|
const s = {};
|
|
@@ -1469,7 +1469,7 @@ function Ia({ editor: t, modifiers: e, onToolbarAction: n }) {
|
|
|
1469
1469
|
return s.length === 0 ? null : /* @__PURE__ */ u(Ta, { id: "text-formatting", label: "Text formatting", children: s.map((o) => {
|
|
1470
1470
|
const l = r[o], a = wt(o);
|
|
1471
1471
|
return /* @__PURE__ */ u(
|
|
1472
|
-
|
|
1472
|
+
ut,
|
|
1473
1473
|
{
|
|
1474
1474
|
icon: a,
|
|
1475
1475
|
label: o.charAt(0).toUpperCase() + o.slice(1),
|
|
@@ -1492,7 +1492,7 @@ function Da({
|
|
|
1492
1492
|
}) {
|
|
1493
1493
|
const l = Us(t, e), { toggleModifier: a, executeCommand: c } = qs(t, o);
|
|
1494
1494
|
if (!t) return null;
|
|
1495
|
-
const d = e.map((
|
|
1495
|
+
const d = e.map((N) => Jt(N)), f = d.some((N) => ["bold", "italic", "strike", "underline", "code"].includes(N)), h = d.some((N) => ["textColor", "highlight"].includes(N)), m = d.includes("heading"), v = d.includes("textAlign"), y = d.some((N) => ["bulletList", "orderedList", "taskList"].includes(N)), b = d.includes("blockquote"), k = d.includes("codeBlock"), S = d.includes("link"), I = d.includes("horizontalRule"), C = d.some((N) => ["undo", "redo"].includes(N)), w = n !== void 0 && r !== void 0;
|
|
1496
1496
|
return /* @__PURE__ */ u("div", { className: `w-full p-2 bg-background border-b border-divider ${i ? "sticky top-0 z-10" : ""} ${s || ""}`, children: /* @__PURE__ */ A("div", { className: "flex flex-row flex-wrap gap-2 w-full items-center", children: [
|
|
1497
1497
|
f && /* @__PURE__ */ A(Je, { children: [
|
|
1498
1498
|
/* @__PURE__ */ u(
|
|
@@ -1503,9 +1503,9 @@ function Da({
|
|
|
1503
1503
|
onToolbarAction: o
|
|
1504
1504
|
}
|
|
1505
1505
|
),
|
|
1506
|
-
(
|
|
1506
|
+
(h || m || v || y || b || k || S || I || C || w) && /* @__PURE__ */ u(ct, {})
|
|
1507
1507
|
] }),
|
|
1508
|
-
|
|
1508
|
+
h && /* @__PURE__ */ A(Je, { children: [
|
|
1509
1509
|
/* @__PURE__ */ A("div", { className: "flex items-center gap-1", children: [
|
|
1510
1510
|
d.includes("textColor") && /* @__PURE__ */ u(
|
|
1511
1511
|
Ci,
|
|
@@ -1526,48 +1526,48 @@ function Da({
|
|
|
1526
1526
|
}
|
|
1527
1527
|
)
|
|
1528
1528
|
] }),
|
|
1529
|
-
(m || v ||
|
|
1529
|
+
(m || v || y || b || k || S || I || C || w) && /* @__PURE__ */ u(ct, {})
|
|
1530
1530
|
] }),
|
|
1531
1531
|
m && /* @__PURE__ */ A(Je, { children: [
|
|
1532
1532
|
/* @__PURE__ */ u(ba, { editor: t }),
|
|
1533
|
-
(v ||
|
|
1533
|
+
(v || y || b || k || S || I || C || w) && /* @__PURE__ */ u(ct, {})
|
|
1534
1534
|
] }),
|
|
1535
1535
|
v && /* @__PURE__ */ A(Je, { children: [
|
|
1536
|
-
/* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: ["left", "center", "right", "justify"].map((
|
|
1537
|
-
const
|
|
1536
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: ["left", "center", "right", "justify"].map((N) => {
|
|
1537
|
+
const $ = wa[N], _ = t.isActive({ textAlign: N });
|
|
1538
1538
|
return /* @__PURE__ */ u(
|
|
1539
|
-
|
|
1539
|
+
ut,
|
|
1540
1540
|
{
|
|
1541
|
-
icon:
|
|
1542
|
-
label: `Align ${
|
|
1543
|
-
isActive:
|
|
1541
|
+
icon: $,
|
|
1542
|
+
label: `Align ${N}`,
|
|
1543
|
+
isActive: _,
|
|
1544
1544
|
onClick: () => c("textAlign", {
|
|
1545
1545
|
type: "textAlign",
|
|
1546
1546
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1547
|
-
alignment:
|
|
1547
|
+
alignment: N
|
|
1548
1548
|
})
|
|
1549
1549
|
},
|
|
1550
|
-
|
|
1550
|
+
N
|
|
1551
1551
|
);
|
|
1552
1552
|
}) }),
|
|
1553
|
-
(
|
|
1553
|
+
(y || b || k || S || I || C || w) && /* @__PURE__ */ u(ct, {})
|
|
1554
1554
|
] }),
|
|
1555
|
-
|
|
1555
|
+
y && /* @__PURE__ */ A(Je, { children: [
|
|
1556
1556
|
/* @__PURE__ */ u(
|
|
1557
1557
|
xa,
|
|
1558
1558
|
{
|
|
1559
1559
|
editor: t,
|
|
1560
1560
|
types: d.filter(
|
|
1561
|
-
(
|
|
1561
|
+
(N) => ["bulletList", "orderedList", "taskList"].includes(N)
|
|
1562
1562
|
)
|
|
1563
1563
|
}
|
|
1564
1564
|
),
|
|
1565
|
-
(
|
|
1565
|
+
(b || k || S || I || C || w) && /* @__PURE__ */ u(ct, {})
|
|
1566
1566
|
] }),
|
|
1567
|
-
(
|
|
1567
|
+
(b || k || S || I) && /* @__PURE__ */ A(Je, { children: [
|
|
1568
1568
|
/* @__PURE__ */ A("div", { className: "flex items-center gap-1", children: [
|
|
1569
|
-
|
|
1570
|
-
|
|
1569
|
+
b && /* @__PURE__ */ u(
|
|
1570
|
+
ut,
|
|
1571
1571
|
{
|
|
1572
1572
|
icon: wt("blockquote"),
|
|
1573
1573
|
label: "Blockquote",
|
|
@@ -1576,8 +1576,8 @@ function Da({
|
|
|
1576
1576
|
onClick: () => a("blockquote")
|
|
1577
1577
|
}
|
|
1578
1578
|
),
|
|
1579
|
-
|
|
1580
|
-
|
|
1579
|
+
k && /* @__PURE__ */ u(
|
|
1580
|
+
ut,
|
|
1581
1581
|
{
|
|
1582
1582
|
icon: wt("codeBlock"),
|
|
1583
1583
|
label: "Code block",
|
|
@@ -1586,15 +1586,15 @@ function Da({
|
|
|
1586
1586
|
onClick: () => a("codeBlock")
|
|
1587
1587
|
}
|
|
1588
1588
|
),
|
|
1589
|
-
|
|
1589
|
+
S && /* @__PURE__ */ u(
|
|
1590
1590
|
Ea,
|
|
1591
1591
|
{
|
|
1592
1592
|
editor: t,
|
|
1593
1593
|
isDisabled: l.link?.isDisabled
|
|
1594
1594
|
}
|
|
1595
1595
|
),
|
|
1596
|
-
|
|
1597
|
-
|
|
1596
|
+
I && /* @__PURE__ */ u(
|
|
1597
|
+
ut,
|
|
1598
1598
|
{
|
|
1599
1599
|
icon: wt("horizontalRule"),
|
|
1600
1600
|
label: "Horizontal rule",
|
|
@@ -1602,12 +1602,12 @@ function Da({
|
|
|
1602
1602
|
}
|
|
1603
1603
|
)
|
|
1604
1604
|
] }),
|
|
1605
|
-
(
|
|
1605
|
+
(C || w) && /* @__PURE__ */ u(ct, {})
|
|
1606
1606
|
] }),
|
|
1607
|
-
|
|
1607
|
+
C && /* @__PURE__ */ A(Je, { children: [
|
|
1608
1608
|
/* @__PURE__ */ A("div", { className: "flex items-center gap-1", children: [
|
|
1609
1609
|
d.includes("undo") && /* @__PURE__ */ u(
|
|
1610
|
-
|
|
1610
|
+
ut,
|
|
1611
1611
|
{
|
|
1612
1612
|
icon: wt("undo"),
|
|
1613
1613
|
label: "Undo",
|
|
@@ -1616,7 +1616,7 @@ function Da({
|
|
|
1616
1616
|
}
|
|
1617
1617
|
),
|
|
1618
1618
|
d.includes("redo") && /* @__PURE__ */ u(
|
|
1619
|
-
|
|
1619
|
+
ut,
|
|
1620
1620
|
{
|
|
1621
1621
|
icon: wt("redo"),
|
|
1622
1622
|
label: "Redo",
|
|
@@ -1625,14 +1625,14 @@ function Da({
|
|
|
1625
1625
|
}
|
|
1626
1626
|
)
|
|
1627
1627
|
] }),
|
|
1628
|
-
|
|
1628
|
+
w && /* @__PURE__ */ u(ct, {})
|
|
1629
1629
|
] }),
|
|
1630
|
-
|
|
1630
|
+
w && /* @__PURE__ */ u(
|
|
1631
1631
|
Na,
|
|
1632
1632
|
{
|
|
1633
1633
|
zoom: n,
|
|
1634
|
-
onZoomChange: (
|
|
1635
|
-
r?.(
|
|
1634
|
+
onZoomChange: (N) => {
|
|
1635
|
+
r?.(N), o?.({ type: "zoom", modifier: `${N}%` });
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
)
|
|
@@ -3337,18 +3337,18 @@ function fn(t, e, n, r) {
|
|
|
3337
3337
|
d = 2;
|
|
3338
3338
|
for (let f in c)
|
|
3339
3339
|
if (c[f] != null) {
|
|
3340
|
-
let
|
|
3341
|
-
|
|
3340
|
+
let h = f.indexOf(" ");
|
|
3341
|
+
h > 0 ? a.setAttributeNS(f.slice(0, h), f.slice(h + 1), c[f]) : f == "style" && a.style ? a.style.cssText = c[f] : a.setAttribute(f, c[f]);
|
|
3342
3342
|
}
|
|
3343
3343
|
}
|
|
3344
3344
|
for (let f = d; f < e.length; f++) {
|
|
3345
|
-
let
|
|
3346
|
-
if (
|
|
3345
|
+
let h = e[f];
|
|
3346
|
+
if (h === 0) {
|
|
3347
3347
|
if (f < e.length - 1 || f > d)
|
|
3348
3348
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
3349
3349
|
return { dom: a, contentDOM: a };
|
|
3350
3350
|
} else {
|
|
3351
|
-
let { dom: m, contentDOM: v } = fn(t,
|
|
3351
|
+
let { dom: m, contentDOM: v } = fn(t, h, n, r);
|
|
3352
3352
|
if (a.appendChild(m), v) {
|
|
3353
3353
|
if (l)
|
|
3354
3354
|
throw new RangeError("Multiple content holes");
|
|
@@ -3442,11 +3442,11 @@ class Oe {
|
|
|
3442
3442
|
break;
|
|
3443
3443
|
let c = this.ranges[l + s], d = this.ranges[l + o], f = a + c;
|
|
3444
3444
|
if (e <= f) {
|
|
3445
|
-
let
|
|
3445
|
+
let h = c ? e == a ? -1 : e == f ? 1 : n : n, m = a + i + (h < 0 ? 0 : d);
|
|
3446
3446
|
if (r)
|
|
3447
3447
|
return m;
|
|
3448
|
-
let v = e == (n < 0 ? a : f) ? null : fc(l / 3, e - a),
|
|
3449
|
-
return (n < 0 ? e != a : e != f) && (
|
|
3448
|
+
let v = e == (n < 0 ? a : f) ? null : fc(l / 3, e - a), y = e == a ? eo : e == f ? Xs : hn;
|
|
3449
|
+
return (n < 0 ? e != a : e != f) && (y |= to), new br(m, y, v);
|
|
3450
3450
|
}
|
|
3451
3451
|
i += d - c;
|
|
3452
3452
|
}
|
|
@@ -3693,7 +3693,7 @@ function Vr(t, e, n) {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
return q.fromArray(r);
|
|
3695
3695
|
}
|
|
3696
|
-
class
|
|
3696
|
+
class ft extends be {
|
|
3697
3697
|
/**
|
|
3698
3698
|
Create a mark step.
|
|
3699
3699
|
*/
|
|
@@ -3705,14 +3705,14 @@ class dt extends be {
|
|
|
3705
3705
|
return ue.fromReplace(e, this.from, this.to, s);
|
|
3706
3706
|
}
|
|
3707
3707
|
invert() {
|
|
3708
|
-
return new
|
|
3708
|
+
return new ht(this.from, this.to, this.mark);
|
|
3709
3709
|
}
|
|
3710
3710
|
map(e) {
|
|
3711
3711
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
3712
|
-
return n.deleted && r.deleted || n.pos >= r.pos ? null : new
|
|
3712
|
+
return n.deleted && r.deleted || n.pos >= r.pos ? null : new ft(n.pos, r.pos, this.mark);
|
|
3713
3713
|
}
|
|
3714
3714
|
merge(e) {
|
|
3715
|
-
return e instanceof
|
|
3715
|
+
return e instanceof ft && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ft(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
3716
3716
|
}
|
|
3717
3717
|
toJSON() {
|
|
3718
3718
|
return {
|
|
@@ -3728,11 +3728,11 @@ class dt extends be {
|
|
|
3728
3728
|
static fromJSON(e, n) {
|
|
3729
3729
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
3730
3730
|
throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
3731
|
-
return new
|
|
3731
|
+
return new ft(n.from, n.to, e.markFromJSON(n.mark));
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
|
-
be.jsonID("addMark",
|
|
3735
|
-
class
|
|
3734
|
+
be.jsonID("addMark", ft);
|
|
3735
|
+
class ht extends be {
|
|
3736
3736
|
/**
|
|
3737
3737
|
Create a mark-removing step.
|
|
3738
3738
|
*/
|
|
@@ -3744,14 +3744,14 @@ class ft extends be {
|
|
|
3744
3744
|
return ue.fromReplace(e, this.from, this.to, r);
|
|
3745
3745
|
}
|
|
3746
3746
|
invert() {
|
|
3747
|
-
return new
|
|
3747
|
+
return new ft(this.from, this.to, this.mark);
|
|
3748
3748
|
}
|
|
3749
3749
|
map(e) {
|
|
3750
3750
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
3751
|
-
return n.deleted && r.deleted || n.pos >= r.pos ? null : new
|
|
3751
|
+
return n.deleted && r.deleted || n.pos >= r.pos ? null : new ht(n.pos, r.pos, this.mark);
|
|
3752
3752
|
}
|
|
3753
3753
|
merge(e) {
|
|
3754
|
-
return e instanceof
|
|
3754
|
+
return e instanceof ht && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ht(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
3755
3755
|
}
|
|
3756
3756
|
toJSON() {
|
|
3757
3757
|
return {
|
|
@@ -3767,11 +3767,11 @@ class ft extends be {
|
|
|
3767
3767
|
static fromJSON(e, n) {
|
|
3768
3768
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
3769
3769
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
3770
|
-
return new
|
|
3770
|
+
return new ht(n.from, n.to, e.markFromJSON(n.mark));
|
|
3771
3771
|
}
|
|
3772
3772
|
}
|
|
3773
|
-
be.jsonID("removeMark",
|
|
3774
|
-
class
|
|
3773
|
+
be.jsonID("removeMark", ht);
|
|
3774
|
+
class pt extends be {
|
|
3775
3775
|
/**
|
|
3776
3776
|
Create a node mark step.
|
|
3777
3777
|
*/
|
|
@@ -3792,15 +3792,15 @@ class ht extends be {
|
|
|
3792
3792
|
if (r.length == n.marks.length) {
|
|
3793
3793
|
for (let i = 0; i < n.marks.length; i++)
|
|
3794
3794
|
if (!n.marks[i].isInSet(r))
|
|
3795
|
-
return new
|
|
3796
|
-
return new
|
|
3795
|
+
return new pt(this.pos, n.marks[i]);
|
|
3796
|
+
return new pt(this.pos, this.mark);
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
3799
|
return new Zt(this.pos, this.mark);
|
|
3800
3800
|
}
|
|
3801
3801
|
map(e) {
|
|
3802
3802
|
let n = e.mapResult(this.pos, 1);
|
|
3803
|
-
return n.deletedAfter ? null : new
|
|
3803
|
+
return n.deletedAfter ? null : new pt(n.pos, this.mark);
|
|
3804
3804
|
}
|
|
3805
3805
|
toJSON() {
|
|
3806
3806
|
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -3811,10 +3811,10 @@ class ht extends be {
|
|
|
3811
3811
|
static fromJSON(e, n) {
|
|
3812
3812
|
if (typeof n.pos != "number")
|
|
3813
3813
|
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
3814
|
-
return new
|
|
3814
|
+
return new pt(n.pos, e.markFromJSON(n.mark));
|
|
3815
3815
|
}
|
|
3816
3816
|
}
|
|
3817
|
-
be.jsonID("addNodeMark",
|
|
3817
|
+
be.jsonID("addNodeMark", pt);
|
|
3818
3818
|
class Zt extends be {
|
|
3819
3819
|
/**
|
|
3820
3820
|
Create a mark-removing step.
|
|
@@ -3831,7 +3831,7 @@ class Zt extends be {
|
|
|
3831
3831
|
}
|
|
3832
3832
|
invert(e) {
|
|
3833
3833
|
let n = e.nodeAt(this.pos);
|
|
3834
|
-
return !n || !this.mark.isInSet(n.marks) ? this : new
|
|
3834
|
+
return !n || !this.mark.isInSet(n.marks) ? this : new pt(this.pos, this.mark);
|
|
3835
3835
|
}
|
|
3836
3836
|
map(e) {
|
|
3837
3837
|
let n = e.mapResult(this.pos, 1);
|
|
@@ -4077,7 +4077,7 @@ Qt.prototype = Object.create(Error.prototype);
|
|
|
4077
4077
|
Qt.prototype.constructor = Qt;
|
|
4078
4078
|
Qt.prototype.name = "TransformError";
|
|
4079
4079
|
const Qn = /* @__PURE__ */ Object.create(null);
|
|
4080
|
-
class
|
|
4080
|
+
class X {
|
|
4081
4081
|
/**
|
|
4082
4082
|
Initialize a selection with the head and anchor and ranges. If no
|
|
4083
4083
|
ranges are given, constructs a single range across `$anchor` and
|
|
@@ -4171,7 +4171,7 @@ class Y {
|
|
|
4171
4171
|
found.
|
|
4172
4172
|
*/
|
|
4173
4173
|
static findFrom(e, n, r = !1) {
|
|
4174
|
-
let i = e.parent.inlineContent ? new
|
|
4174
|
+
let i = e.parent.inlineContent ? new Y(e) : At(e.node(0), e.parent, e.pos, e.index(), n, r);
|
|
4175
4175
|
if (i)
|
|
4176
4176
|
return i;
|
|
4177
4177
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -4238,10 +4238,10 @@ class Y {
|
|
|
4238
4238
|
returns the bookmark for that.
|
|
4239
4239
|
*/
|
|
4240
4240
|
getBookmark() {
|
|
4241
|
-
return
|
|
4241
|
+
return Y.between(this.$anchor, this.$head).getBookmark();
|
|
4242
4242
|
}
|
|
4243
4243
|
}
|
|
4244
|
-
|
|
4244
|
+
X.prototype.visible = !0;
|
|
4245
4245
|
class pc {
|
|
4246
4246
|
/**
|
|
4247
4247
|
Create a range.
|
|
@@ -4254,7 +4254,7 @@ let Pi = !1;
|
|
|
4254
4254
|
function Ri(t) {
|
|
4255
4255
|
!Pi && !t.parent.inlineContent && (Pi = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
|
|
4256
4256
|
}
|
|
4257
|
-
class
|
|
4257
|
+
class Y extends X {
|
|
4258
4258
|
/**
|
|
4259
4259
|
Construct a text selection between the given points.
|
|
4260
4260
|
*/
|
|
@@ -4271,9 +4271,9 @@ class Q extends Y {
|
|
|
4271
4271
|
map(e, n) {
|
|
4272
4272
|
let r = e.resolve(n.map(this.head));
|
|
4273
4273
|
if (!r.parent.inlineContent)
|
|
4274
|
-
return
|
|
4274
|
+
return X.near(r);
|
|
4275
4275
|
let i = e.resolve(n.map(this.anchor));
|
|
4276
|
-
return new
|
|
4276
|
+
return new Y(i.parent.inlineContent ? i : r, r);
|
|
4277
4277
|
}
|
|
4278
4278
|
replace(e, n = K.empty) {
|
|
4279
4279
|
if (super.replace(e, n), n == K.empty) {
|
|
@@ -4282,7 +4282,7 @@ class Q extends Y {
|
|
|
4282
4282
|
}
|
|
4283
4283
|
}
|
|
4284
4284
|
eq(e) {
|
|
4285
|
-
return e instanceof
|
|
4285
|
+
return e instanceof Y && e.anchor == this.anchor && e.head == this.head;
|
|
4286
4286
|
}
|
|
4287
4287
|
getBookmark() {
|
|
4288
4288
|
return new Ln(this.anchor, this.head);
|
|
@@ -4296,7 +4296,7 @@ class Q extends Y {
|
|
|
4296
4296
|
static fromJSON(e, n) {
|
|
4297
4297
|
if (typeof n.anchor != "number" || typeof n.head != "number")
|
|
4298
4298
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
4299
|
-
return new
|
|
4299
|
+
return new Y(e.resolve(n.anchor), e.resolve(n.head));
|
|
4300
4300
|
}
|
|
4301
4301
|
/**
|
|
4302
4302
|
Create a text selection from non-resolved positions.
|
|
@@ -4316,16 +4316,16 @@ class Q extends Y {
|
|
|
4316
4316
|
static between(e, n, r) {
|
|
4317
4317
|
let i = e.pos - n.pos;
|
|
4318
4318
|
if ((!r || i) && (r = i >= 0 ? 1 : -1), !n.parent.inlineContent) {
|
|
4319
|
-
let s =
|
|
4319
|
+
let s = X.findFrom(n, r, !0) || X.findFrom(n, -r, !0);
|
|
4320
4320
|
if (s)
|
|
4321
4321
|
n = s.$head;
|
|
4322
4322
|
else
|
|
4323
|
-
return
|
|
4323
|
+
return X.near(n, r);
|
|
4324
4324
|
}
|
|
4325
|
-
return e.parent.inlineContent || (i == 0 ? e = n : (e = (
|
|
4325
|
+
return e.parent.inlineContent || (i == 0 ? e = n : (e = (X.findFrom(e, -r, !0) || X.findFrom(e, r, !0)).$anchor, e.pos < n.pos != i < 0 && (e = n))), new Y(e, n);
|
|
4326
4326
|
}
|
|
4327
4327
|
}
|
|
4328
|
-
|
|
4328
|
+
X.jsonID("text", Y);
|
|
4329
4329
|
class Ln {
|
|
4330
4330
|
constructor(e, n) {
|
|
4331
4331
|
this.anchor = e, this.head = n;
|
|
@@ -4334,10 +4334,10 @@ class Ln {
|
|
|
4334
4334
|
return new Ln(e.map(this.anchor), e.map(this.head));
|
|
4335
4335
|
}
|
|
4336
4336
|
resolve(e) {
|
|
4337
|
-
return
|
|
4337
|
+
return Y.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
4338
4338
|
}
|
|
4339
4339
|
}
|
|
4340
|
-
class j extends
|
|
4340
|
+
class j extends X {
|
|
4341
4341
|
/**
|
|
4342
4342
|
Create a node selection. Does not verify the validity of its
|
|
4343
4343
|
argument.
|
|
@@ -4348,7 +4348,7 @@ class j extends Y {
|
|
|
4348
4348
|
}
|
|
4349
4349
|
map(e, n) {
|
|
4350
4350
|
let { deleted: r, pos: i } = n.mapResult(this.anchor), s = e.resolve(i);
|
|
4351
|
-
return r ?
|
|
4351
|
+
return r ? X.near(s) : new j(s);
|
|
4352
4352
|
}
|
|
4353
4353
|
content() {
|
|
4354
4354
|
return new K(q.from(this.node), 0, 0);
|
|
@@ -4385,7 +4385,7 @@ class j extends Y {
|
|
|
4385
4385
|
}
|
|
4386
4386
|
}
|
|
4387
4387
|
j.prototype.visible = !1;
|
|
4388
|
-
|
|
4388
|
+
X.jsonID("node", j);
|
|
4389
4389
|
class zr {
|
|
4390
4390
|
constructor(e) {
|
|
4391
4391
|
this.anchor = e;
|
|
@@ -4396,10 +4396,10 @@ class zr {
|
|
|
4396
4396
|
}
|
|
4397
4397
|
resolve(e) {
|
|
4398
4398
|
let n = e.resolve(this.anchor), r = n.nodeAfter;
|
|
4399
|
-
return r && j.isSelectable(r) ? new j(n) :
|
|
4399
|
+
return r && j.isSelectable(r) ? new j(n) : X.near(n);
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
4402
|
-
class Ke extends
|
|
4402
|
+
class Ke extends X {
|
|
4403
4403
|
/**
|
|
4404
4404
|
Create an all-selection over the given document.
|
|
4405
4405
|
*/
|
|
@@ -4409,7 +4409,7 @@ class Ke extends Y {
|
|
|
4409
4409
|
replace(e, n = K.empty) {
|
|
4410
4410
|
if (n == K.empty) {
|
|
4411
4411
|
e.delete(0, e.doc.content.size);
|
|
4412
|
-
let r =
|
|
4412
|
+
let r = X.atStart(e.doc);
|
|
4413
4413
|
r.eq(e.selection) || e.setSelection(r);
|
|
4414
4414
|
} else
|
|
4415
4415
|
super.replace(e, n);
|
|
@@ -4433,7 +4433,7 @@ class Ke extends Y {
|
|
|
4433
4433
|
return mc;
|
|
4434
4434
|
}
|
|
4435
4435
|
}
|
|
4436
|
-
|
|
4436
|
+
X.jsonID("all", Ke);
|
|
4437
4437
|
const mc = {
|
|
4438
4438
|
map() {
|
|
4439
4439
|
return this;
|
|
@@ -4444,7 +4444,7 @@ const mc = {
|
|
|
4444
4444
|
};
|
|
4445
4445
|
function At(t, e, n, r, i, s = !1) {
|
|
4446
4446
|
if (e.inlineContent)
|
|
4447
|
-
return
|
|
4447
|
+
return Y.create(t, n);
|
|
4448
4448
|
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
4449
4449
|
let l = e.child(o);
|
|
4450
4450
|
if (l.isAtom) {
|
|
@@ -4469,7 +4469,7 @@ function $i(t, e, n) {
|
|
|
4469
4469
|
let s = t.mapping.maps[r], o;
|
|
4470
4470
|
s.forEach((l, a, c, d) => {
|
|
4471
4471
|
o == null && (o = d);
|
|
4472
|
-
}), t.setSelection(
|
|
4472
|
+
}), t.setSelection(X.near(t.doc.resolve(o), n));
|
|
4473
4473
|
}
|
|
4474
4474
|
function Vi(t, e) {
|
|
4475
4475
|
return !e || !t ? t : t.bind(e);
|
|
@@ -4488,7 +4488,7 @@ new cn("doc", {
|
|
|
4488
4488
|
}
|
|
4489
4489
|
}), new cn("selection", {
|
|
4490
4490
|
init(t, e) {
|
|
4491
|
-
return t.selection ||
|
|
4491
|
+
return t.selection || X.atStart(e.doc);
|
|
4492
4492
|
},
|
|
4493
4493
|
apply(t) {
|
|
4494
4494
|
return t.selection;
|
|
@@ -4638,7 +4638,7 @@ const gc = /^```([a-z]+)?[\s\n]$/, yc = /^~~~([a-z]+)?[\s\n]$/, bc = Be.create({
|
|
|
4638
4638
|
if (!s || i.parent.type !== this.type || !(i.parentOffset === i.parent.nodeSize - 2))
|
|
4639
4639
|
return !1;
|
|
4640
4640
|
const l = i.after();
|
|
4641
|
-
return l === void 0 ? !1 : r.nodeAt(l) ? t.commands.command(({ tr: c }) => (c.setSelection(
|
|
4641
|
+
return l === void 0 ? !1 : r.nodeAt(l) ? t.commands.command(({ tr: c }) => (c.setSelection(X.near(r.resolve(l))), !0)) : t.commands.exitCode();
|
|
4642
4642
|
}
|
|
4643
4643
|
};
|
|
4644
4644
|
},
|
|
@@ -4675,7 +4675,7 @@ const gc = /^```([a-z]+)?[\s\n]$/, yc = /^~~~([a-z]+)?[\s\n]$/, bc = Be.create({
|
|
|
4675
4675
|
return !1;
|
|
4676
4676
|
const { tr: o, schema: l } = t.state, a = l.text(n.replace(/\r\n?/g, `
|
|
4677
4677
|
`));
|
|
4678
|
-
return o.replaceSelectionWith(this.type.create({ language: s }, a)), o.selection.$from.parent.type !== this.type && o.setSelection(
|
|
4678
|
+
return o.replaceSelectionWith(this.type.create({ language: s }, a)), o.selection.$from.parent.type !== this.type && o.setSelection(Y.near(o.doc.resolve(Math.max(0, o.selection.from - 2)))), o.setMeta("paste", !0), t.dispatch(o), !0;
|
|
4679
4679
|
}
|
|
4680
4680
|
}
|
|
4681
4681
|
})
|
|
@@ -4751,10 +4751,10 @@ const gc = /^```([a-z]+)?[\s\n]$/, yc = /^~~~([a-z]+)?[\s\n]$/, bc = Be.create({
|
|
|
4751
4751
|
if (l) {
|
|
4752
4752
|
const { $to: c } = o.selection, d = c.end();
|
|
4753
4753
|
if (c.nodeAfter)
|
|
4754
|
-
c.nodeAfter.isTextblock ? o.setSelection(
|
|
4754
|
+
c.nodeAfter.isTextblock ? o.setSelection(Y.create(o.doc, c.pos + 1)) : c.nodeAfter.isBlock ? o.setSelection(j.create(o.doc, c.pos)) : o.setSelection(Y.create(o.doc, c.pos));
|
|
4755
4755
|
else {
|
|
4756
4756
|
const f = (a = c.parent.type.contentMatch.defaultType) === null || a === void 0 ? void 0 : a.create();
|
|
4757
|
-
f && (o.insert(d, f), o.setSelection(
|
|
4757
|
+
f && (o.insert(d, f), o.setSelection(Y.create(o.doc, d + 1)));
|
|
4758
4758
|
}
|
|
4759
4759
|
o.scrollIntoView();
|
|
4760
4760
|
}
|
|
@@ -4806,7 +4806,7 @@ const gc = /^```([a-z]+)?[\s\n]$/, yc = /^~~~([a-z]+)?[\s\n]$/, bc = Be.create({
|
|
|
4806
4806
|
const { keepMarks: o } = this.options, { splittableMarks: l } = r.extensionManager, a = s || i.$to.parentOffset && i.$from.marks();
|
|
4807
4807
|
return e().insertContent({ type: this.name }).command(({ tr: c, dispatch: d }) => {
|
|
4808
4808
|
if (d && a && o) {
|
|
4809
|
-
const f = a.filter((
|
|
4809
|
+
const f = a.filter((h) => l.includes(h.type.name));
|
|
4810
4810
|
c.ensureMarks(f);
|
|
4811
4811
|
}
|
|
4812
4812
|
return !0;
|
|
@@ -4938,9 +4938,9 @@ class $e {
|
|
|
4938
4938
|
let i, s;
|
|
4939
4939
|
n && (i = this.remapping(r, this.items.length), s = i.maps.length);
|
|
4940
4940
|
let o = e.tr, l, a, c = [], d = [];
|
|
4941
|
-
return this.items.forEach((f,
|
|
4941
|
+
return this.items.forEach((f, h) => {
|
|
4942
4942
|
if (!f.step) {
|
|
4943
|
-
i || (i = this.remapping(r,
|
|
4943
|
+
i || (i = this.remapping(r, h + 1), s = i.maps.length), s--, d.push(f);
|
|
4944
4944
|
return;
|
|
4945
4945
|
}
|
|
4946
4946
|
if (i) {
|
|
@@ -4957,8 +4957,8 @@ class $e {
|
|
|
4957
4957
|
addTransform(e, n, r, i) {
|
|
4958
4958
|
let s = [], o = this.eventCount, l = this.items, a = !i && l.length ? l.get(l.length - 1) : null;
|
|
4959
4959
|
for (let d = 0; d < e.steps.length; d++) {
|
|
4960
|
-
let f = e.steps[d].invert(e.docs[d]),
|
|
4961
|
-
(m = a && a.merge(
|
|
4960
|
+
let f = e.steps[d].invert(e.docs[d]), h = new He(e.mapping.maps[d], f, n), m;
|
|
4961
|
+
(m = a && a.merge(h)) && (h = m, d ? s.pop() : l = l.slice(0, l.length - 1)), s.push(h), n && (o++, n = void 0), i || (a = h);
|
|
4962
4962
|
}
|
|
4963
4963
|
let c = o - r.depth;
|
|
4964
4964
|
return c > Nc && (l = Ac(l, c), o -= c), new $e(l.append(s), o);
|
|
@@ -4981,25 +4981,25 @@ class $e {
|
|
|
4981
4981
|
if (!this.eventCount)
|
|
4982
4982
|
return this;
|
|
4983
4983
|
let r = [], i = Math.max(0, this.items.length - n), s = e.mapping, o = e.steps.length, l = this.eventCount;
|
|
4984
|
-
this.items.forEach((
|
|
4985
|
-
|
|
4984
|
+
this.items.forEach((h) => {
|
|
4985
|
+
h.selection && l--;
|
|
4986
4986
|
}, i);
|
|
4987
4987
|
let a = n;
|
|
4988
|
-
this.items.forEach((
|
|
4988
|
+
this.items.forEach((h) => {
|
|
4989
4989
|
let m = s.getMirror(--a);
|
|
4990
4990
|
if (m == null)
|
|
4991
4991
|
return;
|
|
4992
4992
|
o = Math.min(o, m);
|
|
4993
4993
|
let v = s.maps[m];
|
|
4994
|
-
if (
|
|
4995
|
-
let
|
|
4996
|
-
|
|
4994
|
+
if (h.step) {
|
|
4995
|
+
let y = e.steps[m].invert(e.docs[m]), b = h.selection && h.selection.map(s.slice(a + 1, m));
|
|
4996
|
+
b && l++, r.push(new He(v, y, b));
|
|
4997
4997
|
} else
|
|
4998
4998
|
r.push(new He(v));
|
|
4999
4999
|
}, i);
|
|
5000
5000
|
let c = [];
|
|
5001
|
-
for (let
|
|
5002
|
-
c.push(new He(s.maps[
|
|
5001
|
+
for (let h = n; h < o; h++)
|
|
5002
|
+
c.push(new He(s.maps[h]));
|
|
5003
5003
|
let d = this.items.slice(0, i).append(c).append(r), f = new $e(d, l);
|
|
5004
5004
|
return f.emptyItemCount() > wc && (f = f.compress(this.items.length - r.length)), f;
|
|
5005
5005
|
}
|
|
@@ -5025,8 +5025,8 @@ class $e {
|
|
|
5025
5025
|
if (r--, c && n.appendMap(c, r), a) {
|
|
5026
5026
|
let d = o.selection && o.selection.map(n.slice(r));
|
|
5027
5027
|
d && s++;
|
|
5028
|
-
let f = new He(c.invert(), a, d),
|
|
5029
|
-
(
|
|
5028
|
+
let f = new He(c.invert(), a, d), h, m = i.length - 1;
|
|
5029
|
+
(h = i.length && i[m].merge(f)) ? i[m] = h : i.push(f);
|
|
5030
5030
|
}
|
|
5031
5031
|
} else o.map && r--;
|
|
5032
5032
|
}, this.items.length, 0), new $e(pe.from(i.reverse()), s);
|
|
@@ -5224,20 +5224,20 @@ class Pc {
|
|
|
5224
5224
|
updateOverlay() {
|
|
5225
5225
|
let e = this.editorView.state.doc.resolve(this.cursorPos), n = !e.parent.inlineContent, r, i = this.editorView.dom, s = i.getBoundingClientRect(), o = s.width / i.offsetWidth, l = s.height / i.offsetHeight;
|
|
5226
5226
|
if (n) {
|
|
5227
|
-
let f = e.nodeBefore,
|
|
5228
|
-
if (f ||
|
|
5227
|
+
let f = e.nodeBefore, h = e.nodeAfter;
|
|
5228
|
+
if (f || h) {
|
|
5229
5229
|
let m = this.editorView.nodeDOM(this.cursorPos - (f ? f.nodeSize : 0));
|
|
5230
5230
|
if (m) {
|
|
5231
|
-
let v = m.getBoundingClientRect(),
|
|
5232
|
-
f &&
|
|
5233
|
-
let
|
|
5234
|
-
r = { left: v.left, right: v.right, top:
|
|
5231
|
+
let v = m.getBoundingClientRect(), y = f ? v.bottom : v.top;
|
|
5232
|
+
f && h && (y = (y + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2);
|
|
5233
|
+
let b = this.width / 2 * l;
|
|
5234
|
+
r = { left: v.left, right: v.right, top: y - b, bottom: y + b };
|
|
5235
5235
|
}
|
|
5236
5236
|
}
|
|
5237
5237
|
}
|
|
5238
5238
|
if (!r) {
|
|
5239
|
-
let f = this.editorView.coordsAtPos(this.cursorPos),
|
|
5240
|
-
r = { left: f.left -
|
|
5239
|
+
let f = this.editorView.coordsAtPos(this.cursorPos), h = this.width / 2 * o;
|
|
5240
|
+
r = { left: f.left - h, right: f.left + h, top: f.top, bottom: f.bottom };
|
|
5241
5241
|
}
|
|
5242
5242
|
let a = this.editorView.dom.offsetParent;
|
|
5243
5243
|
this.element || (this.element = a.appendChild(document.createElement("div")), this.class && (this.element.className = this.class), this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;", this.color && (this.element.style.backgroundColor = this.color)), this.element.classList.toggle("prosemirror-dropcursor-block", n), this.element.classList.toggle("prosemirror-dropcursor-inline", !n);
|
|
@@ -5245,8 +5245,8 @@ class Pc {
|
|
|
5245
5245
|
if (!a || a == document.body && getComputedStyle(a).position == "static")
|
|
5246
5246
|
c = -pageXOffset, d = -pageYOffset;
|
|
5247
5247
|
else {
|
|
5248
|
-
let f = a.getBoundingClientRect(),
|
|
5249
|
-
c = f.left - a.scrollLeft *
|
|
5248
|
+
let f = a.getBoundingClientRect(), h = f.width / a.offsetWidth, m = f.height / a.offsetHeight;
|
|
5249
|
+
c = f.left - a.scrollLeft * h, d = f.top - a.scrollTop * m;
|
|
5250
5250
|
}
|
|
5251
5251
|
this.element.style.left = (r.left - c) / o + "px", this.element.style.top = (r.top - d) / l + "px", this.element.style.width = (r.right - r.left) / o + "px", this.element.style.height = (r.bottom - r.top) / l + "px";
|
|
5252
5252
|
}
|
|
@@ -5291,7 +5291,7 @@ const Rc = Rr.create({
|
|
|
5291
5291
|
];
|
|
5292
5292
|
}
|
|
5293
5293
|
});
|
|
5294
|
-
var
|
|
5294
|
+
var ot = {
|
|
5295
5295
|
8: "Backspace",
|
|
5296
5296
|
9: "Tab",
|
|
5297
5297
|
10: "Enter",
|
|
@@ -5370,13 +5370,13 @@ var st = {
|
|
|
5370
5370
|
221: "}",
|
|
5371
5371
|
222: '"'
|
|
5372
5372
|
}, $c = typeof navigator < "u" && /Mac/.test(navigator.platform), Vc = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
5373
|
-
for (var ge = 0; ge < 10; ge++)
|
|
5374
|
-
for (var ge = 1; ge <= 24; ge++)
|
|
5373
|
+
for (var ge = 0; ge < 10; ge++) ot[48 + ge] = ot[96 + ge] = String(ge);
|
|
5374
|
+
for (var ge = 1; ge <= 24; ge++) ot[ge + 111] = "F" + ge;
|
|
5375
5375
|
for (var ge = 65; ge <= 90; ge++)
|
|
5376
|
-
|
|
5377
|
-
for (var tr in
|
|
5376
|
+
ot[ge] = String.fromCharCode(ge + 32), vn[ge] = String.fromCharCode(ge);
|
|
5377
|
+
for (var tr in ot) vn.hasOwnProperty(tr) || (vn[tr] = ot[tr]);
|
|
5378
5378
|
function zc(t) {
|
|
5379
|
-
var e = $c && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Vc && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? vn :
|
|
5379
|
+
var e = $c && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Vc && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? vn : ot)[t.keyCode] || t.key || "Unidentified";
|
|
5380
5380
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
5381
5381
|
}
|
|
5382
5382
|
const Bc = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), _c = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -5423,7 +5423,7 @@ function qc(t) {
|
|
|
5423
5423
|
return !0;
|
|
5424
5424
|
}
|
|
5425
5425
|
if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
5426
|
-
!(_c && r.ctrlKey && r.altKey) && (s =
|
|
5426
|
+
!(_c && r.ctrlKey && r.altKey) && (s = ot[r.keyCode]) && s != i) {
|
|
5427
5427
|
let l = e[nr(s, r)];
|
|
5428
5428
|
if (l && l(n.state, n.dispatch, n))
|
|
5429
5429
|
return !0;
|
|
@@ -5487,9 +5487,9 @@ function fo(t, e) {
|
|
|
5487
5487
|
let n = document.createEvent("Event");
|
|
5488
5488
|
return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
|
|
5489
5489
|
}
|
|
5490
|
-
const je = typeof navigator < "u" ? navigator : null, Ui = typeof document < "u" ? document : null,
|
|
5491
|
-
Pn && +(/Firefox\/(\d+)/.exec(
|
|
5492
|
-
const Sr = !rn && /Chrome\/(\d+)/.exec(
|
|
5490
|
+
const je = typeof navigator < "u" ? navigator : null, Ui = typeof document < "u" ? document : null, lt = je && je.userAgent || "", kr = /Edge\/(\d+)/.exec(lt), ho = /MSIE \d/.exec(lt), vr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(lt), rn = !!(ho || vr || kr), po = ho ? document.documentMode : vr ? +vr[1] : kr ? +kr[1] : 0, Pn = !rn && /gecko\/(\d+)/i.test(lt);
|
|
5491
|
+
Pn && +(/Firefox\/(\d+)/.exec(lt) || [0, 0])[1];
|
|
5492
|
+
const Sr = !rn && /Chrome\/(\d+)/.exec(lt), Qe = !!Sr, mo = Sr ? +Sr[1] : 0, kt = !rn && !!je && /Apple Computer/.test(je.vendor), Hr = kt && (/Mobile\/\w+/.test(lt) || !!je && je.maxTouchPoints > 2), Pe = Hr || (je ? /Mac/.test(je.platform) : !1), go = je ? /Win/.test(je.platform) : !1, sn = /Android \d/.test(lt), Ur = !!Ui && "webkitFontSmoothing" in Ui.documentElement.style, Wc = Ur ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5493
5493
|
function Jc(t, e = null) {
|
|
5494
5494
|
let n = t.domSelectionRange(), r = t.state.doc;
|
|
5495
5495
|
if (!n.focusNode)
|
|
@@ -5503,19 +5503,19 @@ function Jc(t, e = null) {
|
|
|
5503
5503
|
i = i.parent;
|
|
5504
5504
|
let f = i.node;
|
|
5505
5505
|
if (i && f.isAtom && j.isSelectable(f) && i.parent && !(f.isInline && jc(n.focusNode, n.focusOffset, i.dom))) {
|
|
5506
|
-
let
|
|
5507
|
-
c = new j(o ==
|
|
5506
|
+
let h = i.posBefore;
|
|
5507
|
+
c = new j(o == h ? l : r.resolve(h));
|
|
5508
5508
|
}
|
|
5509
5509
|
} else {
|
|
5510
5510
|
if (n instanceof t.dom.ownerDocument.defaultView.Selection && n.rangeCount > 1) {
|
|
5511
|
-
let f = o,
|
|
5511
|
+
let f = o, h = o;
|
|
5512
5512
|
for (let m = 0; m < n.rangeCount; m++) {
|
|
5513
5513
|
let v = n.getRangeAt(m);
|
|
5514
|
-
f = Math.min(f, t.docView.posFromDOM(v.startContainer, v.startOffset, 1)),
|
|
5514
|
+
f = Math.min(f, t.docView.posFromDOM(v.startContainer, v.startOffset, 1)), h = Math.max(h, t.docView.posFromDOM(v.endContainer, v.endOffset, -1));
|
|
5515
5515
|
}
|
|
5516
5516
|
if (f < 0)
|
|
5517
5517
|
return null;
|
|
5518
|
-
[a, o] =
|
|
5518
|
+
[a, o] = h == t.state.selection.anchor ? [h, f] : [f, h], l = r.resolve(o);
|
|
5519
5519
|
} else
|
|
5520
5520
|
a = t.docView.posFromDOM(n.anchorNode, n.anchorOffset, 1);
|
|
5521
5521
|
if (a < 0)
|
|
@@ -5545,7 +5545,7 @@ function qr(t, e = !1) {
|
|
|
5545
5545
|
Zc(t);
|
|
5546
5546
|
else {
|
|
5547
5547
|
let { anchor: r, head: i } = n, s, o;
|
|
5548
|
-
qi && !(n instanceof
|
|
5548
|
+
qi && !(n instanceof Y) && (n.$from.parent.inlineContent || (s = Ki(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = Ki(t, n.to))), t.docView.setSelection(r, i, t, e), qi && (s && ji(s), o && ji(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Gc(t));
|
|
5549
5549
|
}
|
|
5550
5550
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
5551
5551
|
}
|
|
@@ -5596,7 +5596,7 @@ function Wi(t) {
|
|
|
5596
5596
|
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
5597
5597
|
}
|
|
5598
5598
|
function bo(t, e, n, r) {
|
|
5599
|
-
return t.someProp("createSelectionBetween", (i) => i(t, e, n)) ||
|
|
5599
|
+
return t.someProp("createSelectionBetween", (i) => i(t, e, n)) || Y.between(e, n, r);
|
|
5600
5600
|
}
|
|
5601
5601
|
function Yc(t) {
|
|
5602
5602
|
let e = t.domSelectionRange();
|
|
@@ -5610,20 +5610,20 @@ function Yc(t) {
|
|
|
5610
5610
|
}
|
|
5611
5611
|
function Cr(t, e) {
|
|
5612
5612
|
let { $anchor: n, $head: r } = t.selection, i = e > 0 ? n.max(r) : n.min(r), s = i.parent.inlineContent ? i.depth ? t.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
|
|
5613
|
-
return s &&
|
|
5613
|
+
return s && X.findFrom(s, e);
|
|
5614
5614
|
}
|
|
5615
5615
|
function nt(t, e) {
|
|
5616
5616
|
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
5617
5617
|
}
|
|
5618
5618
|
function Ji(t, e, n) {
|
|
5619
5619
|
let r = t.state.selection;
|
|
5620
|
-
if (r instanceof
|
|
5620
|
+
if (r instanceof Y)
|
|
5621
5621
|
if (n.indexOf("s") > -1) {
|
|
5622
5622
|
let { $head: i } = r, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter;
|
|
5623
5623
|
if (!s || s.isText || !s.isLeaf)
|
|
5624
5624
|
return !1;
|
|
5625
5625
|
let o = t.state.doc.resolve(i.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
5626
|
-
return nt(t, new
|
|
5626
|
+
return nt(t, new Y(r.$anchor, o));
|
|
5627
5627
|
} else if (r.empty) {
|
|
5628
5628
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
5629
5629
|
let i = Cr(t.state, e);
|
|
@@ -5633,12 +5633,12 @@ function Ji(t, e, n) {
|
|
|
5633
5633
|
if (!s || s.isText)
|
|
5634
5634
|
return !1;
|
|
5635
5635
|
let l = e < 0 ? i.pos - s.nodeSize : i.pos;
|
|
5636
|
-
return s.isAtom || (o = t.docView.descAt(l)) && !o.contentDOM ? j.isSelectable(s) ? nt(t, new j(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : Ur ? nt(t, new
|
|
5636
|
+
return s.isAtom || (o = t.docView.descAt(l)) && !o.contentDOM ? j.isSelectable(s) ? nt(t, new j(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : Ur ? nt(t, new Y(t.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
5637
5637
|
}
|
|
5638
5638
|
} else return !1;
|
|
5639
5639
|
else {
|
|
5640
5640
|
if (r instanceof j && r.node.isInline)
|
|
5641
|
-
return nt(t, new
|
|
5641
|
+
return nt(t, new Y(e > 0 ? r.$to : r.$from));
|
|
5642
5642
|
{
|
|
5643
5643
|
let i = Cr(t.state, e);
|
|
5644
5644
|
return i ? nt(t, i) : !1;
|
|
@@ -5788,7 +5788,7 @@ function Gi(t, e) {
|
|
|
5788
5788
|
}
|
|
5789
5789
|
function Zi(t, e, n) {
|
|
5790
5790
|
let r = t.state.selection;
|
|
5791
|
-
if (r instanceof
|
|
5791
|
+
if (r instanceof Y && !r.empty || n.indexOf("s") > -1 || Pe && n.indexOf("m") > -1)
|
|
5792
5792
|
return !1;
|
|
5793
5793
|
let { $from: i, $to: s } = r;
|
|
5794
5794
|
if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -5797,13 +5797,13 @@ function Zi(t, e, n) {
|
|
|
5797
5797
|
return nt(t, o);
|
|
5798
5798
|
}
|
|
5799
5799
|
if (!i.parent.inlineContent) {
|
|
5800
|
-
let o = e < 0 ? i : s, l = r instanceof Ke ?
|
|
5800
|
+
let o = e < 0 ? i : s, l = r instanceof Ke ? X.near(o, e) : X.findFrom(o, e);
|
|
5801
5801
|
return l ? nt(t, l) : !1;
|
|
5802
5802
|
}
|
|
5803
5803
|
return !1;
|
|
5804
5804
|
}
|
|
5805
5805
|
function Qi(t, e) {
|
|
5806
|
-
if (!(t.state.selection instanceof
|
|
5806
|
+
if (!(t.state.selection instanceof Y))
|
|
5807
5807
|
return !0;
|
|
5808
5808
|
let { $head: n, $anchor: r, empty: i } = t.state.selection;
|
|
5809
5809
|
if (!n.sameParent(r))
|
|
@@ -5883,10 +5883,10 @@ function ko(t, e) {
|
|
|
5883
5883
|
c = a.firstChild;
|
|
5884
5884
|
}
|
|
5885
5885
|
c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${f ? ` -${f}` : ""} ${JSON.stringify(n)}`);
|
|
5886
|
-
let
|
|
5886
|
+
let h = t.someProp("clipboardTextSerializer", (m) => m(e, t)) || e.content.textBetween(0, e.content.size, `
|
|
5887
5887
|
|
|
5888
5888
|
`);
|
|
5889
|
-
return { dom: a, text:
|
|
5889
|
+
return { dom: a, text: h, slice: e };
|
|
5890
5890
|
}
|
|
5891
5891
|
function vo(t, e, n, r, i) {
|
|
5892
5892
|
let s = i.parent.type.spec.code, o, l;
|
|
@@ -5894,21 +5894,21 @@ function vo(t, e, n, r, i) {
|
|
|
5894
5894
|
return null;
|
|
5895
5895
|
let a = !!e && (r || s || !n);
|
|
5896
5896
|
if (a) {
|
|
5897
|
-
if (t.someProp("transformPastedText", (
|
|
5898
|
-
e =
|
|
5897
|
+
if (t.someProp("transformPastedText", (h) => {
|
|
5898
|
+
e = h(e, s || r, t);
|
|
5899
5899
|
}), s)
|
|
5900
5900
|
return l = new K(q.from(t.state.schema.text(e.replace(/\r\n?/g, `
|
|
5901
|
-
`))), 0, 0), t.someProp("transformPasted", (
|
|
5902
|
-
l =
|
|
5901
|
+
`))), 0, 0), t.someProp("transformPasted", (h) => {
|
|
5902
|
+
l = h(l, t, !0);
|
|
5903
5903
|
}), l;
|
|
5904
|
-
let f = t.someProp("clipboardTextParser", (
|
|
5904
|
+
let f = t.someProp("clipboardTextParser", (h) => h(e, i, r, t));
|
|
5905
5905
|
if (f)
|
|
5906
5906
|
l = f;
|
|
5907
5907
|
else {
|
|
5908
|
-
let
|
|
5909
|
-
o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((
|
|
5910
|
-
let
|
|
5911
|
-
|
|
5908
|
+
let h = i.marks(), { schema: m } = t.state, v = Dn.fromSchema(m);
|
|
5909
|
+
o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((y) => {
|
|
5910
|
+
let b = o.appendChild(document.createElement("p"));
|
|
5911
|
+
y && b.appendChild(v.serializeNode(m.text(y, h)));
|
|
5912
5912
|
});
|
|
5913
5913
|
}
|
|
5914
5914
|
} else
|
|
@@ -5918,28 +5918,28 @@ function vo(t, e, n, r, i) {
|
|
|
5918
5918
|
let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
5919
5919
|
if (d && d[3])
|
|
5920
5920
|
for (let f = +d[3]; f > 0; f--) {
|
|
5921
|
-
let
|
|
5922
|
-
for (;
|
|
5923
|
-
|
|
5924
|
-
if (!
|
|
5921
|
+
let h = o.firstChild;
|
|
5922
|
+
for (; h && h.nodeType != 1; )
|
|
5923
|
+
h = h.nextSibling;
|
|
5924
|
+
if (!h)
|
|
5925
5925
|
break;
|
|
5926
|
-
o =
|
|
5926
|
+
o = h;
|
|
5927
5927
|
}
|
|
5928
5928
|
if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || yn.fromSchema(t.state.schema)).parseSlice(o, {
|
|
5929
5929
|
preserveWhitespace: !!(a || d),
|
|
5930
5930
|
context: i,
|
|
5931
|
-
ruleFromNode(
|
|
5932
|
-
return
|
|
5931
|
+
ruleFromNode(h) {
|
|
5932
|
+
return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !ou.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
5933
5933
|
}
|
|
5934
5934
|
})), d)
|
|
5935
5935
|
l = du(Xi(l, +d[1], +d[2]), d[4]);
|
|
5936
5936
|
else if (l = K.maxOpen(lu(l.content, i), !0), l.openStart || l.openEnd) {
|
|
5937
|
-
let f = 0,
|
|
5937
|
+
let f = 0, h = 0;
|
|
5938
5938
|
for (let m = l.content.firstChild; f < l.openStart && !m.type.spec.isolating; f++, m = m.firstChild)
|
|
5939
5939
|
;
|
|
5940
|
-
for (let m = l.content.lastChild;
|
|
5940
|
+
for (let m = l.content.lastChild; h < l.openEnd && !m.type.spec.isolating; h++, m = m.lastChild)
|
|
5941
5941
|
;
|
|
5942
|
-
l = Xi(l, f,
|
|
5942
|
+
l = Xi(l, f, h);
|
|
5943
5943
|
}
|
|
5944
5944
|
return t.someProp("transformPasted", (f) => {
|
|
5945
5945
|
l = f(l, t, a);
|
|
@@ -6076,7 +6076,7 @@ Fe.keypress = (t, e) => {
|
|
|
6076
6076
|
return;
|
|
6077
6077
|
}
|
|
6078
6078
|
let r = t.state.selection;
|
|
6079
|
-
if (!(r instanceof
|
|
6079
|
+
if (!(r instanceof Y) || !r.$from.sameParent(r.$to)) {
|
|
6080
6080
|
let i = String.fromCharCode(n.charCode), s = () => t.state.tr.insertText(i).scrollIntoView();
|
|
6081
6081
|
!/[\r\n]/.test(i) && !t.someProp("handleTextInput", (o) => o(t, r.$from.pos, r.$to.pos, i, s)) && t.dispatch(s()), n.preventDefault();
|
|
6082
6082
|
}
|
|
@@ -6138,12 +6138,12 @@ function bu(t, e, n) {
|
|
|
6138
6138
|
return !1;
|
|
6139
6139
|
let r = t.state.doc;
|
|
6140
6140
|
if (e == -1)
|
|
6141
|
-
return r.inlineContent ? (Ot(t,
|
|
6141
|
+
return r.inlineContent ? (Ot(t, Y.create(r, 0, r.content.size)), !0) : !1;
|
|
6142
6142
|
let i = r.resolve(e);
|
|
6143
6143
|
for (let s = i.depth + 1; s > 0; s--) {
|
|
6144
6144
|
let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
6145
6145
|
if (o.inlineContent)
|
|
6146
|
-
Ot(t,
|
|
6146
|
+
Ot(t, Y.create(r, l + 1, l + 1 + o.content.size));
|
|
6147
6147
|
else if (j.isSelectable(o))
|
|
6148
6148
|
Ot(t, j.create(r, l));
|
|
6149
6149
|
else
|
|
@@ -6200,7 +6200,7 @@ class xu {
|
|
|
6200
6200
|
// (hidden) cursor is doesn't change the selection, and
|
|
6201
6201
|
// thus doesn't get a reaction from ProseMirror. This
|
|
6202
6202
|
// works around that.
|
|
6203
|
-
Qe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (Ot(this.view,
|
|
6203
|
+
Qe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (Ot(this.view, X.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : rt(this.view, "pointer");
|
|
6204
6204
|
}
|
|
6205
6205
|
move(e) {
|
|
6206
6206
|
this.updateAllowDefault(e), rt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -6224,7 +6224,7 @@ Fe.compositionstart = Fe.compositionupdate = (t) => {
|
|
|
6224
6224
|
if (!t.composing) {
|
|
6225
6225
|
t.domObserver.flush();
|
|
6226
6226
|
let { state: e } = t, n = e.selection.$to;
|
|
6227
|
-
if (e.selection instanceof
|
|
6227
|
+
if (e.selection instanceof Y && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || Qe && go && vu(t)))
|
|
6228
6228
|
t.markCursor = t.state.storedMarks || n.marks(), wn(t, !0), t.markCursor = null;
|
|
6229
6229
|
else if (wn(t, !e.selection.empty), Pn && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
6230
6230
|
let r = t.domSelectionRange();
|
|
@@ -6396,12 +6396,12 @@ function Mu(t, e, n) {
|
|
|
6396
6396
|
let c = a.mapping.map(l), d = s.openStart == 0 && s.openEnd == 0 && s.content.childCount == 1, f = a.doc;
|
|
6397
6397
|
if (d ? a.replaceRangeWith(c, c, s.content.firstChild) : a.replaceRange(c, c, s), a.doc.eq(f))
|
|
6398
6398
|
return;
|
|
6399
|
-
let
|
|
6400
|
-
if (d && j.isSelectable(s.content.firstChild) &&
|
|
6401
|
-
a.setSelection(new j(
|
|
6399
|
+
let h = a.doc.resolve(c);
|
|
6400
|
+
if (d && j.isSelectable(s.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(s.content.firstChild))
|
|
6401
|
+
a.setSelection(new j(h));
|
|
6402
6402
|
else {
|
|
6403
6403
|
let m = a.mapping.map(l);
|
|
6404
|
-
a.mapping.maps[a.mapping.maps.length - 1].forEach((v,
|
|
6404
|
+
a.mapping.maps[a.mapping.maps.length - 1].forEach((v, y, b, k) => m = k), a.setSelection(bo(t, h, a.doc.resolve(m)));
|
|
6405
6405
|
}
|
|
6406
6406
|
t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
|
|
6407
6407
|
}
|
|
@@ -6457,7 +6457,7 @@ class An {
|
|
|
6457
6457
|
this.spec.destroy && this.spec.destroy(e);
|
|
6458
6458
|
}
|
|
6459
6459
|
}
|
|
6460
|
-
class
|
|
6460
|
+
class st {
|
|
6461
6461
|
constructor(e, n) {
|
|
6462
6462
|
this.attrs = e, this.spec = n || yt;
|
|
6463
6463
|
}
|
|
@@ -6469,10 +6469,10 @@ class it {
|
|
|
6469
6469
|
return n.from < n.to;
|
|
6470
6470
|
}
|
|
6471
6471
|
eq(e) {
|
|
6472
|
-
return this == e || e instanceof
|
|
6472
|
+
return this == e || e instanceof st && Xt(this.attrs, e.attrs) && Xt(this.spec, e.spec);
|
|
6473
6473
|
}
|
|
6474
6474
|
static is(e) {
|
|
6475
|
-
return e.type instanceof
|
|
6475
|
+
return e.type instanceof st;
|
|
6476
6476
|
}
|
|
6477
6477
|
destroy() {
|
|
6478
6478
|
}
|
|
@@ -6539,7 +6539,7 @@ class Ue {
|
|
|
6539
6539
|
each inline node between `from` and `to`.
|
|
6540
6540
|
*/
|
|
6541
6541
|
static inline(e, n, r, i) {
|
|
6542
|
-
return new Ue(e, n, new
|
|
6542
|
+
return new Ue(e, n, new st(r, i));
|
|
6543
6543
|
}
|
|
6544
6544
|
/**
|
|
6545
6545
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -6560,7 +6560,7 @@ class Ue {
|
|
|
6560
6560
|
@internal
|
|
6561
6561
|
*/
|
|
6562
6562
|
get inline() {
|
|
6563
|
-
return this.type instanceof
|
|
6563
|
+
return this.type instanceof st;
|
|
6564
6564
|
}
|
|
6565
6565
|
/**
|
|
6566
6566
|
@internal
|
|
@@ -6691,14 +6691,14 @@ class he {
|
|
|
6691
6691
|
let s = e + 1, o = s + n.content.size;
|
|
6692
6692
|
for (let l = 0; l < this.local.length; l++) {
|
|
6693
6693
|
let a = this.local[l];
|
|
6694
|
-
if (a.from < o && a.to > s && a.type instanceof
|
|
6694
|
+
if (a.from < o && a.to > s && a.type instanceof st) {
|
|
6695
6695
|
let c = Math.max(s, a.from) - s, d = Math.min(o, a.to) - s;
|
|
6696
6696
|
c < d && (i || (i = [])).push(a.copy(c, d));
|
|
6697
6697
|
}
|
|
6698
6698
|
}
|
|
6699
6699
|
if (i) {
|
|
6700
6700
|
let l = new he(i.sort(bt), Nt);
|
|
6701
|
-
return r ? new
|
|
6701
|
+
return r ? new dt([l, r]) : l;
|
|
6702
6702
|
}
|
|
6703
6703
|
return r || Ce;
|
|
6704
6704
|
}
|
|
@@ -6730,11 +6730,11 @@ class he {
|
|
|
6730
6730
|
localsInner(e) {
|
|
6731
6731
|
if (this == Ce)
|
|
6732
6732
|
return Nt;
|
|
6733
|
-
if (e.inlineContent || !this.local.some(
|
|
6733
|
+
if (e.inlineContent || !this.local.some(st.is))
|
|
6734
6734
|
return this.local;
|
|
6735
6735
|
let n = [];
|
|
6736
6736
|
for (let r = 0; r < this.local.length; r++)
|
|
6737
|
-
this.local[r].type instanceof
|
|
6737
|
+
this.local[r].type instanceof st || n.push(this.local[r]);
|
|
6738
6738
|
return n;
|
|
6739
6739
|
}
|
|
6740
6740
|
forEachSet(e) {
|
|
@@ -6744,13 +6744,13 @@ class he {
|
|
|
6744
6744
|
he.empty = new he([], []);
|
|
6745
6745
|
he.removeOverlap = Jr;
|
|
6746
6746
|
const Ce = he.empty;
|
|
6747
|
-
class
|
|
6747
|
+
class dt {
|
|
6748
6748
|
constructor(e) {
|
|
6749
6749
|
this.members = e;
|
|
6750
6750
|
}
|
|
6751
6751
|
map(e, n) {
|
|
6752
6752
|
const r = this.members.map((i) => i.map(e, n, yt));
|
|
6753
|
-
return
|
|
6753
|
+
return dt.from(r);
|
|
6754
6754
|
}
|
|
6755
6755
|
forChild(e, n) {
|
|
6756
6756
|
if (n.isLeaf)
|
|
@@ -6758,12 +6758,12 @@ class ut {
|
|
|
6758
6758
|
let r = [];
|
|
6759
6759
|
for (let i = 0; i < this.members.length; i++) {
|
|
6760
6760
|
let s = this.members[i].forChild(e, n);
|
|
6761
|
-
s != Ce && (s instanceof
|
|
6761
|
+
s != Ce && (s instanceof dt ? r = r.concat(s.members) : r.push(s));
|
|
6762
6762
|
}
|
|
6763
|
-
return
|
|
6763
|
+
return dt.from(r);
|
|
6764
6764
|
}
|
|
6765
6765
|
eq(e) {
|
|
6766
|
-
if (!(e instanceof
|
|
6766
|
+
if (!(e instanceof dt) || e.members.length != this.members.length)
|
|
6767
6767
|
return !1;
|
|
6768
6768
|
for (let n = 0; n < this.members.length; n++)
|
|
6769
6769
|
if (!this.members[n].eq(e.members[n]))
|
|
@@ -6794,7 +6794,7 @@ class ut {
|
|
|
6794
6794
|
case 1:
|
|
6795
6795
|
return e[0];
|
|
6796
6796
|
default:
|
|
6797
|
-
return new
|
|
6797
|
+
return new dt(e.every((n) => n instanceof he) ? e : e.reduce((n, r) => n.concat(r instanceof he ? r : r.members), []));
|
|
6798
6798
|
}
|
|
6799
6799
|
}
|
|
6800
6800
|
forEachSet(e) {
|
|
@@ -6806,16 +6806,16 @@ function Ou(t, e, n, r, i, s, o) {
|
|
|
6806
6806
|
let l = t.slice();
|
|
6807
6807
|
for (let c = 0, d = s; c < n.maps.length; c++) {
|
|
6808
6808
|
let f = 0;
|
|
6809
|
-
n.maps[c].forEach((
|
|
6810
|
-
let
|
|
6811
|
-
for (let
|
|
6812
|
-
let
|
|
6813
|
-
if (
|
|
6809
|
+
n.maps[c].forEach((h, m, v, y) => {
|
|
6810
|
+
let b = y - v - (m - h);
|
|
6811
|
+
for (let k = 0; k < l.length; k += 3) {
|
|
6812
|
+
let S = l[k + 1];
|
|
6813
|
+
if (S < 0 || h > S + d - f)
|
|
6814
6814
|
continue;
|
|
6815
|
-
let
|
|
6816
|
-
m >=
|
|
6815
|
+
let I = l[k] + d - f;
|
|
6816
|
+
m >= I ? l[k + 1] = h <= I ? -2 : -1 : h >= d && b && (l[k] += b, l[k + 1] += b);
|
|
6817
6817
|
}
|
|
6818
|
-
f +=
|
|
6818
|
+
f += b;
|
|
6819
6819
|
}), d = n.maps[c].map(d, -1);
|
|
6820
6820
|
}
|
|
6821
6821
|
let a = !1;
|
|
@@ -6830,10 +6830,10 @@ function Ou(t, e, n, r, i, s, o) {
|
|
|
6830
6830
|
a = !0;
|
|
6831
6831
|
continue;
|
|
6832
6832
|
}
|
|
6833
|
-
let
|
|
6834
|
-
if (
|
|
6835
|
-
let
|
|
6836
|
-
|
|
6833
|
+
let h = n.map(t[c + 1] + s, -1), m = h - i, { index: v, offset: y } = r.content.findIndex(f), b = r.maybeChild(v);
|
|
6834
|
+
if (b && y == f && y + b.nodeSize == m) {
|
|
6835
|
+
let k = l[c + 2].mapInner(n, b, d + 1, t[c] + s + 1, o);
|
|
6836
|
+
k != Ce ? (l[c] = f, l[c + 1] = m, l[c + 2] = k) : (l[c + 1] = -2, a = !0);
|
|
6837
6837
|
} else
|
|
6838
6838
|
a = !0;
|
|
6839
6839
|
}
|
|
@@ -6842,11 +6842,11 @@ function Ou(t, e, n, r, i, s, o) {
|
|
|
6842
6842
|
e = d.local;
|
|
6843
6843
|
for (let f = 0; f < l.length; f += 3)
|
|
6844
6844
|
l[f + 1] < 0 && (l.splice(f, 3), f -= 3);
|
|
6845
|
-
for (let f = 0,
|
|
6845
|
+
for (let f = 0, h = 0; f < d.children.length; f += 3) {
|
|
6846
6846
|
let m = d.children[f];
|
|
6847
|
-
for (;
|
|
6848
|
-
|
|
6849
|
-
l.splice(
|
|
6847
|
+
for (; h < l.length && l[h] < m; )
|
|
6848
|
+
h += 3;
|
|
6849
|
+
l.splice(h, 0, d.children[f], d.children[f + 1], d.children[f + 2]);
|
|
6850
6850
|
}
|
|
6851
6851
|
}
|
|
6852
6852
|
return new he(e.sort(bt), l);
|
|
@@ -6929,7 +6929,7 @@ function ts(t, e, n) {
|
|
|
6929
6929
|
e++;
|
|
6930
6930
|
t.splice(e, 0, n);
|
|
6931
6931
|
}
|
|
6932
|
-
class se extends
|
|
6932
|
+
class se extends X {
|
|
6933
6933
|
/**
|
|
6934
6934
|
Create a gap cursor.
|
|
6935
6935
|
*/
|
|
@@ -6938,7 +6938,7 @@ class se extends Y {
|
|
|
6938
6938
|
}
|
|
6939
6939
|
map(e, n) {
|
|
6940
6940
|
let r = e.resolve(n.map(this.head));
|
|
6941
|
-
return se.valid(r) ? new se(r) :
|
|
6941
|
+
return se.valid(r) ? new se(r) : X.near(r);
|
|
6942
6942
|
}
|
|
6943
6943
|
content() {
|
|
6944
6944
|
return K.empty;
|
|
@@ -7016,7 +7016,7 @@ class se extends Y {
|
|
|
7016
7016
|
}
|
|
7017
7017
|
se.prototype.visible = !1;
|
|
7018
7018
|
se.findFrom = se.findGapCursorFrom;
|
|
7019
|
-
|
|
7019
|
+
X.jsonID("gapcursor", se);
|
|
7020
7020
|
class Gr {
|
|
7021
7021
|
constructor(e) {
|
|
7022
7022
|
this.pos = e;
|
|
@@ -7026,7 +7026,7 @@ class Gr {
|
|
|
7026
7026
|
}
|
|
7027
7027
|
resolve(e) {
|
|
7028
7028
|
let n = e.resolve(this.pos);
|
|
7029
|
-
return se.valid(n) ? new se(n) :
|
|
7029
|
+
return se.valid(n) ? new se(n) : X.near(n);
|
|
7030
7030
|
}
|
|
7031
7031
|
}
|
|
7032
7032
|
function Po(t) {
|
|
@@ -7089,7 +7089,7 @@ function un(t, e) {
|
|
|
7089
7089
|
const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
7090
7090
|
return function(r, i, s) {
|
|
7091
7091
|
let o = r.selection, l = e > 0 ? o.$to : o.$from, a = o.empty;
|
|
7092
|
-
if (o instanceof
|
|
7092
|
+
if (o instanceof Y) {
|
|
7093
7093
|
if (!s.endOfTextblock(n) || l.depth == 0)
|
|
7094
7094
|
return !1;
|
|
7095
7095
|
a = !1, l = r.doc.resolve(e > 0 ? l.after() : l.before());
|
|
@@ -7117,7 +7117,7 @@ function $u(t, e) {
|
|
|
7117
7117
|
for (let o = r.length - 1; o >= 0; o--)
|
|
7118
7118
|
i = q.from(r[o].createAndFill(null, i));
|
|
7119
7119
|
let s = t.state.tr.replace(n.pos, n.pos, new K(i, 0, 0));
|
|
7120
|
-
return s.setSelection(
|
|
7120
|
+
return s.setSelection(Y.near(s.doc.resolve(n.pos + 1))), t.dispatch(s), !1;
|
|
7121
7121
|
}
|
|
7122
7122
|
function Vu(t) {
|
|
7123
7123
|
if (!(t.selection instanceof se))
|
|
@@ -7626,59 +7626,59 @@ const ju = ({
|
|
|
7626
7626
|
variant: c = "bordered",
|
|
7627
7627
|
initialContent: d,
|
|
7628
7628
|
content: f,
|
|
7629
|
-
onContentChange:
|
|
7629
|
+
onContentChange: h,
|
|
7630
7630
|
onUpdate: m,
|
|
7631
7631
|
onToolbarAction: v,
|
|
7632
|
-
isReadOnly:
|
|
7633
|
-
isDisabled:
|
|
7634
|
-
includeInlineStyles:
|
|
7635
|
-
...
|
|
7636
|
-
} = t, { zoom:
|
|
7637
|
-
...
|
|
7632
|
+
isReadOnly: y = !1,
|
|
7633
|
+
isDisabled: b = !1,
|
|
7634
|
+
includeInlineStyles: k = !0,
|
|
7635
|
+
...S
|
|
7636
|
+
} = t, { zoom: I, setZoom: C } = Ma(), w = Si.lineHeight, T = n * w, N = i ? void 0 : r * w, $ = B.useMemo(() => _u(a), [a]), { Component: _, label: U, shouldLabelBeOutside: V, getBaseProps: M, getLabelProps: P, getInputWrapperProps: R } = bl({
|
|
7637
|
+
...S,
|
|
7638
7638
|
variant: c,
|
|
7639
7639
|
// Explicitly pass variant to ensure bordered styling
|
|
7640
7640
|
ref: e,
|
|
7641
7641
|
isMultiline: !0
|
|
7642
|
-
}),
|
|
7642
|
+
}), H = U ? /* @__PURE__ */ u("label", { ...P(), children: U }) : null, Q = B.useCallback(
|
|
7643
7643
|
({ editor: W }) => {
|
|
7644
|
-
const xe = W.getHTML(), fe =
|
|
7644
|
+
const xe = W.getHTML(), fe = k ? Ku(xe) : xe, ke = W.getJSON(), Ye = W.getText(), vt = Ye.length, Pt = Ye.split(/\s+/).filter((Te) => Te.length > 0).length, ne = {
|
|
7645
7645
|
html: fe,
|
|
7646
7646
|
json: ke,
|
|
7647
7647
|
text: Ye,
|
|
7648
7648
|
characters: vt,
|
|
7649
7649
|
words: Pt
|
|
7650
7650
|
};
|
|
7651
|
-
if (
|
|
7651
|
+
if (h?.(ne), m?.(ne), "onChange" in S && typeof S.onChange == "function") {
|
|
7652
7652
|
const Te = {
|
|
7653
7653
|
target: { value: fe },
|
|
7654
7654
|
currentTarget: { value: fe }
|
|
7655
7655
|
};
|
|
7656
|
-
|
|
7656
|
+
S.onChange(Te);
|
|
7657
7657
|
}
|
|
7658
7658
|
},
|
|
7659
|
-
[
|
|
7659
|
+
[h, m, S, k]
|
|
7660
7660
|
);
|
|
7661
|
-
return /* @__PURE__ */ A(
|
|
7662
|
-
|
|
7661
|
+
return /* @__PURE__ */ A(_, { ...M(), children: [
|
|
7662
|
+
V ? H : null,
|
|
7663
7663
|
/* @__PURE__ */ u(
|
|
7664
7664
|
"div",
|
|
7665
7665
|
{
|
|
7666
|
-
|
|
7667
|
-
className:
|
|
7666
|
+
...R(),
|
|
7667
|
+
className: L(R().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
|
|
7668
7668
|
style: {
|
|
7669
|
-
maxHeight:
|
|
7670
|
-
overflow:
|
|
7669
|
+
maxHeight: N ? `${N + Si.toolbarHeight}px` : void 0,
|
|
7670
|
+
overflow: N ? "auto" : void 0
|
|
7671
7671
|
},
|
|
7672
7672
|
children: /* @__PURE__ */ u(
|
|
7673
7673
|
Ql,
|
|
7674
7674
|
{
|
|
7675
|
-
editable: !
|
|
7675
|
+
editable: !y && !b,
|
|
7676
7676
|
slotBefore: l ? /* @__PURE__ */ u(
|
|
7677
7677
|
ju,
|
|
7678
7678
|
{
|
|
7679
7679
|
modifiers: a,
|
|
7680
|
-
zoom:
|
|
7681
|
-
onZoomChange:
|
|
7680
|
+
zoom: I,
|
|
7681
|
+
onZoomChange: C,
|
|
7682
7682
|
onToolbarAction: v
|
|
7683
7683
|
}
|
|
7684
7684
|
) : void 0,
|
|
@@ -7687,7 +7687,7 @@ const ju = ({
|
|
|
7687
7687
|
className: "w-full flex-1 outline-none",
|
|
7688
7688
|
style: {
|
|
7689
7689
|
minHeight: `${T}px`,
|
|
7690
|
-
fontSize: `${
|
|
7690
|
+
fontSize: `${I}%`,
|
|
7691
7691
|
display: "flex",
|
|
7692
7692
|
flexDirection: "column"
|
|
7693
7693
|
}
|
|
@@ -7697,9 +7697,9 @@ const ju = ({
|
|
|
7697
7697
|
class: "focus:outline-none w-full h-full"
|
|
7698
7698
|
}
|
|
7699
7699
|
},
|
|
7700
|
-
extensions:
|
|
7700
|
+
extensions: $,
|
|
7701
7701
|
content: f || d || t.defaultValue || "",
|
|
7702
|
-
onUpdate:
|
|
7702
|
+
onUpdate: Q
|
|
7703
7703
|
}
|
|
7704
7704
|
)
|
|
7705
7705
|
}
|
|
@@ -7747,50 +7747,50 @@ const ns = [
|
|
|
7747
7747
|
labels: c,
|
|
7748
7748
|
mobileColumns: d = 2,
|
|
7749
7749
|
desktopColumns: f = 3,
|
|
7750
|
-
isDisabled:
|
|
7750
|
+
isDisabled: h = !1,
|
|
7751
7751
|
buttonVariant: m = "bordered",
|
|
7752
7752
|
buttonColor: v = "default",
|
|
7753
|
-
inputVariant:
|
|
7754
|
-
className:
|
|
7755
|
-
showCard:
|
|
7753
|
+
inputVariant: y = "bordered",
|
|
7754
|
+
className: b = "",
|
|
7755
|
+
showCard: k = !0
|
|
7756
7756
|
}) => {
|
|
7757
|
-
const
|
|
7757
|
+
const S = { ...Zu, ...c }, I = Array.isArray(t) ? t : ns, C = {
|
|
7758
7758
|
2: "grid-cols-2",
|
|
7759
7759
|
3: "grid-cols-3"
|
|
7760
|
-
},
|
|
7760
|
+
}, w = {
|
|
7761
7761
|
3: "sm:grid-cols-3",
|
|
7762
7762
|
4: "sm:grid-cols-4",
|
|
7763
7763
|
5: "sm:grid-cols-5",
|
|
7764
7764
|
6: "sm:grid-cols-6"
|
|
7765
|
-
}, T = `${
|
|
7765
|
+
}, T = `${C[d]} ${w[f]}`, [N, $] = $r(
|
|
7766
7766
|
e,
|
|
7767
7767
|
n,
|
|
7768
7768
|
r
|
|
7769
|
-
), [
|
|
7770
|
-
(
|
|
7771
|
-
if (
|
|
7772
|
-
const
|
|
7773
|
-
amount:
|
|
7769
|
+
), [_, U] = J(""), V = ce(
|
|
7770
|
+
(H) => {
|
|
7771
|
+
if (h) return;
|
|
7772
|
+
const Q = {
|
|
7773
|
+
amount: H.amount,
|
|
7774
7774
|
isCustom: !1,
|
|
7775
|
-
presetId:
|
|
7775
|
+
presetId: H.id
|
|
7776
7776
|
};
|
|
7777
|
-
|
|
7777
|
+
$(Q), U("");
|
|
7778
7778
|
},
|
|
7779
|
-
[
|
|
7780
|
-
),
|
|
7781
|
-
(
|
|
7782
|
-
if (
|
|
7783
|
-
if (U(
|
|
7784
|
-
|
|
7779
|
+
[h, $]
|
|
7780
|
+
), M = ce(
|
|
7781
|
+
(H) => {
|
|
7782
|
+
if (h) return;
|
|
7783
|
+
if (U(H !== void 0 ? String(H) : ""), H === void 0 || isNaN(H)) {
|
|
7784
|
+
$(null);
|
|
7785
7785
|
return;
|
|
7786
7786
|
}
|
|
7787
|
-
|
|
7788
|
-
amount:
|
|
7787
|
+
$({
|
|
7788
|
+
amount: H,
|
|
7789
7789
|
isCustom: !0
|
|
7790
7790
|
});
|
|
7791
7791
|
},
|
|
7792
|
-
[
|
|
7793
|
-
),
|
|
7792
|
+
[h, $]
|
|
7793
|
+
), P = B.useMemo(
|
|
7794
7794
|
() => ({
|
|
7795
7795
|
style: "currency",
|
|
7796
7796
|
currency: i,
|
|
@@ -7799,44 +7799,44 @@ const ns = [
|
|
|
7799
7799
|
// the currency and formatting match our locale prop
|
|
7800
7800
|
}),
|
|
7801
7801
|
[i]
|
|
7802
|
-
),
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
const
|
|
7802
|
+
), R = /* @__PURE__ */ A("div", { className: "space-y-4", "data-testid": "donation-amounts-root", children: [
|
|
7803
|
+
S.title && /* @__PURE__ */ u("h2", { className: "text-base font-semibold", "data-testid": "donation-amounts-title", children: S.title }),
|
|
7804
|
+
I.length > 0 && /* @__PURE__ */ u("div", { className: L("grid gap-3", T), "data-testid": "donation-amounts-presets", children: I.map((H) => {
|
|
7805
|
+
const Q = N !== null && !N.isCustom && N.presetId === H.id;
|
|
7806
7806
|
return /* @__PURE__ */ u(
|
|
7807
7807
|
oe,
|
|
7808
7808
|
{
|
|
7809
|
-
color:
|
|
7810
|
-
variant:
|
|
7809
|
+
color: Q ? "primary" : v,
|
|
7810
|
+
variant: Q ? "solid" : m,
|
|
7811
7811
|
className: "w-full",
|
|
7812
|
-
onPress: () =>
|
|
7813
|
-
isDisabled:
|
|
7814
|
-
"data-testid": `donation-amounts-preset-${
|
|
7815
|
-
children:
|
|
7812
|
+
onPress: () => V(H),
|
|
7813
|
+
isDisabled: h,
|
|
7814
|
+
"data-testid": `donation-amounts-preset-${H.id}`,
|
|
7815
|
+
children: H.label || Gu(H.amount, s, i)
|
|
7816
7816
|
},
|
|
7817
|
-
|
|
7817
|
+
H.id
|
|
7818
7818
|
);
|
|
7819
7819
|
}) }),
|
|
7820
7820
|
o && /* @__PURE__ */ u(
|
|
7821
7821
|
Ls,
|
|
7822
7822
|
{
|
|
7823
|
-
placeholder:
|
|
7824
|
-
"aria-label":
|
|
7825
|
-
variant:
|
|
7823
|
+
placeholder: S.customAmountPlaceholder,
|
|
7824
|
+
"aria-label": S.customAmountAriaLabel,
|
|
7825
|
+
variant: y,
|
|
7826
7826
|
radius: "md",
|
|
7827
7827
|
minValue: l,
|
|
7828
7828
|
maxValue: a,
|
|
7829
7829
|
step: 0.01,
|
|
7830
|
-
formatOptions:
|
|
7831
|
-
value:
|
|
7832
|
-
onValueChange:
|
|
7833
|
-
isDisabled:
|
|
7830
|
+
formatOptions: P,
|
|
7831
|
+
value: _ !== "" ? parseFloat(_) : void 0,
|
|
7832
|
+
onValueChange: M,
|
|
7833
|
+
isDisabled: h,
|
|
7834
7834
|
"data-testid": "donation-amounts-custom-input"
|
|
7835
7835
|
},
|
|
7836
|
-
|
|
7836
|
+
N?.isCustom === !1 ? N.presetId : "custom"
|
|
7837
7837
|
)
|
|
7838
7838
|
] });
|
|
7839
|
-
return
|
|
7839
|
+
return k ? /* @__PURE__ */ u(Ee, { className: L("w-full", b), "data-testid": "donation-amounts-card", children: /* @__PURE__ */ u(Le, { children: R }) }) : /* @__PURE__ */ u("div", { className: L("w-full", b), "data-testid": "donation-amounts-plain", children: R });
|
|
7840
7840
|
};
|
|
7841
7841
|
Qu.displayName = "DonationAmounts";
|
|
7842
7842
|
const Yu = (t) => {
|
|
@@ -7885,30 +7885,30 @@ const Yu = (t) => {
|
|
|
7885
7885
|
position: c = "fixed",
|
|
7886
7886
|
autoStart: d = !0,
|
|
7887
7887
|
formatTime: f = Yu,
|
|
7888
|
-
className:
|
|
7888
|
+
className: h,
|
|
7889
7889
|
...m
|
|
7890
7890
|
}, v) => {
|
|
7891
|
-
const [
|
|
7891
|
+
const [y, b] = $r(
|
|
7892
7892
|
t !== void 0 ? Math.max(0, t) : void 0,
|
|
7893
7893
|
Math.max(0, e),
|
|
7894
7894
|
n
|
|
7895
|
-
),
|
|
7895
|
+
), k = It(null), S = It(!1);
|
|
7896
7896
|
qe(() => () => {
|
|
7897
|
-
|
|
7897
|
+
k.current && clearInterval(k.current);
|
|
7898
7898
|
}, []), qe(() => {
|
|
7899
|
-
if (!d ||
|
|
7900
|
-
|
|
7899
|
+
if (!d || y <= 0) {
|
|
7900
|
+
k.current && (clearInterval(k.current), k.current = null);
|
|
7901
7901
|
return;
|
|
7902
7902
|
}
|
|
7903
|
-
return
|
|
7904
|
-
|
|
7903
|
+
return k.current = setInterval(() => {
|
|
7904
|
+
b((T) => T <= 1 ? (k.current && (clearInterval(k.current), k.current = null), S.current || (S.current = !0, r?.()), 0) : T - 1);
|
|
7905
7905
|
}, 1e3), () => {
|
|
7906
|
-
|
|
7906
|
+
k.current && (clearInterval(k.current), k.current = null);
|
|
7907
7907
|
};
|
|
7908
|
-
}, [d,
|
|
7909
|
-
|
|
7910
|
-
}, [
|
|
7911
|
-
const
|
|
7908
|
+
}, [d, y, b, r]), qe(() => {
|
|
7909
|
+
y > 0 && (S.current = !1);
|
|
7910
|
+
}, [y]);
|
|
7911
|
+
const I = a || Xu(i), C = ed(s), w = {
|
|
7912
7912
|
fixed: "fixed top-0 left-0",
|
|
7913
7913
|
sticky: "sticky top-0",
|
|
7914
7914
|
static: "static"
|
|
@@ -7919,9 +7919,9 @@ const Yu = (t) => {
|
|
|
7919
7919
|
ref: v,
|
|
7920
7920
|
role: "banner",
|
|
7921
7921
|
"aria-live": "polite",
|
|
7922
|
-
"aria-label": `${o} ${f(
|
|
7922
|
+
"aria-label": `${o} ${f(y)}`,
|
|
7923
7923
|
"data-testid": "expire-cart-timer",
|
|
7924
|
-
className:
|
|
7924
|
+
className: L("w-full text-white z-50", C, w[c], h),
|
|
7925
7925
|
...m,
|
|
7926
7926
|
children: /* @__PURE__ */ u("div", { className: "container mx-auto px-4 py-3 sm:py-2.5", "data-testid": "expire-cart-timer-container", children: /* @__PURE__ */ A("div", { className: "flex items-center justify-between gap-3 sm:gap-4", children: [
|
|
7927
7927
|
/* @__PURE__ */ A(
|
|
@@ -7936,7 +7936,7 @@ const Yu = (t) => {
|
|
|
7936
7936
|
className: "flex-shrink-0 w-[0.875rem] h-[0.875rem] sm:w-4 sm:h-4 rounded-full bg-white flex items-center justify-center overflow-hidden",
|
|
7937
7937
|
"data-testid": "expire-cart-timer-icon-wrapper",
|
|
7938
7938
|
children: /* @__PURE__ */ u(
|
|
7939
|
-
|
|
7939
|
+
I,
|
|
7940
7940
|
{
|
|
7941
7941
|
className: "text-primary-500 sm:text-primary-600",
|
|
7942
7942
|
"aria-hidden": "true",
|
|
@@ -7961,9 +7961,9 @@ const Yu = (t) => {
|
|
|
7961
7961
|
"span",
|
|
7962
7962
|
{
|
|
7963
7963
|
className: "text-sm sm:text-base font-semibold text-white",
|
|
7964
|
-
"aria-label": `Time remaining: ${f(
|
|
7964
|
+
"aria-label": `Time remaining: ${f(y)}`,
|
|
7965
7965
|
"data-testid": "expire-cart-timer-value",
|
|
7966
|
-
children: f(
|
|
7966
|
+
children: f(y)
|
|
7967
7967
|
}
|
|
7968
7968
|
) })
|
|
7969
7969
|
] }) })
|
|
@@ -8214,29 +8214,29 @@ function gd(t, e) {
|
|
|
8214
8214
|
height: n.height
|
|
8215
8215
|
};
|
|
8216
8216
|
let s = n.body;
|
|
8217
|
-
[n, r].forEach((
|
|
8218
|
-
const
|
|
8219
|
-
let
|
|
8220
|
-
|
|
8221
|
-
let
|
|
8222
|
-
switch (
|
|
8217
|
+
[n, r].forEach((y) => {
|
|
8218
|
+
const b = [], k = y.hFlip, S = y.vFlip;
|
|
8219
|
+
let I = y.rotate;
|
|
8220
|
+
k ? S ? I += 2 : (b.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), b.push("scale(-1 1)"), i.top = i.left = 0) : S && (b.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), b.push("scale(1 -1)"), i.top = i.left = 0);
|
|
8221
|
+
let C;
|
|
8222
|
+
switch (I < 0 && (I -= Math.floor(I / 4) * 4), I = I % 4, I) {
|
|
8223
8223
|
case 1:
|
|
8224
|
-
|
|
8224
|
+
C = i.height / 2 + i.top, b.unshift("rotate(90 " + C.toString() + " " + C.toString() + ")");
|
|
8225
8225
|
break;
|
|
8226
8226
|
case 2:
|
|
8227
|
-
|
|
8227
|
+
b.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
8228
8228
|
break;
|
|
8229
8229
|
case 3:
|
|
8230
|
-
|
|
8230
|
+
C = i.width / 2 + i.left, b.unshift("rotate(-90 " + C.toString() + " " + C.toString() + ")");
|
|
8231
8231
|
break;
|
|
8232
8232
|
}
|
|
8233
|
-
|
|
8233
|
+
I % 2 === 1 && (i.left !== i.top && (C = i.left, i.left = i.top, i.top = C), i.width !== i.height && (C = i.width, i.width = i.height, i.height = C)), b.length && (s = pd(s, '<g transform="' + b.join(" ") + '">', "</g>"));
|
|
8234
8234
|
});
|
|
8235
8235
|
const o = r.width, l = r.height, a = i.width, c = i.height;
|
|
8236
8236
|
let d, f;
|
|
8237
8237
|
o === null ? (f = l === null ? "1em" : l === "auto" ? c : l, d = os(f, a / c)) : (d = o === "auto" ? a : o, f = l === null ? os(d, c / a) : l === "auto" ? c : l);
|
|
8238
|
-
const
|
|
8239
|
-
md(
|
|
8238
|
+
const h = {}, m = (y, b) => {
|
|
8239
|
+
md(b) || (h[y] = b.toString());
|
|
8240
8240
|
};
|
|
8241
8241
|
m("width", d), m("height", f);
|
|
8242
8242
|
const v = [
|
|
@@ -8245,8 +8245,8 @@ function gd(t, e) {
|
|
|
8245
8245
|
a,
|
|
8246
8246
|
c
|
|
8247
8247
|
];
|
|
8248
|
-
return
|
|
8249
|
-
attributes:
|
|
8248
|
+
return h.viewBox = v.join(" "), {
|
|
8249
|
+
attributes: h,
|
|
8250
8250
|
viewBox: v,
|
|
8251
8251
|
body: s
|
|
8252
8252
|
};
|
|
@@ -8490,97 +8490,97 @@ function Rd(t, e, n, r) {
|
|
|
8490
8490
|
if (t.random) {
|
|
8491
8491
|
let T = t.resources.slice(0);
|
|
8492
8492
|
for (o = []; T.length > 1; ) {
|
|
8493
|
-
const
|
|
8494
|
-
o.push(T[
|
|
8493
|
+
const N = Math.floor(Math.random() * T.length);
|
|
8494
|
+
o.push(T[N]), T = T.slice(0, N).concat(T.slice(N + 1));
|
|
8495
8495
|
}
|
|
8496
8496
|
o = o.concat(T);
|
|
8497
8497
|
} else o = t.resources.slice(s).concat(t.resources.slice(0, s));
|
|
8498
8498
|
const l = Date.now();
|
|
8499
|
-
let a = "pending", c = 0, d, f = null,
|
|
8499
|
+
let a = "pending", c = 0, d, f = null, h = [], m = [];
|
|
8500
8500
|
typeof r == "function" && m.push(r);
|
|
8501
8501
|
function v() {
|
|
8502
8502
|
f && (clearTimeout(f), f = null);
|
|
8503
8503
|
}
|
|
8504
|
-
function
|
|
8505
|
-
a === "pending" && (a = "aborted"), v(),
|
|
8504
|
+
function y() {
|
|
8505
|
+
a === "pending" && (a = "aborted"), v(), h.forEach((T) => {
|
|
8506
8506
|
T.status === "pending" && (T.status = "aborted");
|
|
8507
|
-
}),
|
|
8507
|
+
}), h = [];
|
|
8508
8508
|
}
|
|
8509
|
-
function
|
|
8510
|
-
|
|
8509
|
+
function b(T, N) {
|
|
8510
|
+
N && (m = []), typeof T == "function" && m.push(T);
|
|
8511
8511
|
}
|
|
8512
|
-
function
|
|
8512
|
+
function k() {
|
|
8513
8513
|
return {
|
|
8514
8514
|
startTime: l,
|
|
8515
8515
|
payload: e,
|
|
8516
8516
|
status: a,
|
|
8517
8517
|
queriesSent: c,
|
|
8518
|
-
queriesPending:
|
|
8519
|
-
subscribe:
|
|
8520
|
-
abort:
|
|
8518
|
+
queriesPending: h.length,
|
|
8519
|
+
subscribe: b,
|
|
8520
|
+
abort: y
|
|
8521
8521
|
};
|
|
8522
8522
|
}
|
|
8523
|
-
function
|
|
8523
|
+
function S() {
|
|
8524
8524
|
a = "failed", m.forEach((T) => {
|
|
8525
8525
|
T(void 0, d);
|
|
8526
8526
|
});
|
|
8527
8527
|
}
|
|
8528
|
-
function
|
|
8529
|
-
|
|
8528
|
+
function I() {
|
|
8529
|
+
h.forEach((T) => {
|
|
8530
8530
|
T.status === "pending" && (T.status = "aborted");
|
|
8531
|
-
}),
|
|
8531
|
+
}), h = [];
|
|
8532
8532
|
}
|
|
8533
|
-
function
|
|
8534
|
-
const
|
|
8535
|
-
switch (
|
|
8533
|
+
function C(T, N, $) {
|
|
8534
|
+
const _ = N !== "success";
|
|
8535
|
+
switch (h = h.filter((U) => U !== T), a) {
|
|
8536
8536
|
case "pending":
|
|
8537
8537
|
break;
|
|
8538
8538
|
case "failed":
|
|
8539
|
-
if (
|
|
8539
|
+
if (_ || !t.dataAfterTimeout) return;
|
|
8540
8540
|
break;
|
|
8541
8541
|
default:
|
|
8542
8542
|
return;
|
|
8543
8543
|
}
|
|
8544
|
-
if (
|
|
8545
|
-
d =
|
|
8544
|
+
if (N === "abort") {
|
|
8545
|
+
d = $, S();
|
|
8546
8546
|
return;
|
|
8547
8547
|
}
|
|
8548
|
-
if (
|
|
8549
|
-
d =
|
|
8548
|
+
if (_) {
|
|
8549
|
+
d = $, h.length || (o.length ? w() : S());
|
|
8550
8550
|
return;
|
|
8551
8551
|
}
|
|
8552
|
-
if (v(),
|
|
8552
|
+
if (v(), I(), !t.random) {
|
|
8553
8553
|
const U = t.resources.indexOf(T.resource);
|
|
8554
8554
|
U !== -1 && U !== t.index && (t.index = U);
|
|
8555
8555
|
}
|
|
8556
8556
|
a = "completed", m.forEach((U) => {
|
|
8557
|
-
U(
|
|
8557
|
+
U($);
|
|
8558
8558
|
});
|
|
8559
8559
|
}
|
|
8560
|
-
function
|
|
8560
|
+
function w() {
|
|
8561
8561
|
if (a !== "pending") return;
|
|
8562
8562
|
v();
|
|
8563
8563
|
const T = o.shift();
|
|
8564
8564
|
if (T === void 0) {
|
|
8565
|
-
if (
|
|
8565
|
+
if (h.length) {
|
|
8566
8566
|
f = setTimeout(() => {
|
|
8567
|
-
v(), a === "pending" && (
|
|
8567
|
+
v(), a === "pending" && (I(), S());
|
|
8568
8568
|
}, t.timeout);
|
|
8569
8569
|
return;
|
|
8570
8570
|
}
|
|
8571
|
-
|
|
8571
|
+
S();
|
|
8572
8572
|
return;
|
|
8573
8573
|
}
|
|
8574
|
-
const
|
|
8574
|
+
const N = {
|
|
8575
8575
|
status: "pending",
|
|
8576
8576
|
resource: T,
|
|
8577
|
-
callback: (
|
|
8578
|
-
|
|
8577
|
+
callback: ($, _) => {
|
|
8578
|
+
C(N, $, _);
|
|
8579
8579
|
}
|
|
8580
8580
|
};
|
|
8581
|
-
|
|
8581
|
+
h.push(N), c++, f = setTimeout(w, t.rotate), n(T, e, N.callback);
|
|
8582
8582
|
}
|
|
8583
|
-
return setTimeout(
|
|
8583
|
+
return setTimeout(w), k;
|
|
8584
8584
|
}
|
|
8585
8585
|
function Ko(t) {
|
|
8586
8586
|
const e = {
|
|
@@ -8592,8 +8592,8 @@ function Ko(t) {
|
|
|
8592
8592
|
n = n.filter((l) => l().status === "pending");
|
|
8593
8593
|
}
|
|
8594
8594
|
function i(l, a, c) {
|
|
8595
|
-
const d = Rd(e, l, a, (f,
|
|
8596
|
-
r(), c && c(f,
|
|
8595
|
+
const d = Rd(e, l, a, (f, h) => {
|
|
8596
|
+
r(), c && c(f, h);
|
|
8597
8597
|
});
|
|
8598
8598
|
return n.push(d), d;
|
|
8599
8599
|
}
|
|
@@ -8699,10 +8699,10 @@ function _d(t, e) {
|
|
|
8699
8699
|
if (s) {
|
|
8700
8700
|
i.forEach((d) => {
|
|
8701
8701
|
const f = s(d, r, n);
|
|
8702
|
-
us(f, (
|
|
8703
|
-
const m =
|
|
8702
|
+
us(f, (h) => {
|
|
8703
|
+
const m = h ? {
|
|
8704
8704
|
prefix: r,
|
|
8705
|
-
icons: { [d]:
|
|
8705
|
+
icons: { [d]: h }
|
|
8706
8706
|
} : null;
|
|
8707
8707
|
zt(t, [d], m);
|
|
8708
8708
|
});
|
|
@@ -8742,7 +8742,7 @@ const Hd = (t, e) => {
|
|
|
8742
8742
|
const f = i[c] || (i[c] = /* @__PURE__ */ Object.create(null));
|
|
8743
8743
|
f[d] || (f[d] = []);
|
|
8744
8744
|
}), r.pending.forEach((a) => {
|
|
8745
|
-
const { provider: c, prefix: d, name: f } = a,
|
|
8745
|
+
const { provider: c, prefix: d, name: f } = a, h = Ft(c, d), m = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
|
|
8746
8746
|
m.has(f) || (m.add(f), i[c][d].push(f));
|
|
8747
8747
|
}), s.forEach((a) => {
|
|
8748
8748
|
const c = i[a.provider][a.prefix];
|
|
@@ -8860,21 +8860,21 @@ const nf = (t, e, n) => {
|
|
|
8860
8860
|
...s === "svg" ? Xd : {}
|
|
8861
8861
|
};
|
|
8862
8862
|
if (n) {
|
|
8863
|
-
const
|
|
8864
|
-
if (
|
|
8865
|
-
const
|
|
8863
|
+
const b = $n(n, !1, !0);
|
|
8864
|
+
if (b) {
|
|
8865
|
+
const k = ["iconify"], S = [
|
|
8866
8866
|
"provider",
|
|
8867
8867
|
"prefix"
|
|
8868
8868
|
];
|
|
8869
|
-
for (const
|
|
8870
|
-
|
|
8871
|
-
a.className =
|
|
8869
|
+
for (const I of S)
|
|
8870
|
+
b[I] && k.push("iconify--" + b[I]);
|
|
8871
|
+
a.className = k.join(" ");
|
|
8872
8872
|
}
|
|
8873
8873
|
}
|
|
8874
|
-
for (let
|
|
8875
|
-
const
|
|
8876
|
-
if (
|
|
8877
|
-
switch (
|
|
8874
|
+
for (let b in e) {
|
|
8875
|
+
const k = e[b];
|
|
8876
|
+
if (k !== void 0)
|
|
8877
|
+
switch (b) {
|
|
8878
8878
|
// Properties to ignore
|
|
8879
8879
|
case "icon":
|
|
8880
8880
|
case "style":
|
|
@@ -8886,38 +8886,38 @@ const nf = (t, e, n) => {
|
|
|
8886
8886
|
break;
|
|
8887
8887
|
// Forward ref
|
|
8888
8888
|
case "_ref":
|
|
8889
|
-
a.ref =
|
|
8889
|
+
a.ref = k;
|
|
8890
8890
|
break;
|
|
8891
8891
|
// Merge class names
|
|
8892
8892
|
case "className":
|
|
8893
|
-
a[
|
|
8893
|
+
a[b] = (a[b] ? a[b] + " " : "") + k;
|
|
8894
8894
|
break;
|
|
8895
8895
|
// Boolean attributes
|
|
8896
8896
|
case "inline":
|
|
8897
8897
|
case "hFlip":
|
|
8898
8898
|
case "vFlip":
|
|
8899
|
-
i[
|
|
8899
|
+
i[b] = k === !0 || k === "true" || k === 1;
|
|
8900
8900
|
break;
|
|
8901
8901
|
// Flip as string: 'horizontal,vertical'
|
|
8902
8902
|
case "flip":
|
|
8903
|
-
typeof
|
|
8903
|
+
typeof k == "string" && Kd(i, k);
|
|
8904
8904
|
break;
|
|
8905
8905
|
// Color: copy to style
|
|
8906
8906
|
case "color":
|
|
8907
|
-
o.color =
|
|
8907
|
+
o.color = k;
|
|
8908
8908
|
break;
|
|
8909
8909
|
// Rotation as string
|
|
8910
8910
|
case "rotate":
|
|
8911
|
-
typeof
|
|
8911
|
+
typeof k == "string" ? i[b] = jd(k) : typeof k == "number" && (i[b] = k);
|
|
8912
8912
|
break;
|
|
8913
8913
|
// Remove aria-hidden
|
|
8914
8914
|
case "ariaHidden":
|
|
8915
8915
|
case "aria-hidden":
|
|
8916
|
-
|
|
8916
|
+
k !== !0 && k !== "true" && delete a["aria-hidden"];
|
|
8917
8917
|
break;
|
|
8918
8918
|
// Copy missing property if it does not exist in customisations
|
|
8919
8919
|
default:
|
|
8920
|
-
r[
|
|
8920
|
+
r[b] === void 0 && (a[b] = k);
|
|
8921
8921
|
}
|
|
8922
8922
|
}
|
|
8923
8923
|
const c = gd(t, i), d = c.attributes;
|
|
@@ -8926,19 +8926,19 @@ const nf = (t, e, n) => {
|
|
|
8926
8926
|
...o,
|
|
8927
8927
|
...l
|
|
8928
8928
|
}, Object.assign(a, d);
|
|
8929
|
-
let
|
|
8930
|
-
return typeof
|
|
8931
|
-
__html: Yd(kd(c.body,
|
|
8929
|
+
let b = 0, k = e.id;
|
|
8930
|
+
return typeof k == "string" && (k = k.replace(/-/g, "_")), a.dangerouslySetInnerHTML = {
|
|
8931
|
+
__html: Yd(kd(c.body, k ? () => k + "ID" + b++ : "iconifyReact"))
|
|
8932
8932
|
}, dr("svg", a);
|
|
8933
8933
|
}
|
|
8934
|
-
const { body: f, width:
|
|
8934
|
+
const { body: f, width: h, height: m } = t, v = s === "mask" || (s === "bg" ? !1 : f.indexOf("currentColor") !== -1), y = Wd(f, {
|
|
8935
8935
|
...d,
|
|
8936
|
-
width:
|
|
8936
|
+
width: h + "",
|
|
8937
8937
|
height: m + ""
|
|
8938
8938
|
});
|
|
8939
8939
|
return a.style = {
|
|
8940
8940
|
...o,
|
|
8941
|
-
"--svg": Zd(
|
|
8941
|
+
"--svg": Zd(y),
|
|
8942
8942
|
width: hs(d.width),
|
|
8943
8943
|
height: hs(d.height),
|
|
8944
8944
|
...ef,
|
|
@@ -8989,11 +8989,11 @@ function Jo(t) {
|
|
|
8989
8989
|
name: "",
|
|
8990
8990
|
data: v
|
|
8991
8991
|
};
|
|
8992
|
-
const
|
|
8993
|
-
if (
|
|
8992
|
+
const y = ss(v);
|
|
8993
|
+
if (y)
|
|
8994
8994
|
return {
|
|
8995
8995
|
name: v,
|
|
8996
|
-
data:
|
|
8996
|
+
data: y
|
|
8997
8997
|
};
|
|
8998
8998
|
}
|
|
8999
8999
|
return {
|
|
@@ -9019,25 +9019,25 @@ function Jo(t) {
|
|
|
9019
9019
|
});
|
|
9020
9020
|
return;
|
|
9021
9021
|
}
|
|
9022
|
-
const
|
|
9022
|
+
const y = ss(v);
|
|
9023
9023
|
if (c({
|
|
9024
9024
|
name: v,
|
|
9025
|
-
data:
|
|
9025
|
+
data: y
|
|
9026
9026
|
}))
|
|
9027
|
-
if (
|
|
9028
|
-
const
|
|
9027
|
+
if (y === void 0) {
|
|
9028
|
+
const b = Hd([v], d);
|
|
9029
9029
|
i({
|
|
9030
|
-
callback:
|
|
9030
|
+
callback: b
|
|
9031
9031
|
});
|
|
9032
|
-
} else
|
|
9032
|
+
} else y && ((m = t.onLoad) === null || m === void 0 || m.call(t, v));
|
|
9033
9033
|
}
|
|
9034
9034
|
qe(() => (n(!0), a), []), qe(() => {
|
|
9035
9035
|
e && d();
|
|
9036
9036
|
}, [t.icon, e]);
|
|
9037
|
-
const { name: f, data:
|
|
9038
|
-
return
|
|
9037
|
+
const { name: f, data: h } = o;
|
|
9038
|
+
return h ? nf({
|
|
9039
9039
|
...Zr,
|
|
9040
|
-
...
|
|
9040
|
+
...h
|
|
9041
9041
|
}, t, f) : t.children ? t.children : t.fallback ? t.fallback : dr("span", {});
|
|
9042
9042
|
}
|
|
9043
9043
|
const Ie = tn((t, e) => Jo({
|
|
@@ -9068,16 +9068,16 @@ const lr = ({
|
|
|
9068
9068
|
showMoreButtonClassName: a,
|
|
9069
9069
|
labels: c
|
|
9070
9070
|
}) => {
|
|
9071
|
-
const [d, f] = J(!1), [
|
|
9071
|
+
const [d, f] = J(!1), [h, m] = J(!1), v = It(null);
|
|
9072
9072
|
return qe(() => {
|
|
9073
|
-
const
|
|
9073
|
+
const y = () => {
|
|
9074
9074
|
if (v.current) {
|
|
9075
|
-
const
|
|
9076
|
-
m(
|
|
9075
|
+
const b = v.current.scrollHeight > v.current.clientHeight;
|
|
9076
|
+
m(b);
|
|
9077
9077
|
}
|
|
9078
9078
|
};
|
|
9079
|
-
return
|
|
9080
|
-
}, [o]), /* @__PURE__ */ A(Ee, { className:
|
|
9079
|
+
return y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
|
|
9080
|
+
}, [o]), /* @__PURE__ */ A(Ee, { className: L("border-0 shadow-none", t), "data-testid": "event-details-root", children: [
|
|
9081
9081
|
/* @__PURE__ */ A(Fs, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
|
|
9082
9082
|
l && n && /* @__PURE__ */ u(
|
|
9083
9083
|
"div",
|
|
@@ -9109,7 +9109,7 @@ const lr = ({
|
|
|
9109
9109
|
"div",
|
|
9110
9110
|
{
|
|
9111
9111
|
ref: v,
|
|
9112
|
-
className:
|
|
9112
|
+
className: L(
|
|
9113
9113
|
"text-sm text-gray-700 leading-relaxed transition-all",
|
|
9114
9114
|
!d && "line-clamp-3"
|
|
9115
9115
|
),
|
|
@@ -9117,12 +9117,12 @@ const lr = ({
|
|
|
9117
9117
|
dangerouslySetInnerHTML: { __html: o }
|
|
9118
9118
|
}
|
|
9119
9119
|
),
|
|
9120
|
-
(
|
|
9120
|
+
(h || d) && /* @__PURE__ */ u("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ u(
|
|
9121
9121
|
oe,
|
|
9122
9122
|
{
|
|
9123
9123
|
onPress: () => f(!d),
|
|
9124
9124
|
variant: "light",
|
|
9125
|
-
className:
|
|
9125
|
+
className: L("text-primary", a),
|
|
9126
9126
|
startContent: /* @__PURE__ */ u(
|
|
9127
9127
|
Ie,
|
|
9128
9128
|
{
|
|
@@ -9176,33 +9176,33 @@ const sf = {
|
|
|
9176
9176
|
buttonVariant: c = "bordered",
|
|
9177
9177
|
buttonColor: d = "default",
|
|
9178
9178
|
showCard: f = !0,
|
|
9179
|
-
showDescription:
|
|
9179
|
+
showDescription: h = !0,
|
|
9180
9180
|
showPeopleCount: m = !0,
|
|
9181
9181
|
showPrice: v = !0,
|
|
9182
|
-
classNames:
|
|
9183
|
-
"data-testid":
|
|
9184
|
-
selectedColor:
|
|
9182
|
+
classNames: y = {},
|
|
9183
|
+
"data-testid": b,
|
|
9184
|
+
selectedColor: k = "default"
|
|
9185
9185
|
}) => {
|
|
9186
|
-
const
|
|
9186
|
+
const S = { ...sf, ...o }, [I, C] = J(n), w = e !== void 0 ? e : I, T = (fe) => {
|
|
9187
9187
|
if (a) return;
|
|
9188
|
-
const ke = Math.max(0,
|
|
9189
|
-
e === void 0 &&
|
|
9190
|
-
},
|
|
9188
|
+
const ke = Math.max(0, w + fe);
|
|
9189
|
+
e === void 0 && C(ke), r?.(t.id, ke);
|
|
9190
|
+
}, N = it(() => !dn(t.totalTicketsSold) || !dn(t.ticketsAllowed) ? !1 : t.totalTicketsSold >= t.ticketsAllowed, [t.totalTicketsSold, t.ticketsAllowed]), $ = it(() => N || !dn(t.ticketsAllowed) ? !1 : w >= t.ticketsAllowed - (t.totalTicketsSold ?? 0), [N, t.ticketsAllowed, t.totalTicketsSold, w]), _ = rf(t.price, s, i), U = () => l?.renderName ? l.renderName(t.name, t) : /* @__PURE__ */ u("h2", { "data-testid": "offer-card-name", className: L("text-base font-medium", y.name), children: t.name }), V = () => v ? l?.renderPrice ? l.renderPrice(t.price, _, t) : /* @__PURE__ */ u("p", { "data-testid": "offer-card-price", className: L("text-primary text-base mt-1", y.price), children: _ }) : null, M = () => !h || !t.description ? null : l?.renderDescription ? l.renderDescription(t.description, t) : /* @__PURE__ */ u(
|
|
9191
9191
|
"p",
|
|
9192
9192
|
{
|
|
9193
9193
|
"data-testid": "offer-card-description",
|
|
9194
|
-
className:
|
|
9194
|
+
className: L("mb-4 text-sm text-gray-700 leading-relaxed", y.description),
|
|
9195
9195
|
children: t.description
|
|
9196
9196
|
}
|
|
9197
|
-
),
|
|
9197
|
+
), P = () => {
|
|
9198
9198
|
if (!m || !dn(t.numberOfPeople) || t.numberOfPeople <= 0)
|
|
9199
9199
|
return null;
|
|
9200
|
-
const fe = t.numberOfPeople === 1 ?
|
|
9200
|
+
const fe = t.numberOfPeople === 1 ? S.person : S.people;
|
|
9201
9201
|
return l?.renderPeopleCount ? l.renderPeopleCount(t.numberOfPeople, fe, t) : /* @__PURE__ */ A(
|
|
9202
9202
|
"p",
|
|
9203
9203
|
{
|
|
9204
9204
|
"data-testid": "offer-card-people-count",
|
|
9205
|
-
className:
|
|
9205
|
+
className: L("text-sm text-gray-600 flex items-center mt-2", y.peopleCount),
|
|
9206
9206
|
children: [
|
|
9207
9207
|
/* @__PURE__ */ u(
|
|
9208
9208
|
Ie,
|
|
@@ -9218,16 +9218,16 @@ const sf = {
|
|
|
9218
9218
|
]
|
|
9219
9219
|
}
|
|
9220
9220
|
);
|
|
9221
|
-
},
|
|
9222
|
-
const fe =
|
|
9221
|
+
}, R = () => {
|
|
9222
|
+
const fe = w === 0 || a, ke = $ || a;
|
|
9223
9223
|
return l?.renderQuantitySelector ? l.renderQuantitySelector({
|
|
9224
|
-
quantity:
|
|
9224
|
+
quantity: w,
|
|
9225
9225
|
onIncrement: () => T(1),
|
|
9226
9226
|
onDecrement: () => T(-1),
|
|
9227
9227
|
isDecrementDisabled: fe,
|
|
9228
9228
|
isIncrementDisabled: ke,
|
|
9229
9229
|
isDisabled: a
|
|
9230
|
-
}) : /* @__PURE__ */ A("div", { className:
|
|
9230
|
+
}) : /* @__PURE__ */ A("div", { className: L("flex items-center gap-2", y.quantitySelector), children: [
|
|
9231
9231
|
/* @__PURE__ */ u(
|
|
9232
9232
|
oe,
|
|
9233
9233
|
{
|
|
@@ -9235,7 +9235,7 @@ const sf = {
|
|
|
9235
9235
|
onPress: () => T(-1),
|
|
9236
9236
|
isDisabled: fe,
|
|
9237
9237
|
variant: c,
|
|
9238
|
-
color:
|
|
9238
|
+
color: w > 0 ? k : d,
|
|
9239
9239
|
radius: "full",
|
|
9240
9240
|
isIconOnly: !0,
|
|
9241
9241
|
size: "sm",
|
|
@@ -9243,7 +9243,7 @@ const sf = {
|
|
|
9243
9243
|
children: /* @__PURE__ */ u(Ie, { icon: "gravity-ui:minus", width: 16 })
|
|
9244
9244
|
}
|
|
9245
9245
|
),
|
|
9246
|
-
/* @__PURE__ */ u("span", { "data-testid": "offer-card-quantity", className:
|
|
9246
|
+
/* @__PURE__ */ u("span", { "data-testid": "offer-card-quantity", className: L("min-w-[2rem] text-center font-medium"), children: w }),
|
|
9247
9247
|
/* @__PURE__ */ u(
|
|
9248
9248
|
oe,
|
|
9249
9249
|
{
|
|
@@ -9251,7 +9251,7 @@ const sf = {
|
|
|
9251
9251
|
onPress: () => T(1),
|
|
9252
9252
|
isDisabled: ke,
|
|
9253
9253
|
variant: c,
|
|
9254
|
-
color:
|
|
9254
|
+
color: w > 0 ? k : d,
|
|
9255
9255
|
radius: "full",
|
|
9256
9256
|
isIconOnly: !0,
|
|
9257
9257
|
size: "sm",
|
|
@@ -9260,16 +9260,16 @@ const sf = {
|
|
|
9260
9260
|
}
|
|
9261
9261
|
)
|
|
9262
9262
|
] });
|
|
9263
|
-
},
|
|
9263
|
+
}, H = () => l?.renderSoldOut ? l.renderSoldOut(S.soldOut) : /* @__PURE__ */ u(
|
|
9264
9264
|
gi,
|
|
9265
9265
|
{
|
|
9266
9266
|
"data-testid": "offer-card-sold-out-chip",
|
|
9267
9267
|
color: "danger",
|
|
9268
|
-
className:
|
|
9268
|
+
className: L("gap-2 px-4 h-8", y.soldOut),
|
|
9269
9269
|
startContent: /* @__PURE__ */ u(Ie, { icon: "gravity-ui:circle-info-fill", width: 14 }),
|
|
9270
|
-
children: /* @__PURE__ */ u("span", { className: "font-medium text-sm", children:
|
|
9270
|
+
children: /* @__PURE__ */ u("span", { className: "font-medium text-sm", children: S.soldOut })
|
|
9271
9271
|
}
|
|
9272
|
-
),
|
|
9272
|
+
), Q = () => l?.renderMaxReachedAlert ? l.renderMaxReachedAlert(S.maxReached) : /* @__PURE__ */ u(
|
|
9273
9273
|
gi,
|
|
9274
9274
|
{
|
|
9275
9275
|
"data-testid": "offer-card-max-reached-chip",
|
|
@@ -9279,30 +9279,30 @@ const sf = {
|
|
|
9279
9279
|
base: "gap-2 px-4 h-10",
|
|
9280
9280
|
content: "text-black"
|
|
9281
9281
|
},
|
|
9282
|
-
className:
|
|
9282
|
+
className: L(" text-black! gap-2 px-4 h-10", y.maxReachedAlert),
|
|
9283
9283
|
startContent: /* @__PURE__ */ u(Ie, { icon: "gravity-ui:triangle-exclamation-fill", className: "text-black", width: 16 }),
|
|
9284
|
-
children: /* @__PURE__ */ u("span", { className: "font-medium text-sm", children:
|
|
9284
|
+
children: /* @__PURE__ */ u("span", { className: "font-medium text-sm", children: S.maxReached })
|
|
9285
9285
|
}
|
|
9286
9286
|
), W = /* @__PURE__ */ A("div", { className: "grid grid-cols-1 md:grid-cols-1 xl:grid-cols-3 lg:grid-cols-3 gap-2 items-start", children: [
|
|
9287
|
-
/* @__PURE__ */ A("div", { className:
|
|
9287
|
+
/* @__PURE__ */ A("div", { className: L("h-full col-span-2", N ? "opacity-50 pointer-events-none select-none" : ""), children: [
|
|
9288
9288
|
U(),
|
|
9289
|
-
|
|
9289
|
+
V(),
|
|
9290
9290
|
/* @__PURE__ */ A(
|
|
9291
9291
|
"div",
|
|
9292
9292
|
{
|
|
9293
|
-
className:
|
|
9293
|
+
className: L(
|
|
9294
9294
|
"md:col-span-1 xl:col-span-2 lg:col-span-1 mb-2",
|
|
9295
|
-
|
|
9295
|
+
N ? "opacity-50 pointer-events-none select-none" : ""
|
|
9296
9296
|
),
|
|
9297
9297
|
children: [
|
|
9298
|
-
|
|
9299
|
-
|
|
9298
|
+
P(),
|
|
9299
|
+
M()
|
|
9300
9300
|
]
|
|
9301
9301
|
}
|
|
9302
9302
|
)
|
|
9303
9303
|
] }),
|
|
9304
|
-
/* @__PURE__ */ u("div", { className: "space-x-2 pt-0 pb-2 md:p-2 h-full flex items-center justify-start md:justify-start lg:justify-end", children:
|
|
9305
|
-
] }), xe =
|
|
9304
|
+
/* @__PURE__ */ u("div", { className: "space-x-2 pt-0 pb-2 md:p-2 h-full flex items-center justify-start md:justify-start lg:justify-end", children: N ? H() : R() })
|
|
9305
|
+
] }), xe = $ && !N && /* @__PURE__ */ u(
|
|
9306
9306
|
hr.div,
|
|
9307
9307
|
{
|
|
9308
9308
|
className: "w-full sm:max-w-[60%] md:max-w-[60%] lg:max-w-[60%]",
|
|
@@ -9310,15 +9310,15 @@ const sf = {
|
|
|
9310
9310
|
animate: { opacity: 1, y: 0 },
|
|
9311
9311
|
exit: { opacity: 0, y: 10 },
|
|
9312
9312
|
transition: { duration: 0.3 },
|
|
9313
|
-
children:
|
|
9313
|
+
children: Q()
|
|
9314
9314
|
}
|
|
9315
9315
|
);
|
|
9316
|
-
return f ? /* @__PURE__ */ A(Ee, { className:
|
|
9317
|
-
/* @__PURE__ */ u(Le, { className:
|
|
9318
|
-
/* @__PURE__ */ u(pr, { children: xe && /* @__PURE__ */ u(kl, { className:
|
|
9319
|
-
] }) : /* @__PURE__ */ A("div", { className:
|
|
9320
|
-
/* @__PURE__ */ u("div", { className:
|
|
9321
|
-
/* @__PURE__ */ u(pr, { children: xe && /* @__PURE__ */ u("div", { className:
|
|
9316
|
+
return f ? /* @__PURE__ */ A(Ee, { className: L("w-full", y.base), "data-testid": b || `offer-card-${t.id}`, children: [
|
|
9317
|
+
/* @__PURE__ */ u(Le, { className: L("pt-1 pb-0", y.body), children: W }),
|
|
9318
|
+
/* @__PURE__ */ u(pr, { children: xe && /* @__PURE__ */ u(kl, { className: L("w-full mt-0 pt-0", y.footer), children: xe }) })
|
|
9319
|
+
] }) : /* @__PURE__ */ A("div", { className: L("w-full", y.base), "data-testid": b || `offer-card-${t.id}`, children: [
|
|
9320
|
+
/* @__PURE__ */ u("div", { className: L("pt-1 pb-0", y.body), children: W }),
|
|
9321
|
+
/* @__PURE__ */ u(pr, { children: xe && /* @__PURE__ */ u("div", { className: L("w-full mt-0 pt-0", y.footer), children: xe }) })
|
|
9322
9322
|
] });
|
|
9323
9323
|
};
|
|
9324
9324
|
Go.displayName = "OfferCard";
|
|
@@ -9332,13 +9332,13 @@ const of = ({
|
|
|
9332
9332
|
}) => {
|
|
9333
9333
|
if (s) {
|
|
9334
9334
|
const l = s();
|
|
9335
|
-
return r ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-empty", className:
|
|
9335
|
+
return r ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-empty", className: L("w-full", i.base), children: /* @__PURE__ */ u(Le, { "data-testid": "offer-card-empty-body", children: l }) }) : /* @__PURE__ */ u("div", { "data-testid": "offer-card-empty", className: L("w-full", i.base), children: l });
|
|
9336
9336
|
}
|
|
9337
9337
|
const o = /* @__PURE__ */ A(
|
|
9338
9338
|
"div",
|
|
9339
9339
|
{
|
|
9340
9340
|
"data-testid": "offer-card-empty-content",
|
|
9341
|
-
className:
|
|
9341
|
+
className: L(
|
|
9342
9342
|
"flex flex-col items-center justify-center p-8 text-center text-gray-500",
|
|
9343
9343
|
i.content
|
|
9344
9344
|
),
|
|
@@ -9349,14 +9349,14 @@ const of = ({
|
|
|
9349
9349
|
"data-testid": "offer-card-empty-icon",
|
|
9350
9350
|
icon: e,
|
|
9351
9351
|
width: n,
|
|
9352
|
-
className:
|
|
9352
|
+
className: L("mb-4", i.icon)
|
|
9353
9353
|
}
|
|
9354
9354
|
),
|
|
9355
|
-
/* @__PURE__ */ u("h3", { "data-testid": "offer-card-empty-message", className:
|
|
9355
|
+
/* @__PURE__ */ u("h3", { "data-testid": "offer-card-empty-message", className: L("text-lg", i.message), children: t })
|
|
9356
9356
|
]
|
|
9357
9357
|
}
|
|
9358
9358
|
);
|
|
9359
|
-
return r ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-empty", className:
|
|
9359
|
+
return r ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-empty", className: L("w-full", i.base), children: /* @__PURE__ */ u(Le, { "data-testid": "offer-card-empty-body", children: o }) }) : /* @__PURE__ */ u("div", { "data-testid": "offer-card-empty", className: L("w-full", i.base), children: o });
|
|
9360
9360
|
};
|
|
9361
9361
|
of.displayName = "OfferCardEmpty";
|
|
9362
9362
|
const lf = {
|
|
@@ -9379,7 +9379,7 @@ const lf = {
|
|
|
9379
9379
|
className: i.alert
|
|
9380
9380
|
}
|
|
9381
9381
|
);
|
|
9382
|
-
return n ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-error", className:
|
|
9382
|
+
return n ? /* @__PURE__ */ u(Ee, { "data-testid": "offer-card-error", className: L("w-full", i.base), children: /* @__PURE__ */ u(Le, { "data-testid": "offer-card-error-body", children: o }) }) : /* @__PURE__ */ u("div", { "data-testid": "offer-card-error", className: L("w-full", i.base), children: o });
|
|
9383
9383
|
};
|
|
9384
9384
|
af.displayName = "OfferCardError";
|
|
9385
9385
|
const cf = {
|
|
@@ -9391,11 +9391,11 @@ const cf = {
|
|
|
9391
9391
|
6: "space-y-6"
|
|
9392
9392
|
}, uf = ({ quantity: t = 2, gap: e = 4, classNames: n = {} }) => {
|
|
9393
9393
|
const r = cf[e];
|
|
9394
|
-
return /* @__PURE__ */ u("div", { "data-testid": "offer-card-skeleton-container", className:
|
|
9394
|
+
return /* @__PURE__ */ u("div", { "data-testid": "offer-card-skeleton-container", className: L(r, n.base), children: Array.from({ length: t }).map((i, s) => /* @__PURE__ */ A(
|
|
9395
9395
|
Ee,
|
|
9396
9396
|
{
|
|
9397
9397
|
"data-testid": `offer-card-skeleton-${s}`,
|
|
9398
|
-
className:
|
|
9398
|
+
className: L("w-full", n.card),
|
|
9399
9399
|
children: [
|
|
9400
9400
|
/* @__PURE__ */ u(
|
|
9401
9401
|
Fs,
|
|
@@ -9527,26 +9527,26 @@ const df = {
|
|
|
9527
9527
|
isDisabled: c = !1,
|
|
9528
9528
|
buttonVariant: d = "bordered",
|
|
9529
9529
|
buttonColor: f = "default",
|
|
9530
|
-
showCard:
|
|
9530
|
+
showCard: h = !0,
|
|
9531
9531
|
animated: m = !0,
|
|
9532
9532
|
gap: v = 2,
|
|
9533
|
-
classNames:
|
|
9533
|
+
classNames: y = {}
|
|
9534
9534
|
}) => {
|
|
9535
|
-
const [
|
|
9536
|
-
(
|
|
9535
|
+
const [b, k] = J(n), S = e !== void 0 ? e : b, I = ce(
|
|
9536
|
+
($, _) => {
|
|
9537
9537
|
const U = {
|
|
9538
|
-
...
|
|
9539
|
-
[
|
|
9538
|
+
...S,
|
|
9539
|
+
[$]: Math.max(0, _)
|
|
9540
9540
|
};
|
|
9541
|
-
e === void 0 &&
|
|
9541
|
+
e === void 0 && k(U), r?.(U), i?.($, U[$]);
|
|
9542
9542
|
},
|
|
9543
|
-
[
|
|
9544
|
-
),
|
|
9543
|
+
[S, e, r, i]
|
|
9544
|
+
), C = [...t].sort(($, _) => ($.position ?? 0) - (_.position ?? 0)), w = hf[v], T = L("grid mx-auto pt-2", w, y.base), N = ($) => /* @__PURE__ */ u(
|
|
9545
9545
|
Go,
|
|
9546
9546
|
{
|
|
9547
|
-
offer:
|
|
9548
|
-
quantity:
|
|
9549
|
-
onQuantityChange:
|
|
9547
|
+
offer: $,
|
|
9548
|
+
quantity: S[$.id] || 0,
|
|
9549
|
+
onQuantityChange: I,
|
|
9550
9550
|
currency: s,
|
|
9551
9551
|
locale: o,
|
|
9552
9552
|
labels: l,
|
|
@@ -9554,10 +9554,10 @@ const df = {
|
|
|
9554
9554
|
isDisabled: c,
|
|
9555
9555
|
buttonVariant: d,
|
|
9556
9556
|
buttonColor: f,
|
|
9557
|
-
showCard:
|
|
9558
|
-
classNames:
|
|
9557
|
+
showCard: h,
|
|
9558
|
+
classNames: y.card
|
|
9559
9559
|
},
|
|
9560
|
-
|
|
9560
|
+
$.id
|
|
9561
9561
|
);
|
|
9562
9562
|
return m ? /* @__PURE__ */ u(
|
|
9563
9563
|
hr.div,
|
|
@@ -9567,25 +9567,25 @@ const df = {
|
|
|
9567
9567
|
variants: df,
|
|
9568
9568
|
initial: "hidden",
|
|
9569
9569
|
animate: "show",
|
|
9570
|
-
children: /* @__PURE__ */ u(pr, { children:
|
|
9570
|
+
children: /* @__PURE__ */ u(pr, { children: C.map(($) => /* @__PURE__ */ u(
|
|
9571
9571
|
hr.div,
|
|
9572
9572
|
{
|
|
9573
|
-
"data-testid": `offer-card-list-item-${
|
|
9574
|
-
className:
|
|
9573
|
+
"data-testid": `offer-card-list-item-${$.id}`,
|
|
9574
|
+
className: y.cardWrapper,
|
|
9575
9575
|
variants: ff,
|
|
9576
9576
|
exit: { opacity: 0, y: -20 },
|
|
9577
9577
|
transition: { duration: 0.3 },
|
|
9578
|
-
children:
|
|
9578
|
+
children: N($)
|
|
9579
9579
|
},
|
|
9580
|
-
|
|
9580
|
+
$.id
|
|
9581
9581
|
)) })
|
|
9582
9582
|
}
|
|
9583
|
-
) : /* @__PURE__ */ u("div", { "data-testid": "offer-card-list", className: T, children:
|
|
9583
|
+
) : /* @__PURE__ */ u("div", { "data-testid": "offer-card-list", className: T, children: C.map(N) });
|
|
9584
9584
|
};
|
|
9585
9585
|
pf.displayName = "OfferCardList";
|
|
9586
|
-
var on = (t) => t.type === "checkbox",
|
|
9586
|
+
var on = (t) => t.type === "checkbox", mt = (t) => t instanceof Date, Ne = (t) => t == null;
|
|
9587
9587
|
const Zo = (t) => typeof t == "object";
|
|
9588
|
-
var de = (t) => !Ne(t) && !Array.isArray(t) && Zo(t) && !
|
|
9588
|
+
var de = (t) => !Ne(t) && !Array.isArray(t) && Zo(t) && !mt(t), Qo = (t) => de(t) && t.target ? on(t.target) ? t.target.checked : t.target.value : t, mf = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, Yo = (t, e) => t.has(mf(e)), gf = (t) => {
|
|
9589
9589
|
const e = t.constructor && t.constructor.prototype;
|
|
9590
9590
|
return de(e) && e.hasOwnProperty("isPrototypeOf");
|
|
9591
9591
|
}, ei = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -9687,7 +9687,7 @@ var De = (t) => typeof t == "string", Dr = (t, e, n, r, i) => De(t) ? (r && e.wa
|
|
|
9687
9687
|
function ze(t, e, n = /* @__PURE__ */ new WeakSet()) {
|
|
9688
9688
|
if (Lr(t) || Lr(e))
|
|
9689
9689
|
return Object.is(t, e);
|
|
9690
|
-
if (
|
|
9690
|
+
if (mt(t) && mt(e))
|
|
9691
9691
|
return Object.is(t.getTime(), e.getTime());
|
|
9692
9692
|
const r = Object.keys(t), i = Object.keys(e);
|
|
9693
9693
|
if (r.length !== i.length)
|
|
@@ -9701,48 +9701,48 @@ function ze(t, e, n = /* @__PURE__ */ new WeakSet()) {
|
|
|
9701
9701
|
return !1;
|
|
9702
9702
|
if (s !== "ref") {
|
|
9703
9703
|
const l = e[s];
|
|
9704
|
-
if (
|
|
9704
|
+
if (mt(o) && mt(l) || de(o) && de(l) || Array.isArray(o) && Array.isArray(l) ? !ze(o, l, n) : !Object.is(o, l))
|
|
9705
9705
|
return !1;
|
|
9706
9706
|
}
|
|
9707
9707
|
}
|
|
9708
9708
|
return !0;
|
|
9709
9709
|
}
|
|
9710
9710
|
function bf(t) {
|
|
9711
|
-
const e = ri(), { control: n = e, name: r, defaultValue: i, disabled: s, exact: o, compute: l } = t || {}, a = B.useRef(i), c = B.useRef(l), d = B.useRef(void 0), f = B.useRef(n),
|
|
9711
|
+
const e = ri(), { control: n = e, name: r, defaultValue: i, disabled: s, exact: o, compute: l } = t || {}, a = B.useRef(i), c = B.useRef(l), d = B.useRef(void 0), f = B.useRef(n), h = B.useRef(r);
|
|
9712
9712
|
c.current = l;
|
|
9713
9713
|
const [m, v] = B.useState(() => {
|
|
9714
|
-
const
|
|
9715
|
-
return c.current ? c.current(
|
|
9716
|
-
}),
|
|
9717
|
-
const
|
|
9718
|
-
return c.current ? c.current(
|
|
9719
|
-
}, [n._formValues, n._names, r]),
|
|
9714
|
+
const C = n._getWatch(r, a.current);
|
|
9715
|
+
return c.current ? c.current(C) : C;
|
|
9716
|
+
}), y = B.useCallback((C) => {
|
|
9717
|
+
const w = Dr(r, n._names, C || n._formValues, !1, a.current);
|
|
9718
|
+
return c.current ? c.current(w) : w;
|
|
9719
|
+
}, [n._formValues, n._names, r]), b = B.useCallback((C) => {
|
|
9720
9720
|
if (!s) {
|
|
9721
|
-
const
|
|
9721
|
+
const w = Dr(r, n._names, C || n._formValues, !1, a.current);
|
|
9722
9722
|
if (c.current) {
|
|
9723
|
-
const T = c.current(
|
|
9723
|
+
const T = c.current(w);
|
|
9724
9724
|
ze(T, d.current) || (v(T), d.current = T);
|
|
9725
9725
|
} else
|
|
9726
|
-
v(
|
|
9726
|
+
v(w);
|
|
9727
9727
|
}
|
|
9728
9728
|
}, [n._formValues, n._names, s, r]);
|
|
9729
|
-
ii(() => ((f.current !== n || !ze(
|
|
9729
|
+
ii(() => ((f.current !== n || !ze(h.current, r)) && (f.current = n, h.current = r, b()), n._subscribe({
|
|
9730
9730
|
name: r,
|
|
9731
9731
|
formState: {
|
|
9732
9732
|
values: !0
|
|
9733
9733
|
},
|
|
9734
9734
|
exact: o,
|
|
9735
|
-
callback: (
|
|
9736
|
-
|
|
9735
|
+
callback: (C) => {
|
|
9736
|
+
b(C.values);
|
|
9737
9737
|
}
|
|
9738
|
-
})), [n, o, r,
|
|
9739
|
-
const
|
|
9738
|
+
})), [n, o, r, b]), B.useEffect(() => n._removeUnmounted());
|
|
9739
|
+
const k = f.current !== n, S = h.current, I = B.useMemo(() => {
|
|
9740
9740
|
if (s)
|
|
9741
9741
|
return null;
|
|
9742
|
-
const
|
|
9743
|
-
return
|
|
9744
|
-
}, [s,
|
|
9745
|
-
return
|
|
9742
|
+
const C = !k && !ze(S, r);
|
|
9743
|
+
return k || C ? y() : null;
|
|
9744
|
+
}, [s, k, r, S, y]);
|
|
9745
|
+
return I !== null ? I : m;
|
|
9746
9746
|
}
|
|
9747
9747
|
function xf(t) {
|
|
9748
9748
|
const e = ri(), { name: n, disabled: r, control: i = e, shouldUnregister: s, defaultValue: o, exact: l = !0 } = t, a = Yo(i._names.array, n), c = B.useMemo(() => D(i._formValues, n, D(i._defaultValues, n, o)), [i, n, o]), d = bf({
|
|
@@ -9754,13 +9754,13 @@ function xf(t) {
|
|
|
9754
9754
|
control: i,
|
|
9755
9755
|
name: n,
|
|
9756
9756
|
exact: l
|
|
9757
|
-
}),
|
|
9757
|
+
}), h = B.useRef(t), m = B.useRef(void 0), v = B.useRef(i.register(n, {
|
|
9758
9758
|
...t.rules,
|
|
9759
9759
|
value: d,
|
|
9760
9760
|
...Me(t.disabled) ? { disabled: t.disabled } : {}
|
|
9761
9761
|
}));
|
|
9762
|
-
|
|
9763
|
-
const
|
|
9762
|
+
h.current = t;
|
|
9763
|
+
const y = B.useMemo(() => Object.defineProperties({}, {
|
|
9764
9764
|
invalid: {
|
|
9765
9765
|
enumerable: !0,
|
|
9766
9766
|
get: () => !!D(f.errors, n)
|
|
@@ -9781,50 +9781,50 @@ function xf(t) {
|
|
|
9781
9781
|
enumerable: !0,
|
|
9782
9782
|
get: () => D(f.errors, n)
|
|
9783
9783
|
}
|
|
9784
|
-
}), [f, n]),
|
|
9784
|
+
}), [f, n]), b = B.useCallback((C) => v.current.onChange({
|
|
9785
9785
|
target: {
|
|
9786
|
-
value: Qo(
|
|
9786
|
+
value: Qo(C),
|
|
9787
9787
|
name: n
|
|
9788
9788
|
},
|
|
9789
9789
|
type: Tn.CHANGE
|
|
9790
|
-
}), [n]),
|
|
9790
|
+
}), [n]), k = B.useCallback(() => v.current.onBlur({
|
|
9791
9791
|
target: {
|
|
9792
9792
|
value: D(i._formValues, n),
|
|
9793
9793
|
name: n
|
|
9794
9794
|
},
|
|
9795
9795
|
type: Tn.BLUR
|
|
9796
|
-
}), [n, i._formValues]),
|
|
9797
|
-
const
|
|
9798
|
-
|
|
9799
|
-
focus: () => we(
|
|
9800
|
-
select: () => we(
|
|
9801
|
-
setCustomValidity: (T) => we(
|
|
9802
|
-
reportValidity: () => we(
|
|
9796
|
+
}), [n, i._formValues]), S = B.useCallback((C) => {
|
|
9797
|
+
const w = D(i._fields, n);
|
|
9798
|
+
w && w._f && C && (w._f.ref = {
|
|
9799
|
+
focus: () => we(C.focus) && C.focus(),
|
|
9800
|
+
select: () => we(C.select) && C.select(),
|
|
9801
|
+
setCustomValidity: (T) => we(C.setCustomValidity) && C.setCustomValidity(T),
|
|
9802
|
+
reportValidity: () => we(C.reportValidity) && C.reportValidity()
|
|
9803
9803
|
});
|
|
9804
|
-
}, [i._fields, n]),
|
|
9804
|
+
}, [i._fields, n]), I = B.useMemo(() => ({
|
|
9805
9805
|
name: n,
|
|
9806
9806
|
value: d,
|
|
9807
9807
|
...Me(r) || f.disabled ? { disabled: f.disabled || r } : {},
|
|
9808
|
-
onChange:
|
|
9809
|
-
onBlur:
|
|
9810
|
-
ref:
|
|
9811
|
-
}), [n, r, f.disabled,
|
|
9808
|
+
onChange: b,
|
|
9809
|
+
onBlur: k,
|
|
9810
|
+
ref: S
|
|
9811
|
+
}), [n, r, f.disabled, b, k, S, d]);
|
|
9812
9812
|
return B.useEffect(() => {
|
|
9813
|
-
const
|
|
9814
|
-
|
|
9815
|
-
...
|
|
9816
|
-
...Me(
|
|
9813
|
+
const C = i._options.shouldUnregister || s, w = m.current;
|
|
9814
|
+
w && w !== n && !a && i.unregister(w), i.register(n, {
|
|
9815
|
+
...h.current.rules,
|
|
9816
|
+
...Me(h.current.disabled) ? { disabled: h.current.disabled } : {}
|
|
9817
9817
|
});
|
|
9818
|
-
const T = (
|
|
9819
|
-
const
|
|
9820
|
-
|
|
9818
|
+
const T = (N, $) => {
|
|
9819
|
+
const _ = D(i._fields, N);
|
|
9820
|
+
_ && _._f && (_._f.mount = $);
|
|
9821
9821
|
};
|
|
9822
|
-
if (T(n, !0),
|
|
9823
|
-
const
|
|
9824
|
-
ee(i._defaultValues, n,
|
|
9822
|
+
if (T(n, !0), C) {
|
|
9823
|
+
const N = le(D(i._options.defaultValues, n, h.current.defaultValue));
|
|
9824
|
+
ee(i._defaultValues, n, N), re(D(i._formValues, n)) && ee(i._formValues, n, N);
|
|
9825
9825
|
}
|
|
9826
9826
|
return !a && i.register(n), m.current = n, () => {
|
|
9827
|
-
(a ?
|
|
9827
|
+
(a ? C && !i._state.action : C) ? i.unregister(n) : T(n, !1);
|
|
9828
9828
|
};
|
|
9829
9829
|
}, [n, i, a, s]), B.useEffect(() => {
|
|
9830
9830
|
i._setDisabledField({
|
|
@@ -9832,10 +9832,10 @@ function xf(t) {
|
|
|
9832
9832
|
name: n
|
|
9833
9833
|
});
|
|
9834
9834
|
}, [r, n, i]), B.useMemo(() => ({
|
|
9835
|
-
field:
|
|
9835
|
+
field: I,
|
|
9836
9836
|
formState: f,
|
|
9837
|
-
fieldState:
|
|
9838
|
-
}), [
|
|
9837
|
+
fieldState: y
|
|
9838
|
+
}), [I, f, y]);
|
|
9839
9839
|
}
|
|
9840
9840
|
const kf = B.createContext(null);
|
|
9841
9841
|
kf.displayName = "HookFormContext";
|
|
@@ -10044,85 +10044,85 @@ var Ct = (t) => de(t) && !On(t) ? t : {
|
|
|
10044
10044
|
value: t,
|
|
10045
10045
|
message: ""
|
|
10046
10046
|
}, ws = async (t, e, n, r, i, s) => {
|
|
10047
|
-
const { ref: o, refs: l, required: a, maxLength: c, minLength: d, min: f, max:
|
|
10048
|
-
if (!
|
|
10047
|
+
const { ref: o, refs: l, required: a, maxLength: c, minLength: d, min: f, max: h, pattern: m, validate: v, name: y, valueAsNumber: b, mount: k } = t._f, S = D(n, y);
|
|
10048
|
+
if (!k || e.has(y))
|
|
10049
10049
|
return {};
|
|
10050
|
-
const
|
|
10051
|
-
i &&
|
|
10052
|
-
},
|
|
10053
|
-
const W =
|
|
10054
|
-
|
|
10055
|
-
type:
|
|
10050
|
+
const I = l ? l[0] : o, C = (M) => {
|
|
10051
|
+
i && I.reportValidity && (I.setCustomValidity(Me(M) ? "" : M || ""), I.reportValidity());
|
|
10052
|
+
}, w = {}, T = oi(o), N = on(o), $ = T || N, _ = (b || si(o)) && re(o.value) && re(S) || Mn(o) && o.value === "" || S === "" || Array.isArray(S) && !S.length, U = vf.bind(null, y, r, w), V = (M, P, R, H = We.maxLength, Q = We.minLength) => {
|
|
10053
|
+
const W = M ? P : R;
|
|
10054
|
+
w[y] = {
|
|
10055
|
+
type: M ? H : Q,
|
|
10056
10056
|
message: W,
|
|
10057
10057
|
ref: o,
|
|
10058
|
-
...U(
|
|
10058
|
+
...U(M ? H : Q, W)
|
|
10059
10059
|
};
|
|
10060
10060
|
};
|
|
10061
|
-
if (s ? !Array.isArray(
|
|
10062
|
-
const { value:
|
|
10063
|
-
if (
|
|
10061
|
+
if (s ? !Array.isArray(S) || !S.length : a && (!$ && (_ || Ne(S)) || Me(S) && !S || N && !il(l).isValid || T && !ol(l).isValid)) {
|
|
10062
|
+
const { value: M, message: P } = De(a) ? { value: !!a, message: a } : Ct(a);
|
|
10063
|
+
if (M && (w[y] = {
|
|
10064
10064
|
type: We.required,
|
|
10065
|
-
message:
|
|
10066
|
-
ref:
|
|
10067
|
-
...U(We.required,
|
|
10065
|
+
message: P,
|
|
10066
|
+
ref: I,
|
|
10067
|
+
...U(We.required, P)
|
|
10068
10068
|
}, !r))
|
|
10069
|
-
return
|
|
10070
|
-
}
|
|
10071
|
-
if (!
|
|
10072
|
-
let
|
|
10073
|
-
const
|
|
10074
|
-
if (!Ne(
|
|
10075
|
-
const
|
|
10076
|
-
Ne(
|
|
10069
|
+
return C(P), w;
|
|
10070
|
+
}
|
|
10071
|
+
if (!_ && (!Ne(f) || !Ne(h))) {
|
|
10072
|
+
let M, P;
|
|
10073
|
+
const R = Ct(h), H = Ct(f);
|
|
10074
|
+
if (!Ne(S) && !isNaN(S)) {
|
|
10075
|
+
const Q = o.valueAsNumber || S && +S;
|
|
10076
|
+
Ne(R.value) || (M = Q > R.value), Ne(H.value) || (P = Q < H.value);
|
|
10077
10077
|
} else {
|
|
10078
|
-
const
|
|
10079
|
-
De(
|
|
10078
|
+
const Q = o.valueAsDate || new Date(S), W = (ke) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ke), xe = o.type == "time", fe = o.type == "week";
|
|
10079
|
+
De(R.value) && S && (M = xe ? W(S) > W(R.value) : fe ? S > R.value : Q > new Date(R.value)), De(H.value) && S && (P = xe ? W(S) < W(H.value) : fe ? S < H.value : Q < new Date(H.value));
|
|
10080
10080
|
}
|
|
10081
|
-
if ((
|
|
10082
|
-
return
|
|
10081
|
+
if ((M || P) && (V(!!M, R.message, H.message, We.max, We.min), !r))
|
|
10082
|
+
return C(w[y].message), w;
|
|
10083
10083
|
}
|
|
10084
|
-
if ((c || d) && !
|
|
10085
|
-
const
|
|
10086
|
-
if ((
|
|
10087
|
-
return
|
|
10084
|
+
if ((c || d) && !_ && (De(S) || s && Array.isArray(S))) {
|
|
10085
|
+
const M = Ct(c), P = Ct(d), R = !Ne(M.value) && S.length > +M.value, H = !Ne(P.value) && S.length < +P.value;
|
|
10086
|
+
if ((R || H) && (V(R, M.message, P.message), !r))
|
|
10087
|
+
return C(w[y].message), w;
|
|
10088
10088
|
}
|
|
10089
|
-
if (m && !
|
|
10090
|
-
const { value:
|
|
10091
|
-
if (On(
|
|
10089
|
+
if (m && !_ && De(S)) {
|
|
10090
|
+
const { value: M, message: P } = Ct(m);
|
|
10091
|
+
if (On(M) && !S.match(M) && (w[y] = {
|
|
10092
10092
|
type: We.pattern,
|
|
10093
|
-
message:
|
|
10093
|
+
message: P,
|
|
10094
10094
|
ref: o,
|
|
10095
|
-
...U(We.pattern,
|
|
10095
|
+
...U(We.pattern, P)
|
|
10096
10096
|
}, !r))
|
|
10097
|
-
return
|
|
10097
|
+
return C(P), w;
|
|
10098
10098
|
}
|
|
10099
10099
|
if (v) {
|
|
10100
10100
|
if (we(v)) {
|
|
10101
|
-
const
|
|
10102
|
-
if (
|
|
10103
|
-
...
|
|
10104
|
-
...U(We.validate,
|
|
10101
|
+
const M = await v(S, n), P = Cs(M, I);
|
|
10102
|
+
if (P && (w[y] = {
|
|
10103
|
+
...P,
|
|
10104
|
+
...U(We.validate, P.message)
|
|
10105
10105
|
}, !r))
|
|
10106
|
-
return
|
|
10106
|
+
return C(P.message), w;
|
|
10107
10107
|
} else if (de(v)) {
|
|
10108
|
-
let
|
|
10109
|
-
for (const
|
|
10110
|
-
if (!Se(
|
|
10108
|
+
let M = {};
|
|
10109
|
+
for (const P in v) {
|
|
10110
|
+
if (!Se(M) && !r)
|
|
10111
10111
|
break;
|
|
10112
|
-
const
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
...U(
|
|
10116
|
-
},
|
|
10112
|
+
const R = Cs(await v[P](S, n), I, P);
|
|
10113
|
+
R && (M = {
|
|
10114
|
+
...R,
|
|
10115
|
+
...U(P, R.message)
|
|
10116
|
+
}, C(R.message), r && (w[y] = M));
|
|
10117
10117
|
}
|
|
10118
|
-
if (!Se(
|
|
10119
|
-
ref:
|
|
10120
|
-
...
|
|
10118
|
+
if (!Se(M) && (w[y] = {
|
|
10119
|
+
ref: I,
|
|
10120
|
+
...M
|
|
10121
10121
|
}, !r))
|
|
10122
|
-
return
|
|
10122
|
+
return w;
|
|
10123
10123
|
}
|
|
10124
10124
|
}
|
|
10125
|
-
return
|
|
10125
|
+
return C(!0), w;
|
|
10126
10126
|
};
|
|
10127
10127
|
const Ff = {
|
|
10128
10128
|
mode: Ve.onSubmit,
|
|
@@ -10171,294 +10171,294 @@ function Pf(t = {}) {
|
|
|
10171
10171
|
}, f = {
|
|
10172
10172
|
...d
|
|
10173
10173
|
};
|
|
10174
|
-
let
|
|
10174
|
+
let h = {
|
|
10175
10175
|
...f
|
|
10176
10176
|
};
|
|
10177
10177
|
const m = {
|
|
10178
10178
|
array: ps(),
|
|
10179
10179
|
state: ps()
|
|
10180
|
-
}, v = e.criteriaMode === Ve.all,
|
|
10181
|
-
clearTimeout(c), c = setTimeout(
|
|
10182
|
-
},
|
|
10183
|
-
if (!o.keepIsValid && !e.disabled && (f.isValid ||
|
|
10180
|
+
}, v = e.criteriaMode === Ve.all, y = (p) => (g) => {
|
|
10181
|
+
clearTimeout(c), c = setTimeout(p, g);
|
|
10182
|
+
}, b = async (p) => {
|
|
10183
|
+
if (!o.keepIsValid && !e.disabled && (f.isValid || h.isValid || p)) {
|
|
10184
10184
|
let g;
|
|
10185
|
-
e.resolver ? (g = Se((await
|
|
10185
|
+
e.resolver ? (g = Se((await $()).errors), k()) : g = await U(r, !0), g !== n.isValid && m.state.next({
|
|
10186
10186
|
isValid: g
|
|
10187
10187
|
});
|
|
10188
10188
|
}
|
|
10189
|
-
},
|
|
10190
|
-
!e.disabled && (f.isValidating || f.validatingFields ||
|
|
10191
|
-
|
|
10189
|
+
}, k = (p, g) => {
|
|
10190
|
+
!e.disabled && (f.isValidating || f.validatingFields || h.isValidating || h.validatingFields) && ((p || Array.from(l.mount)).forEach((x) => {
|
|
10191
|
+
x && (g ? ee(n.validatingFields, x, g) : ae(n.validatingFields, x));
|
|
10192
10192
|
}), m.state.next({
|
|
10193
10193
|
validatingFields: n.validatingFields,
|
|
10194
10194
|
isValidating: !Se(n.validatingFields)
|
|
10195
10195
|
}));
|
|
10196
|
-
},
|
|
10197
|
-
if (
|
|
10198
|
-
if (o.action = !0, E && Array.isArray(D(r,
|
|
10199
|
-
const z =
|
|
10200
|
-
|
|
10196
|
+
}, S = (p, g = [], x, F, O = !0, E = !0) => {
|
|
10197
|
+
if (F && x && !e.disabled) {
|
|
10198
|
+
if (o.action = !0, E && Array.isArray(D(r, p))) {
|
|
10199
|
+
const z = x(D(r, p), F.argA, F.argB);
|
|
10200
|
+
O && ee(r, p, z);
|
|
10201
10201
|
}
|
|
10202
|
-
if (E && Array.isArray(D(n.errors,
|
|
10203
|
-
const z =
|
|
10204
|
-
|
|
10202
|
+
if (E && Array.isArray(D(n.errors, p))) {
|
|
10203
|
+
const z = x(D(n.errors, p), F.argA, F.argB);
|
|
10204
|
+
O && ee(n.errors, p, z), Df(n.errors, p);
|
|
10205
10205
|
}
|
|
10206
|
-
if ((f.touchedFields ||
|
|
10207
|
-
const z =
|
|
10208
|
-
|
|
10206
|
+
if ((f.touchedFields || h.touchedFields) && E && Array.isArray(D(n.touchedFields, p))) {
|
|
10207
|
+
const z = x(D(n.touchedFields, p), F.argA, F.argB);
|
|
10208
|
+
O && ee(n.touchedFields, p, z);
|
|
10209
10209
|
}
|
|
10210
|
-
(f.dirtyFields ||
|
|
10211
|
-
name:
|
|
10212
|
-
isDirty:
|
|
10210
|
+
(f.dirtyFields || h.dirtyFields) && (n.dirtyFields = Et(i, s)), m.state.next({
|
|
10211
|
+
name: p,
|
|
10212
|
+
isDirty: M(p, g),
|
|
10213
10213
|
dirtyFields: n.dirtyFields,
|
|
10214
10214
|
errors: n.errors,
|
|
10215
10215
|
isValid: n.isValid
|
|
10216
10216
|
});
|
|
10217
10217
|
} else
|
|
10218
|
-
ee(s,
|
|
10219
|
-
},
|
|
10220
|
-
ee(n.errors,
|
|
10218
|
+
ee(s, p, g);
|
|
10219
|
+
}, I = (p, g) => {
|
|
10220
|
+
ee(n.errors, p, g), m.state.next({
|
|
10221
10221
|
errors: n.errors
|
|
10222
10222
|
});
|
|
10223
|
-
},
|
|
10224
|
-
n.errors =
|
|
10223
|
+
}, C = (p) => {
|
|
10224
|
+
n.errors = p, m.state.next({
|
|
10225
10225
|
errors: n.errors,
|
|
10226
10226
|
isValid: !1
|
|
10227
10227
|
});
|
|
10228
|
-
},
|
|
10229
|
-
const
|
|
10230
|
-
if (
|
|
10231
|
-
const E = D(s,
|
|
10232
|
-
re(E) ||
|
|
10228
|
+
}, w = (p, g, x, F) => {
|
|
10229
|
+
const O = D(r, p);
|
|
10230
|
+
if (O) {
|
|
10231
|
+
const E = D(s, p, re(x) ? D(i, p) : x);
|
|
10232
|
+
re(E) || F && F.defaultChecked || g ? ee(s, p, g ? E : bs(O._f)) : H(p, E), o.mount && !o.action && b();
|
|
10233
10233
|
}
|
|
10234
|
-
}, T = (
|
|
10234
|
+
}, T = (p, g, x, F, O) => {
|
|
10235
10235
|
let E = !1, z = !1;
|
|
10236
10236
|
const G = {
|
|
10237
|
-
name:
|
|
10237
|
+
name: p
|
|
10238
10238
|
};
|
|
10239
10239
|
if (!e.disabled) {
|
|
10240
|
-
if (!
|
|
10241
|
-
(f.isDirty ||
|
|
10242
|
-
const Z = ze(D(i,
|
|
10243
|
-
z = !!D(n.dirtyFields,
|
|
10240
|
+
if (!x || F) {
|
|
10241
|
+
(f.isDirty || h.isDirty) && (z = n.isDirty, n.isDirty = G.isDirty = M(), E = z !== G.isDirty);
|
|
10242
|
+
const Z = ze(D(i, p), g);
|
|
10243
|
+
z = !!D(n.dirtyFields, p), Z ? ae(n.dirtyFields, p) : ee(n.dirtyFields, p, !0), G.dirtyFields = n.dirtyFields, E = E || (f.dirtyFields || h.dirtyFields) && z !== !Z;
|
|
10244
10244
|
}
|
|
10245
|
-
if (
|
|
10246
|
-
const Z = D(n.touchedFields,
|
|
10247
|
-
Z || (ee(n.touchedFields,
|
|
10245
|
+
if (x) {
|
|
10246
|
+
const Z = D(n.touchedFields, p);
|
|
10247
|
+
Z || (ee(n.touchedFields, p, x), G.touchedFields = n.touchedFields, E = E || (f.touchedFields || h.touchedFields) && Z !== x);
|
|
10248
10248
|
}
|
|
10249
|
-
E &&
|
|
10249
|
+
E && O && m.state.next(G);
|
|
10250
10250
|
}
|
|
10251
10251
|
return E ? G : {};
|
|
10252
|
-
},
|
|
10253
|
-
const
|
|
10254
|
-
if (e.delayError &&
|
|
10252
|
+
}, N = (p, g, x, F) => {
|
|
10253
|
+
const O = D(n.errors, p), E = (f.isValid || h.isValid) && Me(g) && n.isValid !== g;
|
|
10254
|
+
if (e.delayError && x ? (a = y(() => I(p, x)), a(e.delayError)) : (clearTimeout(c), a = null, x ? ee(n.errors, p, x) : ae(n.errors, p)), (x ? !ze(O, x) : O) || !Se(F) || E) {
|
|
10255
10255
|
const z = {
|
|
10256
|
-
...
|
|
10256
|
+
...F,
|
|
10257
10257
|
...E && Me(g) ? { isValid: g } : {},
|
|
10258
10258
|
errors: n.errors,
|
|
10259
|
-
name:
|
|
10259
|
+
name: p
|
|
10260
10260
|
};
|
|
10261
10261
|
n = {
|
|
10262
10262
|
...n,
|
|
10263
10263
|
...z
|
|
10264
10264
|
}, m.state.next(z);
|
|
10265
10265
|
}
|
|
10266
|
-
},
|
|
10267
|
-
const { errors: g } = await
|
|
10268
|
-
if (
|
|
10269
|
-
for (const
|
|
10270
|
-
const
|
|
10271
|
-
|
|
10266
|
+
}, $ = async (p) => (k(p, !0), await e.resolver(s, e.context, Nf(p || l.mount, r, e.criteriaMode, e.shouldUseNativeValidation))), _ = async (p) => {
|
|
10267
|
+
const { errors: g } = await $(p);
|
|
10268
|
+
if (k(p), p)
|
|
10269
|
+
for (const x of p) {
|
|
10270
|
+
const F = D(g, x);
|
|
10271
|
+
F ? ee(n.errors, x, F) : ae(n.errors, x);
|
|
10272
10272
|
}
|
|
10273
10273
|
else
|
|
10274
10274
|
n.errors = g;
|
|
10275
10275
|
return g;
|
|
10276
|
-
}, U = async (
|
|
10276
|
+
}, U = async (p, g, x = {
|
|
10277
10277
|
valid: !0
|
|
10278
10278
|
}) => {
|
|
10279
|
-
for (const
|
|
10280
|
-
const
|
|
10281
|
-
if (
|
|
10282
|
-
const { _f: E, ...z } =
|
|
10279
|
+
for (const F in p) {
|
|
10280
|
+
const O = p[F];
|
|
10281
|
+
if (O) {
|
|
10282
|
+
const { _f: E, ...z } = O;
|
|
10283
10283
|
if (E) {
|
|
10284
|
-
const G = l.array.has(E.name), Z =
|
|
10285
|
-
Z && f.validatingFields &&
|
|
10286
|
-
const ve = await ws(
|
|
10287
|
-
if (Z && f.validatingFields &&
|
|
10284
|
+
const G = l.array.has(E.name), Z = O._f && Ef(O._f);
|
|
10285
|
+
Z && f.validatingFields && k([E.name], !0);
|
|
10286
|
+
const ve = await ws(O, l.disabled, s, v, e.shouldUseNativeValidation && !g, G);
|
|
10287
|
+
if (Z && f.validatingFields && k([E.name]), ve[E.name] && (x.valid = !1, g || t.shouldUseNativeValidation))
|
|
10288
10288
|
break;
|
|
10289
10289
|
!g && (D(ve, E.name) ? G ? Lf(n.errors, ve, E.name) : ee(n.errors, E.name, ve[E.name]) : ae(n.errors, E.name));
|
|
10290
10290
|
}
|
|
10291
|
-
!Se(z) && await U(z, g,
|
|
10291
|
+
!Se(z) && await U(z, g, x);
|
|
10292
10292
|
}
|
|
10293
10293
|
}
|
|
10294
|
-
return
|
|
10295
|
-
},
|
|
10296
|
-
for (const
|
|
10297
|
-
const g = D(r,
|
|
10298
|
-
g && (g._f.refs ? g._f.refs.every((
|
|
10294
|
+
return x.valid;
|
|
10295
|
+
}, V = () => {
|
|
10296
|
+
for (const p of l.unMount) {
|
|
10297
|
+
const g = D(r, p);
|
|
10298
|
+
g && (g._f.refs ? g._f.refs.every((x) => !ar(x)) : !ar(g._f.ref)) && Bn(p);
|
|
10299
10299
|
}
|
|
10300
10300
|
l.unMount = /* @__PURE__ */ new Set();
|
|
10301
|
-
},
|
|
10302
|
-
...o.mount ? s : re(g) ? i : De(
|
|
10303
|
-
},
|
|
10304
|
-
const
|
|
10305
|
-
let
|
|
10306
|
-
if (
|
|
10307
|
-
const E =
|
|
10308
|
-
E && (!E.disabled && ee(s,
|
|
10309
|
-
(!z.defaultChecked || !z.disabled) && (Array.isArray(
|
|
10310
|
-
}) : E.refs.forEach((z) => z.checked = z.value ===
|
|
10311
|
-
name:
|
|
10301
|
+
}, M = (p, g) => !e.disabled && (p && g && ee(s, p, g), !ze(Ye(), i)), P = (p, g, x) => Dr(p, l, {
|
|
10302
|
+
...o.mount ? s : re(g) ? i : De(p) ? { [p]: g } : g
|
|
10303
|
+
}, x, g), R = (p) => ti(D(o.mount ? s : i, p, e.shouldUnregister ? D(i, p, []) : [])), H = (p, g, x = {}) => {
|
|
10304
|
+
const F = D(r, p);
|
|
10305
|
+
let O = g;
|
|
10306
|
+
if (F) {
|
|
10307
|
+
const E = F._f;
|
|
10308
|
+
E && (!E.disabled && ee(s, p, sl(g, E)), O = Mn(E.ref) && Ne(g) ? "" : g, nl(E.ref) ? [...E.ref.options].forEach((z) => z.selected = O.includes(z.value)) : E.refs ? on(E.ref) ? E.refs.forEach((z) => {
|
|
10309
|
+
(!z.defaultChecked || !z.disabled) && (Array.isArray(O) ? z.checked = !!O.find((G) => G === z.value) : z.checked = O === z.value || !!O);
|
|
10310
|
+
}) : E.refs.forEach((z) => z.checked = z.value === O) : si(E.ref) ? E.ref.value = "" : (E.ref.value = O, E.ref.type || m.state.next({
|
|
10311
|
+
name: p,
|
|
10312
10312
|
values: le(s)
|
|
10313
10313
|
})));
|
|
10314
10314
|
}
|
|
10315
|
-
(
|
|
10316
|
-
},
|
|
10317
|
-
for (const
|
|
10318
|
-
if (!g.hasOwnProperty(
|
|
10315
|
+
(x.shouldDirty || x.shouldTouch) && T(p, O, x.shouldTouch, x.shouldDirty, !0), x.shouldValidate && ke(p);
|
|
10316
|
+
}, Q = (p, g, x) => {
|
|
10317
|
+
for (const F in g) {
|
|
10318
|
+
if (!g.hasOwnProperty(F))
|
|
10319
10319
|
return;
|
|
10320
|
-
const
|
|
10321
|
-
(l.array.has(
|
|
10320
|
+
const O = g[F], E = p + "." + F, z = D(r, E);
|
|
10321
|
+
(l.array.has(p) || de(O) || z && !z._f) && !mt(O) ? Q(E, O, x) : H(E, O, x);
|
|
10322
10322
|
}
|
|
10323
|
-
}, W = (
|
|
10324
|
-
const
|
|
10325
|
-
ee(s,
|
|
10326
|
-
name:
|
|
10323
|
+
}, W = (p, g, x = {}) => {
|
|
10324
|
+
const F = D(r, p), O = l.array.has(p), E = le(g);
|
|
10325
|
+
ee(s, p, E), O ? (m.array.next({
|
|
10326
|
+
name: p,
|
|
10327
10327
|
values: le(s)
|
|
10328
|
-
}), (f.isDirty || f.dirtyFields ||
|
|
10329
|
-
name:
|
|
10328
|
+
}), (f.isDirty || f.dirtyFields || h.isDirty || h.dirtyFields) && x.shouldDirty && m.state.next({
|
|
10329
|
+
name: p,
|
|
10330
10330
|
dirtyFields: Et(i, s),
|
|
10331
|
-
isDirty:
|
|
10332
|
-
})) :
|
|
10331
|
+
isDirty: M(p, E)
|
|
10332
|
+
})) : F && !F._f && !Ne(E) ? Q(p, E, x) : H(p, E, x), vs(p, l) ? m.state.next({
|
|
10333
10333
|
...n,
|
|
10334
|
-
name:
|
|
10334
|
+
name: p,
|
|
10335
10335
|
values: le(s)
|
|
10336
10336
|
}) : m.state.next({
|
|
10337
|
-
name: o.mount ?
|
|
10337
|
+
name: o.mount ? p : void 0,
|
|
10338
10338
|
values: le(s)
|
|
10339
10339
|
});
|
|
10340
|
-
}, xe = async (
|
|
10340
|
+
}, xe = async (p) => {
|
|
10341
10341
|
o.mount = !0;
|
|
10342
|
-
const g =
|
|
10343
|
-
let
|
|
10344
|
-
const
|
|
10345
|
-
|
|
10342
|
+
const g = p.target;
|
|
10343
|
+
let x = g.name, F = !0;
|
|
10344
|
+
const O = D(r, x), E = (Z) => {
|
|
10345
|
+
F = Number.isNaN(Z) || mt(Z) && isNaN(Z.getTime()) || ze(Z, D(s, x, Z));
|
|
10346
10346
|
}, z = xs(e.mode), G = xs(e.reValidateMode);
|
|
10347
|
-
if (
|
|
10347
|
+
if (O) {
|
|
10348
10348
|
let Z, ve;
|
|
10349
|
-
const
|
|
10350
|
-
ee(s,
|
|
10351
|
-
const qn = T(
|
|
10349
|
+
const at = g.type ? bs(O._f) : Qo(p), Xe = p.type === Tn.BLUR || p.type === Tn.FOCUS_OUT, fl = !Tf(O._f) && !e.resolver && !D(n.errors, x) && !O._f.deps || If(Xe, D(n.touchedFields, x), n.isSubmitted, G, z), Un = vs(x, l, Xe);
|
|
10350
|
+
ee(s, x, at), Xe ? (!g || !g.readOnly) && (O._f.onBlur && O._f.onBlur(p), a && a(0)) : O._f.onChange && O._f.onChange(p);
|
|
10351
|
+
const qn = T(x, at, Xe), hl = !Se(qn) || Un;
|
|
10352
10352
|
if (!Xe && m.state.next({
|
|
10353
|
-
name:
|
|
10354
|
-
type:
|
|
10353
|
+
name: x,
|
|
10354
|
+
type: p.type,
|
|
10355
10355
|
values: le(s)
|
|
10356
10356
|
}), fl)
|
|
10357
|
-
return (f.isValid ||
|
|
10357
|
+
return (f.isValid || h.isValid) && (e.mode === "onBlur" ? Xe && b() : Xe || b()), hl && m.state.next({ name: x, ...Un ? {} : qn });
|
|
10358
10358
|
if (!Xe && Un && m.state.next({ ...n }), e.resolver) {
|
|
10359
|
-
const { errors: fi } = await
|
|
10360
|
-
if (
|
|
10361
|
-
const pl = Ss(n.errors, r,
|
|
10362
|
-
Z = hi.error,
|
|
10359
|
+
const { errors: fi } = await $([x]);
|
|
10360
|
+
if (k([x]), E(at), F) {
|
|
10361
|
+
const pl = Ss(n.errors, r, x), hi = Ss(fi, r, pl.name || x);
|
|
10362
|
+
Z = hi.error, x = hi.name, ve = Se(fi);
|
|
10363
10363
|
}
|
|
10364
10364
|
} else
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
}
|
|
10368
|
-
}, fe = (
|
|
10369
|
-
if (D(n.errors, g) &&
|
|
10370
|
-
return
|
|
10371
|
-
}, ke = async (
|
|
10372
|
-
let
|
|
10373
|
-
const
|
|
10365
|
+
k([x], !0), Z = (await ws(O, l.disabled, s, v, e.shouldUseNativeValidation))[x], k([x]), E(at), F && (Z ? ve = !1 : (f.isValid || h.isValid) && (ve = await U(r, !0)));
|
|
10366
|
+
F && (O._f.deps && (!Array.isArray(O._f.deps) || O._f.deps.length > 0) && ke(O._f.deps), N(x, ve, Z, qn));
|
|
10367
|
+
}
|
|
10368
|
+
}, fe = (p, g) => {
|
|
10369
|
+
if (D(n.errors, g) && p.focus)
|
|
10370
|
+
return p.focus(), 1;
|
|
10371
|
+
}, ke = async (p, g = {}) => {
|
|
10372
|
+
let x, F;
|
|
10373
|
+
const O = Kt(p);
|
|
10374
10374
|
if (e.resolver) {
|
|
10375
|
-
const E = await
|
|
10376
|
-
|
|
10377
|
-
} else
|
|
10375
|
+
const E = await _(re(p) ? p : O);
|
|
10376
|
+
x = Se(E), F = p ? !O.some((z) => D(E, z)) : x;
|
|
10377
|
+
} else p ? (F = (await Promise.all(O.map(async (E) => {
|
|
10378
10378
|
const z = D(r, E);
|
|
10379
10379
|
return await U(z && z._f ? { [E]: z } : z);
|
|
10380
|
-
}))).every(Boolean), !(!
|
|
10380
|
+
}))).every(Boolean), !(!F && !n.isValid) && b()) : F = x = await U(r);
|
|
10381
10381
|
return m.state.next({
|
|
10382
|
-
...!De(
|
|
10383
|
-
...e.resolver || !
|
|
10382
|
+
...!De(p) || (f.isValid || h.isValid) && x !== n.isValid ? {} : { name: p },
|
|
10383
|
+
...e.resolver || !p ? { isValid: x } : {},
|
|
10384
10384
|
errors: n.errors
|
|
10385
|
-
}), g.shouldFocus && !
|
|
10386
|
-
}, Ye = (
|
|
10387
|
-
let
|
|
10385
|
+
}), g.shouldFocus && !F && jt(r, fe, p ? O : l.mount), F;
|
|
10386
|
+
}, Ye = (p, g) => {
|
|
10387
|
+
let x = {
|
|
10388
10388
|
...o.mount ? s : i
|
|
10389
10389
|
};
|
|
10390
|
-
return g && (
|
|
10391
|
-
}, vt = (
|
|
10392
|
-
invalid: !!D((g || n).errors,
|
|
10393
|
-
isDirty: !!D((g || n).dirtyFields,
|
|
10394
|
-
error: D((g || n).errors,
|
|
10395
|
-
isValidating: !!D(n.validatingFields,
|
|
10396
|
-
isTouched: !!D((g || n).touchedFields,
|
|
10397
|
-
}), Pt = (
|
|
10398
|
-
|
|
10399
|
-
errors:
|
|
10390
|
+
return g && (x = tl(g.dirtyFields ? n.dirtyFields : n.touchedFields, x)), re(p) ? x : De(p) ? D(x, p) : p.map((F) => D(x, F));
|
|
10391
|
+
}, vt = (p, g) => ({
|
|
10392
|
+
invalid: !!D((g || n).errors, p),
|
|
10393
|
+
isDirty: !!D((g || n).dirtyFields, p),
|
|
10394
|
+
error: D((g || n).errors, p),
|
|
10395
|
+
isValidating: !!D(n.validatingFields, p),
|
|
10396
|
+
isTouched: !!D((g || n).touchedFields, p)
|
|
10397
|
+
}), Pt = (p) => {
|
|
10398
|
+
p && Kt(p).forEach((g) => ae(n.errors, g)), m.state.next({
|
|
10399
|
+
errors: p ? n.errors : {}
|
|
10400
10400
|
});
|
|
10401
|
-
}, ne = (
|
|
10402
|
-
const
|
|
10403
|
-
ee(n.errors,
|
|
10401
|
+
}, ne = (p, g, x) => {
|
|
10402
|
+
const F = (D(r, p, { _f: {} })._f || {}).ref, O = D(n.errors, p) || {}, { ref: E, message: z, type: G, ...Z } = O;
|
|
10403
|
+
ee(n.errors, p, {
|
|
10404
10404
|
...Z,
|
|
10405
10405
|
...g,
|
|
10406
|
-
ref:
|
|
10406
|
+
ref: F
|
|
10407
10407
|
}), m.state.next({
|
|
10408
|
-
name:
|
|
10408
|
+
name: p,
|
|
10409
10409
|
errors: n.errors,
|
|
10410
10410
|
isValid: !1
|
|
10411
|
-
}),
|
|
10412
|
-
}, Te = (
|
|
10413
|
-
next: (
|
|
10414
|
-
}) :
|
|
10411
|
+
}), x && x.shouldFocus && F && F.focus && F.focus();
|
|
10412
|
+
}, Te = (p, g) => we(p) ? m.state.subscribe({
|
|
10413
|
+
next: (x) => "values" in x && p(P(void 0, g), x)
|
|
10414
|
+
}) : P(p, g, !0), Rt = (p) => m.state.subscribe({
|
|
10415
10415
|
next: (g) => {
|
|
10416
|
-
Of(
|
|
10416
|
+
Of(p.name, g.name, p.exact) && Mf(g, p.formState || f, dl, p.reRenderRoot) && p.callback({
|
|
10417
10417
|
values: { ...s },
|
|
10418
10418
|
...n,
|
|
10419
10419
|
...g,
|
|
10420
10420
|
defaultValues: i
|
|
10421
10421
|
});
|
|
10422
10422
|
}
|
|
10423
|
-
}).unsubscribe, zn = (
|
|
10424
|
-
...p,
|
|
10425
|
-
...h.formState
|
|
10426
|
-
}, Rt({
|
|
10423
|
+
}).unsubscribe, zn = (p) => (o.mount = !0, h = {
|
|
10427
10424
|
...h,
|
|
10425
|
+
...p.formState
|
|
10426
|
+
}, Rt({
|
|
10427
|
+
...p,
|
|
10428
10428
|
formState: {
|
|
10429
10429
|
...d,
|
|
10430
|
-
...
|
|
10430
|
+
...p.formState
|
|
10431
10431
|
}
|
|
10432
|
-
})), Bn = (
|
|
10433
|
-
for (const
|
|
10434
|
-
l.mount.delete(
|
|
10432
|
+
})), Bn = (p, g = {}) => {
|
|
10433
|
+
for (const x of p ? Kt(p) : l.mount)
|
|
10434
|
+
l.mount.delete(x), l.array.delete(x), g.keepValue || (ae(r, x), ae(s, x)), !g.keepError && ae(n.errors, x), !g.keepDirty && ae(n.dirtyFields, x), !g.keepTouched && ae(n.touchedFields, x), !g.keepIsValidating && ae(n.validatingFields, x), !e.shouldUnregister && !g.keepDefaultValue && ae(i, x);
|
|
10435
10435
|
m.state.next({
|
|
10436
10436
|
values: le(s)
|
|
10437
10437
|
}), m.state.next({
|
|
10438
10438
|
...n,
|
|
10439
|
-
...g.keepDirty ? { isDirty:
|
|
10440
|
-
}), !g.keepIsValid &&
|
|
10441
|
-
}, li = ({ disabled:
|
|
10442
|
-
if (Me(
|
|
10443
|
-
const
|
|
10444
|
-
|
|
10445
|
-
}
|
|
10446
|
-
}, _n = (
|
|
10447
|
-
let
|
|
10448
|
-
const
|
|
10449
|
-
return ee(r,
|
|
10450
|
-
...
|
|
10439
|
+
...g.keepDirty ? { isDirty: M() } : {}
|
|
10440
|
+
}), !g.keepIsValid && b();
|
|
10441
|
+
}, li = ({ disabled: p, name: g }) => {
|
|
10442
|
+
if (Me(p) && o.mount || p || l.disabled.has(g)) {
|
|
10443
|
+
const O = l.disabled.has(g) !== !!p;
|
|
10444
|
+
p ? l.disabled.add(g) : l.disabled.delete(g), O && o.mount && !o.action && b();
|
|
10445
|
+
}
|
|
10446
|
+
}, _n = (p, g = {}) => {
|
|
10447
|
+
let x = D(r, p);
|
|
10448
|
+
const F = Me(g.disabled) || Me(e.disabled);
|
|
10449
|
+
return ee(r, p, {
|
|
10450
|
+
...x || {},
|
|
10451
10451
|
_f: {
|
|
10452
|
-
...
|
|
10453
|
-
name:
|
|
10452
|
+
...x && x._f ? x._f : { ref: { name: p } },
|
|
10453
|
+
name: p,
|
|
10454
10454
|
mount: !0,
|
|
10455
10455
|
...g
|
|
10456
10456
|
}
|
|
10457
|
-
}), l.mount.add(
|
|
10457
|
+
}), l.mount.add(p), x ? li({
|
|
10458
10458
|
disabled: Me(g.disabled) ? g.disabled : e.disabled,
|
|
10459
|
-
name:
|
|
10460
|
-
}) :
|
|
10461
|
-
...
|
|
10459
|
+
name: p
|
|
10460
|
+
}) : w(p, !0, g.value), {
|
|
10461
|
+
...F ? { disabled: g.disabled || e.disabled } : {},
|
|
10462
10462
|
...e.progressive ? {
|
|
10463
10463
|
required: !!g.required,
|
|
10464
10464
|
min: Bt(g.min),
|
|
@@ -10467,88 +10467,88 @@ function Pf(t = {}) {
|
|
|
10467
10467
|
maxLength: Bt(g.maxLength),
|
|
10468
10468
|
pattern: Bt(g.pattern)
|
|
10469
10469
|
} : {},
|
|
10470
|
-
name:
|
|
10470
|
+
name: p,
|
|
10471
10471
|
onChange: xe,
|
|
10472
10472
|
onBlur: xe,
|
|
10473
|
-
ref: (
|
|
10474
|
-
if (
|
|
10475
|
-
_n(
|
|
10476
|
-
const E = re(
|
|
10477
|
-
if (z ? G.find((Z) => Z === E) : E ===
|
|
10473
|
+
ref: (O) => {
|
|
10474
|
+
if (O) {
|
|
10475
|
+
_n(p, g), x = D(r, p);
|
|
10476
|
+
const E = re(O.value) && O.querySelectorAll && O.querySelectorAll("input,select,textarea")[0] || O, z = Sf(E), G = x._f.refs || [];
|
|
10477
|
+
if (z ? G.find((Z) => Z === E) : E === x._f.ref)
|
|
10478
10478
|
return;
|
|
10479
|
-
ee(r,
|
|
10479
|
+
ee(r, p, {
|
|
10480
10480
|
_f: {
|
|
10481
|
-
...
|
|
10481
|
+
...x._f,
|
|
10482
10482
|
...z ? {
|
|
10483
10483
|
refs: [
|
|
10484
10484
|
...G.filter(ar),
|
|
10485
10485
|
E,
|
|
10486
|
-
...Array.isArray(D(i,
|
|
10486
|
+
...Array.isArray(D(i, p)) ? [{}] : []
|
|
10487
10487
|
],
|
|
10488
|
-
ref: { type: E.type, name:
|
|
10488
|
+
ref: { type: E.type, name: p }
|
|
10489
10489
|
} : { ref: E }
|
|
10490
10490
|
}
|
|
10491
|
-
}),
|
|
10491
|
+
}), w(p, !1, void 0, E);
|
|
10492
10492
|
} else
|
|
10493
|
-
|
|
10493
|
+
x = D(r, p, {}), x._f && (x._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(Yo(l.array, p) && o.action) && l.unMount.add(p);
|
|
10494
10494
|
}
|
|
10495
10495
|
};
|
|
10496
|
-
}, Hn = () => e.shouldFocusError && jt(r, fe, l.mount), al = (
|
|
10497
|
-
Me(
|
|
10498
|
-
const
|
|
10499
|
-
|
|
10500
|
-
|
|
10496
|
+
}, Hn = () => e.shouldFocusError && jt(r, fe, l.mount), al = (p) => {
|
|
10497
|
+
Me(p) && (m.state.next({ disabled: p }), jt(r, (g, x) => {
|
|
10498
|
+
const F = D(r, x);
|
|
10499
|
+
F && (g.disabled = F._f.disabled || p, Array.isArray(F._f.refs) && F._f.refs.forEach((O) => {
|
|
10500
|
+
O.disabled = F._f.disabled || p;
|
|
10501
10501
|
}));
|
|
10502
10502
|
}, 0, !1));
|
|
10503
|
-
}, ai = (
|
|
10504
|
-
let
|
|
10505
|
-
|
|
10506
|
-
let
|
|
10503
|
+
}, ai = (p, g) => async (x) => {
|
|
10504
|
+
let F;
|
|
10505
|
+
x && (x.preventDefault && x.preventDefault(), x.persist && x.persist());
|
|
10506
|
+
let O = le(s);
|
|
10507
10507
|
if (m.state.next({
|
|
10508
10508
|
isSubmitting: !0
|
|
10509
10509
|
}), e.resolver) {
|
|
10510
|
-
const { errors: E, values: z } = await
|
|
10511
|
-
|
|
10510
|
+
const { errors: E, values: z } = await $();
|
|
10511
|
+
k(), n.errors = E, O = le(z);
|
|
10512
10512
|
} else
|
|
10513
10513
|
await U(r);
|
|
10514
10514
|
if (l.disabled.size)
|
|
10515
10515
|
for (const E of l.disabled)
|
|
10516
|
-
ae(
|
|
10516
|
+
ae(O, E);
|
|
10517
10517
|
if (ae(n.errors, "root"), Se(n.errors)) {
|
|
10518
10518
|
m.state.next({
|
|
10519
10519
|
errors: {}
|
|
10520
10520
|
});
|
|
10521
10521
|
try {
|
|
10522
|
-
await
|
|
10522
|
+
await p(O, x);
|
|
10523
10523
|
} catch (E) {
|
|
10524
|
-
|
|
10524
|
+
F = E;
|
|
10525
10525
|
}
|
|
10526
10526
|
} else
|
|
10527
|
-
g && await g({ ...n.errors },
|
|
10527
|
+
g && await g({ ...n.errors }, x), Hn(), setTimeout(Hn);
|
|
10528
10528
|
if (m.state.next({
|
|
10529
10529
|
isSubmitted: !0,
|
|
10530
10530
|
isSubmitting: !1,
|
|
10531
|
-
isSubmitSuccessful: Se(n.errors) && !
|
|
10531
|
+
isSubmitSuccessful: Se(n.errors) && !F,
|
|
10532
10532
|
submitCount: n.submitCount + 1,
|
|
10533
10533
|
errors: n.errors
|
|
10534
|
-
}),
|
|
10535
|
-
throw
|
|
10536
|
-
}, cl = (
|
|
10537
|
-
D(r,
|
|
10538
|
-
}, ci = (
|
|
10539
|
-
const
|
|
10540
|
-
if (g.keepDefaultValues || (i =
|
|
10534
|
+
}), F)
|
|
10535
|
+
throw F;
|
|
10536
|
+
}, cl = (p, g = {}) => {
|
|
10537
|
+
D(r, p) && (re(g.defaultValue) ? W(p, le(D(i, p))) : (W(p, g.defaultValue), ee(i, p, le(g.defaultValue))), g.keepTouched || ae(n.touchedFields, p), g.keepDirty || (ae(n.dirtyFields, p), n.isDirty = g.defaultValue ? M(p, le(D(i, p))) : M()), g.keepError || (ae(n.errors, p), f.isValid && b()), m.state.next({ ...n }));
|
|
10538
|
+
}, ci = (p, g = {}) => {
|
|
10539
|
+
const x = p ? le(p) : i, F = le(x), O = Se(p), E = O ? i : F;
|
|
10540
|
+
if (g.keepDefaultValues || (i = x), !g.keepValues) {
|
|
10541
10541
|
if (g.keepDirtyValues) {
|
|
10542
10542
|
const z = /* @__PURE__ */ new Set([
|
|
10543
10543
|
...l.mount,
|
|
10544
10544
|
...Object.keys(Et(i, s))
|
|
10545
10545
|
]);
|
|
10546
10546
|
for (const G of Array.from(z)) {
|
|
10547
|
-
const Z = D(n.dirtyFields, G), ve = D(s, G),
|
|
10548
|
-
Z && !re(ve) ? ee(E, G, ve) : !Z && !re(
|
|
10547
|
+
const Z = D(n.dirtyFields, G), ve = D(s, G), at = D(E, G);
|
|
10548
|
+
Z && !re(ve) ? ee(E, G, ve) : !Z && !re(at) && W(G, at);
|
|
10549
10549
|
}
|
|
10550
10550
|
} else {
|
|
10551
|
-
if (ei && re(
|
|
10551
|
+
if (ei && re(p))
|
|
10552
10552
|
for (const z of l.mount) {
|
|
10553
10553
|
const G = D(r, z);
|
|
10554
10554
|
if (G && G._f) {
|
|
@@ -10584,27 +10584,27 @@ function Pf(t = {}) {
|
|
|
10584
10584
|
focus: ""
|
|
10585
10585
|
}, o.mount = !f.isValid || !!g.keepIsValid || !!g.keepDirtyValues || !e.shouldUnregister && !Se(E), o.watch = !!e.shouldUnregister, o.keepIsValid = !!g.keepIsValid, o.action = !1, g.keepErrors || (n.errors = {}), m.state.next({
|
|
10586
10586
|
submitCount: g.keepSubmitCount ? n.submitCount : 0,
|
|
10587
|
-
isDirty:
|
|
10587
|
+
isDirty: O ? !1 : g.keepDirty ? n.isDirty : !!(g.keepDefaultValues && !ze(p, i)),
|
|
10588
10588
|
isSubmitted: g.keepIsSubmitted ? n.isSubmitted : !1,
|
|
10589
|
-
dirtyFields:
|
|
10589
|
+
dirtyFields: O ? {} : g.keepDirtyValues ? g.keepDefaultValues && s ? Et(i, s) : n.dirtyFields : g.keepDefaultValues && p ? Et(i, p) : g.keepDirty ? n.dirtyFields : {},
|
|
10590
10590
|
touchedFields: g.keepTouched ? n.touchedFields : {},
|
|
10591
10591
|
errors: g.keepErrors ? n.errors : {},
|
|
10592
10592
|
isSubmitSuccessful: g.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
10593
10593
|
isSubmitting: !1,
|
|
10594
10594
|
defaultValues: i
|
|
10595
10595
|
});
|
|
10596
|
-
}, ui = (
|
|
10597
|
-
const
|
|
10598
|
-
if (
|
|
10599
|
-
const
|
|
10600
|
-
|
|
10601
|
-
|
|
10596
|
+
}, ui = (p, g) => ci(we(p) ? p(s) : p, { ...e.resetOptions, ...g }), ul = (p, g = {}) => {
|
|
10597
|
+
const x = D(r, p), F = x && x._f;
|
|
10598
|
+
if (F) {
|
|
10599
|
+
const O = F.refs ? F.refs[0] : F.ref;
|
|
10600
|
+
O.focus && setTimeout(() => {
|
|
10601
|
+
O.focus(), g.shouldSelect && we(O.select) && O.select();
|
|
10602
10602
|
});
|
|
10603
10603
|
}
|
|
10604
|
-
}, dl = (
|
|
10604
|
+
}, dl = (p) => {
|
|
10605
10605
|
n = {
|
|
10606
10606
|
...n,
|
|
10607
|
-
...
|
|
10607
|
+
...p
|
|
10608
10608
|
};
|
|
10609
10609
|
}, di = {
|
|
10610
10610
|
control: {
|
|
@@ -10614,23 +10614,23 @@ function Pf(t = {}) {
|
|
|
10614
10614
|
handleSubmit: ai,
|
|
10615
10615
|
setError: ne,
|
|
10616
10616
|
_subscribe: Rt,
|
|
10617
|
-
_runSchema:
|
|
10618
|
-
_updateIsValidating:
|
|
10617
|
+
_runSchema: $,
|
|
10618
|
+
_updateIsValidating: k,
|
|
10619
10619
|
_focusError: Hn,
|
|
10620
|
-
_getWatch:
|
|
10621
|
-
_getDirty:
|
|
10622
|
-
_setValid:
|
|
10623
|
-
_setFieldArray:
|
|
10620
|
+
_getWatch: P,
|
|
10621
|
+
_getDirty: M,
|
|
10622
|
+
_setValid: b,
|
|
10623
|
+
_setFieldArray: S,
|
|
10624
10624
|
_setDisabledField: li,
|
|
10625
|
-
_setErrors:
|
|
10626
|
-
_getFieldArray:
|
|
10625
|
+
_setErrors: C,
|
|
10626
|
+
_getFieldArray: R,
|
|
10627
10627
|
_reset: ci,
|
|
10628
|
-
_resetDefaultValues: () => we(e.defaultValues) && e.defaultValues().then((
|
|
10629
|
-
ui(
|
|
10628
|
+
_resetDefaultValues: () => we(e.defaultValues) && e.defaultValues().then((p) => {
|
|
10629
|
+
ui(p, e.resetOptions), m.state.next({
|
|
10630
10630
|
isLoading: !1
|
|
10631
10631
|
});
|
|
10632
10632
|
}),
|
|
10633
|
-
_removeUnmounted:
|
|
10633
|
+
_removeUnmounted: V,
|
|
10634
10634
|
_disableForm: al,
|
|
10635
10635
|
_subjects: m,
|
|
10636
10636
|
_proxyFormState: f,
|
|
@@ -10643,8 +10643,8 @@ function Pf(t = {}) {
|
|
|
10643
10643
|
get _state() {
|
|
10644
10644
|
return o;
|
|
10645
10645
|
},
|
|
10646
|
-
set _state(
|
|
10647
|
-
o =
|
|
10646
|
+
set _state(p) {
|
|
10647
|
+
o = p;
|
|
10648
10648
|
},
|
|
10649
10649
|
get _defaultValues() {
|
|
10650
10650
|
return i;
|
|
@@ -10652,8 +10652,8 @@ function Pf(t = {}) {
|
|
|
10652
10652
|
get _names() {
|
|
10653
10653
|
return l;
|
|
10654
10654
|
},
|
|
10655
|
-
set _names(
|
|
10656
|
-
l =
|
|
10655
|
+
set _names(p) {
|
|
10656
|
+
l = p;
|
|
10657
10657
|
},
|
|
10658
10658
|
get _formState() {
|
|
10659
10659
|
return n;
|
|
@@ -10661,10 +10661,10 @@ function Pf(t = {}) {
|
|
|
10661
10661
|
get _options() {
|
|
10662
10662
|
return e;
|
|
10663
10663
|
},
|
|
10664
|
-
set _options(
|
|
10664
|
+
set _options(p) {
|
|
10665
10665
|
e = {
|
|
10666
10666
|
...e,
|
|
10667
|
-
...
|
|
10667
|
+
...p
|
|
10668
10668
|
};
|
|
10669
10669
|
}
|
|
10670
10670
|
},
|
|
@@ -10831,29 +10831,29 @@ const $f = {
|
|
|
10831
10831
|
onDelete: c,
|
|
10832
10832
|
canDelete: d = !0,
|
|
10833
10833
|
canEditTaxDeductible: f = !0,
|
|
10834
|
-
isDisabled:
|
|
10834
|
+
isDisabled: h = !1,
|
|
10835
10835
|
labels: m,
|
|
10836
10836
|
classNames: v = {},
|
|
10837
|
-
"data-testid":
|
|
10837
|
+
"data-testid": y,
|
|
10838
10838
|
// React Hook Form props
|
|
10839
|
-
control:
|
|
10840
|
-
name:
|
|
10841
|
-
rules:
|
|
10839
|
+
control: b,
|
|
10840
|
+
name: k,
|
|
10841
|
+
rules: S
|
|
10842
10842
|
}) => {
|
|
10843
|
-
const
|
|
10843
|
+
const I = { ...$f, ...m }, C = b !== void 0 && k !== void 0, w = Rf({
|
|
10844
10844
|
defaultValues: { _internal: e || cr() }
|
|
10845
10845
|
}), T = xf({
|
|
10846
|
-
control:
|
|
10847
|
-
name:
|
|
10848
|
-
rules:
|
|
10849
|
-
}), [
|
|
10846
|
+
control: C ? b : w.control,
|
|
10847
|
+
name: C ? k : "_internal",
|
|
10848
|
+
rules: C ? S : void 0
|
|
10849
|
+
}), [N, $] = J(
|
|
10850
10850
|
e || cr()
|
|
10851
|
-
),
|
|
10851
|
+
), _ = C ? T.field.value ?? cr() : t ?? N, U = C && !!T.fieldState?.error, V = C && (T.fieldState?.isTouched ?? !1), M = U || V, P = M && (!_.amount || _.amount <= 0), R = M && !_.glAccount, [H, Q] = J(_.glAccount?.name || ""), W = ce(
|
|
10852
10852
|
(ne) => {
|
|
10853
|
-
const Te = { ...
|
|
10854
|
-
|
|
10853
|
+
const Te = { ..._, ...ne };
|
|
10854
|
+
C && T.field.onChange(Te), !C && t === void 0 && $(Te), s?.(Te);
|
|
10855
10855
|
},
|
|
10856
|
-
[
|
|
10856
|
+
[_, t, s, C, T]
|
|
10857
10857
|
), xe = ce(
|
|
10858
10858
|
(ne) => {
|
|
10859
10859
|
const Te = ne || 0;
|
|
@@ -10862,7 +10862,7 @@ const $f = {
|
|
|
10862
10862
|
[W, o]
|
|
10863
10863
|
), fe = ce(
|
|
10864
10864
|
(ne) => {
|
|
10865
|
-
|
|
10865
|
+
Q(ne), i?.(ne);
|
|
10866
10866
|
},
|
|
10867
10867
|
[i]
|
|
10868
10868
|
), ke = ce(
|
|
@@ -10876,7 +10876,7 @@ const $f = {
|
|
|
10876
10876
|
},
|
|
10877
10877
|
[n, W, l]
|
|
10878
10878
|
), Ye = ce(() => {
|
|
10879
|
-
|
|
10879
|
+
Q(""), W({ glAccount: null }), l?.(null);
|
|
10880
10880
|
}, [W, l]), vt = ce(
|
|
10881
10881
|
(ne) => {
|
|
10882
10882
|
W({ isTaxDeductible: ne }), a?.(ne);
|
|
@@ -10890,16 +10890,16 @@ const $f = {
|
|
|
10890
10890
|
{
|
|
10891
10891
|
radius: "md",
|
|
10892
10892
|
shadow: "sm",
|
|
10893
|
-
"data-testid":
|
|
10894
|
-
className:
|
|
10895
|
-
children: /* @__PURE__ */ A(Le, { className:
|
|
10896
|
-
/* @__PURE__ */ u("div", { className:
|
|
10893
|
+
"data-testid": y || "revenue-distribution-card",
|
|
10894
|
+
className: L(v.base),
|
|
10895
|
+
children: /* @__PURE__ */ A(Le, { className: L("flex flex-row flex-nowrap items-start gap-4", v.body), children: [
|
|
10896
|
+
/* @__PURE__ */ u("div", { className: L("shrink-0", v.amountContainer), children: /* @__PURE__ */ u(
|
|
10897
10897
|
Ls,
|
|
10898
10898
|
{
|
|
10899
|
-
"data-testid": `${
|
|
10899
|
+
"data-testid": `${y || "revenue-distribution-card"}-amount-input`,
|
|
10900
10900
|
label: /* @__PURE__ */ A("span", { className: "flex items-center gap-1", children: [
|
|
10901
|
-
|
|
10902
|
-
/* @__PURE__ */ u(Tt, { content:
|
|
10901
|
+
I.amount,
|
|
10902
|
+
/* @__PURE__ */ u(Tt, { content: I.amountTooltip, children: /* @__PURE__ */ u(
|
|
10903
10903
|
Ie,
|
|
10904
10904
|
{
|
|
10905
10905
|
icon: "solar:info-circle-linear",
|
|
@@ -10908,29 +10908,29 @@ const $f = {
|
|
|
10908
10908
|
}
|
|
10909
10909
|
) })
|
|
10910
10910
|
] }),
|
|
10911
|
-
value:
|
|
10911
|
+
value: _.amount || void 0,
|
|
10912
10912
|
onValueChange: xe,
|
|
10913
10913
|
labelPlacement: "outside",
|
|
10914
|
-
placeholder:
|
|
10914
|
+
placeholder: I.amountPlaceholder,
|
|
10915
10915
|
isWheelDisabled: !0,
|
|
10916
10916
|
hideStepper: !0,
|
|
10917
10917
|
variant: "bordered",
|
|
10918
|
-
isDisabled:
|
|
10919
|
-
isInvalid:
|
|
10920
|
-
errorMessage:
|
|
10918
|
+
isDisabled: h,
|
|
10919
|
+
isInvalid: P,
|
|
10920
|
+
errorMessage: P ? "Amount is required" : void 0,
|
|
10921
10921
|
minValue: 0,
|
|
10922
10922
|
step: 0.01,
|
|
10923
10923
|
className: v.amountInput,
|
|
10924
|
-
startContent: /* @__PURE__ */ u("div", { className: "pointer-events-none flex items-center", children: /* @__PURE__ */ u("span", { className: "text-default-400 text-small", children:
|
|
10924
|
+
startContent: /* @__PURE__ */ u("div", { className: "pointer-events-none flex items-center", children: /* @__PURE__ */ u("span", { className: "text-default-400 text-small", children: I.currencySymbol }) })
|
|
10925
10925
|
}
|
|
10926
10926
|
) }),
|
|
10927
|
-
/* @__PURE__ */ u("div", { className:
|
|
10927
|
+
/* @__PURE__ */ u("div", { className: L("grow", v.glAccountContainer), children: /* @__PURE__ */ u(
|
|
10928
10928
|
vl,
|
|
10929
10929
|
{
|
|
10930
|
-
"data-testid": `${
|
|
10930
|
+
"data-testid": `${y || "revenue-distribution-card"}-gl-account-input`,
|
|
10931
10931
|
label: /* @__PURE__ */ A("span", { className: "flex items-center gap-1", children: [
|
|
10932
|
-
|
|
10933
|
-
/* @__PURE__ */ u(Tt, { content:
|
|
10932
|
+
I.glAccount,
|
|
10933
|
+
/* @__PURE__ */ u(Tt, { content: I.glAccountTooltip, children: /* @__PURE__ */ u(
|
|
10934
10934
|
Ie,
|
|
10935
10935
|
{
|
|
10936
10936
|
icon: "solar:info-circle-linear",
|
|
@@ -10945,15 +10945,15 @@ const $f = {
|
|
|
10945
10945
|
variant: "bordered",
|
|
10946
10946
|
items: n,
|
|
10947
10947
|
menuTrigger: "input",
|
|
10948
|
-
inputValue:
|
|
10949
|
-
selectedKey:
|
|
10950
|
-
isDisabled:
|
|
10951
|
-
isInvalid:
|
|
10952
|
-
errorMessage:
|
|
10948
|
+
inputValue: _.glAccount?.name ?? H,
|
|
10949
|
+
selectedKey: _.glAccount?.id ?? null,
|
|
10950
|
+
isDisabled: h,
|
|
10951
|
+
isInvalid: R,
|
|
10952
|
+
errorMessage: R ? "GL Account is required" : void 0,
|
|
10953
10953
|
listboxProps: {
|
|
10954
|
-
emptyContent: r ?
|
|
10954
|
+
emptyContent: r ? I.searching : I.noGlAccountsFound
|
|
10955
10955
|
},
|
|
10956
|
-
placeholder:
|
|
10956
|
+
placeholder: I.glAccountPlaceholder,
|
|
10957
10957
|
onInputChange: fe,
|
|
10958
10958
|
onSelectionChange: ke,
|
|
10959
10959
|
onClear: Ye,
|
|
@@ -10964,30 +10964,30 @@ const $f = {
|
|
|
10964
10964
|
] }) }, ne.id)
|
|
10965
10965
|
}
|
|
10966
10966
|
) }),
|
|
10967
|
-
/* @__PURE__ */ u("div", { className:
|
|
10967
|
+
/* @__PURE__ */ u("div", { className: L("shrink-0 pt-6 flex items-center", v.taxDeductibleContainer), children: /* @__PURE__ */ u(
|
|
10968
10968
|
Cl,
|
|
10969
10969
|
{
|
|
10970
10970
|
radius: "full",
|
|
10971
|
-
"data-testid": `${
|
|
10972
|
-
isSelected:
|
|
10971
|
+
"data-testid": `${y || "revenue-distribution-card"}-tax-deductible`,
|
|
10972
|
+
isSelected: _.isTaxDeductible,
|
|
10973
10973
|
onValueChange: vt,
|
|
10974
|
-
isDisabled:
|
|
10974
|
+
isDisabled: h || !f,
|
|
10975
10975
|
className: v.taxDeductibleCheckbox,
|
|
10976
|
-
children:
|
|
10976
|
+
children: I.taxDeductible
|
|
10977
10977
|
}
|
|
10978
10978
|
) }),
|
|
10979
|
-
/* @__PURE__ */ u("div", { className:
|
|
10979
|
+
/* @__PURE__ */ u("div", { className: L("shrink-0 pt-6", v.deleteContainer), children: /* @__PURE__ */ u(
|
|
10980
10980
|
oe,
|
|
10981
10981
|
{
|
|
10982
|
-
"data-testid": `${
|
|
10982
|
+
"data-testid": `${y || "revenue-distribution-card"}-delete-button`,
|
|
10983
10983
|
size: "sm",
|
|
10984
10984
|
color: "danger",
|
|
10985
10985
|
variant: "flat",
|
|
10986
|
-
isDisabled:
|
|
10986
|
+
isDisabled: h || !d,
|
|
10987
10987
|
onPress: Pt,
|
|
10988
10988
|
startContent: /* @__PURE__ */ u(Ie, { icon: "solar:trash-bin-trash-linear", width: 16 }),
|
|
10989
|
-
className:
|
|
10990
|
-
children:
|
|
10989
|
+
className: L("text-danger", v.deleteButton),
|
|
10990
|
+
children: I.deleteButton
|
|
10991
10991
|
}
|
|
10992
10992
|
) })
|
|
10993
10993
|
] })
|
|
@@ -11005,9 +11005,9 @@ const zf = ({
|
|
|
11005
11005
|
}) => {
|
|
11006
11006
|
if (s)
|
|
11007
11007
|
return /* @__PURE__ */ u(Je, { children: s() });
|
|
11008
|
-
const o = /* @__PURE__ */ A("div", { className:
|
|
11009
|
-
/* @__PURE__ */ u(Ie, { icon: e, width: n, className:
|
|
11010
|
-
/* @__PURE__ */ u("p", { className:
|
|
11008
|
+
const o = /* @__PURE__ */ A("div", { className: L("flex flex-col items-center justify-center py-8", i.content), children: [
|
|
11009
|
+
/* @__PURE__ */ u(Ie, { icon: e, width: n, className: L("text-default-300 mb-4", i.icon) }),
|
|
11010
|
+
/* @__PURE__ */ u("p", { className: L("text-default-500 text-sm text-center", i.message), children: t })
|
|
11011
11011
|
] });
|
|
11012
11012
|
return r ? /* @__PURE__ */ u(
|
|
11013
11013
|
Ee,
|
|
@@ -11015,10 +11015,10 @@ const zf = ({
|
|
|
11015
11015
|
radius: "sm",
|
|
11016
11016
|
shadow: "sm",
|
|
11017
11017
|
"data-testid": "revenue-distribution-empty",
|
|
11018
|
-
className:
|
|
11018
|
+
className: L("w-full", i.base),
|
|
11019
11019
|
children: /* @__PURE__ */ u(Le, { children: o })
|
|
11020
11020
|
}
|
|
11021
|
-
) : /* @__PURE__ */ u("div", { "data-testid": "revenue-distribution-empty", className:
|
|
11021
|
+
) : /* @__PURE__ */ u("div", { "data-testid": "revenue-distribution-empty", className: L("w-full", i.base), children: o });
|
|
11022
11022
|
};
|
|
11023
11023
|
zf.displayName = "RevenueDistributionEmpty";
|
|
11024
11024
|
const Bf = {
|
|
@@ -11047,10 +11047,10 @@ const Bf = {
|
|
|
11047
11047
|
radius: "sm",
|
|
11048
11048
|
shadow: "sm",
|
|
11049
11049
|
"data-testid": "revenue-distribution-error",
|
|
11050
|
-
className:
|
|
11050
|
+
className: L("w-full", i.base),
|
|
11051
11051
|
children: /* @__PURE__ */ u(Le, { children: o })
|
|
11052
11052
|
}
|
|
11053
|
-
) : /* @__PURE__ */ u("div", { "data-testid": "revenue-distribution-error", className:
|
|
11053
|
+
) : /* @__PURE__ */ u("div", { "data-testid": "revenue-distribution-error", className: L("w-full", i.base), children: o });
|
|
11054
11054
|
};
|
|
11055
11055
|
_f.displayName = "RevenueDistributionError";
|
|
11056
11056
|
const Hf = ({
|
|
@@ -11058,7 +11058,7 @@ const Hf = ({
|
|
|
11058
11058
|
showCard: e = !0,
|
|
11059
11059
|
classNames: n = {}
|
|
11060
11060
|
}) => {
|
|
11061
|
-
const r = Array.from({ length: t }, (s, o) => o), i = (s) => /* @__PURE__ */ A("div", { className:
|
|
11061
|
+
const r = Array.from({ length: t }, (s, o) => o), i = (s) => /* @__PURE__ */ A("div", { className: L("flex flex-row flex-nowrap items-end gap-4", n.row), children: [
|
|
11062
11062
|
/* @__PURE__ */ A("div", { className: "shrink-0 flex flex-col gap-1", children: [
|
|
11063
11063
|
/* @__PURE__ */ A("div", { className: "flex items-center gap-1", children: [
|
|
11064
11064
|
/* @__PURE__ */ u(me, { className: "h-4 w-14 rounded-md" }),
|
|
@@ -11079,7 +11079,7 @@ const Hf = ({
|
|
|
11079
11079
|
] }),
|
|
11080
11080
|
/* @__PURE__ */ u("div", { className: "shrink-0 pb-2", children: /* @__PURE__ */ u(me, { className: "h-8 w-20 rounded-lg" }) })
|
|
11081
11081
|
] }, s);
|
|
11082
|
-
return e ? /* @__PURE__ */ u("div", { className:
|
|
11082
|
+
return e ? /* @__PURE__ */ u("div", { className: L("flex flex-col gap-3", n.base), children: r.map((s) => /* @__PURE__ */ u(Ee, { radius: "md", shadow: "sm", "data-testid": `revenue-distribution-skeleton-${s}`, children: /* @__PURE__ */ u(Le, { children: i(s) }) }, s)) }) : /* @__PURE__ */ u("div", { "data-testid": "revenue-distribution-skeleton", className: L("flex flex-col gap-3", n.base), children: r.map((s) => i(s)) });
|
|
11083
11083
|
};
|
|
11084
11084
|
Hf.displayName = "RevenueDistributionSkeleton";
|
|
11085
11085
|
const Uf = {
|
|
@@ -11090,52 +11090,56 @@ const Uf = {
|
|
|
11090
11090
|
cards: t,
|
|
11091
11091
|
locale: e,
|
|
11092
11092
|
currency: n,
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11093
|
+
listHeightClassName: r = "",
|
|
11094
|
+
labels: i,
|
|
11095
|
+
showRenewal: s = !0,
|
|
11096
|
+
defaultRenewalValue: o = !1,
|
|
11097
|
+
onRenewalChange: l,
|
|
11098
|
+
onCardSelect: a,
|
|
11099
|
+
className: c = ""
|
|
11099
11100
|
}) => {
|
|
11100
|
-
const
|
|
11101
|
-
|
|
11102
|
-
},
|
|
11103
|
-
|
|
11101
|
+
const d = Array.isArray(t) ? t : [], [f, h] = J(null), [m, v] = J(o), y = { ...Uf, ...i }, b = (S) => {
|
|
11102
|
+
S !== f && (h(S), a?.(S));
|
|
11103
|
+
}, k = (S) => {
|
|
11104
|
+
v(S), l?.(S);
|
|
11104
11105
|
};
|
|
11105
11106
|
return /* @__PURE__ */ A(
|
|
11106
11107
|
"div",
|
|
11107
11108
|
{
|
|
11108
|
-
className:
|
|
11109
|
+
className: L("w-full flex flex-col gap-4 items-start p-4 h-svh", c),
|
|
11109
11110
|
"data-testid": "membership-select-cards",
|
|
11110
11111
|
children: [
|
|
11111
|
-
/* @__PURE__ */ u("p", { className: "text-2xl font-semibold text-left", "data-testid": "membership-select-cards-title", children:
|
|
11112
|
-
|
|
11112
|
+
/* @__PURE__ */ u("p", { className: "text-2xl font-semibold text-left", "data-testid": "membership-select-cards-title", children: y.title }),
|
|
11113
|
+
s && /* @__PURE__ */ u(
|
|
11113
11114
|
Kf,
|
|
11114
11115
|
{
|
|
11115
|
-
title:
|
|
11116
|
-
description:
|
|
11117
|
-
value:
|
|
11118
|
-
onValueChange:
|
|
11116
|
+
title: y.renewalTitle,
|
|
11117
|
+
description: y.renewalDescription,
|
|
11118
|
+
value: m,
|
|
11119
|
+
onValueChange: k
|
|
11119
11120
|
}
|
|
11120
11121
|
),
|
|
11121
11122
|
/* @__PURE__ */ u(
|
|
11122
11123
|
"div",
|
|
11123
11124
|
{
|
|
11124
|
-
className:
|
|
11125
|
+
className: L(
|
|
11126
|
+
"w-full min-h-0 flex flex-col gap-4 overflow-y-auto",
|
|
11127
|
+
r === "" ? "flex-1" : L("shrink-0", r)
|
|
11128
|
+
),
|
|
11125
11129
|
"data-testid": "membership-select-cards-list",
|
|
11126
|
-
children:
|
|
11130
|
+
children: d.map((S) => /* @__PURE__ */ u(
|
|
11127
11131
|
qf,
|
|
11128
11132
|
{
|
|
11129
|
-
itemKey:
|
|
11130
|
-
name:
|
|
11131
|
-
type:
|
|
11132
|
-
price:
|
|
11133
|
+
itemKey: S.id,
|
|
11134
|
+
name: S.name,
|
|
11135
|
+
type: S.type,
|
|
11136
|
+
price: S.price,
|
|
11133
11137
|
locale: e,
|
|
11134
11138
|
currency: n,
|
|
11135
|
-
isSelected:
|
|
11139
|
+
isSelected: f === S.id,
|
|
11136
11140
|
onSelect: b
|
|
11137
11141
|
},
|
|
11138
|
-
|
|
11142
|
+
S.id
|
|
11139
11143
|
))
|
|
11140
11144
|
}
|
|
11141
11145
|
)
|
|
@@ -11165,7 +11169,7 @@ const Uf = {
|
|
|
11165
11169
|
shadow: "none",
|
|
11166
11170
|
isPressable: !!l,
|
|
11167
11171
|
onPress: () => l?.(t),
|
|
11168
|
-
className:
|
|
11172
|
+
className: L(
|
|
11169
11173
|
"w-full min-h-fit border rounded-3xl",
|
|
11170
11174
|
o ? "border-primary bg-primary/5" : "border-default",
|
|
11171
11175
|
a
|
|
@@ -11186,7 +11190,7 @@ const Uf = {
|
|
|
11186
11190
|
return /* @__PURE__ */ A(
|
|
11187
11191
|
"div",
|
|
11188
11192
|
{
|
|
11189
|
-
className:
|
|
11193
|
+
className: L(
|
|
11190
11194
|
"w-full flex flex-row items-center",
|
|
11191
11195
|
t || n ? "justify-between gap-6" : "justify-start",
|
|
11192
11196
|
i
|
|
@@ -11218,22 +11222,22 @@ const Uf = {
|
|
|
11218
11222
|
i || s >= n || r?.(s + 1);
|
|
11219
11223
|
}, l = () => {
|
|
11220
11224
|
i || s <= e || r?.(s - 1);
|
|
11221
|
-
}, a = (
|
|
11225
|
+
}, a = (y) => {
|
|
11222
11226
|
if (i) return;
|
|
11223
|
-
const
|
|
11224
|
-
isNaN(
|
|
11225
|
-
}, c = (
|
|
11226
|
-
const
|
|
11227
|
-
isNaN(
|
|
11228
|
-
}, d = s <= e, f = s >= n,
|
|
11229
|
-
return /* @__PURE__ */ A("div", { className: "flex items-center gap-
|
|
11227
|
+
const b = parseInt(y.target.value, 10);
|
|
11228
|
+
isNaN(b) || r?.(Math.max(e, Math.min(n, b)));
|
|
11229
|
+
}, c = (y) => {
|
|
11230
|
+
const b = parseInt(y.target.value, 10);
|
|
11231
|
+
isNaN(b) && r?.(e);
|
|
11232
|
+
}, d = s <= e, f = s >= n, h = "w-10 h-10 flex items-center justify-center border-0 rounded-full cursor-pointer transition-colors duration-150 text-white text-2xl font-regular", m = "bg-[#C14615] hover:bg-[#a73c11]", v = "bg-[#e0a28a] cursor-not-allowed";
|
|
11233
|
+
return /* @__PURE__ */ A("div", { className: "flex items-center gap-4", "data-testid": "quantity-selector", children: [
|
|
11230
11234
|
/* @__PURE__ */ u(
|
|
11231
11235
|
"button",
|
|
11232
11236
|
{
|
|
11233
11237
|
type: "button",
|
|
11234
11238
|
onClick: l,
|
|
11235
11239
|
disabled: i || d,
|
|
11236
|
-
className:
|
|
11240
|
+
className: L(h, i || d ? v : m),
|
|
11237
11241
|
"aria-label": "Decrement quantity",
|
|
11238
11242
|
"data-testid": "quantity-decrement",
|
|
11239
11243
|
children: "-"
|
|
@@ -11250,7 +11254,7 @@ const Uf = {
|
|
|
11250
11254
|
min: e,
|
|
11251
11255
|
max: n,
|
|
11252
11256
|
step: "1",
|
|
11253
|
-
className: "w-12 h-
|
|
11257
|
+
className: "w-12 h-10 rounded-md border-0 bg-zinc-100 text-center text-2xl font-medium text-zinc-900 [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
11254
11258
|
"aria-label": `Selected quantity: ${s}`,
|
|
11255
11259
|
"data-testid": "quantity-input"
|
|
11256
11260
|
}
|
|
@@ -11261,7 +11265,7 @@ const Uf = {
|
|
|
11261
11265
|
type: "button",
|
|
11262
11266
|
onClick: o,
|
|
11263
11267
|
disabled: i || f,
|
|
11264
|
-
className:
|
|
11268
|
+
className: L(h, i || f ? v : m),
|
|
11265
11269
|
"aria-label": "Increment quantity",
|
|
11266
11270
|
"data-testid": "quantity-increment",
|
|
11267
11271
|
children: "+"
|
|
@@ -11291,7 +11295,7 @@ const Uf = {
|
|
|
11291
11295
|
"aria-checked": i,
|
|
11292
11296
|
"data-testid": "checkbox-button",
|
|
11293
11297
|
"data-checked": i,
|
|
11294
|
-
className:
|
|
11298
|
+
className: L(
|
|
11295
11299
|
"flex items-center gap-1.5 px-4 py-3 border-0 rounded-[26px] cursor-pointer text-sm min-h-[30px]",
|
|
11296
11300
|
"outline-none select-none transition-colors bg-zinc-100 hover:bg-zinc-200 text-[#C14615]",
|
|
11297
11301
|
r && "cursor-not-allowed opacity-60"
|
|
@@ -11314,7 +11318,7 @@ const Uf = {
|
|
|
11314
11318
|
/* @__PURE__ */ u(
|
|
11315
11319
|
"span",
|
|
11316
11320
|
{
|
|
11317
|
-
className:
|
|
11321
|
+
className: L(
|
|
11318
11322
|
"block w-3.5 h-3.5 rounded-[4px] relative",
|
|
11319
11323
|
i ? "bg-[#C14615]" : "bg-white shadow-[0_0_3px_rgba(0,0,0,0.4)]"
|
|
11320
11324
|
),
|
|
@@ -11389,7 +11393,7 @@ const Uf = {
|
|
|
11389
11393
|
labels: l,
|
|
11390
11394
|
initialExpanded: a = !1
|
|
11391
11395
|
}) => {
|
|
11392
|
-
const [c, d] = J(a), f = e.tickets.reduce((
|
|
11396
|
+
const [c, d] = J(a), f = e.tickets.reduce((h, m) => h + r(e.id, m.id), 0);
|
|
11393
11397
|
return /* @__PURE__ */ A("div", { className: "w-full overflow-hidden border-b border-zinc-200", "data-testid": "upgrade-ticket-header", children: [
|
|
11394
11398
|
/* @__PURE__ */ u(
|
|
11395
11399
|
"button",
|
|
@@ -11411,7 +11415,7 @@ const Uf = {
|
|
|
11411
11415
|
/* @__PURE__ */ u(
|
|
11412
11416
|
"span",
|
|
11413
11417
|
{
|
|
11414
|
-
className:
|
|
11418
|
+
className: L(
|
|
11415
11419
|
"inline-flex items-center justify-center text-zinc-500 text-xl transition-transform duration-200",
|
|
11416
11420
|
c && "rotate-180"
|
|
11417
11421
|
),
|
|
@@ -11427,139 +11431,140 @@ const Uf = {
|
|
|
11427
11431
|
"div",
|
|
11428
11432
|
{
|
|
11429
11433
|
id: `upgrade-items-${e.id}`,
|
|
11430
|
-
className:
|
|
11434
|
+
className: L(
|
|
11431
11435
|
"transition-all duration-300 overflow-hidden",
|
|
11432
11436
|
c ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"
|
|
11433
11437
|
),
|
|
11434
11438
|
"aria-hidden": !c,
|
|
11435
|
-
children: c && /* @__PURE__ */ u("div", { className: "px-5 pb-5 flex flex-col", "data-testid": "upgrade-ticket-items", children: e.tickets.length > 0 ? e.tickets.map((
|
|
11439
|
+
children: c && /* @__PURE__ */ u("div", { className: "px-5 pb-5 flex flex-col", "data-testid": "upgrade-ticket-items", children: e.tickets.length > 0 ? e.tickets.map((h) => /* @__PURE__ */ u(
|
|
11436
11440
|
Zf,
|
|
11437
11441
|
{
|
|
11438
|
-
item:
|
|
11439
|
-
quantity: r(e.id,
|
|
11440
|
-
onChange: (m) => n(e.id,
|
|
11442
|
+
item: h,
|
|
11443
|
+
quantity: r(e.id, h.id),
|
|
11444
|
+
onChange: (m) => n(e.id, h.id, m),
|
|
11441
11445
|
getTotalSelectedTickets: i,
|
|
11442
11446
|
userMaxLimit: s,
|
|
11443
11447
|
settings: o,
|
|
11444
11448
|
labels: l
|
|
11445
11449
|
},
|
|
11446
|
-
|
|
11450
|
+
h.id
|
|
11447
11451
|
)) : /* @__PURE__ */ u("div", { className: "px-5 py-10 text-center", children: /* @__PURE__ */ u("p", { className: "m-0 text-zinc-500 italic", children: l.noUpgradeTicketsAvailable }) }) })
|
|
11448
11452
|
}
|
|
11449
11453
|
)
|
|
11450
11454
|
] });
|
|
11451
11455
|
}, Eh = ({
|
|
11452
11456
|
userMaxLimit: t = 10,
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11457
|
+
initialExpanded: e = !1,
|
|
11458
|
+
labels: n,
|
|
11459
|
+
settings: r,
|
|
11460
|
+
ticketSelectionData: i,
|
|
11461
|
+
className: s = "",
|
|
11462
|
+
onSelectionChange: o
|
|
11458
11463
|
}) => {
|
|
11459
|
-
const
|
|
11460
|
-
const
|
|
11461
|
-
let
|
|
11462
|
-
for (const
|
|
11463
|
-
|
|
11464
|
-
for (const
|
|
11465
|
-
const
|
|
11466
|
-
|
|
11467
|
-
id:
|
|
11468
|
-
selectedQuantity:
|
|
11469
|
-
originalPrice:
|
|
11470
|
-
discountedPrice:
|
|
11471
|
-
},
|
|
11464
|
+
const l = it(() => i ?? [], [i]), a = { ...jf, ...n }, [c, d] = J(!0), f = ce(() => {
|
|
11465
|
+
const C = {};
|
|
11466
|
+
let w = t;
|
|
11467
|
+
for (const T of l) {
|
|
11468
|
+
C[T.id] = {};
|
|
11469
|
+
for (const N of T.tickets) {
|
|
11470
|
+
const $ = w > 0 ? Math.min(N.max, w) : 0;
|
|
11471
|
+
C[T.id][N.id] = {
|
|
11472
|
+
id: N.id,
|
|
11473
|
+
selectedQuantity: $,
|
|
11474
|
+
originalPrice: N.originalPrice,
|
|
11475
|
+
discountedPrice: N.price
|
|
11476
|
+
}, w -= $;
|
|
11472
11477
|
}
|
|
11473
11478
|
}
|
|
11474
|
-
return
|
|
11475
|
-
}, [
|
|
11476
|
-
const
|
|
11477
|
-
(
|
|
11479
|
+
return C;
|
|
11480
|
+
}, [l, t]), [h, m] = J(() => f()), v = It(!1), y = (C = h) => {
|
|
11481
|
+
const w = Object.values(C).reduce(
|
|
11482
|
+
(T, N) => T + Object.values(N).reduce(($, _) => $ + _.selectedQuantity, 0),
|
|
11478
11483
|
0
|
|
11479
11484
|
);
|
|
11480
|
-
for (const
|
|
11481
|
-
for (const
|
|
11482
|
-
const
|
|
11483
|
-
if (
|
|
11485
|
+
for (const T of l)
|
|
11486
|
+
for (const N of T.tickets) {
|
|
11487
|
+
const $ = C[T.id]?.[N.id]?.selectedQuantity ?? 0, _ = Math.min(N.max, t - (w - $));
|
|
11488
|
+
if ($ < _ && _ > 0) return !1;
|
|
11484
11489
|
}
|
|
11485
11490
|
return !0;
|
|
11486
|
-
}, b = (
|
|
11487
|
-
(
|
|
11491
|
+
}, b = (C, w) => h[C]?.[w]?.selectedQuantity ?? 0, k = () => Object.values(h).reduce(
|
|
11492
|
+
(C, w) => C + Object.values(w).reduce((T, N) => T + N.selectedQuantity, 0),
|
|
11488
11493
|
0
|
|
11489
|
-
),
|
|
11490
|
-
if (Object.values(
|
|
11491
|
-
const
|
|
11492
|
-
if (
|
|
11493
|
-
const
|
|
11494
|
-
...
|
|
11495
|
-
[
|
|
11496
|
-
...
|
|
11497
|
-
[
|
|
11498
|
-
id:
|
|
11499
|
-
selectedQuantity:
|
|
11500
|
-
originalPrice:
|
|
11501
|
-
discountedPrice:
|
|
11494
|
+
), S = (C, w, T) => {
|
|
11495
|
+
if (Object.values(h).reduce((M, P) => M + Object.entries(P).reduce((R, [H, Q]) => P === h[C] && H === w ? R : R + Q.selectedQuantity, 0), 0) + T > t) return;
|
|
11496
|
+
const $ = l.find((M) => M.id === C)?.tickets.find((M) => M.id === w);
|
|
11497
|
+
if (!$) return;
|
|
11498
|
+
const _ = {
|
|
11499
|
+
...h,
|
|
11500
|
+
[C]: {
|
|
11501
|
+
...h[C],
|
|
11502
|
+
[w]: {
|
|
11503
|
+
id: w,
|
|
11504
|
+
selectedQuantity: T,
|
|
11505
|
+
originalPrice: $.originalPrice,
|
|
11506
|
+
discountedPrice: $.price
|
|
11502
11507
|
}
|
|
11503
11508
|
}
|
|
11504
11509
|
};
|
|
11505
|
-
|
|
11506
|
-
const
|
|
11507
|
-
(
|
|
11510
|
+
m(_), o?.(_);
|
|
11511
|
+
const U = y(_), V = Object.values(_).reduce(
|
|
11512
|
+
(M, P) => M + Object.values(P).reduce((R, H) => R + H.selectedQuantity, 0),
|
|
11508
11513
|
0
|
|
11509
11514
|
);
|
|
11510
|
-
|
|
11511
|
-
},
|
|
11512
|
-
if (
|
|
11513
|
-
const
|
|
11514
|
-
|
|
11515
|
+
U && !c ? d(!0) : !U && V !== 0 && c && d(!1);
|
|
11516
|
+
}, I = (C) => {
|
|
11517
|
+
if (d(C), C) {
|
|
11518
|
+
const w = f();
|
|
11519
|
+
m(w), o?.(w);
|
|
11515
11520
|
} else {
|
|
11516
|
-
const
|
|
11517
|
-
for (const
|
|
11518
|
-
|
|
11519
|
-
for (const
|
|
11520
|
-
|
|
11521
|
-
id:
|
|
11521
|
+
const w = {};
|
|
11522
|
+
for (const T of l) {
|
|
11523
|
+
w[T.id] = {};
|
|
11524
|
+
for (const N of T.tickets)
|
|
11525
|
+
w[T.id][N.id] = {
|
|
11526
|
+
id: N.id,
|
|
11522
11527
|
selectedQuantity: 0,
|
|
11523
|
-
originalPrice:
|
|
11524
|
-
discountedPrice:
|
|
11528
|
+
originalPrice: N.originalPrice,
|
|
11529
|
+
discountedPrice: N.price
|
|
11525
11530
|
};
|
|
11526
11531
|
}
|
|
11527
|
-
|
|
11532
|
+
m(w), o?.(w);
|
|
11528
11533
|
}
|
|
11529
11534
|
};
|
|
11530
11535
|
return qe(() => {
|
|
11531
|
-
!
|
|
11532
|
-
}, [
|
|
11536
|
+
!v.current && c && (o?.(h), v.current = !0);
|
|
11537
|
+
}, [c, h, o]), /* @__PURE__ */ A(
|
|
11533
11538
|
"div",
|
|
11534
11539
|
{
|
|
11535
|
-
className:
|
|
11540
|
+
className: L("flex flex-col w-full font-sans", s),
|
|
11536
11541
|
"data-testid": "ticket-selection",
|
|
11537
11542
|
children: [
|
|
11538
11543
|
/* @__PURE__ */ A("div", { className: "flex items-center justify-between py-2 gap-4", "data-testid": "ticket-selection-header", children: [
|
|
11539
|
-
/* @__PURE__ */ u("h3", { className: "text-xl font-semibold m-0", "data-testid": "ticket-selection-title", children:
|
|
11544
|
+
/* @__PURE__ */ u("h3", { className: "text-xl font-semibold m-0", "data-testid": "ticket-selection-title", children: a.ticketSelectionTitle }),
|
|
11540
11545
|
/* @__PURE__ */ u(
|
|
11541
11546
|
Gf,
|
|
11542
11547
|
{
|
|
11543
|
-
label:
|
|
11544
|
-
checked:
|
|
11545
|
-
onChange:
|
|
11548
|
+
label: a.selectAllButtonLabel,
|
|
11549
|
+
checked: c,
|
|
11550
|
+
onChange: I
|
|
11546
11551
|
}
|
|
11547
11552
|
)
|
|
11548
11553
|
] }),
|
|
11549
|
-
|
|
11554
|
+
l.map((C) => /* @__PURE__ */ u(
|
|
11550
11555
|
Qf,
|
|
11551
11556
|
{
|
|
11552
|
-
title:
|
|
11553
|
-
exhibition:
|
|
11554
|
-
onQuantityChange:
|
|
11557
|
+
title: C.exhibitionName,
|
|
11558
|
+
exhibition: C,
|
|
11559
|
+
onQuantityChange: S,
|
|
11555
11560
|
getTicketQuantity: b,
|
|
11556
|
-
getTotalSelectedTickets:
|
|
11561
|
+
getTotalSelectedTickets: k,
|
|
11557
11562
|
userMaxLimit: t,
|
|
11558
|
-
settings:
|
|
11559
|
-
labels:
|
|
11560
|
-
initialExpanded:
|
|
11563
|
+
settings: r,
|
|
11564
|
+
labels: a,
|
|
11565
|
+
initialExpanded: e
|
|
11561
11566
|
},
|
|
11562
|
-
|
|
11567
|
+
C.id
|
|
11563
11568
|
))
|
|
11564
11569
|
]
|
|
11565
11570
|
}
|