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