@tempots/beatui 0.80.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/{ar-DwHLVgKj.cjs → ar-D7CXDmVZ.cjs} +1 -1
  2. package/dist/{ar-Bo_FZZi7.js → ar-nOSKXpIW.js} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +101 -99
  5. package/dist/beatui.css +393 -0
  6. package/dist/beatui.tailwind.css +393 -0
  7. package/dist/{de-zI5mdV4M.cjs → de-WzsOu9Gn.cjs} +1 -1
  8. package/dist/{de-CCqwOkqN.js → de-f2xcEb34.js} +1 -1
  9. package/dist/{deep-merge-1uN6CG6K.js → deep-merge-CiOwVWn8.js} +269 -284
  10. package/dist/deep-merge-DxZqCkE5.cjs +1 -0
  11. package/dist/{duration-input-C9kpsw-t.js → duration-input-B3vnnwBZ.js} +30 -29
  12. package/dist/duration-input-Dg5SX3lM.cjs +1 -0
  13. package/dist/{es-BF02UrPL.js → es-CDqqzpCw.js} +1 -1
  14. package/dist/{es-Cw90CAbu.cjs → es-Ds2Xf3wV.cjs} +1 -1
  15. package/dist/{fa-DPQV4YB8.js → fa-C7tE_hR3.js} +1 -1
  16. package/dist/{fa-B4lssnzR.cjs → fa-Ct1UtDB7.cjs} +1 -1
  17. package/dist/{fr-1Kd6z1F-.cjs → fr-CzAkRFed.cjs} +1 -1
  18. package/dist/{fr-dmxPhwkD.js → fr-yOW_68YY.js} +1 -1
  19. package/dist/{he-BtQbrVt3.js → he-D2oUloCJ.js} +1 -1
  20. package/dist/{he-CJ3XnuPm.cjs → he-DlXALrK7.cjs} +1 -1
  21. package/dist/{hi-BpfnFKHp.cjs → hi-3dBhLwDs.cjs} +1 -1
  22. package/dist/{hi-D_Le4Yka.js → hi-D5ZlZoQq.js} +1 -1
  23. package/dist/{index-CfaWytS2.cjs → index-C5YCCgnn.cjs} +1 -1
  24. package/dist/{index-K6u33-GC.cjs → index-ChsRjiIp.cjs} +17 -17
  25. package/dist/{index-CGEzILlC.js → index-CiAVfKIZ.js} +1 -1
  26. package/dist/{index-YtW7SCWB.js → index-DT6-HMMz.js} +8 -7
  27. package/dist/index.cjs.js +4 -4
  28. package/dist/index.es.js +296 -291
  29. package/dist/{it-DyHjSuHN.js → it-6e6X-4BB.js} +1 -1
  30. package/dist/{it-COCZ9NyB.cjs → it-DohtcWi9.cjs} +1 -1
  31. package/dist/{ja-X43lABza.js → ja-BxNuNo2H.js} +1 -1
  32. package/dist/{ja--NdggLU9.cjs → ja-eyTArrgS.cjs} +1 -1
  33. package/dist/json-schema/index.cjs.js +1 -8
  34. package/dist/json-schema/index.es.js +1391 -7471
  35. package/dist/json-schema-display/index.cjs.js +1 -0
  36. package/dist/json-schema-display/index.es.js +846 -0
  37. package/dist/json-structure/index.cjs.js +1 -1
  38. package/dist/json-structure/index.es.js +89 -87
  39. package/dist/{ko-BUvb0ggK.cjs → ko-BFLCDMMs.cjs} +1 -1
  40. package/dist/{ko-B9g9iw99.js → ko-Ch0jFsBV.js} +1 -1
  41. package/dist/modal-D2xE47kr.cjs +1 -0
  42. package/dist/{modal-CSHIhHvI.js → modal-hkQD1bqZ.js} +22 -21
  43. package/dist/{nl-0S25Gsld.cjs → nl-Bx2ACvr4.cjs} +1 -1
  44. package/dist/{nl-Ew5jnSsT.js → nl-NuTdZO1s.js} +1 -1
  45. package/dist/notice-C0SmlheE.cjs +1 -0
  46. package/dist/{notice-C-964yaY.js → notice-CZHWWwOQ.js} +52 -51
  47. package/dist/oneof-branch-detection-BVNoKU9d.js +6281 -0
  48. package/dist/oneof-branch-detection-C8g3eWnx.cjs +8 -0
  49. package/dist/{pl-C9f6UBSe.js → pl-Bs4nLJ__.js} +1 -1
  50. package/dist/{pl-B3k-K3S4.cjs → pl-QHl6sl8f.cjs} +1 -1
  51. package/dist/prosemirror/index.cjs.js +1 -1
  52. package/dist/prosemirror/index.es.js +1 -1
  53. package/dist/{pt-DYtAvbrw.js → pt-BETjHZrL.js} +1 -1
  54. package/dist/{pt-CKoikRO5.cjs → pt-DZGw2Z-1.cjs} +1 -1
  55. package/dist/{ru-ZexN-b8V.js → ru-Bi1_DEKM.js} +1 -1
  56. package/dist/{ru-COb7RSDt.cjs → ru-D03IuLqh.cjs} +1 -1
  57. package/dist/stack-BJgsPJ9A.js +873 -0
  58. package/dist/stack-DcZ_u50f.cjs +1 -0
  59. package/dist/string-B9vVyfq3.cjs +1 -0
  60. package/dist/string-DYyMxBl-.js +19 -0
  61. package/dist/text-input-CByq5OIo.cjs +1 -0
  62. package/dist/text-input-CFJntP7G.js +287 -0
  63. package/dist/{toolbar-DNpBIoJo.js → toolbar-DR2Zd4Oo.js} +1 -1
  64. package/dist/toolbar-TPWYzoiF.cjs +1 -0
  65. package/dist/{tr-tO_EH-Y2.cjs → tr-B_-_1wua.cjs} +1 -1
  66. package/dist/{tr-BDvn05-H.js → tr-DiYB-FwX.js} +1 -1
  67. package/dist/translations-B4-Zd2LM.cjs +1 -0
  68. package/dist/translations-Cq8bUKJP.js +584 -0
  69. package/dist/{translations-DwGC_94w.cjs → translations-D62qqNV9.cjs} +1 -1
  70. package/dist/{translations-CfWR4loD.js → translations-DPr6c05Z.js} +1 -1
  71. package/dist/types/components/json-schema/schema-conditionals.d.ts +11 -0
  72. package/dist/types/components/json-schema/schema-context.d.ts +1 -1
  73. package/dist/types/components/json-schema-display/display-widget-customization.d.ts +61 -0
  74. package/dist/types/components/json-schema-display/display-wrapper.d.ts +14 -0
  75. package/dist/types/components/json-schema-display/displays/any-display.d.ts +14 -0
  76. package/dist/types/components/json-schema-display/displays/array-display.d.ts +13 -0
  77. package/dist/types/components/json-schema-display/displays/boolean-display.d.ts +13 -0
  78. package/dist/types/components/json-schema-display/displays/composition-display.d.ts +14 -0
  79. package/dist/types/components/json-schema-display/displays/enum-const-display.d.ts +13 -0
  80. package/dist/types/components/json-schema-display/displays/generic-display.d.ts +18 -0
  81. package/dist/types/components/json-schema-display/displays/null-display.d.ts +13 -0
  82. package/dist/types/components/json-schema-display/displays/number-display.d.ts +13 -0
  83. package/dist/types/components/json-schema-display/displays/object-display.d.ts +13 -0
  84. package/dist/types/components/json-schema-display/displays/string-display.d.ts +14 -0
  85. package/dist/types/components/json-schema-display/index.d.ts +14 -0
  86. package/dist/types/components/json-schema-display/json-schema-display.d.ts +25 -0
  87. package/dist/types/components/json-schema-display/mismatch.d.ts +14 -0
  88. package/dist/types/json-schema-display/index.d.ts +1 -0
  89. package/dist/{ur-DbEqQgS6.js → ur-B69X-xNs.js} +1 -1
  90. package/dist/{ur-BbnYJ3HS.cjs → ur-DyUSmIbo.cjs} +1 -1
  91. package/dist/use-form-CgZyrACX.js +864 -0
  92. package/dist/use-form-JjeKCINk.cjs +2 -0
  93. package/dist/utils-DEbsp9Q9.js +129 -0
  94. package/dist/utils-DIUEhA-Z.cjs +1 -0
  95. package/dist/{vi-CpZUeuSj.js → vi-BdzxA60L.js} +1 -1
  96. package/dist/{vi-ByBwvGQY.cjs → vi-CBmPaHxg.cjs} +1 -1
  97. package/dist/widget-customization-DRA7E9Zf.js +1072 -0
  98. package/dist/widget-customization-G-QLB1rw.cjs +1 -0
  99. package/dist/{zh-DnxK0ieB.cjs → zh-Cb1b8uik.cjs} +1 -1
  100. package/dist/{zh-DJyhKO0I.js → zh-Dn1UJiZa.js} +1 -1
  101. package/package.json +13 -7
  102. package/dist/deep-merge-CBIkQM4E.cjs +0 -1
  103. package/dist/duration-input-DHWhQJnn.cjs +0 -1
  104. package/dist/modal-cc8Ehngz.cjs +0 -1
  105. package/dist/notice-C_BWqu2K.cjs +0 -1
  106. package/dist/toolbar-D5FcnRju.cjs +0 -1
  107. package/dist/translations-0tLX4x7M.js +0 -866
  108. package/dist/translations-WPN3ibDg.cjs +0 -1
  109. package/dist/use-form-D4JFOcjo.cjs +0 -2
  110. package/dist/use-form-D4rqJkvG.js +0 -1731
  111. package/dist/widget-customization-BSjJz3_Y.js +0 -1195
  112. package/dist/widget-customization-CrFVrt4V.cjs +0 -1
