@verbb/formie-browser 1.0.15 → 1.0.16

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 (135) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/chunks/{address-country-BcEQKw0T.js → address-country-DLJF-OkC.js} +4 -8
  3. package/dist/chunks/{address-finder-BWGINCSA.js → address-finder-QK1m1eyv.js} +1 -1
  4. package/dist/chunks/{address-state-DI3ndhMU.js → address-state-CHKit8AW.js} +26 -35
  5. package/dist/chunks/{api-BK9b340y.js → api-BPtH5RBA.js} +152 -120
  6. package/dist/chunks/{api-Dxl_CKw-.js → api-BR2Gqy37.js} +306 -301
  7. package/dist/chunks/{api-ghNr2uxX.js → api-CmuOZ0i3.js} +1 -1
  8. package/dist/chunks/{bpoint-BwtuyN_O.js → bpoint-GvYfyPjD.js} +1 -1
  9. package/dist/chunks/{calculations-YEoVCG2q.js → calculations-DeEmdUDq.js} +5 -7
  10. package/dist/chunks/{captcha-eu-DWLoQFKB.js → captcha-eu-eU_M6snp.js} +1 -1
  11. package/dist/chunks/{checkbox-radio-gsm8QPJg.js → checkbox-radio-CSXo6svm.js} +4 -12
  12. package/dist/chunks/{combobox-Ba08_cHL.js → combobox-CJh2DoSO.js} +292 -333
  13. package/dist/chunks/{conditions-Ceeg6ReZ.js → conditions-Dz3068K0.js} +56 -72
  14. package/dist/chunks/{country-from-ip-DDj_mFki.js → country-from-ip-BqQ-BqLH.js} +1 -1
  15. package/dist/chunks/{custom-google-maps-C4l2S3GO.js → custom-google-maps-rNm5VFbb.js} +2 -6
  16. package/dist/chunks/{custom-link-CLazgKYH.js → custom-link-CLqFCssQ.js} +1 -1
  17. package/dist/chunks/{custom-maps-DqcAlD0v.js → custom-maps-DgjYQDLj.js} +4 -8
  18. package/dist/chunks/{date-picker-DaPvMrop.js → date-picker-BVJxJVYT.js} +30 -47
  19. package/dist/chunks/{debug-BV0DvdHx.js → debug-rhzqP1j2.js} +2 -14
  20. package/dist/chunks/{dist-ZLeW0zZ3.js → dist-CJReDlDK.js} +13 -8
  21. package/dist/chunks/{eway-uw0DzU-L.js → eway-BZuTBAUW.js} +1 -1
  22. package/dist/chunks/{field-references.resolver-Ca8MguFv.js → field-references.resolver-uSHf5-NP.js} +1 -1
  23. package/dist/chunks/{file-upload-B8_mH012.js → file-upload-vEUr_EuP.js} +114 -108
  24. package/dist/chunks/{friendly-captcha-v1-CVXaXgDO.js → friendly-captcha-v1-C_cF1WD2.js} +2 -2
  25. package/dist/chunks/{friendly-captcha-v2-DkeIVTKI.js → friendly-captcha-v2-BenESH-n.js} +2 -2
  26. package/dist/chunks/{friendly-challenge-DPG9MJb1.js → friendly-challenge-BgPBEMXx.js} +21 -35
  27. package/dist/chunks/{go-cardless-c4wLJdOt.js → go-cardless-DWZeB0Bq.js} +2 -6
  28. package/dist/chunks/{google-address-JHYvjwgN.js → google-address-DQR6rsbh.js} +2 -2
  29. package/dist/chunks/{hcaptcha-Dt3ELLlP.js → hcaptcha-COilLmRT.js} +1 -1
  30. package/dist/chunks/{hidden-BZhXnNPe.js → hidden-Bc2TpcgF.js} +1 -1
  31. package/dist/chunks/{http-C2QdHuWO.js → http-Dj_skqaa.js} +1 -1
  32. package/dist/chunks/{leaflet-src-DE6rv6M-.js → leaflet-src-Cg-LUOD8.js} +74 -122
  33. package/dist/chunks/{loqate-m51iPyO1.js → loqate-ZZClcacr.js} +1 -1
  34. package/dist/chunks/{mollie-Bn0PX173.js → mollie-8OMXIYa8.js} +2 -6
  35. package/dist/chunks/{moneris-BRbUvI4t.js → moneris-qYHJ9EFy.js} +1 -1
  36. package/dist/chunks/opayo-DlWPEnla.js +159 -0
  37. package/dist/chunks/{paddle-CympHVvd.js → paddle-CArfWih0.js} +1 -1
  38. package/dist/chunks/{password-validation-C8_uO_c_.js → password-validation-HGOU9kf3.js} +2 -2
  39. package/dist/chunks/{paypal-h75h6wae.js → paypal-BcaMCMGY.js} +1 -1
  40. package/dist/chunks/{payway-C9rHTCC_.js → payway-vxC7_bfR.js} +3 -11
  41. package/dist/chunks/{phone-country-B8fv-L5_.js → phone-country-Bx9EG50h.js} +123 -140
  42. package/dist/chunks/{place-kit-BnZGQ-L1.js → place-kit-BKk8xDXf.js} +2 -2
  43. package/dist/chunks/{placekit-autocomplete.esm-CZZERYur.js → placekit-autocomplete.esm-D2A_0iVU.js} +2 -5
  44. package/dist/chunks/{recaptcha-enterprise-CUs8BO6V.js → recaptcha-enterprise-Cx6HUpMa.js} +6 -12
  45. package/dist/chunks/recaptcha-shared-CcMI-r8t.js +33 -0
  46. package/dist/chunks/{recaptcha-v2-checkbox-P1McW4Pv.js → recaptcha-v2-checkbox-DQ9BJzcv.js} +2 -2
  47. package/dist/chunks/{recaptcha-v2-invisible-FGDqozSP.js → recaptcha-v2-invisible-BP0T8Pan.js} +2 -2
  48. package/dist/chunks/recaptcha-v3-DKMGQ27K.js +38 -0
  49. package/dist/chunks/{repeater-CyhDbozO.js → repeater-BR0RUvTs.js} +3 -7
  50. package/dist/chunks/{rich-text-uV4o_pGk.js → rich-text-H2A6cm1t.js} +33 -11
  51. package/dist/chunks/{rolldown-runtime-DtPi1Y-2.js → rolldown-runtime-VHNaYcLd.js} +1 -1
  52. package/dist/chunks/{sdk-lkwSvlpM.js → sdk-_cmrRYgp.js} +4 -16
  53. package/dist/chunks/{shared-OKhSay59.js → shared-CJ1LIEh3.js} +1 -3
  54. package/dist/chunks/{signature-7cldFbqj.js → signature-CfKA_poI.js} +9 -41
  55. package/dist/chunks/{snaptcha-C3QLYxFT.js → snaptcha-P3EoSQud.js} +1 -1
  56. package/dist/chunks/{square-C1z5DPVw.js → square-Dyz0p_GU.js} +1 -1
  57. package/dist/chunks/{stripe-Dmkdkq1y.js → stripe-Bfd_jp_k.js} +3 -6
  58. package/dist/chunks/{summary-Bn-g5SDx.js → summary-B3CAebLV.js} +44 -36
  59. package/dist/chunks/{survey-likert-fk1hUPff.js → survey-likert-CEtUceag.js} +1 -1
  60. package/dist/chunks/{survey-rank-BsLGl2LX.js → survey-rank-Dtt97y6s.js} +3 -7
  61. package/dist/chunks/{survey-rating-DVS6e6fM.js → survey-rating-mlDMI0uq.js} +9 -23
  62. package/dist/chunks/{table-j7MlLLCc.js → table-0k6Md0IO.js} +1 -1
  63. package/dist/chunks/{text-limit-LGMPhFuC.js → text-limit-CTVML6s7.js} +10 -10
  64. package/dist/chunks/{turnstile-ptihQfLl.js → turnstile-Sp4ubowK.js} +1 -1
  65. package/dist/chunks/{upload-manager-BW7l-BhF.js → upload-manager-Ccg3d_4I.js} +11 -25
  66. package/dist/index.d.ts +1 -0
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +752 -756
  69. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  70. package/dist/js/core/dom-events.d.ts +5 -0
  71. package/dist/js/core/dom-events.d.ts.map +1 -1
  72. package/dist/js/core/page-client-event.d.ts.map +1 -1
  73. package/dist/js/core/submit-result-state.d.ts.map +1 -1
  74. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  75. package/dist/js/core/validation-focus.d.ts.map +1 -1
  76. package/dist/js/modules/captchas/factories.d.ts.map +1 -1
  77. package/dist/js/modules/captchas/host.d.ts +4 -1
  78. package/dist/js/modules/captchas/host.d.ts.map +1 -1
  79. package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -1
  80. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -1
  81. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
  82. package/dist/js/modules/fields/address-state.d.ts.map +1 -1
  83. package/dist/js/modules/fields/combobox.d.ts +2 -0
  84. package/dist/js/modules/fields/combobox.d.ts.map +1 -1
  85. package/dist/js/modules/fields/conditions.d.ts.map +1 -1
  86. package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
  87. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  88. package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
  89. package/dist/js/modules/fields/summary.d.ts.map +1 -1
  90. package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
  91. package/dist/js/modules/payments/factories.d.ts.map +1 -1
  92. package/dist/js/modules/payments/opayo.d.ts.map +1 -1
  93. package/dist/js/submit/pipeline.d.ts +2 -0
  94. package/dist/js/submit/pipeline.d.ts.map +1 -1
  95. package/dist/js/utils/form-started-at.d.ts +1 -0
  96. package/dist/js/utils/form-started-at.d.ts.map +1 -1
  97. package/dist/js/utils/unload-warning.d.ts +4 -0
  98. package/dist/js/utils/unload-warning.d.ts.map +1 -1
  99. package/dist/js/validation/rules/required.d.ts.map +1 -1
  100. package/dist/js/validation/submit-readiness.d.ts.map +1 -1
  101. package/dist/js/validation/validator.d.ts +1 -0
  102. package/dist/js/validation/validator.d.ts.map +1 -1
  103. package/package.json +3 -3
  104. package/src/index.ts +1 -0
  105. package/src/js/core/create-formie-client.ts +20 -18
  106. package/src/js/core/dom-events.ts +30 -1
  107. package/src/js/core/page-client-event.ts +5 -7
  108. package/src/js/core/submit-result-state.ts +13 -2
  109. package/src/js/core/submit-result-ui.ts +21 -0
  110. package/src/js/core/validation-focus.ts +17 -3
  111. package/src/js/modules/captchas/factories.ts +241 -101
  112. package/src/js/modules/captchas/host.ts +16 -0
  113. package/src/js/modules/captchas/recaptcha-enterprise.ts +1 -1
  114. package/src/js/modules/captchas/recaptcha-shared.ts +23 -5
  115. package/src/js/modules/captchas/recaptcha-v3.ts +23 -14
  116. package/src/js/modules/fields/address-state.ts +6 -4
  117. package/src/js/modules/fields/combobox.ts +19 -1
  118. package/src/js/modules/fields/conditions.ts +3 -0
  119. package/src/js/modules/fields/file-upload.ts +11 -4
  120. package/src/js/modules/fields/phone-country.ts +23 -0
  121. package/src/js/modules/fields/rich-text.ts +33 -0
  122. package/src/js/modules/fields/summary.ts +63 -10
  123. package/src/js/modules/fields/text-limit.ts +11 -0
  124. package/src/js/modules/payments/factories.ts +87 -54
  125. package/src/js/modules/payments/opayo.ts +7 -0
  126. package/src/js/submit/pipeline.ts +16 -9
  127. package/src/js/utils/form-started-at.ts +19 -4
  128. package/src/js/utils/unload-warning.ts +63 -7
  129. package/src/js/validation/rules/required.ts +6 -0
  130. package/src/js/validation/submit-readiness.ts +2 -0
  131. package/src/js/validation/validator.ts +15 -4
  132. package/src/vendor.d.ts +2 -0
  133. package/dist/chunks/opayo-BwWdInEP.js +0 -188
  134. package/dist/chunks/recaptcha-shared-DTbTw-MF.js +0 -27
  135. package/dist/chunks/recaptcha-v3-CflUHeZD.js +0 -28
@@ -1,31 +1,28 @@
1
- import { t as e } from "./debug-BV0DvdHx.js";
1
+ import { t as e } from "./debug-rhzqP1j2.js";
2
2
  import { n as t } from "./theme-classes-DAQuEqdP.js";
3
3
  import { t as n } from "./skip-CEW89ExY.js";
4
- import { t as r } from "./styles-BfoIZwJp.js";
5
- import { i, n as a } from "./shared-OKhSay59.js";
4
+ import { i as r } from "./i18n-BY1ds1BL.js";
5
+ import { t as i } from "./styles-BfoIZwJp.js";
6
+ import { i as a, n as o } from "./shared-CJ1LIEh3.js";
6
7
  //#region ../../node_modules/tom-select/dist/esm/contrib/microevent.js
