inertia-bootstrap-forms 4.0.2 → 4.0.4

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