@sfxcode/formkit-primevue 0.7.5 → 0.8.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/README.md +3 -0
- package/package.json +25 -24
- package/dist/formkit-primevue.es.js +0 -2383
- package/dist/formkit-primevue.umd.js +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index_form.json +0 -156
- package/dist/manifest.json +0 -7
- package/dist/sass/formkit-prime-inputs.scss +0 -55
- package/dist/sass/formkit-primevue.scss +0 -87
|
@@ -1,2383 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, getCurrentInstance as ft, watch as ce, watchEffect as Z, reactive as At, h as pe, ref as ie, inject as de, computed as Et, provide as xt, toRef as Rt, onUnmounted as jt, isRef as je, isReactive as Ze, toRaw as Mt, markRaw as Tt, createTextVNode as Lt, resolveComponent as T, openBlock as A, createElementBlock as H, normalizeClass as F, unref as u, createCommentVNode as G, createVNode as Me, createBlock as U, Fragment as ct, toDisplayString as me } from "vue";
|
|
2
|
-
function pt() {
|
|
3
|
-
return Math.random().toString(36).substring(2, 15);
|
|
4
|
-
}
|
|
5
|
-
function Ft(e, n) {
|
|
6
|
-
const t = e instanceof Set ? e : new Set(e);
|
|
7
|
-
return n && n.forEach((r) => t.add(r)), [...t];
|
|
8
|
-
}
|
|
9
|
-
function R(e, n) {
|
|
10
|
-
return Object.prototype.hasOwnProperty.call(e, n);
|
|
11
|
-
}
|
|
12
|
-
function Te(e, n, t = !0, r = ["__key"]) {
|
|
13
|
-
if (e === n)
|
|
14
|
-
return !0;
|
|
15
|
-
if (typeof n == "object" && typeof e == "object") {
|
|
16
|
-
if (e instanceof Map || e instanceof Set || e instanceof Date || e === null || n === null || Object.keys(e).length !== Object.keys(n).length)
|
|
17
|
-
return !1;
|
|
18
|
-
for (const i of r)
|
|
19
|
-
if ((i in e || i in n) && e[i] !== n[i])
|
|
20
|
-
return !1;
|
|
21
|
-
for (const i in e)
|
|
22
|
-
if (!(i in n) || e[i] !== n[i] && !t || t && !Te(e[i], n[i], t, r))
|
|
23
|
-
return !1;
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
return !1;
|
|
27
|
-
}
|
|
28
|
-
function Ve(e) {
|
|
29
|
-
return Object.prototype.toString.call(e) === "[object Object]";
|
|
30
|
-
}
|
|
31
|
-
function Ie(e) {
|
|
32
|
-
return Ve(e) || Array.isArray(e);
|
|
33
|
-
}
|
|
34
|
-
function ye(e) {
|
|
35
|
-
if (Ve(e) === !1 || e.__FKNode__ || e.__POJO__ === !1)
|
|
36
|
-
return !1;
|
|
37
|
-
const n = e.constructor;
|
|
38
|
-
if (n === void 0)
|
|
39
|
-
return !0;
|
|
40
|
-
const t = n.prototype;
|
|
41
|
-
return !(Ve(t) === !1 || t.hasOwnProperty("isPrototypeOf") === !1);
|
|
42
|
-
}
|
|
43
|
-
function Le(e, n, t = !1, r = !1) {
|
|
44
|
-
if (n === null)
|
|
45
|
-
return null;
|
|
46
|
-
const i = {};
|
|
47
|
-
if (typeof n == "string")
|
|
48
|
-
return n;
|
|
49
|
-
for (const s in e)
|
|
50
|
-
if (R(n, s) && (n[s] !== void 0 || !r)) {
|
|
51
|
-
if (t && Array.isArray(e[s]) && Array.isArray(n[s])) {
|
|
52
|
-
i[s] = e[s].concat(n[s]);
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
if (n[s] === void 0)
|
|
56
|
-
continue;
|
|
57
|
-
ye(e[s]) && ye(n[s]) ? i[s] = Le(e[s], n[s], t, r) : i[s] = n[s];
|
|
58
|
-
} else
|
|
59
|
-
i[s] = e[s];
|
|
60
|
-
for (const s in n)
|
|
61
|
-
!R(i, s) && n[s] !== void 0 && (i[s] = n[s]);
|
|
62
|
-
return i;
|
|
63
|
-
}
|
|
64
|
-
function Wt(e) {
|
|
65
|
-
if (e[0] !== '"' && e[0] !== "'" || e[0] !== e[e.length - 1])
|
|
66
|
-
return !1;
|
|
67
|
-
const n = e[0];
|
|
68
|
-
for (let t = 1; t < e.length; t++)
|
|
69
|
-
if (e[t] === n && (t === 1 || e[t - 1] !== "\\") && t !== e.length - 1)
|
|
70
|
-
return !1;
|
|
71
|
-
return !0;
|
|
72
|
-
}
|
|
73
|
-
function Dt(e) {
|
|
74
|
-
if (!e.length)
|
|
75
|
-
return "";
|
|
76
|
-
let n = "", t = "";
|
|
77
|
-
for (let r = 0; r < e.length; r++) {
|
|
78
|
-
const i = e.charAt(r);
|
|
79
|
-
(i !== "\\" || t === "\\") && (n += i), t = i;
|
|
80
|
-
}
|
|
81
|
-
return n;
|
|
82
|
-
}
|
|
83
|
-
function Y(...e) {
|
|
84
|
-
return e.reduce((n, t) => {
|
|
85
|
-
const { value: r, name: i, modelValue: s, config: o, plugins: a, ...m } = t;
|
|
86
|
-
return Object.assign(n, m);
|
|
87
|
-
}, {});
|
|
88
|
-
}
|
|
89
|
-
function Ut(e) {
|
|
90
|
-
const n = [];
|
|
91
|
-
let t = "", r = 0, i = "", s = "";
|
|
92
|
-
for (let o = 0; o < e.length; o++) {
|
|
93
|
-
const a = e.charAt(o);
|
|
94
|
-
a === i && s !== "\\" ? i = "" : (a === "'" || a === '"') && !i && s !== "\\" ? i = a : a === "(" && !i ? r++ : a === ")" && !i && r--, a === "," && !i && r === 0 ? (n.push(t), t = "") : (a !== " " || i) && (t += a), s = a;
|
|
95
|
-
}
|
|
96
|
-
return t && n.push(t), n;
|
|
97
|
-
}
|
|
98
|
-
function Je(e, n) {
|
|
99
|
-
const t = {}, r = n.filter((s) => s instanceof RegExp), i = new Set(n);
|
|
100
|
-
for (const s in e)
|
|
101
|
-
!i.has(s) && !r.some((o) => o.test(s)) && (t[s] = e[s]);
|
|
102
|
-
return t;
|
|
103
|
-
}
|
|
104
|
-
function Qe(e, n) {
|
|
105
|
-
const t = {}, r = n.filter((i) => i instanceof RegExp);
|
|
106
|
-
return n.forEach((i) => {
|
|
107
|
-
i instanceof RegExp || (t[i] = e[i]);
|
|
108
|
-
}), Object.keys(e).forEach((i) => {
|
|
109
|
-
r.some((s) => s.test(i)) && (t[i] = e[i]);
|
|
110
|
-
}), t;
|
|
111
|
-
}
|
|
112
|
-
function oe(e) {
|
|
113
|
-
return e.replace(/-([a-z0-9])/gi, (n, t) => t.toUpperCase());
|
|
114
|
-
}
|
|
115
|
-
function dt(e) {
|
|
116
|
-
return e.replace(/([a-z0-9])([A-Z])/g, (n, t, r) => t + "-" + r.toLowerCase()).replace(" ", "-").toLowerCase();
|
|
117
|
-
}
|
|
118
|
-
function he(e, n = ["__key", "__init"]) {
|
|
119
|
-
if (e === null || e instanceof RegExp || e instanceof Date || e instanceof Map || e instanceof Set || typeof File == "function" && e instanceof File)
|
|
120
|
-
return e;
|
|
121
|
-
let t;
|
|
122
|
-
Array.isArray(e) ? t = e.map((r) => typeof r == "object" ? he(r, n) : r) : t = Object.keys(e).reduce((r, i) => (r[i] = typeof e[i] == "object" ? he(e[i], n) : e[i], r), {});
|
|
123
|
-
for (const r of n)
|
|
124
|
-
r in e && Object.defineProperty(t, r, {
|
|
125
|
-
enumerable: !1,
|
|
126
|
-
value: e[r]
|
|
127
|
-
});
|
|
128
|
-
return t;
|
|
129
|
-
}
|
|
130
|
-
function Q(e) {
|
|
131
|
-
return typeof e == "object" ? he(e) : e;
|
|
132
|
-
}
|
|
133
|
-
function Kt(e, n) {
|
|
134
|
-
if (!e || typeof e != "object")
|
|
135
|
-
return null;
|
|
136
|
-
const t = n.split(".");
|
|
137
|
-
let r = e;
|
|
138
|
-
for (const i in t) {
|
|
139
|
-
const s = t[i];
|
|
140
|
-
if (R(r, s) && (r = r[s]), +i === t.length - 1)
|
|
141
|
-
return r;
|
|
142
|
-
if (!r || typeof r != "object")
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
147
|
-
function Ye(e) {
|
|
148
|
-
return e !== void 0 && e !== "false" && e !== !1 ? !0 : void 0;
|
|
149
|
-
}
|
|
150
|
-
function re(e) {
|
|
151
|
-
return Object.isFrozen(e) ? e : Object.defineProperty(e, "__init", {
|
|
152
|
-
enumerable: !1,
|
|
153
|
-
value: !0
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
function mt(e) {
|
|
157
|
-
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]/g, " ").trim().replace(/\s+/g, "-");
|
|
158
|
-
}
|
|
159
|
-
function Fe() {
|
|
160
|
-
const e = [];
|
|
161
|
-
let n = 0;
|
|
162
|
-
const t = (i) => e.push(i), r = (i) => {
|
|
163
|
-
const s = e[n];
|
|
164
|
-
return typeof s == "function" ? s(i, (o) => (n++, r(o === void 0 ? i : o))) : (n = 0, i);
|
|
165
|
-
};
|
|
166
|
-
return t.dispatch = r, t.unshift = (i) => e.unshift(i), t.remove = (i) => {
|
|
167
|
-
const s = e.indexOf(i);
|
|
168
|
-
s > -1 && e.splice(s, 1);
|
|
169
|
-
}, t;
|
|
170
|
-
}
|
|
171
|
-
function yt() {
|
|
172
|
-
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
173
|
-
let t;
|
|
174
|
-
const r = (i, s) => {
|
|
175
|
-
if (t) {
|
|
176
|
-
t.set(s.name, [i, s]);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
e.has(s.name) && e.get(s.name).forEach((o) => {
|
|
180
|
-
(s.origin === i || o.modifiers.includes("deep")) && o.listener(s);
|
|
181
|
-
}), s.bubble && i.bubble(s);
|
|
182
|
-
};
|
|
183
|
-
return r.on = (i, s) => {
|
|
184
|
-
const [o, ...a] = i.split("."), m = s.receipt || pt(), h = {
|
|
185
|
-
modifiers: a,
|
|
186
|
-
event: o,
|
|
187
|
-
listener: s,
|
|
188
|
-
receipt: m
|
|
189
|
-
};
|
|
190
|
-
return e.has(o) ? e.get(o).push(h) : e.set(o, [h]), n.has(m) ? n.get(m).push(o) : n.set(m, [o]), m;
|
|
191
|
-
}, r.off = (i) => {
|
|
192
|
-
var s;
|
|
193
|
-
n.has(i) && ((s = n.get(i)) === null || s === void 0 || s.forEach((o) => {
|
|
194
|
-
const a = e.get(o);
|
|
195
|
-
Array.isArray(a) && e.set(o, a.filter((m) => m.receipt !== i));
|
|
196
|
-
}), n.delete(i));
|
|
197
|
-
}, r.pause = (i) => {
|
|
198
|
-
t || (t = /* @__PURE__ */ new Map()), i && i.walk((s) => s._e.pause());
|
|
199
|
-
}, r.play = (i) => {
|
|
200
|
-
if (!t)
|
|
201
|
-
return;
|
|
202
|
-
const s = t;
|
|
203
|
-
t = void 0, s.forEach(([o, a]) => r(o, a)), i && i.walk((o) => o._e.play());
|
|
204
|
-
}, r;
|
|
205
|
-
}
|
|
206
|
-
function qt(e, n, t, r, i = !0) {
|
|
207
|
-
return n._e(e, {
|
|
208
|
-
payload: r,
|
|
209
|
-
name: t,
|
|
210
|
-
bubble: i,
|
|
211
|
-
origin: e
|
|
212
|
-
}), e;
|
|
213
|
-
}
|
|
214
|
-
function zt(e, n, t) {
|
|
215
|
-
return be(e.parent) && e.parent._e(e.parent, t), e;
|
|
216
|
-
}
|
|
217
|
-
function Bt(e, n, t, r) {
|
|
218
|
-
return n._e.on(t, r);
|
|
219
|
-
}
|
|
220
|
-
function Nt(e, n, t) {
|
|
221
|
-
return n._e.off(t), e;
|
|
222
|
-
}
|
|
223
|
-
const We = Fe();
|
|
224
|
-
We((e, n) => (e.message || (e.message = String(`E${e.code}`)), n(e)));
|
|
225
|
-
const De = Fe();
|
|
226
|
-
De((e, n) => {
|
|
227
|
-
e.message || (e.message = String(`W${e.code}`));
|
|
228
|
-
const t = n(e);
|
|
229
|
-
return console && typeof console.warn == "function" && console.warn(t.message), t;
|
|
230
|
-
});
|
|
231
|
-
function ve(e, n = {}) {
|
|
232
|
-
De.dispatch({ code: e, data: n });
|
|
233
|
-
}
|
|
234
|
-
function D(e, n = {}) {
|
|
235
|
-
throw Error(We.dispatch({ code: e, data: n }).message);
|
|
236
|
-
}
|
|
237
|
-
function ge(e, n) {
|
|
238
|
-
const t = {
|
|
239
|
-
blocking: !1,
|
|
240
|
-
key: pt(),
|
|
241
|
-
meta: {},
|
|
242
|
-
type: "state",
|
|
243
|
-
visible: !0,
|
|
244
|
-
...e
|
|
245
|
-
};
|
|
246
|
-
return n && t.value && t.meta.localize !== !1 && (t.value = n.t(t), t.meta.locale = n.config.locale), t;
|
|
247
|
-
}
|
|
248
|
-
const Ge = {
|
|
249
|
-
apply: Gt,
|
|
250
|
-
set: Zt,
|
|
251
|
-
remove: ht,
|
|
252
|
-
filter: Qt,
|
|
253
|
-
reduce: Yt,
|
|
254
|
-
release: tn,
|
|
255
|
-
touch: Jt
|
|
256
|
-
};
|
|
257
|
-
function Ht(e = !1) {
|
|
258
|
-
const n = {};
|
|
259
|
-
let t, r = e, i = [];
|
|
260
|
-
const s = /* @__PURE__ */ new Map();
|
|
261
|
-
let o;
|
|
262
|
-
const a = new Proxy(n, {
|
|
263
|
-
get(...m) {
|
|
264
|
-
const [h, g] = m;
|
|
265
|
-
return g === "buffer" ? r : g === "_b" ? i : g === "_m" ? s : g === "_r" ? o : R(Ge, g) ? Ge[g].bind(null, n, a, t) : Reflect.get(...m);
|
|
266
|
-
},
|
|
267
|
-
set(m, h, g) {
|
|
268
|
-
return h === "_n" ? (t = g, o === "__n" && gt(t, a), !0) : h === "_b" ? (i = g, !0) : h === "buffer" ? (r = g, !0) : h === "_r" ? (o = g, !0) : (D(101, t), !1);
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
return a;
|
|
272
|
-
}
|
|
273
|
-
function Zt(e, n, t, r) {
|
|
274
|
-
if (n.buffer)
|
|
275
|
-
return n._b.push([[r]]), n;
|
|
276
|
-
if (e[r.key] !== r) {
|
|
277
|
-
if (typeof r.value == "string" && r.meta.localize !== !1) {
|
|
278
|
-
const s = r.value;
|
|
279
|
-
r.value = t.t(r), r.value !== s && (r.meta.locale = t.props.locale);
|
|
280
|
-
}
|
|
281
|
-
const i = `message-${R(e, r.key) ? "updated" : "added"}`;
|
|
282
|
-
e[r.key] = Object.freeze(t.hook.message.dispatch(r)), t.emit(i, r);
|
|
283
|
-
}
|
|
284
|
-
return n;
|
|
285
|
-
}
|
|
286
|
-
function Jt(e, n) {
|
|
287
|
-
for (const t in e) {
|
|
288
|
-
const r = { ...e[t] };
|
|
289
|
-
n.set(r);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
function ht(e, n, t, r) {
|
|
293
|
-
if (R(e, r)) {
|
|
294
|
-
const i = e[r];
|
|
295
|
-
delete e[r], t.emit("message-removed", i);
|
|
296
|
-
}
|
|
297
|
-
return n.buffer === !0 && (n._b = n._b.filter((i) => (i[0] = i[0].filter((s) => s.key !== r), i[1] || i[0].length))), n;
|
|
298
|
-
}
|
|
299
|
-
function Qt(e, n, t, r, i) {
|
|
300
|
-
for (const s in e) {
|
|
301
|
-
const o = e[s];
|
|
302
|
-
(!i || o.type === i) && !r(o) && ht(e, n, t, s);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
function Yt(e, n, t, r, i) {
|
|
306
|
-
for (const s in e) {
|
|
307
|
-
const o = e[s];
|
|
308
|
-
i = r(i, o);
|
|
309
|
-
}
|
|
310
|
-
return i;
|
|
311
|
-
}
|
|
312
|
-
function Gt(e, n, t, r, i) {
|
|
313
|
-
if (Array.isArray(r)) {
|
|
314
|
-
if (n.buffer) {
|
|
315
|
-
n._b.push([r, i]);
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
const s = new Set(r.map((o) => (n.set(o), o.key)));
|
|
319
|
-
typeof i == "string" ? n.filter((o) => o.type !== i || s.has(o.key)) : typeof i == "function" && n.filter((o) => !i(o) || s.has(o.key));
|
|
320
|
-
} else
|
|
321
|
-
for (const s in r) {
|
|
322
|
-
const o = t.at(s);
|
|
323
|
-
o ? o.store.apply(r[s], i) : en(t, n, s, r[s], i);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
function Xt(e, ...n) {
|
|
327
|
-
const t = `${e.name}-set`, r = (i) => ge({
|
|
328
|
-
key: mt(i),
|
|
329
|
-
type: "error",
|
|
330
|
-
value: i,
|
|
331
|
-
meta: { source: t, autoClear: !0 }
|
|
332
|
-
});
|
|
333
|
-
return n.filter((i) => !!i).map((i) => {
|
|
334
|
-
if (typeof i == "string" && (i = [i]), Array.isArray(i))
|
|
335
|
-
return i.map((s) => r(s));
|
|
336
|
-
{
|
|
337
|
-
const s = {};
|
|
338
|
-
for (const o in i)
|
|
339
|
-
Array.isArray(i[o]) ? s[o] = i[o].map((a) => r(a)) : s[o] = [r(i[o])];
|
|
340
|
-
return s;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
function en(e, n, t, r, i) {
|
|
345
|
-
var s;
|
|
346
|
-
const o = n._m;
|
|
347
|
-
o.has(t) || o.set(t, []), n._r || (n._r = gt(e, n)), (s = o.get(t)) === null || s === void 0 || s.push([r, i]);
|
|
348
|
-
}
|
|
349
|
-
function gt(e, n) {
|
|
350
|
-
return e.on("child.deep", ({ payload: t }) => {
|
|
351
|
-
n._m.forEach((r, i) => {
|
|
352
|
-
e.at(i) === t && (r.forEach(([s, o]) => {
|
|
353
|
-
t.store.apply(s, o);
|
|
354
|
-
}), n._m.delete(i));
|
|
355
|
-
}), n._m.size === 0 && n._r && (e.off(n._r), n._r = void 0);
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
function tn(e, n) {
|
|
359
|
-
n.buffer = !1, n._b.forEach(([t, r]) => n.apply(t, r)), n._b = [];
|
|
360
|
-
}
|
|
361
|
-
function nn() {
|
|
362
|
-
const e = {};
|
|
363
|
-
let n;
|
|
364
|
-
return {
|
|
365
|
-
count: (...t) => rn(n, e, ...t),
|
|
366
|
-
init(t) {
|
|
367
|
-
n = t, t.on("message-added.deep", Xe(e, 1)), t.on("message-removed.deep", Xe(e, -1));
|
|
368
|
-
},
|
|
369
|
-
merge: (t) => et(n, e, t),
|
|
370
|
-
settled(t) {
|
|
371
|
-
return R(e, t) ? e[t].promise : Promise.resolve();
|
|
372
|
-
},
|
|
373
|
-
unmerge: (t) => et(n, e, t, !0),
|
|
374
|
-
value(t) {
|
|
375
|
-
return R(e, t) ? e[t].count : 0;
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
function rn(e, n, t, r, i = 0) {
|
|
380
|
-
if (r = sn(r || t), !R(n, t)) {
|
|
381
|
-
const s = {
|
|
382
|
-
condition: r,
|
|
383
|
-
count: 0,
|
|
384
|
-
name: t,
|
|
385
|
-
node: e,
|
|
386
|
-
promise: Promise.resolve(),
|
|
387
|
-
resolve: () => {
|
|
388
|
-
}
|
|
389
|
-
};
|
|
390
|
-
n[t] = s, i = e.store.reduce((o, a) => o + s.condition(a) * 1, i), e.each((o) => {
|
|
391
|
-
o.ledger.count(s.name, s.condition), i += o.ledger.value(s.name);
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
return _t(n[t], i).promise;
|
|
395
|
-
}
|
|
396
|
-
function sn(e) {
|
|
397
|
-
return typeof e == "function" ? e : (n) => n.type === e;
|
|
398
|
-
}
|
|
399
|
-
function _t(e, n) {
|
|
400
|
-
const t = e.count, r = e.count + n;
|
|
401
|
-
return e.count = r, t === 0 && r !== 0 ? (e.node.emit(`unsettled:${e.name}`, e.count, !1), e.promise = new Promise((i) => e.resolve = i)) : t !== 0 && r === 0 && (e.node.emit(`settled:${e.name}`, e.count, !1), e.resolve()), e.node.emit(`count:${e.name}`, e.count, !1), e;
|
|
402
|
-
}
|
|
403
|
-
function Xe(e, n) {
|
|
404
|
-
return (t) => {
|
|
405
|
-
for (const r in e) {
|
|
406
|
-
const i = e[r];
|
|
407
|
-
i.condition(t.payload) && _t(i, n);
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function et(e, n, t, r = !1) {
|
|
412
|
-
for (const i in n) {
|
|
413
|
-
const s = n[i].condition;
|
|
414
|
-
r || t.ledger.count(i, s);
|
|
415
|
-
const o = t.ledger.value(i) * (r ? -1 : 1);
|
|
416
|
-
if (!!e)
|
|
417
|
-
do
|
|
418
|
-
e.ledger.count(i, s, o), e = e.parent;
|
|
419
|
-
while (e);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
const Ue = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Map(), Ke = yt(), on = [];
|
|
423
|
-
function un(e) {
|
|
424
|
-
e.props.id && (Ue.set(e.props.id, e), ue.set(e, e.props.id), Ke(e, {
|
|
425
|
-
payload: e,
|
|
426
|
-
name: e.props.id,
|
|
427
|
-
bubble: !1,
|
|
428
|
-
origin: e
|
|
429
|
-
}));
|
|
430
|
-
}
|
|
431
|
-
function ln(e) {
|
|
432
|
-
if (ue.has(e)) {
|
|
433
|
-
const n = ue.get(e);
|
|
434
|
-
ue.delete(e), Ue.delete(n), Ke(e, {
|
|
435
|
-
payload: null,
|
|
436
|
-
name: n,
|
|
437
|
-
bubble: !1,
|
|
438
|
-
origin: e
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
function vt(e) {
|
|
443
|
-
return Ue.get(e);
|
|
444
|
-
}
|
|
445
|
-
function an(e, n) {
|
|
446
|
-
on.push(Ke.on(e, n));
|
|
447
|
-
}
|
|
448
|
-
function tt(e, n, t) {
|
|
449
|
-
let r = !0;
|
|
450
|
-
return n in e.config._t ? r = !1 : e.emit(`config:${n}`, t, !1), n in e.props || (e.emit("prop", { prop: n, value: t }), e.emit(`prop:${n}`, t)), r;
|
|
451
|
-
}
|
|
452
|
-
function fn(e) {
|
|
453
|
-
const n = document.getElementById(e);
|
|
454
|
-
if (n instanceof HTMLFormElement) {
|
|
455
|
-
const t = new Event("submit", { cancelable: !0, bubbles: !0 });
|
|
456
|
-
n.dispatchEvent(t);
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
ve(151, e);
|
|
460
|
-
}
|
|
461
|
-
function cn(e) {
|
|
462
|
-
const n = (t) => {
|
|
463
|
-
for (const r in t.store) {
|
|
464
|
-
const i = t.store[r];
|
|
465
|
-
i.type === "error" || i.type === "ui" && r === "incomplete" ? t.store.remove(r) : i.type === "state" && t.store.set({ ...i, value: !1 });
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
n(e), e.walk(n);
|
|
469
|
-
}
|
|
470
|
-
function pn(e, n) {
|
|
471
|
-
const t = typeof e == "string" ? vt(e) : e;
|
|
472
|
-
if (t) {
|
|
473
|
-
const r = (s) => Q(s.props.initial) || (s.type === "group" ? {} : s.type === "list" ? [] : void 0);
|
|
474
|
-
t._e.pause(t), t.input(Q(n) || r(t), !1), t.walk((s) => s.input(r(s), !1));
|
|
475
|
-
const i = r(t);
|
|
476
|
-
return t.input(typeof i == "object" ? Q(n) || re(i) : i, !1), t._e.play(t), cn(t), t.emit("reset", t), t;
|
|
477
|
-
}
|
|
478
|
-
ve(152, e);
|
|
479
|
-
}
|
|
480
|
-
const dn = {
|
|
481
|
-
delimiter: ".",
|
|
482
|
-
delay: 0,
|
|
483
|
-
locale: "en",
|
|
484
|
-
rootClasses: (e) => ({ [`formkit-${dt(e)}`]: !0 })
|
|
485
|
-
}, bt = Symbol("index"), Oe = Symbol("removed"), Pe = Symbol("moved"), $t = Symbol("inserted");
|
|
486
|
-
function mn(e) {
|
|
487
|
-
return e.type === "list" && Array.isArray(e._value);
|
|
488
|
-
}
|
|
489
|
-
function be(e) {
|
|
490
|
-
return e && typeof e == "object" && e.__FKNode__ === !0;
|
|
491
|
-
}
|
|
492
|
-
const le = (e, n, t) => {
|
|
493
|
-
D(102, [e, t]);
|
|
494
|
-
}, yn = {
|
|
495
|
-
_c: C(Tn, le, !1),
|
|
496
|
-
add: C(On),
|
|
497
|
-
addProps: C(In),
|
|
498
|
-
address: C(Fn, le, !1),
|
|
499
|
-
at: C(Wn),
|
|
500
|
-
bubble: C(zt),
|
|
501
|
-
clearErrors: C(Hn),
|
|
502
|
-
calm: C(kn),
|
|
503
|
-
config: C(!1),
|
|
504
|
-
define: C(Vn),
|
|
505
|
-
disturb: C(Sn),
|
|
506
|
-
destroy: C(Cn),
|
|
507
|
-
hydrate: C(wn),
|
|
508
|
-
index: C(Mn, jn, !1),
|
|
509
|
-
input: C(St),
|
|
510
|
-
each: C(En),
|
|
511
|
-
emit: C(qt),
|
|
512
|
-
find: C(Un),
|
|
513
|
-
on: C(Bt),
|
|
514
|
-
off: C(Nt),
|
|
515
|
-
parent: C(!1, Pn),
|
|
516
|
-
plugins: C(!1),
|
|
517
|
-
remove: C(An),
|
|
518
|
-
root: C(qn, le, !1),
|
|
519
|
-
reset: C(Nn),
|
|
520
|
-
resetConfig: C(Rn),
|
|
521
|
-
setErrors: C(Vt),
|
|
522
|
-
submit: C(Bn),
|
|
523
|
-
t: C(zn),
|
|
524
|
-
use: C(qe),
|
|
525
|
-
name: C(Ln, !1, !1),
|
|
526
|
-
walk: C(xn)
|
|
527
|
-
};
|
|
528
|
-
function hn() {
|
|
529
|
-
return new Map(Object.entries(yn));
|
|
530
|
-
}
|
|
531
|
-
function C(e, n, t = !0) {
|
|
532
|
-
return {
|
|
533
|
-
get: e ? (r, i) => t ? (...s) => e(r, i, ...s) : e(r, i) : !1,
|
|
534
|
-
set: n !== void 0 ? n : le.bind(null)
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
function gn() {
|
|
538
|
-
const e = /* @__PURE__ */ new Map();
|
|
539
|
-
return new Proxy(e, {
|
|
540
|
-
get(n, t) {
|
|
541
|
-
return e.has(t) || e.set(t, Fe()), e.get(t);
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
let _n = 0, vn = 0;
|
|
546
|
-
function bn(e) {
|
|
547
|
-
var n, t;
|
|
548
|
-
return ((n = e.parent) === null || n === void 0 ? void 0 : n.type) === "list" ? bt : e.name || `${((t = e.props) === null || t === void 0 ? void 0 : t.type) || "input"}_${++_n}`;
|
|
549
|
-
}
|
|
550
|
-
function wt(e) {
|
|
551
|
-
return e.type === "group" ? re(e.value && typeof e.value == "object" && !Array.isArray(e.value) ? e.value : {}) : e.type === "list" ? re(Array.isArray(e.value) ? e.value : []) : e.value === null ? "" : e.value;
|
|
552
|
-
}
|
|
553
|
-
function St(e, n, t, r = !0) {
|
|
554
|
-
return n._value = $n(e, e.hook.input.dispatch(t)), e.emit("input", n._value), n.isSettled && e.disturb(), r ? (n._tmo && clearTimeout(n._tmo), n._tmo = setTimeout(_e, e.props.delay, e, n)) : _e(e, n), n.settled;
|
|
555
|
-
}
|
|
556
|
-
function $n(e, n) {
|
|
557
|
-
switch (e.type) {
|
|
558
|
-
case "input":
|
|
559
|
-
break;
|
|
560
|
-
case "group":
|
|
561
|
-
(!n || typeof n != "object") && D(107, [e, n]);
|
|
562
|
-
break;
|
|
563
|
-
case "list":
|
|
564
|
-
Array.isArray(n) || D(108, [e, n]);
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
return n;
|
|
568
|
-
}
|
|
569
|
-
function _e(e, n, t = !0, r = !0) {
|
|
570
|
-
n._value = n.value = e.hook.commit.dispatch(n._value), e.type !== "input" && r && e.hydrate(), e.emit("commit", n.value), t && e.calm();
|
|
571
|
-
}
|
|
572
|
-
function kt(e, { name: n, value: t, from: r }) {
|
|
573
|
-
if (!Object.isFrozen(e._value)) {
|
|
574
|
-
if (mn(e)) {
|
|
575
|
-
const i = t === Oe ? [] : t === Pe && typeof r == "number" ? e._value.splice(r, 1) : [t];
|
|
576
|
-
e._value.splice(n, t === Pe || r === $t ? 0 : 1, ...i);
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
t !== Oe ? e._value[n] = t : delete e._value[n];
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
function wn(e, n) {
|
|
583
|
-
const t = n._value;
|
|
584
|
-
return n.children.forEach((r) => {
|
|
585
|
-
if (typeof t == "object")
|
|
586
|
-
if (r.name in t) {
|
|
587
|
-
const i = r.type !== "input" || t[r.name] && typeof t[r.name] == "object" ? re(t[r.name]) : t[r.name];
|
|
588
|
-
r.input(i, !1);
|
|
589
|
-
} else
|
|
590
|
-
(e.type !== "list" || typeof r.name == "number") && kt(n, { name: r.name, value: r.value }), t.__init || (r.type === "group" ? r.input({}, !1) : r.type === "list" ? r.input([], !1) : r.input(void 0, !1));
|
|
591
|
-
}), e;
|
|
592
|
-
}
|
|
593
|
-
function Sn(e, n) {
|
|
594
|
-
var t;
|
|
595
|
-
return n._d <= 0 && (n.isSettled = !1, e.emit("settled", !1, !1), n.settled = new Promise((r) => {
|
|
596
|
-
n._resolve = r;
|
|
597
|
-
}), e.parent && ((t = e.parent) === null || t === void 0 || t.disturb())), n._d++, e;
|
|
598
|
-
}
|
|
599
|
-
function kn(e, n, t) {
|
|
600
|
-
var r;
|
|
601
|
-
if (t !== void 0 && e.type !== "input")
|
|
602
|
-
return kt(n, t), _e(e, n, !0, !1);
|
|
603
|
-
n._d > 0 && n._d--, n._d === 0 && (n.isSettled = !0, e.emit("settled", !0, !1), e.parent && ((r = e.parent) === null || r === void 0 || r.calm({ name: e.name, value: n.value })), n._resolve && n._resolve(n.value));
|
|
604
|
-
}
|
|
605
|
-
function Cn(e, n) {
|
|
606
|
-
e.emit("destroying", e), e.store.filter(() => !1), e.parent && e.parent.remove(e), ln(e), n._value = n.value = void 0, e.emit("destroyed", e);
|
|
607
|
-
}
|
|
608
|
-
function Vn(e, n, t) {
|
|
609
|
-
n.type = t.type, n.props.definition = he(t), n.value = n._value = wt({
|
|
610
|
-
type: e.type,
|
|
611
|
-
value: n.value
|
|
612
|
-
}), t.forceTypeProp && (e.props.type && (e.props.originalType = e.props.type), n.props.type = t.forceTypeProp), t.family && (n.props.family = t.family), t.features && t.features.forEach((r) => r(e)), t.props && e.addProps(t.props), e.emit("defined", t);
|
|
613
|
-
}
|
|
614
|
-
function In(e, n, t) {
|
|
615
|
-
var r;
|
|
616
|
-
if (e.props.attrs) {
|
|
617
|
-
const i = { ...e.props.attrs };
|
|
618
|
-
e.props._emit = !1;
|
|
619
|
-
for (const o in i) {
|
|
620
|
-
const a = oe(o);
|
|
621
|
-
t.includes(a) && (e.props[a] = i[o], delete i[o]);
|
|
622
|
-
}
|
|
623
|
-
const s = Q(n._value);
|
|
624
|
-
e.props.initial = e.type !== "input" ? re(s) : s, e.props._emit = !0, e.props.attrs = i, e.props.definition && (e.props.definition.props = [
|
|
625
|
-
...((r = e.props.definition) === null || r === void 0 ? void 0 : r.props) || [],
|
|
626
|
-
...t
|
|
627
|
-
]);
|
|
628
|
-
}
|
|
629
|
-
return e.emit("added-props", t), e;
|
|
630
|
-
}
|
|
631
|
-
function On(e, n, t, r) {
|
|
632
|
-
if (e.type === "input" && D(100, e), t.parent && t.parent !== e && t.parent.remove(t), n.children.includes(t) || (r !== void 0 && e.type === "list" ? (n.children.splice(r, 0, t), Array.isArray(e.value) && e.value.length < n.children.length && e.disturb().calm({
|
|
633
|
-
name: r,
|
|
634
|
-
value: t.value,
|
|
635
|
-
from: $t
|
|
636
|
-
})) : n.children.push(t), t.isSettled || e.disturb()), t.parent !== e) {
|
|
637
|
-
if (t.parent = e, t.parent !== e)
|
|
638
|
-
return e.remove(t), t.parent.add(t), e;
|
|
639
|
-
} else
|
|
640
|
-
t.use(e.plugins);
|
|
641
|
-
return _e(e, n, !1), e.ledger.merge(t), e.emit("child", t), e;
|
|
642
|
-
}
|
|
643
|
-
function Pn(e, n, t, r) {
|
|
644
|
-
return be(r) ? (e.parent && e.parent !== r && e.parent.remove(e), n.parent = r, e.resetConfig(), r.children.includes(e) ? e.use(r.plugins) : r.add(e), !0) : r === null ? (n.parent = null, !0) : !1;
|
|
645
|
-
}
|
|
646
|
-
function An(e, n, t) {
|
|
647
|
-
const r = n.children.indexOf(t);
|
|
648
|
-
if (r !== -1) {
|
|
649
|
-
t.isSettled && e.disturb(), n.children.splice(r, 1);
|
|
650
|
-
let i = Ye(t.props.preserve), s = t.parent;
|
|
651
|
-
for (; i === void 0 && s; )
|
|
652
|
-
i = Ye(s.props.preserve), s = s.parent;
|
|
653
|
-
i ? e.calm() : e.calm({
|
|
654
|
-
name: e.type === "list" ? r : t.name,
|
|
655
|
-
value: Oe
|
|
656
|
-
}), t.parent = null, t.config._rmn = t;
|
|
657
|
-
}
|
|
658
|
-
return e.ledger.unmerge(t), e;
|
|
659
|
-
}
|
|
660
|
-
function En(e, n, t) {
|
|
661
|
-
n.children.forEach((r) => t(r));
|
|
662
|
-
}
|
|
663
|
-
function xn(e, n, t, r = !1) {
|
|
664
|
-
n.children.forEach((i) => {
|
|
665
|
-
(t(i) !== !1 || !r) && i.walk(t);
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
function Rn(e, n) {
|
|
669
|
-
const t = e.parent || void 0;
|
|
670
|
-
n.config = Ct(e.config._t, t), e.walk((r) => r.resetConfig());
|
|
671
|
-
}
|
|
672
|
-
function qe(e, n, t, r = !0, i = !0) {
|
|
673
|
-
return Array.isArray(t) || t instanceof Set ? (t.forEach((s) => qe(e, n, s)), e) : (n.plugins.has(t) || (i && typeof t.library == "function" && t.library(e), r && t(e) !== !1 && (n.plugins.add(t), e.children.forEach((s) => s.use(t)))), e);
|
|
674
|
-
}
|
|
675
|
-
function jn(e, n, t, r) {
|
|
676
|
-
if (be(e.parent)) {
|
|
677
|
-
const i = e.parent.children, s = r >= i.length ? i.length - 1 : r < 0 ? 0 : r, o = i.indexOf(e);
|
|
678
|
-
return o === -1 ? !1 : (i.splice(o, 1), i.splice(s, 0, e), e.parent.children = i, e.parent.type === "list" && e.parent.disturb().calm({ name: s, value: Pe, from: o }), !0);
|
|
679
|
-
}
|
|
680
|
-
return !1;
|
|
681
|
-
}
|
|
682
|
-
function Mn(e) {
|
|
683
|
-
if (e.parent) {
|
|
684
|
-
const n = [...e.parent.children].indexOf(e);
|
|
685
|
-
return n === -1 ? e.parent.children.length : n;
|
|
686
|
-
}
|
|
687
|
-
return -1;
|
|
688
|
-
}
|
|
689
|
-
function Tn(e, n) {
|
|
690
|
-
return n;
|
|
691
|
-
}
|
|
692
|
-
function Ln(e, n) {
|
|
693
|
-
var t;
|
|
694
|
-
return ((t = e.parent) === null || t === void 0 ? void 0 : t.type) === "list" ? e.index : n.name !== bt ? n.name : e.index;
|
|
695
|
-
}
|
|
696
|
-
function Fn(e, n) {
|
|
697
|
-
return n.parent ? n.parent.address.concat([e.name]) : [e.name];
|
|
698
|
-
}
|
|
699
|
-
function Wn(e, n, t) {
|
|
700
|
-
const r = typeof t == "string" ? t.split(e.config.delimiter) : t;
|
|
701
|
-
if (!r.length)
|
|
702
|
-
return;
|
|
703
|
-
const i = r[0];
|
|
704
|
-
let s = e.parent;
|
|
705
|
-
for (s || (String(r[0]) === String(e.name) && r.shift(), s = e), i === "$parent" && r.shift(); s && r.length; ) {
|
|
706
|
-
const o = r.shift();
|
|
707
|
-
switch (o) {
|
|
708
|
-
case "$root":
|
|
709
|
-
s = e.root;
|
|
710
|
-
break;
|
|
711
|
-
case "$parent":
|
|
712
|
-
s = s.parent;
|
|
713
|
-
break;
|
|
714
|
-
case "$self":
|
|
715
|
-
s = e;
|
|
716
|
-
break;
|
|
717
|
-
default:
|
|
718
|
-
s = s.children.find((a) => String(a.name) === String(o)) || Dn(s, o);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return s || void 0;
|
|
722
|
-
}
|
|
723
|
-
function Dn(e, n) {
|
|
724
|
-
const t = String(n).match(/^(find)\((.*)\)$/);
|
|
725
|
-
if (t) {
|
|
726
|
-
const [, r, i] = t, s = i.split(",").map((o) => o.trim());
|
|
727
|
-
switch (r) {
|
|
728
|
-
case "find":
|
|
729
|
-
return e.find(s[0], s[1]);
|
|
730
|
-
default:
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
function Un(e, n, t, r) {
|
|
736
|
-
return Kn(e, t, r);
|
|
737
|
-
}
|
|
738
|
-
function Kn(e, n, t = "name") {
|
|
739
|
-
const r = typeof t == "string" ? (s) => s[t] == n : t, i = [e];
|
|
740
|
-
for (; i.length; ) {
|
|
741
|
-
const s = i.shift();
|
|
742
|
-
if (r(s, n))
|
|
743
|
-
return s;
|
|
744
|
-
i.push(...s.children);
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
function qn(e) {
|
|
748
|
-
let n = e;
|
|
749
|
-
for (; n.parent; )
|
|
750
|
-
n = n.parent;
|
|
751
|
-
return n;
|
|
752
|
-
}
|
|
753
|
-
function Ct(e = {}, n) {
|
|
754
|
-
let t;
|
|
755
|
-
return new Proxy(e, {
|
|
756
|
-
get(...r) {
|
|
757
|
-
const i = r[1];
|
|
758
|
-
if (i === "_t")
|
|
759
|
-
return e;
|
|
760
|
-
const s = Reflect.get(...r);
|
|
761
|
-
if (s !== void 0)
|
|
762
|
-
return s;
|
|
763
|
-
if (n) {
|
|
764
|
-
const o = n.config[i];
|
|
765
|
-
if (o !== void 0)
|
|
766
|
-
return o;
|
|
767
|
-
}
|
|
768
|
-
if (e.rootConfig && typeof i == "string") {
|
|
769
|
-
const o = e.rootConfig[i];
|
|
770
|
-
if (o !== void 0)
|
|
771
|
-
return o;
|
|
772
|
-
}
|
|
773
|
-
return i === "delay" && (t == null ? void 0 : t.type) === "input" ? 20 : dn[i];
|
|
774
|
-
},
|
|
775
|
-
set(...r) {
|
|
776
|
-
const i = r[1], s = r[2];
|
|
777
|
-
if (i === "_n")
|
|
778
|
-
return t = s, e.rootConfig && e.rootConfig._add(t), !0;
|
|
779
|
-
if (i === "_rmn")
|
|
780
|
-
return e.rootConfig && e.rootConfig._rm(t), t = void 0, !0;
|
|
781
|
-
if (!Te(e[i], s, !1)) {
|
|
782
|
-
const o = Reflect.set(...r);
|
|
783
|
-
return t && (t.emit(`config:${i}`, s, !1), tt(t, i, s), t.walk((a) => tt(a, i, s), !0)), o;
|
|
784
|
-
}
|
|
785
|
-
return !0;
|
|
786
|
-
}
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
function zn(e, n, t, r = "ui") {
|
|
790
|
-
const i = typeof t == "string" ? { key: t, value: t, type: r } : t, s = e.hook.text.dispatch(i);
|
|
791
|
-
return e.emit("text", s, !1), s.value;
|
|
792
|
-
}
|
|
793
|
-
function Bn(e) {
|
|
794
|
-
const n = e.name;
|
|
795
|
-
do {
|
|
796
|
-
if (e.props.isForm === !0)
|
|
797
|
-
break;
|
|
798
|
-
e.parent || D(106, n), e = e.parent;
|
|
799
|
-
} while (e);
|
|
800
|
-
e.props.id && fn(e.props.id);
|
|
801
|
-
}
|
|
802
|
-
function Nn(e, n, t) {
|
|
803
|
-
return pn(e, t);
|
|
804
|
-
}
|
|
805
|
-
function Vt(e, n, t, r) {
|
|
806
|
-
const i = `${e.name}-set`, s = e.hook.setErrors.dispatch({ localErrors: t, childErrors: r });
|
|
807
|
-
return Xt(e, s.localErrors, s.childErrors).forEach((o) => {
|
|
808
|
-
e.store.apply(o, (a) => a.meta.source === i);
|
|
809
|
-
}), e;
|
|
810
|
-
}
|
|
811
|
-
function Hn(e, n, t = !0, r) {
|
|
812
|
-
return Vt(e, n, []), t && (r = r || `${e.name}-set`, e.walk((i) => {
|
|
813
|
-
i.store.filter((s) => !(s.type === "error" && s.meta && s.meta.source === r));
|
|
814
|
-
})), e;
|
|
815
|
-
}
|
|
816
|
-
function Zn(e) {
|
|
817
|
-
return R(e.props, "id") || (e.props.id = `input_${vn++}`), e;
|
|
818
|
-
}
|
|
819
|
-
function Jn(e) {
|
|
820
|
-
const n = {
|
|
821
|
-
initial: typeof e == "object" ? Q(e) : e
|
|
822
|
-
};
|
|
823
|
-
let t, r = !0;
|
|
824
|
-
return new Proxy(n, {
|
|
825
|
-
get(...i) {
|
|
826
|
-
const [s, o] = i;
|
|
827
|
-
if (R(n, o))
|
|
828
|
-
return Reflect.get(...i);
|
|
829
|
-
if (t && typeof o == "string" && t.config[o] !== void 0)
|
|
830
|
-
return t.config[o];
|
|
831
|
-
},
|
|
832
|
-
set(i, s, o, a) {
|
|
833
|
-
if (s === "_n")
|
|
834
|
-
return t = o, !0;
|
|
835
|
-
if (s === "_emit")
|
|
836
|
-
return r = o, !0;
|
|
837
|
-
const { prop: m, value: h } = t.hook.prop.dispatch({
|
|
838
|
-
prop: s,
|
|
839
|
-
value: o
|
|
840
|
-
});
|
|
841
|
-
if (!Te(n[m], h, !1) || typeof h == "object") {
|
|
842
|
-
const g = Reflect.set(i, m, h, a);
|
|
843
|
-
return r && (t.emit("prop", { prop: m, value: h }), typeof m == "string" && t.emit(`prop:${m}`, h)), g;
|
|
844
|
-
}
|
|
845
|
-
return !0;
|
|
846
|
-
}
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
function Qn(e, n) {
|
|
850
|
-
if (e.props.definition)
|
|
851
|
-
return e.define(e.props.definition);
|
|
852
|
-
for (const t of n) {
|
|
853
|
-
if (e.props.definition)
|
|
854
|
-
return;
|
|
855
|
-
typeof t.library == "function" && t.library(e);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
function Yn(e) {
|
|
859
|
-
const n = wt(e), t = Ct(e.config || {}, e.parent);
|
|
860
|
-
return {
|
|
861
|
-
_d: 0,
|
|
862
|
-
_e: yt(),
|
|
863
|
-
_resolve: !1,
|
|
864
|
-
_tmo: !1,
|
|
865
|
-
_value: n,
|
|
866
|
-
children: Ft(e.children || []),
|
|
867
|
-
config: t,
|
|
868
|
-
hook: gn(),
|
|
869
|
-
isCreated: !1,
|
|
870
|
-
isSettled: !0,
|
|
871
|
-
ledger: nn(),
|
|
872
|
-
name: bn(e),
|
|
873
|
-
parent: e.parent || null,
|
|
874
|
-
plugins: /* @__PURE__ */ new Set(),
|
|
875
|
-
props: Jn(n),
|
|
876
|
-
settled: Promise.resolve(n),
|
|
877
|
-
store: Ht(!0),
|
|
878
|
-
traps: hn(),
|
|
879
|
-
type: e.type || "input",
|
|
880
|
-
value: n
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
function Gn(e, n) {
|
|
884
|
-
var t;
|
|
885
|
-
if (e.ledger.init(e.store._n = e.props._n = e.config._n = e), e.props._emit = !1, n.props && Object.assign(e.props, n.props), e.props._emit = !0, Qn(e, /* @__PURE__ */ new Set([
|
|
886
|
-
...n.plugins || [],
|
|
887
|
-
...e.parent ? e.parent.plugins : []
|
|
888
|
-
])), n.plugins)
|
|
889
|
-
for (const r of n.plugins)
|
|
890
|
-
qe(e, e._c, r, !0, !1);
|
|
891
|
-
return Zn(e), e.each((r) => e.add(r)), e.parent && e.parent.add(e, n.index), e.type === "input" && e.children.length && D(100, e), St(e, e._c, e._value, !1), e.store.release(), !((t = n.props) === null || t === void 0) && t.id && un(e), e.emit("created", e), e.isCreated = !0, e;
|
|
892
|
-
}
|
|
893
|
-
function Xn(e) {
|
|
894
|
-
const n = e || {}, t = Yn(n), r = new Proxy(t, {
|
|
895
|
-
get(...i) {
|
|
896
|
-
const [, s] = i;
|
|
897
|
-
if (s === "__FKNode__")
|
|
898
|
-
return !0;
|
|
899
|
-
const o = t.traps.get(s);
|
|
900
|
-
return o && o.get ? o.get(r, t) : Reflect.get(...i);
|
|
901
|
-
},
|
|
902
|
-
set(...i) {
|
|
903
|
-
const [, s, o] = i, a = t.traps.get(s);
|
|
904
|
-
return a && a.set ? a.set(r, t, s, o) : Reflect.set(...i);
|
|
905
|
-
}
|
|
906
|
-
});
|
|
907
|
-
return Gn(r, n);
|
|
908
|
-
}
|
|
909
|
-
function Ae(e) {
|
|
910
|
-
return typeof e != "string" && R(e, "$el");
|
|
911
|
-
}
|
|
912
|
-
function Ee(e) {
|
|
913
|
-
return typeof e != "string" && R(e, "$cmp");
|
|
914
|
-
}
|
|
915
|
-
function te(e) {
|
|
916
|
-
return !e || typeof e == "string" ? !1 : R(e, "if") && R(e, "then");
|
|
917
|
-
}
|
|
918
|
-
function er(e) {
|
|
919
|
-
return typeof e != "string" && "$formkit" in e;
|
|
920
|
-
}
|
|
921
|
-
function tr(e) {
|
|
922
|
-
if (typeof e == "string")
|
|
923
|
-
return {
|
|
924
|
-
$el: "text",
|
|
925
|
-
children: e
|
|
926
|
-
};
|
|
927
|
-
if (er(e)) {
|
|
928
|
-
const { $formkit: n, for: t, if: r, children: i, bind: s, ...o } = e;
|
|
929
|
-
return Object.assign({
|
|
930
|
-
$cmp: "FormKit",
|
|
931
|
-
props: { ...o, type: n }
|
|
932
|
-
}, r ? { if: r } : {}, t ? { for: t } : {}, i ? { children: i } : {}, s ? { bind: s } : {});
|
|
933
|
-
}
|
|
934
|
-
return e;
|
|
935
|
-
}
|
|
936
|
-
function K(e) {
|
|
937
|
-
let n;
|
|
938
|
-
const t = /* @__PURE__ */ new Set(), r = function(f, p) {
|
|
939
|
-
return typeof f == "function" ? f(p) : f;
|
|
940
|
-
}, i = [
|
|
941
|
-
{
|
|
942
|
-
"&&": (c, f, p) => r(c, p) && r(f, p),
|
|
943
|
-
"||": (c, f, p) => r(c, p) || r(f, p)
|
|
944
|
-
},
|
|
945
|
-
{
|
|
946
|
-
"===": (c, f, p) => r(c, p) === r(f, p),
|
|
947
|
-
"!==": (c, f, p) => r(c, p) !== r(f, p),
|
|
948
|
-
"==": (c, f, p) => r(c, p) == r(f, p),
|
|
949
|
-
"!=": (c, f, p) => r(c, p) != r(f, p),
|
|
950
|
-
">=": (c, f, p) => r(c, p) >= r(f, p),
|
|
951
|
-
"<=": (c, f, p) => r(c, p) <= r(f, p),
|
|
952
|
-
">": (c, f, p) => r(c, p) > r(f, p),
|
|
953
|
-
"<": (c, f, p) => r(c, p) < r(f, p)
|
|
954
|
-
},
|
|
955
|
-
{
|
|
956
|
-
"+": (c, f, p) => r(c, p) + r(f, p),
|
|
957
|
-
"-": (c, f, p) => r(c, p) - r(f, p)
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
"*": (c, f, p) => r(c, p) * r(f, p),
|
|
961
|
-
"/": (c, f, p) => r(c, p) / r(f, p),
|
|
962
|
-
"%": (c, f, p) => r(c, p) % r(f, p)
|
|
963
|
-
}
|
|
964
|
-
], s = i.reduce((c, f) => c.concat(Object.keys(f)), []), o = new Set(s.map((c) => c.charAt(0)));
|
|
965
|
-
function a(c, f, p, v) {
|
|
966
|
-
const k = c.filter((l) => l.startsWith(f));
|
|
967
|
-
return k.length ? k.find((l) => v.length >= p + l.length && v.substring(p, p + l.length) === l ? l : !1) : !1;
|
|
968
|
-
}
|
|
969
|
-
function m(c, f, p = 1) {
|
|
970
|
-
let v = p ? f.substring(c + 1).trim() : f.substring(0, c).trim();
|
|
971
|
-
if (!v.length)
|
|
972
|
-
return -1;
|
|
973
|
-
if (!p) {
|
|
974
|
-
const l = v.split("").reverse(), y = l.findIndex((_) => o.has(_));
|
|
975
|
-
v = l.slice(y).join("");
|
|
976
|
-
}
|
|
977
|
-
const k = v[0];
|
|
978
|
-
return i.findIndex((l) => {
|
|
979
|
-
const y = Object.keys(l);
|
|
980
|
-
return !!a(y, k, 0, v);
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
function h(c, f) {
|
|
984
|
-
let p = "";
|
|
985
|
-
const v = f.length;
|
|
986
|
-
let k = 0;
|
|
987
|
-
for (let l = c; l < v; l++) {
|
|
988
|
-
const y = f.charAt(l);
|
|
989
|
-
if (y === "(")
|
|
990
|
-
k++;
|
|
991
|
-
else if (y === ")")
|
|
992
|
-
k--;
|
|
993
|
-
else if (k === 0 && y === " ")
|
|
994
|
-
continue;
|
|
995
|
-
if (k === 0 && a(s, y, l, f))
|
|
996
|
-
return [p, l - 1];
|
|
997
|
-
p += y;
|
|
998
|
-
}
|
|
999
|
-
return [p, f.length - 1];
|
|
1000
|
-
}
|
|
1001
|
-
function g(c, f = 0) {
|
|
1002
|
-
const p = i[f], v = c.length, k = Object.keys(p);
|
|
1003
|
-
let l = 0, y = !1, _ = null, b = "", O = null, I, j = "", V = "", E = "", x = "", z = 0;
|
|
1004
|
-
const B = (P, N) => {
|
|
1005
|
-
P ? E += N : b += N;
|
|
1006
|
-
};
|
|
1007
|
-
for (let P = 0; P < v; P++)
|
|
1008
|
-
if (j = V, V = c.charAt(P), (V === "'" || V === '"') && j !== "\\" && (l === 0 && !y || l && !x)) {
|
|
1009
|
-
l ? x = V : y = V, B(l, V);
|
|
1010
|
-
continue;
|
|
1011
|
-
} else if (y && (V !== y || j === "\\") || x && (V !== x || j === "\\")) {
|
|
1012
|
-
B(l, V);
|
|
1013
|
-
continue;
|
|
1014
|
-
} else if (y === V) {
|
|
1015
|
-
y = !1, B(l, V);
|
|
1016
|
-
continue;
|
|
1017
|
-
} else if (x === V) {
|
|
1018
|
-
x = !1, B(l, V);
|
|
1019
|
-
continue;
|
|
1020
|
-
} else {
|
|
1021
|
-
if (V === " ")
|
|
1022
|
-
continue;
|
|
1023
|
-
if (V === "(")
|
|
1024
|
-
l === 0 ? z = P : E += V, l++;
|
|
1025
|
-
else if (V === ")")
|
|
1026
|
-
if (l--, l === 0) {
|
|
1027
|
-
const N = typeof b == "string" && b.startsWith("$") ? b : void 0, He = N && c.charAt(P + 1) === ".";
|
|
1028
|
-
let X = "";
|
|
1029
|
-
He && ([X, P] = h(P + 2, c));
|
|
1030
|
-
const se = _ ? f : m(z, c, 0), ee = m(P, c);
|
|
1031
|
-
se === -1 && ee === -1 ? b = d(E, -1, N, X) : _ && (se >= ee || ee === -1) && f === se ? (O = _.bind(null, d(E, -1, N, X)), _ = null, b = "") : ee > se && f === ee ? b = d(E, -1, N, X) : b += `(${E})${He ? `.${X}` : ""}`, E = "";
|
|
1032
|
-
} else
|
|
1033
|
-
E += V;
|
|
1034
|
-
else if (l === 0 && (I = a(k, V, P, c))) {
|
|
1035
|
-
P === 0 && D(103, [I, c]), P += I.length - 1, P === c.length - 1 && D(104, [I, c]), _ ? b && (O = _.bind(null, d(b, f)), _ = p[I].bind(null, O), b = "") : O ? (_ = p[I].bind(null, d(O, f)), O = null) : (_ = p[I].bind(null, d(b, f)), b = "");
|
|
1036
|
-
continue;
|
|
1037
|
-
} else
|
|
1038
|
-
B(l, V);
|
|
1039
|
-
}
|
|
1040
|
-
return b && _ && (_ = _.bind(null, d(b, f))), _ = !_ && O ? O : _, !_ && b && (_ = (P, N) => typeof P == "function" ? P(N) : P, _ = _.bind(null, d(b, f))), !_ && !b && D(105, c), _;
|
|
1041
|
-
}
|
|
1042
|
-
function d(c, f, p, v) {
|
|
1043
|
-
if (p) {
|
|
1044
|
-
const k = d(p, i.length);
|
|
1045
|
-
let l, y = v ? K(`$${v}`) : !1;
|
|
1046
|
-
if (typeof k == "function") {
|
|
1047
|
-
const _ = Ut(String(c)).map((b) => d(b, -1));
|
|
1048
|
-
return (b) => {
|
|
1049
|
-
const O = k(b);
|
|
1050
|
-
return typeof O != "function" ? (ve(150, p), O) : (l = O(..._.map((I) => typeof I == "function" ? I(b) : I)), y && (y = y.provide((I) => {
|
|
1051
|
-
const j = n(I);
|
|
1052
|
-
return I.reduce((E, x) => {
|
|
1053
|
-
if (x === v || (v == null ? void 0 : v.startsWith(`${x}(`))) {
|
|
1054
|
-
const B = Kt(l, x);
|
|
1055
|
-
E[x] = () => B;
|
|
1056
|
-
} else
|
|
1057
|
-
E[x] = j[x];
|
|
1058
|
-
return E;
|
|
1059
|
-
}, {});
|
|
1060
|
-
})), y ? y() : l);
|
|
1061
|
-
};
|
|
1062
|
-
}
|
|
1063
|
-
} else if (typeof c == "string") {
|
|
1064
|
-
if (c === "true")
|
|
1065
|
-
return !0;
|
|
1066
|
-
if (c === "false")
|
|
1067
|
-
return !1;
|
|
1068
|
-
if (c === "undefined")
|
|
1069
|
-
return;
|
|
1070
|
-
if (Wt(c))
|
|
1071
|
-
return Dt(c.substring(1, c.length - 1));
|
|
1072
|
-
if (!isNaN(+c))
|
|
1073
|
-
return Number(c);
|
|
1074
|
-
if (f < i.length - 1)
|
|
1075
|
-
return g(c, f + 1);
|
|
1076
|
-
if (c.startsWith("$")) {
|
|
1077
|
-
const k = c.substring(1);
|
|
1078
|
-
return t.add(k), function(y) {
|
|
1079
|
-
return k in y ? y[k]() : void 0;
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
return c;
|
|
1083
|
-
}
|
|
1084
|
-
return c;
|
|
1085
|
-
}
|
|
1086
|
-
const S = g(e.startsWith("$:") ? e.substring(2) : e), $ = Array.from(t);
|
|
1087
|
-
function w(c) {
|
|
1088
|
-
return n = c, Object.assign(S.bind(null, c($)), {
|
|
1089
|
-
provide: w
|
|
1090
|
-
});
|
|
1091
|
-
}
|
|
1092
|
-
return Object.assign(S, {
|
|
1093
|
-
provide: w
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
const nt = "1.0.0-beta.10", nr = q("outer", () => ({
|
|
1097
|
-
$el: "div",
|
|
1098
|
-
attrs: {
|
|
1099
|
-
key: "$id",
|
|
1100
|
-
"data-family": "$family || undefined",
|
|
1101
|
-
"data-type": "$type",
|
|
1102
|
-
"data-multiple": '$attrs.multiple || ($type != "select" && $options != undefined) || undefined',
|
|
1103
|
-
"data-disabled": "$disabled || undefined",
|
|
1104
|
-
"data-complete": "$state.complete || undefined",
|
|
1105
|
-
"data-invalid": "$state.valid === false && $state.validationVisible || undefined",
|
|
1106
|
-
"data-errors": "$state.errors || undefined",
|
|
1107
|
-
"data-submitted": "$state.submitted || undefined",
|
|
1108
|
-
"data-prefix-icon": "$_rawPrefixIcon !== undefined || undefined",
|
|
1109
|
-
"data-suffix-icon": "$_rawSuffixIcon !== undefined || undefined",
|
|
1110
|
-
"data-prefix-icon-click": "$onPrefixIconClick !== undefined || undefined",
|
|
1111
|
-
"data-suffix-icon-click": "$onSuffixIconClick !== undefined || undefined"
|
|
1112
|
-
}
|
|
1113
|
-
}), !0), rr = q("inner", "div"), ir = q("wrapper", "div"), sr = q("label", () => ({
|
|
1114
|
-
$el: "label",
|
|
1115
|
-
if: "$label",
|
|
1116
|
-
attrs: {
|
|
1117
|
-
for: "$id"
|
|
1118
|
-
}
|
|
1119
|
-
})), or = q("messages", () => ({
|
|
1120
|
-
$el: "ul",
|
|
1121
|
-
if: "$fns.length($messages)"
|
|
1122
|
-
})), ur = q("message", () => ({
|
|
1123
|
-
$el: "li",
|
|
1124
|
-
for: ["message", "$messages"],
|
|
1125
|
-
attrs: {
|
|
1126
|
-
key: "$message.key",
|
|
1127
|
-
id: "$id + '-' + $message.key",
|
|
1128
|
-
"data-message-type": "$message.type"
|
|
1129
|
-
}
|
|
1130
|
-
})), lr = q("prefix", null), ar = q("suffix", null), fr = q("help", () => ({
|
|
1131
|
-
$el: "div",
|
|
1132
|
-
if: "$help",
|
|
1133
|
-
attrs: {
|
|
1134
|
-
id: '$: "help-" + $id'
|
|
1135
|
-
}
|
|
1136
|
-
}));
|
|
1137
|
-
function rt(e) {
|
|
1138
|
-
return typeof e == "object" && ("$el" in e || "$cmp" in e || "$formkit" in e);
|
|
1139
|
-
}
|
|
1140
|
-
function cr(e, n = {}) {
|
|
1141
|
-
return typeof e == "string" ? rt(n) || typeof n == "string" ? n : e : Array.isArray(e) ? rt(n) ? n : e : Le(e, n);
|
|
1142
|
-
}
|
|
1143
|
-
function pr(e) {
|
|
1144
|
-
return nr(ir(sr("$label"), rr(lr(), e(), ar())), fr("$help"), or(ur("$message.value")));
|
|
1145
|
-
}
|
|
1146
|
-
function q(e, n, t = !1) {
|
|
1147
|
-
return (...r) => {
|
|
1148
|
-
const i = (s) => {
|
|
1149
|
-
const o = !n || typeof n == "string" ? { $el: n } : n();
|
|
1150
|
-
return (Ae(o) || Ee(o)) && (o.meta || (o.meta = { section: e }), r.length && !o.children && (o.children = [
|
|
1151
|
-
...r.map((a) => typeof a == "string" ? a : a(s))
|
|
1152
|
-
]), Ae(o) && (o.attrs = {
|
|
1153
|
-
class: `$classes.${e}`,
|
|
1154
|
-
...o.attrs || {}
|
|
1155
|
-
})), {
|
|
1156
|
-
if: `$slots.${e}`,
|
|
1157
|
-
then: `$slots.${e}`,
|
|
1158
|
-
else: e in s ? cr(o, s[e]) : o
|
|
1159
|
-
};
|
|
1160
|
-
};
|
|
1161
|
-
return t ? dr(i) : i;
|
|
1162
|
-
};
|
|
1163
|
-
}
|
|
1164
|
-
function dr(e) {
|
|
1165
|
-
return (n) => [e(n)];
|
|
1166
|
-
}
|
|
1167
|
-
ge({
|
|
1168
|
-
type: "state",
|
|
1169
|
-
blocking: !0,
|
|
1170
|
-
visible: !1,
|
|
1171
|
-
value: !0,
|
|
1172
|
-
key: "validating"
|
|
1173
|
-
});
|
|
1174
|
-
let ae;
|
|
1175
|
-
const mr = new Promise((e) => {
|
|
1176
|
-
}), $e = typeof window < "u" && typeof fetch < "u";
|
|
1177
|
-
ae = $e ? getComputedStyle(document.documentElement) : void 0;
|
|
1178
|
-
const ne = {}, we = {};
|
|
1179
|
-
function Se(e, n) {
|
|
1180
|
-
return (t) => {
|
|
1181
|
-
if (typeof t == "boolean")
|
|
1182
|
-
return;
|
|
1183
|
-
if (t.startsWith("<svg"))
|
|
1184
|
-
return t;
|
|
1185
|
-
if (typeof t != "string")
|
|
1186
|
-
return;
|
|
1187
|
-
const r = ne[t], i = t.startsWith("default:");
|
|
1188
|
-
t = i ? t.split(":")[1] : t;
|
|
1189
|
-
let s;
|
|
1190
|
-
if (r || t in ne)
|
|
1191
|
-
return r;
|
|
1192
|
-
if (!we[t]) {
|
|
1193
|
-
if (s = yr(t), s = $e && typeof s > "u" ? Promise.resolve(s) : s, s instanceof Promise)
|
|
1194
|
-
we[t] = s.then((o) => !o && typeof t == "string" && !i ? s = typeof e == "function" ? e(t) : gr(t, n) : o).then((o) => (typeof t == "string" && (ne[i ? `default:${t}` : t] = o), o));
|
|
1195
|
-
else if (typeof s == "string")
|
|
1196
|
-
return ne[i ? `default:${t}` : t] = s, s;
|
|
1197
|
-
}
|
|
1198
|
-
return we[t];
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
function yr(e) {
|
|
1202
|
-
if (!!$e)
|
|
1203
|
-
return mr.then(() => hr(e));
|
|
1204
|
-
}
|
|
1205
|
-
function hr(e) {
|
|
1206
|
-
const n = ae == null ? void 0 : ae.getPropertyValue(`--fk-icon-${e}`);
|
|
1207
|
-
if (n) {
|
|
1208
|
-
const t = atob(n);
|
|
1209
|
-
if (t.startsWith("<svg"))
|
|
1210
|
-
return ne[e] = t, t;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
function gr(e, n) {
|
|
1214
|
-
const t = nt.startsWith("__") ? "latest" : nt, r = typeof n == "function" ? n(e) : `https://cdn.jsdelivr.net/npm/@formkit/icons@${t}/dist/icons/${e}.svg`;
|
|
1215
|
-
if (!!$e)
|
|
1216
|
-
return fetch(`${r}`).then(async (i) => {
|
|
1217
|
-
const s = await i.text();
|
|
1218
|
-
if (s.startsWith("<svg"))
|
|
1219
|
-
return s;
|
|
1220
|
-
}).catch((i) => {
|
|
1221
|
-
console.error(i);
|
|
1222
|
-
});
|
|
1223
|
-
}
|
|
1224
|
-
let ze = !1;
|
|
1225
|
-
const it = {
|
|
1226
|
-
100: ({ data: e }) => `Only groups, lists, and forms can have children (${e.name}).`,
|
|
1227
|
-
101: ({ data: e }) => `You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,
|
|
1228
|
-
102: ({ data: [e, n] }) => `You cannot directly assign node.${n} (${e.name})`,
|
|
1229
|
-
103: ({ data: [e] }) => `Schema expressions cannot start with an operator (${e})`,
|
|
1230
|
-
104: ({ data: [e, n] }) => `Schema expressions cannot end with an operator (${e} in "${n}")`,
|
|
1231
|
-
105: ({ data: e }) => `Invalid schema expression: ${e}`,
|
|
1232
|
-
106: ({ data: e }) => `Cannot submit because (${e}) is not in a form.`,
|
|
1233
|
-
107: ({ data: [e, n] }) => `Cannot set ${e.name} to non object value: ${n}`,
|
|
1234
|
-
108: ({ data: [e, n] }) => `Cannot set ${e.name} to non array value: ${n}`,
|
|
1235
|
-
600: ({ data: e }) => `Unknown input type${typeof e.props.type == "string" ? ' "' + e.props.type + '"' : ""} ("${e.name}")`,
|
|
1236
|
-
601: ({ data: e }) => `Input definition${typeof e.props.type == "string" ? ' "' + e.props.type + '"' : ""} is missing a schema or component property (${e.name}).`
|
|
1237
|
-
}, st = {
|
|
1238
|
-
150: ({ data: e }) => `Schema function "${e}()" is not a valid function.`,
|
|
1239
|
-
151: ({ data: e }) => `No form element with id: ${e}`,
|
|
1240
|
-
152: ({ data: e }) => `No input element with id: ${e}`,
|
|
1241
|
-
350: ({ data: e }) => `Invalid options prop for radio input (${e.name}). See https://formkit.com/inputs/radio`,
|
|
1242
|
-
650: 'Schema "$get()" must use the id of an input to access.',
|
|
1243
|
-
651: ({ data: e }) => `Cannot setErrors() on "${e}" because no such id exists.`,
|
|
1244
|
-
652: ({ data: e }) => `Cannot clearErrors() on "${e}" because no such id exists.`,
|
|
1245
|
-
800: ({ data: e }) => `${e} is deprecated.`
|
|
1246
|
-
}, _r = (e, n) => {
|
|
1247
|
-
if (e.code in it) {
|
|
1248
|
-
const t = it[e.code];
|
|
1249
|
-
e.message = typeof t == "function" ? t(e) : t;
|
|
1250
|
-
}
|
|
1251
|
-
return n(e);
|
|
1252
|
-
};
|
|
1253
|
-
ze || We(_r);
|
|
1254
|
-
const vr = (e, n) => {
|
|
1255
|
-
if (e.code in st) {
|
|
1256
|
-
const t = st[e.code];
|
|
1257
|
-
e.message = typeof t == "function" ? t(e) : t;
|
|
1258
|
-
}
|
|
1259
|
-
return n(e);
|
|
1260
|
-
};
|
|
1261
|
-
ze || De(vr);
|
|
1262
|
-
ze = !0;
|
|
1263
|
-
const ke = {};
|
|
1264
|
-
let L;
|
|
1265
|
-
const J = /* @__PURE__ */ new Map(), br = "__raw__", $r = /[a-zA-Z0-9\-][cC]lass$/;
|
|
1266
|
-
function wr(e, n) {
|
|
1267
|
-
const t = ie(null);
|
|
1268
|
-
if (e === "get") {
|
|
1269
|
-
const i = {};
|
|
1270
|
-
return t.value = Sr.bind(null, i), t;
|
|
1271
|
-
}
|
|
1272
|
-
const r = e.split(".");
|
|
1273
|
-
return Z(() => t.value = Be(n, r)), t;
|
|
1274
|
-
}
|
|
1275
|
-
function Be(e, n) {
|
|
1276
|
-
if (Array.isArray(e)) {
|
|
1277
|
-
for (const r of e) {
|
|
1278
|
-
const i = r !== !1 && Be(r, n);
|
|
1279
|
-
if (i !== void 0)
|
|
1280
|
-
return i;
|
|
1281
|
-
}
|
|
1282
|
-
return;
|
|
1283
|
-
}
|
|
1284
|
-
let t;
|
|
1285
|
-
return n.reduce((r, i, s, o) => {
|
|
1286
|
-
if (typeof r != "object")
|
|
1287
|
-
return t = void 0, o.splice(1);
|
|
1288
|
-
const a = r[i];
|
|
1289
|
-
return s === n.length - 1 && a !== void 0 && (t = a), r[i];
|
|
1290
|
-
}, e), t;
|
|
1291
|
-
}
|
|
1292
|
-
function Sr(e, n) {
|
|
1293
|
-
if (typeof n != "string")
|
|
1294
|
-
return ve(650);
|
|
1295
|
-
if (n in e || (e[n] = ie(void 0)), e[n].value === void 0) {
|
|
1296
|
-
e[n].value = null;
|
|
1297
|
-
const t = vt(n);
|
|
1298
|
-
t && (e[n].value = t.context), an(n, ({ payload: r }) => {
|
|
1299
|
-
e[n].value = be(r) ? r.context : r;
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
return e[n].value;
|
|
1303
|
-
}
|
|
1304
|
-
function ot(e, n) {
|
|
1305
|
-
function t(d, S) {
|
|
1306
|
-
const $ = g(K(S.if), { if: !0 }), w = m(d, S.then), c = S.else ? m(d, S.else) : null;
|
|
1307
|
-
return [$, w, c];
|
|
1308
|
-
}
|
|
1309
|
-
function r(d, S) {
|
|
1310
|
-
var $, w;
|
|
1311
|
-
const c = g(K(d.if));
|
|
1312
|
-
let f = () => S, p = () => S;
|
|
1313
|
-
return typeof d.then == "object" ? p = i(d.then, void 0) : typeof d.then == "string" && (($ = d.then) === null || $ === void 0 ? void 0 : $.startsWith("$")) ? p = g(K(d.then)) : p = () => d.then, R(d, "else") && (typeof d.else == "object" ? f = i(d.else) : typeof d.else == "string" && ((w = d.else) === null || w === void 0 ? void 0 : w.startsWith("$")) ? f = g(K(d.else)) : f = () => d.else), () => c() ? p() : f();
|
|
1314
|
-
}
|
|
1315
|
-
function i(d, S, $ = {}) {
|
|
1316
|
-
const w = new Set(Object.keys(d || {})), c = S ? g(K(S)) : () => ({}), f = [
|
|
1317
|
-
(p) => {
|
|
1318
|
-
const v = c();
|
|
1319
|
-
for (const k in v)
|
|
1320
|
-
w.has(k) || (p[k] = v[k]);
|
|
1321
|
-
}
|
|
1322
|
-
];
|
|
1323
|
-
if (d) {
|
|
1324
|
-
if (te(d))
|
|
1325
|
-
return r(d, $);
|
|
1326
|
-
for (let p in d) {
|
|
1327
|
-
const v = d[p];
|
|
1328
|
-
let k;
|
|
1329
|
-
const l = typeof v == "string";
|
|
1330
|
-
p.startsWith(br) ? (p = p.substring(7), k = () => v) : l && v.startsWith("$") && v.length > 1 && !(v.startsWith("$reset") && $r.test(p)) ? k = g(K(v)) : typeof v == "object" && te(v) ? k = r(v, void 0) : typeof v == "object" && ye(v) ? k = i(v) : k = () => v, f.push((y) => {
|
|
1331
|
-
y[p] = k();
|
|
1332
|
-
});
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
return () => {
|
|
1336
|
-
const p = Array.isArray(d) ? [] : {};
|
|
1337
|
-
return f.forEach((v) => v(p)), p;
|
|
1338
|
-
};
|
|
1339
|
-
}
|
|
1340
|
-
function s(d, S) {
|
|
1341
|
-
let $ = null, w = () => null, c = !1, f = null, p = null, v = null, k = !1;
|
|
1342
|
-
const l = tr(S);
|
|
1343
|
-
if (Ae(l) ? ($ = l.$el, w = l.$el !== "text" ? i(l.attrs, l.bind) : () => null) : Ee(l) ? (typeof l.$cmp == "string" ? R(d, l.$cmp) ? $ = d[l.$cmp] : ($ = l.$cmp, k = !0) : $ = l.$cmp, w = i(l.props, l.bind)) : te(l) && ([c, f, p] = t(d, l)), !te(l) && "if" in l ? c = g(K(l.if)) : !te(l) && $ === null && (c = () => !0), "children" in l && l.children)
|
|
1344
|
-
if (typeof l.children == "string")
|
|
1345
|
-
if (l.children.startsWith("$slots."))
|
|
1346
|
-
$ = $ === "text" ? "slot" : $, f = g(K(l.children));
|
|
1347
|
-
else if (l.children.startsWith("$") && l.children.length > 1) {
|
|
1348
|
-
const y = g(K(l.children));
|
|
1349
|
-
f = () => String(y());
|
|
1350
|
-
} else
|
|
1351
|
-
f = () => String(l.children);
|
|
1352
|
-
else if (Array.isArray(l.children))
|
|
1353
|
-
f = m(d, l.children);
|
|
1354
|
-
else {
|
|
1355
|
-
const [y, _, b] = t(d, l.children);
|
|
1356
|
-
f = (O) => y && y() ? _ && _(O) : b && b(O);
|
|
1357
|
-
}
|
|
1358
|
-
if (Ee(l))
|
|
1359
|
-
if (f) {
|
|
1360
|
-
const y = f;
|
|
1361
|
-
f = (_) => ({
|
|
1362
|
-
default(b, O) {
|
|
1363
|
-
var I, j, V, E;
|
|
1364
|
-
const x = L;
|
|
1365
|
-
O && (L = O), b && ((I = J.get(L)) === null || I === void 0 || I.unshift(b)), _ && ((j = J.get(L)) === null || j === void 0 || j.unshift(_));
|
|
1366
|
-
const z = y(_);
|
|
1367
|
-
return b && ((V = J.get(L)) === null || V === void 0 || V.shift()), _ && ((E = J.get(L)) === null || E === void 0 || E.shift()), L = x, z;
|
|
1368
|
-
}
|
|
1369
|
-
}), f.slot = !0;
|
|
1370
|
-
} else
|
|
1371
|
-
f = () => ({});
|
|
1372
|
-
if ("for" in l && l.for) {
|
|
1373
|
-
const y = l.for.length === 3 ? l.for[2] : l.for[1];
|
|
1374
|
-
v = [
|
|
1375
|
-
typeof y == "string" && y.startsWith("$") ? g(K(y)) : () => y,
|
|
1376
|
-
l.for[0],
|
|
1377
|
-
l.for.length === 3 ? String(l.for[1]) : null
|
|
1378
|
-
];
|
|
1379
|
-
}
|
|
1380
|
-
return [c, $, w, f, p, v, k];
|
|
1381
|
-
}
|
|
1382
|
-
function o(d, S) {
|
|
1383
|
-
const $ = d(S), w = L;
|
|
1384
|
-
return Object.keys($).reduce((c, f) => {
|
|
1385
|
-
const p = $ && $[f];
|
|
1386
|
-
return c[f] = (v) => p && p(v, w) || null, c;
|
|
1387
|
-
}, {});
|
|
1388
|
-
}
|
|
1389
|
-
function a(d, S) {
|
|
1390
|
-
const [$, w, c, f, p, v, k] = s(d, S);
|
|
1391
|
-
let l = (y) => {
|
|
1392
|
-
if ($ && w === null && f)
|
|
1393
|
-
return $() ? f(y) : p && p(y);
|
|
1394
|
-
if (w && (!$ || $())) {
|
|
1395
|
-
if (w === "text" && f)
|
|
1396
|
-
return Lt(String(f()));
|
|
1397
|
-
if (w === "slot" && f)
|
|
1398
|
-
return f(y);
|
|
1399
|
-
const _ = k ? T(w) : w, b = f != null && f.slot ? o(f, y) : null;
|
|
1400
|
-
return pe(_, c(), b || (f ? f(y) : []));
|
|
1401
|
-
}
|
|
1402
|
-
return typeof p == "function" ? p(y) : p;
|
|
1403
|
-
};
|
|
1404
|
-
if (v) {
|
|
1405
|
-
const y = l, [_, b, O] = v;
|
|
1406
|
-
l = () => {
|
|
1407
|
-
const I = _(), j = isNaN(I) ? I : Array(Number(I)).fill(0).map((x, z) => z), V = [];
|
|
1408
|
-
if (typeof j != "object")
|
|
1409
|
-
return null;
|
|
1410
|
-
const E = J.get(L) || [];
|
|
1411
|
-
for (const x in j) {
|
|
1412
|
-
if (Array.isArray(j) && x === "length")
|
|
1413
|
-
continue;
|
|
1414
|
-
const z = Object.defineProperty({
|
|
1415
|
-
...E.reduce((B, P) => B.__idata ? { ...B, ...P } : P, {}),
|
|
1416
|
-
[b]: j[x],
|
|
1417
|
-
...O !== null ? { [O]: x } : {}
|
|
1418
|
-
}, "__idata", { enumerable: !1, value: !0 });
|
|
1419
|
-
E.unshift(z), V.push(y.bind(null, z)()), E.shift();
|
|
1420
|
-
}
|
|
1421
|
-
return V;
|
|
1422
|
-
};
|
|
1423
|
-
}
|
|
1424
|
-
return l;
|
|
1425
|
-
}
|
|
1426
|
-
function m(d, S) {
|
|
1427
|
-
if (Array.isArray(S)) {
|
|
1428
|
-
const w = S.map(a.bind(null, d));
|
|
1429
|
-
return (c) => w.map((f) => f(c));
|
|
1430
|
-
}
|
|
1431
|
-
const $ = a(d, S);
|
|
1432
|
-
return (w) => $(w);
|
|
1433
|
-
}
|
|
1434
|
-
const h = [];
|
|
1435
|
-
function g(d, S = {}) {
|
|
1436
|
-
const $ = {};
|
|
1437
|
-
return h.push((w, c) => {
|
|
1438
|
-
$[c] = d.provide((f) => w(f, S));
|
|
1439
|
-
}), () => $[L]();
|
|
1440
|
-
}
|
|
1441
|
-
return function(S, $) {
|
|
1442
|
-
const w = JSON.stringify(n), [c, f] = R(ke, w) ? ke[w] : [m(e, n), h];
|
|
1443
|
-
return ke[w] = [c, f], f.forEach((p) => {
|
|
1444
|
-
p(S, $);
|
|
1445
|
-
}), () => (L = $, c());
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
|
-
function It(e, n) {
|
|
1449
|
-
const t = J.get(L) || [];
|
|
1450
|
-
let r;
|
|
1451
|
-
return t.length && (r = Be(t, e.split("."))), r === void 0 ? n : r;
|
|
1452
|
-
}
|
|
1453
|
-
function kr(e, n) {
|
|
1454
|
-
return new Proxy(e, {
|
|
1455
|
-
get(...t) {
|
|
1456
|
-
let r;
|
|
1457
|
-
const i = t[1];
|
|
1458
|
-
if (typeof i == "string") {
|
|
1459
|
-
const s = L;
|
|
1460
|
-
L = n, r = It(i, void 0), L = s;
|
|
1461
|
-
}
|
|
1462
|
-
return r !== void 0 ? r : Reflect.get(...t);
|
|
1463
|
-
}
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
function ut(e, n, t) {
|
|
1467
|
-
return e((r, i = {}) => r.reduce((s, o) => {
|
|
1468
|
-
if (o.startsWith("slots.")) {
|
|
1469
|
-
const m = o.substring(6), h = n.slots && R(n.slots, m);
|
|
1470
|
-
if (i.if)
|
|
1471
|
-
s[o] = () => h;
|
|
1472
|
-
else if (n.slots && h) {
|
|
1473
|
-
const g = kr(n, t);
|
|
1474
|
-
return s[o] = () => n.slots[m](g), s;
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
const a = wr(o, n);
|
|
1478
|
-
return s[o] = () => It(o, a.value), s;
|
|
1479
|
-
}, {}), t);
|
|
1480
|
-
}
|
|
1481
|
-
let lt = 0;
|
|
1482
|
-
const Cr = M({
|
|
1483
|
-
name: "FormKitSchema",
|
|
1484
|
-
props: {
|
|
1485
|
-
schema: {
|
|
1486
|
-
type: [Array, Object],
|
|
1487
|
-
required: !0
|
|
1488
|
-
},
|
|
1489
|
-
data: {
|
|
1490
|
-
type: Object,
|
|
1491
|
-
default: () => ({})
|
|
1492
|
-
},
|
|
1493
|
-
library: {
|
|
1494
|
-
type: Object,
|
|
1495
|
-
default: () => ({})
|
|
1496
|
-
}
|
|
1497
|
-
},
|
|
1498
|
-
setup(e, n) {
|
|
1499
|
-
const t = ft();
|
|
1500
|
-
let r = Symbol(String(lt++));
|
|
1501
|
-
J.set(r, []);
|
|
1502
|
-
let i = ot(e.library, e.schema), s, o;
|
|
1503
|
-
return ce(() => e.schema, (a, m) => {
|
|
1504
|
-
var h;
|
|
1505
|
-
r = Symbol(String(lt++)), i = ot(e.library, e.schema), s = ut(i, o, r), a === m && ((h = t == null ? void 0 : t.proxy) === null || h === void 0 ? void 0 : h.$forceUpdate)();
|
|
1506
|
-
}, { deep: !0 }), Z(() => {
|
|
1507
|
-
o = Object.assign(At(e.data), {
|
|
1508
|
-
slots: n.slots
|
|
1509
|
-
}), s = ut(i, o, r);
|
|
1510
|
-
}), () => s();
|
|
1511
|
-
}
|
|
1512
|
-
}), Vr = {
|
|
1513
|
-
config: {
|
|
1514
|
-
type: Object,
|
|
1515
|
-
default: {}
|
|
1516
|
-
},
|
|
1517
|
-
classes: {
|
|
1518
|
-
type: Object,
|
|
1519
|
-
required: !1
|
|
1520
|
-
},
|
|
1521
|
-
delay: {
|
|
1522
|
-
type: Number,
|
|
1523
|
-
required: !1
|
|
1524
|
-
},
|
|
1525
|
-
errors: {
|
|
1526
|
-
type: Array,
|
|
1527
|
-
default: []
|
|
1528
|
-
},
|
|
1529
|
-
inputErrors: {
|
|
1530
|
-
type: Object,
|
|
1531
|
-
default: () => ({})
|
|
1532
|
-
},
|
|
1533
|
-
index: {
|
|
1534
|
-
type: Number,
|
|
1535
|
-
required: !1
|
|
1536
|
-
},
|
|
1537
|
-
id: {
|
|
1538
|
-
type: String,
|
|
1539
|
-
required: !1
|
|
1540
|
-
},
|
|
1541
|
-
modelValue: {
|
|
1542
|
-
required: !1
|
|
1543
|
-
},
|
|
1544
|
-
name: {
|
|
1545
|
-
type: String,
|
|
1546
|
-
required: !1
|
|
1547
|
-
},
|
|
1548
|
-
parent: {
|
|
1549
|
-
type: Object,
|
|
1550
|
-
required: !1
|
|
1551
|
-
},
|
|
1552
|
-
plugins: {
|
|
1553
|
-
type: Array,
|
|
1554
|
-
default: []
|
|
1555
|
-
},
|
|
1556
|
-
sectionsSchema: {
|
|
1557
|
-
type: Object,
|
|
1558
|
-
default: {}
|
|
1559
|
-
},
|
|
1560
|
-
type: {
|
|
1561
|
-
type: [String, Object],
|
|
1562
|
-
default: "text"
|
|
1563
|
-
},
|
|
1564
|
-
validation: {
|
|
1565
|
-
type: [String, Array],
|
|
1566
|
-
required: !1
|
|
1567
|
-
},
|
|
1568
|
-
validationMessages: {
|
|
1569
|
-
type: Object,
|
|
1570
|
-
required: !1
|
|
1571
|
-
},
|
|
1572
|
-
validationRules: {
|
|
1573
|
-
type: Object,
|
|
1574
|
-
required: !1
|
|
1575
|
-
},
|
|
1576
|
-
validationLabel: {
|
|
1577
|
-
type: [String, Function],
|
|
1578
|
-
required: !1
|
|
1579
|
-
}
|
|
1580
|
-
}, Ir = Vr, xe = Symbol("FormKitParent");
|
|
1581
|
-
M({
|
|
1582
|
-
props: Ir,
|
|
1583
|
-
emits: {
|
|
1584
|
-
input: (e, n) => !0,
|
|
1585
|
-
inputRaw: (e, n) => !0,
|
|
1586
|
-
"update:modelValue": (e) => !0,
|
|
1587
|
-
node: (e) => !!e,
|
|
1588
|
-
submit: (e, n) => !0,
|
|
1589
|
-
submitRaw: (e, n) => !0,
|
|
1590
|
-
submitInvalid: (e) => !0
|
|
1591
|
-
},
|
|
1592
|
-
inheritAttrs: !1,
|
|
1593
|
-
setup(e, n) {
|
|
1594
|
-
const t = xr(e, n);
|
|
1595
|
-
if (t.props.definition || D(600, t), t.props.definition.component)
|
|
1596
|
-
return () => {
|
|
1597
|
-
var o;
|
|
1598
|
-
return pe((o = t.props.definition) === null || o === void 0 ? void 0 : o.component, {
|
|
1599
|
-
context: t.context
|
|
1600
|
-
}, { ...n.slots });
|
|
1601
|
-
};
|
|
1602
|
-
const r = ie([]), i = () => {
|
|
1603
|
-
var o, a;
|
|
1604
|
-
const m = (a = (o = t.props) === null || o === void 0 ? void 0 : o.definition) === null || a === void 0 ? void 0 : a.schema;
|
|
1605
|
-
m || D(601, t), r.value = typeof m == "function" ? m({ ...e.sectionsSchema }) : m;
|
|
1606
|
-
};
|
|
1607
|
-
i(), t.on("schema", i), n.emit("node", t);
|
|
1608
|
-
const s = t.props.definition.library;
|
|
1609
|
-
return n.expose({ node: t }), () => pe(Cr, { schema: r.value, data: t.context, library: s }, { ...n.slots });
|
|
1610
|
-
}
|
|
1611
|
-
});
|
|
1612
|
-
const Ot = Symbol.for("FormKitOptions"), Re = Symbol();
|
|
1613
|
-
function Or(e, n) {
|
|
1614
|
-
const t = {}, r = (o) => {
|
|
1615
|
-
for (const a of o)
|
|
1616
|
-
a.__str in t && t[a.__str](), t[a.__str] = ce(Ar.bind(null, e, a), s.bind(null, a), { deep: !1 });
|
|
1617
|
-
}, s = Pr(e, n, r, (o) => {
|
|
1618
|
-
if (!!o.length)
|
|
1619
|
-
for (const a in t)
|
|
1620
|
-
`${a}`.startsWith(`${o.__str}.`) && (t[a](), delete t[a]);
|
|
1621
|
-
});
|
|
1622
|
-
r(Ne(e));
|
|
1623
|
-
}
|
|
1624
|
-
function Pr(e, n, t, r) {
|
|
1625
|
-
return (i) => {
|
|
1626
|
-
const s = Pt(e, i);
|
|
1627
|
-
s !== Re && (i.__deep && r(i), typeof s == "object" && t(Ne(s, [i], ...i)), n(i, s, e));
|
|
1628
|
-
};
|
|
1629
|
-
}
|
|
1630
|
-
function Ar(e, n) {
|
|
1631
|
-
const t = Pt(e, n);
|
|
1632
|
-
return t && typeof t == "object" ? Object.keys(t) : t;
|
|
1633
|
-
}
|
|
1634
|
-
function Pt(e, n) {
|
|
1635
|
-
if (je(e)) {
|
|
1636
|
-
if (n.length === 0)
|
|
1637
|
-
return e.value;
|
|
1638
|
-
e = e.value;
|
|
1639
|
-
}
|
|
1640
|
-
return n.reduce((t, r) => t === Re ? t : t === null || typeof t != "object" ? Re : t[r], e);
|
|
1641
|
-
}
|
|
1642
|
-
function Ne(e, n = [], ...t) {
|
|
1643
|
-
if (e === null)
|
|
1644
|
-
return n;
|
|
1645
|
-
if (!t.length) {
|
|
1646
|
-
const r = Object.defineProperty([], "__str", {
|
|
1647
|
-
value: ""
|
|
1648
|
-
});
|
|
1649
|
-
if (e = je(e) ? e.value : e, e && typeof e == "object")
|
|
1650
|
-
Object.defineProperty(r, "__deep", { value: !0 }), n.push(r);
|
|
1651
|
-
else
|
|
1652
|
-
return [r];
|
|
1653
|
-
}
|
|
1654
|
-
if (e === null || typeof e != "object")
|
|
1655
|
-
return n;
|
|
1656
|
-
for (const r in e) {
|
|
1657
|
-
const i = t.concat(r);
|
|
1658
|
-
Object.defineProperty(i, "__str", { value: i.join(".") });
|
|
1659
|
-
const s = e[r];
|
|
1660
|
-
ye(s) || Array.isArray(s) ? (n.push(Object.defineProperty(i, "__deep", { value: !0 })), n = n.concat(Ne(s, [], ...i))) : n.push(i);
|
|
1661
|
-
}
|
|
1662
|
-
return n;
|
|
1663
|
-
}
|
|
1664
|
-
function fe(e) {
|
|
1665
|
-
return e === null || typeof e != "object" || (Ze(e) ? e = Mt(e) : je(e) && (e = Ze(e.value) ? fe(e.value) : e.value)), e;
|
|
1666
|
-
}
|
|
1667
|
-
const Ce = [
|
|
1668
|
-
"help",
|
|
1669
|
-
"label",
|
|
1670
|
-
"ignore",
|
|
1671
|
-
"disabled",
|
|
1672
|
-
"preserve",
|
|
1673
|
-
/^preserve(-e|E)rrors/,
|
|
1674
|
-
/^[a-z]+(?:-visibility|Visibility)$/,
|
|
1675
|
-
/^[a-zA-Z-]+(?:-class|Class)$/,
|
|
1676
|
-
"prefixIcon",
|
|
1677
|
-
"suffixIcon",
|
|
1678
|
-
/^[a-zA-Z-]+(?:-icon|Icon)$/
|
|
1679
|
-
];
|
|
1680
|
-
function at(e, n) {
|
|
1681
|
-
n.classes && Object.keys(n.classes).forEach((t) => {
|
|
1682
|
-
typeof t == "string" && (e.props[`_${t}Class`] = n.classes[t], Ie(n.classes[t]) && t === "inner" && Object.values(n.classes[t]));
|
|
1683
|
-
});
|
|
1684
|
-
}
|
|
1685
|
-
function Er(e) {
|
|
1686
|
-
return e ? ["Submit", "SubmitRaw", "SubmitInvalid"].reduce((t, r) => {
|
|
1687
|
-
const i = `on${r}`;
|
|
1688
|
-
return i in e && typeof e[i] == "function" && (t[i] = e[i]), t;
|
|
1689
|
-
}, {}) : {};
|
|
1690
|
-
}
|
|
1691
|
-
function xr(e, n, t = {}) {
|
|
1692
|
-
const r = Object.assign({}, de(Ot) || {}, t), i = ft(), s = Er(i == null ? void 0 : i.vnode.props), o = e.modelValue !== void 0, a = e.modelValue !== void 0 ? e.modelValue : Q(n.attrs.value);
|
|
1693
|
-
function m() {
|
|
1694
|
-
const l = {
|
|
1695
|
-
...Y(e),
|
|
1696
|
-
...s
|
|
1697
|
-
}, y = Je(Y(n.attrs), Ce);
|
|
1698
|
-
l.attrs = y;
|
|
1699
|
-
const _ = Qe(Y(n.attrs), Ce);
|
|
1700
|
-
for (const O in _)
|
|
1701
|
-
l[oe(O)] = _[O];
|
|
1702
|
-
const b = { props: {} };
|
|
1703
|
-
return at(b, e), Object.assign(l, b.props), typeof l.type != "string" && (l.definition = l.type, delete l.type), l;
|
|
1704
|
-
}
|
|
1705
|
-
const h = m(), g = h.ignore ? null : e.parent || de(xe, null), d = Xn(Le(r || {}, {
|
|
1706
|
-
name: e.name || void 0,
|
|
1707
|
-
value: a,
|
|
1708
|
-
parent: g,
|
|
1709
|
-
plugins: (r.plugins || []).concat(e.plugins),
|
|
1710
|
-
config: e.config,
|
|
1711
|
-
props: h,
|
|
1712
|
-
index: e.index
|
|
1713
|
-
}, !1, !0));
|
|
1714
|
-
d.props.definition || D(600, d);
|
|
1715
|
-
const S = ie(new Set(d.props.definition.props || []));
|
|
1716
|
-
d.on("added-props", ({ payload: l }) => {
|
|
1717
|
-
Array.isArray(l) && l.forEach((y) => S.value.add(y));
|
|
1718
|
-
});
|
|
1719
|
-
const $ = Et(() => Ce.concat([...S.value]).reduce((l, y) => (typeof y == "string" ? (l.push(oe(y)), l.push(dt(y))) : l.push(y), l), []));
|
|
1720
|
-
Z(() => at(d, e));
|
|
1721
|
-
const w = Y(e);
|
|
1722
|
-
for (const l in w)
|
|
1723
|
-
ce(() => e[l], () => {
|
|
1724
|
-
e[l] !== void 0 && (d.props[l] = e[l]);
|
|
1725
|
-
});
|
|
1726
|
-
const c = /* @__PURE__ */ new Set(), f = Y(n.attrs);
|
|
1727
|
-
Z(() => {
|
|
1728
|
-
p(Qe(f, $.value));
|
|
1729
|
-
});
|
|
1730
|
-
function p(l) {
|
|
1731
|
-
c.forEach((y) => {
|
|
1732
|
-
y(), c.delete(y);
|
|
1733
|
-
});
|
|
1734
|
-
for (const y in l) {
|
|
1735
|
-
const _ = oe(y);
|
|
1736
|
-
c.add(ce(() => n.attrs[y], () => {
|
|
1737
|
-
d.props[_] = n.attrs[y];
|
|
1738
|
-
}));
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
if (Z(() => {
|
|
1742
|
-
const l = Je(Y(n.attrs), $.value);
|
|
1743
|
-
d.props.attrs = Object.assign({}, d.props.attrs || {}, l);
|
|
1744
|
-
}), Z(() => {
|
|
1745
|
-
const l = e.errors.map((y) => ge({
|
|
1746
|
-
key: mt(y),
|
|
1747
|
-
type: "error",
|
|
1748
|
-
value: y,
|
|
1749
|
-
meta: { source: "prop" }
|
|
1750
|
-
}));
|
|
1751
|
-
d.store.apply(l, (y) => y.type === "error" && y.meta.source === "prop");
|
|
1752
|
-
}), d.type !== "input") {
|
|
1753
|
-
const l = `${d.name}-prop`;
|
|
1754
|
-
Z(() => {
|
|
1755
|
-
const y = Object.keys(e.inputErrors);
|
|
1756
|
-
y.length || d.clearErrors(!0, l);
|
|
1757
|
-
const _ = y.reduce((b, O) => {
|
|
1758
|
-
let I = e.inputErrors[O];
|
|
1759
|
-
return typeof I == "string" && (I = [I]), Array.isArray(I) && (b[O] = I.map((j) => ge({
|
|
1760
|
-
key: j,
|
|
1761
|
-
type: "error",
|
|
1762
|
-
value: j,
|
|
1763
|
-
meta: { source: l }
|
|
1764
|
-
}))), b;
|
|
1765
|
-
}, {});
|
|
1766
|
-
d.store.apply(_, (b) => b.type === "error" && b.meta.source === l);
|
|
1767
|
-
});
|
|
1768
|
-
}
|
|
1769
|
-
Z(() => Object.assign(d.config, e.config)), d.type !== "input" && xt(xe, d);
|
|
1770
|
-
let v;
|
|
1771
|
-
const k = /* @__PURE__ */ new WeakSet();
|
|
1772
|
-
return d.on("modelUpdated", () => {
|
|
1773
|
-
var l, y;
|
|
1774
|
-
if (n.emit("inputRaw", (l = d.context) === null || l === void 0 ? void 0 : l.value, d), clearTimeout(v), v = setTimeout(n.emit, 20, "input", (y = d.context) === null || y === void 0 ? void 0 : y.value, d), o && d.context) {
|
|
1775
|
-
const _ = fe(d.context.value);
|
|
1776
|
-
Ie(_) && fe(e.modelValue) !== _ && k.add(_), n.emit("update:modelValue", _);
|
|
1777
|
-
}
|
|
1778
|
-
}), o && Or(Rt(e, "modelValue"), (l, y) => {
|
|
1779
|
-
var _;
|
|
1780
|
-
const b = fe(y);
|
|
1781
|
-
if (Ie(b) && k.has(b))
|
|
1782
|
-
return k.delete(b);
|
|
1783
|
-
l.length ? (_ = d.at(l)) === null || _ === void 0 || _.input(y, !1) : d.input(y, !1);
|
|
1784
|
-
}), jt(() => d.destroy()), d;
|
|
1785
|
-
}
|
|
1786
|
-
let Rr = 1;
|
|
1787
|
-
function jr(e) {
|
|
1788
|
-
return typeof e == "function" && e.length === 2 || typeof e == "object" && !Array.isArray(e) && !("$el" in e) && !("$cmp" in e) && !("if" in e);
|
|
1789
|
-
}
|
|
1790
|
-
function W(e, n = {}) {
|
|
1791
|
-
const t = {
|
|
1792
|
-
type: "input",
|
|
1793
|
-
...n
|
|
1794
|
-
};
|
|
1795
|
-
let r;
|
|
1796
|
-
if (jr(e)) {
|
|
1797
|
-
const i = `SchemaComponent${Rr++}`;
|
|
1798
|
-
r = q("input", () => ({
|
|
1799
|
-
$cmp: i,
|
|
1800
|
-
props: {
|
|
1801
|
-
context: "$node.context"
|
|
1802
|
-
}
|
|
1803
|
-
})), t.library = { [i]: Tt(e) };
|
|
1804
|
-
} else
|
|
1805
|
-
typeof e == "function" ? r = e : r = q("input", () => Q(e));
|
|
1806
|
-
return t.schema = pr(r || "Schema undefined"), t;
|
|
1807
|
-
}
|
|
1808
|
-
M({
|
|
1809
|
-
name: "FormKitIcon",
|
|
1810
|
-
props: {
|
|
1811
|
-
icon: {
|
|
1812
|
-
type: String,
|
|
1813
|
-
default: ""
|
|
1814
|
-
},
|
|
1815
|
-
iconLoader: {
|
|
1816
|
-
type: Function,
|
|
1817
|
-
default: null
|
|
1818
|
-
},
|
|
1819
|
-
iconLoaderUrl: {
|
|
1820
|
-
type: Function,
|
|
1821
|
-
default: null
|
|
1822
|
-
}
|
|
1823
|
-
},
|
|
1824
|
-
setup(e) {
|
|
1825
|
-
var n, t;
|
|
1826
|
-
const r = ie(void 0), i = de(Ot, {}), s = de(xe, null);
|
|
1827
|
-
let o;
|
|
1828
|
-
if (e.iconLoader && typeof e.iconLoader == "function")
|
|
1829
|
-
o = Se(e.iconLoader);
|
|
1830
|
-
else if (s && ((n = s.props) === null || n === void 0 ? void 0 : n.iconLoader))
|
|
1831
|
-
o = Se(s.props.iconLoader);
|
|
1832
|
-
else if (e.iconLoaderUrl && typeof e.iconLoaderUrl == "function")
|
|
1833
|
-
o = Se(o, e.iconLoaderUrl);
|
|
1834
|
-
else {
|
|
1835
|
-
const a = (t = i == null ? void 0 : i.plugins) === null || t === void 0 ? void 0 : t.find((m) => typeof m.iconHandler == "function");
|
|
1836
|
-
a && (o = a.iconHandler);
|
|
1837
|
-
}
|
|
1838
|
-
if (o && typeof o == "function") {
|
|
1839
|
-
const a = o(e.icon);
|
|
1840
|
-
a instanceof Promise ? a.then((m) => {
|
|
1841
|
-
r.value = m;
|
|
1842
|
-
}) : r.value = a;
|
|
1843
|
-
}
|
|
1844
|
-
return () => r.value ? pe("span", {
|
|
1845
|
-
class: "formkit-icon",
|
|
1846
|
-
innerHTML: r.value
|
|
1847
|
-
}) : null;
|
|
1848
|
-
}
|
|
1849
|
-
});
|
|
1850
|
-
const Mr = /* @__PURE__ */ M({
|
|
1851
|
-
__name: "PrimeInputText",
|
|
1852
|
-
props: {
|
|
1853
|
-
context: Object
|
|
1854
|
-
},
|
|
1855
|
-
setup(e) {
|
|
1856
|
-
const t = e.context, r = () => (t == null ? void 0 : t.iconLeft) && (t == null ? void 0 : t.iconLeft.length) > 0, i = () => (t == null ? void 0 : t.iconRight) && (t == null ? void 0 : t.iconRight.length) > 0, s = () => {
|
|
1857
|
-
let m = "";
|
|
1858
|
-
return r() && (m = `${m}p-input-icon-left `), i() && (m = `${m}p-input-icon-right `), m;
|
|
1859
|
-
};
|
|
1860
|
-
function o(m) {
|
|
1861
|
-
t == null || t.handlers.blur(m.target.value);
|
|
1862
|
-
}
|
|
1863
|
-
function a(m) {
|
|
1864
|
-
t == null || t.node.input(m.target.value);
|
|
1865
|
-
}
|
|
1866
|
-
return (m, h) => {
|
|
1867
|
-
const g = T("InputText");
|
|
1868
|
-
return A(), H("span", {
|
|
1869
|
-
class: F(s())
|
|
1870
|
-
}, [
|
|
1871
|
-
r() ? (A(), H("i", {
|
|
1872
|
-
key: 0,
|
|
1873
|
-
class: F(u(t).iconLeft)
|
|
1874
|
-
}, null, 2)) : G("", !0),
|
|
1875
|
-
Me(g, {
|
|
1876
|
-
modelValue: u(t)._value,
|
|
1877
|
-
"onUpdate:modelValue": h[0] || (h[0] = (d) => u(t)._value = d),
|
|
1878
|
-
id: u(t).id,
|
|
1879
|
-
name: u(t).name,
|
|
1880
|
-
class: F(u(t).attrs.class),
|
|
1881
|
-
placeholder: u(t).attrs.placeholder,
|
|
1882
|
-
onInput: a,
|
|
1883
|
-
onBlur: o
|
|
1884
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder"]),
|
|
1885
|
-
i ? (A(), H("i", {
|
|
1886
|
-
key: 1,
|
|
1887
|
-
class: F(u(t).iconRight)
|
|
1888
|
-
}, null, 2)) : G("", !0)
|
|
1889
|
-
], 2);
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
}), Tr = /* @__PURE__ */ M({
|
|
1893
|
-
__name: "PrimeInputNumber",
|
|
1894
|
-
props: {
|
|
1895
|
-
context: Object
|
|
1896
|
-
},
|
|
1897
|
-
setup(e) {
|
|
1898
|
-
const t = e.context;
|
|
1899
|
-
function r(s) {
|
|
1900
|
-
t == null || t.handlers.blur(s.value);
|
|
1901
|
-
}
|
|
1902
|
-
function i(s) {
|
|
1903
|
-
t == null || t.node.input(s.value);
|
|
1904
|
-
}
|
|
1905
|
-
return (s, o) => {
|
|
1906
|
-
var m, h, g, d, S, $, w, c, f, p, v;
|
|
1907
|
-
const a = T("InputNumber");
|
|
1908
|
-
return A(), U(a, {
|
|
1909
|
-
modelValue: u(t)._value,
|
|
1910
|
-
"onUpdate:modelValue": o[0] || (o[0] = (k) => u(t)._value = k),
|
|
1911
|
-
id: u(t).id,
|
|
1912
|
-
name: u(t).name,
|
|
1913
|
-
placeholder: u(t).attrs.placeholder,
|
|
1914
|
-
class: F(u(t).attrs.class),
|
|
1915
|
-
"use-grouping": (m = u(t).attrs.useGrouping) != null ? m : !0,
|
|
1916
|
-
"min-fraction-digits": (h = u(t).attrs.minFractionDigits) != null ? h : void 0,
|
|
1917
|
-
"max-fraction-digits": (g = u(t).attrs.maxFractionDigits) != null ? g : void 0,
|
|
1918
|
-
locale: (d = u(t).attrs.locale) != null ? d : void 0,
|
|
1919
|
-
mode: (S = u(t).attrs.mode) != null ? S : void 0,
|
|
1920
|
-
currency: ($ = u(t).attrs.currency) != null ? $ : void 0,
|
|
1921
|
-
prefix: (w = u(t).attrs.prefix) != null ? w : void 0,
|
|
1922
|
-
suffix: (c = u(t).attrs.suffix) != null ? c : void 0,
|
|
1923
|
-
"show-buttons": (f = u(t).attrs.showButtons) != null ? f : void 0,
|
|
1924
|
-
"button-layout": (p = u(t).attrs.buttonLayout) != null ? p : "stacked",
|
|
1925
|
-
step: (v = u(t).attrs.step) != null ? v : void 0,
|
|
1926
|
-
onInput: i,
|
|
1927
|
-
onBlur: r
|
|
1928
|
-
}, null, 8, ["modelValue", "id", "name", "placeholder", "class", "use-grouping", "min-fraction-digits", "max-fraction-digits", "locale", "mode", "currency", "prefix", "suffix", "show-buttons", "button-layout", "step"]);
|
|
1929
|
-
};
|
|
1930
|
-
}
|
|
1931
|
-
}), Lr = /* @__PURE__ */ M({
|
|
1932
|
-
__name: "PrimeInputMask",
|
|
1933
|
-
props: {
|
|
1934
|
-
context: Object
|
|
1935
|
-
},
|
|
1936
|
-
setup(e) {
|
|
1937
|
-
const n = e, t = n.context;
|
|
1938
|
-
function r(i) {
|
|
1939
|
-
var s, o;
|
|
1940
|
-
t == null || t.node.input((s = n.context) == null ? void 0 : s._value), t == null || t.handlers.blur((o = n.context) == null ? void 0 : o._value);
|
|
1941
|
-
}
|
|
1942
|
-
return (i, s) => {
|
|
1943
|
-
var a, m, h, g;
|
|
1944
|
-
const o = T("InputMask");
|
|
1945
|
-
return A(), U(o, {
|
|
1946
|
-
modelValue: u(t)._value,
|
|
1947
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) => u(t)._value = d),
|
|
1948
|
-
id: u(t).id,
|
|
1949
|
-
name: u(t).name,
|
|
1950
|
-
class: F(u(t).attrs.class),
|
|
1951
|
-
placeholder: u(t).attrs.placeholder,
|
|
1952
|
-
mask: (a = u(t).attrs.mask) != null ? a : void 0,
|
|
1953
|
-
"slot-char": (m = u(t).attrs.slotChar) != null ? m : "_",
|
|
1954
|
-
"auto-clear": (h = u(t).attrs.autoClear) != null ? h : !0,
|
|
1955
|
-
unmask: (g = u(t).attrs.unmask) != null ? g : !1,
|
|
1956
|
-
onBlur: r
|
|
1957
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder", "mask", "slot-char", "auto-clear", "unmask"]);
|
|
1958
|
-
};
|
|
1959
|
-
}
|
|
1960
|
-
}), Fr = /* @__PURE__ */ M({
|
|
1961
|
-
__name: "PrimePassword",
|
|
1962
|
-
props: {
|
|
1963
|
-
context: Object
|
|
1964
|
-
},
|
|
1965
|
-
setup(e) {
|
|
1966
|
-
const t = e.context;
|
|
1967
|
-
function r(s) {
|
|
1968
|
-
t == null || t.handlers.blur(s.target.value);
|
|
1969
|
-
}
|
|
1970
|
-
function i(s) {
|
|
1971
|
-
t == null || t.node.input(s.target.value);
|
|
1972
|
-
}
|
|
1973
|
-
return (s, o) => {
|
|
1974
|
-
var m, h, g, d;
|
|
1975
|
-
const a = T("Password");
|
|
1976
|
-
return A(), U(a, {
|
|
1977
|
-
modelValue: u(t)._value,
|
|
1978
|
-
"onUpdate:modelValue": o[0] || (o[0] = (S) => u(t)._value = S),
|
|
1979
|
-
id: u(t).id,
|
|
1980
|
-
name: u(t).name,
|
|
1981
|
-
class: F(u(t).attrs.class),
|
|
1982
|
-
placeholder: u(t).attrs.placeholder,
|
|
1983
|
-
feedback: (h = (m = u(t)) == null ? void 0 : m.feedback) != null ? h : !0,
|
|
1984
|
-
"toggle-mask": (d = (g = u(t)) == null ? void 0 : g.toggleMask) != null ? d : !1,
|
|
1985
|
-
onInput: i,
|
|
1986
|
-
onBlur: r
|
|
1987
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder", "feedback", "toggle-mask"]);
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
}), Wr = /* @__PURE__ */ M({
|
|
1991
|
-
__name: "PrimeInputTextArea",
|
|
1992
|
-
props: {
|
|
1993
|
-
context: Object
|
|
1994
|
-
},
|
|
1995
|
-
setup(e) {
|
|
1996
|
-
const t = e.context;
|
|
1997
|
-
function r(s) {
|
|
1998
|
-
t == null || t.handlers.blur(s.target.value);
|
|
1999
|
-
}
|
|
2000
|
-
function i(s) {
|
|
2001
|
-
t == null || t.node.input(s.target.value);
|
|
2002
|
-
}
|
|
2003
|
-
return (s, o) => {
|
|
2004
|
-
var m;
|
|
2005
|
-
const a = T("Textarea");
|
|
2006
|
-
return A(), U(a, {
|
|
2007
|
-
modelValue: u(t)._value,
|
|
2008
|
-
"onUpdate:modelValue": o[0] || (o[0] = (h) => u(t)._value = h),
|
|
2009
|
-
id: u(t).id,
|
|
2010
|
-
name: u(t).name,
|
|
2011
|
-
class: F(u(t).attrs.class),
|
|
2012
|
-
placeholder: u(t).attrs.placeholder,
|
|
2013
|
-
rows: (m = u(t).rows) != null ? m : 3,
|
|
2014
|
-
onInput: i,
|
|
2015
|
-
onBlur: r
|
|
2016
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder", "rows"]);
|
|
2017
|
-
};
|
|
2018
|
-
}
|
|
2019
|
-
}), Dr = {
|
|
2020
|
-
key: 0,
|
|
2021
|
-
class: "formkit-prime-left"
|
|
2022
|
-
}, Ur = {
|
|
2023
|
-
key: 1,
|
|
2024
|
-
class: "formkit-prime-right"
|
|
2025
|
-
}, Kr = /* @__PURE__ */ M({
|
|
2026
|
-
__name: "PrimeCheckBox",
|
|
2027
|
-
props: {
|
|
2028
|
-
context: Object
|
|
2029
|
-
},
|
|
2030
|
-
setup(e) {
|
|
2031
|
-
const t = e.context;
|
|
2032
|
-
function r(i) {
|
|
2033
|
-
t == null || t.node.input(i);
|
|
2034
|
-
}
|
|
2035
|
-
return (i, s) => {
|
|
2036
|
-
const o = T("Checkbox");
|
|
2037
|
-
return A(), H(ct, null, [
|
|
2038
|
-
u(t).attrs.labelLeft ? (A(), H("span", Dr, me(u(t).attrs.labelLeft), 1)) : G("", !0),
|
|
2039
|
-
Me(o, {
|
|
2040
|
-
modelValue: u(t)._value,
|
|
2041
|
-
"onUpdate:modelValue": s[0] || (s[0] = (a) => u(t)._value = a),
|
|
2042
|
-
id: u(t).id,
|
|
2043
|
-
name: u(t).name,
|
|
2044
|
-
class: F(u(t).attrs.class),
|
|
2045
|
-
placeholder: u(t).attrs.placeholder,
|
|
2046
|
-
binary: !0,
|
|
2047
|
-
onInput: r
|
|
2048
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder"]),
|
|
2049
|
-
u(t).attrs.labelRight ? (A(), H("span", Ur, me(u(t).attrs.labelRight), 1)) : G("", !0)
|
|
2050
|
-
], 64);
|
|
2051
|
-
};
|
|
2052
|
-
}
|
|
2053
|
-
}), qr = {
|
|
2054
|
-
key: 0,
|
|
2055
|
-
class: "formkit-prime-left"
|
|
2056
|
-
}, zr = {
|
|
2057
|
-
key: 1,
|
|
2058
|
-
class: "formkit-prime-right"
|
|
2059
|
-
}, Br = /* @__PURE__ */ M({
|
|
2060
|
-
__name: "PrimeInputSwitch",
|
|
2061
|
-
props: {
|
|
2062
|
-
context: Object
|
|
2063
|
-
},
|
|
2064
|
-
setup(e) {
|
|
2065
|
-
const n = e, t = n.context;
|
|
2066
|
-
function r(i) {
|
|
2067
|
-
var s;
|
|
2068
|
-
t == null || t.node.input((s = n.context) == null ? void 0 : s._value);
|
|
2069
|
-
}
|
|
2070
|
-
return (i, s) => {
|
|
2071
|
-
var a, m;
|
|
2072
|
-
const o = T("InputSwitch");
|
|
2073
|
-
return A(), H(ct, null, [
|
|
2074
|
-
u(t).attrs.labelLeft ? (A(), H("span", qr, me(u(t).attrs.labelLeft), 1)) : G("", !0),
|
|
2075
|
-
Me(o, {
|
|
2076
|
-
modelValue: u(t)._value,
|
|
2077
|
-
"onUpdate:modelValue": s[0] || (s[0] = (h) => u(t)._value = h),
|
|
2078
|
-
id: u(t).id,
|
|
2079
|
-
name: u(t).name,
|
|
2080
|
-
class: F(u(t).attrs.class),
|
|
2081
|
-
"true-value": (a = u(t).attrs.trueValue) != null ? a : void 0,
|
|
2082
|
-
"false-value": (m = u(t).attrs.falseValue) != null ? m : void 0,
|
|
2083
|
-
onInput: r
|
|
2084
|
-
}, null, 8, ["modelValue", "id", "name", "class", "true-value", "false-value"]),
|
|
2085
|
-
u(t).attrs.labelRight ? (A(), H("span", zr, me(u(t).attrs.labelRight), 1)) : G("", !0)
|
|
2086
|
-
], 64);
|
|
2087
|
-
};
|
|
2088
|
-
}
|
|
2089
|
-
}), Nr = /* @__PURE__ */ M({
|
|
2090
|
-
__name: "PrimeEditor",
|
|
2091
|
-
props: {
|
|
2092
|
-
context: Object
|
|
2093
|
-
},
|
|
2094
|
-
setup(e) {
|
|
2095
|
-
const t = e.context;
|
|
2096
|
-
function r(s) {
|
|
2097
|
-
t == null || t.node.input(s.htmlValue);
|
|
2098
|
-
}
|
|
2099
|
-
function i(s) {
|
|
2100
|
-
s.range === null && (t == null || t.handlers.blur(s.htmlValue));
|
|
2101
|
-
}
|
|
2102
|
-
return (s, o) => {
|
|
2103
|
-
const a = T("Editor");
|
|
2104
|
-
return A(), U(a, {
|
|
2105
|
-
modelValue: u(t)._value,
|
|
2106
|
-
"onUpdate:modelValue": o[0] || (o[0] = (m) => u(t)._value = m),
|
|
2107
|
-
id: u(t).id,
|
|
2108
|
-
name: u(t).name,
|
|
2109
|
-
class: F(u(t).attrs.class),
|
|
2110
|
-
placeholder: u(t).attrs.placeholder,
|
|
2111
|
-
onTextChange: r,
|
|
2112
|
-
onSelectionChange: i
|
|
2113
|
-
}, null, 8, ["modelValue", "id", "name", "class", "placeholder"]);
|
|
2114
|
-
};
|
|
2115
|
-
}
|
|
2116
|
-
}), Hr = /* @__PURE__ */ M({
|
|
2117
|
-
__name: "PrimeDropdown",
|
|
2118
|
-
props: {
|
|
2119
|
-
context: Object
|
|
2120
|
-
},
|
|
2121
|
-
setup(e) {
|
|
2122
|
-
const t = e.context;
|
|
2123
|
-
function r(s) {
|
|
2124
|
-
t == null || t.handlers.blur(s.value);
|
|
2125
|
-
}
|
|
2126
|
-
function i(s) {
|
|
2127
|
-
t == null || t.node.input(s.value);
|
|
2128
|
-
}
|
|
2129
|
-
return (s, o) => {
|
|
2130
|
-
var m, h, g, d;
|
|
2131
|
-
const a = T("Dropdown");
|
|
2132
|
-
return A(), U(a, {
|
|
2133
|
-
modelValue: u(t)._value,
|
|
2134
|
-
"onUpdate:modelValue": o[0] || (o[0] = (S) => u(t)._value = S),
|
|
2135
|
-
id: u(t).id,
|
|
2136
|
-
name: u(t).name,
|
|
2137
|
-
class: F(u(t).attrs.class),
|
|
2138
|
-
options: (h = (m = u(t)) == null ? void 0 : m.attrs) == null ? void 0 : h.options,
|
|
2139
|
-
"option-label": "label",
|
|
2140
|
-
"option-value": "value",
|
|
2141
|
-
placeholder: u(t).attrs.placeholder,
|
|
2142
|
-
filter: (g = u(t).attrs.filter) != null ? g : !1,
|
|
2143
|
-
"show-clear": (d = u(t).attrs.showClear) != null ? d : !1,
|
|
2144
|
-
onChange: i,
|
|
2145
|
-
onBlur: r
|
|
2146
|
-
}, null, 8, ["modelValue", "id", "name", "class", "options", "placeholder", "filter", "show-clear"]);
|
|
2147
|
-
};
|
|
2148
|
-
}
|
|
2149
|
-
}), Zr = /* @__PURE__ */ M({
|
|
2150
|
-
__name: "PrimeMultiSelect",
|
|
2151
|
-
props: {
|
|
2152
|
-
context: Object
|
|
2153
|
-
},
|
|
2154
|
-
setup(e) {
|
|
2155
|
-
const n = e, t = n.context;
|
|
2156
|
-
function r(i) {
|
|
2157
|
-
var s;
|
|
2158
|
-
t == null || t.node.input((s = n.context) == null ? void 0 : s._value);
|
|
2159
|
-
}
|
|
2160
|
-
return (i, s) => {
|
|
2161
|
-
var a, m, h;
|
|
2162
|
-
const o = T("MultiSelect");
|
|
2163
|
-
return A(), U(o, {
|
|
2164
|
-
modelValue: u(t)._value,
|
|
2165
|
-
"onUpdate:modelValue": s[0] || (s[0] = (g) => u(t)._value = g),
|
|
2166
|
-
id: u(t).id,
|
|
2167
|
-
name: u(t).name,
|
|
2168
|
-
class: F(u(t).attrs.class),
|
|
2169
|
-
options: (m = (a = u(t)) == null ? void 0 : a.attrs) == null ? void 0 : m.options,
|
|
2170
|
-
"option-label": "label",
|
|
2171
|
-
"option-value": "value",
|
|
2172
|
-
placeholder: u(t).attrs.placeholder,
|
|
2173
|
-
filter: (h = u(t).attrs.filter) != null ? h : !1,
|
|
2174
|
-
onChange: r
|
|
2175
|
-
}, null, 8, ["modelValue", "id", "name", "class", "options", "placeholder", "filter"]);
|
|
2176
|
-
};
|
|
2177
|
-
}
|
|
2178
|
-
}), Jr = /* @__PURE__ */ M({
|
|
2179
|
-
__name: "PrimeCalendar",
|
|
2180
|
-
props: {
|
|
2181
|
-
context: Object
|
|
2182
|
-
},
|
|
2183
|
-
setup(e) {
|
|
2184
|
-
const n = e, t = n.context;
|
|
2185
|
-
function r(s) {
|
|
2186
|
-
t == null || t.node.input(t == null ? void 0 : t._value);
|
|
2187
|
-
}
|
|
2188
|
-
function i(s) {
|
|
2189
|
-
t == null || t.node.input(s);
|
|
2190
|
-
}
|
|
2191
|
-
return (s, o) => {
|
|
2192
|
-
const a = T("Calendar");
|
|
2193
|
-
return A(), U(a, {
|
|
2194
|
-
modelValue: u(t)._value,
|
|
2195
|
-
"onUpdate:modelValue": o[0] || (o[0] = (m) => u(t)._value = m),
|
|
2196
|
-
id: n.context.id,
|
|
2197
|
-
name: u(t).name,
|
|
2198
|
-
class: F(u(t).attrs.class),
|
|
2199
|
-
"date-format": u(t).attrs.dateFormat,
|
|
2200
|
-
"show-icon": u(t).attrs.showIcon,
|
|
2201
|
-
icon: u(t).attrs.icon,
|
|
2202
|
-
onDateSelect: i,
|
|
2203
|
-
onInput: r
|
|
2204
|
-
}, null, 8, ["modelValue", "id", "name", "class", "date-format", "show-icon", "icon"]);
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
}), Qr = /* @__PURE__ */ M({
|
|
2208
|
-
__name: "PrimeSlider",
|
|
2209
|
-
props: {
|
|
2210
|
-
context: Object
|
|
2211
|
-
},
|
|
2212
|
-
setup(e) {
|
|
2213
|
-
const t = e.context;
|
|
2214
|
-
function r(i) {
|
|
2215
|
-
t == null || t.node.input(i), t == null || t.handlers.blur(i);
|
|
2216
|
-
}
|
|
2217
|
-
return (i, s) => {
|
|
2218
|
-
var a, m, h, g;
|
|
2219
|
-
const o = T("Slider");
|
|
2220
|
-
return A(), U(o, {
|
|
2221
|
-
modelValue: u(t)._value,
|
|
2222
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) => u(t)._value = d),
|
|
2223
|
-
id: u(t).id,
|
|
2224
|
-
name: u(t).name,
|
|
2225
|
-
min: (a = u(t).attrs.min) != null ? a : 0,
|
|
2226
|
-
max: (m = u(t).attrs.max) != null ? m : 100,
|
|
2227
|
-
step: (h = u(t).attrs.step) != null ? h : void 0,
|
|
2228
|
-
range: (g = u(t).attrs.range) != null ? g : !1,
|
|
2229
|
-
onChange: r
|
|
2230
|
-
}, null, 8, ["modelValue", "id", "name", "min", "max", "step", "range"]);
|
|
2231
|
-
};
|
|
2232
|
-
}
|
|
2233
|
-
}), Yr = /* @__PURE__ */ M({
|
|
2234
|
-
__name: "PrimeRating",
|
|
2235
|
-
props: {
|
|
2236
|
-
context: Object
|
|
2237
|
-
},
|
|
2238
|
-
setup(e) {
|
|
2239
|
-
const n = e, t = n.context;
|
|
2240
|
-
function r(i) {
|
|
2241
|
-
var s;
|
|
2242
|
-
t == null || t.node.input((s = n.context) == null ? void 0 : s._value);
|
|
2243
|
-
}
|
|
2244
|
-
return (i, s) => {
|
|
2245
|
-
var a, m, h, g;
|
|
2246
|
-
const o = T("Rating");
|
|
2247
|
-
return A(), U(o, {
|
|
2248
|
-
modelValue: u(t)._value,
|
|
2249
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) => u(t)._value = d),
|
|
2250
|
-
id: u(t).id,
|
|
2251
|
-
name: u(t).name,
|
|
2252
|
-
disabled: (a = u(t).attrs.disabled) != null ? a : !1,
|
|
2253
|
-
readonly: (m = u(t).attrs.readonly) != null ? m : !1,
|
|
2254
|
-
stars: (h = u(t).attrs.stars) != null ? h : 5,
|
|
2255
|
-
cancel: (g = u(t).attrs.cancel) != null ? g : !1,
|
|
2256
|
-
onChange: r
|
|
2257
|
-
}, null, 8, ["modelValue", "id", "name", "disabled", "readonly", "stars", "cancel"]);
|
|
2258
|
-
};
|
|
2259
|
-
}
|
|
2260
|
-
}), Gr = /* @__PURE__ */ M({
|
|
2261
|
-
__name: "PrimeChips",
|
|
2262
|
-
props: {
|
|
2263
|
-
context: Object
|
|
2264
|
-
},
|
|
2265
|
-
setup(e) {
|
|
2266
|
-
const n = e, t = n.context;
|
|
2267
|
-
function r(i) {
|
|
2268
|
-
var s;
|
|
2269
|
-
t == null || t.node.input((s = n.context) == null ? void 0 : s._value);
|
|
2270
|
-
}
|
|
2271
|
-
return (i, s) => {
|
|
2272
|
-
var a, m, h;
|
|
2273
|
-
const o = T("Chips");
|
|
2274
|
-
return A(), U(o, {
|
|
2275
|
-
modelValue: u(t)._value,
|
|
2276
|
-
"onUpdate:modelValue": s[0] || (s[0] = (g) => u(t)._value = g),
|
|
2277
|
-
id: u(t).id,
|
|
2278
|
-
name: u(t).name,
|
|
2279
|
-
class: F(u(t).attrs.class),
|
|
2280
|
-
"allow-duplicate": (a = u(t).attrs.allowDuplicate) != null ? a : !0,
|
|
2281
|
-
"add-on-blur": (m = u(t).attrs.addOnBlur) != null ? m : !1,
|
|
2282
|
-
max: (h = u(t).attrs.max) != null ? h : void 0,
|
|
2283
|
-
onAdd: r,
|
|
2284
|
-
onRemove: r
|
|
2285
|
-
}, null, 8, ["modelValue", "id", "name", "class", "allow-duplicate", "add-on-blur", "max"]);
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
}), Xr = /* @__PURE__ */ M({
|
|
2289
|
-
__name: "PrimeKnob",
|
|
2290
|
-
props: {
|
|
2291
|
-
context: Object
|
|
2292
|
-
},
|
|
2293
|
-
setup(e) {
|
|
2294
|
-
const t = e.context;
|
|
2295
|
-
function r(i) {
|
|
2296
|
-
t == null || t.node.input(i), t == null || t.handlers.blur(i);
|
|
2297
|
-
}
|
|
2298
|
-
return (i, s) => {
|
|
2299
|
-
var a, m, h, g, d, S, $, w, c, f;
|
|
2300
|
-
const o = T("Knob");
|
|
2301
|
-
return A(), U(o, {
|
|
2302
|
-
modelValue: u(t)._value,
|
|
2303
|
-
"onUpdate:modelValue": s[0] || (s[0] = (p) => u(t)._value = p),
|
|
2304
|
-
id: u(t).id,
|
|
2305
|
-
name: u(t).name,
|
|
2306
|
-
min: (a = u(t).attrs.min) != null ? a : 0,
|
|
2307
|
-
max: (m = u(t).attrs.max) != null ? m : 100,
|
|
2308
|
-
step: (h = u(t).attrs.step) != null ? h : void 0,
|
|
2309
|
-
size: (g = u(t).attrs.max) != null ? g : 100,
|
|
2310
|
-
"stroke-width": (d = u(t).attrs.strokeWidth) != null ? d : 14,
|
|
2311
|
-
"show-value": (S = u(t).attrs.showValue) != null ? S : !0,
|
|
2312
|
-
"value-color": ($ = u(t).attrs.valueColor) != null ? $ : void 0,
|
|
2313
|
-
"range-color": (w = u(t).attrs.rangeColor) != null ? w : void 0,
|
|
2314
|
-
"text-color": (c = u(t).attrs.textColor) != null ? c : void 0,
|
|
2315
|
-
"value-template": (f = u(t).attrs.valueTemplate) != null ? f : void 0,
|
|
2316
|
-
onChange: r
|
|
2317
|
-
}, null, 8, ["modelValue", "id", "name", "min", "max", "step", "size", "stroke-width", "show-value", "value-color", "range-color", "text-color", "value-template"]);
|
|
2318
|
-
};
|
|
2319
|
-
}
|
|
2320
|
-
}), ei = W(Mr, {
|
|
2321
|
-
props: ["iconRight", "iconLeft"]
|
|
2322
|
-
}), ti = W(Tr, {
|
|
2323
|
-
props: ["iconRight", "iconLeft"]
|
|
2324
|
-
}), ni = W(Lr, {
|
|
2325
|
-
props: []
|
|
2326
|
-
}), ri = W(Fr, {
|
|
2327
|
-
props: ["feedback", "toggleMask"]
|
|
2328
|
-
}), ii = W(Wr, {
|
|
2329
|
-
props: ["rows"]
|
|
2330
|
-
}), si = W(Kr, {
|
|
2331
|
-
props: []
|
|
2332
|
-
}), oi = W(Br, {
|
|
2333
|
-
props: []
|
|
2334
|
-
}), ui = W(Nr, {
|
|
2335
|
-
props: []
|
|
2336
|
-
}), li = W(Hr, {
|
|
2337
|
-
props: []
|
|
2338
|
-
}), ai = W(Zr, {
|
|
2339
|
-
props: []
|
|
2340
|
-
}), fi = W(Jr, {
|
|
2341
|
-
props: []
|
|
2342
|
-
}), ci = W(Qr, {
|
|
2343
|
-
props: []
|
|
2344
|
-
}), yi = W(Yr, {
|
|
2345
|
-
props: []
|
|
2346
|
-
}), pi = W(Gr, {
|
|
2347
|
-
props: []
|
|
2348
|
-
}), di = W(Xr, {
|
|
2349
|
-
props: []
|
|
2350
|
-
}), hi = {
|
|
2351
|
-
primeInputText: ei,
|
|
2352
|
-
primeInputNumber: ti,
|
|
2353
|
-
primeInputMask: ni,
|
|
2354
|
-
primePassword: ri,
|
|
2355
|
-
primeCheckBox: si,
|
|
2356
|
-
primeInputSwitch: oi,
|
|
2357
|
-
primeInputTextArea: ii,
|
|
2358
|
-
primeEditor: ui,
|
|
2359
|
-
primeDropdown: li,
|
|
2360
|
-
primeMultiSelect: ai,
|
|
2361
|
-
primeCalendar: fi,
|
|
2362
|
-
primeSlider: ci,
|
|
2363
|
-
primeChips: pi,
|
|
2364
|
-
primeKnob: di
|
|
2365
|
-
};
|
|
2366
|
-
export {
|
|
2367
|
-
fi as primeCalendarDefinition,
|
|
2368
|
-
si as primeCheckBoxDefinition,
|
|
2369
|
-
pi as primeChipsDefinition,
|
|
2370
|
-
li as primeDropdownDefinition,
|
|
2371
|
-
ui as primeEditorDefinition,
|
|
2372
|
-
ni as primeInputMaskDefinition,
|
|
2373
|
-
ti as primeInputNumberDefinition,
|
|
2374
|
-
oi as primeInputSwitchDefinition,
|
|
2375
|
-
ii as primeInputTextAreaDefinition,
|
|
2376
|
-
ei as primeInputTextDefinition,
|
|
2377
|
-
hi as primeInputs,
|
|
2378
|
-
di as primeKnobDefinition,
|
|
2379
|
-
ai as primeMultiSelectDefinition,
|
|
2380
|
-
ri as primePasswordDefinition,
|
|
2381
|
-
yi as primeRatingDefinition,
|
|
2382
|
-
ci as primeSliderDefinition
|
|
2383
|
-
};
|