@@ -1,9 +1,11 @@
1
- import { _ as J, g as Ke, t as Z, N as Je, b as pe, c as de, U as Ze, e as He, a as Xe, T as Ye, L as fe, f as me, h as Qe, G as et, i as tt, S as nt, j as rt } from "../deep-merge-1uN6CG6K.js";
2
- import { html as p, attr as m, Fragment as H, MapSignal as U, Value as I, computedOf as w, prop as it, WithElement as st, OnDispose as at } from "@tempots/dom";
3
- import { b, a as ne, I as B, S as V, L as ye, d as ut, M as ot, f as re, A as G, g as ct, i as ie } from "../use-form-D4rqJkvG.js";
4
- import { T as lt, B as E } from "../translations-0tLX4x7M.js";
5
- import { N as pt, B as dt, D as ft, a as mt, P as yt, b as gt, c as ht, d as bt, e as vt, F as xt } from "../duration-input-C9kpsw-t.js";
6
- import { l as $t } from "../colors-DPo9GEJR.js";
1
+ import { _ as J, g as Ke } from "../string-DYyMxBl-.js";
2
+ import { html as p, attr as m, Fragment as Z, MapSignal as U, Value as I, computedOf as w, prop as Je, WithElement as Ze, OnDispose as He } from "@tempots/dom";
3
+ import { b, a as ne, I as B, d as Xe, f as re, A as G, g as Ye } from "../use-form-CgZyrACX.js";
4
+ import { t as H, N as Qe, b as pe, c as de, U as et, e as tt, a as nt, T as rt, L as fe, f as me, g as it, G as st, h as at, S as ut, i as ot } from "../deep-merge-CiOwVWn8.js";
5
+ import { T as ct, B as V } from "../text-input-CFJntP7G.js";
6
+ import { N as lt, B as pt, D as dt, a as ft, P as mt, b as yt, c as gt, d as ht, e as bt, F as vt } from "../duration-input-B3vnnwBZ.js";
7
+ import { l as xt } from "../colors-DPo9GEJR.js";
8
+ import { S as E, L as ye, M as $t, i as ie } from "../stack-BJgsPJ9A.js";
7
9
  function It(e) {
8
10
  return e === "int64" || e === "int128" || e === "uint64" || e === "uint128";
9
11
  }