7
- function o(e, t) {
8
+ function s(e, t) {
8
9
  e.split(/\s+/).forEach((e) => {
9
10
  t(e);
10
11
  });
11
12
  }
12
- var s = class {
13
+ var c = class {
13
14
  constructor() {
14
15
  this._events = {};
15
16
  }
16
17
  on(e, t) {
17
- o(e, (e) => {
18
+ s(e, (e) => {
18
19
  let n = this._events[e] || [];
19
20
  n.push(t), this._events[e] = n;
20
21
  });
21
22
  }
22
23
  off(e, t) {
23
24
  var n = arguments.length;
24
- if (n === 0) {
25
- this._events = {};
26
- return;
27
- }
28
- o(e, (e) => {
25
+ n === 0 ? this._events = {} : s(e, (e) => {
29
26
  if (n === 1) {
30
27
  delete this._events[e];
31
28
  return;
@@ -36,7 +33,7 @@ var s = class {
36
33
  }
37
34
  trigger(e, ...t) {
38
35
  var n = this;
39
- o(e, (e) => {
36
+ s(e, (e) => {
40
37
  let r = n._events[e];
41
38
  r !== void 0 && r.forEach((e) => {
42
39
  e.apply(n, t);
@@ -46,7 +43,7 @@ var s = class {
46
43
  };
47
44
  //#endregion
48
45
  //#region ../../node_modules/tom-select/dist/esm/contrib/microplugin.js
49
- function c(e) {
46
+ function l(e) {
50
47
  return e.plugins = {}, class extends e {
51
48
  constructor() {
52
49
  super(...arguments), this.plugins = {
@@ -88,26 +85,22 @@ function c(e) {
88
85
  }
89
86
  //#endregion
90
87
  //#region ../../node_modules/@orchidjs/unicode-variants/dist/esm/regex.js
91
- var l = (e) => (e = e.filter(Boolean), e.length < 2 ? e[0] || "" : m(e) == 1 ? "[" + e.join("") + "]" : "(?:" + e.join("|") + ")"), u = (e) => {
92
- if (!f(e)) return e.join("");
88
+ var u = (e) => (e = e.filter(Boolean), e.length < 2 ? e[0] || "" : h(e) == 1 ? "[" + e.join("") + "]" : "(?:" + e.join("|") + ")"), d = (e) => {
89
+ if (!p(e)) return e.join("");
93
90
  let t = "", n = 0, r = () => {
94
91
  n > 1 && (t += "{" + n + "}");
95
92
  };
96
93
  return e.forEach((i, a) => {
97
- if (i === e[a - 1]) {
98
- n++;
99
- return;
100
- }
101
- r(), t += i, n = 1;
94
+ i === e[a - 1] ? n++ : (r(), t += i, n = 1);
102
95
  }), r(), t;
103
- }, d = (e) => l(Array.from(e)), f = (e) => new Set(e).size !== e.length, p = (e) => (e + "").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu, "\\$1"), m = (e) => e.reduce((e, t) => Math.max(e, h(t)), 0), h = (e) => Array.from(e).length, g = (e) => {
96
+ }, f = (e) => u(Array.from(e)), p = (e) => new Set(e).size !== e.length, m = (e) => (e + "").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu, "\\$1"), h = (e) => e.reduce((e, t) => Math.max(e, g(t)), 0), g = (e) => Array.from(e).length, _ = (e) => {
104
97
  if (e.length === 1) return [[e]];
105
98
  let t = [];
106
- return g(e.substring(1)).forEach(function(n) {
99
+ return _(e.substring(1)).forEach(function(n) {
107
100
  let r = n.slice(0);
108
101
  r[0] = e.charAt(0) + r[0], t.push(r), r = n.slice(0), r.unshift(e.charAt(0)), t.push(r);
109
102
  }), t;
110
- }, _ = [[0, 65535]], v, y, ee = 3, b = {}, x = {
103
+ }, v = [[0, 65535]], y, b, x = 3, S = {}, ee = {
111
104
  "/": "⁄∕",
112
105
  0: "߀",
113
106
  a: "ⱥɐɑ",
@@ -150,20 +143,20 @@ var l = (e) => (e = e.filter(Boolean), e.length < 2 ? e[0] || "" : m(e) == 1 ? "
150
143
  z: "ƶȥɀⱬꝣ",
151
144
  hv: "ƕ"
152
145
  };
153
- for (let e in x) {
154
- let t = x[e] || "";
146
+ for (let e in ee) {
147
+ let t = ee[e] || "";
155
148
  for (let n = 0; n < t.length; n++) {
156
149
  let r = t.substring(n, n + 1);
157
- b[r] = e;
150
+ S[r] = e;
158
151
  }
159
152
  }
160
- var te = RegExp(Object.keys(b).join("|") + "|[̀-ͯ·ʾʼ]", "gu"), ne = (e) => {
161
- v === void 0 && (v = se(e || _));
162
- }, re = (e, t = "NFKD") => e.normalize(t), S = (e) => Array.from(e).reduce((e, t) => e + ie(t), ""), ie = (e) => (e = re(e).toLowerCase().replace(te, (e) => b[e] || ""), re(e, "NFC"));
153
+ var te = RegExp(Object.keys(S).join("|") + "|[̀-ͯ·ʾʼ]", "gu"), ne = (e) => {
154
+ y === void 0 && (y = se(e || v));
155
+ }, re = (e, t = "NFKD") => e.normalize(t), C = (e) => Array.from(e).reduce((e, t) => e + ie(t), ""), ie = (e) => (e = re(e).toLowerCase().replace(te, (e) => S[e] || ""), re(e, "NFC"));
163
156
  function* ae(e) {
164
157
  for (let [t, n] of e) for (let e = t; e <= n; e++) {
165
- let t = String.fromCharCode(e), n = S(t);
166
- n != t.toLowerCase() && (n.length > ee || n.length != 0 && (yield {
158
+ let t = String.fromCharCode(e), n = C(t);
159
+ n != t.toLowerCase() && (n.length > x || n.length != 0 && (yield {
167
160
  folded: n,
168
161
  composed: t,
169
162
  code_point: e
@@ -172,8 +165,8 @@ function* ae(e) {
172
165
  }
173
166
  var oe = (e) => {
174
167
  let t = {}, n = (e, n) => {
175
- let r = t[e] || /* @__PURE__ */ new Set(), i = RegExp("^" + d(r) + "$", "iu");
176
- n.match(i) || (r.add(p(n)), t[e] = r);
168
+ let r = t[e] || /* @__PURE__ */ new Set(), i = RegExp("^" + f(r) + "$", "iu");
169
+ n.match(i) || (r.add(m(n)), t[e] = r);
177
170
  };
178
171
  for (let t of ae(e)) n(t.folded, t.folded), n(t.folded, t.composed);
179
172
  return t;
@@ -181,20 +174,20 @@ var oe = (e) => {
181
174
  let t = oe(e), n = {}, r = [];
182
175
  for (let e in t) {
183
176
  let i = t[e];
184
- i && (n[e] = d(i)), e.length > 1 && r.push(p(e));
177
+ i && (n[e] = f(i)), e.length > 1 && r.push(m(e));
185
178
  }
186
179
  r.sort((e, t) => t.length - e.length);
187
- let i = l(r);
188
- return y = RegExp("^" + i, "u"), n;
180
+ let i = u(r);
181
+ return b = RegExp("^" + i, "u"), n;
189
182
  }, ce = (e, t = 1) => {
190
183
  let n = 0;
191
- return e = e.map((e) => (v[e] && (n += e.length), v[e] || e)), n >= t ? u(e) : "";
192
- }, le = (e, t = 1) => (t = Math.max(t, e.length - 1), l(g(e).map((e) => ce(e, t)))), C = (e, t = !0) => {
184
+ return e = e.map((e) => (y[e] && (n += e.length), y[e] || e)), n >= t ? d(e) : "";
185
+ }, le = (e, t = 1) => (t = Math.max(t, e.length - 1), u(_(e).map((e) => ce(e, t)))), w = (e, t = !0) => {
193
186
  let n = +(e.length > 1);
194
- return l(e.map((e) => {
187
+ return u(e.map((e) => {
195
188
  let r = [], i = t ? e.length() : e.length() - 1;
196
189
  for (let t = 0; t < i; t++) r.push(le(e.substrs[t] || "", n));
197
- return u(r);
190
+ return d(r);
198
191
  }));
199
192
  }, ue = (e, t) => {
200
193
  for (let n of t) {
@@ -209,7 +202,7 @@ var oe = (e) => {
209
202
  }).length > 0)) return !0;
210
203
  }
211
204
  return !1;
212
- }, w = class e {
205
+ }, de = class e {
213
206
  parts;
214
207
  substrs;
215
208
  start;
@@ -237,11 +230,11 @@ var oe = (e) => {
237
230
  substr: o
238
231
  }), r;
239
232
  }
240
- }, de = (e) => {
241
- ne(), e = S(e);
242
- let t = "", n = [new w()];
233
+ }, fe = (e) => {
234
+ ne(), e = C(e);
235
+ let t = "", n = [new de()];
243
236
  for (let r = 0; r < e.length; r++) {
244
- let i = e.substring(r).match(y), a = e.substring(r, r + 1), o = i ? i[0] : null, s = [], c = /* @__PURE__ */ new Set();
237
+ let i = e.substring(r).match(b), a = e.substring(r, r + 1), o = i ? i[0] : null, s = [], c = /* @__PURE__ */ new Set();
245
238
  for (let e of n) {
246
239
  let t = e.last();
247
240
  if (!t || t.length == 1 || t.end <= r) {
@@ -272,18 +265,16 @@ var oe = (e) => {
272
265
  if (s.length > 0) {
273
266
  s = s.sort((e, t) => e.length() - t.length());
274
267
  for (let e of s) ue(e, n) || n.push(e);
275
- continue;
276
- }
277
- if (r > 0 && c.size == 1 && !c.has("3")) {
278
- t += C(n, !1);
279
- let e = new w(), r = n[0];
268
+ } else if (r > 0 && c.size == 1 && !c.has("3")) {
269
+ t += w(n, !1);
270
+ let e = new de(), r = n[0];
280
271
  r && e.add(r.last()), n = [e];
281
272
  }
282
273
  }
283
- return t += C(n, !0), t;
284
- }, fe = (e, t) => {
285
- if (e) return e[t];
274
+ return t += w(n, !0), t;
286
275
  }, pe = (e, t) => {
276
+ if (e) return e[t];
277
+ }, me = (e, t) => {
287
278
  if (e) {
288
279
  for (var n, r = t.split("."); (n = r.shift()) && (e = e[n]););
289
280
  return e;
@@ -298,7 +289,7 @@ var oe = (e) => {
298
289
  }, D = (e, t) => {
299
290
  if (Array.isArray(e)) e.forEach(t);
300
291
  else for (var n in e) e.hasOwnProperty(n) && t(e[n], n);
301
- }, me = (e, t) => typeof e == "number" && typeof t == "number" ? e > t ? 1 : e < t ? -1 : 0 : (e = S(e + "").toLowerCase(), t = S(t + "").toLowerCase(), e > t ? 1 : t > e ? -1 : 0), he = class {
292
+ }, he = (e, t) => typeof e == "number" && typeof t == "number" ? e > t ? 1 : e < t ? -1 : 0 : (e = C(e + "").toLowerCase(), t = C(t + "").toLowerCase(), e > t ? 1 : t > e ? -1 : 0), ge = class {
302
293
  items;
303
294
  settings;
304
295
  constructor(e, t) {
@@ -308,9 +299,9 @@ var oe = (e) => {
308
299
  if (!e || !e.length) return [];
309
300
  let r = [], i = e.split(/\s+/);
310
301
  var a;
311
- return n && (a = RegExp("^(" + Object.keys(n).map(p).join("|") + "):(.*)$")), i.forEach((e) => {
302
+ return n && (a = RegExp("^(" + Object.keys(n).map(m).join("|") + "):(.*)$")), i.forEach((e) => {
312
303
  let n, i = null, o = null;
313
- a && (n = e.match(a)) && (i = n[1], e = n[2]), e.length > 0 && (o = this.settings.diacritics ? de(e) || null : p(e), o && t && (o = "\\b" + o)), r.push({
304
+ a && (n = e.match(a)) && (i = n[1], e = n[2]), e.length > 0 && (o = this.settings.diacritics ? fe(e) || null : m(e), o && t && (o = "\\b" + o)), r.push({
314
305
  string: e,
315
306
  regex: o ? new RegExp(o, "iu") : null,
316
307
  field: i
@@ -386,7 +377,7 @@ var oe = (e) => {
386
377
  } else n = n.filter((e) => e.field !== "$score");
387
378
  return n.length ? function(e, t) {
388
379
  var r, i;
389
- for (let a of n) if (i = a.field, r = (a.direction === "desc" ? -1 : 1) * me(o(i, e), o(i, t)), r) return r;
380
+ for (let a of n) if (i = a.field, r = (a.direction === "desc" ? -1 : 1) * he(o(i, e), o(i, t)), r) return r;
390
381
  return 0;
391
382
  } : null;
392
383
  }
@@ -410,7 +401,7 @@ var oe = (e) => {
410
401
  total: 0,
411
402
  items: [],
412
403
  weights: n,
413
- getAttrFn: r.nesting ? pe : fe
404
+ getAttrFn: r.nesting ? me : pe
414
405
  };
415
406
  }
416
407
  search(e, t) {
@@ -431,7 +422,7 @@ var oe = (e) => {
431
422
  let o = n._getSortFunction(i);
432
423
  return o && i.items.sort(o), i.total = i.items.length, typeof t.limit == "number" && (i.items = i.items.slice(0, t.limit)), i;
433
424
  }
434
- }, O = (e) => e == null ? null : k(e), k = (e) => typeof e == "boolean" ? e ? "1" : "0" : e + "", A = (e) => (e + "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), ge = (e, t) => t > 0 ? window.setTimeout(e, t) : (e.call(null), null), _e = (e, t) => {
425
+ }, O = (e) => e == null ? null : k(e), k = (e) => typeof e == "boolean" ? e ? "1" : "0" : e + "", A = (e) => (e + "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), _e = (e, t) => t > 0 ? window.setTimeout(e, t) : (e.call(null), null), ve = (e, t) => {
435
426
  var n;
436
427
  return function(r, i) {
437
428
  var a = this;
@@ -439,7 +430,7 @@ var oe = (e) => {
439
430
  n = null, a.loadedSearches[r] = !0, e.call(a, r, i);
440
431
  }, t);
441
432
  };
442
- }, ve = (e, t, n) => {
433
+ }, ye = (e, t, n) => {
443
434
  var r, i = e.trigger, a = {};
444
435
  e.trigger = function() {
445
436
  var n = arguments[0];
@@ -447,7 +438,7 @@ var oe = (e) => {
447
438
  else return i.apply(e, arguments);
448
439
  }, n.apply(e, []), e.trigger = i;
449
440
  for (r of t) r in a && i.apply(e, a[r]);
450
- }, ye = (e) => ({
441
+ }, be = (e) => ({
451
442
  start: e.selectionStart || 0,
452
443
  length: (e.selectionEnd || 0) - (e.selectionStart || 0)
453
444
  }), j = (e, t = !1) => {
@@ -462,41 +453,41 @@ var oe = (e) => {
462
453
  }, R = (e) => {
463
454
  if (e.jquery) return e[0];
464
455
  if (e instanceof HTMLElement) return e;
465
- if (be(e)) {
456
+ if (xe(e)) {
466
457
  var t = document.createElement("template");
467
458
  return t.innerHTML = e.trim(), t.content.firstChild;
468
459
  }
469
460
  return document.querySelector(e);
470
- }, be = (e) => typeof e == "string" && e.indexOf("<") > -1, xe = (e) => e.replace(/['"\\]/g, "\\$&"), z = (e, t) => {
461
+ }, xe = (e) => typeof e == "string" && e.indexOf("<") > -1, Se = (e) => e.replace(/['"\\]/g, "\\$&"), z = (e, t) => {
471
462
  var n = document.createEvent("HTMLEvents");
472
463
  n.initEvent(t, !0, !1), e.dispatchEvent(n);
473
464
  }, B = (e, t) => {
474
465
  Object.assign(e.style, t);
475
466
  }, V = (e, ...t) => {
476
- var n = Se(t);
477
- e = Ce(e), e.map((e) => {
467
+ var n = Ce(t);
468
+ e = we(e), e.map((e) => {
478
469
  n.map((t) => {
479
470
  e.classList.add(t);
480
471
  });
481
472
  });
482
473
  }, H = (e, ...t) => {
483
- var n = Se(t);
484
- e = Ce(e), e.map((e) => {
474
+ var n = Ce(t);
475
+ e = we(e), e.map((e) => {
485
476
  n.map((t) => {
486
477
  e.classList.remove(t);
487
478
  });
488
479
  });
489
- }, Se = (e) => {
480
+ }, Ce = (e) => {
490
481
  var t = [];
491
482
  return L(e, (e) => {
492
483
  typeof e == "string" && (e = e.trim().split(/[\t\n\f\r\s]/)), Array.isArray(e) && (t = t.concat(e));
493
484
  }), t.filter(Boolean);
494
- }, Ce = (e) => (Array.isArray(e) || (e = [e]), e), U = (e, t, n) => {
485
+ }, we = (e) => (Array.isArray(e) || (e = [e]), e), U = (e, t, n) => {
495
486
  if (!n || n.contains(e)) for (; e && e.matches;) {
496
487
  if (e.matches(t)) return e;
497
488
  e = e.parentNode;
498
489
  }
499
- }, we = (e, t = 0) => t > 0 ? e[e.length - 1] : e[0], Te = (e) => Object.keys(e).length === 0, Ee = (e, t) => {
490
+ }, Te = (e, t = 0) => t > 0 ? e[e.length - 1] : e[0], Ee = (e) => Object.keys(e).length === 0, De = (e, t) => {
500
491
  if (!e) return -1;
501
492
  t ||= e.nodeName;
502
493
  for (var n = 0; e = e.previousElementSibling;) e.matches(t) && n++;
@@ -507,7 +498,7 @@ var oe = (e) => {
507
498
  });
508
499
  }, G = (e, t) => {
509
500
  e.parentNode && e.parentNode.replaceChild(t, e);
510
- }, De = (e, t) => {
501
+ }, Oe = (e, t) => {
511
502
  if (t === null) return;
512
503
  if (typeof t == "string") {
513
504
  if (!t.length) return;
@@ -530,13 +521,13 @@ var oe = (e) => {
530
521
  });
531
522
  }, i = (e) => e.nodeType === 3 ? n(e) : (r(e), 0);
532
523
  i(e);
533
- }, Oe = (e) => {
524
+ }, ke = (e) => {
534
525
  var t = e.querySelectorAll("span.highlight");
535
526
  Array.prototype.forEach.call(t, function(e) {
536
527
  var t = e.parentNode;
537
528
  t.replaceChild(e.firstChild, e), t.normalize();
538
529
  });
539
- }, K = !(typeof navigator > "u") && /Mac/.test(navigator.userAgent) ? "metaKey" : "ctrlKey", ke = {
530
+ }, K = typeof navigator < "u" && /Mac/.test(navigator.userAgent) ? "metaKey" : "ctrlKey", Ae = {
540
531
  options: [],
541
532
  optgroups: [],
542
533
  plugins: [],
@@ -592,8 +583,8 @@ var oe = (e) => {
592
583
  };
593
584
  //#endregion
594
585
  //#region ../../node_modules/tom-select/dist/esm/getSettings.js
595
- function Ae(e, t) {
596
- var n = Object.assign({}, ke, t), r = n.dataAttr, i = n.labelField, a = n.valueField, o = n.disabledField, s = n.optgroupField, c = n.optgroupLabelField, l = n.optgroupValueField, u = e.tagName.toLowerCase(), d = e.getAttribute("placeholder") || e.getAttribute("data-placeholder");
586
+ function je(e, t) {
587
+ var n = Object.assign({}, Ae, t), r = n.dataAttr, i = n.labelField, a = n.valueField, o = n.disabledField, s = n.optgroupField, c = n.optgroupLabelField, l = n.optgroupValueField, u = e.tagName.toLowerCase(), d = e.getAttribute("placeholder") || e.getAttribute("data-placeholder");
597
588
  if (!d && !n.allowEmptyOption) {
598
589
  let t = e.querySelector("option[value=\"\"]");
599
590
  t && (d = t.textContent);
@@ -648,23 +639,23 @@ function Ae(e, t) {
648
639
  t[i] = e, t[a] = e, f.options.push(t);
649
640
  }), f.items = t;
650
641
  }
651
- })(), Object.assign({}, ke, f, t);
642
+ })(), Object.assign({}, Ae, f, t);
652
643
  }
653
644
  //#endregion
654
645
  //#region ../../node_modules/tom-select/dist/esm/tom-select.js
655
- var je = 0, q = class extends c(s) {
646
+ var Me = 0, q = class extends l(c) {
656
647
  constructor(e, t) {
657
- super(), this.order = 0, this.isOpen = !1, this.isDisabled = !1, this.isReadOnly = !1, this.isInvalid = !1, this.isValid = !0, this.isLocked = !1, this.isFocused = !1, this.isInputHidden = !1, this.isSetup = !1, this.isDropdownContentStale = !0, this.ignoreFocus = !1, this.ignoreHover = !1, this.hasOptions = !1, this.lastValue = "", this.caretPos = 0, this.loading = 0, this.loadedSearches = {}, this.activeOption = null, this.activeItems = [], this.optgroups = {}, this.options = {}, this.userOptions = {}, this.items = [], this.refreshTimeout = null, je++;
648
+ super(), this.order = 0, this.isOpen = !1, this.isDisabled = !1, this.isReadOnly = !1, this.isInvalid = !1, this.isValid = !0, this.isLocked = !1, this.isFocused = !1, this.isInputHidden = !1, this.isSetup = !1, this.isDropdownContentStale = !0, this.ignoreFocus = !1, this.ignoreHover = !1, this.hasOptions = !1, this.lastValue = "", this.caretPos = 0, this.loading = 0, this.loadedSearches = {}, this.activeOption = null, this.activeItems = [], this.optgroups = {}, this.options = {}, this.userOptions = {}, this.items = [], this.refreshTimeout = null, Me++;
658
649
  var n, r = R(e);
659
650
  if (r.tomselect) throw Error("Tom Select already initialized on this element");
660
651
  r.tomselect = this, n = (window.getComputedStyle && window.getComputedStyle(r, null)).getPropertyValue("direction");
661
- let i = Ae(r, t);
662
- this.settings = i, this.input = r, this.tabIndex = r.tabIndex || 0, this.is_select_tag = r.tagName.toLowerCase() === "select", this.rtl = /rtl/i.test(n), this.inputId = P(r, "tomselect-" + je), this.isRequired = r.required, this.sifter = new he(this.options, { diacritics: i.diacritics }), i.mode = i.mode || (i.maxItems === 1 ? "single" : "multi"), typeof i.hideSelected != "boolean" && (i.hideSelected = i.mode === "multi"), typeof i.hidePlaceholder != "boolean" && (i.hidePlaceholder = i.mode !== "multi");
652
+ let i = je(r, t);
653
+ this.settings = i, this.input = r, this.tabIndex = r.tabIndex || 0, this.is_select_tag = r.tagName.toLowerCase() === "select", this.rtl = /rtl/i.test(n), this.inputId = P(r, "tomselect-" + Me), this.isRequired = r.required, this.sifter = new ge(this.options, { diacritics: i.diacritics }), i.mode = i.mode || (i.maxItems === 1 ? "single" : "multi"), typeof i.hideSelected != "boolean" && (i.hideSelected = i.mode === "multi"), typeof i.hidePlaceholder != "boolean" && (i.hidePlaceholder = i.mode !== "multi");
663
654
  var a = i.createFilter;
664
655
  typeof a != "function" && (typeof a == "string" && (a = new RegExp(a)), i.createFilter = a instanceof RegExp ? (e) => a.test(e) : (e) => this.settings.duplicates || !this.options[e]), this.initializePlugins(i.plugins), this.setupCallbacks(), this.setupTemplates();
665
656
  let o = R("<div>"), s = R("<div>"), c = this._render("dropdown"), l = R("<div role=\"listbox\" tabindex=\"-1\">"), u = this.input.getAttribute("class") || "", d = i.mode;
666
657
  var f;
667
- V(o, i.wrapperClass, u, d), V(s, i.controlClass), I(o, s), V(c, i.dropdownClass, d), i.copyClassesToDropdown && V(c, u), V(l, i.dropdownContentClass), I(c, l), R(i.dropdownParent || o).appendChild(c), be(i.controlInput) ? (f = R(i.controlInput), L([
658
+ V(o, i.wrapperClass, u, d), V(s, i.controlClass), I(o, s), V(c, i.dropdownClass, d), i.copyClassesToDropdown && V(c, u), V(l, i.dropdownContentClass), I(c, l), R(i.dropdownParent || o).appendChild(c), xe(i.controlInput) ? (f = R(i.controlInput), L([
668
659
  "autocorrect",
669
660
  "autocapitalize",
670
661
  "autocomplete",
@@ -682,17 +673,17 @@ var je = 0, q = class extends c(s) {
682
673
  "aria-expanded": "false",
683
674
  "aria-controls": u
684
675
  });
685
- let d = P(c, e.inputId + "-ts-control"), f = "label[for='" + xe(e.inputId) + "']", m = document.querySelector(f), h = e.focus.bind(e);
686
- if (m) {
687
- M(m, "click", h), W(m, { for: d });
688
- let t = P(m, e.inputId + "-ts-label");
676
+ let d = P(c, e.inputId + "-ts-control"), f = "label[for='" + Se(e.inputId) + "']", p = document.querySelector(f), h = e.focus.bind(e);
677
+ if (p) {
678
+ M(p, "click", h), W(p, { for: d });
679
+ let t = P(p, e.inputId + "-ts-label");
689
680
  W(c, { "aria-labelledby": t }), W(i, { "aria-labelledby": t });
690
681
  }
691
682
  if (a.style.width = s.style.width, a.style.minWidth = s.style.minWidth, a.style.maxWidth = s.style.maxWidth, e.plugins.names.length) {
692
683
  let t = "plugin-" + e.plugins.names.join(" plugin-");
693
684
  V([a, r], t);
694
685
  }
695
- (t.maxItems === null || t.maxItems > 1) && e.is_select_tag && W(s, { multiple: "multiple" }), t.placeholder && W(n, { placeholder: t.placeholder }), !t.splitOn && t.delimiter && (t.splitOn = RegExp("\\s*" + p(t.delimiter) + "+\\s*")), t.load && t.loadThrottle && (t.load = _e(t.load, t.loadThrottle)), M(r, "mousemove", () => {
686
+ (t.maxItems === null || t.maxItems > 1) && e.is_select_tag && W(s, { multiple: "multiple" }), t.placeholder && W(n, { placeholder: t.placeholder }), !t.splitOn && t.delimiter && (t.splitOn = RegExp("\\s*" + m(t.delimiter) + "+\\s*")), t.load && t.loadThrottle && (t.load = ve(t.load, t.loadThrottle)), M(r, "mousemove", () => {
696
687
  e.ignoreHover = !1;
697
688
  }), M(r, "mouseenter", (t) => {
698
689
  var n = U(t.target, "[data-selectable]", r);
@@ -702,26 +693,18 @@ var je = 0, q = class extends c(s) {
702
693
  n && (e.onOptionSelect(t, n), j(t, !0));
703
694
  }), M(o, "click", (t) => {
704
695
  var r = U(t.target, "[data-ts-item]", o);
705
- if (r && e.onItemSelect(t, r)) {
706
- j(t, !0);
707
- return;
708
- }
709
- n.value == "" && (e.onClick(), j(t, !0));
696
+ r && e.onItemSelect(t, r) ? j(t, !0) : n.value == "" && (e.onClick(), j(t, !0));
710
697
  }), M(c, "keydown", (t) => e.onKeyDown(t)), M(n, "keypress", (t) => e.onKeyPress(t)), M(n, "input", (t) => e.onInput(t)), M(c, "blur", (t) => e.onBlur(t)), M(c, "focus", (t) => e.onFocus(t)), M(n, "paste", (t) => e.onPaste(t));
711
698
  let g = (t) => {
712
699
  let i = t.composedPath()[0];
713
- if (!a.contains(i) && !r.contains(i)) {
714
- e.isFocused && e.blur(), e.inputState();
715
- return;
716
- }
717
- i == n && e.isOpen ? t.stopPropagation() : j(t, !0);
700
+ !a.contains(i) && !r.contains(i) ? (e.isFocused && e.blur(), e.inputState()) : i == n && e.isOpen ? t.stopPropagation() : j(t, !0);
718
701
  }, _ = () => {
719
702
  e.isOpen && e.positionDropdown();
720
703
  }, v = () => {
721
704
  e.isValid && (e.isValid = !1, e.isInvalid = !0, e.refreshState());
722
705
  };
723
706
  M(s, "invalid", v), M(document, "mousedown", g), M(window, "scroll", _, l), M(window, "resize", _, l), this._destroy = () => {
724
- s.removeEventListener("invalid", v), document.removeEventListener("mousedown", g), window.removeEventListener("scroll", _), window.removeEventListener("resize", _), m && m.removeEventListener("click", h);
707
+ s.removeEventListener("invalid", v), document.removeEventListener("mousedown", g), window.removeEventListener("scroll", _), window.removeEventListener("resize", _), p && p.removeEventListener("click", h);
725
708
  }, this.revertSettings = {
726
709
  innerHTML: s.innerHTML,
727
710
  tabIndex: s.tabIndex
@@ -773,7 +756,7 @@ var je = 0, q = class extends c(s) {
773
756
  for (e in n) t = this.settings[n[e]], t && this.on(e, t);
774
757
  }
775
758
  sync(e = !0) {
776
- let t = this, n = e ? Ae(t.input, {
759
+ let t = this, n = e ? je(t.input, {
777
760
  delimiter: t.settings.delimiter,
778
761
  allowEmptyOption: t.settings.allowEmptyOption
779
762
  }) : t.settings;
@@ -781,11 +764,7 @@ var je = 0, q = class extends c(s) {
781
764
  }
782
765
  onClick() {
783
766
  var e = this;
784
- if (e.activeItems.length > 0) {
785
- e.clearActiveItems(), e.focus();
786
- return;
787
- }
788
- e.isFocused && e.isOpen ? e.blur() : e.focus();
767
+ e.activeItems.length > 0 ? (e.clearActiveItems(), e.focus()) : e.isFocused && e.isOpen ? e.blur() : e.focus();
789
768
  }
790
769
  onMouseDown() {}
791
770
  onChange() {
@@ -793,11 +772,7 @@ var je = 0, q = class extends c(s) {
793
772
  }
794
773
  onPaste(e) {
795
774
  var t = this;
796
- if (t.isInputHidden || t.isLocked) {
797
- j(e);
798
- return;
799
- }
800
- t.settings.splitOn && setTimeout(() => {
775
+ t.isInputHidden || t.isLocked ? j(e) : t.settings.splitOn && setTimeout(() => {
801
776
  var e = t.inputValue();
802
777
  e.match(t.settings.splitOn) && L(e.trim().split(t.settings.splitOn), (e) => {
803
778
  O(e) && (this.options[e] ? t.addItem(e) : t.createItem(e));
@@ -806,78 +781,67 @@ var je = 0, q = class extends c(s) {
806
781
  }
807
782
  onKeyPress(e) {
808
783
  var t = this;
809
- if (t.isLocked) {
810
- j(e);
811
- return;
812
- }
813
- var n = String.fromCharCode(e.keyCode || e.which);
814
- if (t.settings.create && t.settings.mode === "multi" && n === t.settings.delimiter) {
815
- t.createItem(), j(e);
816
- return;
784
+ if (t.isLocked) j(e);
785
+ else {
786
+ var n = String.fromCharCode(e.keyCode || e.which);
787
+ t.settings.create && t.settings.mode === "multi" && n === t.settings.delimiter && (t.createItem(), j(e));
817
788
  }
818
789
  }
819
790
  onKeyDown(e) {
820
791
  var t = this;
821
- if (t.ignoreHover = !0, t.isLocked) {
822
- e.keyCode !== 9 && j(e);
823
- return;
824
- }
825
- switch (e.keyCode) {
826
- case 65:
827
- if (N(K, e) && t.control_input.value == "") {
828
- j(e), t.selectAll();
792
+ if (t.ignoreHover = !0, t.isLocked) e.keyCode !== 9 && j(e);
793
+ else {
794
+ switch (e.keyCode) {
795
+ case 65:
796
+ if (N(K, e) && t.control_input.value == "") {
797
+ j(e), t.selectAll();
798
+ return;
799
+ }
800
+ break;
801
+ case 27:
802
+ t.isOpen && (j(e, !0), t.close()), t.clearActiveItems();
829
803
  return;
830
- }
831
- break;
832
- case 27:
833
- t.isOpen && (j(e, !0), t.close()), t.clearActiveItems();
834
- return;
835
- case 40:
836
- if (!t.isOpen && t.hasOptions) t.open();
837
- else if (t.activeOption) {
838
- let e = t.getAdjacent(t.activeOption, 1);
839
- e && t.setActiveOption(e);
840
- }
841
- j(e);
842
- return;
843
- case 38:
844
- if (t.activeOption) {
845
- let e = t.getAdjacent(t.activeOption, -1);
846
- e && t.setActiveOption(e);
847
- }
848
- j(e);
849
- return;
850
- case 13:
851
- t.canSelect(t.activeOption) ? (t.onOptionSelect(e, t.activeOption), j(e)) : (t.settings.create && t.createItem() || document.activeElement == t.control_input && t.isOpen) && j(e);
852
- return;
853
- case 37:
854
- t.advanceSelection(-1, e);
855
- return;
856
- case 39:
857
- t.advanceSelection(1, e);
858
- return;
859
- case 9:
860
- t.settings.selectOnTab && (t.canSelect(t.activeOption) ? (t.onOptionSelect(e, t.activeOption), j(e)) : t.settings.create && t.createItem() && j(e));
861
- return;
862
- case 8:
863
- case 46:
864
- t.deleteSelection(e);
865
- return;
804
+ case 40:
805
+ if (!t.isOpen && t.hasOptions) t.open();
806
+ else if (t.activeOption) {
807
+ let e = t.getAdjacent(t.activeOption, 1);
808
+ e && t.setActiveOption(e);
809
+ }
810
+ j(e);
811
+ return;
812
+ case 38:
813
+ if (t.activeOption) {
814
+ let e = t.getAdjacent(t.activeOption, -1);
815
+ e && t.setActiveOption(e);
816
+ }
817
+ j(e);
818
+ return;
819
+ case 13:
820
+ t.canSelect(t.activeOption) ? (t.onOptionSelect(e, t.activeOption), j(e)) : (t.settings.create && t.createItem() || document.activeElement == t.control_input && t.isOpen) && j(e);
821
+ return;
822
+ case 37:
823
+ t.advanceSelection(-1, e);
824
+ return;
825
+ case 39:
826
+ t.advanceSelection(1, e);
827
+ return;
828
+ case 9:
829
+ t.settings.selectOnTab && (t.canSelect(t.activeOption) ? (t.onOptionSelect(e, t.activeOption), j(e)) : t.settings.create && t.createItem() && j(e));
830
+ return;
831
+ case 8:
832
+ case 46:
833
+ t.deleteSelection(e);
834
+ return;
835
+ }
836
+ t.isInputHidden && !N(K, e) && j(e);
866
837
  }
867
- t.isInputHidden && !N(K, e) && j(e);
868
838
  }
869
839
  onInput(e) {
870
840
  if (this.isLocked) return;
871
841
  let t = this.inputValue();
872
- if (this.lastValue !== t) {
873
- if (this.lastValue = t, t == "") {
874
- this._onInput();
875
- return;
876
- }
877
- this.refreshTimeout && window.clearTimeout(this.refreshTimeout), this.refreshTimeout = ge(() => {
878
- this.refreshTimeout = null, this._onInput();
879
- }, this.settings.refreshThrottle);
880
- }
842
+ this.lastValue !== t && (this.lastValue = t, t == "" ? this._onInput() : (this.refreshTimeout && window.clearTimeout(this.refreshTimeout), this.refreshTimeout = _e(() => {
843
+ this.refreshTimeout = null, this._onInput();
844
+ }, this.settings.refreshThrottle)));
881
845
  }
882
846
  _onInput() {
883
847
  let e = this.lastValue;
@@ -888,11 +852,7 @@ var je = 0, q = class extends c(s) {
888
852
  }
889
853
  onFocus(e) {
890
854
  var t = this, n = t.isFocused;
891
- if (t.isDisabled || t.isReadOnly) {
892
- t.blur(), j(e);
893
- return;
894
- }
895
- t.ignoreFocus || (t.isFocused = !0, t.settings.preload === "focus" && t.preload(), n || t.trigger("focus"), t.activeItems.length || (t.inputState(), t.refreshOptions(!!t.settings.openOnFocus)), t.refreshState());
855
+ t.isDisabled || t.isReadOnly ? (t.blur(), j(e)) : t.ignoreFocus || (t.isFocused = !0, t.settings.preload === "focus" && t.preload(), n || t.trigger("focus"), t.activeItems.length || (t.inputState(), t.refreshOptions(!!t.settings.openOnFocus)), t.refreshState());
896
856
  }
897
857
  onBlur(e) {
898
858
  if (document.hasFocus() !== !1) {
@@ -946,7 +906,7 @@ var je = 0, q = class extends c(s) {
946
906
  }
947
907
  setValue(e, t) {
948
908
  var n = t ? [] : ["change"];
949
- ve(this, n, () => {
909
+ ye(this, n, () => {
950
910
  this.clear(t), this.addItems(e, t);
951
911
  });
952
912
  }
@@ -956,15 +916,14 @@ var je = 0, q = class extends c(s) {
956
916
  setActiveItem(e, t) {
957
917
  var n = this, r, i, a, o, s, c;
958
918
  if (n.settings.mode !== "single") {
959
- if (!e) {
960
- n.clearActiveItems(), n.isFocused && n.inputState();
961
- return;
919
+ if (!e) n.clearActiveItems(), n.isFocused && n.inputState();
920
+ else {
921
+ if (r = t && t.type.toLowerCase(), r === "click" && N("shiftKey", t) && n.activeItems.length) {
922
+ for (c = n.getLastActive(), a = Array.prototype.indexOf.call(n.control.children, c), o = Array.prototype.indexOf.call(n.control.children, e), a > o && (s = a, a = o, o = s), i = a; i <= o; i++) e = n.control.children[i], n.activeItems.indexOf(e) === -1 && n.setActiveItemClass(e);
923
+ j(t);
924
+ } else r === "click" && N(K, t) || r === "keydown" && N("shiftKey", t) ? e.classList.contains("active") ? n.removeActiveItem(e) : n.setActiveItemClass(e) : (n.clearActiveItems(), n.setActiveItemClass(e));
925
+ n.inputState(), n.isFocused || n.focus();
962
926
  }
963
- if (r = t && t.type.toLowerCase(), r === "click" && N("shiftKey", t) && n.activeItems.length) {
964
- for (c = n.getLastActive(), a = Array.prototype.indexOf.call(n.control.children, c), o = Array.prototype.indexOf.call(n.control.children, e), a > o && (s = a, a = o, o = s), i = a; i <= o; i++) e = n.control.children[i], n.activeItems.indexOf(e) === -1 && n.setActiveItemClass(e);
965
- j(t);
966
- } else r === "click" && N(K, t) || r === "keydown" && N("shiftKey", t) ? e.classList.contains("active") ? n.removeActiveItem(e) : n.setActiveItemClass(e) : (n.clearActiveItems(), n.setActiveItemClass(e));
967
- n.inputState(), n.isFocused || n.focus();
968
927
  }
969
928
  }
970
929
  setActiveItemClass(e) {
@@ -1047,7 +1006,7 @@ var je = 0, q = class extends c(s) {
1047
1006
  let h = m === p.lastQuery || m == "" && p.lastQuery == null;
1048
1007
  var g = p.search(m), _ = null, v = p.settings.shouldOpen || !1, y = p.dropdown_content;
1049
1008
  h && (_ = p.activeOption, _ && (l = _.closest("[data-group]"))), i = g.items.length, typeof p.settings.maxOptions == "number" && (i = Math.min(i, p.settings.maxOptions)), i > 0 && (v = !0);
1050
- let ee = (e, t) => {
1009
+ let b = (e, t) => {
1051
1010
  let n = d[e];
1052
1011
  if (n !== void 0) {
1053
1012
  let e = f[n];
@@ -1070,11 +1029,11 @@ var je = 0, q = class extends c(s) {
1070
1029
  a = o[n];
1071
1030
  let e = s.$order, t = p.optgroups[a];
1072
1031
  if (t === void 0 && typeof p.settings.optionGroupRegister == "function") {
1073
- var b;
1074
- (b = p.settings.optionGroupRegister.apply(p, [a])) && p.registerOptionGroup(b);
1032
+ var x;
1033
+ (x = p.settings.optionGroupRegister.apply(p, [a])) && p.registerOptionGroup(x);
1075
1034
  }
1076
1035
  t = p.optgroups[a], t === void 0 ? a = "" : e = t.$order;
1077
- let [r, c] = ee(a, e);
1036
+ let [r, c] = b(a, e);
1078
1037
  n > 0 && (u = u.cloneNode(!0), W(u, {
1079
1038
  id: s.$id + "-clone-" + n,
1080
1039
  "aria-selected": null
@@ -1094,14 +1053,14 @@ var je = 0, q = class extends c(s) {
1094
1053
  });
1095
1054
  I(s, n);
1096
1055
  } else I(s, t);
1097
- }), y.innerHTML = "", I(y, s), p.isDropdownContentStale = !1, p.settings.highlight && (Oe(y), g.query.length && g.tokens.length && L(g.tokens, (e) => {
1098
- De(y, e.regex);
1056
+ }), y.innerHTML = "", I(y, s), p.isDropdownContentStale = !1, p.settings.highlight && (ke(y), g.query.length && g.tokens.length && L(g.tokens, (e) => {
1057
+ Oe(y, e.regex);
1099
1058
  }));
1100
- var x = (e) => {
1059
+ var S = (e) => {
1101
1060
  let t = p.render(e, { input: m });
1102
1061
  return t && (v = !0, y.insertBefore(t, y.firstChild)), t;
1103
1062
  };
1104
- if (p.loading ? x("loading") : p.settings.shouldLoad.call(p, m) ? g.items.length === 0 && x("no_results") : x("not_loading"), c = p.canCreate(m), c && (u = x("option_create")), p.hasOptions = g.items.length > 0 || c, v) {
1063
+ if (p.loading ? S("loading") : p.settings.shouldLoad.call(p, m) ? g.items.length === 0 && S("no_results") : S("not_loading"), c = p.canCreate(m), c && (u = S("option_create")), p.hasOptions = g.items.length > 0 || c, v) {
1105
1064
  if (g.items.length > 0) {
1106
1065
  if (!_ && p.settings.mode === "single" && p.items[0] != null && (_ = p.getOption(p.items[0])), !y.contains(_)) {
1107
1066
  let e = 0;
@@ -1207,7 +1166,7 @@ var je = 0, q = class extends c(s) {
1207
1166
  }
1208
1167
  addItem(e, t) {
1209
1168
  var n = t ? [] : ["change", "dropdown_close"];
1210
- ve(this, n, () => {
1169
+ ye(this, n, () => {
1211
1170
  var n, r;
1212
1171
  let i = this, a = i.settings.mode, o = O(e);
1213
1172
  if (!(o && i.items.indexOf(o) !== -1 && (a === "single" && i.close(), a === "single" || !i.settings.duplicates)) && o !== null && i.options.hasOwnProperty(o) && (a === "single" && i.clear(t), !(a === "multi" && i.isFull()))) {
@@ -1227,7 +1186,7 @@ var je = 0, q = class extends c(s) {
1227
1186
  if (e = n.getItem(e), !e) return;
1228
1187
  var r, i;
1229
1188
  let a = e.dataset.value;
1230
- r = Ee(e), e.remove(), e.classList.contains("active") && (i = n.activeItems.indexOf(e), n.activeItems.splice(i, 1), H(e, "active")), n.items.splice(r, 1), n.isDropdownContentStale = !0, !n.settings.persist && n.userOptions.hasOwnProperty(a) && n.removeOption(a, t), r < n.caretPos && n.setCaret(n.caretPos - 1), n.updateOriginalInput({ silent: t }), n.refreshState(), n.positionDropdown(), n.trigger("item_remove", a, e);
1189
+ r = De(e), e.remove(), e.classList.contains("active") && (i = n.activeItems.indexOf(e), n.activeItems.splice(i, 1), H(e, "active")), n.items.splice(r, 1), n.isDropdownContentStale = !0, !n.settings.persist && n.userOptions.hasOwnProperty(a) && n.removeOption(a, t), r < n.caretPos && n.setCaret(n.caretPos - 1), n.updateOriginalInput({ silent: t }), n.refreshState(), n.positionDropdown(), n.trigger("item_remove", a, e);
1231
1190
  }
1232
1191
  createItem(e = null, t = () => {}) {
1233
1192
  arguments.length === 3 && (t = arguments[2]), typeof t != "function" && (t = () => {});
@@ -1255,7 +1214,7 @@ var je = 0, q = class extends c(s) {
1255
1214
  let t = e.isFull(), n = e.isLocked;
1256
1215
  e.wrapper.classList.toggle("rtl", e.rtl);
1257
1216
  let r = e.wrapper.classList;
1258
- r.toggle("focus", e.isFocused), r.toggle("disabled", e.isDisabled), r.toggle("readonly", e.isReadOnly), r.toggle("required", e.isRequired), r.toggle("invalid", !e.isValid), r.toggle("locked", n), r.toggle("full", t), r.toggle("input-active", e.isFocused && !e.isInputHidden), r.toggle("dropdown-active", e.isOpen), r.toggle("has-options", Te(e.options)), r.toggle("has-items", e.items.length > 0);
1217
+ r.toggle("focus", e.isFocused), r.toggle("disabled", e.isDisabled), r.toggle("readonly", e.isReadOnly), r.toggle("required", e.isRequired), r.toggle("invalid", !e.isValid), r.toggle("locked", n), r.toggle("full", t), r.toggle("input-active", e.isFocused && !e.isInputHidden), r.toggle("dropdown-active", e.isOpen), r.toggle("has-options", Ee(e.options)), r.toggle("has-items", e.items.length > 0);
1259
1218
  }
1260
1219
  refreshValidityState() {
1261
1220
  var e = this;
@@ -1317,9 +1276,9 @@ var je = 0, q = class extends c(s) {
1317
1276
  }
1318
1277
  deleteSelection(e) {
1319
1278
  var t, n, r, i, a = this;
1320
- t = e && e.keyCode === 8 ? -1 : 1, n = ye(a.control_input);
1279
+ t = e && e.keyCode === 8 ? -1 : 1, n = be(a.control_input);
1321
1280
  let o = [];
1322
- if (a.activeItems.length) i = we(a.activeItems, t), r = Ee(i), t > 0 && r++, L(a.activeItems, (e) => o.push(e));
1281
+ if (a.activeItems.length) i = Te(a.activeItems, t), r = De(i), t > 0 && r++, L(a.activeItems, (e) => o.push(e));
1323
1282
  else if ((a.isFocused || a.settings.mode === "single") && a.items.length) {
1324
1283
  let e = a.controlChildren(), r;
1325
1284
  t < 0 && n.start === 0 && n.length === 0 ? r = e[a.caretPos - 1] : t > 0 && n.start === a.inputValue().length && (r = e[a.caretPos]), r !== void 0 && o.push(r);
@@ -1341,7 +1300,7 @@ var je = 0, q = class extends c(s) {
1341
1300
  let t = this.control.querySelector(".last-active");
1342
1301
  if (t) return t;
1343
1302
  var n = this.control.querySelectorAll(".active");
1344
- if (n) return we(n, e);
1303
+ if (n) return Te(n, e);
1345
1304
  }
1346
1305
  setCaret(e) {
1347
1306
  this.caretPos = this.items.length;
@@ -1411,28 +1370,28 @@ var je = 0, q = class extends c(s) {
1411
1370
  return e === "after" && (t = i.apply(r, arguments)), a = n.apply(r, arguments), e === "instead" ? a : (e === "before" && (t = i.apply(r, arguments)), t);
1412
1371
  };
1413
1372
  }
1414
- }, Me = (e, t, n, r) => {
1373
+ }, Ne = (e, t, n, r) => {
1415
1374
  e.addEventListener(t, n, r);
1416
1375
  };
1417
- function Ne() {
1418
- Me(this.input, "change", () => {
1376
+ function Pe() {
1377
+ Ne(this.input, "change", () => {
1419
1378
  this.sync();
1420
1379
  });
1421
1380
  }
1422
1381
  //#endregion
1423
1382
  //#region ../../node_modules/tom-select/dist/esm/plugins/checkbox_options/plugin.js
1424
- var Pe = (e) => e == null ? null : Fe(e), Fe = (e) => typeof e == "boolean" ? e ? "1" : "0" : e + "", Ie = (e, t = !1) => {
1383
+ var Fe = (e) => e == null ? null : Ie(e), Ie = (e) => typeof e == "boolean" ? e ? "1" : "0" : e + "", Le = (e, t = !1) => {
1425
1384
  e && (e.preventDefault(), t && e.stopPropagation());
1426
- }, Le = (e) => {
1385
+ }, Re = (e) => {
1427
1386
  if (e.jquery) return e[0];
1428
1387
  if (e instanceof HTMLElement) return e;
1429
- if (Re(e)) {
1388
+ if (ze(e)) {
1430
1389
  var t = document.createElement("template");
1431
1390
  return t.innerHTML = e.trim(), t.content.firstChild;
1432
1391
  }
1433
1392
  return document.querySelector(e);
1434
- }, Re = (e) => typeof e == "string" && e.indexOf("<") > -1;
1435
- function ze(e) {
1393
+ }, ze = (e) => typeof e == "string" && e.indexOf("<") > -1;
1394
+ function Be(e) {
1436
1395
  var t = this, n = t.onOptionSelect;
1437
1396
  t.settings.hideSelected = !1;
1438
1397
  let r = Object.assign({
@@ -1451,11 +1410,11 @@ function ze(e) {
1451
1410
  t.hook("after", "setupTemplates", () => {
1452
1411
  var e = t.settings.render.option;
1453
1412
  t.settings.render.option = (n, a) => {
1454
- var o = Le(e.call(t, n, a)), s = document.createElement("input");
1413
+ var o = Re(e.call(t, n, a)), s = document.createElement("input");
1455
1414
  r.className && s.classList.add(r.className), s.addEventListener("click", function(e) {
1456
- Ie(e);
1415
+ Le(e);
1457
1416
  }), s.type = "checkbox";
1458
- let c = Pe(n[t.settings.valueField]);
1417
+ let c = Fe(n[t.settings.valueField]);
1459
1418
  return i(s, !!(c && t.items.indexOf(c) > -1)), o.prepend(s), o;
1460
1419
  };
1461
1420
  }), t.on("item_remove", (e) => {
@@ -1465,25 +1424,21 @@ function ze(e) {
1465
1424
  var n = t.getOption(e);
1466
1425
  n && a(n);
1467
1426
  }), t.hook("instead", "onOptionSelect", (e, r) => {
1468
- if (r.classList.contains("selected")) {
1469
- r.classList.remove("selected"), t.removeItem(r.dataset.value), t.refreshOptions(), Ie(e, !0);
1470
- return;
1471
- }
1472
- n.call(t, e, r), a(r);
1427
+ r.classList.contains("selected") ? (r.classList.remove("selected"), t.removeItem(r.dataset.value), t.refreshOptions(), Le(e, !0)) : (n.call(t, e, r), a(r));
1473
1428
  });
1474
1429
  }
1475
1430
  //#endregion
1476
1431
  //#region ../../node_modules/tom-select/dist/esm/plugins/clear_button/plugin.js
1477
- var Be = (e) => {
1432
+ var Ve = (e) => {
1478
1433
  if (e.jquery) return e[0];
1479
1434
  if (e instanceof HTMLElement) return e;
1480
- if (Ve(e)) {
1435
+ if (He(e)) {
1481
1436
  var t = document.createElement("template");
1482
1437
  return t.innerHTML = e.trim(), t.content.firstChild;
1483
1438
  }
1484
1439
  return document.querySelector(e);
1485
- }, Ve = (e) => typeof e == "string" && e.indexOf("<") > -1;
1486
- function He(e) {
1440
+ }, He = (e) => typeof e == "string" && e.indexOf("<") > -1;
1441
+ function Ue(e) {
1487
1442
  let t = this, n = Object.assign({
1488
1443
  className: "clear-button",
1489
1444
  title: "Clear All",
@@ -1492,7 +1447,7 @@ function He(e) {
1492
1447
  html: (e) => `<div class="${e.className}" title="${e.title}" role="${e.role}" tabindex="${e.tabindex}">&times;</div>`
1493
1448
  }, e);
1494
1449
  t.on("initialize", () => {
1495
- var e = Be(n.html(n));
1450
+ var e = Ve(n.html(n));
1496
1451
  e.addEventListener("click", (e) => {
1497
1452
  t.isLocked || (t.clear(), t.settings.mode === "single" && t.settings.allowEmptyOption && t.addItem(""), t.refreshOptions(!1), e.preventDefault(), e.stopPropagation());
1498
1453
  }), t.control.appendChild(e);
@@ -1500,38 +1455,38 @@ function He(e) {
1500
1455
  }
1501
1456
  //#endregion
1502
1457
  //#region ../../node_modules/tom-select/dist/esm/plugins/drag_drop/plugin.js
1503
- var Ue = (e, t = !1) => {
1458
+ var We = (e, t = !1) => {
1504
1459
  e && (e.preventDefault(), t && e.stopPropagation());
1505
1460
  }, J = (e, t, n, r) => {
1506
1461
  e.addEventListener(t, n, r);
1507
- }, We = (e, t) => {
1462
+ }, Ge = (e, t) => {
1508
1463
  if (Array.isArray(e)) e.forEach(t);
1509
1464
  else for (var n in e) e.hasOwnProperty(n) && t(e[n], n);
1510
- }, Ge = (e) => {
1465
+ }, Ke = (e) => {
1511
1466
  if (e.jquery) return e[0];
1512
1467
  if (e instanceof HTMLElement) return e;
1513
- if (Ke(e)) {
1468
+ if (qe(e)) {
1514
1469
  var t = document.createElement("template");
1515
1470
  return t.innerHTML = e.trim(), t.content.firstChild;
1516
1471
  }
1517
1472
  return document.querySelector(e);
1518
- }, Ke = (e) => typeof e == "string" && e.indexOf("<") > -1, qe = (e, t) => {
1519
- We(t, (t, n) => {
1473
+ }, qe = (e) => typeof e == "string" && e.indexOf("<") > -1, Je = (e, t) => {
1474
+ Ge(t, (t, n) => {
1520
1475
  t == null ? e.removeAttribute(n) : e.setAttribute(n, "" + t);
1521
1476
  });
1522
- }, Je = (e, t) => {
1477
+ }, Ye = (e, t) => {
1523
1478
  var n;
1524
1479
  (n = e.parentNode) == null || n.insertBefore(t, e.nextSibling);
1525
- }, Ye = (e, t) => {
1480
+ }, Xe = (e, t) => {
1526
1481
  var n;
1527
1482
  (n = e.parentNode) == null || n.insertBefore(t, e);
1528
- }, Xe = (e, t) => {
1483
+ }, Ze = (e, t) => {
1529
1484
  do
1530
1485
  if (t = t?.previousElementSibling, e == t) return !0;
1531
1486
  while (t && t.previousElementSibling);
1532
1487
  return !1;
1533
1488
  };
1534
- function Ze() {
1489
+ function Qe() {
1535
1490
  var e = this;
1536
1491
  if (e.settings.mode !== "multi") return;
1537
1492
  var t = e.lock, n = e.unlock;
@@ -1539,10 +1494,10 @@ function Ze() {
1539
1494
  e.hook("after", "setupTemplates", () => {
1540
1495
  var t = e.settings.render.item;
1541
1496
  e.settings.render.item = (n, a) => {
1542
- let o = Ge(t.call(e, n, a));
1543
- qe(o, { draggable: "true" });
1497
+ let o = Ke(t.call(e, n, a));
1498
+ Je(o, { draggable: "true" });
1544
1499
  let s = (e) => {
1545
- r || Ue(e), e.stopPropagation();
1500
+ r || We(e), e.stopPropagation();
1546
1501
  }, c = (e) => {
1547
1502
  i = o, setTimeout(() => {
1548
1503
  o.classList.add("ts-dragging");
@@ -1552,7 +1507,7 @@ function Ze() {
1552
1507
  }, u = () => {
1553
1508
  o.classList.remove("ts-drag-over");
1554
1509
  }, d = (e, t) => {
1555
- t !== void 0 && (Xe(t, o) ? Je(e, t) : Ye(e, t));
1510
+ t !== void 0 && (Ze(t, o) ? Ye(e, t) : Xe(e, t));
1556
1511
  };
1557
1512
  return J(o, "mousedown", s), J(o, "dragstart", c), J(o, "dragenter", l), J(o, "dragover", l), J(o, "dragleave", u), J(o, "dragend", () => {
1558
1513
  var t;
@@ -1570,18 +1525,18 @@ function Ze() {
1570
1525
  }
1571
1526
  //#endregion
1572
1527
  //#region ../../node_modules/tom-select/dist/esm/plugins/dropdown_header/plugin.js
1573
- var Qe = (e, t = !1) => {
1528
+ var $e = (e, t = !1) => {
1574
1529
  e && (e.preventDefault(), t && e.stopPropagation());
1575
- }, $e = (e) => {
1530
+ }, et = (e) => {
1576
1531
  if (e.jquery) return e[0];
1577
1532
  if (e instanceof HTMLElement) return e;
1578
- if (et(e)) {
1533
+ if (tt(e)) {
1579
1534
  var t = document.createElement("template");
1580
1535
  return t.innerHTML = e.trim(), t.content.firstChild;
1581
1536
  }
1582
1537
  return document.querySelector(e);
1583
- }, et = (e) => typeof e == "string" && e.indexOf("<") > -1;
1584
- function tt(e) {
1538
+ }, tt = (e) => typeof e == "string" && e.indexOf("<") > -1;
1539
+ function nt(e) {
1585
1540
  let t = this, n = Object.assign({
1586
1541
  title: "Untitled",
1587
1542
  headerClass: "dropdown-header",
@@ -1591,36 +1546,36 @@ function tt(e) {
1591
1546
  html: (e) => "<div class=\"" + e.headerClass + "\"><div class=\"" + e.titleRowClass + "\"><span class=\"" + e.labelClass + "\">" + e.title + "</span><a class=\"" + e.closeClass + "\">&times;</a></div></div>"
1592
1547
  }, e);
1593
1548
  t.on("initialize", () => {
1594
- var e = $e(n.html(n)), r = e.querySelector("." + n.closeClass);
1549
+ var e = et(n.html(n)), r = e.querySelector("." + n.closeClass);
1595
1550
  r && r.addEventListener("click", (e) => {
1596
- Qe(e, !0), t.close();
1551
+ $e(e, !0), t.close();
1597
1552
  }), t.dropdown.insertBefore(e, t.dropdown.firstChild);
1598
1553
  });
1599
1554
  }
1600
1555
  //#endregion
1601
1556
  //#region ../../node_modules/tom-select/dist/esm/plugins/caret_position/plugin.js
1602
- var nt = (e, t) => {
1557
+ var rt = (e, t) => {
1603
1558
  if (Array.isArray(e)) e.forEach(t);
1604
1559
  else for (var n in e) e.hasOwnProperty(n) && t(e[n], n);
1605
- }, rt = (e, ...t) => {
1606
- var n = it(t);
1607
- e = at(e), e.map((e) => {
1560
+ }, it = (e, ...t) => {
1561
+ var n = at(t);
1562
+ e = ot(e), e.map((e) => {
1608
1563
  n.map((t) => {
1609
1564
  e.classList.remove(t);
1610
1565
  });
1611
1566
  });
1612
- }, it = (e) => {
1567
+ }, at = (e) => {
1613
1568
  var t = [];
1614
- return nt(e, (e) => {
1569
+ return rt(e, (e) => {
1615
1570
  typeof e == "string" && (e = e.trim().split(/[\t\n\f\r\s]/)), Array.isArray(e) && (t = t.concat(e));
1616
1571
  }), t.filter(Boolean);
1617
- }, at = (e) => (Array.isArray(e) || (e = [e]), e), ot = (e, t) => {
1572
+ }, ot = (e) => (Array.isArray(e) || (e = [e]), e), st = (e, t) => {
1618
1573
  if (!e) return -1;
1619
1574
  t ||= e.nodeName;
1620
1575
  for (var n = 0; e = e.previousElementSibling;) e.matches(t) && n++;
1621
1576
  return n;
1622
1577
  };
1623
- function st() {
1578
+ function ct() {
1624
1579
  var e = this;
1625
1580
  e.hook("instead", "setCaret", (t) => {
1626
1581
  e.settings.mode === "single" || !e.control.contains(e.control_input) ? t = e.items.length : (t = Math.max(0, Math.min(e.items.length, t)), t != e.caretPos && !e.isPending && e.controlChildren().forEach((n, r) => {
@@ -1630,58 +1585,58 @@ function st() {
1630
1585
  if (!e.isFocused) return;
1631
1586
  let n = e.getLastActive(t);
1632
1587
  if (n) {
1633
- let r = ot(n);
1634
- e.setCaret(t > 0 ? r + 1 : r), e.setActiveItem(), rt(n, "last-active");
1588
+ let r = st(n);
1589
+ e.setCaret(t > 0 ? r + 1 : r), e.setActiveItem(), it(n, "last-active");
1635
1590
  } else e.setCaret(e.caretPos + t);
1636
1591
  });
1637
1592
  }
1638
1593
  //#endregion
1639
1594
  //#region ../../node_modules/tom-select/dist/esm/plugins/dropdown_input/plugin.js
1640
- var ct = 27, lt = 9, ut = (e, t = !1) => {
1595
+ var lt = 27, ut = 9, dt = (e, t = !1) => {
1641
1596
  e && (e.preventDefault(), t && e.stopPropagation());
1642
- }, dt = (e, t, n, r) => {
1597
+ }, ft = (e, t, n, r) => {
1643
1598
  e.addEventListener(t, n, r);
1644
- }, ft = (e, t) => {
1599
+ }, pt = (e, t) => {
1645
1600
  if (Array.isArray(e)) e.forEach(t);
1646
1601
  else for (var n in e) e.hasOwnProperty(n) && t(e[n], n);
1647
- }, pt = (e) => {
1602
+ }, mt = (e) => {
1648
1603
  if (e.jquery) return e[0];
1649
1604
  if (e instanceof HTMLElement) return e;
1650
- if (mt(e)) {
1605
+ if (ht(e)) {
1651
1606
  var t = document.createElement("template");
1652
1607
  return t.innerHTML = e.trim(), t.content.firstChild;
1653
1608
  }
1654
1609
  return document.querySelector(e);
1655
- }, mt = (e) => typeof e == "string" && e.indexOf("<") > -1, ht = (e, ...t) => {
1656
- var n = gt(t);
1657
- e = _t(e), e.map((e) => {
1610
+ }, ht = (e) => typeof e == "string" && e.indexOf("<") > -1, gt = (e, ...t) => {
1611
+ var n = _t(t);
1612
+ e = vt(e), e.map((e) => {
1658
1613
  n.map((t) => {
1659
1614
  e.classList.add(t);
1660
1615
  });
1661
1616
  });
1662
- }, gt = (e) => {
1617
+ }, _t = (e) => {
1663
1618
  var t = [];
1664
- return ft(e, (e) => {
1619
+ return pt(e, (e) => {
1665
1620
  typeof e == "string" && (e = e.trim().split(/[\t\n\f\r\s]/)), Array.isArray(e) && (t = t.concat(e));
1666
1621
  }), t.filter(Boolean);
1667
- }, _t = (e) => (Array.isArray(e) || (e = [e]), e);
1668
- function vt() {
1622
+ }, vt = (e) => (Array.isArray(e) || (e = [e]), e);
1623
+ function yt() {
1669
1624
  let e = this;
1670
1625
  e.settings.shouldOpen = !0, e.hook("before", "setup", () => {
1671
- e.focus_node = e.control, ht(e.control_input, "dropdown-input");
1672
- let t = pt("<div class=\"dropdown-input-wrap\">");
1626
+ e.focus_node = e.control, gt(e.control_input, "dropdown-input");
1627
+ let t = mt("<div class=\"dropdown-input-wrap\">");
1673
1628
  t.append(e.control_input), e.dropdown.insertBefore(t, e.dropdown.firstChild);
1674
- let n = pt("<input class=\"items-placeholder\" tabindex=\"-1\" />");
1629
+ let n = mt("<input class=\"items-placeholder\" tabindex=\"-1\" />");
1675
1630
  n.placeholder = e.settings.placeholder || "", e.control.append(n);
1676
1631
  let r = e.input?.getAttribute("aria-label");
1677
1632
  r && n.setAttribute("aria-label", r);
1678
1633
  }), e.on("initialize", () => {
1679
1634
  e.control_input.addEventListener("keydown", (t) => {
1680
1635
  switch (t.keyCode) {
1681
- case ct:
1682
- e.isOpen && (ut(t, !0), e.close()), e.clearActiveItems();
1636
+ case lt:
1637
+ e.isOpen && (dt(t, !0), e.close()), e.clearActiveItems();
1683
1638
  return;
1684
- case lt: e.focus_node.tabIndex = -1;
1639
+ case ut: e.focus_node.tabIndex = -1;
1685
1640
  }
1686
1641
  return e.onKeyDown.call(e, t);
1687
1642
  }), e.on("blur", () => {
@@ -1692,7 +1647,7 @@ function vt() {
1692
1647
  let t = e.onBlur;
1693
1648
  e.hook("instead", "onBlur", (n) => {
1694
1649
  if (!(n && n.relatedTarget == e.control_input)) return t.call(e);
1695
- }), dt(e.control_input, "blur", () => e.onBlur()), e.hook("before", "close", () => {
1650
+ }), ft(e.control_input, "blur", () => e.onBlur()), e.hook("before", "close", () => {
1696
1651
  e.isOpen && e.focus_node.focus({ preventScroll: !0 });
1697
1652
  });
1698
1653
  });
@@ -1702,7 +1657,7 @@ function vt() {
1702
1657
  var Y = (e, t, n, r) => {
1703
1658
  e.addEventListener(t, n, r);
1704
1659
  };
1705
- function yt() {
1660
+ function bt() {
1706
1661
  var e = this;
1707
1662
  e.on("initialize", () => {
1708
1663
  var t = document.createElement("span"), n = e.control_input;
@@ -1722,52 +1677,52 @@ function yt() {
1722
1677
  }
1723
1678
  //#endregion
1724
1679
  //#region ../../node_modules/tom-select/dist/esm/plugins/no_backspace_delete/plugin.js
1725
- function bt() {
1680
+ function xt() {
1726
1681
  var e = this, t = e.deleteSelection;
1727
1682
  this.hook("instead", "deleteSelection", (n) => e.activeItems.length ? t.call(e, n) : !1);
1728
1683
  }
1729
1684
  //#endregion
1730
1685
  //#region ../../node_modules/tom-select/dist/esm/plugins/no_active_items/plugin.js
1731
- function xt() {
1686
+ function St() {
1732
1687
  this.hook("instead", "setActiveItem", () => {}), this.hook("instead", "selectAll", () => {});
1733
1688
  }
1734
1689
  //#endregion
1735
1690
  //#region ../../node_modules/tom-select/dist/esm/plugins/optgroup_columns/plugin.js
1736
- var St = 37, Ct = 39, wt = (e, t, n) => {
1691
+ var Ct = 37, wt = 39, Tt = (e, t, n) => {
1737
1692
  for (; e && e.matches;) {
1738
1693
  if (e.matches(t)) return e;
1739
1694
  e = e.parentNode;
1740
1695
  }
1741
- }, Tt = (e, t) => {
1696
+ }, Et = (e, t) => {
1742
1697
  if (!e) return -1;
1743
1698
  t ||= e.nodeName;
1744
1699
  for (var n = 0; e = e.previousElementSibling;) e.matches(t) && n++;
1745
1700
  return n;
1746
1701
  };
1747
- function Et() {
1702
+ function Dt() {
1748
1703
  var e = this, t = e.onKeyDown;
1749
1704
  e.hook("instead", "onKeyDown", (n) => {
1750
1705
  var r, i, a, o;
1751
- if (!e.isOpen || n.keyCode !== St && n.keyCode !== Ct) return t.call(e, n);
1752
- e.ignoreHover = !0, o = wt(e.activeOption, "[data-group]"), r = Tt(e.activeOption, "[data-selectable]"), o && (o = n.keyCode === St ? o.previousSibling : o.nextSibling, o && (a = o.querySelectorAll("[data-selectable]"), i = a[Math.min(a.length - 1, r)], i && e.setActiveOption(i)));
1706
+ if (!e.isOpen || n.keyCode !== Ct && n.keyCode !== wt) return t.call(e, n);
1707
+ e.ignoreHover = !0, o = Tt(e.activeOption, "[data-group]"), r = Et(e.activeOption, "[data-selectable]"), o && (o = n.keyCode === Ct ? o.previousSibling : o.nextSibling, o && (a = o.querySelectorAll("[data-selectable]"), i = a[Math.min(a.length - 1, r)], i && e.setActiveOption(i)));
1753
1708
  });
1754
1709
  }
1755
1710
  //#endregion
1756
1711
  //#region ../../node_modules/tom-select/dist/esm/plugins/remove_button/plugin.js
1757
- var Dt = (e, t = !1) => {
1712
+ var Ot = (e, t = !1) => {
1758
1713
  e && (e.preventDefault(), t && e.stopPropagation());
1759
- }, Ot = (e, t, n, r) => {
1714
+ }, X = (e, t, n, r) => {
1760
1715
  e.addEventListener(t, n, r);
1761
- }, X = (e) => {
1716
+ }, kt = (e) => {
1762
1717
  if (e.jquery) return e[0];
1763
1718
  if (e instanceof HTMLElement) return e;
1764
- if (kt(e)) {
1719
+ if (At(e)) {
1765
1720
  var t = document.createElement("template");
1766
1721
  return t.innerHTML = e.trim(), t.content.firstChild;
1767
1722
  }
1768
1723
  return document.querySelector(e);
1769
- }, kt = (e) => typeof e == "string" && e.indexOf("<") > -1;
1770
- function At(e) {
1724
+ }, At = (e) => typeof e == "string" && e.indexOf("<") > -1;
1725
+ function jt(e) {
1771
1726
  let t = this, n = Object.assign({
1772
1727
  label: "×",
1773
1728
  title: "Remove",
@@ -1782,18 +1737,18 @@ function At(e) {
1782
1737
  t.hook("after", "setupTemplates", () => {
1783
1738
  var e = t.settings.render.item;
1784
1739
  t.settings.render.item = (r, i) => {
1785
- var a = X(e.call(t, r, i)), o = X(n.html(n));
1786
- return a.appendChild(o), Ot(o, "mousedown", (e) => {
1787
- Dt(e, !0);
1788
- }), Ot(o, "click", (e) => {
1789
- t.isLocked || (Dt(e, !0), !t.isLocked && t.shouldDelete([a], e) && (t.removeItem(a), t.refreshOptions(!1), t.inputState()));
1740
+ var a = kt(e.call(t, r, i)), o = kt(n.html(n));
1741
+ return a.appendChild(o), X(o, "mousedown", (e) => {
1742
+ Ot(e, !0);
1743
+ }), X(o, "click", (e) => {
1744
+ t.isLocked || (Ot(e, !0), !t.isLocked && t.shouldDelete([a], e) && (t.removeItem(a), t.refreshOptions(!1), t.inputState()));
1790
1745
  }), a;
1791
1746
  };
1792
1747
  });
1793
1748
  }
1794
1749
  //#endregion
1795
1750
  //#region ../../node_modules/tom-select/dist/esm/plugins/restore_on_backspace/plugin.js
1796
- function jt(e) {
1751
+ function Mt(e) {
1797
1752
  let t = this, n = Object.assign({ text: (e) => e[t.settings.labelField] }, e);
1798
1753
  t.on("item_remove", function(e) {
1799
1754
  if (t.isFocused && t.control_input.value.trim() === "") {
@@ -1804,23 +1759,23 @@ function jt(e) {
1804
1759
  }
1805
1760
  //#endregion
1806
1761
  //#region ../../node_modules/tom-select/dist/esm/plugins/virtual_scroll/plugin.js
1807
- var Mt = (e, t) => {
1762
+ var Nt = (e, t) => {
1808
1763
  if (Array.isArray(e)) e.forEach(t);
1809
1764
  else for (var n in e) e.hasOwnProperty(n) && t(e[n], n);
1810
- }, Nt = (e, ...t) => {
1811
- var n = Pt(t);
1812
- e = Ft(e), e.map((e) => {
1765
+ }, Pt = (e, ...t) => {
1766
+ var n = Ft(t);
1767
+ e = It(e), e.map((e) => {
1813
1768
  n.map((t) => {
1814
1769
  e.classList.add(t);
1815
1770
  });
1816
1771
  });
1817
- }, Pt = (e) => {
1772
+ }, Ft = (e) => {
1818
1773
  var t = [];
1819
- return Mt(e, (e) => {
1774
+ return Nt(e, (e) => {
1820
1775
  typeof e == "string" && (e = e.trim().split(/[\t\n\f\r\s]/)), Array.isArray(e) && (t = t.concat(e));
1821
1776
  }), t.filter(Boolean);
1822
- }, Ft = (e) => (Array.isArray(e) || (e = [e]), e);
1823
- function It() {
1777
+ }, It = (e) => (Array.isArray(e) || (e = [e]), e);
1778
+ function Lt() {
1824
1779
  let e = this, t = e.canLoad, n = e.clearActiveOption, r = e.loadCallback;
1825
1780
  var i = {}, a, o = !1, s, c = [], l = !1, u, d = [], f = [];
1826
1781
  if (e.settings.shouldLoadMore || (e.settings.shouldLoadMore = () => {
@@ -1859,7 +1814,7 @@ function It() {
1859
1814
  }), e.hook("after", "refreshOptions", () => {
1860
1815
  let t = e.lastValue;
1861
1816
  var n;
1862
- p(t) ? (n = e.render("loading_more", { query: t }), n && (n.setAttribute("data-selectable", ""), s = n)) : t in i && !a.querySelector(".no-results") && (n = e.render("no_more_results", { query: t })), n && (Nt(n, e.settings.optionClass), a.append(n));
1817
+ p(t) ? (n = e.render("loading_more", { query: t }), n && (n.setAttribute("data-selectable", ""), s = n)) : t in i && !a.querySelector(".no-results") && (n = e.render("no_more_results", { query: t })), n && (Pt(n, e.settings.optionClass), a.append(n));
1863
1818
  });
1864
1819
  let h = () => {
1865
1820
  l && (e.addOptions(d), e.clearOptions(m), u && (i[""] = u));
@@ -1875,42 +1830,46 @@ function It() {
1875
1830
  });
1876
1831
  });
1877
1832
  }
1878
- q.define("change_listener", Ne), q.define("checkbox_options", ze), q.define("clear_button", He), q.define("drag_drop", Ze), q.define("dropdown_header", tt), q.define("caret_position", st), q.define("dropdown_input", vt), q.define("input_autogrow", yt), q.define("no_backspace_delete", bt), q.define("no_active_items", xt), q.define("optgroup_columns", Et), q.define("remove_button", At), q.define("restore_on_backspace", jt), q.define("virtual_scroll", It);
1879
- var Lt = q, Rt = ".formie-field .ts-wrapper.formie-combobox{width:100%;min-height:0;box-shadow:none;background:0 0;border:0;padding:0;display:block;position:relative}.formie-field select[data-formie-combobox-input].tomselected,.formie-field select[data-formie-combobox-input].ts-hidden-accessible{display:none!important}.formie-field .ts-wrapper.formie-combobox .ts-control{box-sizing:border-box;z-index:1;border:var(--formie-border-width) solid var(--formie-color-border-control);border-radius:var(--formie-radius-sm);background-color:var(--formie-color-surface);width:100%;min-height:var(--formie-control-height);padding:calc(var(--formie-control-padding-y) - 1px) var(--formie-control-padding-x);box-shadow:none;font-size:var(--formie-control-font-size);line-height:var(--formie-line-height-tight);color:var(--formie-color-text);align-items:center;gap:var(--formie-space-1);background-image:none;flex-wrap:wrap;transition:border-color .15s,box-shadow .15s,background-color .15s;display:flex;position:relative;overflow:hidden}.formie-field .ts-wrapper.formie-combobox.single .ts-control{--ts-pr-min:var(--formie-control-padding-x);--ts-pr-caret:calc(var(--formie-select-indicator-size) + var(--formie-space-1));background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right var(--formie-space-2) center;background-repeat:no-repeat;background-size:var(--formie-select-indicator-size) var(--formie-select-indicator-size);padding-right:calc(var(--formie-control-padding-x) + var(--formie-select-indicator-size) + var(--formie-space-2))!important}.formie-field .ts-wrapper.formie-combobox.single .ts-control:after{display:none}.formie-field .ts-wrapper.formie-combobox.multi .ts-control{padding:calc(var(--formie-control-padding-y) - 2px) var(--formie-control-padding-x) calc(var(--formie-control-padding-y) - 4px);--ts-pr-min:var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox.multi.has-items .ts-control{padding-left:var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox .ts-control>input{min-width:7rem;max-width:100%;color:var(--formie-color-text);font:inherit;font-size:var(--formie-control-font-size);line-height:inherit;flex:auto;min-height:0!important;max-height:none!important;box-shadow:none!important;background:0 0!important;border:0!important;margin:0!important;padding:0!important}.formie-field .ts-wrapper.formie-combobox .ts-control>input:focus{outline:none!important}.formie-field .ts-wrapper.formie-combobox.has-items .ts-control>input{margin:0 var(--formie-space-1)!important}.formie-field .ts-wrapper.formie-combobox.input-hidden .ts-control>input{opacity:0;position:absolute;left:-10000px}.formie-field .ts-wrapper.formie-combobox.single .ts-control,.formie-field .ts-wrapper.formie-combobox.single .ts-control>input{cursor:pointer}.formie-field .ts-wrapper.formie-combobox.single.input-active .ts-control,.formie-field .ts-wrapper.formie-combobox.single.input-active .ts-control>input{cursor:text}.formie-field .ts-wrapper.formie-combobox .ts-control .items-placeholder{color:var(--formie-color-text-muted);font:inherit;font-size:var(--formie-control-font-size)}.formie-field .ts-wrapper.formie-combobox .ts-control>input::placeholder{color:var(--formie-color-text-muted)}.formie-field .ts-wrapper.formie-combobox.focus .ts-control,.formie-field .ts-wrapper.formie-combobox .ts-control:focus-within,.formie-field .ts-wrapper.formie-combobox.dropdown-active .ts-control{border-color:var(--formie-color-focus-ring);box-shadow:var(--formie-shadow-focus);border-radius:var(--formie-radius-sm);outline:0}.formie-field-has-error .ts-wrapper.formie-combobox .ts-control{border-color:var(--formie-color-danger)}.formie-field-has-error .ts-wrapper.formie-combobox.focus .ts-control,.formie-field-has-error .ts-wrapper.formie-combobox .ts-control:focus-within,.formie-field-has-error .ts-wrapper.formie-combobox.dropdown-active .ts-control{border-color:var(--formie-color-danger);box-shadow:var(--formie-shadow-danger-focus)}.formie-field .ts-wrapper.formie-combobox.multi .ts-control>.item,.formie-field .ts-wrapper.formie-combobox.multi .ts-control [data-value]{align-items:center;gap:var(--formie-space-1);margin:0 var(--formie-space-1) var(--formie-space-1) 0;padding:0 var(--formie-space-2);background:var(--formie-color-surface-muted,#0f172a0f);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);box-shadow:none;color:var(--formie-color-text);text-shadow:none;line-height:calc(var(--formie-control-height) - var(--formie-space-3));background-image:none;display:inline-flex}.formie-field .ts-wrapper.formie-combobox.multi .ts-control>.item.active,.formie-field .ts-wrapper.formie-combobox.multi .ts-control [data-value].active{background:var(--formie-color-surface-muted,#0f172a0f);color:var(--formie-color-text)}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item{align-items:center;gap:var(--formie-space-1);display:inline-flex}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button:not(.rtl) .item{padding-right:var(--formie-space-2)!important}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove{box-shadow:none;color:var(--formie-color-text-muted);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;font-size:1.125em;line-height:1;text-decoration:none;display:inline-flex}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove:hover,.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove:focus{color:var(--formie-color-text);background:0 0;text-decoration:none}.formie-field .ts-wrapper.formie-combobox .ts-dropdown{width:100%;z-index:var(--formie-z-popover,30);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);background:var(--formie-color-surface);box-shadow:var(--formie-shadow-popover,0 8px 24px #0f172a1f);margin-top:var(--formie-space-1);box-sizing:border-box;position:absolute;top:100%;left:0}.formie-field .ts-wrapper.formie-combobox .ts-dropdown-content{scroll-behavior:smooth;max-height:200px;overflow:hidden auto}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .optgroup-header,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .no-results{color:var(--formie-color-text);padding:var(--formie-space-2) var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox .ts-dropdown [data-selectable]{cursor:pointer}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option.active,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option:hover,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .active{background:var(--formie-color-surface-muted,#0f172a0d);color:var(--formie-color-text)}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .highlight{background:#3b82f62e;border-radius:2px}.formie-field .ts-wrapper.formie-combobox.disabled .ts-control{opacity:.6;background-color:var(--formie-color-surface-muted,#0f172a0a);cursor:not-allowed}", zt = "select[data-formie-combobox-input]", Z = "combobox", Q = e("fields", "combobox");
1880
- r(Z, [Rt]);
1881
- var Bt = ["formie-select", "formie-dropdown-input"];
1882
- function Vt(e) {
1833
+ q.define("change_listener", Pe), q.define("checkbox_options", Be), q.define("clear_button", Ue), q.define("drag_drop", Qe), q.define("dropdown_header", nt), q.define("caret_position", ct), q.define("dropdown_input", yt), q.define("input_autogrow", bt), q.define("no_backspace_delete", xt), q.define("no_active_items", St), q.define("optgroup_columns", Dt), q.define("remove_button", jt), q.define("restore_on_backspace", Mt), q.define("virtual_scroll", Lt);
1834
+ var Rt = q, zt = ".formie-field .ts-wrapper.formie-combobox{width:100%;min-height:0;box-shadow:none;background:0 0;border:0;padding:0;display:block;position:relative}.formie-field select[data-formie-combobox-input].tomselected,.formie-field select[data-formie-combobox-input].ts-hidden-accessible{display:none!important}.formie-field .ts-wrapper.formie-combobox .ts-control{box-sizing:border-box;z-index:1;border:var(--formie-border-width) solid var(--formie-color-border-control);border-radius:var(--formie-radius-sm);background-color:var(--formie-color-surface);width:100%;min-height:var(--formie-control-height);padding:calc(var(--formie-control-padding-y) - 1px) var(--formie-control-padding-x);box-shadow:none;font-size:var(--formie-control-font-size);line-height:var(--formie-line-height-tight);color:var(--formie-color-text);align-items:center;gap:var(--formie-space-1);background-image:none;flex-wrap:wrap;transition:border-color .15s,box-shadow .15s,background-color .15s;display:flex;position:relative;overflow:hidden}.formie-field .ts-wrapper.formie-combobox.single .ts-control{--ts-pr-min:var(--formie-control-padding-x);--ts-pr-caret:calc(var(--formie-select-indicator-size) + var(--formie-space-1));background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right var(--formie-space-2) center;background-repeat:no-repeat;background-size:var(--formie-select-indicator-size) var(--formie-select-indicator-size);padding-right:calc(var(--formie-control-padding-x) + var(--formie-select-indicator-size) + var(--formie-space-2))!important}.formie-field .ts-wrapper.formie-combobox.single .ts-control:after{display:none}.formie-field .ts-wrapper.formie-combobox.multi .ts-control{padding:calc(var(--formie-control-padding-y) - 2px) var(--formie-control-padding-x) calc(var(--formie-control-padding-y) - 4px);--ts-pr-min:var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox.multi.has-items .ts-control{padding-left:var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox .ts-control>input{min-width:7rem;max-width:100%;color:var(--formie-color-text);font:inherit;font-size:var(--formie-control-font-size);line-height:inherit;flex:auto;min-height:0!important;max-height:none!important;box-shadow:none!important;background:0 0!important;border:0!important;margin:0!important;padding:0!important}.formie-field .ts-wrapper.formie-combobox .ts-control>input:focus{outline:none!important}.formie-field .ts-wrapper.formie-combobox.has-items .ts-control>input{margin:0 var(--formie-space-1)!important}.formie-field .ts-wrapper.formie-combobox.input-hidden .ts-control>input{opacity:0;position:absolute;left:-10000px}.formie-field .ts-wrapper.formie-combobox.single .ts-control,.formie-field .ts-wrapper.formie-combobox.single .ts-control>input{cursor:pointer}.formie-field .ts-wrapper.formie-combobox.single.input-active .ts-control,.formie-field .ts-wrapper.formie-combobox.single.input-active .ts-control>input{cursor:text}.formie-field .ts-wrapper.formie-combobox .ts-control .items-placeholder{color:var(--formie-color-text-muted);font:inherit;font-size:var(--formie-control-font-size)}.formie-field .ts-wrapper.formie-combobox .ts-control>input::placeholder{color:var(--formie-color-text-muted)}.formie-field .ts-wrapper.formie-combobox.focus .ts-control,.formie-field .ts-wrapper.formie-combobox .ts-control:focus-within,.formie-field .ts-wrapper.formie-combobox.dropdown-active .ts-control{border-color:var(--formie-color-focus-ring);box-shadow:var(--formie-shadow-focus);border-radius:var(--formie-radius-sm);outline:0}.formie-field-has-error .ts-wrapper.formie-combobox .ts-control{border-color:var(--formie-color-danger)}.formie-field-has-error .ts-wrapper.formie-combobox.focus .ts-control,.formie-field-has-error .ts-wrapper.formie-combobox .ts-control:focus-within,.formie-field-has-error .ts-wrapper.formie-combobox.dropdown-active .ts-control{border-color:var(--formie-color-danger);box-shadow:var(--formie-shadow-danger-focus)}.formie-field .ts-wrapper.formie-combobox.multi .ts-control>.item,.formie-field .ts-wrapper.formie-combobox.multi .ts-control [data-value]{align-items:center;gap:var(--formie-space-1);margin:0 var(--formie-space-1) var(--formie-space-1) 0;padding:0 var(--formie-space-2);background:var(--formie-color-surface-muted,#0f172a0f);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);box-shadow:none;color:var(--formie-color-text);text-shadow:none;line-height:calc(var(--formie-control-height) - var(--formie-space-3));background-image:none;display:inline-flex}.formie-field .ts-wrapper.formie-combobox.multi .ts-control>.item.active,.formie-field .ts-wrapper.formie-combobox.multi .ts-control [data-value].active{background:var(--formie-color-surface-muted,#0f172a0f);color:var(--formie-color-text)}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item{align-items:center;gap:var(--formie-space-1);display:inline-flex}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button:not(.rtl) .item{padding-right:var(--formie-space-2)!important}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove{box-shadow:none;color:var(--formie-color-text-muted);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;font-size:1.125em;line-height:1;text-decoration:none;display:inline-flex}.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove:hover,.formie-field .ts-wrapper.formie-combobox.plugin-remove_button .item .remove:focus{color:var(--formie-color-text);background:0 0;text-decoration:none}.formie-field .ts-wrapper.formie-combobox .ts-dropdown{width:100%;z-index:var(--formie-z-popover,30);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);background:var(--formie-color-surface);box-shadow:var(--formie-shadow-popover,0 8px 24px #0f172a1f);margin-top:var(--formie-space-1);box-sizing:border-box;position:absolute;top:100%;left:0}.formie-field .ts-wrapper.formie-combobox .ts-dropdown-content{scroll-behavior:smooth;max-height:200px;overflow:hidden auto}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .optgroup-header,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .no-results{color:var(--formie-color-text);padding:var(--formie-space-2) var(--formie-control-padding-x)}.formie-field .ts-wrapper.formie-combobox .ts-dropdown [data-selectable]{cursor:pointer}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option.active,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .option:hover,.formie-field .ts-wrapper.formie-combobox .ts-dropdown .active{background:var(--formie-color-surface-muted,#0f172a0d);color:var(--formie-color-text)}.formie-field .ts-wrapper.formie-combobox .ts-dropdown .highlight{background:#3b82f62e;border-radius:2px}.formie-field .ts-wrapper.formie-combobox.disabled .ts-control{opacity:.6;background-color:var(--formie-color-surface-muted,#0f172a0a);cursor:not-allowed}", Bt = "select[data-formie-combobox-input]", Z = "combobox", Q = e("fields", "combobox");
1835
+ i(Z, [zt]);
1836
+ var Vt = ["formie-select", "formie-dropdown-input"];
1837
+ function Ht(e) {
1883
1838
  let n = [];
1884
- return [...Bt, ...t(e, "fieldControlError")].forEach((t) => {
1839
+ return [...Vt, ...t(e, "fieldControlError")].forEach((t) => {
1885
1840
  e.classList.contains(t) && (e.classList.remove(t), n.push(t));
1886
1841
  }), n;
1887
1842
  }
1888
- function Ht(e, t) {
1843
+ function Ut(e, t) {
1889
1844
  t.forEach((t) => {
1890
1845
  e.classList.add(t);
1891
1846
  });
1892
1847
  }
1893
- function Ut(e, n) {
1894
- [...Bt, ...t(n, "fieldControlError")].forEach((t) => {
1848
+ function Wt(e, n) {
1849
+ [...Vt, ...t(n, "fieldControlError")].forEach((t) => {
1895
1850
  e.classList.remove(t);
1896
1851
  });
1897
1852
  }
1898
- function Wt(e, t) {
1853
+ function Gt(e, t) {
1899
1854
  return t?.trim() || e.querySelector("option[value=\"\"]")?.textContent?.trim() || null;
1900
1855
  }
1901
- function Gt(e) {
1856
+ function Kt(e) {
1902
1857
  e.options[""] && e.removeOption("", !0);
1903
1858
  }
1904
1859
  function $(e, t = {}) {
1905
1860
  e._formieTomSelect?.destroy();
1906
- let r = Array.from(e.selectedOptions, (e) => e.value).filter(Boolean), i = e.form, o = t.multiple === !0, s = Vt(e), c = Wt(e, t.placeholder), l = {
1861
+ let i = Array.from(e.selectedOptions, (e) => e.value).filter(Boolean), a = e.form, s = t.multiple === !0, c = Ht(e), l = Gt(e, t.placeholder), u = {
1907
1862
  create: !1,
1908
- maxItems: o ? null : 1,
1909
- plugins: o ? ["remove_button"] : [],
1910
- hideSelected: o ? !0 : null,
1911
- clearAfterSelect: o,
1912
- closeAfterSelect: !o,
1913
- allowEmptyOption: !o,
1863
+ maxOptions: t.maxOptions === void 0 ? 100 : t.maxOptions,
1864
+ maxItems: s ? null : 1,
1865
+ plugins: s ? ["remove_button"] : t.allowClear ? { remove_button: { html: () => {
1866
+ let e = document.createElement("button");
1867
+ return e.type = "button", e.className = "remove", e.title = r("Clear selection"), e.setAttribute("aria-label", e.title), e.textContent = "×", e;
1868
+ } } } : [],
1869
+ hideSelected: s ? !0 : null,
1870
+ clearAfterSelect: s,
1871
+ closeAfterSelect: !s,
1872
+ allowEmptyOption: !s,
1914
1873
  openOnFocus: !0,
1915
1874
  diacritics: !0,
1916
1875
  copyClassesToDropdown: !1,
@@ -1919,28 +1878,28 @@ function $(e, t = {}) {
1919
1878
  e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
1920
1879
  }
1921
1880
  };
1922
- c && (l.placeholder = c), a(e, Z, "before-init", {
1881
+ l && (u.placeholder = l), o(e, Z, "before-init", {
1923
1882
  select: e,
1924
- options: l
1883
+ options: u
1925
1884
  });
1926
- let u = new Lt(e, l);
1927
- u.control_input.setAttribute(n, ""), Gt(u), Ut(u.wrapper, e), u.dropdown && Ut(u.dropdown, e), e.style.display = "none", e._formieTomSelect = u;
1928
- let d = (e) => {
1885
+ let d = new Rt(e, u);
1886
+ d.control_input.setAttribute(n, ""), Kt(d), Wt(d.wrapper, e), d.dropdown && Wt(d.dropdown, e), e.style.display = "none", e._formieTomSelect = d;
1887
+ let f = (e) => {
1929
1888
  queueMicrotask(() => {
1930
- e.defaultPrevented || u.setValue(r);
1889
+ e.defaultPrevented || d.setValue(i);
1931
1890
  });
1932
1891
  };
1933
- return i?.addEventListener("reset", d), Q.log("Initialized.", {
1892
+ return a?.addEventListener("reset", f), Q.log("Initialized.", {
1934
1893
  inputName: e.name,
1935
- multiple: o
1936
- }), a(e, Z, "after-init", {
1937
- combobox: u,
1938
- options: l
1894
+ multiple: s
1895
+ }), o(e, Z, "after-init", {
1896
+ combobox: d,
1897
+ options: u
1939
1898
  }), () => {
1940
- i?.removeEventListener("reset", d), u.destroy(), e.style.removeProperty("display"), Ht(e, s), delete e._formieTomSelect, Q.log("Destroyed.", { inputName: e.name });
1899
+ a?.removeEventListener("reset", f), d.destroy(), e.style.removeProperty("display"), Ut(e, c), delete e._formieTomSelect, Q.log("Destroyed.", { inputName: e.name });
1941
1900
  };
1942
1901
  }
1943
- var Kt = {
1902
+ var qt = {
1944
1903
  moduleId: `formie:${Z}`,
1945
1904
  version: 2,
1946
1905
  surfaces: [
@@ -1949,10 +1908,10 @@ var Kt = {
1949
1908
  "cp-edit"
1950
1909
  ],
1951
1910
  kind: "field",
1952
- match: (e) => !!e.target.querySelector(zt),
1911
+ match: (e) => !!e.target.querySelector(Bt),
1953
1912
  setup: async (e) => {
1954
- let t = e.options || {}, n = i(e), r = n.map((e) => {
1955
- let n = e.querySelector(zt);
1913
+ let t = e.options || {}, n = a(e), r = n.map((e) => {
1914
+ let n = e.querySelector(Bt);
1956
1915
  return n instanceof HTMLSelectElement ? $(n, t) : (Q.warn("Field missing combobox select; skipping."), () => {});
1957
1916
  });
1958
1917
  return Q.log("Module setup.", { fieldCount: n.length }), await e.emit("formie:module:combobox:init", { count: r.length }), { destroy: () => {
@@ -1963,4 +1922,4 @@ var Kt = {
1963
1922
  }
1964
1923
  };
1965
1924
  //#endregion
1966
- export { Kt as comboboxModule, $ as initFormieCombobox };
1925
+ export { qt as comboboxModule, $ as initFormieCombobox };