inertia-bootstrap-forms 4.0.4 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- import * as en from "vue";
2
- import { defineComponent as F, createElementBlock as h, openBlock as p, normalizeClass as q, renderSlot as L, createElementVNode as m, createCommentVNode as M, toDisplayString as V, computed as S, withDirectives as re, vModelText as dn, normalizeStyle as se, ref as E, onMounted as J, watch as H, vModelDynamic as Se, createTextVNode as x, nextTick as G, shallowRef as $n, onBeforeUnmount as cn, Fragment as W, renderList as ae, reactive as ie, resolveComponent as oe, createBlock as le, mergeProps as We, withModifiers as nn, provide as Ve, inject as me, withCtx as Ye, createVNode as De, h as wn, vModelCheckbox as Sn, Teleport as kn } from "vue";
3
- import { _ as R, f as P, u as U } from "./chunks/_plugin-vue_export-helper-13TPlHFF.js";
4
- import { u as Q, a as Re, l as Ne, c as In } from "./chunks/http-DV3dRBe5.js";
5
- import { useForm as Cn } from "@inertiajs/vue3";
6
- const Tn = "۰۱۲۳۴۵۶۷۸۹", Mn = "٠١٢٣٤٥٦٧٨٩";
7
- function Le(e) {
1
+ import * as nn from "vue";
2
+ import { defineComponent as F, createElementBlock as v, openBlock as m, normalizeClass as q, renderSlot as L, createElementVNode as h, createCommentVNode as M, toDisplayString as V, computed as S, withDirectives as re, vModelText as fn, normalizeStyle as se, ref as E, onMounted as J, watch as U, vModelDynamic as Se, createTextVNode as x, nextTick as X, shallowRef as Sn, onBeforeUnmount as pn, Fragment as W, renderList as ae, reactive as ie, resolveComponent as oe, createBlock as le, mergeProps as Qe, withModifiers as tn, provide as De, inject as me, withCtx as xe, createVNode as Ne, h as kn, vModelCheckbox as In, Teleport as Cn } from "vue";
3
+ import { _ as R, f as z, u as P } from "./chunks/_plugin-vue_export-helper-13TPlHFF.js";
4
+ import { u as Q, a as Le, l as qe, c as Tn } from "./chunks/http-DV3dRBe5.js";
5
+ import { useForm as Mn } from "@inertiajs/vue3";
6
+ const Bn = "۰۱۲۳۴۵۶۷۸۹", En = "٠١٢٣٤٥٦٧٨٩";
7
+ function ke(e) {
8
8
  return String(e ?? "").replace(/[۰-۹٠-٩]/g, (n) => {
9
- const a = Tn.indexOf(n);
10
- return String(a !== -1 ? a : Mn.indexOf(n));
9
+ const a = Bn.indexOf(n);
10
+ return String(a !== -1 ? a : En.indexOf(n));
11
11
  });
12
12
  }
13
- function qe(e) {
13
+ function Fe(e) {
14
14
  if (e == null || e === "") return "";
15
15
  const n = Number(e);
16
16
  return Number.isNaN(n) ? "" : n.toLocaleString("en-US");
17
17
  }
18
- function fn(e) {
19
- const n = Le(e).replace(/\D/g, "");
18
+ function mn(e) {
19
+ const n = ke(e).replace(/\D/g, "");
20
20
  return n === "" ? null : parseInt(n, 10);
21
21
  }
22
- const Bn = F({
22
+ const An = F({
23
23
  name: "AmountInput",
24
24
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
25
25
  props: {
26
- ...P,
26
+ ...z,
27
27
  placeholder: { type: String, default: null },
28
28
  unit: { type: String, default: null },
29
29
  min: { type: Number, default: null },
@@ -33,33 +33,33 @@ const Bn = F({
33
33
  locale: { type: String, default: null }
34
34
  },
35
35
  setup(e, { emit: n }) {
36
- const a = U(e, n), { t: l } = Q(() => e.locale), u = S(() => qe(a.model.value)), i = S(() => e.unit ?? l("amount.unit")), t = S(() => e.size ? `form-control-${e.size}` : null);
36
+ const a = P(e, n), { t: l } = Q(() => e.locale), u = S(() => Fe(a.model.value)), i = S(() => e.unit ?? l("amount.unit")), t = S(() => e.size ? `form-control-${e.size}` : null);
37
37
  function d(w) {
38
- const b = w.target, y = b.value.slice(0, b.selectionStart ?? 0), $ = Le(y).replace(/\D/g, "").length, T = fn(b.value);
39
- a.model.value = T;
40
- const o = qe(T);
41
- b.value = o;
38
+ const g = w.target, p = g.value.slice(0, g.selectionStart ?? 0), $ = ke(p).replace(/\D/g, "").length, k = mn(g.value);
39
+ a.model.value = k;
40
+ const o = Fe(k);
41
+ g.value = o;
42
42
  let r = 0, s = 0;
43
43
  for (; r < o.length && s < $; )
44
44
  /\d/.test(o[r]) && s++, r++;
45
- document.activeElement === b && b.setSelectionRange(r, r), n("input", T, w);
45
+ document.activeElement === g && g.setSelectionRange(r, r), n("input", k, w);
46
46
  }
47
- function g(w) {
48
- let b = a.model.value;
49
- b != null && (e.max !== null && b > e.max && (b = e.max), e.min !== null && b < e.min && (b = e.min), b !== a.model.value && (a.model.value = b)), a.emitChange(b, w);
47
+ function y(w) {
48
+ let g = a.model.value;
49
+ g != null && (e.max !== null && g > e.max && (g = e.max), e.min !== null && g < e.min && (g = e.min), g !== a.model.value && (a.model.value = g)), a.emitChange(g, w);
50
50
  }
51
- return { ...a, displayValue: u, unitText: i, sizeClass: t, onInput: d, clamp: g, t: l };
51
+ return { ...a, displayValue: u, unitText: i, sizeClass: t, onInput: d, clamp: y, t: l };
52
52
  }
53
- }), En = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"], An = {
53
+ }), On = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Vn = {
54
54
  key: 0,
55
55
  class: "input-group-text fanum"
56
56
  };
57
- function On(e, n, a, l, u, i) {
58
- return p(), h("div", {
57
+ function Dn(e, n, a, l, u, i) {
58
+ return m(), v("div", {
59
59
  class: q(["input-group", { "is-invalid": e.isInvalid }])
60
60
  }, [
61
61
  L(e.$slots, "prefix"),
62
- m("input", {
62
+ h("input", {
63
63
  name: e.name,
64
64
  id: e.inputId,
65
65
  value: e.displayValue,
@@ -76,16 +76,16 @@ function On(e, n, a, l, u, i) {
76
76
  onChange: n[1] || (n[1] = (...t) => e.clamp && e.clamp(...t)),
77
77
  onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
78
78
  onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
79
- }, null, 42, En),
80
- e.unitText ? (p(), h("span", An, V(e.unitText), 1)) : M("", !0),
79
+ }, null, 42, On),
80
+ e.unitText ? (m(), v("span", Vn, V(e.unitText), 1)) : M("", !0),
81
81
  L(e.$slots, "suffix")
82
82
  ], 2);
83
83
  }
84
- const Vn = /* @__PURE__ */ R(Bn, [["render", On]]), Dn = F({
84
+ const Nn = /* @__PURE__ */ R(An, [["render", Dn]]), qn = F({
85
85
  name: "CaptchaInput",
86
86
  emits: ["update:modelValue", "change", "input", "refresh"],
87
87
  props: {
88
- ...P,
88
+ ...z,
89
89
  name: { type: String, default: "captcha" },
90
90
  /** Endpoint that returns the captcha image. */
91
91
  url: { type: String, default: "/captcha/default" },
@@ -97,32 +97,32 @@ const Vn = /* @__PURE__ */ R(Bn, [["render", On]]), Dn = F({
97
97
  locale: { type: String, default: null }
98
98
  },
99
99
  setup(e, { emit: n, expose: a }) {
100
- const l = U(e, n), { t: u } = Q(() => e.locale), i = Re(), t = E(null), d = E(!0);
101
- function g() {
100
+ const l = P(e, n), { t: u } = Q(() => e.locale), i = Le(), t = E(null), d = E(!0);
101
+ function y() {
102
102
  d.value = !0, t.value = `${e.url}${e.url.includes("?") ? "&" : "?"}t=${Date.now()}`, i.timeout(() => {
103
103
  d.value = !1;
104
104
  }, 500), n("refresh");
105
105
  }
106
- return J(g), H(
106
+ return J(y), U(
107
107
  () => {
108
108
  var w;
109
109
  return (w = l.form.value) == null ? void 0 : w.processing;
110
110
  },
111
- (w, b) => {
112
- e.refreshOnSubmit && b && !w && (l.model.value = null, g());
111
+ (w, g) => {
112
+ e.refreshOnSubmit && g && !w && (l.model.value = null, y());
113
113
  }
114
- ), a({ refresh: g }), { ...l, t: u, src: t, loading: d, refresh: g };
114
+ ), a({ refresh: y }), { ...l, t: u, src: t, loading: d, refresh: y };
115
115
  }
116
- }), Nn = ["name", "id", "placeholder", "required", "readonly", "disabled", "aria-invalid"], qn = ["src", "alt", "width", "height"], Fn = {
116
+ }), Fn = ["name", "id", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Rn = ["src", "alt", "width", "height"], Ln = {
117
117
  key: 1,
118
118
  class: "placeholder-wave w-100",
119
119
  "aria-hidden": "true"
120
- }, Rn = ["disabled", "aria-label"];
121
- function Ln(e, n, a, l, u, i) {
122
- return p(), h("div", {
120
+ }, jn = ["disabled", "aria-label"];
121
+ function zn(e, n, a, l, u, i) {
122
+ return m(), v("div", {
123
123
  class: q(["input-group captcha", { "is-invalid": e.isInvalid }])
124
124
  }, [
125
- re(m("input", {
125
+ re(h("input", {
126
126
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
127
127
  name: e.name,
128
128
  id: e.inputId,
@@ -137,14 +137,14 @@ function Ln(e, n, a, l, u, i) {
137
137
  class: q(["form-control text-start", { "is-invalid": e.isInvalid }]),
138
138
  onInput: n[1] || (n[1] = (t) => e.$emit("input", e.model, t)),
139
139
  onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t))
140
- }, null, 42, Nn), [
141
- [dn, e.model]
140
+ }, null, 42, Fn), [
141
+ [fn, e.model]
142
142
  ]),
143
- m("span", {
143
+ h("span", {
144
144
  class: "input-group-text p-0 overflow-hidden",
145
145
  style: se({ width: e.imageWidth + "px", height: "auto" })
146
146
  }, [
147
- e.src && !e.loading ? (p(), h("img", {
147
+ e.src && !e.loading ? (m(), v("img", {
148
148
  key: 0,
149
149
  src: e.src,
150
150
  alt: e.t("captcha.alt"),
@@ -153,21 +153,21 @@ function Ln(e, n, a, l, u, i) {
153
153
  class: "captcha-holder",
154
154
  style: { cursor: "pointer", objectFit: "contain" },
155
155
  onClick: n[3] || (n[3] = (...t) => e.refresh && e.refresh(...t))
156
- }, null, 8, qn)) : (p(), h("span", Fn, [
157
- m("span", {
156
+ }, null, 8, Rn)) : (m(), v("span", Ln, [
157
+ h("span", {
158
158
  class: "placeholder w-100",
159
159
  style: se({ height: e.imageHeight + "px" })
160
160
  }, null, 4)
161
161
  ]))
162
162
  ], 4),
163
- m("button", {
163
+ h("button", {
164
164
  type: "button",
165
165
  class: "btn-outline theme-secondary btn-icon",
166
166
  disabled: e.isDisabled || e.loading,
167
167
  "aria-label": e.t("captcha.refresh"),
168
168
  onClick: n[4] || (n[4] = (...t) => e.refresh && e.refresh(...t))
169
169
  }, n[5] || (n[5] = [
170
- m("svg", {
170
+ h("svg", {
171
171
  width: "16",
172
172
  height: "16",
173
173
  viewBox: "0 0 16 16",
@@ -178,13 +178,13 @@ function Ln(e, n, a, l, u, i) {
178
178
  "stroke-linejoin": "round",
179
179
  "aria-hidden": "true"
180
180
  }, [
181
- m("path", { d: "M13.5 3v3.5H10M2.5 13V9.5H6" }),
182
- m("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5" })
181
+ h("path", { d: "M13.5 3v3.5H10M2.5 13V9.5H6" }),
182
+ h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5" })
183
183
  ], -1)
184
- ]), 8, Rn)
184
+ ]), 8, jn)
185
185
  ], 2);
186
186
  }
187
- const jn = /* @__PURE__ */ R(Dn, [["render", Ln]]);
187
+ const Pn = /* @__PURE__ */ R(qn, [["render", zn]]);
188
188
  function je(e, n, a, { type: l = () => e.type } = {}) {
189
189
  function u() {
190
190
  if (!e.checked) return;
@@ -196,13 +196,13 @@ function je(e, n, a, { type: l = () => e.type } = {}) {
196
196
  }
197
197
  return J(() => {
198
198
  u(), i();
199
- }), H(() => e.indeterminate, i), { applyInitialChecked: u };
199
+ }), U(() => e.indeterminate, i), { applyInitialChecked: u };
200
200
  }
201
- const zn = F({
201
+ const Kn = F({
202
202
  name: "CheckboxButtonInput",
203
203
  emits: ["update:modelValue", "change", "focus", "blur"],
204
204
  props: {
205
- ...P,
205
+ ...z,
206
206
  type: { type: String, default: "radio", validator: (e) => ["checkbox", "radio"].includes(e) },
207
207
  value: { type: [String, Number, Boolean, Object], default: "yes" },
208
208
  trueValue: { type: null, default: !0 },
@@ -213,16 +213,16 @@ const zn = F({
213
213
  theme: { type: String, default: "primary" }
214
214
  },
215
215
  setup(e, { emit: n }) {
216
- const a = E(null), l = U(e, n, { valued: () => e.value });
216
+ const a = E(null), l = P(e, n, { valued: () => e.value });
217
217
  return je(e, l, a), { ...l, input: a, onChange: (u) => l.emitChange(l.model.value, u) };
218
218
  },
219
219
  expose: ["input"]
220
- }), Pn = ["name", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"];
221
- function Un(e, n, a, l, u, i) {
222
- return p(), h("label", {
220
+ }), Un = ["name", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"];
221
+ function Hn(e, n, a, l, u, i) {
222
+ return m(), v("label", {
223
223
  class: q(["btn-check", [`btn-${e.variant}`, `theme-${e.theme}`, { "is-invalid": e.isInvalid, disabled: e.isDisabled }]])
224
224
  }, [
225
- re(m("input", {
225
+ re(h("input", {
226
226
  ref: "input",
227
227
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
228
228
  name: e.name,
@@ -238,17 +238,17 @@ function Un(e, n, a, l, u, i) {
238
238
  onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
239
239
  onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
240
240
  onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
241
- }, null, 42, Pn), [
241
+ }, null, 42, Un), [
242
242
  [Se, e.model]
243
243
  ]),
244
244
  L(e.$slots, "default")
245
245
  ], 2);
246
246
  }
247
- const Hn = /* @__PURE__ */ R(zn, [["render", Un]]), Kn = F({
247
+ const Xn = /* @__PURE__ */ R(Kn, [["render", Hn]]), Gn = F({
248
248
  name: "CheckboxInput",
249
249
  emits: ["update:modelValue", "change", "focus", "blur"],
250
250
  props: {
251
- ...P,
251
+ ...z,
252
252
  /** checkbox | radio */
253
253
  type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
254
254
  /** Value added to the model (arrays / radios) when this option is checked. */
@@ -261,7 +261,7 @@ const Hn = /* @__PURE__ */ R(zn, [["render", Un]]), Kn = F({
261
261
  label: { type: String, default: null }
262
262
  },
263
263
  setup(e, { emit: n }) {
264
- const a = E(null), l = U(e, n, { valued: () => e.value });
264
+ const a = E(null), l = P(e, n, { valued: () => e.value });
265
265
  je(e, l, a);
266
266
  function u(i) {
267
267
  l.emitChange(l.model.value, i);
@@ -269,10 +269,10 @@ const Hn = /* @__PURE__ */ R(zn, [["render", Un]]), Kn = F({
269
269
  return { ...l, input: a, onChange: u };
270
270
  },
271
271
  expose: ["input"]
272
- }), Xn = { class: "form-field" }, Gn = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Wn = ["for"];
273
- function Qn(e, n, a, l, u, i) {
274
- return p(), h("div", Xn, [
275
- re(m("input", {
272
+ }), Wn = { class: "form-field" }, Qn = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Jn = ["for"];
273
+ function Zn(e, n, a, l, u, i) {
274
+ return m(), v("div", Wn, [
275
+ re(h("input", {
276
276
  ref: "input",
277
277
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
278
278
  name: e.name,
@@ -289,30 +289,30 @@ function Qn(e, n, a, l, u, i) {
289
289
  onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
290
290
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
291
291
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
292
- }, null, 42, Gn), [
292
+ }, null, 42, Qn), [
293
293
  [Se, e.model]
294
294
  ]),
295
- m("label", { for: e.inputId }, [
295
+ h("label", { for: e.inputId }, [
296
296
  L(e.$slots, "default", {}, () => [
297
297
  x(V(e.label), 1)
298
298
  ])
299
- ], 8, Wn)
299
+ ], 8, Jn)
300
300
  ]);
301
301
  }
302
- const Jn = /* @__PURE__ */ R(Kn, [["render", Qn]]), Zn = 24;
303
- function He(e) {
304
- return Le(e).replace(/^\s*ir/i, "").replace(/\D/g, "").slice(0, Zn);
302
+ const Yn = /* @__PURE__ */ R(Gn, [["render", Zn]]), xn = 24;
303
+ function Ue(e) {
304
+ return ke(e).replace(/^\s*ir/i, "").replace(/\D/g, "").slice(0, xn);
305
305
  }
306
- function Ke(e, n = !0) {
306
+ function He(e, n = !0) {
307
307
  if (!e) return "";
308
308
  const a = [e.slice(0, 2), ...e.slice(2).match(/.{1,4}/g) ?? []];
309
309
  return n && (a[0] = `${a[0]}`), a.join(" ");
310
310
  }
311
- const Yn = F({
311
+ const _n = F({
312
312
  name: "ShebaInput",
313
313
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
314
314
  props: {
315
- ...P,
315
+ ...z,
316
316
  placeholder: { type: String, default: null },
317
317
  /** Show "IR" at the start of the formatted value. */
318
318
  prefix: { type: Boolean, default: !0 },
@@ -320,51 +320,51 @@ const Yn = F({
320
320
  size: { type: String, default: null }
321
321
  },
322
322
  setup(e, { emit: n }) {
323
- const a = U(e, n), l = S(() => He(a.model.value ?? "")), u = S(() => Ke(l.value, e.prefix)), i = S(() => e.size ? `form-control-${e.size}` : null), t = S(
324
- () => e.placeholder ?? Ke("000000000000000000000000", e.prefix)
323
+ const a = P(e, n), l = S(() => Ue(a.model.value ?? "")), u = S(() => He(l.value, e.prefix)), i = S(() => e.size ? `form-control-${e.size}` : null), t = S(
324
+ () => e.placeholder ?? He("000000000000000000000000", e.prefix)
325
325
  );
326
- function d(y, $) {
327
- if ($ === 0) return e.prefix && y ? 2 : 0;
328
- let T = 0;
329
- for (let o = 0; o < y.length; o++)
330
- if (/\d/.test(y[o]) && ++T === $) return o + 1;
331
- return y.length;
332
- }
333
- function g(y) {
334
- const $ = y.target, T = $.selectionStart ?? $.value.length, o = He($.value.slice(0, T)).length, r = He($.value), s = Ke(r, e.prefix);
326
+ function d(p, $) {
327
+ if ($ === 0) return e.prefix && p ? 2 : 0;
328
+ let k = 0;
329
+ for (let o = 0; o < p.length; o++)
330
+ if (/\d/.test(p[o]) && ++k === $) return o + 1;
331
+ return p.length;
332
+ }
333
+ function y(p) {
334
+ const $ = p.target, k = $.selectionStart ?? $.value.length, o = Ue($.value.slice(0, k)).length, r = Ue($.value), s = He(r, e.prefix);
335
335
  if (a.model.value = r, $.value = s, document.activeElement === $) {
336
336
  const c = d(s, o);
337
- G(() => $.setSelectionRange(c, c));
337
+ X(() => $.setSelectionRange(c, c));
338
338
  }
339
- n("input", r, y);
339
+ n("input", r, p);
340
340
  }
341
- function w(y) {
342
- if (y.key !== "Backspace") return;
343
- const $ = y.target;
341
+ function w(p) {
342
+ if (p.key !== "Backspace") return;
343
+ const $ = p.target;
344
344
  if ($.selectionStart !== $.selectionEnd) return;
345
- const T = $.selectionStart ?? 0;
346
- T > 0 && $.value[T - 1] === " " && $.setSelectionRange(T - 1, T - 1);
345
+ const k = $.selectionStart ?? 0;
346
+ k > 0 && $.value[k - 1] === " " && $.setSelectionRange(k - 1, k - 1);
347
347
  }
348
- function b(y) {
349
- a.emitChange(l.value, y);
348
+ function g(p) {
349
+ a.emitChange(l.value, p);
350
350
  }
351
- return { ...a, displayValue: u, sizeClass: i, placeholderText: t, onInput: g, onKeydown: w, onChange: b };
351
+ return { ...a, displayValue: u, sizeClass: i, placeholderText: t, onInput: y, onKeydown: w, onChange: g };
352
352
  }
353
- }), xn = {
353
+ }), et = {
354
354
  class: "input-group",
355
355
  dir: "ltr"
356
- }, _n = ["id"], et = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
357
- function nt(e, n, a, l, u, i) {
358
- return p(), h("div", xn, [
359
- m("span", {
356
+ }, nt = ["id"], tt = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
357
+ function lt(e, n, a, l, u, i) {
358
+ return m(), v("div", et, [
359
+ h("span", {
360
360
  class: "input-group-text",
361
361
  id: e.inputId + "prefix"
362
362
  }, [
363
363
  L(e.$slots, "default", {}, () => [
364
364
  n[5] || (n[5] = x(" IR "))
365
365
  ])
366
- ], 8, _n),
367
- m("input", {
366
+ ], 8, nt),
367
+ h("input", {
368
368
  name: e.name,
369
369
  id: e.inputId,
370
370
  value: e.displayValue,
@@ -383,14 +383,82 @@ function nt(e, n, a, l, u, i) {
383
383
  onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
384
384
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
385
385
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
386
- }, null, 42, et)
386
+ }, null, 42, tt)
387
387
  ]);
388
388
  }
389
- const zo = /* @__PURE__ */ R(Yn, [["render", nt]]), tt = F({
389
+ const at = /* @__PURE__ */ R(_n, [["render", lt]]), ot = 16;
390
+ function Xe(e) {
391
+ return ke(e).replace(/\D/g, "").slice(0, ot);
392
+ }
393
+ function ln(e) {
394
+ return (e.match(/.{1,4}/g) ?? []).join(" ");
395
+ }
396
+ const rt = F({
397
+ name: "CreditCardInput",
398
+ emits: ["update:modelValue", "change", "input", "focus", "blur"],
399
+ props: {
400
+ ...z,
401
+ placeholder: { type: String, default: null },
402
+ inputClass: { type: [String, Array, Object], default: null },
403
+ size: { type: String, default: null }
404
+ },
405
+ setup(e, { emit: n }) {
406
+ const a = P(e, n), l = S(() => Xe(a.model.value ?? "")), u = S(() => ln(l.value)), i = S(() => e.size ? `form-control-${e.size}` : null);
407
+ function t(g, p) {
408
+ if (p === 0) return 0;
409
+ let $ = 0;
410
+ for (let k = 0; k < g.length; k++)
411
+ if (/\d/.test(g[k]) && ++$ === p) return k + 1;
412
+ return g.length;
413
+ }
414
+ function d(g) {
415
+ const p = g.target, $ = p.selectionStart ?? p.value.length, k = Xe(p.value.slice(0, $)).length, o = Xe(p.value), r = ln(o);
416
+ if (a.model.value = o, p.value = r, document.activeElement === p) {
417
+ const s = t(r, k);
418
+ X(() => p.setSelectionRange(s, s));
419
+ }
420
+ n("input", o, g);
421
+ }
422
+ function y(g) {
423
+ if (g.key !== "Backspace") return;
424
+ const p = g.target;
425
+ if (p.selectionStart !== p.selectionEnd) return;
426
+ const $ = p.selectionStart ?? 0;
427
+ $ > 0 && p.value[$ - 1] === " " && p.setSelectionRange($ - 1, $ - 1);
428
+ }
429
+ function w(g) {
430
+ a.emitChange(l.value, g);
431
+ }
432
+ return { ...a, displayValue: u, sizeClass: i, onInput: d, onKeydown: y, onChange: w };
433
+ }
434
+ }), st = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
435
+ function it(e, n, a, l, u, i) {
436
+ return m(), v("input", {
437
+ name: e.name,
438
+ id: e.inputId,
439
+ value: e.displayValue,
440
+ placeholder: e.placeholder ?? "0000 0000 0000 0000",
441
+ required: e.required,
442
+ readonly: e.readonly,
443
+ disabled: e.isDisabled,
444
+ "aria-invalid": e.isInvalid || void 0,
445
+ type: "text",
446
+ inputmode: "numeric",
447
+ autocomplete: "cc-number",
448
+ dir: "ltr",
449
+ class: q(["form-control text-start", [e.sizeClass, e.inputClass, { "is-invalid": e.isInvalid }]]),
450
+ onInput: n[0] || (n[0] = (...t) => e.onInput && e.onInput(...t)),
451
+ onKeydown: n[1] || (n[1] = (...t) => e.onKeydown && e.onKeydown(...t)),
452
+ onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
453
+ onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
454
+ onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
455
+ }, null, 42, st);
456
+ }
457
+ const ut = /* @__PURE__ */ R(rt, [["render", it]]), dt = F({
390
458
  name: "CheckboxToggle",
391
459
  emits: ["update:modelValue", "change", "focus", "blur"],
392
460
  props: {
393
- ...P,
461
+ ...z,
394
462
  type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
395
463
  value: { type: [String, Number, Boolean, Object], default: "yes" },
396
464
  trueValue: { type: null, default: !0 },
@@ -402,13 +470,13 @@ const zo = /* @__PURE__ */ R(Yn, [["render", nt]]), tt = F({
402
470
  formFieldCard: { type: Boolean, default: !0 }
403
471
  },
404
472
  setup(e, { emit: n }) {
405
- const a = E(null), l = U(e, n, { valued: () => e.value });
473
+ const a = E(null), l = P(e, n, { valued: () => e.value });
406
474
  return je(e, l, a), { ...l, input: a, onChange: (u) => l.emitChange(l.model.value, u) };
407
475
  },
408
476
  expose: ["input"]
409
- }), lt = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], at = ["for"];
410
- function ot(e, n, a, l, u, i) {
411
- return p(), h("div", {
477
+ }), ct = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], ft = ["for"];
478
+ function pt(e, n, a, l, u, i) {
479
+ return m(), v("div", {
412
480
  class: q({
413
481
  "form-field": e.formField,
414
482
  "form-field-card": e.formFieldCard,
@@ -416,7 +484,7 @@ function ot(e, n, a, l, u, i) {
416
484
  disabled: e.isDisabled || e.readonly
417
485
  })
418
486
  }, [
419
- re(m("input", {
487
+ re(h("input", {
420
488
  ref: "input",
421
489
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
422
490
  name: e.name,
@@ -433,15 +501,15 @@ function ot(e, n, a, l, u, i) {
433
501
  onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
434
502
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
435
503
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
436
- }, null, 42, lt), [
504
+ }, null, 42, ct), [
437
505
  [Se, e.model]
438
506
  ]),
439
- m("label", { for: e.inputId }, [
507
+ h("label", { for: e.inputId }, [
440
508
  L(e.$slots, "default")
441
- ], 8, at)
509
+ ], 8, ft)
442
510
  ], 2);
443
511
  }
444
- const rt = /* @__PURE__ */ R(tt, [["render", ot]]), Qe = {}, $e = /* @__PURE__ */ new Map(), tn = {
512
+ const mt = /* @__PURE__ */ R(dt, [["render", pt]]), Je = {}, $e = /* @__PURE__ */ new Map(), an = {
445
513
  Combobox: () => import("bootstrap/js/dist/combobox.js"),
446
514
  Menu: () => import("bootstrap/js/dist/menu.js"),
447
515
  Strength: () => import("bootstrap/js/dist/strength.js"),
@@ -449,31 +517,31 @@ const rt = /* @__PURE__ */ R(tt, [["render", ot]]), Qe = {}, $e = /* @__PURE__ *
449
517
  OtpInput: () => import("bootstrap/js/dist/otp-input.js"),
450
518
  Range: () => import("bootstrap/js/dist/range.js")
451
519
  };
452
- function st(e = {}) {
453
- Object.assign(Qe, e), $e.clear();
520
+ function ht(e = {}) {
521
+ Object.assign(Je, e), $e.clear();
454
522
  }
455
- function it(e) {
456
- return Qe[e] ? Promise.resolve(Qe[e]) : tn[e] ? ($e.has(e) || $e.set(
523
+ function vt(e) {
524
+ return Je[e] ? Promise.resolve(Je[e]) : an[e] ? ($e.has(e) || $e.set(
457
525
  e,
458
- tn[e]().then((n) => n.default ?? n[e]).catch((n) => {
526
+ an[e]().then((n) => n.default ?? n[e]).catch((n) => {
459
527
  throw $e.delete(e), n;
460
528
  })
461
529
  ), $e.get(e)) : Promise.reject(new Error(`[inertia-bootstrap-forms] Unknown Bootstrap plugin "${e}"`));
462
530
  }
463
531
  function he(e, n, a, l = {}) {
464
- const u = $n(null);
532
+ const u = Sn(null);
465
533
  let i = 0, t = !1, d = null;
466
- function g() {
467
- var y;
534
+ function y() {
535
+ var p;
468
536
  i++;
469
- const b = u.value;
470
- if (u.value = null, b) {
537
+ const g = u.value;
538
+ if (u.value = null, g) {
471
539
  try {
472
- (y = l.onDestroy) == null || y.call(l, b, d);
540
+ (p = l.onDestroy) == null || p.call(l, g, d);
473
541
  } catch {
474
542
  }
475
543
  try {
476
- b.dispose();
544
+ g.dispose();
477
545
  } catch {
478
546
  }
479
547
  }
@@ -481,28 +549,28 @@ function he(e, n, a, l = {}) {
481
549
  }
482
550
  async function w() {
483
551
  var o, r, s;
484
- g();
485
- const b = i, y = await it(e);
486
- if (t || b !== i) return null;
552
+ y();
553
+ const g = i, p = await vt(e);
554
+ if (t || g !== i) return null;
487
555
  const $ = n();
488
556
  if (!$) return null;
489
- (r = (o = y.getInstance) == null ? void 0 : o.call(y, $)) == null || r.dispose(), d = $;
490
- const T = new y($, a());
491
- return u.value = T, (s = l.onCreate) == null || s.call(l, T, $), T;
557
+ (r = (o = p.getInstance) == null ? void 0 : o.call(p, $)) == null || r.dispose(), d = $;
558
+ const k = new p($, a());
559
+ return u.value = k, (s = l.onCreate) == null || s.call(l, k, $), k;
492
560
  }
493
561
  return J(() => {
494
- t = !1, w().catch((b) => {
495
- console.error(`[inertia-bootstrap-forms] Could not start Bootstrap ${e}.`, b);
562
+ t = !1, w().catch((g) => {
563
+ console.error(`[inertia-bootstrap-forms] Could not start Bootstrap ${e}.`, g);
496
564
  });
497
- }), cn(() => {
498
- t = !0, g();
499
- }), { instance: u, create: w, destroy: g };
565
+ }), pn(() => {
566
+ t = !0, y();
567
+ }), { instance: u, create: w, destroy: y };
500
568
  }
501
- const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut = F({
569
+ const on = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), gt = F({
502
570
  name: "ChipsInput",
503
571
  emits: ["update:modelValue", "change", "add", "remove", "select", "rejected", "focus", "blur"],
504
572
  props: {
505
- ...P,
573
+ ...z,
506
574
  placeholder: { type: String, default: null },
507
575
  /** Character that splits typed / pasted text into chips. Use null to disable. */
508
576
  separator: { type: String, default: "," },
@@ -518,14 +586,14 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
518
586
  locale: { type: String, default: null }
519
587
  },
520
588
  setup(e, { emit: n, expose: a }) {
521
- const l = U(e, n), { t: u } = Q(() => e.locale), i = E(null), t = E(null);
522
- let d = !1, g = [];
589
+ const l = P(e, n), { t: u } = Q(() => e.locale), i = E(null), t = E(null);
590
+ let d = !1, y = [];
523
591
  const w = (o) => Array.isArray(o) ? o.map(String) : typeof o == "string" && o !== "" ? e.separator ? o.split(e.separator).map((r) => r.trim()).filter(Boolean) : [o] : [];
524
- function b() {
592
+ function g() {
525
593
  const o = $.value;
526
594
  if (!o) return;
527
595
  const r = w(l.model.value);
528
- if (ln(o.getValues(), r)) return;
596
+ if (on(o.getValues(), r)) return;
529
597
  d = !0;
530
598
  try {
531
599
  o.clear(), r.forEach((c) => o.add(c));
@@ -533,9 +601,9 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
533
601
  d = !1;
534
602
  }
535
603
  const s = o.getValues();
536
- !ln(s, r) && Array.isArray(l.model.value) && (l.model.value = s);
604
+ !on(s, r) && Array.isArray(l.model.value) && (l.model.value = s);
537
605
  }
538
- const y = () => e.readonly || l.isDisabled.value, { instance: $, create: T } = he(
606
+ const p = () => e.readonly || l.isDisabled.value, { instance: $, create: k } = he(
539
607
  "Chips",
540
608
  () => i.value,
541
609
  () => {
@@ -543,7 +611,7 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
543
611
  separator: e.separator,
544
612
  allowDuplicates: e.allowDuplicates,
545
613
  maxChips: e.maxChips,
546
- dismissible: e.dismissible && !y(),
614
+ dismissible: e.dismissible && !p(),
547
615
  createOnBlur: e.createOnBlur,
548
616
  placeholder: e.placeholder ?? u("chips.placeholder")
549
617
  };
@@ -551,8 +619,8 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
551
619
  },
552
620
  {
553
621
  onCreate(o, r) {
554
- const s = (c, I) => {
555
- r.addEventListener(c, I), g.push(() => r.removeEventListener(c, I));
622
+ const s = (c, C) => {
623
+ r.addEventListener(c, C), y.push(() => r.removeEventListener(c, C));
556
624
  };
557
625
  s("add.bs.chips", (c) => {
558
626
  if (!d) {
@@ -564,17 +632,17 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
564
632
  }
565
633
  }), s("remove.bs.chips", (c) => !d && n("remove", c.value)), s("select.bs.chips", (c) => n("select", c.selected)), s("change.bs.chips", (c) => {
566
634
  d || (l.model.value = c.values, l.emitChange(c.values, c));
567
- }), b();
635
+ }), g();
568
636
  },
569
637
  onDestroy() {
570
- g.forEach((o) => o()), g = [];
638
+ y.forEach((o) => o()), y = [];
571
639
  }
572
640
  }
573
641
  );
574
- return H(() => l.model.value, b, { deep: !0 }), H(
642
+ return U(() => l.model.value, g, { deep: !0 }), U(
575
643
  () => [e.separator, e.allowDuplicates, e.maxChips, e.dismissible, e.createOnBlur, e.dismissIcon, e.readonly, l.isDisabled.value],
576
644
  async () => {
577
- await G(), T();
645
+ await X(), k();
578
646
  }
579
647
  ), a({
580
648
  add: (o) => {
@@ -593,16 +661,16 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
593
661
  var o;
594
662
  return (o = t.value) == null ? void 0 : o.focus();
595
663
  }
596
- }), { ...l, t: u, el: i, ghost: t, locked: y };
664
+ }), { ...l, t: u, el: i, ghost: t, locked: p };
597
665
  }
598
- }), dt = ["aria-disabled"], ct = ["id", "placeholder", "disabled", "readonly", "aria-invalid"];
599
- function ft(e, n, a, l, u, i) {
600
- return p(), h("div", {
666
+ }), yt = ["aria-disabled"], bt = ["id", "placeholder", "disabled", "readonly", "aria-invalid"];
667
+ function $t(e, n, a, l, u, i) {
668
+ return m(), v("div", {
601
669
  ref: "el",
602
670
  class: "chip-input",
603
671
  "aria-disabled": e.isDisabled || void 0
604
672
  }, [
605
- m("input", {
673
+ h("input", {
606
674
  ref: "ghost",
607
675
  type: "text",
608
676
  class: q(["form-ghost", { "is-invalid": e.isInvalid }]),
@@ -614,16 +682,16 @@ function ft(e, n, a, l, u, i) {
614
682
  autocomplete: "off",
615
683
  onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
616
684
  onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
617
- }, null, 42, ct)
618
- ], 8, dt);
685
+ }, null, 42, bt)
686
+ ], 8, yt);
619
687
  }
620
- const pt = /* @__PURE__ */ R(ut, [["render", ft]]), pe = (e) => e !== null && typeof e == "object", an = (e) => e == null || e === "";
621
- function mt() {
688
+ const wt = /* @__PURE__ */ R(gt, [["render", $t]]), pe = (e) => e !== null && typeof e == "object", rn = (e) => e == null || e === "";
689
+ function St() {
622
690
  if (typeof document > "u") return null;
623
691
  const e = document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/);
624
692
  return e ? decodeURIComponent(e[1]) : null;
625
693
  }
626
- const ht = F({
694
+ const kt = F({
627
695
  name: "ComboboxInput",
628
696
  emits: [
629
697
  "update:modelValue",
@@ -639,7 +707,7 @@ const ht = F({
639
707
  "hidden"
640
708
  ],
641
709
  props: {
642
- ...P,
710
+ ...z,
643
711
  /** Strings, numbers or objects ({ id | value, name | label, description, disabled }). */
644
712
  options: { type: Array, default: () => [] },
645
713
  /** Property that holds the value of an option object (default: id → value → name → label). */
@@ -684,141 +752,141 @@ const ht = F({
684
752
  locale: { type: String, default: null }
685
753
  },
686
754
  setup(e, { emit: n, expose: a, slots: l }) {
687
- const u = U(e, n), { t: i, locale: t } = Q(() => e.locale), d = Re(), g = E(null), w = E(null), b = E(null), y = E(null), $ = E(null), T = E({}), o = ie({ results: null, loading: !1, error: !1 }), r = S(() => {
688
- var v;
689
- return ((v = e.search) == null ? void 0 : v.url) || null;
690
- }), s = S(() => e.searchEnabled || !!r.value), c = (v) => pe(v) ? e.valueKey ? v[e.valueKey] : v.id ?? v.value ?? v.name ?? v.label : v, I = (v) => {
691
- if (!pe(v)) return v;
692
- const k = e.labelKey || e.label;
693
- return (k ? v[k] : v.name ?? v.label ?? v.title ?? v.value) ?? c(v);
694
- }, j = (v) => pe(v) ? v[e.descriptionKey] ?? null : null, A = (v) => String(c(v));
695
- function K(v) {
696
- const k = { ...T.value };
697
- (v || []).forEach((N) => {
698
- k[A(N)] = N;
699
- }), T.value = k;
700
- }
701
- H(() => e.options, (v) => K(v), { immediate: !0, deep: !0 });
755
+ const u = P(e, n), { t: i, locale: t } = Q(() => e.locale), d = Le(), y = E(null), w = E(null), g = E(null), p = E(null), $ = E(null), k = E({}), o = ie({ results: null, loading: !1, error: !1 }), r = S(() => {
756
+ var b;
757
+ return ((b = e.search) == null ? void 0 : b.url) || null;
758
+ }), s = S(() => e.searchEnabled || !!r.value), c = (b) => pe(b) ? e.valueKey ? b[e.valueKey] : b.id ?? b.value ?? b.name ?? b.label : b, C = (b) => {
759
+ if (!pe(b)) return b;
760
+ const I = e.labelKey || e.label;
761
+ return (I ? b[I] : b.name ?? b.label ?? b.title ?? b.value) ?? c(b);
762
+ }, j = (b) => pe(b) ? b[e.descriptionKey] ?? null : null, A = (b) => String(c(b));
763
+ function H(b) {
764
+ const I = { ...k.value };
765
+ (b || []).forEach((N) => {
766
+ I[A(N)] = N;
767
+ }), k.value = I;
768
+ }
769
+ U(() => e.options, (b) => H(b), { immediate: !0, deep: !0 });
702
770
  const ee = S(() => {
703
- const v = u.model.value;
704
- return e.multiple ? Array.isArray(v) ? v : pe(v) ? Object.values(v) : an(v) ? [] : [v] : an(v) ? [] : [v];
705
- }), z = S(() => ee.value.map((v) => pe(v) ? A(v) : String(v))), ke = (v) => {
706
- const k = T.value[v];
707
- return k !== void 0 ? String(I(k)) : v;
708
- }, Ie = S(
709
- () => z.value.map((v) => {
710
- const k = T.value[v];
771
+ const b = u.model.value;
772
+ return e.multiple ? Array.isArray(b) ? b : pe(b) ? Object.values(b) : rn(b) ? [] : [b] : rn(b) ? [] : [b];
773
+ }), K = S(() => ee.value.map((b) => pe(b) ? A(b) : String(b))), Ie = (b) => {
774
+ const I = k.value[b];
775
+ return I !== void 0 ? String(C(I)) : b;
776
+ }, Ce = S(
777
+ () => K.value.map((b) => {
778
+ const I = k.value[b];
711
779
  return {
712
- key: v,
713
- raw: k,
714
- label: k !== void 0 ? String(I(k)) : v,
715
- description: k !== void 0 ? j(k) : null
780
+ key: b,
781
+ raw: I,
782
+ label: I !== void 0 ? String(C(I)) : b,
783
+ description: I !== void 0 ? j(I) : null
716
784
  };
717
785
  })
718
- ), Ce = S(() => e.selectedSeparator ?? (t.value === "fa" ? "، " : ", ")), ve = S(
719
- () => e.multiple && e.showSelected && z.value.length > 1 && (e.maxVisible === null || z.value.length <= e.maxVisible)
720
- ), Te = S(
721
- () => !!l.selection && z.value.length > 0 && (!e.multiple || z.value.length === 1 || ve.value)
722
- ), Me = S(() => {
723
- const v = z.value;
724
- return v.length ? e.multiple && v.length > 1 ? ve.value ? Ie.value.map((k) => k.label).join(Ce.value) : (e.selectedText ?? i("select.selectedCount")).replace("{count}", v.length) : ke(v[0]) : e.placeholder ?? i("select.placeholder");
725
- }), ge = S(() => Te.value ? "" : Me.value), Be = S(() => z.value.length === 0), ye = S(() => {
726
- let v = o.results ?? e.options;
786
+ ), Te = S(() => e.selectedSeparator ?? (t.value === "fa" ? "، " : ", ")), ve = S(
787
+ () => e.multiple && e.showSelected && K.value.length > 1 && (e.maxVisible === null || K.value.length <= e.maxVisible)
788
+ ), Me = S(
789
+ () => !!l.selection && K.value.length > 0 && (!e.multiple || K.value.length === 1 || ve.value)
790
+ ), Be = S(() => {
791
+ const b = K.value;
792
+ return b.length ? e.multiple && b.length > 1 ? ve.value ? Ce.value.map((I) => I.label).join(Te.value) : (e.selectedText ?? i("select.selectedCount")).replace("{count}", b.length) : Ie(b[0]) : e.placeholder ?? i("select.placeholder");
793
+ }), ge = S(() => Me.value ? "" : Be.value), Ee = S(() => K.value.length === 0), ye = S(() => {
794
+ let b = o.results ?? e.options;
727
795
  if (o.results && e.multiple) {
728
- const k = new Set(v.map(A));
729
- v = [...z.value.filter((f) => !k.has(f) && T.value[f] !== void 0).map((f) => T.value[f]), ...v];
796
+ const I = new Set(b.map(A));
797
+ b = [...K.value.filter((f) => !I.has(f) && k.value[f] !== void 0).map((f) => k.value[f]), ...b];
730
798
  }
731
- return v.map((k) => ({
732
- raw: k,
733
- key: A(k),
734
- label: I(k),
735
- description: j(k),
736
- disabled: pe(k) && !!k.disabled
799
+ return b.map((I) => ({
800
+ raw: I,
801
+ key: A(I),
802
+ label: C(I),
803
+ description: j(I),
804
+ disabled: pe(I) && !!I.disabled
737
805
  }));
738
806
  });
739
807
  function Z() {
740
- if (!b.value) return;
741
- const v = new Set(z.value);
742
- b.value.querySelectorAll(".menu-item[data-bs-value]").forEach((k) => {
743
- const N = v.has(k.dataset.bsValue) && k.dataset.bsValue !== "";
744
- k.classList.toggle("selected", N), k.setAttribute("aria-selected", N ? "true" : "false");
808
+ if (!g.value) return;
809
+ const b = new Set(K.value);
810
+ g.value.querySelectorAll(".menu-item[data-bs-value]").forEach((I) => {
811
+ const N = b.has(I.dataset.bsValue) && I.dataset.bsValue !== "";
812
+ I.classList.toggle("selected", N), I.setAttribute("aria-selected", N ? "true" : "false");
745
813
  });
746
814
  }
747
815
  function ue() {
748
- y.value && (y.value.textContent = ge.value, y.value.classList.toggle("combobox-placeholder", Be.value));
816
+ p.value && (p.value.textContent = ge.value, p.value.classList.toggle("combobox-placeholder", Ee.value));
749
817
  }
750
818
  function Pe() {
751
- var v;
752
- (v = w.value) == null || v.classList.toggle("is-invalid", u.isInvalid.value);
819
+ var b;
820
+ (b = w.value) == null || b.classList.toggle("is-invalid", u.isInvalid.value);
753
821
  }
754
822
  function ne() {
755
823
  Z(), ue(), Pe();
756
824
  }
757
- H([() => u.model.value, ye, ge, u.isInvalid], () => G(ne), { flush: "post" });
758
- function te(v) {
759
- const k = T.value[v];
760
- return k !== void 0 ? c(k) : v;
825
+ U([() => u.model.value, ye, ge, u.isInvalid], () => X(ne), { flush: "post" });
826
+ function te(b) {
827
+ const I = k.value[b];
828
+ return I !== void 0 ? c(I) : b;
761
829
  }
762
- function be(v) {
763
- let k, N;
830
+ function be(b) {
831
+ let I, N;
764
832
  if (e.multiple) {
765
- const f = v.value || [];
766
- k = f.map(te), N = f.map((O) => T.value[O]);
767
- } else v.value === "" || v.value === void 0 ? (k = null, N = null) : (k = te(v.value), N = T.value[v.value]);
768
- u.model.value = k, k === null && n("clear"), n("selected", N), u.emitChange(k, v), G(ne), ue();
833
+ const f = b.value || [];
834
+ I = f.map(te), N = f.map((O) => k.value[O]);
835
+ } else b.value === "" || b.value === void 0 ? (I = null, N = null) : (I = te(b.value), N = k.value[b.value]);
836
+ u.model.value = I, I === null && n("clear"), n("selected", N), u.emitChange(I, b), X(ne), ue();
769
837
  }
770
- let de = null, X = null;
838
+ let de = null, G = null;
771
839
  d.add(() => {
772
- clearTimeout(de), X == null || X.abort();
840
+ clearTimeout(de), G == null || G.abort();
773
841
  });
774
842
  function ce() {
775
- var v;
776
- b.value && (b.value.querySelectorAll(".menu-item[data-bs-value]").forEach((k) => {
777
- k.style.display = "";
778
- }), (v = b.value.querySelector(".combobox-no-results")) == null || v.classList.toggle("d-none", ye.value.length > 0));
779
- }
780
- async function Ue(v) {
781
- const k = e.search || {};
782
- if (k.url) {
783
- X == null || X.abort(), X = new AbortController(), o.loading = !0, o.error = !1;
843
+ var b;
844
+ g.value && (g.value.querySelectorAll(".menu-item[data-bs-value]").forEach((I) => {
845
+ I.style.display = "";
846
+ }), (b = g.value.querySelector(".combobox-no-results")) == null || b.classList.toggle("d-none", ye.value.length > 0));
847
+ }
848
+ async function Ke(b) {
849
+ const I = e.search || {};
850
+ if (I.url) {
851
+ G == null || G.abort(), G = new AbortController(), o.loading = !0, o.error = !1;
784
852
  try {
785
- const N = new URL(k.url, window.location.origin);
786
- N.searchParams.set(k.param || "query", v);
853
+ const N = new URL(I.url, window.location.origin);
854
+ N.searchParams.set(I.param || "query", b);
787
855
  const f = {
788
856
  Accept: "application/json",
789
857
  "X-Requested-With": "XMLHttpRequest",
790
- ...k.headers || {}
791
- }, O = mt();
858
+ ...I.headers || {}
859
+ }, O = St();
792
860
  O && !f["X-XSRF-TOKEN"] && (f["X-XSRF-TOKEN"] = O);
793
- const C = await fetch(N, {
794
- method: (k.method || "POST").toUpperCase(),
861
+ const T = await fetch(N, {
862
+ method: (I.method || "POST").toUpperCase(),
795
863
  headers: f,
796
864
  credentials: "same-origin",
797
- signal: X.signal
865
+ signal: G.signal
798
866
  });
799
- if (!C.ok) throw new Error(`HTTP ${C.status}`);
800
- const B = await C.json(), D = Array.isArray(B) ? B : (B == null ? void 0 : B[k.resultsKey || "data"]) ?? (B == null ? void 0 : B.results) ?? [];
801
- K(D), o.results = D, o.loading = !1, n("search-success", D), await G(), ce(), ne();
867
+ if (!T.ok) throw new Error(`HTTP ${T.status}`);
868
+ const B = await T.json(), D = Array.isArray(B) ? B : (B == null ? void 0 : B[I.resultsKey || "data"]) ?? (B == null ? void 0 : B.results) ?? [];
869
+ H(D), o.results = D, o.loading = !1, n("search-success", D), await X(), ce(), ne();
802
870
  } catch (N) {
803
871
  if ((N == null ? void 0 : N.name) === "AbortError") return;
804
- o.loading = !1, o.error = !0, o.results = [], n("search-error", N), await G(), ce();
872
+ o.loading = !1, o.error = !0, o.results = [], n("search-error", N), await X(), ce();
805
873
  }
806
874
  }
807
875
  }
808
- function Ee(v) {
876
+ function Ae(b) {
809
877
  var f, O;
810
- const k = v.target.value;
811
- if (n("search", k), !r.value) return;
878
+ const I = b.target.value;
879
+ if (n("search", I), !r.value) return;
812
880
  clearTimeout(de);
813
881
  const N = ((f = e.search) == null ? void 0 : f.minChars) ?? 0;
814
- if (k.length < N) {
815
- X == null || X.abort(), o.results = null, o.loading = !1;
882
+ if (I.length < N) {
883
+ G == null || G.abort(), o.results = null, o.loading = !1;
816
884
  return;
817
885
  }
818
- o.loading = !0, de = setTimeout(() => Ue(k), ((O = e.search) == null ? void 0 : O.debounce) ?? 400);
886
+ o.loading = !0, de = setTimeout(() => Ke(I), ((O = e.search) == null ? void 0 : O.debounce) ?? 400);
819
887
  }
820
888
  let _ = [];
821
- const { instance: fe, create: Ae } = he(
889
+ const { instance: fe, create: Oe } = he(
822
890
  "Combobox",
823
891
  () => w.value,
824
892
  () => ({
@@ -829,74 +897,74 @@ const ht = F({
829
897
  searchNormalize: e.searchNormalize
830
898
  }),
831
899
  {
832
- onCreate(v, k) {
833
- const N = (f, O, C) => {
834
- f.addEventListener(O, C), _.push(() => f.removeEventListener(O, C));
900
+ onCreate(b, I) {
901
+ const N = (f, O, T) => {
902
+ f.addEventListener(O, T), _.push(() => f.removeEventListener(O, T));
835
903
  };
836
- N(k, "change.bs.combobox", be), N(k, "show.bs.combobox", (f) => n("show", f)), N(k, "shown.bs.combobox", (f) => n("shown", f)), N(k, "hide.bs.combobox", (f) => n("hide", f)), N(k, "hidden.bs.combobox", (f) => {
837
- o.results !== null && (o.results = null, o.error = !1, G(() => {
904
+ N(I, "change.bs.combobox", be), N(I, "show.bs.combobox", (f) => n("show", f)), N(I, "shown.bs.combobox", (f) => n("shown", f)), N(I, "hide.bs.combobox", (f) => n("hide", f)), N(I, "hidden.bs.combobox", (f) => {
905
+ o.results !== null && (o.results = null, o.error = !1, X(() => {
838
906
  ce(), ne();
839
907
  })), n("hidden", f);
840
- }), $.value && (N($.value, "input", Ee), N($.value, "keydown", (f) => f.key === "Enter" && f.preventDefault())), ne();
908
+ }), $.value && (N($.value, "input", Ae), N($.value, "keydown", (f) => f.key === "Enter" && f.preventDefault())), ne();
841
909
  },
842
910
  onDestroy() {
843
- _.forEach((v) => v()), _ = [];
911
+ _.forEach((b) => b()), _ = [];
844
912
  }
845
913
  }
846
914
  );
847
- return H(
915
+ return U(
848
916
  () => [e.multiple, s.value, e.placement, e.searchNormalize],
849
917
  async () => {
850
- await G(), Ae();
918
+ await X(), Oe();
851
919
  }
852
920
  ), a({
853
921
  show: () => {
854
- var v;
855
- return (v = fe.value) == null ? void 0 : v.show();
922
+ var b;
923
+ return (b = fe.value) == null ? void 0 : b.show();
856
924
  },
857
925
  hide: () => {
858
- var v;
859
- return (v = fe.value) == null ? void 0 : v.hide();
926
+ var b;
927
+ return (b = fe.value) == null ? void 0 : b.hide();
860
928
  },
861
929
  toggle: () => {
862
- var v;
863
- return (v = fe.value) == null ? void 0 : v.toggle();
930
+ var b;
931
+ return (b = fe.value) == null ? void 0 : b.toggle();
864
932
  },
865
933
  clear: () => {
866
934
  u.model.value = e.multiple ? [] : null, n("clear"), u.emitChange(u.model.value);
867
935
  },
868
936
  focus: () => {
869
- var v;
870
- return (v = w.value) == null ? void 0 : v.focus();
937
+ var b;
938
+ return (b = w.value) == null ? void 0 : b.focus();
871
939
  }
872
940
  }), {
873
941
  ...u,
874
942
  t: i,
875
- root: g,
943
+ root: y,
876
944
  toggle: w,
877
- menu: b,
878
- valueEl: y,
945
+ menu: g,
946
+ valueEl: p,
879
947
  searchInput: $,
880
948
  remote: o,
881
949
  hasSearch: s,
882
950
  rendered: ye,
883
- displayText: Me,
951
+ displayText: Be,
884
952
  plainText: ge,
885
- selectedItems: Ie,
886
- customSelection: Te,
887
- separator: Ce,
888
- selectedSet: S(() => new Set(z.value)),
889
- showingPlaceholder: Be,
953
+ selectedItems: Ce,
954
+ customSelection: Me,
955
+ separator: Te,
956
+ selectedSet: S(() => new Set(K.value)),
957
+ showingPlaceholder: Ee,
890
958
  sizeClass: S(() => e.size ? `form-control-${e.size}` : null)
891
959
  };
892
960
  }
893
- }), vt = {
961
+ }), It = {
894
962
  ref: "root",
895
963
  class: "combobox"
896
- }, gt = ["id", "disabled", "aria-invalid", "aria-required"], yt = {
964
+ }, Ct = ["id", "disabled", "aria-invalid", "aria-required"], Tt = {
897
965
  key: 0,
898
966
  class: "combobox-selection d-flex align-items-center flex-wrap gap-2 text-start"
899
- }, bt = ["textContent"], $t = {
967
+ }, Mt = ["textContent"], Bt = {
900
968
  key: 1,
901
969
  class: "combobox-caret",
902
970
  width: "16",
@@ -908,30 +976,30 @@ const ht = F({
908
976
  "stroke-linecap": "round",
909
977
  "stroke-linejoin": "round",
910
978
  "aria-hidden": "true"
911
- }, wt = ["aria-multiselectable"], St = {
979
+ }, Et = ["aria-multiselectable"], At = {
912
980
  key: 0,
913
981
  class: "combobox-search"
914
- }, kt = ["placeholder"], It = {
982
+ }, Ot = ["placeholder"], Vt = {
915
983
  key: 1,
916
984
  class: "menu-header",
917
985
  role: "status"
918
- }, Ct = {
986
+ }, Dt = {
919
987
  key: 2,
920
988
  class: "menu-header",
921
989
  role: "alert"
922
- }, Tt = {
990
+ }, Nt = {
923
991
  key: 3,
924
992
  type: "button",
925
993
  class: "menu-item",
926
994
  "data-bs-value": "",
927
995
  role: "option"
928
- }, Mt = { class: "menu-item-content" }, Bt = ["data-bs-value", "disabled"], Et = { class: "menu-item-content" }, At = {
996
+ }, qt = { class: "menu-item-content" }, Ft = ["data-bs-value", "disabled"], Rt = { class: "menu-item-content" }, Lt = {
929
997
  key: 0,
930
998
  class: "menu-item-description"
931
- }, Ot = { class: "combobox-no-results d-none" };
932
- function Vt(e, n, a, l, u, i) {
933
- return p(), h("div", vt, [
934
- m("button", {
999
+ }, jt = { class: "combobox-no-results d-none" };
1000
+ function zt(e, n, a, l, u, i) {
1001
+ return m(), v("div", It, [
1002
+ h("button", {
935
1003
  ref: "toggle",
936
1004
  type: "button",
937
1005
  class: q(["combobox-toggle form-control", e.sizeClass]),
@@ -942,8 +1010,8 @@ function Vt(e, n, a, l, u, i) {
942
1010
  "aria-invalid": e.isInvalid || void 0,
943
1011
  "aria-required": e.required || void 0
944
1012
  }, [
945
- e.customSelection ? (p(), h("span", yt, [
946
- (p(!0), h(W, null, ae(e.selectedItems, (t, d) => L(e.$slots, "selection", {
1013
+ e.customSelection ? (m(), v("span", Tt, [
1014
+ (m(!0), v(W, null, ae(e.selectedItems, (t, d) => L(e.$slots, "selection", {
947
1015
  key: t.key,
948
1016
  option: t.raw,
949
1017
  label: t.label,
@@ -955,37 +1023,37 @@ function Vt(e, n, a, l, u, i) {
955
1023
  x(V(t.label), 1)
956
1024
  ])), 128))
957
1025
  ])) : M("", !0),
958
- m("span", {
1026
+ h("span", {
959
1027
  ref: "valueEl",
960
1028
  class: q(["combobox-value", { "combobox-placeholder": e.showingPlaceholder }]),
961
1029
  textContent: V(e.plainText)
962
- }, null, 10, bt),
963
- e.hideDropdown ? M("", !0) : (p(), h("svg", $t, n[0] || (n[0] = [
964
- m("path", { d: "m3 6 5 5 5-5" }, null, -1)
1030
+ }, null, 10, Mt),
1031
+ e.hideDropdown ? M("", !0) : (m(), v("svg", Bt, n[0] || (n[0] = [
1032
+ h("path", { d: "m3 6 5 5 5-5" }, null, -1)
965
1033
  ])))
966
- ], 10, gt),
967
- m("div", {
1034
+ ], 10, Ct),
1035
+ h("div", {
968
1036
  ref: "menu",
969
1037
  class: "menu",
970
1038
  role: "listbox",
971
1039
  "aria-multiselectable": e.multiple || void 0
972
1040
  }, [
973
- e.hasSearch ? (p(), h("div", St, [
974
- m("input", {
1041
+ e.hasSearch ? (m(), v("div", At, [
1042
+ h("input", {
975
1043
  ref: "searchInput",
976
1044
  type: "search",
977
1045
  class: "form-control combobox-search-input",
978
1046
  autocomplete: "off",
979
1047
  placeholder: e.searchPlaceholder ?? e.t("select.search")
980
- }, null, 8, kt)
1048
+ }, null, 8, Ot)
981
1049
  ])) : M("", !0),
982
- e.remote.loading ? (p(), h("div", It, V(e.loadingText ?? e.t("select.loading")), 1)) : e.remote.error ? (p(), h("div", Ct, V(e.t("select.error")), 1)) : M("", !0),
983
- e.clearable && !e.multiple ? (p(), h("button", Tt, [
984
- m("span", Mt, [
985
- m("span", null, V(e.clearText ?? e.t("select.clear")), 1)
1050
+ e.remote.loading ? (m(), v("div", Vt, V(e.loadingText ?? e.t("select.loading")), 1)) : e.remote.error ? (m(), v("div", Dt, V(e.t("select.error")), 1)) : M("", !0),
1051
+ e.clearable && !e.multiple ? (m(), v("button", Nt, [
1052
+ h("span", qt, [
1053
+ h("span", null, V(e.clearText ?? e.t("select.clear")), 1)
986
1054
  ])
987
1055
  ])) : M("", !0),
988
- (p(!0), h(W, null, ae(e.rendered, (t) => (p(), h("button", {
1056
+ (m(!0), v(W, null, ae(e.rendered, (t) => (m(), v("button", {
989
1057
  key: t.key,
990
1058
  type: "button",
991
1059
  class: "menu-item",
@@ -993,7 +1061,7 @@ function Vt(e, n, a, l, u, i) {
993
1061
  "data-bs-value": t.key,
994
1062
  disabled: t.disabled || void 0
995
1063
  }, [
996
- m("span", Et, [
1064
+ h("span", Rt, [
997
1065
  L(e.$slots, "option", {
998
1066
  option: t.raw,
999
1067
  label: t.label,
@@ -1002,11 +1070,11 @@ function Vt(e, n, a, l, u, i) {
1002
1070
  selected: e.selectedSet.has(t.key),
1003
1071
  disabled: t.disabled
1004
1072
  }, () => [
1005
- m("span", null, V(t.label), 1),
1006
- t.description ? (p(), h("span", At, V(t.description), 1)) : M("", !0)
1073
+ h("span", null, V(t.label), 1),
1074
+ t.description ? (m(), v("span", Lt, V(t.description), 1)) : M("", !0)
1007
1075
  ])
1008
1076
  ]),
1009
- n[1] || (n[1] = m("svg", {
1077
+ n[1] || (n[1] = h("svg", {
1010
1078
  class: "menu-item-check",
1011
1079
  width: "16",
1012
1080
  height: "16",
@@ -1018,30 +1086,30 @@ function Vt(e, n, a, l, u, i) {
1018
1086
  "stroke-linejoin": "round",
1019
1087
  "aria-hidden": "true"
1020
1088
  }, [
1021
- m("path", { d: "m3.5 8.5 3 3 6-7" })
1089
+ h("path", { d: "m3.5 8.5 3 3 6-7" })
1022
1090
  ], -1))
1023
- ], 8, Bt))), 128)),
1024
- m("div", Ot, V(e.noResultsText ?? e.t("select.noResults")), 1)
1025
- ], 8, wt)
1091
+ ], 8, Ft))), 128)),
1092
+ h("div", jt, V(e.noResultsText ?? e.t("select.noResults")), 1)
1093
+ ], 8, Et)
1026
1094
  ], 512);
1027
1095
  }
1028
- const pn = /* @__PURE__ */ R(ht, [["render", Vt]]), Dt = F({
1096
+ const hn = /* @__PURE__ */ R(kt, [["render", zt]]), Pt = F({
1029
1097
  name: "TextInput",
1030
1098
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
1031
1099
  props: {
1032
- ...P,
1100
+ ...z,
1033
1101
  type: { type: String, default: "text" },
1034
1102
  placeholder: { type: String, default: null },
1035
1103
  /** sm | lg */
1036
1104
  size: { type: String, default: null }
1037
1105
  },
1038
1106
  setup(e, { emit: n }) {
1039
- const a = U(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
1107
+ const a = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
1040
1108
  return { ...a, sizeClass: l, emit: n };
1041
1109
  }
1042
- }), Nt = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
1043
- function qt(e, n, a, l, u, i) {
1044
- return re((p(), h("input", {
1110
+ }), Kt = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
1111
+ function Ut(e, n, a, l, u, i) {
1112
+ return re((m(), v("input", {
1045
1113
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
1046
1114
  name: e.name,
1047
1115
  id: e.inputId,
@@ -1056,11 +1124,11 @@ function qt(e, n, a, l, u, i) {
1056
1124
  onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
1057
1125
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
1058
1126
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
1059
- }, null, 42, Nt)), [
1127
+ }, null, 42, Kt)), [
1060
1128
  [Se, e.model]
1061
1129
  ]);
1062
1130
  }
1063
- const ze = /* @__PURE__ */ R(Dt, [["render", qt]]), Ft = F({
1131
+ const ze = /* @__PURE__ */ R(Pt, [["render", Ut]]), Ht = F({
1064
1132
  name: "EmailInput",
1065
1133
  components: { TextInput: ze },
1066
1134
  props: {
@@ -1073,22 +1141,22 @@ const ze = /* @__PURE__ */ R(Dt, [["render", qt]]), Ft = F({
1073
1141
  return { t: n };
1074
1142
  }
1075
1143
  });
1076
- function Rt(e, n, a, l, u, i) {
1144
+ function Xt(e, n, a, l, u, i) {
1077
1145
  const t = oe("TextInput");
1078
- return p(), le(t, {
1146
+ return m(), le(t, {
1079
1147
  type: "email",
1080
1148
  autocomplete: "email",
1081
1149
  name: e.name,
1082
1150
  placeholder: e.placeholder ?? e.t("email.placeholder")
1083
1151
  }, null, 8, ["name", "placeholder"]);
1084
1152
  }
1085
- const Lt = /* @__PURE__ */ R(Ft, [["render", Rt]]);
1086
- let jt = 0;
1087
- const zt = F({
1153
+ const Gt = /* @__PURE__ */ R(Ht, [["render", Xt]]);
1154
+ let Wt = 0;
1155
+ const Qt = F({
1088
1156
  name: "FileInput",
1089
1157
  emits: ["update:modelValue", "change", "added", "progress", "uploaded", "error", "removed"],
1090
1158
  props: {
1091
- ...P,
1159
+ ...z,
1092
1160
  multiple: { type: Boolean, default: !1 },
1093
1161
  endpoint: { type: String, default: "/upload" },
1094
1162
  accept: { type: String, default: null },
@@ -1098,63 +1166,63 @@ const zt = F({
1098
1166
  locale: { type: String, default: null }
1099
1167
  },
1100
1168
  setup(e, { emit: n, expose: a }) {
1101
- const l = U(e, n), { t: u } = Q(() => e.locale), i = Re(), t = E(null), d = E([]), g = /* @__PURE__ */ new Map();
1169
+ const l = P(e, n), { t: u } = Q(() => e.locale), i = Le(), t = E(null), d = E([]), y = /* @__PURE__ */ new Map();
1102
1170
  i.add(() => {
1103
- g.forEach((s) => s.abort()), g.clear(), l.form.value && (l.form.value.uploading = null);
1171
+ y.forEach((s) => s.abort()), y.clear(), l.form.value && (l.form.value.uploading = null);
1104
1172
  });
1105
1173
  const w = () => d.value.filter((s) => s.path).map((s) => s.path);
1106
- function b(s) {
1174
+ function g(s) {
1107
1175
  const c = e.multiple ? w() : w()[0] ?? null;
1108
1176
  l.model.value = c, l.emitChange(c, s);
1109
1177
  }
1110
- function y() {
1178
+ function p() {
1111
1179
  const s = l.form.value;
1112
1180
  if (!s) return;
1113
- const c = d.value.filter((I) => I.uploading);
1114
- s.uploading = c.length ? Math.min(99, Math.round(c.reduce((I, j) => I + j.percent, 0) / c.length)) : null;
1181
+ const c = d.value.filter((C) => C.uploading);
1182
+ s.uploading = c.length ? Math.min(99, Math.round(c.reduce((C, j) => C + j.percent, 0) / c.length)) : null;
1115
1183
  }
1116
1184
  function $(s) {
1117
- s.error = "", s.percent = 0, s.uploading = !0, y();
1185
+ s.error = "", s.percent = 0, s.uploading = !0, p();
1118
1186
  const c = new FormData();
1119
1187
  c.append(e.fieldName, s.file);
1120
- const I = new XMLHttpRequest();
1121
- g.set(s.id, I), I.open("POST", e.endpoint), Object.entries(Ne(e.headers)).forEach(([A, K]) => I.setRequestHeader(A, K)), I.upload.onprogress = (A) => {
1122
- A.lengthComputable && (s.percent = Math.round(A.loaded / A.total * 100), n("progress", s, s.percent), y());
1188
+ const C = new XMLHttpRequest();
1189
+ y.set(s.id, C), C.open("POST", e.endpoint), Object.entries(qe(e.headers)).forEach(([A, H]) => C.setRequestHeader(A, H)), C.upload.onprogress = (A) => {
1190
+ A.lengthComputable && (s.percent = Math.round(A.loaded / A.total * 100), n("progress", s, s.percent), p());
1123
1191
  };
1124
1192
  const j = (A) => {
1125
- s.uploading = !1, s.error = A || u("upload.failed"), g.delete(s.id), y(), n("error", s, s.error);
1193
+ s.uploading = !1, s.error = A || u("upload.failed"), y.delete(s.id), p(), n("error", s, s.error);
1126
1194
  };
1127
- I.onerror = () => j(), I.onload = () => {
1195
+ C.onerror = () => j(), C.onload = () => {
1128
1196
  var ee;
1129
1197
  let A = null;
1130
1198
  try {
1131
- A = JSON.parse(I.responseText);
1199
+ A = JSON.parse(C.responseText);
1132
1200
  } catch {
1133
1201
  }
1134
- if (I.status < 200 || I.status >= 300) {
1135
- const z = A != null && A.errors ? Object.values(A.errors)[0] : null;
1136
- return j((A == null ? void 0 : A.message) || (Array.isArray(z) ? z[0] : z));
1202
+ if (C.status < 200 || C.status >= 300) {
1203
+ const K = A != null && A.errors ? Object.values(A.errors)[0] : null;
1204
+ return j((A == null ? void 0 : A.message) || (Array.isArray(K) ? K[0] : K));
1137
1205
  }
1138
- const K = ((ee = A == null ? void 0 : A.data) == null ? void 0 : ee.path) ?? (A == null ? void 0 : A.path);
1139
- if (!K) return j();
1140
- s.path = K, s.percent = 100, s.uploading = !1, g.delete(s.id), y(), b(), n("uploaded", s);
1141
- }, I.send(c);
1206
+ const H = ((ee = A == null ? void 0 : A.data) == null ? void 0 : ee.path) ?? (A == null ? void 0 : A.path);
1207
+ if (!H) return j();
1208
+ s.path = H, s.percent = 100, s.uploading = !1, y.delete(s.id), p(), g(), n("uploaded", s);
1209
+ }, C.send(c);
1142
1210
  }
1143
- function T(s) {
1144
- const c = ie({ id: `f${++jt}`, file: s, percent: 0, error: "", path: null, uploading: !1 });
1211
+ function k(s) {
1212
+ const c = ie({ id: `f${++Wt}`, file: s, percent: 0, error: "", path: null, uploading: !1 });
1145
1213
  d.value = e.multiple ? [...d.value, c] : [c], n("added", c), $(c);
1146
1214
  }
1147
1215
  function o(s) {
1148
- Array.from(s.target.files).forEach(T), s.target.value = "";
1216
+ Array.from(s.target.files).forEach(k), s.target.value = "";
1149
1217
  }
1150
1218
  async function r(s) {
1151
1219
  var c;
1152
- if ((c = g.get(s.id)) == null || c.abort(), g.delete(s.id), d.value = d.value.filter((I) => I.id !== s.id), y(), s.path) {
1153
- b();
1220
+ if ((c = y.get(s.id)) == null || c.abort(), y.delete(s.id), d.value = d.value.filter((C) => C.id !== s.id), p(), s.path) {
1221
+ g();
1154
1222
  try {
1155
1223
  await fetch(e.endpoint, {
1156
1224
  method: "DELETE",
1157
- headers: Ne(e.headers),
1225
+ headers: qe(e.headers),
1158
1226
  credentials: "same-origin",
1159
1227
  body: s.path
1160
1228
  });
@@ -1163,27 +1231,27 @@ const zt = F({
1163
1231
  }
1164
1232
  n("removed", s);
1165
1233
  }
1166
- return H(
1234
+ return U(
1167
1235
  () => l.model.value,
1168
1236
  (s) => {
1169
- (s == null || s === "" || Array.isArray(s) && !s.length) && d.value.some((I) => I.path) && (d.value = d.value.filter((I) => !I.path));
1237
+ (s == null || s === "" || Array.isArray(s) && !s.length) && d.value.some((C) => C.path) && (d.value = d.value.filter((C) => !C.path));
1170
1238
  }
1171
1239
  ), a({ clear: () => d.value.slice().forEach(r) }), { ...l, t: u, input: t, files: d, onSelect: o, remove: r, retry: $, size: (s) => `${Math.round(s / 1024)}KB` };
1172
1240
  }
1173
- }), Pt = { class: "file-input-uploader" }, Ut = ["name", "id", "multiple", "accept", "required", "disabled", "aria-invalid"], Ht = {
1241
+ }), Jt = { class: "file-input-uploader" }, Zt = ["name", "id", "multiple", "accept", "required", "disabled", "aria-invalid"], Yt = {
1174
1242
  key: 0,
1175
1243
  class: "list-group mt-2"
1176
- }, Kt = { class: "d-flex align-items-center justify-content-between gap-2" }, Xt = { class: "text-truncate" }, Gt = { class: "d-flex align-items-center gap-2" }, Wt = {
1244
+ }, xt = { class: "d-flex align-items-center justify-content-between gap-2" }, _t = { class: "text-truncate" }, el = { class: "d-flex align-items-center gap-2" }, nl = {
1177
1245
  class: "fg-secondary fanum",
1178
1246
  dir: "ltr"
1179
- }, Qt = ["aria-label", "onClick"], Jt = ["aria-label", "onClick"], Zt = ["aria-valuenow"], Yt = {
1247
+ }, tl = ["aria-label", "onClick"], ll = ["aria-label", "onClick"], al = ["aria-valuenow"], ol = {
1180
1248
  key: 1,
1181
1249
  class: "fg-danger mt-1",
1182
1250
  role: "alert"
1183
1251
  };
1184
- function xt(e, n, a, l, u, i) {
1185
- return p(), h("div", Pt, [
1186
- m("input", {
1252
+ function rl(e, n, a, l, u, i) {
1253
+ return m(), v("div", Jt, [
1254
+ h("input", {
1187
1255
  ref: "input",
1188
1256
  type: "file",
1189
1257
  class: q(["form-control", { "is-invalid": e.isInvalid }]),
@@ -1195,24 +1263,24 @@ function xt(e, n, a, l, u, i) {
1195
1263
  disabled: e.isDisabled || e.readonly,
1196
1264
  "aria-invalid": e.isInvalid || void 0,
1197
1265
  onChange: n[0] || (n[0] = (...t) => e.onSelect && e.onSelect(...t))
1198
- }, null, 42, Ut),
1199
- e.files.length ? (p(), h("ul", Ht, [
1200
- (p(!0), h(W, null, ae(e.files, (t) => (p(), h("li", {
1266
+ }, null, 42, Zt),
1267
+ e.files.length ? (m(), v("ul", Yt, [
1268
+ (m(!0), v(W, null, ae(e.files, (t) => (m(), v("li", {
1201
1269
  key: t.id,
1202
1270
  class: "list-group-item"
1203
1271
  }, [
1204
- m("div", Kt, [
1205
- m("span", Xt, V(t.file.name), 1),
1206
- m("span", Gt, [
1207
- m("span", Wt, V(e.size(t.file.size)), 1),
1208
- t.error ? (p(), h("button", {
1272
+ h("div", xt, [
1273
+ h("span", _t, V(t.file.name), 1),
1274
+ h("span", el, [
1275
+ h("span", nl, V(e.size(t.file.size)), 1),
1276
+ t.error ? (m(), v("button", {
1209
1277
  key: 0,
1210
1278
  type: "button",
1211
1279
  class: "btn-text theme-secondary btn-icon",
1212
1280
  "aria-label": e.t("file.retry"),
1213
1281
  onClick: (d) => e.retry(t)
1214
1282
  }, n[1] || (n[1] = [
1215
- m("svg", {
1283
+ h("svg", {
1216
1284
  width: "16",
1217
1285
  height: "16",
1218
1286
  viewBox: "0 0 16 16",
@@ -1223,18 +1291,18 @@ function xt(e, n, a, l, u, i) {
1223
1291
  "stroke-linejoin": "round",
1224
1292
  "aria-hidden": "true"
1225
1293
  }, [
1226
- m("path", { d: "M13.5 3v3.5H10" }),
1227
- m("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
1294
+ h("path", { d: "M13.5 3v3.5H10" }),
1295
+ h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
1228
1296
  ], -1)
1229
- ]), 8, Qt)) : M("", !0),
1230
- t.path || t.error ? (p(), h("button", {
1297
+ ]), 8, tl)) : M("", !0),
1298
+ t.path || t.error ? (m(), v("button", {
1231
1299
  key: 1,
1232
1300
  type: "button",
1233
1301
  class: "btn-text theme-danger btn-icon",
1234
1302
  "aria-label": e.t("file.remove"),
1235
1303
  onClick: (d) => e.remove(t)
1236
1304
  }, n[2] || (n[2] = [
1237
- m("svg", {
1305
+ h("svg", {
1238
1306
  width: "16",
1239
1307
  height: "16",
1240
1308
  viewBox: "0 0 16 16",
@@ -1244,12 +1312,12 @@ function xt(e, n, a, l, u, i) {
1244
1312
  "stroke-linecap": "round",
1245
1313
  "aria-hidden": "true"
1246
1314
  }, [
1247
- m("path", { d: "m4 4 8 8M12 4l-8 8" })
1315
+ h("path", { d: "m4 4 8 8M12 4l-8 8" })
1248
1316
  ], -1)
1249
- ]), 8, Jt)) : M("", !0)
1317
+ ]), 8, ll)) : M("", !0)
1250
1318
  ])
1251
1319
  ]),
1252
- t.uploading ? (p(), h("div", {
1320
+ t.uploading ? (m(), v("div", {
1253
1321
  key: 0,
1254
1322
  class: "progress mt-2",
1255
1323
  role: "progressbar",
@@ -1257,22 +1325,22 @@ function xt(e, n, a, l, u, i) {
1257
1325
  "aria-valuemin": "0",
1258
1326
  "aria-valuemax": "100"
1259
1327
  }, [
1260
- m("div", {
1328
+ h("div", {
1261
1329
  class: "progress-bar",
1262
1330
  style: se({ width: t.percent + "%" })
1263
1331
  }, null, 4)
1264
- ], 8, Zt)) : M("", !0),
1265
- t.error ? (p(), h("div", Yt, V(t.error), 1)) : M("", !0)
1332
+ ], 8, al)) : M("", !0),
1333
+ t.error ? (m(), v("div", ol, V(t.error), 1)) : M("", !0)
1266
1334
  ]))), 128))
1267
1335
  ])) : M("", !0)
1268
1336
  ]);
1269
1337
  }
1270
- const mn = /* @__PURE__ */ R(zt, [["render", xt]]), _t = F({
1338
+ const vn = /* @__PURE__ */ R(Qt, [["render", rl]]), sl = F({
1271
1339
  name: "FormAdornInput",
1272
1340
  inheritAttrs: !1,
1273
1341
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
1274
1342
  props: {
1275
- ...P,
1343
+ ...z,
1276
1344
  type: { type: String, default: "text" },
1277
1345
  placeholder: { type: String, default: null },
1278
1346
  /** Text shown before the input. */
@@ -1282,10 +1350,10 @@ const mn = /* @__PURE__ */ R(zt, [["render", xt]]), _t = F({
1282
1350
  size: { type: String, default: null }
1283
1351
  },
1284
1352
  setup(e, { emit: n }) {
1285
- const a = U(e, n), l = E(null), u = S(() => e.size ? `form-control-${e.size}` : null);
1353
+ const a = P(e, n), l = E(null), u = S(() => e.size ? `form-control-${e.size}` : null);
1286
1354
  function i(t) {
1287
- var d, g, w;
1288
- (t.target === t.currentTarget || (g = (d = t.target).closest) != null && g.call(d, ".form-adorn-icon, .form-adorn-text")) && ((w = l.value) == null || w.focus());
1355
+ var d, y, w;
1356
+ (t.target === t.currentTarget || (y = (d = t.target).closest) != null && y.call(d, ".form-adorn-icon, .form-adorn-text")) && ((w = l.value) == null || w.focus());
1289
1357
  }
1290
1358
  return { ...a, input: l, sizeClass: u, focusInput: i, emit: n, focus: () => {
1291
1359
  var t;
@@ -1293,23 +1361,23 @@ const mn = /* @__PURE__ */ R(zt, [["render", xt]]), _t = F({
1293
1361
  } };
1294
1362
  },
1295
1363
  expose: ["focus"]
1296
- }), el = {
1364
+ }), il = {
1297
1365
  key: 0,
1298
1366
  class: "form-adorn-text"
1299
- }, nl = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"], tl = {
1367
+ }, ul = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"], dl = {
1300
1368
  key: 0,
1301
1369
  class: "form-adorn-text"
1302
1370
  };
1303
- function ll(e, n, a, l, u, i) {
1304
- return p(), h("div", {
1371
+ function cl(e, n, a, l, u, i) {
1372
+ return m(), v("div", {
1305
1373
  class: q(["form-control form-adorn", [e.sizeClass, { "is-invalid": e.isInvalid }, e.$attrs.class]]),
1306
1374
  style: se(e.$attrs.style),
1307
1375
  onClick: n[5] || (n[5] = (...t) => e.focusInput && e.focusInput(...t))
1308
1376
  }, [
1309
1377
  L(e.$slots, "start", {}, () => [
1310
- e.startText ? (p(), h("span", el, V(e.startText), 1)) : M("", !0)
1378
+ e.startText ? (m(), v("span", il, V(e.startText), 1)) : M("", !0)
1311
1379
  ]),
1312
- re(m("input", We({
1380
+ re(h("input", Qe({
1313
1381
  ref: "input",
1314
1382
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t)
1315
1383
  }, { ...e.$attrs, class: void 0, style: void 0 }, {
@@ -1326,26 +1394,26 @@ function ll(e, n, a, l, u, i) {
1326
1394
  onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
1327
1395
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
1328
1396
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
1329
- }), null, 16, nl), [
1397
+ }), null, 16, ul), [
1330
1398
  [Se, e.model]
1331
1399
  ]),
1332
1400
  L(e.$slots, "end", {}, () => [
1333
- e.endText ? (p(), h("span", tl, V(e.endText), 1)) : M("", !0)
1401
+ e.endText ? (m(), v("span", dl, V(e.endText), 1)) : M("", !0)
1334
1402
  ])
1335
1403
  ], 6);
1336
1404
  }
1337
- const xe = /* @__PURE__ */ R(_t, [["render", ll]]), al = (e) => e !== null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1338
- function Je(e) {
1339
- return typeof e == "string" ? Le(e) : Array.isArray(e) ? e.map(Je) : al(e) ? Object.keys(e).reduce((n, a) => (n[a] = Je(e[a]), n), {}) : e;
1405
+ const _e = /* @__PURE__ */ R(sl, [["render", cl]]), fl = (e) => e !== null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1406
+ function Ze(e) {
1407
+ return typeof e == "string" ? ke(e) : Array.isArray(e) ? e.map(Ze) : fl(e) ? Object.keys(e).reduce((n, a) => (n[a] = Ze(e[a]), n), {}) : e;
1340
1408
  }
1341
- function on(e, n) {
1409
+ function sn(e, n) {
1342
1410
  try {
1343
1411
  return JSON.stringify(e) === JSON.stringify(n);
1344
1412
  } catch {
1345
1413
  return !1;
1346
1414
  }
1347
1415
  }
1348
- const ol = F({
1416
+ const pl = F({
1349
1417
  name: "FormContainer",
1350
1418
  emits: [
1351
1419
  "update:modelValue",
@@ -1390,7 +1458,7 @@ const ol = F({
1390
1458
  hideAlerts: { type: Boolean, default: !1 }
1391
1459
  },
1392
1460
  setup(e, { emit: n, expose: a }) {
1393
- const l = E(null), u = ie({ hasMessage: !1, successMessage: null }), i = Cn({
1461
+ const l = E(null), u = ie({ hasMessage: !1, successMessage: null }), i = Mn({
1394
1462
  ...e.options,
1395
1463
  ...e.modelValue
1396
1464
  });
@@ -1399,7 +1467,7 @@ const ol = F({
1399
1467
  const r = [];
1400
1468
  return (s = l.value) != null && s.id && r.push(l.value.id), typeof o == "string" && r.push(o), o.group && (o.group.name && r.push(o.group.name), o.group.index !== void 0 && o.group.index !== null && r.push(o.group.index)), o.name && r.push(o.name), o.value !== void 0 && o.value !== null && o.value !== "" && r.push(o.value), r.join("-");
1401
1469
  };
1402
- const t = new Set(Object.keys(i)), d = () => Object.keys(i).filter((o) => !t.has(o) && typeof i[o] != "function" && i[o] !== void 0), g = () => {
1470
+ const t = new Set(Object.keys(i)), d = () => Object.keys(i).filter((o) => !t.has(o) && typeof i[o] != "function" && i[o] !== void 0), y = () => {
1403
1471
  const o = typeof i.data == "function" ? { ...i.data() } : Object.keys(i).reduce((r, s) => (t.has(s) && typeof i[s] != "function" && (r[s] = i[s]), r), {});
1404
1472
  return d().forEach((r) => {
1405
1473
  o[r] = i[r];
@@ -1407,43 +1475,43 @@ const ol = F({
1407
1475
  }, w = () => {
1408
1476
  d().forEach((o) => delete i[o]), i.reset();
1409
1477
  };
1410
- H(
1411
- () => g(),
1478
+ U(
1479
+ () => y(),
1412
1480
  (o) => {
1413
1481
  n("change", o), n("update:modelValue", o);
1414
1482
  },
1415
1483
  { deep: !0 }
1416
- ), H(
1484
+ ), U(
1417
1485
  () => e.modelValue,
1418
1486
  (o) => {
1419
- !o || on(o, g()) || Object.keys(o).forEach((r) => {
1420
- on(i[r], o[r]) || (i[r] = o[r]);
1487
+ !o || sn(o, y()) || Object.keys(o).forEach((r) => {
1488
+ sn(i[r], o[r]) || (i[r] = o[r]);
1421
1489
  });
1422
1490
  },
1423
1491
  { deep: !0 }
1424
1492
  );
1425
- function b(o) {
1493
+ function g(o) {
1426
1494
  const r = Array.from(l.value.querySelectorAll("input, select, textarea")).filter(
1427
1495
  (c) => !c.disabled && c.tabIndex !== -1 && c.type !== "hidden" && c.offsetParent !== null
1428
1496
  ), s = r[r.indexOf(o) + 1];
1429
1497
  s && (s.focus(), s.tagName !== "SELECT" && typeof s.select == "function" && s.select());
1430
1498
  }
1431
- function y(o) {
1499
+ function p(o) {
1432
1500
  const r = o.target;
1433
1501
  if (!["INPUT", "TEXTAREA"].includes(r.tagName)) return;
1434
- e.autoTab && r.maxLength > 0 && r.value.length >= r.maxLength && b(r);
1502
+ e.autoTab && r.maxLength > 0 && r.value.length >= r.maxLength && g(r);
1435
1503
  const s = parseInt(r.dataset.autoSubmitLength, 10);
1436
- !isNaN(s) && r.value.length >= s && T();
1504
+ !isNaN(s) && r.value.length >= s && k();
1437
1505
  }
1438
1506
  function $() {
1439
1507
  w(), i.clearErrors(), u.hasMessage = !1, u.successMessage = null, n("reset");
1440
1508
  }
1441
- async function T(o) {
1509
+ async function k(o) {
1442
1510
  if (e.submitHandler)
1443
1511
  return e.submitHandler(o, i);
1444
1512
  n("submit", o), i.transform((r) => {
1445
- const s = { ...e.modelValue, ...r, ...g() };
1446
- return e.normalizeDigits ? Je(s) : s;
1513
+ const s = { ...e.modelValue, ...r, ...y() };
1514
+ return e.normalizeDigits ? Ze(s) : s;
1447
1515
  }).submit((e.method || "post").toString().toLowerCase(), e.url, {
1448
1516
  only: e.only,
1449
1517
  ...e.visitOptions,
@@ -1472,24 +1540,24 @@ const ol = F({
1472
1540
  n("error", r), n("onError", r), (c = (s = e.visitOptions).onError) == null || c.call(s, r);
1473
1541
  },
1474
1542
  onSuccess: (r) => {
1475
- var s, c, I;
1476
- e.resetOnSuccess && w(), (s = r == null ? void 0 : r.props) != null && s.message && (u.hasMessage = !0, u.successMessage = r.props.message), n("success", r), n("onSuccess", r), (I = (c = e.visitOptions).onSuccess) == null || I.call(c, r);
1543
+ var s, c, C;
1544
+ e.resetOnSuccess && w(), (s = r == null ? void 0 : r.props) != null && s.message && (u.hasMessage = !0, u.successMessage = r.props.message), n("success", r), n("onSuccess", r), (C = (c = e.visitOptions).onSuccess) == null || C.call(c, r);
1477
1545
  }
1478
1546
  });
1479
1547
  }
1480
- return Ve("form", S(() => i)), Ve("formApi", { submit: T, reset: $, el: l }), a({ submit: T, reset: $, form: i, el: l }), { form: i, formEl: l, ui: u, handleInput: y, reset: $, submit: T };
1548
+ return De("form", S(() => i)), De("formApi", { submit: k, reset: $, el: l }), a({ submit: k, reset: $, form: i, el: l }), { form: i, formEl: l, ui: u, handleInput: p, reset: $, submit: k };
1481
1549
  }
1482
- }), rl = ["action", "method", "data-bs-validate", "novalidate"], sl = {
1550
+ }), ml = ["action", "method", "data-bs-validate", "novalidate"], hl = {
1483
1551
  key: 0,
1484
1552
  class: "alert theme-danger",
1485
1553
  role: "alert"
1486
- }, il = { class: "list-unstyled p-0 m-0 fanum" }, ul = ["innerHTML"], dl = {
1554
+ }, vl = { class: "list-unstyled p-0 m-0 fanum" }, gl = ["innerHTML"], yl = {
1487
1555
  key: 0,
1488
1556
  class: "alert theme-success",
1489
1557
  role: "status"
1490
- }, cl = ["innerHTML"], fl = { key: 1 };
1491
- function pl(e, n, a, l, u, i) {
1492
- return p(), h("form", {
1558
+ }, bl = ["innerHTML"], $l = { key: 1 };
1559
+ function wl(e, n, a, l, u, i) {
1560
+ return m(), v("form", {
1493
1561
  ref: "formEl",
1494
1562
  action: e.url || void 0,
1495
1563
  method: e.method,
@@ -1497,21 +1565,21 @@ function pl(e, n, a, l, u, i) {
1497
1565
  novalidate: !e.validate || e.form.hasErrors ? !0 : void 0,
1498
1566
  class: q({ "form-processing": e.form.processing }),
1499
1567
  onInput: n[0] || (n[0] = (...t) => e.handleInput && e.handleInput(...t)),
1500
- onSubmit: n[1] || (n[1] = nn((...t) => e.submit && e.submit(...t), ["prevent"])),
1501
- onReset: n[2] || (n[2] = nn((...t) => e.reset && e.reset(...t), ["prevent"]))
1568
+ onSubmit: n[1] || (n[1] = tn((...t) => e.submit && e.submit(...t), ["prevent"])),
1569
+ onReset: n[2] || (n[2] = tn((...t) => e.reset && e.reset(...t), ["prevent"]))
1502
1570
  }, [
1503
- e.hideAlerts ? M("", !0) : (p(), h(W, { key: 0 }, [
1571
+ e.hideAlerts ? M("", !0) : (m(), v(W, { key: 0 }, [
1504
1572
  L(e.$slots, "errors", {
1505
1573
  errors: e.form.errors,
1506
1574
  form: e.form
1507
1575
  }, () => [
1508
- e.form.hasErrors ? (p(), h("div", sl, [
1509
- m("ul", il, [
1510
- (p(!0), h(W, null, ae(e.form.errors, (t, d) => (p(), h("li", { key: d }, [
1511
- e.htmlMessages ? (p(), h("span", {
1576
+ e.form.hasErrors ? (m(), v("div", hl, [
1577
+ h("ul", vl, [
1578
+ (m(!0), v(W, null, ae(e.form.errors, (t, d) => (m(), v("li", { key: d }, [
1579
+ e.htmlMessages ? (m(), v("span", {
1512
1580
  key: 0,
1513
1581
  innerHTML: t
1514
- }, null, 8, ul)) : (p(), h(W, { key: 1 }, [
1582
+ }, null, 8, gl)) : (m(), v(W, { key: 1 }, [
1515
1583
  x(V(t), 1)
1516
1584
  ], 64))
1517
1585
  ]))), 128))
@@ -1521,11 +1589,11 @@ function pl(e, n, a, l, u, i) {
1521
1589
  L(e.$slots, "message", {
1522
1590
  message: e.ui.successMessage
1523
1591
  }, () => [
1524
- e.ui.hasMessage && e.ui.successMessage ? (p(), h("div", dl, [
1525
- e.htmlMessages ? (p(), h("span", {
1592
+ e.ui.hasMessage && e.ui.successMessage ? (m(), v("div", yl, [
1593
+ e.htmlMessages ? (m(), v("span", {
1526
1594
  key: 0,
1527
1595
  innerHTML: e.ui.successMessage
1528
- }, null, 8, cl)) : (p(), h("span", fl, V(e.ui.successMessage), 1))
1596
+ }, null, 8, bl)) : (m(), v("span", $l, V(e.ui.successMessage), 1))
1529
1597
  ])) : M("", !0)
1530
1598
  ])
1531
1599
  ], 64)),
@@ -1534,9 +1602,9 @@ function pl(e, n, a, l, u, i) {
1534
1602
  submit: e.submit,
1535
1603
  reset: e.reset
1536
1604
  })
1537
- ], 42, rl);
1605
+ ], 42, ml);
1538
1606
  }
1539
- const ml = /* @__PURE__ */ R(ol, [["render", pl]]), hl = F({
1607
+ const Sl = /* @__PURE__ */ R(pl, [["render", wl]]), kl = F({
1540
1608
  name: "FormLabel",
1541
1609
  props: {
1542
1610
  /** id of the control. Detected automatically inside <FormField> or from the next element. */
@@ -1554,26 +1622,26 @@ const ml = /* @__PURE__ */ R(ol, [["render", pl]]), hl = F({
1554
1622
  const u = S(() => e.for || (n == null ? void 0 : n.id) || l.value || void 0);
1555
1623
  return { el: a, target: u };
1556
1624
  }
1557
- }), vl = ["for"], gl = {
1625
+ }), Il = ["for"], Cl = {
1558
1626
  key: 0,
1559
1627
  class: "fg-danger",
1560
1628
  "aria-hidden": "true"
1561
1629
  };
1562
- function yl(e, n, a, l, u, i) {
1563
- return p(), h("label", {
1630
+ function Tl(e, n, a, l, u, i) {
1631
+ return m(), v("label", {
1564
1632
  ref: "el",
1565
1633
  class: "form-label",
1566
1634
  for: e.target
1567
1635
  }, [
1568
1636
  L(e.$slots, "default"),
1569
- e.required ? (p(), h("span", gl, " *")) : M("", !0)
1570
- ], 8, vl);
1637
+ e.required ? (m(), v("span", Cl, " *")) : M("", !0)
1638
+ ], 8, Il);
1571
1639
  }
1572
- const hn = /* @__PURE__ */ R(hl, [["render", yl]]);
1573
- let bl = 0;
1574
- const $l = F({
1640
+ const gn = /* @__PURE__ */ R(kl, [["render", Tl]]);
1641
+ let Ml = 0;
1642
+ const Bl = F({
1575
1643
  name: "FormField",
1576
- components: { FormLabel: hn },
1644
+ components: { FormLabel: gn },
1577
1645
  props: {
1578
1646
  /** Field key. Used to read the server-side error of the field. */
1579
1647
  name: { type: String, default: null },
@@ -1585,8 +1653,8 @@ const $l = F({
1585
1653
  id: { type: String, default: null }
1586
1654
  },
1587
1655
  setup(e) {
1588
- const n = me("form", null), a = en.useId ? en.useId() : `ff-${++bl}`, l = S(() => e.id || (e.name ? `${e.name}-${a}` : a));
1589
- Ve("formField", {
1656
+ const n = me("form", null), a = nn.useId ? nn.useId() : `ff-${++Ml}`, l = S(() => e.id || (e.name ? `${e.name}-${a}` : a));
1657
+ De("formField", {
1590
1658
  get id() {
1591
1659
  return l.value;
1592
1660
  },
@@ -1600,17 +1668,17 @@ const $l = F({
1600
1668
  });
1601
1669
  return { fieldId: l, errorText: u };
1602
1670
  }
1603
- }), wl = { class: "form-field" }, Sl = ["id"], kl = ["id"];
1604
- function Il(e, n, a, l, u, i) {
1671
+ }), El = { class: "form-field" }, Al = ["id"], Ol = ["id"];
1672
+ function Vl(e, n, a, l, u, i) {
1605
1673
  const t = oe("FormLabel");
1606
- return p(), h("div", wl, [
1674
+ return m(), v("div", El, [
1607
1675
  L(e.$slots, "label", {}, () => [
1608
- e.label ? (p(), le(t, {
1676
+ e.label ? (m(), le(t, {
1609
1677
  key: 0,
1610
1678
  for: e.fieldId,
1611
1679
  required: e.required
1612
1680
  }, {
1613
- default: Ye(() => [
1681
+ default: xe(() => [
1614
1682
  x(V(e.label), 1)
1615
1683
  ]),
1616
1684
  _: 1
@@ -1618,23 +1686,23 @@ function Il(e, n, a, l, u, i) {
1618
1686
  ]),
1619
1687
  L(e.$slots, "default"),
1620
1688
  L(e.$slots, "help", {}, () => [
1621
- e.help ? (p(), h("div", {
1689
+ e.help ? (m(), v("div", {
1622
1690
  key: 0,
1623
1691
  id: e.fieldId + "-help",
1624
1692
  class: "form-text"
1625
- }, V(e.help), 9, Sl)) : M("", !0)
1693
+ }, V(e.help), 9, Al)) : M("", !0)
1626
1694
  ]),
1627
1695
  L(e.$slots, "error", { error: e.errorText }, () => [
1628
- e.errorText ? (p(), h("div", {
1696
+ e.errorText ? (m(), v("div", {
1629
1697
  key: 0,
1630
1698
  id: e.fieldId + "-error",
1631
1699
  class: "invalid-feedback d-block",
1632
1700
  role: "alert"
1633
- }, V(e.errorText), 9, kl)) : M("", !0)
1701
+ }, V(e.errorText), 9, Ol)) : M("", !0)
1634
1702
  ])
1635
1703
  ]);
1636
1704
  }
1637
- const Cl = /* @__PURE__ */ R($l, [["render", Il]]), Tl = F({
1705
+ const Dl = /* @__PURE__ */ R(Bl, [["render", Vl]]), Nl = F({
1638
1706
  name: "GroupControl",
1639
1707
  props: {
1640
1708
  /** Key of the object / array inside the form that holds the grouped values. */
@@ -1645,11 +1713,11 @@ const Cl = /* @__PURE__ */ R($l, [["render", Il]]), Tl = F({
1645
1713
  setup(e) {
1646
1714
  const n = me("form", null), a = E(null), l = E("0"), u = S(() => e.index !== null ? String(e.index) : l.value);
1647
1715
  J(() => {
1648
- var d, g, w;
1716
+ var d, y, w;
1649
1717
  if (e.index !== null) return;
1650
- const t = (w = (g = (d = a.value) == null ? void 0 : d.parentNode) == null ? void 0 : g.parentNode) == null ? void 0 : w.querySelectorAll(".form-control-group");
1651
- t == null || t.forEach((b, y) => {
1652
- b === a.value && (l.value = String(y));
1718
+ const t = (w = (y = (d = a.value) == null ? void 0 : d.parentNode) == null ? void 0 : y.parentNode) == null ? void 0 : w.querySelectorAll(".form-control-group");
1719
+ t == null || t.forEach((g, p) => {
1720
+ g === a.value && (l.value = String(p));
1653
1721
  });
1654
1722
  });
1655
1723
  const i = {
@@ -1660,34 +1728,34 @@ const Cl = /* @__PURE__ */ R($l, [["render", Il]]), Tl = F({
1660
1728
  return u.value;
1661
1729
  },
1662
1730
  getData(t) {
1663
- var g, w;
1664
- const d = (g = n == null ? void 0 : n.value) == null ? void 0 : g[e.name];
1731
+ var y, w;
1732
+ const d = (y = n == null ? void 0 : n.value) == null ? void 0 : y[e.name];
1665
1733
  return d == null ? null : Array.isArray(d) ? ((w = d[Number(u.value)]) == null ? void 0 : w[t]) ?? null : d[t] ?? null;
1666
1734
  },
1667
1735
  setData(t, d) {
1668
- const g = n == null ? void 0 : n.value;
1669
- if (g)
1670
- if ((g[e.name] === null || g[e.name] === void 0) && (g[e.name] = e.index !== null ? [] : {}), Array.isArray(g[e.name])) {
1736
+ const y = n == null ? void 0 : n.value;
1737
+ if (y)
1738
+ if ((y[e.name] === null || y[e.name] === void 0) && (y[e.name] = e.index !== null ? [] : {}), Array.isArray(y[e.name])) {
1671
1739
  const w = Number(u.value);
1672
- g[e.name][w] || (g[e.name][w] = {}), g[e.name][w][t] = d;
1740
+ y[e.name][w] || (y[e.name][w] = {}), y[e.name][w][t] = d;
1673
1741
  } else
1674
- g[e.name][t] = d;
1742
+ y[e.name][t] = d;
1675
1743
  }
1676
1744
  };
1677
- return Ve("group", S(() => i)), { groupEl: a, index: u };
1745
+ return De("group", S(() => i)), { groupEl: a, index: u };
1678
1746
  }
1679
- }), Ml = ["data-name", "data-group-id"];
1680
- function Bl(e, n, a, l, u, i) {
1681
- return p(), h("div", {
1747
+ }), ql = ["data-name", "data-group-id"];
1748
+ function Fl(e, n, a, l, u, i) {
1749
+ return m(), v("div", {
1682
1750
  ref: "groupEl",
1683
1751
  class: "form-control-group",
1684
1752
  "data-name": e.name,
1685
1753
  "data-group-id": e.index
1686
1754
  }, [
1687
1755
  L(e.$slots, "default")
1688
- ], 8, Ml);
1756
+ ], 8, ql);
1689
1757
  }
1690
- const vn = /* @__PURE__ */ R(Tl, [["render", Bl]]), El = F({
1758
+ const yn = /* @__PURE__ */ R(Nl, [["render", Fl]]), Rl = F({
1691
1759
  name: "MobileInput",
1692
1760
  components: { TextInput: ze },
1693
1761
  props: {
@@ -1700,9 +1768,9 @@ const vn = /* @__PURE__ */ R(Tl, [["render", Bl]]), El = F({
1700
1768
  return { t: n };
1701
1769
  }
1702
1770
  });
1703
- function Al(e, n, a, l, u, i) {
1771
+ function Ll(e, n, a, l, u, i) {
1704
1772
  const t = oe("TextInput");
1705
- return p(), le(t, {
1773
+ return m(), le(t, {
1706
1774
  type: "tel",
1707
1775
  inputmode: "tel",
1708
1776
  autocomplete: "tel",
@@ -1711,11 +1779,11 @@ function Al(e, n, a, l, u, i) {
1711
1779
  placeholder: e.placeholder ?? e.t("mobile.placeholder")
1712
1780
  }, null, 8, ["name", "placeholder"]);
1713
1781
  }
1714
- const Ol = /* @__PURE__ */ R(El, [["render", Al]]), Vl = F({
1782
+ const jl = /* @__PURE__ */ R(Rl, [["render", Ll]]), zl = F({
1715
1783
  name: "QuantityInput",
1716
1784
  emits: ["update:modelValue", "change", "input", "increment", "decrement", "focus", "blur"],
1717
1785
  props: {
1718
- ...P,
1786
+ ...z,
1719
1787
  min: { type: Number, default: 0 },
1720
1788
  max: { type: Number, default: null },
1721
1789
  step: { type: Number, default: 1 },
@@ -1724,17 +1792,17 @@ const Ol = /* @__PURE__ */ R(El, [["render", Al]]), Vl = F({
1724
1792
  locale: { type: String, default: null }
1725
1793
  },
1726
1794
  setup(e, { emit: n }) {
1727
- const a = U(e, n), { t: l } = Q(() => e.locale), u = S(() => {
1795
+ const a = P(e, n), { t: l } = Q(() => e.locale), u = S(() => {
1728
1796
  const $ = Number(a.model.value);
1729
1797
  return Number.isFinite($) ? $ : e.min;
1730
- }), i = S(() => e.unit ?? l("quantity.unit")), t = S(() => qe(u.value)), d = S(() => e.readonly || a.isDisabled.value), g = S(() => !d.value && (e.max === null || u.value + e.step <= e.max)), w = S(() => !d.value && u.value - e.step >= e.min);
1731
- function b($, T, o) {
1798
+ }), i = S(() => e.unit ?? l("quantity.unit")), t = S(() => Fe(u.value)), d = S(() => e.readonly || a.isDisabled.value), y = S(() => !d.value && (e.max === null || u.value + e.step <= e.max)), w = S(() => !d.value && u.value - e.step >= e.min);
1799
+ function g($, k, o) {
1732
1800
  let r = $;
1733
- e.max !== null && (r = Math.min(r, e.max)), r = Math.max(r, e.min), a.model.value = r, o && n(o, r), a.emitChange(r, T);
1801
+ e.max !== null && (r = Math.min(r, e.max)), r = Math.max(r, e.min), a.model.value = r, o && n(o, r), a.emitChange(r, k);
1734
1802
  }
1735
- function y($) {
1736
- const T = fn($.target.value);
1737
- a.model.value = T === null ? e.min : T, $.target.value = qe(a.model.value), n("input", a.model.value, $);
1803
+ function p($) {
1804
+ const k = mn($.target.value);
1805
+ a.model.value = k === null ? e.min : k, $.target.value = Fe(a.model.value), n("input", a.model.value, $);
1738
1806
  }
1739
1807
  return J(() => {
1740
1808
  const $ = a.model.value;
@@ -1744,31 +1812,31 @@ const Ol = /* @__PURE__ */ R(El, [["render", Al]]), Vl = F({
1744
1812
  t: l,
1745
1813
  unitText: i,
1746
1814
  display: t,
1747
- canIncrement: g,
1815
+ canIncrement: y,
1748
1816
  canDecrement: w,
1749
1817
  lock: d,
1750
- increment: ($) => g.value && b(u.value + e.step, $, "increment"),
1751
- decrement: ($) => w.value && b(u.value - e.step, $, "decrement"),
1752
- onInput: y,
1753
- clampOnBlur: ($) => b(u.value, $)
1818
+ increment: ($) => y.value && g(u.value + e.step, $, "increment"),
1819
+ decrement: ($) => w.value && g(u.value - e.step, $, "decrement"),
1820
+ onInput: p,
1821
+ clampOnBlur: ($) => g(u.value, $)
1754
1822
  };
1755
1823
  }
1756
- }), Dl = ["disabled", "aria-label"], Nl = ["name", "id", "value", "readonly", "disabled", "aria-invalid"], ql = ["disabled", "aria-label"], Fl = {
1824
+ }), Pl = ["disabled", "aria-label"], Kl = ["name", "id", "value", "readonly", "disabled", "aria-invalid"], Ul = ["disabled", "aria-label"], Hl = {
1757
1825
  key: 0,
1758
1826
  class: "input-group-text fanum"
1759
1827
  };
1760
- function Rl(e, n, a, l, u, i) {
1761
- return p(), h("div", {
1828
+ function Xl(e, n, a, l, u, i) {
1829
+ return m(), v("div", {
1762
1830
  class: q(["input-group input-group-quantity", { "is-invalid": e.isInvalid }])
1763
1831
  }, [
1764
- m("button", {
1832
+ h("button", {
1765
1833
  type: "button",
1766
1834
  class: "btn-outline theme-secondary btn-icon",
1767
1835
  disabled: !e.canIncrement,
1768
1836
  "aria-label": e.t("quantity.increase"),
1769
1837
  onClick: n[0] || (n[0] = (...t) => e.increment && e.increment(...t))
1770
1838
  }, n[6] || (n[6] = [
1771
- m("svg", {
1839
+ h("svg", {
1772
1840
  width: "14",
1773
1841
  height: "14",
1774
1842
  viewBox: "0 0 16 16",
@@ -1778,10 +1846,10 @@ function Rl(e, n, a, l, u, i) {
1778
1846
  "stroke-linecap": "round",
1779
1847
  "aria-hidden": "true"
1780
1848
  }, [
1781
- m("path", { d: "M8 3v10M3 8h10" })
1849
+ h("path", { d: "M8 3v10M3 8h10" })
1782
1850
  ], -1)
1783
- ]), 8, Dl),
1784
- m("input", {
1851
+ ]), 8, Pl),
1852
+ h("input", {
1785
1853
  name: e.name,
1786
1854
  id: e.inputId,
1787
1855
  value: e.display,
@@ -1796,15 +1864,15 @@ function Rl(e, n, a, l, u, i) {
1796
1864
  onChange: n[2] || (n[2] = (...t) => e.clampOnBlur && e.clampOnBlur(...t)),
1797
1865
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
1798
1866
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
1799
- }, null, 42, Nl),
1800
- m("button", {
1867
+ }, null, 42, Kl),
1868
+ h("button", {
1801
1869
  type: "button",
1802
1870
  class: "btn-outline theme-secondary btn-icon",
1803
1871
  disabled: !e.canDecrement,
1804
1872
  "aria-label": e.t("quantity.decrease"),
1805
1873
  onClick: n[5] || (n[5] = (...t) => e.decrement && e.decrement(...t))
1806
1874
  }, n[7] || (n[7] = [
1807
- m("svg", {
1875
+ h("svg", {
1808
1876
  width: "14",
1809
1877
  height: "14",
1810
1878
  viewBox: "0 0 16 16",
@@ -1814,19 +1882,19 @@ function Rl(e, n, a, l, u, i) {
1814
1882
  "stroke-linecap": "round",
1815
1883
  "aria-hidden": "true"
1816
1884
  }, [
1817
- m("path", { d: "M3 8h10" })
1885
+ h("path", { d: "M3 8h10" })
1818
1886
  ], -1)
1819
- ]), 8, ql),
1820
- e.unitText ? (p(), h("span", Fl, V(e.unitText), 1)) : M("", !0),
1887
+ ]), 8, Ul),
1888
+ e.unitText ? (m(), v("span", Hl, V(e.unitText), 1)) : M("", !0),
1821
1889
  L(e.$slots, "suffix")
1822
1890
  ], 2);
1823
1891
  }
1824
- const gn = /* @__PURE__ */ R(Vl, [["render", Rl]]), Ll = F({
1892
+ const bn = /* @__PURE__ */ R(zl, [["render", Xl]]), Gl = F({
1825
1893
  name: "MultiQuantityInput",
1826
- components: { GroupControl: vn, QuantityInput: gn },
1894
+ components: { GroupControl: yn, QuantityInput: bn },
1827
1895
  emits: ["update:modelValue", "change", "show", "shown", "hide", "hidden"],
1828
1896
  props: {
1829
- ...P,
1897
+ ...z,
1830
1898
  /** Array of strings or { name, min, max, description, html }. */
1831
1899
  options: { type: Array, default: () => [] },
1832
1900
  min: { type: Number, default: 0 },
@@ -1838,47 +1906,47 @@ const gn = /* @__PURE__ */ R(Vl, [["render", Rl]]), Ll = F({
1838
1906
  locale: { type: String, default: null }
1839
1907
  },
1840
1908
  setup(e, { emit: n }) {
1841
- const a = U(e, n), { t: l } = Q(() => e.locale), u = E(null), i = S(() => {
1909
+ const a = P(e, n), { t: l } = Q(() => e.locale), u = E(null), i = S(() => {
1842
1910
  const w = a.model.value;
1843
1911
  return w && typeof w == "object" ? w : {};
1844
1912
  }), t = S(
1845
- () => e.options.reduce((w, b, y) => w + (Number(i.value[y]) || 0), 0)
1846
- ), d = S(() => e.unit ?? l("quantity.unit")), g = S(
1847
- () => e.options.map((w, b) => {
1848
- const y = typeof w == "object" && w !== null ? w : { name: w }, $ = Number(i.value[b]) || 0, T = y.max ?? e.max, o = e.totalMax === null ? 1 / 0 : $ + (e.totalMax - t.value);
1913
+ () => e.options.reduce((w, g, p) => w + (Number(i.value[p]) || 0), 0)
1914
+ ), d = S(() => e.unit ?? l("quantity.unit")), y = S(
1915
+ () => e.options.map((w, g) => {
1916
+ const p = typeof w == "object" && w !== null ? w : { name: w }, $ = Number(i.value[g]) || 0, k = p.max ?? e.max, o = e.totalMax === null ? 1 / 0 : $ + (e.totalMax - t.value);
1849
1917
  return {
1850
- key: b,
1851
- name: y.name ?? y.label ?? String(w),
1852
- description: y.description ?? null,
1853
- html: !!y.html,
1854
- min: y.min ?? e.min,
1855
- max: Math.min(T ?? 1 / 0, o) === 1 / 0 ? null : Math.min(T ?? 1 / 0, o)
1918
+ key: g,
1919
+ name: p.name ?? p.label ?? String(w),
1920
+ description: p.description ?? null,
1921
+ html: !!p.html,
1922
+ min: p.min ?? e.min,
1923
+ max: Math.min(k ?? 1 / 0, o) === 1 / 0 ? null : Math.min(k ?? 1 / 0, o)
1856
1924
  };
1857
1925
  })
1858
1926
  );
1859
1927
  return J(() => {
1860
- (!a.model.value || typeof a.model.value != "object") && (a.model.value = e.options.reduce((w, b, y) => (w[y] = typeof b == "object" && (b == null ? void 0 : b.min) || e.min, w), {}));
1928
+ (!a.model.value || typeof a.model.value != "object") && (a.model.value = e.options.reduce((w, g, p) => (w[p] = typeof g == "object" && (g == null ? void 0 : g.min) || e.min, w), {}));
1861
1929
  }), he(
1862
1930
  "Menu",
1863
1931
  () => u.value,
1864
1932
  () => ({ autoClose: "outside", placement: e.placement }),
1865
1933
  {
1866
- onCreate(w, b) {
1934
+ onCreate(w, g) {
1867
1935
  ["show", "shown", "hide", "hidden"].forEach(
1868
- (y) => b.addEventListener(`${y}.bs.menu`, ($) => n(y, $))
1936
+ (p) => g.addEventListener(`${p}.bs.menu`, ($) => n(p, $))
1869
1937
  );
1870
1938
  }
1871
1939
  }
1872
- ), { ...a, t: l, toggle: u, total: t, unitText: d, normalized: g };
1940
+ ), { ...a, t: l, toggle: u, total: t, unitText: d, normalized: y };
1873
1941
  }
1874
- }), jl = { class: "multi-quantity-input fanum" }, zl = ["disabled"], Pl = { class: "combobox-value" }, Ul = { class: "menu p-3" }, Hl = ["innerHTML"], Kl = { key: 1 }, Xl = {
1942
+ }), Wl = { class: "multi-quantity-input fanum" }, Ql = ["disabled"], Jl = { class: "combobox-value" }, Zl = { class: "menu p-3" }, Yl = ["innerHTML"], xl = { key: 1 }, _l = {
1875
1943
  key: 2,
1876
1944
  class: "form-text mt-0"
1877
1945
  };
1878
- function Gl(e, n, a, l, u, i) {
1946
+ function ea(e, n, a, l, u, i) {
1879
1947
  const t = oe("QuantityInput"), d = oe("GroupControl");
1880
- return p(), h("div", jl, [
1881
- m("button", {
1948
+ return m(), v("div", Wl, [
1949
+ h("button", {
1882
1950
  ref: "toggle",
1883
1951
  type: "button",
1884
1952
  class: q(["form-control combobox-toggle", { "is-invalid": e.isInvalid }]),
@@ -1886,26 +1954,26 @@ function Gl(e, n, a, l, u, i) {
1886
1954
  "aria-haspopup": "true",
1887
1955
  disabled: e.isDisabled || e.readonly
1888
1956
  }, [
1889
- m("span", Pl, V(e.total) + " " + V(e.unitText), 1)
1890
- ], 10, zl),
1891
- m("div", Ul, [
1892
- De(d, { name: e.name }, {
1893
- default: Ye(() => [
1894
- (p(!0), h(W, null, ae(e.normalized, (g) => (p(), h("div", {
1895
- key: g.key,
1957
+ h("span", Jl, V(e.total) + " " + V(e.unitText), 1)
1958
+ ], 10, Ql),
1959
+ h("div", Zl, [
1960
+ Ne(d, { name: e.name }, {
1961
+ default: xe(() => [
1962
+ (m(!0), v(W, null, ae(e.normalized, (y) => (m(), v("div", {
1963
+ key: y.key,
1896
1964
  class: "d-flex align-items-center justify-content-between gap-3 py-1"
1897
1965
  }, [
1898
- m("div", null, [
1899
- g.html ? (p(), h("span", {
1966
+ h("div", null, [
1967
+ y.html ? (m(), v("span", {
1900
1968
  key: 0,
1901
- innerHTML: g.name
1902
- }, null, 8, Hl)) : (p(), h("span", Kl, V(g.name), 1)),
1903
- g.description ? (p(), h("div", Xl, V(g.description), 1)) : M("", !0)
1969
+ innerHTML: y.name
1970
+ }, null, 8, Yl)) : (m(), v("span", xl, V(y.name), 1)),
1971
+ y.description ? (m(), v("div", _l, V(y.description), 1)) : M("", !0)
1904
1972
  ]),
1905
- De(t, {
1906
- name: String(g.key),
1907
- min: g.min,
1908
- max: g.max,
1973
+ Ne(t, {
1974
+ name: String(y.key),
1975
+ min: y.min,
1976
+ max: y.max,
1909
1977
  readonly: e.readonly,
1910
1978
  unit: ""
1911
1979
  }, null, 8, ["name", "min", "max", "readonly"])
@@ -1916,11 +1984,11 @@ function Gl(e, n, a, l, u, i) {
1916
1984
  ])
1917
1985
  ]);
1918
1986
  }
1919
- const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
1987
+ const na = /* @__PURE__ */ R(Gl, [["render", ea]]), ta = F({
1920
1988
  name: "OTPInput",
1921
1989
  emits: ["update:modelValue", "change", "input", "complete", "focus", "blur"],
1922
1990
  props: {
1923
- ...P,
1991
+ ...z,
1924
1992
  /** Number of characters. */
1925
1993
  length: { type: Number, default: null },
1926
1994
  /** Legacy alias of `length`. */
@@ -1937,14 +2005,14 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
1937
2005
  autofocus: { type: Boolean, default: !1 }
1938
2006
  },
1939
2007
  setup(e, { emit: n, expose: a }) {
1940
- const l = U(e, n), u = E(null), i = E(null);
2008
+ const l = P(e, n), u = E(null), i = E(null);
1941
2009
  let t = !1, d = [];
1942
- const g = () => e.length ?? e.maxLength ?? 6, w = (o) => o == null ? "" : String(o);
1943
- function b() {
2010
+ const y = () => e.length ?? e.maxLength ?? 6, w = (o) => o == null ? "" : String(o);
2011
+ function g() {
1944
2012
  var o;
1945
2013
  (o = i.value) == null || o.classList.toggle("is-invalid", l.isInvalid.value);
1946
2014
  }
1947
- function y() {
2015
+ function p() {
1948
2016
  const o = $.value;
1949
2017
  if (!o) return;
1950
2018
  const r = w(l.model.value);
@@ -1957,11 +2025,11 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
1957
2025
  }
1958
2026
  }
1959
2027
  }
1960
- const { instance: $, create: T } = he(
2028
+ const { instance: $, create: k } = he(
1961
2029
  "OtpInput",
1962
2030
  () => u.value,
1963
2031
  () => ({
1964
- length: g(),
2032
+ length: y(),
1965
2033
  type: e.type,
1966
2034
  mask: e.mask,
1967
2035
  groups: e.groups,
@@ -1969,15 +2037,15 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
1969
2037
  }),
1970
2038
  {
1971
2039
  onCreate(o, r) {
1972
- const s = (c, I) => {
1973
- r.addEventListener(c, I), d.push(() => r.removeEventListener(c, I));
2040
+ const s = (c, C) => {
2041
+ r.addEventListener(c, C), d.push(() => r.removeEventListener(c, C));
1974
2042
  };
1975
2043
  s("input.bs.otpInput", (c) => {
1976
2044
  t || (l.model.value = c.value, n("input", c.value, c), l.emitChange(c.value, c));
1977
2045
  }), s("complete.bs.otpInput", (c) => {
1978
- var I, j;
1979
- t || (n("complete", c.value), e.autoSubmit && ((j = (I = l.formApi) == null ? void 0 : I.submit) == null || j.call(I)));
1980
- }), y(), b(), e.autofocus && o.focus();
2046
+ var C, j;
2047
+ t || (n("complete", c.value), e.autoSubmit && ((j = (C = l.formApi) == null ? void 0 : C.submit) == null || j.call(C)));
2048
+ }), p(), g(), e.autofocus && o.focus();
1981
2049
  },
1982
2050
  onDestroy() {
1983
2051
  d.forEach((o) => o()), d = [];
@@ -1986,10 +2054,10 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
1986
2054
  );
1987
2055
  return J(() => {
1988
2056
  i.value && (i.value.value = w(l.model.value));
1989
- }), H(() => l.model.value, y), H(l.isInvalid, b, { flush: "post" }), H(
1990
- () => [g(), e.type, e.mask, e.groups, e.separator],
2057
+ }), U(() => l.model.value, p), U(l.isInvalid, g, { flush: "post" }), U(
2058
+ () => [y(), e.type, e.mask, e.groups, e.separator],
1991
2059
  async () => {
1992
- await G(), T();
2060
+ await X(), k();
1993
2061
  },
1994
2062
  { deep: !0 }
1995
2063
  ), a({
@@ -2003,13 +2071,13 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
2003
2071
  }
2004
2072
  }), { ...l, el: u, input: i };
2005
2073
  }
2006
- }), Jl = {
2074
+ }), la = {
2007
2075
  ref: "el",
2008
2076
  class: "otp fanum"
2009
- }, Zl = ["name", "id", "disabled", "readonly", "required", "aria-invalid"];
2010
- function Yl(e, n, a, l, u, i) {
2011
- return p(), h("div", Jl, [
2012
- m("input", {
2077
+ }, aa = ["name", "id", "disabled", "readonly", "required", "aria-invalid"];
2078
+ function oa(e, n, a, l, u, i) {
2079
+ return m(), v("div", la, [
2080
+ h("input", {
2013
2081
  ref: "input",
2014
2082
  type: "text",
2015
2083
  name: e.name,
@@ -2020,19 +2088,19 @@ function Yl(e, n, a, l, u, i) {
2020
2088
  "aria-invalid": e.isInvalid || void 0,
2021
2089
  onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
2022
2090
  onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
2023
- }, null, 40, Zl)
2091
+ }, null, 40, aa)
2024
2092
  ], 512);
2025
2093
  }
2026
- const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2094
+ const ra = /* @__PURE__ */ R(ta, [["render", oa]]), un = {
2027
2095
  en: { weak: "Weak", fair: "Fair", good: "Good", strong: "Strong" },
2028
2096
  fa: { weak: "ضعیف", fair: "متوسط", good: "خوب", strong: "قوی" }
2029
- }, _l = F({
2097
+ }, sa = F({
2030
2098
  name: "PasswordInput",
2031
- components: { TextInput: ze, FormAdornInput: xe },
2099
+ components: { TextInput: ze, FormAdornInput: _e },
2032
2100
  inheritAttrs: !1,
2033
2101
  emits: ["toggle", "strength"],
2034
2102
  props: {
2035
- ...P,
2103
+ ...z,
2036
2104
  name: { type: String, default: "password" },
2037
2105
  placeholder: { type: String, default: null },
2038
2106
  /** Show a "reveal password" button. */
@@ -2049,16 +2117,16 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2049
2117
  locale: { type: String, default: null }
2050
2118
  },
2051
2119
  setup(e, { emit: n, expose: a }) {
2052
- const { t: l, locale: u } = Q(() => e.locale), i = U(e, () => {
2053
- }), t = E(null), d = E(null), g = E(!1), w = S(() => ({
2054
- ...rn[u.value] || rn.en,
2120
+ const { t: l, locale: u } = Q(() => e.locale), i = P(e, () => {
2121
+ }), t = E(null), d = E(null), y = E(!1), w = S(() => ({
2122
+ ...un[u.value] || un.en,
2055
2123
  ...e.strengthMessages || {}
2056
2124
  }));
2057
- function b() {
2058
- g.value = !g.value, n("toggle", g.value);
2125
+ function g() {
2126
+ y.value = !y.value, n("toggle", y.value);
2059
2127
  }
2060
- let y = [];
2061
- const { instance: $, create: T } = he(
2128
+ let p = [];
2129
+ const { instance: $, create: k } = he(
2062
2130
  "Strength",
2063
2131
  () => e.strength ? d.value : null,
2064
2132
  () => {
@@ -2071,24 +2139,24 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2071
2139
  },
2072
2140
  {
2073
2141
  onCreate(r, s) {
2074
- const c = (I) => n("strength", I.strength ?? null, I.score ?? 0);
2075
- s.addEventListener("strengthChange.bs.strength", c), y.push(() => s.removeEventListener("strengthChange.bs.strength", c));
2142
+ const c = (C) => n("strength", C.strength ?? null, C.score ?? 0);
2143
+ s.addEventListener("strengthChange.bs.strength", c), p.push(() => s.removeEventListener("strengthChange.bs.strength", c));
2076
2144
  },
2077
2145
  onDestroy() {
2078
- y.forEach((r) => r()), y = [];
2146
+ p.forEach((r) => r()), p = [];
2079
2147
  }
2080
2148
  }
2081
2149
  );
2082
- H(
2150
+ U(
2083
2151
  () => i.model.value,
2084
- () => G(() => {
2152
+ () => X(() => {
2085
2153
  var r;
2086
2154
  return (r = $.value) == null ? void 0 : r.evaluate();
2087
2155
  })
2088
- ), H(
2156
+ ), U(
2089
2157
  () => [e.strength, e.toggle, e.strengthText, w.value, e.strengthOptions],
2090
2158
  async () => {
2091
- await G(), e.strength && T();
2159
+ await X(), e.strength && k();
2092
2160
  },
2093
2161
  { deep: !0 }
2094
2162
  ), a({ strength: () => {
@@ -2106,12 +2174,12 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2106
2174
  size: e.size,
2107
2175
  placeholder: e.placeholder ?? l("password.placeholder")
2108
2176
  }));
2109
- return { t: l, root: t, meter: d, visible: g, toggleVisible: b, forwarded: o };
2177
+ return { t: l, root: t, meter: d, visible: y, toggleVisible: g, forwarded: o };
2110
2178
  }
2111
- }), ea = {
2179
+ }), ia = {
2112
2180
  ref: "root",
2113
2181
  class: "password-input"
2114
- }, na = ["aria-label", "aria-pressed"], ta = {
2182
+ }, ua = ["aria-label", "aria-pressed"], da = {
2115
2183
  key: 0,
2116
2184
  width: "16",
2117
2185
  height: "16",
@@ -2122,7 +2190,7 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2122
2190
  "stroke-linecap": "round",
2123
2191
  "stroke-linejoin": "round",
2124
2192
  "aria-hidden": "true"
2125
- }, la = {
2193
+ }, ca = {
2126
2194
  key: 1,
2127
2195
  width: "16",
2128
2196
  height: "16",
@@ -2133,63 +2201,63 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
2133
2201
  "stroke-linecap": "round",
2134
2202
  "stroke-linejoin": "round",
2135
2203
  "aria-hidden": "true"
2136
- }, aa = {
2204
+ }, fa = {
2137
2205
  ref: "meter",
2138
2206
  class: "strength",
2139
2207
  "aria-hidden": "true"
2140
- }, oa = {
2208
+ }, pa = {
2141
2209
  key: 0,
2142
2210
  class: "strength-text",
2143
2211
  "aria-live": "polite"
2144
2212
  };
2145
- function ra(e, n, a, l, u, i) {
2213
+ function ma(e, n, a, l, u, i) {
2146
2214
  const t = oe("FormAdornInput"), d = oe("TextInput");
2147
- return p(), h("div", ea, [
2148
- e.toggle ? (p(), le(t, We({ key: 0 }, { ...e.$attrs, ...e.forwarded }, {
2215
+ return m(), v("div", ia, [
2216
+ e.toggle ? (m(), le(t, Qe({ key: 0 }, { ...e.$attrs, ...e.forwarded }, {
2149
2217
  type: e.visible ? "text" : "password",
2150
2218
  autocomplete: "current-password"
2151
2219
  }), {
2152
- end: Ye(() => [
2153
- m("button", {
2220
+ end: xe(() => [
2221
+ h("button", {
2154
2222
  type: "button",
2155
2223
  class: "btn-text theme-secondary btn-icon",
2156
2224
  "aria-label": e.visible ? e.t("password.hide") : e.t("password.show"),
2157
2225
  "aria-pressed": e.visible,
2158
- onClick: n[0] || (n[0] = (...g) => e.toggleVisible && e.toggleVisible(...g))
2226
+ onClick: n[0] || (n[0] = (...y) => e.toggleVisible && e.toggleVisible(...y))
2159
2227
  }, [
2160
- e.visible ? (p(), h("svg", la, n[2] || (n[2] = [
2161
- m("path", { d: "M2 2l12 12M6.6 3.7A7 7 0 0 1 8 3.5C12.5 3.5 15 8 15 8a11 11 0 0 1-2.2 2.6M4 5.4A11 11 0 0 0 1 8s2.5 4.5 7 4.5c1 0 1.9-.2 2.7-.6" }, null, -1)
2162
- ]))) : (p(), h("svg", ta, n[1] || (n[1] = [
2163
- m("path", { d: "M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Z" }, null, -1),
2164
- m("circle", {
2228
+ e.visible ? (m(), v("svg", ca, n[2] || (n[2] = [
2229
+ h("path", { d: "M2 2l12 12M6.6 3.7A7 7 0 0 1 8 3.5C12.5 3.5 15 8 15 8a11 11 0 0 1-2.2 2.6M4 5.4A11 11 0 0 0 1 8s2.5 4.5 7 4.5c1 0 1.9-.2 2.7-.6" }, null, -1)
2230
+ ]))) : (m(), v("svg", da, n[1] || (n[1] = [
2231
+ h("path", { d: "M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Z" }, null, -1),
2232
+ h("circle", {
2165
2233
  cx: "8",
2166
2234
  cy: "8",
2167
2235
  r: "2"
2168
2236
  }, null, -1)
2169
2237
  ])))
2170
- ], 8, na)
2238
+ ], 8, ua)
2171
2239
  ]),
2172
2240
  _: 1
2173
- }, 16, ["type"])) : (p(), le(d, We({ key: 1 }, { ...e.$attrs, ...e.forwarded }, {
2241
+ }, 16, ["type"])) : (m(), le(d, Qe({ key: 1 }, { ...e.$attrs, ...e.forwarded }, {
2174
2242
  type: "password",
2175
2243
  autocomplete: "current-password"
2176
2244
  }), null, 16)),
2177
- e.strength ? (p(), h(W, { key: 2 }, [
2178
- m("div", aa, n[3] || (n[3] = [
2179
- m("div", { class: "strength-segment" }, null, -1),
2180
- m("div", { class: "strength-segment" }, null, -1),
2181
- m("div", { class: "strength-segment" }, null, -1),
2182
- m("div", { class: "strength-segment" }, null, -1)
2245
+ e.strength ? (m(), v(W, { key: 2 }, [
2246
+ h("div", fa, n[3] || (n[3] = [
2247
+ h("div", { class: "strength-segment" }, null, -1),
2248
+ h("div", { class: "strength-segment" }, null, -1),
2249
+ h("div", { class: "strength-segment" }, null, -1),
2250
+ h("div", { class: "strength-segment" }, null, -1)
2183
2251
  ]), 512),
2184
- e.strengthText ? (p(), h("div", oa)) : M("", !0)
2252
+ e.strengthText ? (m(), v("div", pa)) : M("", !0)
2185
2253
  ], 64)) : M("", !0)
2186
2254
  ], 512);
2187
2255
  }
2188
- const sa = /* @__PURE__ */ R(_l, [["render", ra]]), ia = F({
2256
+ const ha = /* @__PURE__ */ R(sa, [["render", ma]]), va = F({
2189
2257
  name: "RangeInput",
2190
2258
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
2191
2259
  props: {
2192
- ...P,
2260
+ ...z,
2193
2261
  min: { type: Number, default: 0 },
2194
2262
  max: { type: Number, default: 100 },
2195
2263
  step: { type: Number, default: 1 },
@@ -2201,43 +2269,43 @@ const sa = /* @__PURE__ */ R(_l, [["render", ra]]), ia = F({
2201
2269
  ticks: { type: Array, default: () => [] }
2202
2270
  },
2203
2271
  setup(e, { emit: n }) {
2204
- const a = U(e, n), l = E(null), u = E(null), i = S(() => {
2205
- const y = Number(a.model.value);
2206
- return a.model.value === null || a.model.value === void 0 || Number.isNaN(y) ? e.min : y;
2272
+ const a = P(e, n), l = E(null), u = E(null), i = S(() => {
2273
+ const p = Number(a.model.value);
2274
+ return a.model.value === null || a.model.value === void 0 || Number.isNaN(p) ? e.min : p;
2207
2275
  }), t = S(() => e.ticks.length ? `${a.inputId.value}-ticks` : void 0), d = S(
2208
- () => e.ticks.map((y) => typeof y == "object" && y !== null ? y : { value: y, label: e.formatter ? e.formatter(y) : String(y) })
2276
+ () => e.ticks.map((p) => typeof p == "object" && p !== null ? p : { value: p, label: e.formatter ? e.formatter(p) : String(p) })
2209
2277
  );
2210
- function g(y) {
2211
- const $ = Number(y.target.value);
2212
- a.model.value = $, n("input", $, y);
2278
+ function y(p) {
2279
+ const $ = Number(p.target.value);
2280
+ a.model.value = $, n("input", $, p);
2213
2281
  }
2214
- const { instance: w, create: b } = he(
2282
+ const { instance: w, create: g } = he(
2215
2283
  "Range",
2216
2284
  () => l.value,
2217
2285
  () => ({ bubble: e.bubble, formatter: e.formatter })
2218
2286
  );
2219
- return H(
2287
+ return U(
2220
2288
  () => [a.model.value, e.min, e.max],
2221
- () => G(() => {
2222
- var y;
2223
- return (y = w.value) == null ? void 0 : y.update();
2289
+ () => X(() => {
2290
+ var p;
2291
+ return (p = w.value) == null ? void 0 : p.update();
2224
2292
  }),
2225
2293
  { flush: "post" }
2226
- ), H(
2294
+ ), U(
2227
2295
  () => [e.bubble, e.formatter, e.ticks, e.min, e.max],
2228
2296
  async () => {
2229
- await G(), b();
2297
+ await X(), g();
2230
2298
  },
2231
2299
  { deep: !0 }
2232
- ), { ...a, el: l, input: u, current: i, listId: t, tickItems: d, onInput: g };
2300
+ ), { ...a, el: l, input: u, current: i, listId: t, tickItems: d, onInput: y };
2233
2301
  }
2234
- }), ua = {
2302
+ }), ga = {
2235
2303
  ref: "el",
2236
2304
  class: "form-range"
2237
- }, da = ["name", "id", "min", "max", "step", "list", "disabled", "aria-invalid", "value"], ca = ["id"], fa = ["value", "label"];
2238
- function pa(e, n, a, l, u, i) {
2239
- return p(), h("div", ua, [
2240
- m("input", {
2305
+ }, ya = ["name", "id", "min", "max", "step", "list", "disabled", "aria-invalid", "value"], ba = ["id"], $a = ["value", "label"];
2306
+ function wa(e, n, a, l, u, i) {
2307
+ return m(), v("div", ga, [
2308
+ h("input", {
2241
2309
  ref: "input",
2242
2310
  type: "range",
2243
2311
  class: q(["form-range-input", { "is-invalid": e.isInvalid }]),
@@ -2254,30 +2322,30 @@ function pa(e, n, a, l, u, i) {
2254
2322
  onChange: n[1] || (n[1] = (t) => e.emitChange(Number(t.target.value), t)),
2255
2323
  onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
2256
2324
  onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
2257
- }, null, 42, da),
2258
- e.listId ? (p(), h("datalist", {
2325
+ }, null, 42, ya),
2326
+ e.listId ? (m(), v("datalist", {
2259
2327
  key: 0,
2260
2328
  id: e.listId
2261
2329
  }, [
2262
- (p(!0), h(W, null, ae(e.tickItems, (t) => (p(), h("option", {
2330
+ (m(!0), v(W, null, ae(e.tickItems, (t) => (m(), v("option", {
2263
2331
  key: t.value,
2264
2332
  value: t.value,
2265
2333
  label: t.label
2266
- }, null, 8, fa))), 128))
2267
- ], 8, ca)) : M("", !0)
2334
+ }, null, 8, $a))), 128))
2335
+ ], 8, ba)) : M("", !0)
2268
2336
  ], 512);
2269
2337
  }
2270
- const yn = /* @__PURE__ */ R(ia, [["render", pa]]), ma = F({
2338
+ const $n = /* @__PURE__ */ R(va, [["render", wa]]), Sa = F({
2271
2339
  name: "SimpleUploader",
2272
2340
  inheritAttrs: !0,
2273
2341
  setup(e, { attrs: n, slots: a }) {
2274
- return () => wn(mn, n, a);
2342
+ return () => kn(vn, n, a);
2275
2343
  }
2276
- }), ha = F({
2344
+ }), ka = F({
2277
2345
  name: "StarRatingInput",
2278
2346
  emits: ["update:modelValue", "change", "hover"],
2279
2347
  props: {
2280
- ...P,
2348
+ ...z,
2281
2349
  /** Initial rating used when the model is empty. */
2282
2350
  value: { type: Number, default: 0 },
2283
2351
  maxStars: { type: Number, default: 5 },
@@ -2288,61 +2356,61 @@ const yn = /* @__PURE__ */ R(ia, [["render", pa]]), ma = F({
2288
2356
  clearable: { type: Boolean, default: !1 }
2289
2357
  },
2290
2358
  setup(e, { emit: n }) {
2291
- const a = U(e, n), l = E(null), u = E(null), i = E(!1);
2359
+ const a = P(e, n), l = E(null), u = E(null), i = E(!1);
2292
2360
  J(() => {
2293
2361
  l.value && (i.value = getComputedStyle(l.value).direction === "rtl");
2294
2362
  });
2295
2363
  const t = S(() => e.readonly || a.isDisabled.value), d = S(() => {
2296
2364
  const c = Number(a.model.value);
2297
2365
  return a.model.value === null || a.model.value === void 0 || Number.isNaN(c) ? e.value : c;
2298
- }), g = S(() => u.value ?? d.value), w = S(() => 1 / e.precision), b = (c) => Math.max(0, Math.min(1, g.value - (c - 1))) * 100;
2299
- function y(c) {
2300
- const I = l.value.getBoundingClientRect(), j = i.value ? I.right - c.clientX : c.clientX - I.left, A = I.width / e.maxStars, K = Math.ceil(j / A * e.precision) / e.precision;
2301
- return Math.min(e.maxStars, Math.max(w.value, K));
2366
+ }), y = S(() => u.value ?? d.value), w = S(() => 1 / e.precision), g = (c) => Math.max(0, Math.min(1, y.value - (c - 1))) * 100;
2367
+ function p(c) {
2368
+ const C = l.value.getBoundingClientRect(), j = i.value ? C.right - c.clientX : c.clientX - C.left, A = C.width / e.maxStars, H = Math.ceil(j / A * e.precision) / e.precision;
2369
+ return Math.min(e.maxStars, Math.max(w.value, H));
2302
2370
  }
2303
2371
  function $(c) {
2304
- t.value || (u.value = y(c), n("hover", u.value));
2372
+ t.value || (u.value = p(c), n("hover", u.value));
2305
2373
  }
2306
- function T() {
2374
+ function k() {
2307
2375
  u.value = null;
2308
2376
  }
2309
- function o(c, I) {
2377
+ function o(c, C) {
2310
2378
  if (t.value) return;
2311
2379
  const j = e.clearable && c === d.value ? 0 : c;
2312
- a.model.value = j, a.emitChange(j, I);
2380
+ a.model.value = j, a.emitChange(j, C);
2313
2381
  }
2314
2382
  function r(c) {
2315
- t.value || o(y(c), c);
2383
+ t.value || o(p(c), c);
2316
2384
  }
2317
2385
  function s(c) {
2318
2386
  if (t.value) return;
2319
- const I = i.value ? "ArrowLeft" : "ArrowRight", j = i.value ? "ArrowRight" : "ArrowLeft";
2387
+ const C = i.value ? "ArrowLeft" : "ArrowRight", j = i.value ? "ArrowRight" : "ArrowLeft";
2320
2388
  let A = null;
2321
- c.key === I || c.key === "ArrowUp" ? A = d.value + w.value : c.key === j || c.key === "ArrowDown" ? A = d.value - w.value : c.key === "Home" ? A = 0 : c.key === "End" && (A = e.maxStars), A !== null && (c.preventDefault(), o(Math.min(e.maxStars, Math.max(0, Number(A.toFixed(4)))), c));
2389
+ c.key === C || c.key === "ArrowUp" ? A = d.value + w.value : c.key === j || c.key === "ArrowDown" ? A = d.value - w.value : c.key === "Home" ? A = 0 : c.key === "End" && (A = e.maxStars), A !== null && (c.preventDefault(), o(Math.min(e.maxStars, Math.max(0, Number(A.toFixed(4)))), c));
2322
2390
  }
2323
2391
  return {
2324
2392
  ...a,
2325
2393
  container: l,
2326
- rating: g,
2394
+ rating: y,
2327
2395
  stored: d,
2328
- fillOf: b,
2396
+ fillOf: g,
2329
2397
  onMove: $,
2330
- leave: T,
2398
+ leave: k,
2331
2399
  onClick: r,
2332
2400
  onKeydown: s,
2333
2401
  locked: t,
2334
- display: S(() => g.value.toFixed(1))
2402
+ display: S(() => y.value.toFixed(1))
2335
2403
  };
2336
2404
  }
2337
- }), va = ["tabindex", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-invalid"], ga = ["name", "value"], ya = {
2405
+ }), Ia = ["tabindex", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-invalid"], Ca = ["name", "value"], Ta = {
2338
2406
  key: 1,
2339
2407
  class: "rating-value fanum"
2340
2408
  };
2341
- function ba(e, n, a, l, u, i) {
2342
- return p(), h("div", {
2409
+ function Ma(e, n, a, l, u, i) {
2410
+ return m(), v("div", {
2343
2411
  class: q(["star-rating d-flex align-items-center gap-2", { "is-invalid": e.isInvalid }])
2344
2412
  }, [
2345
- m("div", {
2413
+ h("div", {
2346
2414
  ref: "container",
2347
2415
  class: "star-rating-container d-flex position-relative",
2348
2416
  role: "slider",
@@ -2358,31 +2426,31 @@ function ba(e, n, a, l, u, i) {
2358
2426
  onClick: n[2] || (n[2] = (...t) => e.onClick && e.onClick(...t)),
2359
2427
  onKeydown: n[3] || (n[3] = (...t) => e.onKeydown && e.onKeydown(...t))
2360
2428
  }, [
2361
- (p(!0), h(W, null, ae(e.maxStars, (t) => (p(), h("span", {
2429
+ (m(!0), v(W, null, ae(e.maxStars, (t) => (m(), v("span", {
2362
2430
  key: t,
2363
2431
  class: "star-wrapper position-relative d-inline-block fs-2xl lh-1"
2364
2432
  }, [
2365
- n[4] || (n[4] = m("span", {
2433
+ n[4] || (n[4] = h("span", {
2366
2434
  class: "star-bg fg-secondary opacity-50",
2367
2435
  "aria-hidden": "true"
2368
2436
  }, "★", -1)),
2369
- m("span", {
2437
+ h("span", {
2370
2438
  class: "star-overlay fg-warning",
2371
2439
  "aria-hidden": "true",
2372
2440
  style: se({ position: "absolute", top: 0, insetInlineStart: 0, overflow: "hidden", whiteSpace: "nowrap", width: e.fillOf(t) + "%" })
2373
2441
  }, "★", 4)
2374
2442
  ]))), 128))
2375
- ], 44, va),
2376
- e.name ? (p(), h("input", {
2443
+ ], 44, Ia),
2444
+ e.name ? (m(), v("input", {
2377
2445
  key: 0,
2378
2446
  type: "hidden",
2379
2447
  name: e.name,
2380
2448
  value: e.stored
2381
- }, null, 8, ga)) : M("", !0),
2382
- e.showValue && e.rating > 0 ? (p(), h("span", ya, V(e.display), 1)) : M("", !0)
2449
+ }, null, 8, Ca)) : M("", !0),
2450
+ e.showValue && e.rating > 0 ? (m(), v("span", Ta, V(e.display), 1)) : M("", !0)
2383
2451
  ], 2);
2384
2452
  }
2385
- const $a = /* @__PURE__ */ R(ha, [["render", ba]]), wa = F({
2453
+ const Ba = /* @__PURE__ */ R(ka, [["render", Ma]]), Ea = F({
2386
2454
  name: "SubmitButton",
2387
2455
  emits: ["click"],
2388
2456
  props: {
@@ -2398,8 +2466,8 @@ const $a = /* @__PURE__ */ R(ha, [["render", ba]]), wa = F({
2398
2466
  setup(e, { emit: n }) {
2399
2467
  const a = me("form", null), l = S(() => (a == null ? void 0 : a.value) ?? null), { t: u } = Q(() => e.locale), i = S(
2400
2468
  () => {
2401
- var d, g;
2402
- return e.loading !== null ? e.loading : !!((d = l.value) != null && d.processing || (g = l.value) != null && g.uploading);
2469
+ var d, y;
2470
+ return e.loading !== null ? e.loading : !!((d = l.value) != null && d.processing || (y = l.value) != null && y.uploading);
2403
2471
  }
2404
2472
  ), t = S(() => [
2405
2473
  e.variant ? `btn-${e.variant}` : null,
@@ -2407,25 +2475,25 @@ const $a = /* @__PURE__ */ R(ha, [["render", ba]]), wa = F({
2407
2475
  ]);
2408
2476
  return { form: l, busy: i, classes: t, t: u, onClick: (d) => n("click", d) };
2409
2477
  }
2410
- }), Sa = ["disabled", "aria-busy"], ka = {
2478
+ }), Aa = ["disabled", "aria-busy"], Oa = {
2411
2479
  key: 0,
2412
2480
  class: "spinner-border spinner-sm me-2",
2413
2481
  role: "status",
2414
2482
  "aria-hidden": "true"
2415
- }, Ia = {
2483
+ }, Va = {
2416
2484
  key: 0,
2417
2485
  class: "fanum"
2418
2486
  };
2419
- function Ca(e, n, a, l, u, i) {
2487
+ function Da(e, n, a, l, u, i) {
2420
2488
  var t;
2421
- return p(), h("button", {
2489
+ return m(), v("button", {
2422
2490
  type: "submit",
2423
2491
  class: q(e.classes),
2424
2492
  disabled: e.disabled || e.busy,
2425
2493
  "aria-busy": e.busy || void 0,
2426
2494
  onClick: n[0] || (n[0] = (...d) => e.onClick && e.onClick(...d))
2427
2495
  }, [
2428
- e.busy ? (p(), h("span", ka)) : M("", !0),
2496
+ e.busy ? (m(), v("span", Oa)) : M("", !0),
2429
2497
  L(e.$slots, "default", {
2430
2498
  form: e.form,
2431
2499
  loading: e.busy
@@ -2437,16 +2505,16 @@ function Ca(e, n, a, l, u, i) {
2437
2505
  }, () => {
2438
2506
  var d;
2439
2507
  return [
2440
- (d = e.form) != null && d.uploading ? (p(), h("span", Ia, V(e.form.uploading) + "%", 1)) : M("", !0)
2508
+ (d = e.form) != null && d.uploading ? (m(), v("span", Va, V(e.form.uploading) + "%", 1)) : M("", !0)
2441
2509
  ];
2442
2510
  })
2443
- ], 10, Sa);
2511
+ ], 10, Aa);
2444
2512
  }
2445
- const Ta = /* @__PURE__ */ R(wa, [["render", Ca]]), Ma = F({
2513
+ const Na = /* @__PURE__ */ R(Ea, [["render", Da]]), qa = F({
2446
2514
  name: "SwitchInput",
2447
2515
  emits: ["update:modelValue", "change", "focus", "blur"],
2448
2516
  props: {
2449
- ...P,
2517
+ ...z,
2450
2518
  value: { type: [String, Number, Boolean, Object], default: null },
2451
2519
  trueValue: { type: null, default: !0 },
2452
2520
  falseValue: { type: null, default: !1 },
@@ -2454,7 +2522,7 @@ const Ta = /* @__PURE__ */ R(wa, [["render", Ca]]), Ma = F({
2454
2522
  label: { type: String, default: null }
2455
2523
  },
2456
2524
  setup(e, { emit: n }) {
2457
- const a = E(null), l = U(e, n, { valued: () => e.value });
2525
+ const a = E(null), l = P(e, n, { valued: () => e.value });
2458
2526
  return je(e, l, a, { type: () => "checkbox" }), {
2459
2527
  ...l,
2460
2528
  input: a,
@@ -2462,11 +2530,11 @@ const Ta = /* @__PURE__ */ R(wa, [["render", Ca]]), Ma = F({
2462
2530
  };
2463
2531
  },
2464
2532
  expose: ["input"]
2465
- }), Ba = { class: "form-field" }, Ea = { class: "switch" }, Aa = ["name", "id", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Oa = ["for"];
2466
- function Va(e, n, a, l, u, i) {
2467
- return p(), h("div", Ba, [
2468
- m("div", Ea, [
2469
- re(m("input", {
2533
+ }), Fa = { class: "form-field" }, Ra = { class: "switch" }, La = ["name", "id", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], ja = ["for"];
2534
+ function za(e, n, a, l, u, i) {
2535
+ return m(), v("div", Fa, [
2536
+ h("div", Ra, [
2537
+ re(h("input", {
2470
2538
  ref: "input",
2471
2539
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
2472
2540
  name: e.name,
@@ -2484,33 +2552,33 @@ function Va(e, n, a, l, u, i) {
2484
2552
  onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
2485
2553
  onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
2486
2554
  onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
2487
- }, null, 42, Aa), [
2488
- [Sn, e.model]
2555
+ }, null, 42, La), [
2556
+ [In, e.model]
2489
2557
  ])
2490
2558
  ]),
2491
- m("label", { for: e.inputId }, [
2559
+ h("label", { for: e.inputId }, [
2492
2560
  L(e.$slots, "default", {}, () => [
2493
2561
  x(V(e.label), 1)
2494
2562
  ])
2495
- ], 8, Oa)
2563
+ ], 8, ja)
2496
2564
  ]);
2497
2565
  }
2498
- const Da = /* @__PURE__ */ R(Ma, [["render", Va]]), Na = F({
2566
+ const Pa = /* @__PURE__ */ R(qa, [["render", za]]), Ka = F({
2499
2567
  name: "TextAreaInput",
2500
2568
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
2501
2569
  props: {
2502
- ...P,
2570
+ ...z,
2503
2571
  rows: { type: [Number, String], default: 3 },
2504
2572
  placeholder: { type: String, default: null },
2505
2573
  size: { type: String, default: null }
2506
2574
  },
2507
2575
  setup(e, { emit: n }) {
2508
- const a = U(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
2576
+ const a = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
2509
2577
  return { ...a, sizeClass: l, emit: n };
2510
2578
  }
2511
- }), qa = ["name", "id", "rows", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
2512
- function Fa(e, n, a, l, u, i) {
2513
- return re((p(), h("textarea", {
2579
+ }), Ua = ["name", "id", "rows", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
2580
+ function Ha(e, n, a, l, u, i) {
2581
+ return re((m(), v("textarea", {
2514
2582
  "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
2515
2583
  name: e.name,
2516
2584
  id: e.inputId,
@@ -2525,24 +2593,24 @@ function Fa(e, n, a, l, u, i) {
2525
2593
  onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
2526
2594
  onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
2527
2595
  onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
2528
- }, null, 42, qa)), [
2529
- [dn, e.model]
2596
+ }, null, 42, Ua)), [
2597
+ [fn, e.model]
2530
2598
  ]);
2531
2599
  }
2532
- const Ra = /* @__PURE__ */ R(Na, [["render", Fa]]), Fe = ie({}), we = ie({});
2533
- function La(e, n) {
2534
- Fe[e] = n;
2600
+ const Xa = /* @__PURE__ */ R(Ka, [["render", Ha]]), Re = ie({}), we = ie({});
2601
+ function Ga(e, n) {
2602
+ Re[e] = n;
2535
2603
  }
2536
- function ja(e, n) {
2604
+ function Wa(e, n) {
2537
2605
  var a;
2538
- ((a = Fe[e]) == null ? void 0 : a.owner) === n && delete Fe[e];
2606
+ ((a = Re[e]) == null ? void 0 : a.owner) === n && delete Re[e];
2539
2607
  }
2540
- function za(e) {
2608
+ function Qa(e) {
2541
2609
  return we[e] = (we[e] || 0) + 1, () => {
2542
2610
  we[e] = Math.max(0, (we[e] || 1) - 1);
2543
2611
  };
2544
2612
  }
2545
- const sn = (e) => String(Math.floor(e)).padStart(2, "0"), Ze = (e) => `${sn(e / 60)}:${sn(e % 60)}`, Pa = F({
2613
+ const dn = (e) => String(Math.floor(e)).padStart(2, "0"), Ye = (e) => `${dn(e / 60)}:${dn(e % 60)}`, Ja = F({
2546
2614
  name: "VoiceRecorderResultArea",
2547
2615
  props: {
2548
2616
  /** channel / name of the recorder to display. */
@@ -2557,55 +2625,55 @@ const sn = (e) => String(Math.floor(e)).padStart(2, "0"), Ze = (e) => `${sn(e /
2557
2625
  internal: { type: Boolean, default: !1 }
2558
2626
  },
2559
2627
  setup(e) {
2560
- const n = E(null), a = S(() => Fe[e.for] ?? null);
2628
+ const n = E(null), a = S(() => Re[e.for] ?? null);
2561
2629
  let l = null;
2562
2630
  J(() => {
2563
- e.internal || (l = za(e.for));
2564
- }), cn(() => l == null ? void 0 : l());
2631
+ e.internal || (l = Qa(e.for));
2632
+ }), pn(() => l == null ? void 0 : l());
2565
2633
  const u = (t) => {
2566
- var d, g;
2567
- return ((g = (d = a.value) == null ? void 0 : d.t) == null ? void 0 : g.call(d, t)) ?? t;
2634
+ var d, y;
2635
+ return ((y = (d = a.value) == null ? void 0 : d.t) == null ? void 0 : y.call(d, t)) ?? t;
2568
2636
  };
2569
2637
  function i(t) {
2570
2638
  var d;
2571
- (d = n.value) == null || d.querySelectorAll("audio").forEach((g) => {
2572
- g !== t.target && g.pause();
2639
+ (d = n.value) == null || d.querySelectorAll("audio").forEach((y) => {
2640
+ y !== t.target && y.pause();
2573
2641
  });
2574
2642
  }
2575
- return { root: n, channel: a, t: u, onPlay: i, formatTime: Ze };
2643
+ return { root: n, channel: a, t: u, onPlay: i, formatTime: Ye };
2576
2644
  }
2577
- }), Ua = {
2645
+ }), Za = {
2578
2646
  key: 0,
2579
2647
  ref: "root",
2580
2648
  class: "voice-recorder-results"
2581
- }, Ha = ["data-code"], Ka = { class: "row gx-3 align-items-center" }, Xa = { class: "col-12 sm:col-4" }, Ga = ["src"], Wa = {
2649
+ }, Ya = ["data-code"], xa = { class: "row gx-3 align-items-center" }, _a = { class: "col-12 sm:col-4" }, eo = ["src"], no = {
2582
2650
  key: 0,
2583
2651
  class: "col-auto"
2584
- }, Qa = {
2652
+ }, to = {
2585
2653
  class: "fg-secondary fanum",
2586
2654
  dir: "ltr"
2587
- }, Ja = { class: "col" }, Za = ["aria-valuenow"], Ya = {
2655
+ }, lo = { class: "col" }, ao = ["aria-valuenow"], oo = {
2588
2656
  key: 1,
2589
2657
  class: "fg-danger",
2590
2658
  role: "alert"
2591
- }, xa = {
2659
+ }, ro = {
2592
2660
  key: 1,
2593
2661
  class: "col-auto"
2594
- }, _a = ["aria-label", "onClick"], eo = { class: "col-auto" }, no = ["aria-label", "onClick"];
2595
- function to(e, n, a, l, u, i) {
2596
- return e.channel && (e.showProblem && e.channel.problem || e.showList && e.channel.items.length) ? (p(), h("div", Ua, [
2662
+ }, so = ["aria-label", "onClick"], io = { class: "col-auto" }, uo = ["aria-label", "onClick"];
2663
+ function co(e, n, a, l, u, i) {
2664
+ return e.channel && (e.showProblem && e.channel.problem || e.showList && e.channel.items.length) ? (m(), v("div", Za, [
2597
2665
  L(e.$slots, "default"),
2598
- e.showProblem && e.channel.problem ? (p(), h("div", {
2666
+ e.showProblem && e.channel.problem ? (m(), v("div", {
2599
2667
  key: 0,
2600
2668
  class: q(e.alertClass),
2601
2669
  role: "alert",
2602
2670
  "data-code": e.channel.problem.code
2603
- }, V(e.channel.problem.message), 11, Ha)) : M("", !0),
2604
- e.showList && e.channel.items.length ? (p(), h("ul", {
2671
+ }, V(e.channel.problem.message), 11, Ya)) : M("", !0),
2672
+ e.showList && e.channel.items.length ? (m(), v("ul", {
2605
2673
  key: 1,
2606
2674
  class: q(["list-group", e.listClass])
2607
2675
  }, [
2608
- (p(!0), h(W, null, ae(e.channel.items, (t) => (p(), h("li", {
2676
+ (m(!0), v(W, null, ae(e.channel.items, (t) => (m(), v("li", {
2609
2677
  key: t.id,
2610
2678
  class: "list-group-item"
2611
2679
  }, [
@@ -2616,21 +2684,21 @@ function to(e, n, a, l, u, i) {
2616
2684
  remove: () => e.channel.remove(t),
2617
2685
  retry: () => e.channel.retry(t)
2618
2686
  }, () => [
2619
- m("div", Ka, [
2620
- m("div", Xa, [
2621
- m("audio", {
2687
+ h("div", xa, [
2688
+ h("div", _a, [
2689
+ h("audio", {
2622
2690
  class: "flex-grow-1 w-100",
2623
2691
  controls: "",
2624
2692
  preload: "metadata",
2625
2693
  src: t.src,
2626
2694
  onPlay: n[0] || (n[0] = (...d) => e.onPlay && e.onPlay(...d))
2627
- }, null, 40, Ga)
2695
+ }, null, 40, eo)
2628
2696
  ]),
2629
- t.seconds !== null ? (p(), h("div", Wa, [
2630
- m("span", Qa, V(e.formatTime(t.seconds)), 1)
2697
+ t.seconds !== null ? (m(), v("div", no, [
2698
+ h("span", to, V(e.formatTime(t.seconds)), 1)
2631
2699
  ])) : M("", !0),
2632
- m("div", Ja, [
2633
- t.status === "uploading" ? (p(), h("div", {
2700
+ h("div", lo, [
2701
+ t.status === "uploading" ? (m(), v("div", {
2634
2702
  key: 0,
2635
2703
  class: "progress",
2636
2704
  role: "progressbar",
@@ -2638,21 +2706,21 @@ function to(e, n, a, l, u, i) {
2638
2706
  "aria-valuemin": "0",
2639
2707
  "aria-valuemax": "100"
2640
2708
  }, [
2641
- m("div", {
2709
+ h("div", {
2642
2710
  class: "progress-bar",
2643
2711
  style: se({ width: t.percent + "%" })
2644
2712
  }, null, 4)
2645
- ], 8, Za)) : M("", !0),
2646
- t.status === "error" ? (p(), h("div", Ya, V(t.error), 1)) : M("", !0)
2713
+ ], 8, ao)) : M("", !0),
2714
+ t.status === "error" ? (m(), v("div", oo, V(t.error), 1)) : M("", !0)
2647
2715
  ]),
2648
- t.status === "error" ? (p(), h("div", xa, [
2649
- m("button", {
2716
+ t.status === "error" ? (m(), v("div", ro, [
2717
+ h("button", {
2650
2718
  type: "button",
2651
2719
  class: "btn-text theme-secondary btn-icon",
2652
2720
  "aria-label": e.t("retry"),
2653
2721
  onClick: (d) => e.channel.retry(t)
2654
2722
  }, n[1] || (n[1] = [
2655
- m("svg", {
2723
+ h("svg", {
2656
2724
  width: "16",
2657
2725
  height: "16",
2658
2726
  viewBox: "0 0 16 16",
@@ -2663,20 +2731,20 @@ function to(e, n, a, l, u, i) {
2663
2731
  "stroke-linejoin": "round",
2664
2732
  "aria-hidden": "true"
2665
2733
  }, [
2666
- m("path", { d: "M13.5 3v3.5H10" }),
2667
- m("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
2734
+ h("path", { d: "M13.5 3v3.5H10" }),
2735
+ h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
2668
2736
  ], -1)
2669
- ]), 8, _a)
2737
+ ]), 8, so)
2670
2738
  ])) : M("", !0),
2671
- m("div", eo, [
2672
- e.channel.locked ? M("", !0) : (p(), h("button", {
2739
+ h("div", io, [
2740
+ e.channel.locked ? M("", !0) : (m(), v("button", {
2673
2741
  key: 0,
2674
2742
  type: "button",
2675
2743
  class: "btn-text theme-danger btn-icon",
2676
2744
  "aria-label": e.t("remove"),
2677
2745
  onClick: (d) => e.channel.remove(t)
2678
2746
  }, n[2] || (n[2] = [
2679
- m("svg", {
2747
+ h("svg", {
2680
2748
  width: "16",
2681
2749
  height: "16",
2682
2750
  viewBox: "0 0 16 16",
@@ -2687,9 +2755,9 @@ function to(e, n, a, l, u, i) {
2687
2755
  "stroke-linejoin": "round",
2688
2756
  "aria-hidden": "true"
2689
2757
  }, [
2690
- m("path", { d: "M2.5 4.5h11M6 4.5V3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.5M4 4.5l.6 8.1a1 1 0 0 0 1 .9h4.8a1 1 0 0 0 1-.9l.6-8.1" })
2758
+ h("path", { d: "M2.5 4.5h11M6 4.5V3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.5M4 4.5l.6 8.1a1 1 0 0 0 1 .9h4.8a1 1 0 0 0 1-.9l.6-8.1" })
2691
2759
  ], -1)
2692
- ]), 8, no))
2760
+ ]), 8, uo))
2693
2761
  ])
2694
2762
  ])
2695
2763
  ])
@@ -2697,7 +2765,7 @@ function to(e, n, a, l, u, i) {
2697
2765
  ], 2)) : M("", !0)
2698
2766
  ], 512)) : M("", !0);
2699
2767
  }
2700
- const bn = /* @__PURE__ */ R(Pa, [["render", to]]), Xe = {
2768
+ const wn = /* @__PURE__ */ R(Ja, [["render", co]]), Ge = {
2701
2769
  en: {
2702
2770
  start: "Record voice",
2703
2771
  stop: "Stop recording",
@@ -2738,15 +2806,15 @@ const bn = /* @__PURE__ */ R(Pa, [["render", to]]), Xe = {
2738
2806
  unknown: "شروع ضبط ممکن نشد.",
2739
2807
  uploadFailed: "خطا در ارسال"
2740
2808
  }
2741
- }, lo = ["audio/ogg;codecs=opus", "audio/webm;codecs=opus", "audio/mp4", "audio/webm", "audio/ogg"];
2742
- let Ge = 0;
2743
- function un() {
2744
- return typeof MediaRecorder > "u" || !MediaRecorder.isTypeSupported ? "" : lo.find((e) => MediaRecorder.isTypeSupported(e)) || "";
2809
+ }, fo = ["audio/ogg;codecs=opus", "audio/webm;codecs=opus", "audio/mp4", "audio/webm", "audio/ogg"];
2810
+ let We = 0;
2811
+ function cn() {
2812
+ return typeof MediaRecorder > "u" || !MediaRecorder.isTypeSupported ? "" : fo.find((e) => MediaRecorder.isTypeSupported(e)) || "";
2745
2813
  }
2746
- function ao(e = "") {
2814
+ function po(e = "") {
2747
2815
  return /ogg/.test(e) ? "ogg" : /webm/.test(e) ? "webm" : /mp4|aac|m4a/.test(e) ? "m4a" : /mpeg|mp3/.test(e) ? "mp3" : /wav/.test(e) ? "wav" : "audio";
2748
2816
  }
2749
- function oo(e) {
2817
+ function mo(e) {
2750
2818
  switch (e == null ? void 0 : e.name) {
2751
2819
  case "NotAllowedError":
2752
2820
  case "PermissionDeniedError":
@@ -2766,12 +2834,12 @@ function oo(e) {
2766
2834
  return "unknown";
2767
2835
  }
2768
2836
  }
2769
- const ro = F({
2837
+ const ho = F({
2770
2838
  name: "VoiceRecorderInput",
2771
- components: { VoiceRecorderResultArea: bn },
2839
+ components: { VoiceRecorderResultArea: wn },
2772
2840
  emits: ["update:modelValue", "change", "start", "stop", "recorded", "progress", "uploaded", "removed", "error"],
2773
2841
  props: {
2774
- ...P,
2842
+ ...z,
2775
2843
  /** box | button */
2776
2844
  variant: { type: String, default: "box", validator: (e) => ["box", "button"].includes(e) },
2777
2845
  url: { type: String, default: "/upload" },
@@ -2810,15 +2878,15 @@ const ro = F({
2810
2878
  locale: { type: String, default: null }
2811
2879
  },
2812
2880
  setup(e, { emit: n, expose: a }) {
2813
- const l = U(e, n), { locale: u } = Q(() => e.locale), i = Re(), t = (f) => (Xe[u.value] || Xe.en)[f] ?? Xe.en[f] ?? f, d = `voice-${++Ge}`, g = e.channel ?? e.name ?? d, w = E(null), b = E([]), y = E(!1), $ = E(!1), T = E(0), o = E(null), r = E(!0), s = E(!1), c = /* @__PURE__ */ new Map();
2814
- let I = null, j = null, A = [], K = null, ee = 0, z = !1;
2815
- const ke = S(() => e.readonly || l.isDisabled.value), Ie = S(() => Ze(T.value)), Ce = S(() => b.value.some((f) => f.status === "uploading")), ve = S(() => !r.value || ke.value), Te = S(() => (we[g] || 0) > 0), Me = S(() => !e.resultTarget && (e.inlineResults ?? !Te.value)), ge = S(
2816
- () => y.value ? e.recordingClass : o.value ? e.problemClass : e.buttonClass
2817
- ), Be = S(() => $.value ? t("starting") : y.value ? t("recording") : Ce.value ? t("uploading") : t("idle")), ye = S(
2818
- () => y.value ? e.stopText ?? t("stop") : e.startText ?? t("start")
2881
+ const l = P(e, n), { locale: u } = Q(() => e.locale), i = Le(), t = (f) => (Ge[u.value] || Ge.en)[f] ?? Ge.en[f] ?? f, d = `voice-${++We}`, y = e.channel ?? e.name ?? d, w = E(null), g = E([]), p = E(!1), $ = E(!1), k = E(0), o = E(null), r = E(!0), s = E(!1), c = /* @__PURE__ */ new Map();
2882
+ let C = null, j = null, A = [], H = null, ee = 0, K = !1;
2883
+ const Ie = S(() => e.readonly || l.isDisabled.value), Ce = S(() => Ye(k.value)), Te = S(() => g.value.some((f) => f.status === "uploading")), ve = S(() => !r.value || Ie.value), Me = S(() => (we[y] || 0) > 0), Be = S(() => !e.resultTarget && (e.inlineResults ?? !Me.value)), ge = S(
2884
+ () => p.value ? e.recordingClass : o.value ? e.problemClass : e.buttonClass
2885
+ ), Ee = S(() => $.value ? t("starting") : p.value ? t("recording") : Te.value ? t("uploading") : t("idle")), ye = S(
2886
+ () => p.value ? e.stopText ?? t("stop") : e.startText ?? t("start")
2819
2887
  );
2820
- function Z(f, O, C = null) {
2821
- o.value = { code: f, message: t(f) }, n("error", { code: f, message: o.value.message, error: O ?? null, item: C });
2888
+ function Z(f, O, T = null) {
2889
+ o.value = { code: f, message: t(f) }, n("error", { code: f, message: o.value.message, error: O ?? null, item: T });
2822
2890
  }
2823
2891
  const ue = () => {
2824
2892
  o.value = null;
@@ -2827,53 +2895,53 @@ const ro = F({
2827
2895
  return e.multiple ? Array.isArray(f) ? f : f ? [f] : [] : f ? [f] : [];
2828
2896
  };
2829
2897
  function ne(f) {
2830
- const O = b.value.filter((B) => B.path).map((B) => B.path), C = e.multiple ? O : O[0] ?? null;
2831
- l.model.value = C, l.emitChange(C, f);
2898
+ const O = g.value.filter((B) => B.path).map((B) => B.path), T = e.multiple ? O : O[0] ?? null;
2899
+ l.model.value = T, l.emitChange(T, f);
2832
2900
  }
2833
2901
  function te() {
2834
2902
  const f = l.form.value;
2835
2903
  if (!f) return;
2836
- const O = b.value.filter((C) => C.status === "uploading");
2837
- f.uploading = O.length ? Math.min(99, Math.round(O.reduce((C, B) => C + B.percent, 0) / O.length)) : null;
2904
+ const O = g.value.filter((T) => T.status === "uploading");
2905
+ f.uploading = O.length ? Math.min(99, Math.round(O.reduce((T, B) => T + B.percent, 0) / O.length)) : null;
2838
2906
  }
2839
2907
  function be(f) {
2840
2908
  f.local && f.src && URL.revokeObjectURL(f.src);
2841
2909
  }
2842
2910
  function de() {
2843
2911
  const f = Pe();
2844
- !f.length && b.value.some((C) => C.path) && (b.value.filter((C) => C.path).forEach(be), b.value = b.value.filter((C) => !C.path));
2845
- const O = new Set(b.value.map((C) => C.path).filter(Boolean));
2846
- f.forEach((C) => {
2847
- O.has(C) || b.value.push(
2848
- ie({ id: `v${++Ge}`, path: C, src: e.playbackUrl(C), status: "done", percent: 100, seconds: null, error: "", local: !1, file: null })
2912
+ !f.length && g.value.some((T) => T.path) && (g.value.filter((T) => T.path).forEach(be), g.value = g.value.filter((T) => !T.path));
2913
+ const O = new Set(g.value.map((T) => T.path).filter(Boolean));
2914
+ f.forEach((T) => {
2915
+ O.has(T) || g.value.push(
2916
+ ie({ id: `v${++We}`, path: T, src: e.playbackUrl(T), status: "done", percent: 100, seconds: null, error: "", local: !1, file: null })
2849
2917
  );
2850
2918
  });
2851
2919
  }
2852
2920
  J(() => {
2853
2921
  var f;
2854
- s.value = !0, La(g, { owner: d, items: b, problem: o, locked: ke, t, remove: N, retry: k }), i.add(() => ja(g, d)), r.value = typeof navigator < "u" && !!((f = navigator.mediaDevices) != null && f.getUserMedia) && typeof MediaRecorder < "u", r.value ? X() : Z(typeof window < "u" && window.isSecureContext === !1 ? "insecure" : "unsupported"), de();
2855
- }), H(() => l.model.value, de, { deep: !0 });
2856
- async function X() {
2922
+ s.value = !0, Ga(y, { owner: d, items: g, problem: o, locked: Ie, t, remove: N, retry: I }), i.add(() => Wa(y, d)), r.value = typeof navigator < "u" && !!((f = navigator.mediaDevices) != null && f.getUserMedia) && typeof MediaRecorder < "u", r.value ? G() : Z(typeof window < "u" && window.isSecureContext === !1 ? "insecure" : "unsupported"), de();
2923
+ }), U(() => l.model.value, de, { deep: !0 });
2924
+ async function G() {
2857
2925
  var f;
2858
2926
  try {
2859
2927
  const O = await ((f = navigator.permissions) == null ? void 0 : f.query({ name: "microphone" }));
2860
2928
  if (!O || i.isDisposed()) return;
2861
- const C = () => {
2929
+ const T = () => {
2862
2930
  var B;
2863
2931
  O.state === "denied" ? Z("denied") : ((B = o.value) == null ? void 0 : B.code) === "denied" && ue();
2864
2932
  };
2865
- C(), O.addEventListener("change", C), i.add(() => O.removeEventListener("change", C));
2933
+ T(), O.addEventListener("change", T), i.add(() => O.removeEventListener("change", T));
2866
2934
  } catch {
2867
2935
  }
2868
2936
  }
2869
2937
  function ce() {
2870
2938
  j == null || j.getTracks().forEach((f) => f.stop()), j = null;
2871
2939
  }
2872
- function Ue() {
2873
- T.value = (Date.now() - ee) / 1e3, e.maxDuration && T.value >= e.maxDuration && _();
2940
+ function Ke() {
2941
+ k.value = (Date.now() - ee) / 1e3, e.maxDuration && k.value >= e.maxDuration && _();
2874
2942
  }
2875
- async function Ee() {
2876
- if (y.value || $.value || ve.value) return;
2943
+ async function Ae() {
2944
+ if (p.value || $.value || ve.value) return;
2877
2945
  ue(), $.value = !0;
2878
2946
  let f;
2879
2947
  try {
@@ -2881,61 +2949,61 @@ const ro = F({
2881
2949
  audio: Object.keys(e.audioConstraints || {}).length ? e.audioConstraints : !0
2882
2950
  });
2883
2951
  } catch (B) {
2884
- return $.value = !1, Z(oo(B), B);
2952
+ return $.value = !1, Z(mo(B), B);
2885
2953
  }
2886
2954
  if ($.value = !1, i.isDisposed()) {
2887
2955
  f.getTracks().forEach((B) => B.stop());
2888
2956
  return;
2889
2957
  }
2890
- const O = un();
2891
- let C;
2958
+ const O = cn();
2959
+ let T;
2892
2960
  try {
2893
- C = new MediaRecorder(f, { ...O ? { mimeType: O } : {}, audioBitsPerSecond: e.audioBitsPerSecond });
2961
+ T = new MediaRecorder(f, { ...O ? { mimeType: O } : {}, audioBitsPerSecond: e.audioBitsPerSecond });
2894
2962
  } catch {
2895
2963
  try {
2896
- C = new MediaRecorder(f);
2964
+ T = new MediaRecorder(f);
2897
2965
  } catch (D) {
2898
2966
  return f.getTracks().forEach((Y) => Y.stop()), Z("recorder", D);
2899
2967
  }
2900
2968
  }
2901
- j = f, I = C, A = [], z = !1, C.ondataavailable = (B) => {
2969
+ j = f, C = T, A = [], K = !1, T.ondataavailable = (B) => {
2902
2970
  var D;
2903
2971
  (D = B.data) != null && D.size && A.push(B.data);
2904
- }, C.onerror = (B) => {
2905
- z = !0, Z("recorder", B.error), _();
2906
- }, C.onstop = () => fe(C), f.getAudioTracks().forEach(
2972
+ }, T.onerror = (B) => {
2973
+ K = !0, Z("recorder", B.error), _();
2974
+ }, T.onstop = () => fe(T), f.getAudioTracks().forEach(
2907
2975
  (B) => B.addEventListener("ended", () => {
2908
- y.value && (Z("disconnected"), _());
2976
+ p.value && (Z("disconnected"), _());
2909
2977
  })
2910
- ), C.start(500), ee = Date.now(), T.value = 0, y.value = !0, K = setInterval(Ue, 250), n("start");
2978
+ ), T.start(500), ee = Date.now(), k.value = 0, p.value = !0, H = setInterval(Ke, 250), n("start");
2911
2979
  }
2912
2980
  function _() {
2913
- if (clearInterval(K), K = null, I && I.state !== "inactive")
2981
+ if (clearInterval(H), H = null, C && C.state !== "inactive")
2914
2982
  try {
2915
- I.stop();
2983
+ C.stop();
2916
2984
  } catch {
2917
- fe(I);
2985
+ fe(C);
2918
2986
  }
2919
- y.value = !1;
2987
+ p.value = !1;
2920
2988
  }
2921
2989
  function fe(f) {
2922
- clearInterval(K), K = null, y.value = !1;
2923
- const O = (Date.now() - ee) / 1e3, C = A;
2924
- if (A = [], ce(), I = null, z) return;
2990
+ clearInterval(H), H = null, p.value = !1;
2991
+ const O = (Date.now() - ee) / 1e3, T = A;
2992
+ if (A = [], ce(), C = null, K) return;
2925
2993
  n("stop", O);
2926
- const B = f.mimeType || un() || "audio/webm", D = new Blob(C, { type: B });
2994
+ const B = f.mimeType || cn() || "audio/webm", D = new Blob(T, { type: B });
2927
2995
  if (!D.size || O < 0.4) return Z("tooShort");
2928
- v(D, O);
2996
+ b(D, O);
2929
2997
  }
2930
- function Ae() {
2931
- return y.value ? _() : Ee();
2998
+ function Oe() {
2999
+ return p.value ? _() : Ae();
2932
3000
  }
2933
- function v(f, O) {
2934
- e.multiple || b.value.slice().forEach((D) => N(D, !1));
2935
- const C = new File([f], `voice-${Date.now()}.${ao(f.type)}`, { type: f.type }), B = ie({
2936
- id: `v${++Ge}`,
2937
- file: C,
2938
- src: URL.createObjectURL(C),
3001
+ function b(f, O) {
3002
+ e.multiple || g.value.slice().forEach((D) => N(D, !1));
3003
+ const T = new File([f], `voice-${Date.now()}.${po(f.type)}`, { type: f.type }), B = ie({
3004
+ id: `v${++We}`,
3005
+ file: T,
3006
+ src: URL.createObjectURL(T),
2939
3007
  seconds: Math.round(O),
2940
3008
  status: "uploading",
2941
3009
  percent: 0,
@@ -2943,41 +3011,41 @@ const ro = F({
2943
3011
  error: "",
2944
3012
  local: !0
2945
3013
  });
2946
- b.value = [...b.value, B], n("recorded", B), k(B);
3014
+ g.value = [...g.value, B], n("recorded", B), I(B);
2947
3015
  }
2948
- function k(f) {
3016
+ function I(f) {
2949
3017
  f.status = "uploading", f.percent = 0, f.error = "", te();
2950
3018
  const O = new FormData();
2951
3019
  O.append(e.fieldName, f.file, f.file.name);
2952
- const C = new XMLHttpRequest();
2953
- c.set(f.id, C), C.open("POST", e.url), Object.entries(Ne(e.headers)).forEach(([D, Y]) => C.setRequestHeader(D, Y)), C.upload.onprogress = (D) => {
3020
+ const T = new XMLHttpRequest();
3021
+ c.set(f.id, T), T.open("POST", e.url), Object.entries(qe(e.headers)).forEach(([D, Y]) => T.setRequestHeader(D, Y)), T.upload.onprogress = (D) => {
2954
3022
  D.lengthComputable && (f.percent = Math.round(D.loaded / D.total * 100), n("progress", f, f.percent), te());
2955
3023
  };
2956
3024
  const B = (D) => {
2957
3025
  c.delete(f.id), f.status = "error", f.error = D || t("uploadFailed"), te(), Z("uploadFailed", null, f), o.value = { code: "uploadFailed", message: f.error };
2958
3026
  };
2959
- C.onerror = () => B(), C.onload = () => {
3027
+ T.onerror = () => B(), T.onload = () => {
2960
3028
  let D = null;
2961
3029
  try {
2962
- D = JSON.parse(C.responseText);
3030
+ D = JSON.parse(T.responseText);
2963
3031
  } catch {
2964
3032
  }
2965
- if (C.status < 200 || C.status >= 300) {
2966
- const Oe = D != null && D.errors ? Object.values(D.errors)[0] : null;
2967
- return B((D == null ? void 0 : D.message) || (Array.isArray(Oe) ? Oe[0] : Oe));
3033
+ if (T.status < 200 || T.status >= 300) {
3034
+ const Ve = D != null && D.errors ? Object.values(D.errors)[0] : null;
3035
+ return B((D == null ? void 0 : D.message) || (Array.isArray(Ve) ? Ve[0] : Ve));
2968
3036
  }
2969
- const Y = (D == null ? void 0 : D.data) ?? D, _e = (Y == null ? void 0 : Y.path) ?? (Y == null ? void 0 : Y.url);
2970
- if (!_e) return B();
2971
- c.delete(f.id), f.path = _e, f.status = "done", f.percent = 100, te(), ue(), ne(), n("uploaded", f, D);
2972
- }, C.send(O);
3037
+ const Y = (D == null ? void 0 : D.data) ?? D, en = (Y == null ? void 0 : Y.path) ?? (Y == null ? void 0 : Y.url);
3038
+ if (!en) return B();
3039
+ c.delete(f.id), f.path = en, f.status = "done", f.percent = 100, te(), ue(), ne(), n("uploaded", f, D);
3040
+ }, T.send(O);
2973
3041
  }
2974
3042
  async function N(f, O = !0) {
2975
- var C;
2976
- if ((C = c.get(f.id)) == null || C.abort(), c.delete(f.id), be(f), b.value = b.value.filter((B) => B.id !== f.id), te(), f.path && (ne(), e.deleteOnRemove))
3043
+ var T;
3044
+ if ((T = c.get(f.id)) == null || T.abort(), c.delete(f.id), be(f), g.value = g.value.filter((B) => B.id !== f.id), te(), f.path && (ne(), e.deleteOnRemove))
2977
3045
  try {
2978
3046
  await fetch(e.url, {
2979
3047
  method: "DELETE",
2980
- headers: Ne(e.headers),
3048
+ headers: qe(e.headers),
2981
3049
  credentials: "same-origin",
2982
3050
  body: f.path
2983
3051
  });
@@ -2986,53 +3054,53 @@ const ro = F({
2986
3054
  O && n("removed", f);
2987
3055
  }
2988
3056
  return i.add(() => {
2989
- if (z = !0, clearInterval(K), I && I.state !== "inactive")
3057
+ if (K = !0, clearInterval(H), C && C.state !== "inactive")
2990
3058
  try {
2991
- I.stop();
3059
+ C.stop();
2992
3060
  } catch {
2993
3061
  }
2994
- ce(), c.forEach((f) => f.abort()), c.clear(), b.value.forEach(be), l.form.value && (l.form.value.uploading = null);
2995
- }), a({ start: Ee, stop: _, toggle: Ae, channel: g }), {
3062
+ ce(), c.forEach((f) => f.abort()), c.clear(), g.value.forEach(be), l.form.value && (l.form.value.uploading = null);
3063
+ }), a({ start: Ae, stop: _, toggle: Oe, channel: y }), {
2996
3064
  ...l,
2997
3065
  t,
2998
3066
  root: w,
2999
- items: b,
3000
- recording: y,
3067
+ items: g,
3068
+ recording: p,
3001
3069
  starting: $,
3002
- seconds: T,
3003
- time: Ie,
3070
+ seconds: k,
3071
+ time: Ce,
3004
3072
  problem: o,
3005
3073
  supported: r,
3006
3074
  blocked: ve,
3007
3075
  mounted: s,
3008
- channelKey: g,
3009
- showInline: Me,
3076
+ channelKey: y,
3077
+ showInline: Be,
3010
3078
  stateClass: ge,
3011
- statusText: Be,
3079
+ statusText: Ee,
3012
3080
  buttonLabel: ye,
3013
- toggle: Ae,
3014
- formatTime: Ze
3081
+ toggle: Oe,
3082
+ formatTime: Ye
3015
3083
  };
3016
3084
  }
3017
- }), so = ["id"], io = {
3085
+ }), vo = ["id"], go = {
3018
3086
  key: 0,
3019
3087
  class: "voice-recorder-box p-5"
3020
- }, uo = { class: "card-body" }, co = { class: "row gx-5" }, fo = {
3088
+ }, yo = { class: "card-body" }, bo = { class: "row gx-5" }, $o = {
3021
3089
  key: 0,
3022
3090
  class: "col-auto mx-auto"
3023
- }, po = { class: "col-12 text-center" }, mo = { class: "row gx-5 align-items-center" }, ho = { class: "col-auto" }, vo = ["disabled", "aria-label", "aria-pressed"], go = {
3091
+ }, wo = { class: "col-12 text-center" }, So = { class: "row gx-5 align-items-center" }, ko = { class: "col-auto" }, Io = ["disabled", "aria-label", "aria-pressed"], Co = {
3024
3092
  key: 0,
3025
3093
  class: "spinner-border spinner-sm",
3026
3094
  role: "status",
3027
3095
  "aria-hidden": "true"
3028
- }, yo = {
3096
+ }, To = {
3029
3097
  key: 1,
3030
3098
  width: "18",
3031
3099
  height: "18",
3032
3100
  viewBox: "0 0 16 16",
3033
3101
  fill: "currentColor",
3034
3102
  "aria-hidden": "true"
3035
- }, bo = {
3103
+ }, Mo = {
3036
3104
  key: 2,
3037
3105
  width: "18",
3038
3106
  height: "18",
@@ -3043,22 +3111,22 @@ const ro = F({
3043
3111
  "stroke-linecap": "round",
3044
3112
  "stroke-linejoin": "round",
3045
3113
  "aria-hidden": "true"
3046
- }, $o = { class: "col" }, wo = { class: "flex-grow-1 text-center" }, So = {
3114
+ }, Bo = { class: "col" }, Eo = { class: "flex-grow-1 text-center" }, Ao = {
3047
3115
  class: "fw-semibold",
3048
3116
  role: "status",
3049
3117
  "aria-live": "polite"
3050
- }, ko = {
3118
+ }, Oo = {
3051
3119
  class: "fg-secondary fanum",
3052
3120
  dir: "ltr"
3053
- }, Io = {
3121
+ }, Vo = {
3054
3122
  key: 0,
3055
3123
  class: "col-auto"
3056
- }, Co = ["disabled", "aria-pressed"], To = {
3124
+ }, Do = ["disabled", "aria-pressed"], No = {
3057
3125
  key: 0,
3058
3126
  class: "spinner-border spinner-sm me-2",
3059
3127
  role: "status",
3060
3128
  "aria-hidden": "true"
3061
- }, Mo = {
3129
+ }, qo = {
3062
3130
  key: 1,
3063
3131
  class: "me-2",
3064
3132
  width: "16",
@@ -3066,7 +3134,7 @@ const ro = F({
3066
3134
  viewBox: "0 0 16 16",
3067
3135
  fill: "currentColor",
3068
3136
  "aria-hidden": "true"
3069
- }, Bo = {
3137
+ }, Fo = {
3070
3138
  key: 2,
3071
3139
  class: "me-2",
3072
3140
  width: "16",
@@ -3078,76 +3146,76 @@ const ro = F({
3078
3146
  "stroke-linecap": "round",
3079
3147
  "stroke-linejoin": "round",
3080
3148
  "aria-hidden": "true"
3081
- }, Eo = {
3149
+ }, Ro = {
3082
3150
  key: 3,
3083
3151
  class: "ms-2 fanum",
3084
3152
  dir: "ltr"
3085
3153
  };
3086
- function Ao(e, n, a, l, u, i) {
3154
+ function Lo(e, n, a, l, u, i) {
3087
3155
  const t = oe("VoiceRecorderResultArea");
3088
- return p(), h("div", {
3156
+ return m(), v("div", {
3089
3157
  ref: "root",
3090
3158
  class: q(["voice-recorder", { "is-invalid": e.isInvalid }]),
3091
3159
  id: e.inputId
3092
3160
  }, [
3093
- e.variant === "box" ? (p(), h("div", io, [
3094
- m("div", uo, [
3095
- m("div", co, [
3096
- e.showInline && e.problem ? (p(), h("div", fo, [
3097
- De(t, {
3161
+ e.variant === "box" ? (m(), v("div", go, [
3162
+ h("div", yo, [
3163
+ h("div", bo, [
3164
+ e.showInline && e.problem ? (m(), v("div", $o, [
3165
+ Ne(t, {
3098
3166
  for: e.channelKey,
3099
3167
  internal: "",
3100
3168
  "show-list": !1,
3101
3169
  "alert-class": "alert theme-danger p-1 text-center mb-4"
3102
3170
  }, null, 8, ["for"])
3103
3171
  ])) : M("", !0),
3104
- m("div", po, [
3105
- m("div", {
3172
+ h("div", wo, [
3173
+ h("div", {
3106
3174
  class: "btn btn-subtle mx-auto p-3",
3107
3175
  onClick: n[0] || (n[0] = (...d) => e.toggle && e.toggle(...d))
3108
3176
  }, [
3109
- m("div", mo, [
3110
- m("div", ho, [
3111
- m("button", {
3177
+ h("div", So, [
3178
+ h("div", ko, [
3179
+ h("button", {
3112
3180
  type: "button",
3113
3181
  class: q(["btn", e.stateClass]),
3114
3182
  disabled: e.blocked || e.starting,
3115
3183
  "aria-label": e.buttonLabel,
3116
3184
  "aria-pressed": e.recording
3117
3185
  }, [
3118
- e.starting ? (p(), h("span", go)) : e.recording ? (p(), h("svg", yo, n[2] || (n[2] = [
3119
- m("rect", {
3186
+ e.starting ? (m(), v("span", Co)) : e.recording ? (m(), v("svg", To, n[2] || (n[2] = [
3187
+ h("rect", {
3120
3188
  x: "3.5",
3121
3189
  y: "3.5",
3122
3190
  width: "9",
3123
3191
  height: "9",
3124
3192
  rx: "1.5"
3125
3193
  }, null, -1)
3126
- ]))) : (p(), h("svg", bo, n[3] || (n[3] = [
3127
- m("rect", {
3194
+ ]))) : (m(), v("svg", Mo, n[3] || (n[3] = [
3195
+ h("rect", {
3128
3196
  x: "5.5",
3129
3197
  y: "1.5",
3130
3198
  width: "5",
3131
3199
  height: "8",
3132
3200
  rx: "2.5"
3133
3201
  }, null, -1),
3134
- m("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
3202
+ h("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
3135
3203
  ])))
3136
- ], 10, vo)
3204
+ ], 10, Io)
3137
3205
  ]),
3138
- m("div", $o, [
3139
- m("div", wo, [
3140
- m("div", So, V(e.statusText), 1),
3141
- m("div", ko, [
3206
+ h("div", Bo, [
3207
+ h("div", Eo, [
3208
+ h("div", Ao, V(e.statusText), 1),
3209
+ h("div", Oo, [
3142
3210
  x(V(e.time) + " ", 1),
3143
- e.maxDuration ? (p(), h(W, { key: 0 }, [
3211
+ e.maxDuration ? (m(), v(W, { key: 0 }, [
3144
3212
  x(" / " + V(e.formatTime(e.maxDuration)), 1)
3145
3213
  ], 64)) : M("", !0)
3146
3214
  ])
3147
3215
  ])
3148
3216
  ]),
3149
- e.recording ? (p(), h("div", Io, n[4] || (n[4] = [
3150
- m("span", {
3217
+ e.recording ? (m(), v("div", Vo, n[4] || (n[4] = [
3218
+ h("span", {
3151
3219
  class: "spinner-grow spinner-sm fg-danger",
3152
3220
  role: "status",
3153
3221
  "aria-hidden": "true"
@@ -3157,7 +3225,7 @@ function Ao(e, n, a, l, u, i) {
3157
3225
  ])
3158
3226
  ])
3159
3227
  ]),
3160
- e.showInline && e.showList ? (p(), le(t, {
3228
+ e.showInline && e.showList ? (m(), le(t, {
3161
3229
  key: 0,
3162
3230
  class: "d-block mt-2",
3163
3231
  for: e.channelKey,
@@ -3165,8 +3233,8 @@ function Ao(e, n, a, l, u, i) {
3165
3233
  "show-problem": !1
3166
3234
  }, null, 8, ["for"])) : M("", !0)
3167
3235
  ])
3168
- ])) : (p(), h(W, { key: 1 }, [
3169
- m("button", {
3236
+ ])) : (m(), v(W, { key: 1 }, [
3237
+ h("button", {
3170
3238
  type: "button",
3171
3239
  disabled: e.blocked || e.starting,
3172
3240
  "aria-pressed": e.recording,
@@ -3179,29 +3247,29 @@ function Ao(e, n, a, l, u, i) {
3179
3247
  seconds: e.seconds,
3180
3248
  time: e.time
3181
3249
  }, () => [
3182
- e.starting ? (p(), h("span", To)) : e.recording ? (p(), h("svg", Mo, n[5] || (n[5] = [
3183
- m("rect", {
3250
+ e.starting ? (m(), v("span", No)) : e.recording ? (m(), v("svg", qo, n[5] || (n[5] = [
3251
+ h("rect", {
3184
3252
  x: "3.5",
3185
3253
  y: "3.5",
3186
3254
  width: "9",
3187
3255
  height: "9",
3188
3256
  rx: "1.5"
3189
3257
  }, null, -1)
3190
- ]))) : (p(), h("svg", Bo, n[6] || (n[6] = [
3191
- m("rect", {
3258
+ ]))) : (m(), v("svg", Fo, n[6] || (n[6] = [
3259
+ h("rect", {
3192
3260
  x: "5.5",
3193
3261
  y: "1.5",
3194
3262
  width: "5",
3195
3263
  height: "8",
3196
3264
  rx: "2.5"
3197
3265
  }, null, -1),
3198
- m("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
3266
+ h("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
3199
3267
  ]))),
3200
3268
  x(" " + V(e.buttonLabel) + " ", 1),
3201
- e.recording ? (p(), h("span", Eo, V(e.time), 1)) : M("", !0)
3269
+ e.recording ? (m(), v("span", Ro, V(e.time), 1)) : M("", !0)
3202
3270
  ])
3203
- ], 10, Co),
3204
- e.showInline ? (p(), le(t, {
3271
+ ], 10, Do),
3272
+ e.showInline ? (m(), le(t, {
3205
3273
  key: 0,
3206
3274
  class: "d-block mt-2",
3207
3275
  for: e.channelKey,
@@ -3209,20 +3277,20 @@ function Ao(e, n, a, l, u, i) {
3209
3277
  "show-list": e.showList
3210
3278
  }, null, 8, ["for", "show-list"])) : M("", !0)
3211
3279
  ], 64)),
3212
- e.resultTarget && e.mounted ? (p(), le(kn, {
3280
+ e.resultTarget && e.mounted ? (m(), le(Cn, {
3213
3281
  key: 2,
3214
3282
  to: e.resultTarget
3215
3283
  }, [
3216
- De(t, {
3284
+ Ne(t, {
3217
3285
  for: e.channelKey,
3218
3286
  internal: "",
3219
3287
  "show-list": e.showList
3220
3288
  }, null, 8, ["for", "show-list"])
3221
3289
  ], 8, ["to"])) : M("", !0)
3222
- ], 10, so);
3290
+ ], 10, vo);
3223
3291
  }
3224
- const Oo = /* @__PURE__ */ R(ro, [["render", Ao]]);
3225
- function Po() {
3292
+ const jo = /* @__PURE__ */ R(ho, [["render", Lo]]);
3293
+ function Qo() {
3226
3294
  const e = me("form", null), n = me("formApi", null);
3227
3295
  return {
3228
3296
  form: e,
@@ -3236,84 +3304,87 @@ function Po() {
3236
3304
  }
3237
3305
  };
3238
3306
  }
3239
- const Vo = pn, Do = yn, No = xe, qo = {
3240
- AmountInput: Vn,
3241
- CaptchaInput: jn,
3242
- VoiceRecorderInput: Oo,
3243
- VoiceRecorderResultArea: bn,
3244
- CheckboxButtonInput: Hn,
3245
- CheckboxInput: Jn,
3246
- CheckboxToggle: rt,
3247
- ChipsInput: pt,
3248
- ComboboxInput: pn,
3249
- EmailInput: Lt,
3250
- FileInput: mn,
3251
- FormAdornInput: xe,
3252
- FormContainer: ml,
3253
- FormField: Cl,
3254
- FormLabel: hn,
3255
- GroupControl: vn,
3256
- MobileInput: Ol,
3257
- MultiQuantityInput: Wl,
3258
- OTPInput: xl,
3259
- PasswordInput: sa,
3260
- QuantityInput: gn,
3261
- RangeInput: yn,
3262
- SimpleUploader: ma,
3263
- StarRatingInput: $a,
3264
- SubmitButton: Ta,
3265
- SwitchInput: Da,
3266
- TextAreaInput: Ra,
3307
+ const zo = hn, Po = $n, Ko = _e, Uo = {
3308
+ AmountInput: Nn,
3309
+ ShebaInput: at,
3310
+ CreditCardInput: ut,
3311
+ CaptchaInput: Pn,
3312
+ VoiceRecorderInput: jo,
3313
+ VoiceRecorderResultArea: wn,
3314
+ CheckboxButtonInput: Xn,
3315
+ CheckboxInput: Yn,
3316
+ CheckboxToggle: mt,
3317
+ ChipsInput: wt,
3318
+ ComboboxInput: hn,
3319
+ EmailInput: Gt,
3320
+ FileInput: vn,
3321
+ FormAdornInput: _e,
3322
+ FormContainer: Sl,
3323
+ FormField: Dl,
3324
+ FormLabel: gn,
3325
+ GroupControl: yn,
3326
+ MobileInput: jl,
3327
+ MultiQuantityInput: na,
3328
+ OTPInput: ra,
3329
+ PasswordInput: ha,
3330
+ QuantityInput: bn,
3331
+ RangeInput: $n,
3332
+ SimpleUploader: Sa,
3333
+ StarRatingInput: Ba,
3334
+ SubmitButton: Na,
3335
+ SwitchInput: Pa,
3336
+ TextAreaInput: Xa,
3267
3337
  TextInput: ze,
3268
3338
  // aliases
3269
- Select2Input: Vo,
3270
- RangeSliderInput: Do,
3271
- FormAdorn: No
3272
- }, Uo = {
3339
+ Select2Input: zo,
3340
+ RangeSliderInput: Po,
3341
+ FormAdorn: Ko
3342
+ }, Jo = {
3273
3343
  install(e, n = {}) {
3274
- (n.locale || n.messages) && In(n), n.bootstrap && st(n.bootstrap), Object.entries(qo).forEach(([a, l]) => e.component(a, l));
3344
+ (n.locale || n.messages) && Tn(n), n.bootstrap && ht(n.bootstrap), Object.entries(Uo).forEach(([a, l]) => e.component(a, l));
3275
3345
  }
3276
3346
  };
3277
3347
  export {
3278
- Vn as AmountInput,
3279
- jn as CaptchaInput,
3280
- Hn as CheckboxButtonInput,
3281
- Jn as CheckboxInput,
3282
- rt as CheckboxToggle,
3283
- pt as ChipsInput,
3284
- pn as ComboboxInput,
3285
- Lt as EmailInput,
3286
- mn as FileInput,
3287
- No as FormAdorn,
3288
- xe as FormAdornInput,
3289
- ml as FormContainer,
3290
- Cl as FormField,
3291
- hn as FormLabel,
3292
- vn as GroupControl,
3293
- Ol as MobileInput,
3294
- Wl as MultiQuantityInput,
3295
- xl as OTPInput,
3296
- sa as PasswordInput,
3297
- gn as QuantityInput,
3298
- yn as RangeInput,
3299
- Do as RangeSliderInput,
3300
- Vo as Select2Input,
3301
- zo as ShebaInput,
3302
- ma as SimpleUploader,
3303
- $a as StarRatingInput,
3304
- Ta as SubmitButton,
3305
- Da as SwitchInput,
3306
- Ra as TextAreaInput,
3348
+ Nn as AmountInput,
3349
+ Pn as CaptchaInput,
3350
+ Xn as CheckboxButtonInput,
3351
+ Yn as CheckboxInput,
3352
+ mt as CheckboxToggle,
3353
+ wt as ChipsInput,
3354
+ hn as ComboboxInput,
3355
+ ut as CreditCardInput,
3356
+ Gt as EmailInput,
3357
+ vn as FileInput,
3358
+ Ko as FormAdorn,
3359
+ _e as FormAdornInput,
3360
+ Sl as FormContainer,
3361
+ Dl as FormField,
3362
+ gn as FormLabel,
3363
+ yn as GroupControl,
3364
+ jl as MobileInput,
3365
+ na as MultiQuantityInput,
3366
+ ra as OTPInput,
3367
+ ha as PasswordInput,
3368
+ bn as QuantityInput,
3369
+ $n as RangeInput,
3370
+ Po as RangeSliderInput,
3371
+ zo as Select2Input,
3372
+ at as ShebaInput,
3373
+ Sa as SimpleUploader,
3374
+ Ba as StarRatingInput,
3375
+ Na as SubmitButton,
3376
+ Pa as SwitchInput,
3377
+ Xa as TextAreaInput,
3307
3378
  ze as TextInput,
3308
- Oo as VoiceRecorderInput,
3309
- bn as VoiceRecorderResultArea,
3310
- st as configureBootstrap,
3311
- In as configureI18n,
3312
- Uo as default,
3313
- P as fieldProps,
3314
- Le as toEnglishDigits,
3379
+ jo as VoiceRecorderInput,
3380
+ wn as VoiceRecorderResultArea,
3381
+ ht as configureBootstrap,
3382
+ Tn as configureI18n,
3383
+ Jo as default,
3384
+ z as fieldProps,
3385
+ ke as toEnglishDigits,
3315
3386
  he as useBsInstance,
3316
- Re as useDisposables,
3317
- U as useField,
3318
- Po as useFormApi
3387
+ Le as useDisposables,
3388
+ P as useField,
3389
+ Qo as useFormApi
3319
3390
  };