@@ -22,7 +24,7 @@ function Y(e) {
22
24
  function Tt(e) {
23
25
  return e === "string" || e === "boolean" || e === "null" || wt(e) || Y(e) || e === "uuid" || e === "uri" || e === "binary";
24
26
  }
25
- function ur(e) {
27
+ function cr(e) {
26
28
  return e === "object" || e === "array" || e === "set" || e === "map" || e === "tuple" || e === "choice" || e === "any";
27
29
  }
28
30
  function C(e) {
@@ -107,7 +109,7 @@ function N(e, t) {
107
109
  return;
108
110
  }
109
111
  }
110
- function or(e, t) {
112
+ function lr(e, t) {
111
113
  return N(e.$ref, t);
112
114
  }
113
115
  class Rt {
@@ -458,7 +460,7 @@ function ue(e) {
458
460
  function Pt(e) {
459
461
  return [...new Set(e)];
460
462
  }
461
- function cr(e) {
463
+ function pr(e) {
462
464
  const t = ee(e);
463
465
  return {
464
466
  resolve: (n) => (t.reset(), $e(n, e))
@@ -491,9 +493,9 @@ function Ie({
491
493
  controller: t
492
494
  }) {
493
495
  const n = Lt(e);
494
- return b(lt, {
496
+ return b(ct, {
495
497
  ...n,
496
- controller: Z(t)
498
+ controller: H(t)
497
499
  });
498
500
  }
499
501
  function Vt(e) {
@@ -515,7 +517,7 @@ function we({
515
517
  return e.isNullable ? b(ne, {
516
518
  ...n,
517
519
  controller: t,
518
- after: Je(
520
+ after: Qe(
519
521
  t.signal,
520
522
  t.disabled,
521
523
  (s) => t.change(s)
@@ -580,10 +582,10 @@ function Ae({
580
582
  }) {
581
583
  if (It(n)) {
582
584
  const s = Ut(e, n);
583
- return e.isNullable ? b(pt, {
585
+ return e.isNullable ? b(lt, {
584
586
  ...s,
585
587
  controller: t
586
- }) : b(dt, {
588
+ }) : b(pt, {
587
589
  ...s,
588
590
  controller: t
589
591
  });
@@ -649,9 +651,9 @@ function De({
649
651
  controller: t
650
652
  }) {
651
653
  const n = Wt(e);
652
- return b(Ze, {
654
+ return b(et, {
653
655
  ...n,
654
- controller: Z(t)
656
+ controller: H(t)
655
657
  });
656
658
  }
657
659
  function _t(e) {
@@ -670,39 +672,39 @@ function Se({
670
672
  const r = _t(e);
671
673
  switch (n) {
672
674
  case "date":
673
- return e.isNullable ? b(bt, {
675
+ return e.isNullable ? b(ht, {
674
676
  ...r,
675
677
  controller: t
676
- }) : b(vt, {
678
+ }) : b(bt, {
677
679
  ...r,
678
680
  controller: t
679
681
  });
680
682
  case "datetime":
681
- return e.isNullable ? b(gt, {
683
+ return e.isNullable ? b(yt, {
682
684
  ...r,
683
685
  controller: t
684
- }) : b(ht, {
686
+ }) : b(gt, {
685
687
  ...r,
686
688
  controller: t
687
689
  });
688
690
  case "time":
689
- return e.isNullable ? b(mt, {
691
+ return e.isNullable ? b(ft, {
690
692
  ...r,
691
693
  controller: t
692
- }) : b(yt, {
694
+ }) : b(mt, {
693
695
  ...r,
694
696
  controller: t
695
697
  });
696
698
  case "duration":
697
- return e.isNullable ? b(He, {
699
+ return e.isNullable ? b(tt, {
698
700
  ...r,
699
701
  controller: t
700
- }) : b(ft, {
702
+ }) : b(dt, {
701
703
  ...r,
702
704
  controller: t
703
705
  });
704
706
  default:
705
- return console.warn(`Unknown temporal type: ${n}`), H();
707
+ return console.warn(`Unknown temporal type: ${n}`), Z();
706
708
  }
707
709
  }
708
710
  function zt(e) {
@@ -719,9 +721,9 @@ function Oe({
719
721
  controller: t
720
722
  }) {
721
723
  const n = zt(e);
722
- return b(Xe, {
724
+ return b(nt, {
723
725
  ...n,
724
- controller: Z(t)
726
+ controller: H(t)
725
727
  });
726
728
  }
727
729
  function Gt(e) {
@@ -737,7 +739,7 @@ function Ce({
737
739
  controller: t
738
740
  }) {
739
741
  const n = Gt(e);
740
- return b(xt, {
742
+ return b(vt, {
741
743
  ...n,
742
744
  controller: t
743
745
  });
@@ -771,7 +773,7 @@ function K({
771
773
  controller: t
772
774
  }) {
773
775
  const n = Kt(e);
774
- return b(Ye, {
776
+ return b(rt, {
775
777
  ...n,
776
778
  controller: Jt(t)
777
779
  });
@@ -827,7 +829,7 @@ function Re({
827
829
  }) {
828
830
  const n = e.definition;
829
831
  return n.type !== "object" || !("properties" in n) ? (console.warn("StructureObjectControl requires an ObjectTypeDefinition"), p.div("Invalid object definition")) : U(t.signal, (r) => {
830
- const s = n.properties, a = n.required, u = n.additionalProperties, i = u !== !1, o = typeof u == "object" && u !== null ? u : { type: "any" }, c = n.minProperties ?? 0, l = n.maxProperties ?? 1 / 0, y = $t(s), h = new Set(
832
+ const s = n.properties, a = n.required, u = n.additionalProperties, i = u !== !1, o = typeof u == "object" && u !== null ? u : { type: "any" }, c = n.minProperties ?? 0, l = n.maxProperties ?? 1 / 0, y = xt(s), h = new Set(
831
833
  y.map(([x]) => x)
832
834
  ), f = Object.keys(r ?? {}), g = f.filter((x) => !h.has(x)), d = i && f.length < l && !e.readOnly, v = f.length > c && !e.readOnly, $ = y.map(([x, O]) => {
833
835
  const D = x, z = t.field(D), Ge = Ht(D, a);
@@ -846,7 +848,7 @@ function Re({
846
848
  p.div(
847
849
  m.class("bc-json-structure-additional-property-header"),
848
850
  p.strong(`${x}:`),
849
- E(
851
+ V(
850
852
  {
851
853
  variant: "text",
852
854
  size: "xs",
@@ -871,7 +873,7 @@ function Re({
871
873
  })
872
874
  )
873
875
  );
874
- }), q = d ? E(
876
+ }), q = d ? V(
875
877
  {
876
878
  variant: "outline",
877
879
  size: "sm",
@@ -1029,7 +1031,7 @@ function Ne({
1029
1031
  }).append(l),
1030
1032
  controller: y
1031
1033
  });
1032
- return h.map((g) => g ? V(
1034
+ return h.map((g) => g ? E(
1033
1035
  m.class("bc-stack--gap-1"),
1034
1036
  f,
1035
1037
  ye(
@@ -1098,7 +1100,7 @@ function qe({
1098
1100
  p.div(
1099
1101
  m.class("bc-json-structure-map-entry-header"),
1100
1102
  p.strong(m.class("bc-json-structure-map-entry-key"), `${d}:`),
1101
- E(
1103
+ V(
1102
1104
  {
1103
1105
  variant: "text",
1104
1106
  size: "xs",
@@ -1122,7 +1124,7 @@ function qe({
1122
1124
  })
1123
1125
  )
1124
1126
  );
1125
- }), h = c ? E(
1127
+ }), h = c ? V(
1126
1128
  {
1127
1129
  variant: "outline",
1128
1130
  size: "sm",
@@ -1278,7 +1280,7 @@ function ln({
1278
1280
  selector: t,
1279
1281
  inner: n
1280
1282
  }) {
1281
- const r = V(
1283
+ const r = E(
1282
1284
  m.class("bc-stack--gap-2 bc-stack--align-start"),
1283
1285
  t,
1284
1286
  n
@@ -1372,7 +1374,7 @@ function Fe({
1372
1374
  const u = a.map((d) => {
1373
1375
  const $ = r[d].name || d;
1374
1376
  return { value: d, label: $ };
1375
- }), i = w(t.signal)((d) => pn(d, r, s)), o = I.get(i) || a[0], c = it(o);
1377
+ }), i = w(t.signal)((d) => pn(d, r, s)), o = I.get(i) || a[0], c = Je(o);
1376
1378
  t.onDispose(c.dispose);
1377
1379
  let l = !1;
1378
1380
  const y = i.on((d) => {
@@ -1407,7 +1409,7 @@ function Fe({
1407
1409
  s
1408
1410
  );
1409
1411
  t.change(R);
1410
- }, q = new ut(
1412
+ }, q = new Xe(
1411
1413
  [...t.path, I.get(d)],
1412
1414
  A,
1413
1415
  $,
@@ -1446,7 +1448,7 @@ function Le({
1446
1448
  controller: t
1447
1449
  }) {
1448
1450
  const n = mn(e);
1449
- return Qe({
1451
+ return it({
1450
1452
  ...n,
1451
1453
  options: (e.enumValues ?? []).map((r) => ({
1452
1454
  type: "value",
@@ -1460,11 +1462,11 @@ function Ve({
1460
1462
  ctx: e,
1461
1463
  controller: t
1462
1464
  }) {
1463
- return H(
1464
- st(() => {
1465
+ return Z(
1466
+ Ze(() => {
1465
1467
  I.get(t.signal) !== e.constValue && t.change(e.constValue);
1466
1468
  }),
1467
- et(ot(e.label, ": "), ye(String(e.constValue)))
1469
+ st($t(e.label, ": "), ye(String(e.constValue)))
1468
1470
  );
1469
1471
  }
1470
1472
  function yn(e) {
@@ -1612,7 +1614,7 @@ function xn({
1612
1614
  const a = Object.fromEntries(
1613
1615
  e.map((u) => [u.value, u.label])
1614
1616
  );
1615
- return nt({
1617
+ return ut({
1616
1618
  options: a,
1617
1619
  value: t,
1618
1620
  onChange: (u) => n(u),
@@ -1635,9 +1637,9 @@ function $n({
1635
1637
  selector: n,
1636
1638
  inner: r
1637
1639
  }) {
1638
- return e.isRoot ? t ? V(m.class("bc-stack--gap-2"), n, r) : r : B({
1640
+ return e.isRoot ? t ? E(m.class("bc-stack--gap-2"), n, r) : r : B({
1639
1641
  ...yn(e),
1640
- content: t ? V(
1642
+ content: t ? E(
1641
1643
  m.class("bc-stack--gap-2 bc-stack--align-start"),
1642
1644
  n,
1643
1645
  r
@@ -1654,7 +1656,7 @@ function In({
1654
1656
  s = r;
1655
1657
  else
1656
1658
  return console.warn("StructureUnionControl called with non-array type"), j({ ctx: e, controller: t });
1657
- const a = s.includes("null"), u = Q(r), i = a && u.length > 0 ? u : s, o = vn(i), c = new tt(
1659
+ const a = s.includes("null"), u = Q(r), i = a && u.length > 0 ? u : s, o = vn(i), c = new at(
1658
1660
  t.path,
1659
1661
  t.change,
1660
1662
  t.signal,
@@ -2171,7 +2173,7 @@ class An {
2171
2173
  ), !0;
2172
2174
  }
2173
2175
  }
2174
- function lr(e, t, n) {
2176
+ function dr(e, t, n) {
2175
2177
  return Ee(e, n).validate(t);
2176
2178
  }
2177
2179
  function Mn(e, t) {
@@ -2350,7 +2352,7 @@ function Nn(e) {
2350
2352
  const t = e.expected;
2351
2353
  return t && t.length <= 5 ? `Must be one of: ${t.map((r) => JSON.stringify(r)).join(", ")}` : "Invalid value";
2352
2354
  }
2353
- function pr(e) {
2355
+ function fr(e) {
2354
2356
  const t = /* @__PURE__ */ new Map();
2355
2357
  for (const n of e) {
2356
2358
  const r = t.get(n.path) ?? [];
@@ -2358,13 +2360,13 @@ function pr(e) {
2358
2360
  }
2359
2361
  return t;
2360
2362
  }
2361
- function dr(e, t) {
2363
+ function mr(e, t) {
2362
2364
  return e.filter((n) => n.path === t);
2363
2365
  }
2364
- function fr(e, t) {
2366
+ function yr(e, t) {
2365
2367
  return e.some((n) => n.path === t);
2366
2368
  }
2367
- function mr(e, t) {
2369
+ function gr(e, t) {
2368
2370
  const n = t === "" ? "/" : `${t}/`;
2369
2371
  return e.filter((r) => r.path.startsWith(n));
2370
2372
  }
@@ -2441,13 +2443,13 @@ let L = null;
2441
2443
  function F() {
2442
2444
  return L || (L = new _()), L;
2443
2445
  }
2444
- function yr(e) {
2446
+ function hr(e) {
2445
2447
  L = e;
2446
2448
  }
2447
- function gr(e) {
2449
+ function br(e) {
2448
2450
  return new _(e);
2449
2451
  }
2450
- function hr(e, t, n) {
2452
+ function vr(e, t, n) {
2451
2453
  return {
2452
2454
  name: `type:${e}`,
2453
2455
  registration: {
@@ -2460,7 +2462,7 @@ function hr(e, t, n) {
2460
2462
  }
2461
2463
  };
2462
2464
  }
2463
- function br(e, t, n) {
2465
+ function xr(e, t, n) {
2464
2466
  return {
2465
2467
  name: `format:${e}`,
2466
2468
  registration: {
@@ -2474,7 +2476,7 @@ function br(e, t, n) {
2474
2476
  }
2475
2477
  };
2476
2478
  }
2477
- function vr(e, t, n, r) {
2479
+ function $r(e, t, n, r) {
2478
2480
  return {
2479
2481
  name: `type:${e}:format:${t}`,
2480
2482
  registration: {
@@ -2489,7 +2491,7 @@ function vr(e, t, n, r) {
2489
2491
  }
2490
2492
  };
2491
2493
  }
2492
- function xr(e, t, n, r) {
2494
+ function Ir(e, t, n, r) {
2493
2495
  return {
2494
2496
  name: e,
2495
2497
  registration: {
@@ -2511,7 +2513,7 @@ function qn(e, t) {
2511
2513
  }
2512
2514
  return F().findBestWidget(e);
2513
2515
  }
2514
- function $r(e) {
2516
+ function wr(e) {
2515
2517
  const t = e.definition, n = {};
2516
2518
  if (typeof t == "object" && "x:ui" in t) {
2517
2519
  const r = t["x:ui"];
@@ -2539,10 +2541,10 @@ function Be(e) {
2539
2541
  return n.type;
2540
2542
  }
2541
2543
  }
2542
- function Ir(e) {
2544
+ function Tr(e) {
2543
2545
  return Be(e) !== void 0;
2544
2546
  }
2545
- function wr(e, t) {
2547
+ function jr(e, t) {
2546
2548
  const n = Be(e);
2547
2549
  if (n) {
2548
2550
  if (t) {
@@ -2560,7 +2562,7 @@ function wr(e, t) {
2560
2562
  }
2561
2563
  return qn(e, t);
2562
2564
  }
2563
- function Tr(e, t, n) {
2565
+ function Ar(e, t, n) {
2564
2566
  return {
2565
2567
  ...e,
2566
2568
  ...t,
@@ -2769,7 +2771,7 @@ function Pn(e = F()) {
2769
2771
  function Fn(e = F()) {
2770
2772
  return e.has("string") && e.has("object") && e.has("array");
2771
2773
  }
2772
- function jr(e = F()) {
2774
+ function Mr(e = F()) {
2773
2775
  Fn(e) || Pn(e);
2774
2776
  }
2775
2777
  function Ln(e) {
@@ -3048,7 +3050,7 @@ function er(e) {
3048
3050
  }
3049
3051
  return Object.keys(a).length > 0 && (s.dependencies = a), ie.invalid(s);
3050
3052
  }
3051
- function Ar({
3053
+ function Dr({
3052
3054
  schema: e,
3053
3055
  initialValue: t,
3054
3056
  validationMode: n,
@@ -3062,7 +3064,7 @@ function Ar({
3062
3064
  }, l) {
3063
3065
  const y = t !== void 0 ? I.get(t) : void 0, h = Ln(e);
3064
3066
  let f;
3065
- t === void 0 ? f = h ?? {} : c ? f = rt(
3067
+ t === void 0 ? f = h ?? {} : c ? f = ot(
3066
3068
  h,
3067
3069
  y
3068
3070
  ) : f = y;
@@ -3073,14 +3075,14 @@ function Ar({
3073
3075
  o(O);
3074
3076
  }
3075
3077
  return er(x);
3076
- }, { controller: $, setStatus: A } = ct({
3078
+ }, { controller: $, setStatus: A } = Ye({
3077
3079
  initialValue: f,
3078
3080
  validationMode: d,
3079
3081
  validateDebounceMs: r,
3080
3082
  validate: d === "onSubmit" ? void 0 : v,
3081
3083
  onChange: i
3082
- }), S = H(
3083
- at(() => {
3084
+ }), S = Z(
3085
+ He(() => {
3084
3086
  $.dispose();
3085
3087
  }),
3086
3088
  wn({
@@ -3096,41 +3098,41 @@ function Ar({
3096
3098
  export {
3097
3099
  _ as DefaultWidgetRegistry,
3098
3100
  W as INTEGER_BOUNDS,
3099
- Ar as JSONStructureForm,
3101
+ Dr as JSONStructureForm,
3100
3102
  Rt as RefResolver,
3101
3103
  te as StructureContext,
3102
3104
  wn as StructureControl,
3103
3105
  j as StructureGenericControl,
3104
- cr as createExtendsResolver,
3106
+ pr as createExtendsResolver,
3105
3107
  ee as createRefResolver,
3106
3108
  kt as createStructureContext,
3107
3109
  Ee as createValidator,
3108
- gr as createWidgetRegistry,
3109
- jr as ensureDefaultWidgets,
3110
+ br as createWidgetRegistry,
3111
+ Mr as ensureDefaultWidgets,
3110
3112
  Ln as extractStructureDefaults,
3111
- br as forFormat,
3112
- xr as forMatcher,
3113
- hr as forType,
3114
- vr as forTypeAndFormat,
3113
+ xr as forFormat,
3114
+ Ir as forMatcher,
3115
+ vr as forType,
3116
+ $r as forTypeAndFormat,
3115
3117
  Mn as formatValidationError,
3116
3118
  Ue as formatValidationErrors,
3117
- mr as getChildErrors,
3118
- dr as getErrorsForPath,
3119
+ gr as getChildErrors,
3120
+ mr as getErrorsForPath,
3119
3121
  Be as getExplicitWidgetName,
3120
3122
  F as getGlobalWidgetRegistry,
3121
3123
  Q as getNonNullTypes,
3122
3124
  se as getResolvedType,
3123
- $r as getWidgetOptions,
3124
- pr as groupErrorsByPath,
3125
+ wr as getWidgetOptions,
3126
+ fr as groupErrorsByPath,
3125
3127
  Dt as hasConstValue,
3126
- Ir as hasCustomWidget,
3128
+ Tr as hasCustomWidget,
3127
3129
  Fn as hasDefaultWidgets,
3128
3130
  Mt as hasEnumValue,
3129
- fr as hasErrorsAtPath,
3131
+ yr as hasErrorsAtPath,
3130
3132
  ge as isArrayTypeDefinition,
3131
3133
  It as isBigIntType,
3132
3134
  xe as isChoiceTypeDefinition,
3133
- ur as isCompoundType,
3135
+ cr as isCompoundType,
3134
3136
  X as isFloatType,
3135
3137
  P as isIntegerType,
3136
3138
  be as isMapTypeDefinition,
@@ -3144,14 +3146,14 @@ export {
3144
3146
  ve as isTupleTypeDefinition,
3145
3147
  At as isTypeDefinition,
3146
3148
  C as isTypeReference,
3147
- Tr as mergeWidgetOptions,
3149
+ Ar as mergeWidgetOptions,
3148
3150
  Ot as parseRefPath,
3149
3151
  Pn as registerDefaultWidgets,
3150
3152
  $e as resolveExtends,
3151
3153
  N as resolveRef,
3152
- or as resolveTypeReference,
3154
+ lr as resolveTypeReference,
3153
3155
  qn as resolveWidget,
3154
- wr as resolveWidgetWithOverride,
3155
- yr as setGlobalWidgetRegistry,
3156
- lr as validate
3156
+ jr as resolveWidgetWithOverride,
3157
+ hr as setGlobalWidgetRegistry,
3158
+ dr as validate
3157
3159
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-WPN3ibDg.cjs"),a={loadingExtended:"로딩 중입니다. 잠시만 기다려 주세요",loadingShort:"로딩 중...",locale:"지역",iconDescription:"아이콘",loadingIcon:"로딩 아이콘",failedToLoadIcon:"아이콘 로드 실패",editLabel:"편집",selectOne:"하나 선택",selectNone:"없음",selectMany:"여러 개 선택",noResults:"결과 없음",passwordPlaceholderText:"비밀번호",togglePasswordVisibility:"비밀번호 표시 전환",toggleMenu:"메뉴 전환",toggleAside:"사이드 패널 전환",mainNavigation:"메인 네비게이션",sidebar:"사이드바",closeDrawer:"드로어 닫기",closeModal:"모달 닫기",confirm:"확인",cancel:"취소",addLabel:"추가",removeItem:"항목 제거",currentLocale:"한국어",ar:"아랍어",de:"독일어",en:"영어",es:"스페인어",fr:"프랑스어",hi:"힌디어",it:"이탈리아어",ja:"일본어",ko:"한국어",nl:"네덜란드어",pl:"폴란드어",pt:"포르투갈어",ru:"러시아어",tr:"터키어",vi:"베트남어",zh:"중국어",he:"히브리어",fa:"페르시아어",ur:"우르두어",emailPlaceholderText:"이메일을 입력하세요",incrementValue:"값 증가",decrementValue:"값 감소",dropZoneInstructions:e=>e?"클릭하여 선택하거나 파일을 여기로 드래그하세요, 또는 Enter 또는 Space 키를 눌러 파일 선택기를 여세요":"파일을 여기로 드래그하세요",fileSizeUnits:["바이트","KB","MB","GB","TB"],removeFile:"파일 제거",clearAllFiles:"모든 파일 지우기",clearValue:"값 지우기",unknownType:"알 수 없는 형식",filesInputInstructions:(e,o,t)=>{let n=(e==null||e>1,"클릭하여 선택하거나 파일을 여기로 드래그하세요");if(e||o){const l=[];if(e!=null&&e>1&&l.push(`최대 ${e}개 파일`),o&&t){const i=r.formatFileSize(o,{units:t});l.push(`각각 최대 ${i}`)}l.length>0&&(n+=` (${l.join(", ")})`)}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF 로딩 중...",loadFailed:"PDF 로드 실패",invalidPdf:"유효하지 않은 PDF 파일",pageOutOfRange:(e,o)=>`페이지 ${e}이(가) 범위를 벗어났습니다 (1-${o})`,renderFailed:"PDF 페이지 렌더링 실패"}};exports.default=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-B4-Zd2LM.cjs"),a={loadingExtended:"로딩 중입니다. 잠시만 기다려 주세요",loadingShort:"로딩 중...",locale:"지역",iconDescription:"아이콘",loadingIcon:"로딩 아이콘",failedToLoadIcon:"아이콘 로드 실패",editLabel:"편집",selectOne:"하나 선택",selectNone:"없음",selectMany:"여러 개 선택",noResults:"결과 없음",passwordPlaceholderText:"비밀번호",togglePasswordVisibility:"비밀번호 표시 전환",toggleMenu:"메뉴 전환",toggleAside:"사이드 패널 전환",mainNavigation:"메인 네비게이션",sidebar:"사이드바",closeDrawer:"드로어 닫기",closeModal:"모달 닫기",confirm:"확인",cancel:"취소",addLabel:"추가",removeItem:"항목 제거",currentLocale:"한국어",ar:"아랍어",de:"독일어",en:"영어",es:"스페인어",fr:"프랑스어",hi:"힌디어",it:"이탈리아어",ja:"일본어",ko:"한국어",nl:"네덜란드어",pl:"폴란드어",pt:"포르투갈어",ru:"러시아어",tr:"터키어",vi:"베트남어",zh:"중국어",he:"히브리어",fa:"페르시아어",ur:"우르두어",emailPlaceholderText:"이메일을 입력하세요",incrementValue:"값 증가",decrementValue:"값 감소",dropZoneInstructions:e=>e?"클릭하여 선택하거나 파일을 여기로 드래그하세요, 또는 Enter 또는 Space 키를 눌러 파일 선택기를 여세요":"파일을 여기로 드래그하세요",fileSizeUnits:["바이트","KB","MB","GB","TB"],removeFile:"파일 제거",clearAllFiles:"모든 파일 지우기",clearValue:"값 지우기",unknownType:"알 수 없는 형식",filesInputInstructions:(e,o,t)=>{let n=(e==null||e>1,"클릭하여 선택하거나 파일을 여기로 드래그하세요");if(e||o){const l=[];if(e!=null&&e>1&&l.push(`최대 ${e}개 파일`),o&&t){const i=r.formatFileSize(o,{units:t});l.push(`각각 최대 ${i}`)}l.length>0&&(n+=` (${l.join(", ")})`)}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF 로딩 중...",loadFailed:"PDF 로드 실패",invalidPdf:"유효하지 않은 PDF 파일",pageOutOfRange:(e,o)=>`페이지 ${e}이(가) 범위를 벗어났습니다 (1-${o})`,renderFailed:"PDF 페이지 렌더링 실패"}};exports.default=a;
@@ -1,4 +1,4 @@
1
- import { f as r } from "./translations-0tLX4x7M.js";
1
+ import { f as r } from "./translations-Cq8bUKJP.js";
2
2
  const d = {
3
3
  loadingExtended: "로딩 중입니다. 잠시만 기다려 주세요",
4
4
  loadingShort: "로딩 중...",
@@ -0,0 +1 @@
1
+ "use strict";const r=require("@tempots/dom"),w=require("./timer-BJHOsuS6.cjs"),S=require("./use-form-JjeKCINk.cjs"),M=require("./translations-B4-Zd2LM.cjs"),q=require("./text-input-CByq5OIo.cjs"),P=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","details[open]"].join(", ");function U(o){return Array.from(o.querySelectorAll(P)).filter(t=>{const s=t;return s.offsetWidth>0&&s.offsetHeight>0&&!s.hasAttribute("inert")&&window.getComputedStyle(s).visibility!=="hidden"})}function O(o={}){const{active:t=!0,escapeDeactivates:s=!0,onEscape:e,initialFocus:n,returnFocus:a,clickOutsideDeactivates:i=!1,onClickOutside:d}=o;return r.WithElement(p=>{let f=t,h=null,c=[];typeof document<"u"&&(h=document.activeElement);const v=()=>{c=U(p)},b=u=>{if(f){if(s&&u.key==="Escape"){u.preventDefault(),e?.();return}if(u.key==="Tab"){if(v(),c.length===0){u.preventDefault();return}const l=c.indexOf(document.activeElement);u.shiftKey?l<=0&&(u.preventDefault(),c[c.length-1]?.focus()):l>=c.length-1&&(u.preventDefault(),c[0]?.focus())}}},g=u=>{if(!f||!i)return;const l=u.target;p.contains(l)||d?.()},y=()=>{if(!f)return;v();let u=null;typeof n=="function"?u=n():n?u=n:c.length>0&&(u=c[0]),u&&setTimeout(()=>{u?.focus()},50),document.addEventListener("keydown",b,!0),i&&document.addEventListener("click",g,!0)},x=()=>{f=!1,document.removeEventListener("keydown",b,!0),document.removeEventListener("click",g,!0);let u=null;typeof a=="function"?u=a():a?u=a:h&&(u=h),u&&document.body.contains(u)&&setTimeout(()=>{u?.focus()},0)};return setTimeout(()=>y(),0),r.OnDispose(()=>{x()})})}function z(o={}){return{activate:()=>O({...o,active:!0}),deactivate:()=>O({...o,active:!1})}}function $({initialStatus:o="closed",openedAfter:t,closedAfter:s}){const e=r.prop(o),n=()=>{e.set("start-opening")},a=()=>{e.set("start-closing")},i=e.map(l=>l!=="closed"&&l!=="start-closing"&&l!=="closing"),d=l=>{l?n():a()},p=()=>{d(!i.value)},f=[],h=l=>{f.push(e.on(A=>{A==="closed"&&l()}))};let c=()=>{};e.on(l=>{switch(c(),l){case"start-opening":c=w.g(()=>e.set("opening"));break;case"opening":c=t(()=>e.set("opened"));break;case"start-closing":c=w.g(()=>e.set("closing"));break;case"closing":c=s(()=>e.set("closed"));break;case"closed":c=()=>{};break}}),e.onDispose(()=>{f.forEach(l=>l()),c()});const v=e.map(l=>l==="closed"),b=e.map(l=>l==="start-opening"),g=e.map(l=>l==="opening"),y=e.map(l=>l==="opened"),x=e.map(l=>l==="closing"),u=e.map(l=>l==="start-closing");return{status:e,open:n,close:a,toggle:p,setOpen:d,display:i,isClosed:v,isStartOpening:b,isOpening:g,isOpened:y,isClosing:x,isStartClosing:u,dispose:()=>e.dispose(),listenOnClosed:h}}function R({initialStatus:o="closed",duration:t,openDuration:s=t??500,closeDuration:e=t??500}={}){return $({initialStatus:o,openedAfter:n=>w.I(n,s),closedAfter:n=>w.I(n,e)})}function I(o,t){let s=!1,e=null;function n(){s||(s=!0,o.removeEventListener("transitionend",a),o.removeEventListener("animationend",i),e&&(clearTimeout(e),e=null),t())}function a(f){f.target===o&&n()}function i(f){f.target===o&&n()}const d=()=>{if(typeof o.getAnimations>"u"){e=setTimeout(n,16);return}o.addEventListener("transitionend",a),o.addEventListener("animationend",i),o.getAnimations().length===0&&(e=setTimeout(n,1e3))},p=w.g(d);return()=>{s=!0,p(),e&&(clearTimeout(e),e=null),o.removeEventListener("transitionend",a),o.removeEventListener("animationend",i)}}function B({initialStatus:o="closed",element:t}={}){let s=t;return{setElement:e=>{s=e},...$({initialStatus:o,openedAfter:e=>s==null?(e(),()=>{}):I(s,e),closedAfter:e=>s==null?(e(),()=>{}):I(s,e)})}}function H(o){if(o==null)return"";const t=[];return o.fade&&t.push("fade"),o.slide&&t.push(`slide-${o.slide}`),o.scale!=null&&t.push("scale"),t.length>0?t.join(" "):"none"}function K(o){if(o==null)return"";const t=[];return o.scale!=null&&typeof o.scale=="number"&&t.push(`--scale-factor: ${o.scale}`),o.transformOrigin!=null&&t.push(`--transform-origin: ${o.transformOrigin}`),o.duration!=null&&t.push(`--animation-duration: ${o.duration}ms`),o.easing!=null&&t.push(`--animation-easing: ${o.easing}`),t.join("; ")}function D({animation:o,status:t}){const s=r.computedOf(o,t)((n,a)=>{if(n==null)return`bc-animated-toggle bc-animated-toggle--${a}`;const i=a==="start-opening"||a==="opening"||a==="opened";let d;return"enter"in n||"exit"in n?d=i?n.enter:n.exit:d=n,`bc-animated-toggle bc-animated-toggle--${H(d)} bc-animated-toggle--${a}`}),e=r.computedOf(o,t)((n,a)=>{if(n==null)return"";const i=a==="start-opening"||a==="opening"||a==="opened";let d;return"enter"in n||"exit"in n?d=i?n.enter:n.exit:d=n,K(d)});return r.Fragment(r.attr.class(s),r.attr.style(e))}function N({initialStatus:o="closed",animation:t},s){return r.WithElement(e=>{const{setElement:n,dispose:a,...i}=B({initialStatus:o,element:e});return n(e),r.Fragment(D({status:i.status,animation:t}),r.OnDispose(a),s(i))})}function j(o){return{"~standard":{version:1,vendor:"beatui-custom",validate:s=>{const e=o.validate(s);return e.success?{value:e.data}:{issues:e.errors.map(n=>({message:n.message,path:n.path}))}},types:void 0},safeParse:s=>{const e=o.validate(s);return e.success?{success:!0,data:e.data}:{success:!1,error:{errors:e.errors.map(n=>({message:n.message,path:n.path?.map(a=>typeof a=="object"&&"key"in a?a.key.toString():a.toString())||[]}))}}}}}class k{optional(){return new G(this)}default(t){return new J(this,t)}schema(){return j(this)}}class T extends k{minLength;maxLength;pattern;customValidations=[];validate(t){if(typeof t!="string")return{success:!1,errors:[{message:"Expected string"}]};const s=[];this.minLength!==void 0&&t.length<this.minLength&&s.push({message:`Must be at least ${this.minLength} characters`}),this.maxLength!==void 0&&t.length>this.maxLength&&s.push({message:`Must be at most ${this.maxLength} characters`}),this.pattern&&!this.pattern.test(t)&&s.push({message:"Invalid format"});for(const e of this.customValidations){const n=e(t);n&&s.push({message:n})}return s.length>0?{success:!1,errors:s}:{success:!0,data:t}}min(t,s){const e=new T;return e.minLength=t,e.maxLength=this.maxLength,e.pattern=this.pattern,e.customValidations=[...this.customValidations],s&&e.customValidations.push(n=>n.length<t?s:null),e}max(t,s){const e=new T;return e.minLength=this.minLength,e.maxLength=t,e.pattern=this.pattern,e.customValidations=[...this.customValidations],s&&e.customValidations.push(n=>n.length>t?s:null),e}regex(t,s){const e=new T;return e.minLength=this.minLength,e.maxLength=this.maxLength,e.pattern=t,e.customValidations=[...this.customValidations],s&&e.customValidations.push(n=>t.test(n)?null:s),e}email(t="Please enter a valid email address"){const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,e=new T;return e.minLength=this.minLength,e.maxLength=this.maxLength,e.pattern=this.pattern,e.customValidations=[...this.customValidations,n=>s.test(n)?null:t],e}refine(t){const s=new T;return s.minLength=this.minLength,s.maxLength=this.maxLength,s.pattern=this.pattern,s.customValidations=[...this.customValidations,t],s}}class C extends k{mustBeTrue=!1;trueMessage;validate(t){return typeof t!="boolean"?{success:!1,errors:[{message:"Expected boolean"}]}:this.mustBeTrue&&t!==!0?{success:!1,errors:[{message:this.trueMessage||"Must be true"}]}:{success:!0,data:t}}refine(t,s){const e=new C;e.mustBeTrue=this.mustBeTrue,e.trueMessage=this.trueMessage;const n=e.validate.bind(e);return e.validate=a=>{const i=n(a);return i.success?t(i.data)?i:{success:!1,errors:[{message:s}]}:i},e}literal(t,s){const e=new C;return e.mustBeTrue=!0,e.trueMessage=s,e}}class G extends k{constructor(t){super(),this.inner=t}validate(t){if(t===void 0)return{success:!0,data:void 0};const s=this.inner.validate(t);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.errors}}}class J extends k{constructor(t,s){super(),this.inner=t,this.defaultValue=s}validate(t){return t===void 0?{success:!0,data:this.defaultValue}:this.inner.validate(t)}}class V extends k{constructor(t){super(),this.shape=t}validate(t){if(typeof t!="object"||t===null||Array.isArray(t))return{success:!1,errors:[{message:"Expected object"}]};const s=t,e={},n=[];for(const[a,i]of Object.entries(this.shape)){const d=i.validate(s[a]);if(d.success)e[a]=d.data;else for(const p of d.errors)n.push({message:p.message,path:[a,...p.path||[]]})}return n.length>0?{success:!1,errors:n}:{success:!0,data:e}}refine(t,s){const e=new V(this.shape),n=e.validate.bind(e);return e.validate=a=>{const i=n(a);if(!i.success)return i;const d=t(i.data);return d?{success:!1,errors:[{message:d,path:s?.path}]}:{success:!0,data:i.data}},e}}const Q=()=>new T,X=()=>new C,Y=o=>new V(o);function W(o){return r.WithBrowserCtx(t=>{const s=[],e=()=>s.forEach(a=>a());return o(({effect:a="opaque",mode:i="capturing",onClickOutside:d,onEscape:p,content:f,container:h="body"})=>{h==="body"&&(t=t.makePortal("body"));const c=B();c.listenOnClosed(e);let v=()=>{},b=()=>{};const g=E=>{E.key==="Escape"&&(p?.(),c.close())},y=()=>{d?.(),c.close()},x=E=>{v(),b(),E==="capturing"?(document.addEventListener("keydown",g),v=()=>document.removeEventListener("keydown",g),t.element.addEventListener("mousedown",y),b=()=>t.element.removeEventListener("mousedown",y)):(v=()=>{},b=()=>{})},u=r.Value.on(i,x);s.push(u),s.push(()=>{c.dispose(),v(),b()});const l=()=>{const E=new Set;for(const m of t.element.querySelectorAll(":scope > :not([data-overlay])"))m.hasAttribute("inert")?E.add(m):m.setAttribute("inert","");return s.push(()=>{for(const m of t.element.querySelectorAll(":scope > :not([data-overlay])"))E.has(m)||m.removeAttribute("inert");E.clear()}),document.activeElement?.blur?.(),r.html.div(r.WithElement(m=>c.setElement(m)),r.dataAttr.status(c.status.map(String)),r.dataAttr.overlay("true"),r.attr.class(r.computedOf(a??"opaque",i)((m,L)=>`bc-overlay bc-overlay--effect-${m} bc-overlay--mode-${L}`)),f)},A=r.render(l(),t.element,{disposeWithParent:!0,clear:!1,providers:t.providers});s.push(A),w.g(()=>c.open())},e)})}function _(o,t){const{size:s="md",dismissable:e=!0,showCloseButton:n=!0,onClose:a,overlayEffect:i="opaque",container:d="body",position:p="center"}=o;return W((f,h)=>{let c=()=>{};return t(g=>{c=h;const y=r.prop("capturing");r.Value.on(e,m=>{y.set(m?"capturing":"non-capturing")});const x=r.computedOf(g.header!=null,n)((m,L)=>m||L),u=S.sessionId("modal"),l=`${u}-header`,A=`${u}-body`,E=r.html.div(r.attr.class(r.computedOf(s,p)((m,L)=>`bc-modal bc-modal--size-${m} bc-modal--container-${d} bc-modal--position-${L}`)),r.attr.role("dialog"),r.aria.modal(!0),...g.header?[r.aria.labelledby(l)]:[],r.aria.describedby(A),r.attr.tabindex(-1),r.attr.id(u),r.dataAttr.focusTrap("true"),r.on.mousedown(m=>m.stopPropagation()),O({escapeDeactivates:!1,initialFocus:()=>{const m=document.getElementById(u);if(!m)return null;const L=m.querySelector('[aria-label="Close modal"]');if(L)return L;const F=m.querySelector('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');return F||m}}),r.html.div(r.attr.class("bc-modal__content"),r.When(x,()=>r.html.div(r.attr.class("bc-modal__header"),r.html.div(r.attr.class("bc-modal__title"),...g.header?[r.attr.id(l)]:[],g.header),r.When(n,()=>r.Use(M.BeatUII18n,m=>S.CloseButton({size:"sm",label:m.$.closeModal,onClick:()=>{c(),h()}}))))),r.html.div(r.attr.class("bc-modal__body"),r.attr.id(A),g.body),g.footer&&r.html.div(r.attr.class("bc-modal__footer"),g.footer)));f({mode:y,effect:i??"opaque",container:d,content:E,onClickOutside:()=>{a?.(),h()},onEscape:()=>{a?.(),h()}})},()=>{c(),h()})})}function Z(o,t){const{confirmText:s,cancelText:e,onConfirm:n,onCancel:a,...i}=o;return r.Use(M.BeatUII18n,d=>_({showCloseButton:!1,...i},(p,f)=>{const h=()=>{n?.(),f()},c=()=>{a?.(),f()};return t(b=>{p({body:b,footer:r.Fragment(r.attr.class("bc-modal__actions"),q.Button({variant:"outline",onClick:c},r.coalesce(e,d.$.cancel)),q.Button({color:"primary",variant:"filled",onClick:h},r.coalesce(s,d.$.confirm)))})},f)}))}exports.AnimatedToggle=N;exports.AnimatedToggleClass=D;exports.BooleanValidator=C;exports.ConfirmModal=Z;exports.FocusTrap=O;exports.Modal=_;exports.ObjectValidator=V;exports.Overlay=W;exports.StringValidator=T;exports.boolean=X;exports.createStandardSchema=j;exports.object=Y;exports.string=Q;exports.useAnimatedElementToggle=B;exports.useAnimatedToggle=$;exports.useFocusTrap=z;exports.useTimedToggle=R;