@coffer-org/web 2.6.0 → 3.0.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 (98) hide show
  1. package/dist/assets/ChatWidget-CnETJEZj.js +16 -0
  2. package/dist/assets/DiagnosticsPage-DUqimXFJ.js +1 -0
  3. package/dist/assets/ExtendReasonInfo-DZyJKRHy.js +1 -0
  4. package/dist/assets/Icon-Dydn049Z.js +2 -0
  5. package/dist/assets/{NewRecordView-BfyaaO_5.js → NewRecordView-BAe2dw2Y.js} +1 -1
  6. package/dist/assets/{NoMac-BarbbnIj.js → NoMac-DLu311Th.js} +1 -1
  7. package/dist/assets/{PluginSettingsPage-EhIpvmcl.js → PluginSettingsPage-BQm11aEY.js} +1 -1
  8. package/dist/assets/SettingsForm-xXNSptFG.js +1 -0
  9. package/dist/assets/{SettingsPage-cGmurCr0.js → SettingsPage-PQygWGag.js} +2 -2
  10. package/dist/assets/ThemeSwitcher-D-6Vlu3T.js +1 -0
  11. package/dist/assets/{Toolbar-C5S0_fah.js → Toolbar-_Bg6b3gy.js} +2 -2
  12. package/dist/assets/{auth-context-CpmpND1h.js → auth-context-C1voH8bU.js} +1 -1
  13. package/dist/assets/button-DaYjtbcx.js +1 -0
  14. package/dist/assets/chevron-down-DgMjlPLK.js +1 -0
  15. package/dist/assets/{chrome-_m2AYIjS.js → chrome-BfURuVBW.js} +1 -1
  16. package/dist/assets/combobox-Cqg-VPvV.js +1 -0
  17. package/dist/assets/{data-size-BFf4oF5n.js → data-size-B44emc58.js} +1 -1
  18. package/dist/assets/dialog-BKC2UrX0.js +1 -0
  19. package/dist/assets/{dispatch-Bpnn2XRC.js → dispatch-B7QFSWwA.js} +1 -1
  20. package/dist/assets/{extend-C4MFviaS.js → extend-CbEbk8Xz.js} +1 -1
  21. package/dist/assets/{field-frame-cFE-u56I.js → field-frame-lE36ax7A.js} +1 -1
  22. package/dist/assets/fields-BvFhu2Zp.js +64 -0
  23. package/dist/assets/index-B674c0cW.js +36 -0
  24. package/dist/assets/index-CvgeFYKg.css +2 -0
  25. package/dist/assets/input-group-Cp9n2MAA.js +1 -0
  26. package/dist/assets/{phone-input-Nmpfmhew.js → phone-input-BI3bOFX2.js} +2 -2
  27. package/dist/assets/shared-vjdjsgQc.js +1 -0
  28. package/dist/assets/shelf-D-ifpKTJ.js +1 -0
  29. package/dist/assets/{square-CiErsTOS.js → square-DuQOQJGU.js} +1 -1
  30. package/dist/assets/src-BIligwLb.js +1 -0
  31. package/dist/assets/src-BbGADHi4.js +1 -0
  32. package/dist/assets/{src-CVXUq44N.js → src-BbXav__j.js} +1 -1
  33. package/dist/assets/src-BngIhzHR.js +1 -0
  34. package/dist/assets/src-BqCV9wTP.js +1 -0
  35. package/dist/assets/src-CK5LF8mh.js +1 -0
  36. package/dist/assets/src-CO_C8dwk.js +1 -0
  37. package/dist/assets/src-CTwytbLw.js +1 -0
  38. package/dist/assets/src-Ck3rvFAP.js +2 -0
  39. package/dist/assets/src-CzSQMFWS.js +7 -0
  40. package/dist/assets/{src-BckYqSba.js → src-D1jciqQr.js} +1 -1
  41. package/dist/assets/{src-qvD2ou1m.js → src-D20-HqBF.js} +1 -1
  42. package/dist/assets/src-DD4urQ_Z.js +4 -0
  43. package/dist/assets/{src-BwT6fU6Z.js → src-DLuKxde5.js} +1 -1
  44. package/dist/assets/{src-Dr1EPJgR.js → src-DQEWf3tk.js} +1 -1
  45. package/dist/assets/src-D_zsiKPr.js +1 -0
  46. package/dist/assets/src-DdRHCjFX.js +1 -0
  47. package/dist/assets/src-DfExcdwX.js +1 -0
  48. package/dist/assets/{src-CcrtnEIQ.js → src-DkjooOXs.js} +1 -1
  49. package/dist/assets/src-JijGLvg4.js +1 -0
  50. package/dist/assets/{src-CMbUQsqp.js → src-P-7khzwl.js} +1 -1
  51. package/dist/assets/{src-BlTOHYZL.js → src-R3C69mft.js} +1 -1
  52. package/dist/assets/src-m6T7MzTC.js +4 -0
  53. package/dist/assets/src-o6G2rx51.js +1 -0
  54. package/dist/assets/src-wGc7N6NH.js +1 -0
  55. package/dist/assets/ui-DoEY93ZQ.js +2 -0
  56. package/dist/assets/{ui-Bl4kUgYS.js → ui-QxKP_mxS.js} +1 -1
  57. package/dist/assets/{ui-DnlLcAtd.js → ui-Vp773Nr2.js} +2 -2
  58. package/dist/assets/{upload-eoIHAc6j.js → upload-C8XxQG6m.js} +1 -1
  59. package/dist/assets/use-media-query-D1fYNz6w.js +1 -0
  60. package/dist/assets/{version-BgluE_nc.js → version-DHVNWcte.js} +1 -1
  61. package/dist/assets/{x-BFRg18Fi.js → x-CzSVfh-E.js} +1 -1
  62. package/dist/index.html +25 -24
  63. package/dist-vendor/web-sdk.js +461 -411
  64. package/package.json +2 -2
  65. package/dist/assets/ChatWidget-D_mykvfd.js +0 -16
  66. package/dist/assets/DiagnosticsPage-CLhgz-6M.js +0 -1
  67. package/dist/assets/ExtendReasonInfo-DvfVQWJR.js +0 -1
  68. package/dist/assets/Icon-wZ-Cwtc3.js +0 -2
  69. package/dist/assets/SettingsForm-Dwry8Oe1.js +0 -1
  70. package/dist/assets/ThemeSwitcher-BoIYJENA.js +0 -1
  71. package/dist/assets/button-DsalTwxl.js +0 -1
  72. package/dist/assets/combobox-Bo_yQsV-.js +0 -1
  73. package/dist/assets/dialog-DqWXrq6M.js +0 -1
  74. package/dist/assets/fields-fE_vzhqS.js +0 -64
  75. package/dist/assets/index-C5KupH3J.css +0 -2
  76. package/dist/assets/index-wCQxsLAS.js +0 -59
  77. package/dist/assets/input-group-DnBGkT_z.js +0 -1
  78. package/dist/assets/shared-C2_-YViH.js +0 -1
  79. package/dist/assets/shelf-BU6Jrxdn.js +0 -1
  80. package/dist/assets/src-0vuf5cD2.js +0 -1
  81. package/dist/assets/src-97trQW1e.js +0 -1
  82. package/dist/assets/src-B5J6a7xU.js +0 -7
  83. package/dist/assets/src-BG7tifqi.js +0 -2
  84. package/dist/assets/src-BscxyzWm.js +0 -1
  85. package/dist/assets/src-C8SGMFDC.js +0 -1
  86. package/dist/assets/src-C9oB3ukn.js +0 -1
  87. package/dist/assets/src-CK9rs1Ky.js +0 -1
  88. package/dist/assets/src-CNbzboJN.js +0 -1
  89. package/dist/assets/src-CREOT_7V.js +0 -1
  90. package/dist/assets/src-CTajJz2B.js +0 -1
  91. package/dist/assets/src-ClmEI4bL.js +0 -4
  92. package/dist/assets/src-CpLYaHc_.js +0 -1
  93. package/dist/assets/src-DPq_gXsF.js +0 -4
  94. package/dist/assets/src-XWTmD-Mn.js +0 -1
  95. package/dist/assets/src-ethXcfjn.js +0 -1
  96. package/dist/assets/src-gM-6BSUd.js +0 -1
  97. package/dist/assets/ui-QD_F7vze.js +0 -2
  98. package/dist/assets/use-media-query-BED2JoBm.js +0 -1
@@ -3383,13 +3383,13 @@ function H(e, t) {
3383
3383
  function U(e = "required") {
3384
3384
  return { error: (t) => t.input === void 0 ? H(e) : void 0 };
3385
3385
  }
3386
- function lo(e = "invalid_type") {
3386
+ function W(e = "invalid_type") {
3387
3387
  return { error: (t) => t.code === "invalid_type" ? H(e) : void 0 };
3388
3388
  }
3389
- function uo() {
3389
+ function lo() {
3390
3390
  return { error: (e) => e.code === "invalid_type" ? e.input === void 0 ? H("required") : H("invalid_type") : void 0 };
3391
3391
  }
3392
- function W(e) {
3392
+ function G(e) {
3393
3393
  if (typeof e == "string") try {
3394
3394
  return JSON.parse(e);
3395
3395
  } catch {
@@ -3397,9 +3397,9 @@ function W(e) {
3397
3397
  }
3398
3398
  return e;
3399
3399
  }
3400
- function fo(e, t) {
3400
+ function uo(e, t) {
3401
3401
  return R().superRefine((n, r) => {
3402
- let i = W(n);
3402
+ let i = G(n);
3403
3403
  if (typeof n == "string" && typeof i == "string") {
3404
3404
  r.addIssue({
3405
3405
  code: B.custom,
@@ -3413,7 +3413,7 @@ function fo(e, t) {
3413
3413
  });
3414
3414
  });
3415
3415
  }
3416
- function G(e, t) {
3416
+ function K(e, t) {
3417
3417
  let n = t === !0, r = (e) => e === "" || e === null ? void 0 : e;
3418
3418
  return n ? $a(r, R().superRefine((e, t) => {
3419
3419
  e === void 0 && t.addIssue({
@@ -3424,7 +3424,7 @@ function G(e, t) {
3424
3424
  }
3425
3425
  //#endregion
3426
3426
  //#region ../sdk/src/fields/normalize.ts
3427
- function K(e) {
3427
+ function q(e) {
3428
3428
  let t = e, n = t.rules ?? {}, r = t.view ?? {}, i = {};
3429
3429
  n.min != null && typeof n.min == "number" && (i.min = n.min), n.max != null && typeof n.max == "number" && (i.max = n.max), n.step != null && (i.step = n.step), n.pattern != null && (i.pattern = n.pattern), n.messageKey != null && (i.messageKey = n.messageKey), n.granularity != null && (i.granularity = n.granularity), n.language != null && (i.language = n.language), n.defaultCurrency != null && (i.defaultCurrency = n.defaultCurrency), n.defaultLang != null && (i.defaultLang = n.defaultLang);
3430
3430
  let { rules: a, view: o, ...s } = t, c = {
@@ -3454,9 +3454,9 @@ function K(e) {
3454
3454
  }
3455
3455
  //#endregion
3456
3456
  //#region ../sdk/src/field-presets.ts
3457
- function po(e) {
3458
- let t = K(e), n = t.required ?? !1, r = F().email({ message: H("email") });
3459
- return n && (r = r.min(1, { message: H("min_length", { min: 1 }) })), J(t, Y({
3457
+ function fo(e) {
3458
+ let t = q(e), n = t.required ?? !1, r = F().email({ message: H("email") });
3459
+ return n && (r = r.min(1, { message: H("min_length", { min: 1 }) })), Y(t, X({
3460
3460
  kind: "email",
3461
3461
  label: t.label ?? "",
3462
3462
  required: n,
@@ -3466,12 +3466,12 @@ function po(e) {
3466
3466
  format: "email",
3467
3467
  inputType: "email"
3468
3468
  },
3469
- zod: G(r, n)
3469
+ zod: K(r, n)
3470
3470
  }, t.multiple ?? !1));
3471
3471
  }
3472
- function mo(e) {
3473
- let t = K(e), n = t.required ?? !1, r = F().regex(To, { message: H("pattern", { messageKey: "core.presets.tel" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3474
- return J(t, Y({
3472
+ function po(e) {
3473
+ let t = q(e), n = t.required ?? !1, r = F().regex(wo, { message: H("pattern", { messageKey: "core.presets.tel" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3474
+ return Y(t, X({
3475
3475
  kind: "tel",
3476
3476
  label: t.label ?? "",
3477
3477
  required: n,
@@ -3481,12 +3481,12 @@ function mo(e) {
3481
3481
  format: "tel",
3482
3482
  inputType: "tel"
3483
3483
  },
3484
- zod: G(i, n)
3484
+ zod: K(i, n)
3485
3485
  }, t.multiple ?? !1));
3486
3486
  }
3487
- function ho(e) {
3488
- let t = K(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3489
- return J(t, {
3487
+ function mo(e) {
3488
+ let t = q(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3489
+ return Y(t, {
3490
3490
  kind: "password",
3491
3491
  label: t.label ?? "",
3492
3492
  required: n,
@@ -3496,90 +3496,90 @@ function ho(e) {
3496
3496
  format: "password",
3497
3497
  inputType: "password"
3498
3498
  },
3499
- zod: G(r, n)
3499
+ zod: K(r, n)
3500
3500
  });
3501
3501
  }
3502
- function go(e) {
3503
- return q({
3502
+ function ho(e) {
3503
+ return J({
3504
3504
  key: e.key,
3505
3505
  label: e.label ?? e.key,
3506
3506
  multiple: !0,
3507
3507
  rules: { unique: ["name"] },
3508
3508
  view: { kind: "internalApiToken" },
3509
3509
  fields: [
3510
- X({ key: "name" }),
3511
- ho({ key: "token" }),
3512
- X({ key: "createdAt" }),
3513
- X({ key: "lastUsedAt" })
3510
+ Z({ key: "name" }),
3511
+ mo({ key: "token" }),
3512
+ Z({ key: "createdAt" }),
3513
+ Z({ key: "lastUsedAt" })
3514
3514
  ]
3515
3515
  });
3516
3516
  }
3517
- function _o(e) {
3518
- return q({
3517
+ function go(e) {
3518
+ return J({
3519
3519
  key: e.key,
3520
3520
  label: e.label ?? e.key,
3521
3521
  multiple: !0,
3522
3522
  view: { kind: "internalOauthGrants" },
3523
3523
  fields: [
3524
- X({ key: "clientName" }),
3525
- X({ key: "createdAt" }),
3526
- X({ key: "lastUsedAt" })
3524
+ Z({ key: "clientName" }),
3525
+ Z({ key: "createdAt" }),
3526
+ Z({ key: "lastUsedAt" })
3527
3527
  ]
3528
3528
  });
3529
3529
  }
3530
- var vo = /^[a-z0-9-]+$/;
3531
- function yo(e) {
3532
- let t = K(e), n = t.required ?? !1, r = F().regex(vo, { message: H("pattern", { messageKey: "core.presets.slug" }) });
3533
- return J(t, Y({
3530
+ var _o = /^[a-z0-9-]+$/;
3531
+ function vo(e) {
3532
+ let t = q(e), n = t.required ?? !1, r = F().regex(_o, { message: H("pattern", { messageKey: "core.presets.slug" }) });
3533
+ return Y(t, X({
3534
3534
  kind: "slug",
3535
3535
  label: t.label ?? "",
3536
3536
  required: n,
3537
3537
  prim: "text",
3538
3538
  column: "text",
3539
3539
  hints: {},
3540
- zod: G(r, n)
3540
+ zod: K(r, n)
3541
3541
  }, t.multiple ?? !1));
3542
3542
  }
3543
- var bo = /^#[0-9a-fA-F]{6}$/;
3544
- function xo(e) {
3545
- let t = K(e), n = t.required ?? !1, r = F().regex(bo, { message: H("color_format") });
3546
- return J(t, Y({
3543
+ var yo = /^#[0-9a-fA-F]{6}$/;
3544
+ function bo(e) {
3545
+ let t = q(e), n = t.required ?? !1, r = F().regex(yo, { message: H("color_format") });
3546
+ return Y(t, X({
3547
3547
  kind: "color",
3548
3548
  label: t.label ?? "",
3549
3549
  required: n,
3550
3550
  prim: "text",
3551
3551
  column: "text",
3552
3552
  hints: {},
3553
- zod: G(r, n)
3553
+ zod: K(r, n)
3554
3554
  }, t.multiple ?? !1));
3555
3555
  }
3556
- function So(e) {
3557
- let t = K(e), n = t.required ?? !1, r = (n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F()).refine((e) => Do.has(e.toLowerCase()), { message: H("colorname") });
3558
- return J(t, Y({
3556
+ function xo(e) {
3557
+ let t = q(e), n = t.required ?? !1, r = (n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F()).refine((e) => Eo.has(e.toLowerCase()), { message: H("colorname") });
3558
+ return Y(t, X({
3559
3559
  kind: "colorname",
3560
3560
  label: t.label ?? "",
3561
3561
  required: n,
3562
3562
  prim: "text",
3563
3563
  column: "text",
3564
3564
  hints: {},
3565
- zod: G(r, n)
3565
+ zod: K(r, n)
3566
3566
  }, t.multiple ?? !1));
3567
3567
  }
3568
- function Co(e) {
3569
- let t = K(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3570
- return J(t, Y({
3568
+ function So(e) {
3569
+ let t = q(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3570
+ return Y(t, X({
3571
3571
  kind: "title",
3572
3572
  label: t.label ?? "",
3573
3573
  required: n,
3574
3574
  prim: "text",
3575
3575
  column: "text",
3576
3576
  hints: {},
3577
- zod: G(r, n)
3577
+ zod: K(r, n)
3578
3578
  }, t.multiple ?? !1));
3579
3579
  }
3580
- function wo(e) {
3581
- let t = K(e), n = t.required ?? !1, r = F().regex(Eo, { message: H("pattern", { messageKey: "core.presets.link" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3582
- return J(t, Y({
3580
+ function Co(e) {
3581
+ let t = q(e), n = t.required ?? !1, r = F().regex(To, { message: H("pattern", { messageKey: "core.presets.link" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3582
+ return Y(t, X({
3583
3583
  kind: "link",
3584
3584
  label: t.label ?? "",
3585
3585
  required: n,
@@ -3589,13 +3589,13 @@ function wo(e) {
3589
3589
  format: "url",
3590
3590
  inputType: "url"
3591
3591
  },
3592
- zod: G(i, n)
3592
+ zod: K(i, n)
3593
3593
  }, t.multiple ?? !1));
3594
3594
  }
3595
- var To = /^\+?[\d\s()-]{4,}$/, Eo = /^([a-z][a-z0-9+.-]*:\/\/\S+|[\w-]+(\.[\w-]+)+(:\d+)?(\/\S*)?)$/i, Do = /* @__PURE__ */ new Set(/* @__PURE__ */ "aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen.transparent".split("."));
3596
- function Oo(e) {
3597
- let t = K(e), n = t.required ?? !1, r = F().min(1, { message: H("min_length", { min: 1 }) }), i = Array.isArray(e.options) ? e.options : [], a = typeof e.options == "string" ? e.options : null;
3598
- return J(t, Y({
3595
+ var wo = /^\+?[\d\s()-]{4,}$/, To = /^([a-z][a-z0-9+.-]*:\/\/\S+|[\w-]+(\.[\w-]+)+(:\d+)?(\/\S*)?)$/i, Eo = /* @__PURE__ */ new Set(/* @__PURE__ */ "aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen.transparent".split("."));
3596
+ function Do(e) {
3597
+ let t = q(e), n = t.required ?? !1, r = F().min(1, { message: H("min_length", { min: 1 }) }), i = Array.isArray(e.options) ? e.options : [], a = typeof e.options == "string" ? e.options : null;
3598
+ return Y(t, X({
3599
3599
  kind: "tag",
3600
3600
  label: t.label ?? "",
3601
3601
  required: n,
@@ -3605,18 +3605,18 @@ function Oo(e) {
3605
3605
  suggestions: i,
3606
3606
  ...a ? { source: a } : {}
3607
3607
  },
3608
- zod: G(r, n)
3608
+ zod: K(r, n)
3609
3609
  }, t.multiple ?? !1));
3610
3610
  }
3611
- function ko(e) {
3612
- return Oo({
3611
+ function Oo(e) {
3612
+ return Do({
3613
3613
  ...e,
3614
3614
  multiple: !0
3615
3615
  });
3616
3616
  }
3617
- function Ao(e) {
3618
- return J(K(e), {
3619
- ...Z({
3617
+ function ko(e) {
3618
+ return Y(q(e), {
3619
+ ...Q({
3620
3620
  label: e.label,
3621
3621
  rules: e.rules,
3622
3622
  view: e.view
@@ -3625,13 +3625,13 @@ function Ao(e) {
3625
3625
  kind: "markdown"
3626
3626
  });
3627
3627
  }
3628
- function jo(e) {
3629
- let t = e.rules?.language, n = K(e), r = Z({
3628
+ function Ao(e) {
3629
+ let t = e.rules?.language, n = q(e), r = Q({
3630
3630
  label: e.label,
3631
3631
  rules: e.rules,
3632
3632
  view: e.view
3633
3633
  });
3634
- return J(n, {
3634
+ return Y(n, {
3635
3635
  ...r,
3636
3636
  prim: "text",
3637
3637
  kind: "snippet",
@@ -3641,12 +3641,12 @@ function jo(e) {
3641
3641
  }
3642
3642
  });
3643
3643
  }
3644
- function Mo(e) {
3644
+ function jo(e) {
3645
3645
  return e.includes("\0") || e.includes("�");
3646
3646
  }
3647
- function No(e) {
3648
- let t = K(e), n = t.required ?? !1, r = t.ext ?? "txt", i = t.maxBytes ?? 262144, a = F(uo()).superRefine((e, t) => {
3649
- if (Mo(e)) {
3647
+ function Mo(e) {
3648
+ let t = q(e), n = t.required ?? !1, r = t.ext ?? "txt", i = t.maxBytes ?? 262144, a = F(lo()).superRefine((e, t) => {
3649
+ if (jo(e)) {
3650
3650
  t.addIssue({
3651
3651
  code: B.custom,
3652
3652
  message: H("source_binary")
@@ -3658,7 +3658,7 @@ function No(e) {
3658
3658
  message: H("source_too_large", { maxBytes: i })
3659
3659
  });
3660
3660
  });
3661
- return J(t, {
3661
+ return Y(t, {
3662
3662
  kind: "source",
3663
3663
  label: t.label ?? "",
3664
3664
  required: n,
@@ -3669,24 +3669,24 @@ function No(e) {
3669
3669
  maxBytes: i,
3670
3670
  noEditControl: !0
3671
3671
  },
3672
- zod: G(a, n)
3672
+ zod: K(a, n)
3673
3673
  });
3674
3674
  }
3675
- function Po(e) {
3676
- let t = K(e), n = t.required ?? !1, r = e.rules?.max ?? 5, i = V(lo()).int({ message: H("int") }).min(1, { message: H("min", { min: 1 }) }).max(r, { message: H("max", { max: r }) });
3677
- return J(t, Y({
3675
+ function No(e) {
3676
+ let t = q(e), n = t.required ?? !1, r = e.rules?.max ?? 5, i = V(W()).int({ message: H("int") }).min(1, { message: H("min", { min: 1 }) }).max(r, { message: H("max", { max: r }) });
3677
+ return Y(t, X({
3678
3678
  kind: "rating",
3679
3679
  label: t.label ?? "",
3680
3680
  required: n,
3681
3681
  prim: "number",
3682
3682
  column: "integer",
3683
3683
  hints: { max: r },
3684
- zod: G(i, n)
3684
+ zod: K(i, n)
3685
3685
  }, t.multiple ?? !1));
3686
3686
  }
3687
- function Fo(e) {
3688
- let t = K(e), n = t.required ?? !1, r = e.rules?.max ?? 604800, i = e.rules?.step ?? 60, a = V(lo()).int({ message: H("int") }).min(0, { message: H("min", { min: 0 }) }).max(r, { message: H("max", { max: r }) });
3689
- return J(t, Y({
3687
+ function Po(e) {
3688
+ let t = q(e), n = t.required ?? !1, r = e.rules?.max ?? 604800, i = e.rules?.step ?? 60, a = V(W()).int({ message: H("int") }).min(0, { message: H("min", { min: 0 }) }).max(r, { message: H("max", { max: r }) });
3689
+ return Y(t, X({
3690
3690
  kind: "duration",
3691
3691
  label: t.label ?? "",
3692
3692
  required: n,
@@ -3696,16 +3696,16 @@ function Fo(e) {
3696
3696
  step: i,
3697
3697
  max: r
3698
3698
  },
3699
- zod: G(a, n)
3699
+ zod: K(a, n)
3700
3700
  }, t.multiple ?? !1));
3701
3701
  }
3702
- function Io(e) {
3703
- let t = K(e), n = bs({
3702
+ function Fo(e) {
3703
+ let t = q(e), n = ys({
3704
3704
  label: e.label,
3705
3705
  rules: e.rules,
3706
3706
  view: e.view
3707
3707
  });
3708
- return J(t, {
3708
+ return Y(t, {
3709
3709
  ...n,
3710
3710
  kind: "reminder",
3711
3711
  hints: {
@@ -3715,9 +3715,9 @@ function Io(e) {
3715
3715
  }
3716
3716
  });
3717
3717
  }
3718
- var Lo = vs, Ro = ys;
3719
- function zo(e) {
3720
- return Lo({
3718
+ var Io = _s, Lo = vs;
3719
+ function Ro(e) {
3720
+ return Io({
3721
3721
  ...e,
3722
3722
  rules: {
3723
3723
  min: 0,
@@ -3726,8 +3726,8 @@ function zo(e) {
3726
3726
  }
3727
3727
  });
3728
3728
  }
3729
- function Bo(e) {
3730
- return Ro({
3729
+ function zo(e) {
3730
+ return Lo({
3731
3731
  ...e,
3732
3732
  rules: {
3733
3733
  min: 1900,
@@ -3736,8 +3736,8 @@ function Bo(e) {
3736
3736
  }
3737
3737
  });
3738
3738
  }
3739
- function Vo(e) {
3740
- let t = K(e), n = ys({
3739
+ function Bo(e) {
3740
+ let t = q(e), n = vs({
3741
3741
  label: e.label,
3742
3742
  rules: {
3743
3743
  min: 1,
@@ -3745,7 +3745,7 @@ function Vo(e) {
3745
3745
  },
3746
3746
  view: e.view
3747
3747
  });
3748
- return J(t, {
3748
+ return Y(t, {
3749
3749
  ...n,
3750
3750
  kind: "weight",
3751
3751
  hints: {
@@ -3754,13 +3754,13 @@ function Vo(e) {
3754
3754
  }
3755
3755
  });
3756
3756
  }
3757
- function Ho(e) {
3758
- let t = K(e), n = t.required ?? !1, r = fo(z({
3757
+ function Vo(e) {
3758
+ let t = q(e), n = t.required ?? !1, r = uo(z({
3759
3759
  w: L().int().nonnegative(),
3760
3760
  h: L().int().nonnegative(),
3761
3761
  d: L().int().nonnegative()
3762
3762
  }), "json");
3763
- return J(t, {
3763
+ return Y(t, {
3764
3764
  kind: "dimensions",
3765
3765
  label: t.label ?? "",
3766
3766
  required: n,
@@ -3772,40 +3772,40 @@ function Ho(e) {
3772
3772
  h: "integer",
3773
3773
  d: "integer"
3774
3774
  },
3775
- zod: G(r, n)
3775
+ zod: K(r, n)
3776
3776
  });
3777
3777
  }
3778
- function Uo(e) {
3778
+ function Ho(e) {
3779
3779
  return Ts({
3780
3780
  ...e,
3781
3781
  options: "countries"
3782
3782
  });
3783
3783
  }
3784
- var Wo = {
3785
- email: po,
3786
- tel: mo,
3787
- slug: yo,
3788
- color: xo,
3789
- colorname: So,
3790
- title: Co,
3791
- password: ho,
3792
- link: wo,
3793
- tag: Oo,
3794
- tags: ko,
3795
- markdown: Ao,
3796
- snippet: jo,
3797
- source: No,
3798
- rating: Po,
3799
- duration: Fo,
3800
- reminder: Io,
3801
- percent: zo,
3802
- year: Bo,
3803
- weight: Vo,
3804
- dimensions: Ho,
3805
- country: Uo,
3806
- internalApiToken: go,
3807
- internalOauthGrants: _o
3808
- }, Go = /* @__PURE__ */ t(((e, t) => {
3784
+ var Uo = {
3785
+ email: fo,
3786
+ tel: po,
3787
+ slug: vo,
3788
+ color: bo,
3789
+ colorname: xo,
3790
+ title: So,
3791
+ password: mo,
3792
+ link: Co,
3793
+ tag: Do,
3794
+ tags: Oo,
3795
+ markdown: ko,
3796
+ snippet: Ao,
3797
+ source: Mo,
3798
+ rating: No,
3799
+ duration: Po,
3800
+ reminder: Fo,
3801
+ percent: Ro,
3802
+ year: zo,
3803
+ weight: Bo,
3804
+ dimensions: Vo,
3805
+ country: Ho,
3806
+ internalApiToken: ho,
3807
+ internalOauthGrants: go
3808
+ }, Wo = /* @__PURE__ */ t(((e, t) => {
3809
3809
  t.exports = {
3810
3810
  aa: {
3811
3811
  name: "Afar",
@@ -4540,8 +4540,8 @@ var Wo = {
4540
4540
  nativeName: "isiZulu"
4541
4541
  }
4542
4542
  };
4543
- })), Ko = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
4544
- var n = Go(), r = {}, i = {}, a = [], o = [], s = [];
4543
+ })), Go = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
4544
+ var n = Wo(), r = {}, i = {}, a = [], o = [], s = [];
4545
4545
  for (let e in n) {
4546
4546
  let { name: t, nativeName: c } = n[e];
4547
4547
  r[e] = i[t.toLowerCase()] = i[c.toLowerCase()] = {
@@ -4581,14 +4581,14 @@ var Wo = {
4581
4581
  }
4582
4582
  };
4583
4583
  })))(), 1);
4584
- Ko.default.getAllCodes().map((e) => ({
4584
+ Go.default.getAllCodes().map((e) => ({
4585
4585
  code: e,
4586
- name: Ko.default.getNativeName(e)
4586
+ name: Go.default.getNativeName(e)
4587
4587
  })).sort((e, t) => e.name.localeCompare(t.name));
4588
4588
  //#endregion
4589
4589
  //#region ../sdk/src/fields.ts
4590
- var qo = (e) => "key" in e && !("el" in e), Jo = (e) => "el" in e && e.el === "static", Yo = (e) => "el" in e && e.el === "group", Xo = (e) => "el" in e && e.el === "divider", Zo = (e) => "el" in e && e.el === "info", Qo = (e) => "el" in e && e.el === "button";
4591
- function q(e) {
4590
+ var Ko = (e) => "key" in e && !("el" in e), qo = (e) => "el" in e && e.el === "static", Jo = (e) => "el" in e && e.el === "group", Yo = (e) => "el" in e && e.el === "divider", Xo = (e) => "el" in e && e.el === "info", Zo = (e) => "el" in e && e.el === "button";
4591
+ function J(e) {
4592
4592
  let t = e.rules ?? {}, n = e.view ?? {};
4593
4593
  if (e.key) {
4594
4594
  if (!e.label) throw Error(`[field.group] storage group '${e.key}' requires a label`);
@@ -4609,16 +4609,16 @@ function q(e) {
4609
4609
  fields: e.fields
4610
4610
  };
4611
4611
  }
4612
- function $o(e) {
4613
- return q({
4612
+ function Qo(e) {
4613
+ return J({
4614
4614
  label: e.label,
4615
4615
  icon: e.icon,
4616
4616
  fields: e.fields,
4617
4617
  view: { display: "scroll" }
4618
4618
  });
4619
4619
  }
4620
- function es(e) {
4621
- return q({
4620
+ function $o(e) {
4621
+ return J({
4622
4622
  key: e.key,
4623
4623
  label: e.label,
4624
4624
  icon: e.icon,
@@ -4629,39 +4629,39 @@ function es(e) {
4629
4629
  view: { display: "table" }
4630
4630
  });
4631
4631
  }
4632
- function ts(e) {
4632
+ function es(e) {
4633
4633
  let t = [];
4634
4634
  return e.fields.forEach((e, n) => {
4635
- n > 0 && t.push(ss()), t.push(...e);
4636
- }), q({
4635
+ n > 0 && t.push(os()), t.push(...e);
4636
+ }), J({
4637
4637
  label: e.label,
4638
4638
  icon: e.icon,
4639
4639
  fields: t,
4640
4640
  view: { display: "sheet" }
4641
4641
  });
4642
4642
  }
4643
- function ns(e) {
4644
- return q({
4643
+ function ts(e) {
4644
+ return J({
4645
4645
  key: e.key,
4646
4646
  label: e.label ?? e.key,
4647
4647
  required: e.required,
4648
4648
  view: { kind: "url" },
4649
4649
  fields: [
4650
- X({ key: "scheme" }),
4651
- X({ key: "username" }),
4652
- X({ key: "password" }),
4653
- X({ key: "host" }),
4654
- ys({ key: "port" }),
4655
- X({ key: "path" }),
4656
- X({ key: "query" }),
4657
- X({ key: "hash" })
4650
+ Z({ key: "scheme" }),
4651
+ Z({ key: "username" }),
4652
+ Z({ key: "password" }),
4653
+ Z({ key: "host" }),
4654
+ vs({ key: "port" }),
4655
+ Z({ key: "path" }),
4656
+ Z({ key: "query" }),
4657
+ Z({ key: "hash" })
4658
4658
  ]
4659
4659
  });
4660
4660
  }
4661
- function rs(e) {
4661
+ function ns(e) {
4662
4662
  if (e.fixed && e.by.type.prim !== "select") throw Error(`[field.keyed] fixed requires by=select (enumerated), got '${e.by.type.prim}'`);
4663
4663
  return {
4664
- ...(e.container ?? q)({
4664
+ ...(e.container ?? J)({
4665
4665
  label: e.label,
4666
4666
  icon: e.icon,
4667
4667
  fields: [e.by, ...e.fields]
@@ -4673,20 +4673,20 @@ function rs(e) {
4673
4673
  fixed: e.fixed
4674
4674
  };
4675
4675
  }
4676
- var is = (e) => e.key != null && e.multiple === !0, as = (e) => e.key != null && e.multiple !== !0;
4677
- function os() {
4676
+ var rs = (e) => e.key != null && e.multiple === !0, is = (e) => e.key != null && e.multiple !== !0;
4677
+ function as() {
4678
4678
  return { el: "divider" };
4679
4679
  }
4680
- function ss() {
4680
+ function os() {
4681
4681
  return { el: "break" };
4682
4682
  }
4683
- function cs(e) {
4683
+ function ss(e) {
4684
4684
  return {
4685
4685
  el: "info",
4686
4686
  text: e
4687
4687
  };
4688
4688
  }
4689
- function ls(e) {
4689
+ function cs(e) {
4690
4690
  return {
4691
4691
  el: "button",
4692
4692
  label: e.label,
@@ -4695,7 +4695,7 @@ function ls(e) {
4695
4695
  variant: e.variant
4696
4696
  };
4697
4697
  }
4698
- function J(e, t) {
4698
+ function Y(e, t) {
4699
4699
  let n = t;
4700
4700
  return e.noEditControl && (n = {
4701
4701
  ...n,
@@ -4727,6 +4727,14 @@ function J(e, t) {
4727
4727
  }), e.hidden !== void 0 && (n = {
4728
4728
  ...n,
4729
4729
  hidden: e.hidden
4730
+ }), e.derive && (n = {
4731
+ ...n,
4732
+ derive: e.derive,
4733
+ derived: !0,
4734
+ hints: {
4735
+ ...n.hints,
4736
+ noEditControl: !0
4737
+ }
4730
4738
  }), e.key ? {
4731
4739
  key: e.key,
4732
4740
  type: n
@@ -4736,17 +4744,17 @@ function J(e, t) {
4736
4744
  value: e.value
4737
4745
  } : n;
4738
4746
  }
4739
- function us(e) {
4747
+ function ls(e) {
4740
4748
  return e === "today" ? (/* @__PURE__ */ new Date()).toISOString().slice(0, 10) : e;
4741
4749
  }
4742
- function ds(e) {
4750
+ function us(e) {
4743
4751
  try {
4744
4752
  return JSON.parse(e);
4745
4753
  } catch {
4746
4754
  return;
4747
4755
  }
4748
4756
  }
4749
- function fs(e) {
4757
+ function ds(e) {
4750
4758
  return R().superRefine((t, n) => {
4751
4759
  let r;
4752
4760
  if (Array.isArray(t)) r = t;
@@ -4782,9 +4790,9 @@ function fs(e) {
4782
4790
  }
4783
4791
  });
4784
4792
  }
4785
- function Y(e, t) {
4793
+ function X(e, t) {
4786
4794
  if (!t) return e;
4787
- let n = fs(e.zod);
4795
+ let n = ds(e.zod);
4788
4796
  return {
4789
4797
  ...e,
4790
4798
  column: "text",
@@ -4793,12 +4801,12 @@ function Y(e, t) {
4793
4801
  multiple: !0
4794
4802
  },
4795
4803
  json: !0,
4796
- zod: G(n, e.required)
4804
+ zod: K(n, e.required)
4797
4805
  };
4798
4806
  }
4799
- function X(e) {
4800
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = r.min ?? +(t.required === !0), a = F(uo());
4801
- return i > 0 && (a = a.min(i, { message: H("min_length", { min: i }) })), r.max != null && (a = a.max(r.max, { message: H("max_length", { max: r.max }) })), r.pattern && (a = a.regex(new RegExp(r.pattern), { message: H("pattern", r.messageKey ? { messageKey: r.messageKey } : void 0) })), J(t, Y({
4807
+ function Z(e) {
4808
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = r.min ?? +(t.required === !0), a = F(lo());
4809
+ return i > 0 && (a = a.min(i, { message: H("min_length", { min: i }) })), r.max != null && (a = a.max(r.max, { message: H("max_length", { max: r.max }) })), r.pattern && (a = a.regex(new RegExp(r.pattern), { message: H("pattern", r.messageKey ? { messageKey: r.messageKey } : void 0) })), Y(t, X({
4802
4810
  kind: "text",
4803
4811
  label: t.label ?? "",
4804
4812
  required: n,
@@ -4808,32 +4816,32 @@ function X(e) {
4808
4816
  minLength: r.min,
4809
4817
  maxLength: r.max
4810
4818
  },
4811
- zod: G(a, n)
4819
+ zod: K(a, n)
4812
4820
  }, t.multiple ?? !1));
4813
4821
  }
4814
- function ps(e, t, n) {
4815
- let r = e.required ?? !1, i = F(uo());
4816
- return e.required === !0 && (i = i.min(1, { message: H("min_length", { min: 1 }) })), J(e, {
4822
+ function fs(e, t, n) {
4823
+ let r = e.required ?? !1, i = F(lo());
4824
+ return e.required === !0 && (i = i.min(1, { message: H("min_length", { min: 1 }) })), Y(e, {
4817
4825
  kind: t,
4818
4826
  label: e.label ?? "",
4819
4827
  required: r,
4820
4828
  prim: "text",
4821
4829
  column: "text",
4822
4830
  hints: n && n.length ? { exts: n } : {},
4823
- zod: G(i, r),
4831
+ zod: K(i, r),
4824
4832
  ...e.default === void 0 ? {} : { default: e.default }
4825
4833
  });
4826
4834
  }
4827
- function ms(e) {
4828
- return ps(K(e), "localDir");
4835
+ function ps(e) {
4836
+ return fs(q(e), "localDir");
4829
4837
  }
4830
- function hs(e) {
4831
- let t = K(e);
4832
- return ps(t, "localFile", t.exts);
4838
+ function ms(e) {
4839
+ let t = q(e);
4840
+ return fs(t, "localFile", t.exts);
4833
4841
  }
4834
- function Z(e) {
4835
- return J(K(e), {
4836
- ...X({
4842
+ function Q(e) {
4843
+ return Y(q(e), {
4844
+ ...Z({
4837
4845
  ...e,
4838
4846
  key: void 0,
4839
4847
  value: void 0
@@ -4842,9 +4850,9 @@ function Z(e) {
4842
4850
  kind: "textarea"
4843
4851
  });
4844
4852
  }
4845
- function gs(e) {
4846
- return J(K(e), {
4847
- ...Z({
4853
+ function hs(e) {
4854
+ return Y(q(e), {
4855
+ ...Q({
4848
4856
  ...e,
4849
4857
  key: void 0,
4850
4858
  value: void 0
@@ -4852,9 +4860,9 @@ function gs(e) {
4852
4860
  kind: "i18n"
4853
4861
  });
4854
4862
  }
4855
- function _s(e) {
4856
- return J(K(e), {
4857
- ...Z({
4863
+ function gs(e) {
4864
+ return Y(q(e), {
4865
+ ...Q({
4858
4866
  ...e,
4859
4867
  key: void 0,
4860
4868
  value: void 0
@@ -4862,9 +4870,9 @@ function _s(e) {
4862
4870
  kind: "smalltext"
4863
4871
  });
4864
4872
  }
4865
- function vs(e) {
4866
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = V(lo());
4867
- return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), J(t, Y({
4873
+ function _s(e) {
4874
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W());
4875
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, X({
4868
4876
  kind: "number",
4869
4877
  label: t.label ?? "",
4870
4878
  required: n,
@@ -4875,12 +4883,12 @@ function vs(e) {
4875
4883
  max: r.max,
4876
4884
  step: r.step ?? "any"
4877
4885
  },
4878
- zod: G(i, n)
4886
+ zod: K(i, n)
4879
4887
  }, t.multiple ?? !1));
4880
4888
  }
4881
- function ys(e) {
4882
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = V(lo()).int({ message: H("int") });
4883
- return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), J(t, Y({
4889
+ function vs(e) {
4890
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W()).int({ message: H("int") });
4891
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, X({
4884
4892
  kind: "number",
4885
4893
  label: t.label ?? "",
4886
4894
  required: n,
@@ -4891,11 +4899,11 @@ function ys(e) {
4891
4899
  max: r.max,
4892
4900
  step: r.step ?? 1
4893
4901
  },
4894
- zod: G(i, n)
4902
+ zod: K(i, n)
4895
4903
  }, t.multiple ?? !1));
4896
4904
  }
4897
- function bs(e) {
4898
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "day", i;
4905
+ function ys(e) {
4906
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "day", i;
4899
4907
  return i = r === "year" ? F(U()).regex(/^\d{4}$/, { message: H("date_format") }).superRefine((e, n) => {
4900
4908
  t.min && e < t.min && n.addIssue({
4901
4909
  code: B.custom,
@@ -4913,14 +4921,14 @@ function bs(e) {
4913
4921
  message: H("date_max", { max: t.max })
4914
4922
  });
4915
4923
  }) : F(U()).regex(/^\d{4}-\d{2}-\d{2}$/, { message: H("date_format") }).superRefine((e, n) => {
4916
- t.min && e < us(t.min) && n.addIssue({
4924
+ t.min && e < ls(t.min) && n.addIssue({
4917
4925
  code: B.custom,
4918
- message: H("date_min", { min: us(t.min) })
4919
- }), t.max && e > us(t.max) && n.addIssue({
4926
+ message: H("date_min", { min: ls(t.min) })
4927
+ }), t.max && e > ls(t.max) && n.addIssue({
4920
4928
  code: B.custom,
4921
- message: H("date_max", { max: us(t.max) })
4929
+ message: H("date_max", { max: ls(t.max) })
4922
4930
  });
4923
- }), J(t, Y({
4931
+ }), Y(t, X({
4924
4932
  kind: "date",
4925
4933
  label: t.label ?? "",
4926
4934
  required: n,
@@ -4931,44 +4939,44 @@ function bs(e) {
4931
4939
  max: t.max,
4932
4940
  granularity: r
4933
4941
  },
4934
- zod: G(i, n)
4942
+ zod: K(i, n)
4935
4943
  }, t.multiple ?? !1));
4936
4944
  }
4937
- function xs(e) {
4938
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "second", i = F(U()).regex({
4945
+ function bs(e) {
4946
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "second", i = F(U()).regex({
4939
4947
  hour: /^([01]\d|2[0-3])$/,
4940
4948
  minute: /^([01]\d|2[0-3]):[0-5]\d$/,
4941
4949
  second: /^([01]\d|2[0-3]):[0-5]\d:[0-5]\d$/
4942
4950
  }[r], { message: H("time_format") });
4943
- return J(t, Y({
4951
+ return Y(t, X({
4944
4952
  kind: "time",
4945
4953
  label: t.label ?? "",
4946
4954
  required: n,
4947
4955
  prim: "time",
4948
4956
  column: "time",
4949
4957
  hints: { granularity: r },
4950
- zod: G(i, n)
4958
+ zod: K(i, n)
4951
4959
  }, t.multiple ?? !1));
4952
4960
  }
4953
- function Ss(e) {
4954
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "minute", i = F(U()).regex({
4961
+ function xs(e) {
4962
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "minute", i = F(U()).regex({
4955
4963
  hour: /^\d{4}-\d{2}-\d{2}T([01]\d|2[0-3])$/,
4956
4964
  minute: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,
4957
4965
  second: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/
4958
4966
  }[r], { message: H("datetime_format") });
4959
- return J(t, Y({
4967
+ return Y(t, X({
4960
4968
  kind: "datetime",
4961
4969
  label: t.label ?? "",
4962
4970
  required: n,
4963
4971
  prim: "datetime",
4964
4972
  column: "datetime",
4965
4973
  hints: { granularity: r },
4966
- zod: G(i, n)
4974
+ zod: K(i, n)
4967
4975
  }, t.multiple ?? !1));
4968
4976
  }
4969
- function Cs(e) {
4970
- let t = K(e), n = $a((e) => e === "true" || e === 1 || e === "1" ? !0 : e === "false" || e === 0 || e === "0" ? !1 : e, ma().default(!1).nullable());
4971
- return J(t, {
4977
+ function Ss(e) {
4978
+ let t = q(e), n = $a((e) => e === "true" || e === 1 || e === "1" ? !0 : e === "false" || e === 0 || e === "0" ? !1 : e, ma().default(!1).nullable());
4979
+ return Y(t, {
4972
4980
  kind: "boolean",
4973
4981
  label: t.label ?? "",
4974
4982
  required: !1,
@@ -4978,25 +4986,31 @@ function Cs(e) {
4978
4986
  zod: n
4979
4987
  });
4980
4988
  }
4981
- function ws(e) {
4982
- let t = K(e), n = t.required ?? !1, r = Oa([
4989
+ function Cs(e) {
4990
+ let t = q(e), n = t.required ?? !1, r = Oa([
4983
4991
  "yes",
4984
4992
  "no",
4985
4993
  "unknown"
4986
4994
  ], { error: () => H("enum") });
4987
- return J(t, {
4995
+ return Y(t, {
4988
4996
  kind: "triState",
4989
4997
  label: t.label ?? "",
4990
4998
  required: n,
4991
4999
  prim: "triState",
4992
5000
  column: "text",
4993
5001
  hints: {},
4994
- zod: G(r, n)
5002
+ zod: K(r, n)
4995
5003
  });
4996
5004
  }
5005
+ function ws(e) {
5006
+ return typeof e == "string" ? {
5007
+ value: e,
5008
+ title: e
5009
+ } : e;
5010
+ }
4997
5011
  function Ts(e) {
4998
- let t = K(e), n = t.required ?? !1, r = typeof t.options == "string" ? t.options : null, i = Array.isArray(t.options) ? t.options : [], a = i.length > 0 ? Oa(i.map((e) => e.value), { error: () => H("enum") }) : F(U());
4999
- return J(t, Y({
5012
+ let t = q(e), n = t.required ?? !1, r = typeof t.options == "string" ? t.options : null, i = Array.isArray(t.options) ? t.options.map(ws) : [], a = i.length > 0 ? Oa(i.map((e) => e.value), { error: () => H("enum") }) : F(U());
5013
+ return Y(t, X({
5000
5014
  kind: "select",
5001
5015
  label: t.label ?? "",
5002
5016
  required: n,
@@ -5004,18 +5018,18 @@ function Ts(e) {
5004
5018
  column: "text",
5005
5019
  hints: { source: r },
5006
5020
  options: i,
5007
- zod: G(a, n)
5021
+ zod: K(a, n)
5008
5022
  }, t.multiple ?? !1));
5009
5023
  }
5010
5024
  function Es(e) {
5011
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i;
5025
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i;
5012
5026
  return i = r ? R().superRefine((e, t) => {
5013
- let n = W(e);
5027
+ let n = G(e);
5014
5028
  (!Array.isArray(n) || !n.every((e) => Number.isInteger(e) && e > 0)) && t.addIssue({
5015
5029
  code: B.custom,
5016
5030
  message: H("int_list")
5017
5031
  });
5018
- }) : V().int().positive({ message: H("int") }), J(t, {
5032
+ }) : V().int().positive({ message: H("int") }), Y(t, {
5019
5033
  kind: "relation",
5020
5034
  label: t.label ?? "",
5021
5035
  required: n,
@@ -5030,11 +5044,11 @@ function Es(e) {
5030
5044
  shelf: e.options.shelf
5031
5045
  },
5032
5046
  ...r && { json: !0 },
5033
- zod: G(i, n)
5047
+ zod: K(i, n)
5034
5048
  });
5035
5049
  }
5036
5050
  function Ds(e) {
5037
- let t = K(e), n = t.required ?? !1, r = R().superRefine((e, t) => {
5051
+ let t = q(e), n = t.required ?? !1, r = R().superRefine((e, t) => {
5038
5052
  if (typeof e == "string") try {
5039
5053
  JSON.parse(e);
5040
5054
  } catch {
@@ -5044,7 +5058,7 @@ function Ds(e) {
5044
5058
  });
5045
5059
  }
5046
5060
  });
5047
- return J(t, {
5061
+ return Y(t, {
5048
5062
  kind: "json",
5049
5063
  label: t.label ?? "",
5050
5064
  required: n,
@@ -5052,11 +5066,11 @@ function Ds(e) {
5052
5066
  column: "text",
5053
5067
  hints: {},
5054
5068
  json: !0,
5055
- zod: G(r, n)
5069
+ zod: K(r, n)
5056
5070
  });
5057
5071
  }
5058
5072
  function Os(e) {
5059
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i = t.slots && t.slots.length > 0 ? t.slots : [""], a = t.fields?.length ? t.fields : [X({
5073
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i = t.slots && t.slots.length > 0 ? t.slots : [""], a = t.fields?.length ? t.fields : [Z({
5060
5074
  key: "text",
5061
5075
  label: "core.fields.text"
5062
5076
  })], o = /* @__PURE__ */ new Set();
@@ -5066,13 +5080,13 @@ function Os(e) {
5066
5080
  if (!r && (e.type.virtual || e.type.columns)) throw Error(`[field.check] single content field '${e.key}' must be a scalar stored field`);
5067
5081
  o.add(e.key);
5068
5082
  }
5069
- let s = i.map((e, t) => Cs({
5083
+ let s = i.map((e, t) => Ss({
5070
5084
  key: `check${t}`,
5071
5085
  label: e || "core.fields.check"
5072
5086
  }));
5073
5087
  if (r) {
5074
5088
  let e = [...s, ...a];
5075
- return q({
5089
+ return J({
5076
5090
  key: t.key,
5077
5091
  label: t.label ?? t.key,
5078
5092
  multiple: !0,
@@ -5087,7 +5101,7 @@ function Os(e) {
5087
5101
  c[`check${t}`] = ma(), l[`check${t}`] = "boolean";
5088
5102
  });
5089
5103
  let u = z(c).passthrough(), d = R().superRefine((e, t) => {
5090
- let n = typeof e == "string" ? ds(e) : e;
5104
+ let n = typeof e == "string" ? us(e) : e;
5091
5105
  if (n === void 0) {
5092
5106
  t.addIssue({
5093
5107
  code: B.custom,
@@ -5100,7 +5114,7 @@ function Os(e) {
5100
5114
  message: H("check_structure")
5101
5115
  });
5102
5116
  });
5103
- return J(t, {
5117
+ return Y(t, {
5104
5118
  kind: "check",
5105
5119
  label: t.label ?? "",
5106
5120
  required: n,
@@ -5110,21 +5124,21 @@ function Os(e) {
5110
5124
  slots: i,
5111
5125
  fields: a.map((e) => ({
5112
5126
  key: e.key,
5113
- ...rc(e.type)
5127
+ ...ac(e.type)
5114
5128
  }))
5115
5129
  },
5116
5130
  columns: l,
5117
- zod: G(d, n)
5131
+ zod: K(d, n)
5118
5132
  });
5119
5133
  }
5120
5134
  function ks(e) {
5121
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = ao((t.options, t.options)), a = L().finite();
5135
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = ao((t.options, t.options)), a = L().finite();
5122
5136
  r.step === 1 && (a = a.int({ message: H("int") })), r.min != null && (a = a.min(r.min)), r.max != null && (a = a.max(r.max));
5123
5137
  let o = z({
5124
5138
  value: a,
5125
5139
  unit: F().refine((e) => i.some((t) => t.value === e), { message: H("measured_unit") })
5126
5140
  }), s = R().superRefine((e, t) => {
5127
- let n = W(e);
5141
+ let n = G(e);
5128
5142
  if (typeof n == "string") {
5129
5143
  t.addIssue({
5130
5144
  code: B.custom,
@@ -5147,7 +5161,7 @@ function ks(e) {
5147
5161
  });
5148
5162
  }
5149
5163
  });
5150
- return J(t, {
5164
+ return Y(t, {
5151
5165
  kind: "measured",
5152
5166
  label: t.label ?? "",
5153
5167
  required: n,
@@ -5163,17 +5177,50 @@ function ks(e) {
5163
5177
  value: "real",
5164
5178
  unit: "text"
5165
5179
  },
5166
- zod: G(s, n)
5180
+ zod: K(s, n)
5167
5181
  });
5168
5182
  }
5169
5183
  function As(e) {
5170
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = L().finite();
5184
+ let t = q(e), n = t.required ?? !1, r = ao(t.options), i = F(U()).refine((e) => r.some((t) => t.value === e), { message: H("measured_unit") });
5185
+ return Y(t, {
5186
+ kind: "unit",
5187
+ label: t.label ?? "",
5188
+ required: n,
5189
+ prim: "select",
5190
+ column: "text",
5191
+ hints: { source: typeof t.options == "string" ? t.options : null },
5192
+ options: r.map((e) => ({
5193
+ value: e.value,
5194
+ title: e.label
5195
+ })),
5196
+ zod: K(i, n)
5197
+ });
5198
+ }
5199
+ function js(e) {
5200
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W());
5201
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, {
5202
+ kind: "amount",
5203
+ label: t.label ?? "",
5204
+ required: n,
5205
+ prim: "number",
5206
+ column: "real",
5207
+ hints: {
5208
+ unitFrom: t.unitFrom,
5209
+ min: r.min,
5210
+ max: r.max,
5211
+ step: r.step ?? "any"
5212
+ },
5213
+ zod: K(i, n)
5214
+ });
5215
+ }
5216
+ function Ms(e) {
5217
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = L().finite();
5171
5218
  r.min != null && (i = i.min(r.min)), r.max != null && (i = i.max(r.max));
5172
5219
  let a = z({
5173
5220
  value: i,
5174
5221
  currency: F().refine(co, { message: H("money_currency") })
5175
5222
  }), o = R().superRefine((e, t) => {
5176
- let n = W(e);
5223
+ let n = G(e);
5177
5224
  if (typeof n == "string") {
5178
5225
  t.addIssue({
5179
5226
  code: B.custom,
@@ -5186,7 +5233,7 @@ function As(e) {
5186
5233
  message: H("money_structure")
5187
5234
  });
5188
5235
  });
5189
- return J(t, {
5236
+ return Y(t, {
5190
5237
  kind: "money",
5191
5238
  label: t.label ?? "",
5192
5239
  required: n,
@@ -5201,15 +5248,15 @@ function As(e) {
5201
5248
  value: "real",
5202
5249
  currency: "text"
5203
5250
  },
5204
- zod: G(o, n)
5251
+ zod: K(o, n)
5205
5252
  });
5206
5253
  }
5207
- function js(e) {
5208
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = z({
5254
+ function Ns(e) {
5255
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = z({
5209
5256
  code: F(),
5210
5257
  lang: F()
5211
5258
  }), a = R().superRefine((e, t) => {
5212
- let n = W(e);
5259
+ let n = G(e);
5213
5260
  if (typeof n == "string") {
5214
5261
  t.addIssue({
5215
5262
  code: B.custom,
@@ -5222,7 +5269,7 @@ function js(e) {
5222
5269
  message: H("code_structure")
5223
5270
  });
5224
5271
  });
5225
- return J(t, {
5272
+ return Y(t, {
5226
5273
  kind: "code",
5227
5274
  label: t.label ?? "",
5228
5275
  required: n,
@@ -5233,16 +5280,16 @@ function js(e) {
5233
5280
  code: "text",
5234
5281
  lang: "text"
5235
5282
  },
5236
- zod: G(a, n)
5283
+ zod: K(a, n)
5237
5284
  });
5238
5285
  }
5239
- function Ms(e) {
5240
- let t = K(e), n = t.required ?? !1, r = z({
5286
+ function Ps(e) {
5287
+ let t = q(e), n = t.required ?? !1, r = z({
5241
5288
  lat: L().min(-90).max(90),
5242
5289
  lng: L().min(-180).max(180),
5243
5290
  label: F().nullish()
5244
5291
  }), i = R().superRefine((e, t) => {
5245
- let i = W(e), a = i;
5292
+ let i = G(e), a = i;
5246
5293
  if (a == null || typeof a == "object" && a.lat == null && a.lng == null) {
5247
5294
  n && t.addIssue({
5248
5295
  code: B.custom,
@@ -5262,7 +5309,7 @@ function Ms(e) {
5262
5309
  message: H("geo_structure")
5263
5310
  });
5264
5311
  });
5265
- return J(t, {
5312
+ return Y(t, {
5266
5313
  kind: "geo",
5267
5314
  label: t.label ?? "",
5268
5315
  required: n,
@@ -5274,12 +5321,12 @@ function Ms(e) {
5274
5321
  lng: "real",
5275
5322
  label: "text"
5276
5323
  },
5277
- zod: G(i, n)
5324
+ zod: K(i, n)
5278
5325
  });
5279
5326
  }
5280
- function Ns(e) {
5327
+ function Fs(e) {
5281
5328
  return {
5282
- ...rs({
5329
+ ...ns({
5283
5330
  key: e.key,
5284
5331
  label: e.label,
5285
5332
  by: Ts({
@@ -5288,7 +5335,7 @@ function Ns(e) {
5288
5335
  options: "weekdays"
5289
5336
  }),
5290
5337
  fixed: !0,
5291
- fields: [vs({
5338
+ fields: [_s({
5292
5339
  key: "value",
5293
5340
  label: "core.fields.value",
5294
5341
  rules: e.rules
@@ -5297,9 +5344,9 @@ function Ns(e) {
5297
5344
  kind: "per-weekday"
5298
5345
  };
5299
5346
  }
5300
- function Ps(e) {
5301
- let t = K(e);
5302
- return J(t, {
5347
+ function Is(e) {
5348
+ let t = q(e);
5349
+ return Y(t, {
5303
5350
  kind: "lookup",
5304
5351
  label: t.label ?? "",
5305
5352
  required: !1,
@@ -5314,16 +5361,16 @@ function Ps(e) {
5314
5361
  zod: ga().optional()
5315
5362
  });
5316
5363
  }
5317
- function Fs(e) {
5318
- let t = K(e), n = t.config?.granularity ?? "day", r = t.required ?? !1, i = t.multiple ?? !1, a = (e, t) => n === "datetime" ? Ss({
5364
+ function Ls(e) {
5365
+ let t = q(e), n = t.config?.granularity ?? "day", r = t.required ?? !1, i = t.multiple ?? !1, a = (e, t) => n === "datetime" ? xs({
5319
5366
  key: e,
5320
5367
  label: t
5321
- }) : bs({
5368
+ }) : ys({
5322
5369
  key: e,
5323
5370
  label: t,
5324
5371
  rules: { granularity: n === "month" ? "month" : "day" }
5325
5372
  });
5326
- if (i) return q({
5373
+ if (i) return J({
5327
5374
  key: t.key,
5328
5375
  label: t.label ?? t.key,
5329
5376
  multiple: !0,
@@ -5355,12 +5402,12 @@ function Fs(e) {
5355
5402
  });
5356
5403
  let d = n === "datetime" ? "datetime" : n === "day" ? "date" : "text", f = [{
5357
5404
  key: "from",
5358
- ...rc(o.type)
5405
+ ...ac(o.type)
5359
5406
  }, {
5360
5407
  key: "until",
5361
- ...rc(s.type)
5408
+ ...ac(s.type)
5362
5409
  }];
5363
- return J(t, {
5410
+ return Y(t, {
5364
5411
  kind: "period",
5365
5412
  label: t.label ?? "",
5366
5413
  required: r,
@@ -5376,32 +5423,32 @@ function Fs(e) {
5376
5423
  from: d,
5377
5424
  until: d
5378
5425
  },
5379
- zod: G(u, r)
5426
+ zod: K(u, r)
5380
5427
  });
5381
5428
  }
5382
- var Is = /* @__PURE__ */ new Set([
5429
+ var Rs = /* @__PURE__ */ new Set([
5383
5430
  "name",
5384
5431
  "mime",
5385
5432
  "size"
5386
- ]), Ls = [
5433
+ ]), zs = [
5387
5434
  "url",
5388
5435
  "src",
5389
5436
  "href",
5390
5437
  "link"
5391
5438
  ];
5392
- function Rs(e) {
5439
+ function Bs(e) {
5393
5440
  if (typeof e != "object" || !e || Array.isArray(e)) return "file_structure";
5394
5441
  let t = e;
5395
- if (Ls.some((e) => e in t)) return "file_remote_url";
5442
+ if (zs.some((e) => e in t)) return "file_remote_url";
5396
5443
  let n = t.name;
5397
5444
  if (typeof n != "string" || n === "") return "file_structure";
5398
5445
  if (n.includes("://") || n.startsWith("//")) return "file_remote_url";
5399
5446
  if (/[\\/]/.test(n) || n.includes("..")) return "file_name";
5400
- for (let e of Object.keys(t)) if (!Is.has(e)) return "file_unknown_key";
5447
+ for (let e of Object.keys(t)) if (!Rs.has(e)) return "file_unknown_key";
5401
5448
  return t.mime !== void 0 && typeof t.mime != "string" || t.size !== void 0 && typeof t.size != "number" ? "file_structure" : null;
5402
5449
  }
5403
- function Q(e, t) {
5404
- let n = K(t), r = n.required ?? !1, i = n.multiple ?? !1, a = R().superRefine((e, t) => {
5450
+ function $(e, t) {
5451
+ let n = q(t), r = n.required ?? !1, i = n.multiple ?? !1, a = R().superRefine((e, t) => {
5405
5452
  if (typeof e == "string") try {
5406
5453
  JSON.parse(e);
5407
5454
  } catch {
@@ -5411,9 +5458,9 @@ function Q(e, t) {
5411
5458
  });
5412
5459
  return;
5413
5460
  }
5414
- let n = W(e), r = Array.isArray(n) ? n : [n];
5461
+ let n = G(e), r = Array.isArray(n) ? n : [n];
5415
5462
  for (let e of r) {
5416
- let n = Rs(e);
5463
+ let n = Bs(e);
5417
5464
  if (n) {
5418
5465
  t.addIssue({
5419
5466
  code: B.custom,
@@ -5423,7 +5470,7 @@ function Q(e, t) {
5423
5470
  }
5424
5471
  }
5425
5472
  });
5426
- return J(n, {
5473
+ return Y(n, {
5427
5474
  kind: e,
5428
5475
  label: n.label ?? "",
5429
5476
  required: r,
@@ -5431,46 +5478,46 @@ function Q(e, t) {
5431
5478
  column: "text",
5432
5479
  hints: i ? { multiple: !0 } : {},
5433
5480
  json: !0,
5434
- zod: G(a, r)
5481
+ zod: K(a, r)
5435
5482
  });
5436
5483
  }
5437
- function zs(e) {
5438
- return Q("file", e);
5439
- }
5440
- function Bs(e) {
5441
- return Q("document", e);
5442
- }
5443
5484
  function Vs(e) {
5444
- return Q("audio", e);
5485
+ return $("file", e);
5445
5486
  }
5446
5487
  function Hs(e) {
5447
- return Q("video", e);
5488
+ return $("document", e);
5448
5489
  }
5449
5490
  function Us(e) {
5450
- return Q("image", e);
5491
+ return $("audio", e);
5451
5492
  }
5452
5493
  function Ws(e) {
5453
- return Q("media", e);
5494
+ return $("video", e);
5454
5495
  }
5455
5496
  function Gs(e) {
5456
- return Q("avatar", e);
5497
+ return $("image", e);
5457
5498
  }
5458
5499
  function Ks(e) {
5459
- return Q("cover", e);
5500
+ return $("media", e);
5460
5501
  }
5461
5502
  function qs(e) {
5462
- return Q("poster", e);
5503
+ return $("avatar", e);
5463
5504
  }
5464
5505
  function Js(e) {
5465
- let t = K(e), n = {
5466
- ...t.option ?? X({ label: "" }),
5506
+ return $("cover", e);
5507
+ }
5508
+ function Ys(e) {
5509
+ return $("poster", e);
5510
+ }
5511
+ function Xs(e) {
5512
+ let t = q(e), n = {
5513
+ ...t.option ?? Z({ label: "" }),
5467
5514
  label: t.valueLabel ?? ""
5468
5515
  };
5469
- return rs({
5516
+ return ns({
5470
5517
  key: t.key,
5471
5518
  label: t.label ?? "",
5472
- container: t.container ?? es,
5473
- by: X({
5519
+ container: t.container ?? $o,
5520
+ by: Z({
5474
5521
  key: "key",
5475
5522
  label: t.keyLabel ?? ""
5476
5523
  }),
@@ -5481,8 +5528,8 @@ function Js(e) {
5481
5528
  required: t.required
5482
5529
  });
5483
5530
  }
5484
- function Ys(e, t, n) {
5485
- let r = K(n), i = r.required ?? !1, a = r.config ?? {}, o = L().finite();
5531
+ function Zs(e, t, n) {
5532
+ let r = q(n), i = r.required ?? !1, a = r.config ?? {}, o = L().finite();
5486
5533
  t && (o = o.int({ message: H("int") })), a.min != null && (o = o.min(a.min)), a.max != null && (o = o.max(a.max));
5487
5534
  let s = z({
5488
5535
  from: o,
@@ -5497,7 +5544,7 @@ function Ys(e, t, n) {
5497
5544
  });
5498
5545
  return;
5499
5546
  }
5500
- let n = s.safeParse(W(e));
5547
+ let n = s.safeParse(G(e));
5501
5548
  if (!n.success) {
5502
5549
  t.addIssue({
5503
5550
  code: B.custom,
@@ -5510,7 +5557,7 @@ function Ys(e, t, n) {
5510
5557
  message: H("range_order")
5511
5558
  });
5512
5559
  });
5513
- return J(r, {
5560
+ return Y(r, {
5514
5561
  kind: e,
5515
5562
  label: r.label ?? "",
5516
5563
  required: i,
@@ -5528,17 +5575,17 @@ function Ys(e, t, n) {
5528
5575
  from: "real",
5529
5576
  to: "real"
5530
5577
  },
5531
- zod: G(c, i)
5578
+ zod: K(c, i)
5532
5579
  });
5533
5580
  }
5534
- function Xs(e) {
5535
- return Ys("numberRange", !0, e);
5581
+ function Qs(e) {
5582
+ return Zs("numberRange", !0, e);
5536
5583
  }
5537
- function Zs(e) {
5538
- return Ys("realRange", !1, e);
5584
+ function $s(e) {
5585
+ return Zs("realRange", !1, e);
5539
5586
  }
5540
- function Qs(e) {
5541
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i = z({
5587
+ function ec(e) {
5588
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i = z({
5542
5589
  url: F().min(1),
5543
5590
  title: F().optional(),
5544
5591
  description: F().optional(),
@@ -5553,8 +5600,8 @@ function Qs(e) {
5553
5600
  html: F().optional(),
5554
5601
  width: L().optional(),
5555
5602
  height: L().optional()
5556
- }), a = fo(r ? xa(i) : wa([i, xa(i).max(1)]), "embed_structure");
5557
- return J(t, {
5603
+ }), a = uo(r ? xa(i) : wa([i, xa(i).max(1)]), "embed_structure");
5604
+ return Y(t, {
5558
5605
  kind: "embed",
5559
5606
  label: t.label ?? "",
5560
5607
  required: n,
@@ -5562,72 +5609,74 @@ function Qs(e) {
5562
5609
  column: "text",
5563
5610
  hints: r ? { multiple: !0 } : {},
5564
5611
  json: !0,
5565
- zod: G(a, n)
5566
- });
5567
- }
5568
- var $s = {
5569
- string: X,
5570
- text: Z,
5571
- i18n: gs,
5572
- smallText: _s,
5573
- localDir: ms,
5574
- localFile: hs,
5575
- real: vs,
5576
- int: ys,
5577
- date: bs,
5578
- time: xs,
5579
- datetime: Ss,
5580
- boolean: Cs,
5581
- triState: ws,
5612
+ zod: K(a, n)
5613
+ });
5614
+ }
5615
+ var tc = {
5616
+ string: Z,
5617
+ text: Q,
5618
+ i18n: hs,
5619
+ smallText: gs,
5620
+ localDir: ps,
5621
+ localFile: ms,
5622
+ real: _s,
5623
+ int: vs,
5624
+ date: ys,
5625
+ time: bs,
5626
+ datetime: xs,
5627
+ boolean: Ss,
5628
+ triState: Cs,
5582
5629
  select: Ts,
5583
5630
  relation: Es,
5584
5631
  json: Ds,
5585
5632
  check: Os,
5586
5633
  measured: ks,
5587
- money: As,
5588
- code: js,
5589
- geo: Ms,
5590
- lookup: Ps,
5591
- perWeekday: Ns,
5592
- period: Fs,
5593
- file: zs,
5594
- document: Bs,
5595
- audio: Vs,
5596
- video: Hs,
5597
- image: Us,
5598
- media: Ws,
5599
- avatar: Gs,
5600
- cover: Ks,
5601
- poster: qs,
5602
- embed: Qs,
5603
- keyValue: Js,
5604
- numberRange: Xs,
5605
- realRange: Zs,
5606
- group: q,
5607
- row: $o,
5608
- table: es,
5609
- sheet: ts,
5610
- keyed: rs,
5611
- url: ns,
5612
- divider: os,
5613
- break: ss,
5614
- info: cs,
5615
- button: ls
5634
+ unit: As,
5635
+ amount: js,
5636
+ money: Ms,
5637
+ code: Ns,
5638
+ geo: Ps,
5639
+ lookup: Is,
5640
+ perWeekday: Fs,
5641
+ period: Ls,
5642
+ file: Vs,
5643
+ document: Hs,
5644
+ audio: Us,
5645
+ video: Ws,
5646
+ image: Gs,
5647
+ media: Ks,
5648
+ avatar: qs,
5649
+ cover: Js,
5650
+ poster: Ys,
5651
+ embed: ec,
5652
+ keyValue: Xs,
5653
+ numberRange: Qs,
5654
+ realRange: $s,
5655
+ group: J,
5656
+ row: Qo,
5657
+ table: $o,
5658
+ sheet: es,
5659
+ keyed: ns,
5660
+ url: ts,
5661
+ divider: as,
5662
+ break: os,
5663
+ info: ss,
5664
+ button: cs
5616
5665
  };
5617
- function ec(e) {
5618
- for (let t of Object.keys(e)) if (t in $s) throw Error(`[f] preset '${t}' overrides a primitive`);
5666
+ function nc(e) {
5667
+ for (let t of Object.keys(e)) if (t in tc) throw Error(`[f] preset '${t}' overrides a primitive`);
5619
5668
  return {
5620
- ...$s,
5669
+ ...tc,
5621
5670
  ...e
5622
5671
  };
5623
5672
  }
5624
- var tc, nc = () => tc ??= ec(Wo);
5673
+ var rc, ic = () => rc ??= nc(Uo);
5625
5674
  new Proxy({}, {
5626
- get: (e, t) => nc()[t],
5627
- has: (e, t) => t in nc()
5675
+ get: (e, t) => ic()[t],
5676
+ has: (e, t) => t in ic()
5628
5677
  });
5629
- function rc(e) {
5630
- let { kind: t, label: n, required: r, prim: i, hints: a, options: o, relation: s, virtual: c, json: l, hidden: u } = e;
5678
+ function ac(e) {
5679
+ let { kind: t, label: n, required: r, prim: i, hints: a, options: o, relation: s, virtual: c, json: l, hidden: u, derived: d } = e;
5631
5680
  return {
5632
5681
  kind: t,
5633
5682
  label: n,
@@ -5638,13 +5687,14 @@ function rc(e) {
5638
5687
  relation: s,
5639
5688
  virtual: c,
5640
5689
  json: l,
5641
- hidden: u
5690
+ hidden: u,
5691
+ derived: d
5642
5692
  };
5643
5693
  }
5644
5694
  //#endregion
5645
5695
  //#region ../web-sdk/src/registry.ts
5646
- var ic = {};
5647
- function ac(e) {
5696
+ var oc = {};
5697
+ function sc(e) {
5648
5698
  if (!e.kinds.length) throw Error("[render] renderer without kinds");
5649
5699
  let t = {
5650
5700
  kinds: e.kinds,
@@ -5655,90 +5705,90 @@ function ac(e) {
5655
5705
  keys: e.keys
5656
5706
  };
5657
5707
  for (let n of e.kinds) {
5658
- if (ic[n]) throw Error(`[render] kind '${n}' already registered`);
5659
- ic[n] = t;
5708
+ if (oc[n]) throw Error(`[render] kind '${n}' already registered`);
5709
+ oc[n] = t;
5660
5710
  }
5661
5711
  }
5662
- function oc(e) {
5663
- return ic[e.kind];
5664
- }
5665
- function sc(e) {
5666
- if (qo(e) || Jo(e)) return e.type.kind;
5667
- if (Yo(e)) return e.kind ?? (is(e) ? "collection" : as(e) ? "embedded" : "group");
5668
- if (Qo(e)) return "button";
5669
- if (Xo(e)) return "divider";
5670
- if (Zo(e)) return "info";
5712
+ function cc(e) {
5713
+ return oc[e.kind];
5714
+ }
5715
+ function lc(e) {
5716
+ if (Ko(e) || qo(e)) return e.type.kind;
5717
+ if (Jo(e)) return e.kind ?? (rs(e) ? "collection" : is(e) ? "embedded" : "group");
5718
+ if (Zo(e)) return "button";
5719
+ if (Yo(e)) return "divider";
5720
+ if (Xo(e)) return "info";
5671
5721
  throw Error("[render] unknown layout element");
5672
5722
  }
5673
- function cc(e) {
5674
- let t = oc(e)?.layout;
5723
+ function uc(e) {
5724
+ let t = cc(e)?.layout;
5675
5725
  return typeof t == "function" ? t(e) : t ?? "scalar";
5676
5726
  }
5677
- var lc = (e) => e.hints.multi === !0 || e.hints.multiple === !0 ? "block" : "scalar", uc = {};
5678
- function dc(e, t) {
5679
- if (uc[e]) throw Error(`[template] '${e}' already registered`);
5680
- uc[e] = t;
5727
+ var dc = (e) => e.hints.multi === !0 || e.hints.multiple === !0 ? "block" : "scalar", fc = {};
5728
+ function pc(e, t) {
5729
+ if (fc[e]) throw Error(`[template] '${e}' already registered`);
5730
+ fc[e] = t;
5681
5731
  }
5682
- function fc(e) {
5683
- return uc[e];
5732
+ function mc(e) {
5733
+ return fc[e];
5684
5734
  }
5685
5735
  //#endregion
5686
5736
  //#region ../web-sdk/src/list-view.ts
5687
- var pc = {};
5688
- function mc(e) {
5737
+ var hc = {};
5738
+ function gc(e) {
5689
5739
  if (!e.kind) throw Error("[list-view] view without kind");
5690
- if (pc[e.kind]) throw Error(`[list-view] kind '${e.kind}' already registered`);
5691
- pc[e.kind] = e;
5740
+ if (hc[e.kind]) throw Error(`[list-view] kind '${e.kind}' already registered`);
5741
+ hc[e.kind] = e;
5692
5742
  }
5693
- function hc(e) {
5694
- return pc[e];
5743
+ function _c(e) {
5744
+ return hc[e];
5695
5745
  }
5696
5746
  //#endregion
5697
5747
  //#region ../web-sdk/src/plugin-ui.ts
5698
- function gc(e) {
5748
+ function vc(e) {
5699
5749
  return e;
5700
5750
  }
5701
- var $ = /* @__PURE__ */ new Map(), _c = /* @__PURE__ */ new Map(), vc = /* @__PURE__ */ new Map();
5702
- function yc(e) {
5751
+ var yc = /* @__PURE__ */ new Map(), bc = /* @__PURE__ */ new Map(), xc = /* @__PURE__ */ new Map();
5752
+ function Sc(e) {
5703
5753
  for (let t of e.slots ?? []) {
5704
- let e = $.get(t.slot);
5705
- e || (e = /* @__PURE__ */ new Map(), $.set(t.slot, e)), e.set(t.id, t);
5754
+ let e = yc.get(t.slot);
5755
+ e || (e = /* @__PURE__ */ new Map(), yc.set(t.slot, e)), e.set(t.id, t);
5706
5756
  }
5707
- for (let t of e.routes ?? []) _c.set(t.path, t);
5708
- for (let t of e.nav ?? []) vc.set(t.to, t);
5757
+ for (let t of e.routes ?? []) bc.set(t.path, t);
5758
+ for (let t of e.nav ?? []) xc.set(t.to, t);
5709
5759
  }
5710
- function bc(e) {
5760
+ function Cc(e) {
5711
5761
  return (t, n) => (t.order ?? 0) - (n.order ?? 0) || e(t).localeCompare(e(n));
5712
5762
  }
5713
- function xc(e) {
5714
- return [...$.get(e)?.values() ?? []].sort(bc((e) => e.id));
5763
+ function wc(e) {
5764
+ return [...yc.get(e)?.values() ?? []].sort(Cc((e) => e.id));
5715
5765
  }
5716
- function Sc() {
5717
- return [..._c.values()];
5766
+ function Tc() {
5767
+ return [...bc.values()];
5718
5768
  }
5719
- function Cc() {
5720
- return [...vc.values()].sort(bc((e) => e.to));
5769
+ function Ec() {
5770
+ return [...xc.values()].sort(Cc((e) => e.to));
5721
5771
  }
5722
- function wc() {
5723
- $.clear(), _c.clear(), vc.clear();
5772
+ function Dc() {
5773
+ yc.clear(), bc.clear(), xc.clear();
5724
5774
  }
5725
5775
  //#endregion
5726
5776
  //#region ../web-sdk/src/site-links.ts
5727
- var Tc = [], Ec = [];
5728
- function Dc(e) {
5729
- Tc = [...e];
5777
+ var Oc = [], kc = [];
5778
+ function Ac(e) {
5779
+ Oc = [...e];
5730
5780
  }
5731
- function Oc() {
5732
- return [...Tc];
5781
+ function jc() {
5782
+ return [...Oc];
5733
5783
  }
5734
- function kc(e) {
5735
- Ec = [...e];
5784
+ function Mc(e) {
5785
+ kc = [...e];
5736
5786
  }
5737
- function Ac() {
5738
- return [...Ec];
5787
+ function Nc() {
5788
+ return [...kc];
5739
5789
  }
5740
- function jc() {
5741
- Tc = [], Ec = [];
5790
+ function Pc() {
5791
+ Oc = [], kc = [];
5742
5792
  }
5743
5793
  //#endregion
5744
- export { yc as applyAppUI, gc as definePluginUI, sc as elementKind, cc as fieldLayout, Cc as getPluginNav, Sc as getPluginRoutes, Oc as getSiteLinks, Ac as getSiteShelves, xc as getSlotEntries, pc as listViewRegistry, lc as multiBlock, mc as registerListView, ac as registerRenderer, Dc as registerSiteLinks, kc as registerSiteShelves, dc as registerTemplate, ic as rendererRegistry, wc as resetAppUI, jc as resetSiteLinks, hc as resolveListView, oc as resolveRenderer, fc as resolveTemplate };
5794
+ export { Sc as applyAppUI, vc as definePluginUI, lc as elementKind, uc as fieldLayout, Ec as getPluginNav, Tc as getPluginRoutes, jc as getSiteLinks, Nc as getSiteShelves, wc as getSlotEntries, hc as listViewRegistry, dc as multiBlock, gc as registerListView, sc as registerRenderer, Ac as registerSiteLinks, Mc as registerSiteShelves, pc as registerTemplate, oc as rendererRegistry, Dc as resetAppUI, Pc as resetSiteLinks, _c as resolveListView, cc as resolveRenderer, mc as resolveTemplate };