@kupola/kupola 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kupola.cjs.js +21 -21
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.esm.js +1215 -1079
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.umd.js +21 -21
- package/dist/kupola.umd.js.map +1 -1
- package/js/depends.js +6 -1
- package/js/kupola-config.js +70 -1
- package/js/kupola-core.js +33 -1
- package/js/modal.js +7 -3
- package/js/security.js +113 -0
- package/package.json +1 -1
package/dist/kupola.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class lt {
|
|
2
2
|
constructor(t = "app") {
|
|
3
3
|
this.scope = t, this.hooks = /* @__PURE__ */ new Map(), this.state = "created", this.stateHistory = ["created"], this.transitions = /* @__PURE__ */ new Map([
|
|
4
4
|
["created", ["bootstrapped", "destroyed"]],
|
|
@@ -66,20 +66,20 @@ class ot {
|
|
|
66
66
|
for (const o of s) {
|
|
67
67
|
await this._resolveDepends(o.depends, t);
|
|
68
68
|
const l = performance.now();
|
|
69
|
-
let c,
|
|
69
|
+
let c, h;
|
|
70
70
|
try {
|
|
71
71
|
c = o.handler(...e), c instanceof Promise && await c, o.resolved = !0;
|
|
72
72
|
} catch (u) {
|
|
73
|
-
|
|
73
|
+
h = u, console.error(`[KupolaLifecycle] Error in ${t} hook "${o.name}":`, u), t !== "error" && await this._handleError({ phase: t, hook: o.name, error: u, args: e });
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const d = performance.now() - l;
|
|
76
76
|
this.trace.push({
|
|
77
77
|
emitId: n,
|
|
78
78
|
phase: t,
|
|
79
79
|
hookName: o.name,
|
|
80
|
-
duration:
|
|
81
|
-
status:
|
|
82
|
-
error:
|
|
80
|
+
duration: d,
|
|
81
|
+
status: h ? "error" : "success",
|
|
82
|
+
error: h ? h.message : null,
|
|
83
83
|
timestamp: Date.now()
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -201,123 +201,123 @@ class ot {
|
|
|
201
201
|
console.error(`[KupolaLifecycle] Unhandled error in ${t.phase}:`, t.error);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
function
|
|
206
|
-
return new
|
|
204
|
+
const Sa = new lt("app");
|
|
205
|
+
function La(i = "app") {
|
|
206
|
+
return new lt(i);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Ce = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
209
209
|
function G(i) {
|
|
210
|
-
return
|
|
210
|
+
return Ce.has(i);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Se(i) {
|
|
213
213
|
return i ? i.trim() : "";
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Le(i) {
|
|
216
216
|
return i ? i.replace(/^\s+/, "") : "";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function De(i) {
|
|
219
219
|
return i ? i.replace(/\s+$/, "") : "";
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function He(i) {
|
|
222
222
|
return i ? i.toUpperCase() : "";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Me(i) {
|
|
225
225
|
return i ? i.toLowerCase() : "";
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Ie(i) {
|
|
228
228
|
return i ? i.charAt(0).toUpperCase() + i.slice(1) : "";
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Te(i) {
|
|
231
231
|
return i ? i.replace(/-(\w)/g, (t, e) => e ? e.toUpperCase() : "") : "";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Ae(i) {
|
|
234
234
|
return i ? i.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "") : "";
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function ze(i, t, e = " ") {
|
|
237
237
|
return (String(i) || "").padStart(t, e);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Pe(i, t, e = " ") {
|
|
240
240
|
return (String(i) || "").padEnd(t, e);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function $e(i, t, e = "...") {
|
|
243
243
|
return !i || i.length <= t ? i || "" : i.slice(0, t) + e;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function qe(i, t, e) {
|
|
246
246
|
return i ? i.split(t).join(e) : "";
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Be(i, t) {
|
|
249
249
|
return i ? i.replace(/\{\{(\w+)\}\}/g, (e, s) => t[s] !== void 0 ? t[s] : `{{${s}}}`) : "";
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Fe(i, t) {
|
|
252
252
|
return (i || "").startsWith(t);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ne(i, t) {
|
|
255
255
|
return (i || "").endsWith(t);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Oe(i, t) {
|
|
258
258
|
return (i || "").includes(t);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Re(i, t) {
|
|
261
261
|
return (i || "").repeat(t);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Ve(i) {
|
|
264
264
|
return (i || "").split("").reverse().join("");
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Ke(i, t) {
|
|
267
267
|
return !i || !t ? 0 : i.split(t).length - 1;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function We(i) {
|
|
270
270
|
if (!i) return "";
|
|
271
271
|
const t = document.createElement("div");
|
|
272
272
|
return t.textContent = i, t.innerHTML;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ue(i) {
|
|
275
275
|
if (!i) return "";
|
|
276
276
|
const t = document.createElement("div");
|
|
277
277
|
return t.innerHTML = i, t.textContent;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Ye(i = 8) {
|
|
280
280
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
281
281
|
let e = "";
|
|
282
282
|
for (let s = 0; s < i; s++)
|
|
283
283
|
e += t.charAt(Math.floor(Math.random() * t.length));
|
|
284
284
|
return e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Xe() {
|
|
287
287
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => {
|
|
288
288
|
const t = Math.random() * 16 | 0;
|
|
289
289
|
return (i === "x" ? t : t & 3 | 8).toString(16);
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
function
|
|
292
|
+
const je = { trim: Se, trimLeft: Le, trimRight: De, toUpperCase: He, toLowerCase: Me, capitalize: Ie, camelize: Te, hyphenate: Ae, padStart: ze, padEnd: Pe, truncate: $e, replaceAll: qe, format: Be, startsWith: Fe, endsWith: Ne, includes: Oe, repeat: Re, reverse: Ve, countOccurrences: Ke, escapeHtml: We, unescapeHtml: Ue, generateRandom: Ye, generateUUID: Xe };
|
|
293
|
+
function Je(i) {
|
|
294
294
|
return Array.isArray(i);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Ge(i) {
|
|
297
297
|
return !i || i.length === 0;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ze(i) {
|
|
300
300
|
return i ? i.length : 0;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Qe(i, t) {
|
|
303
303
|
return i && i.length > 0 ? i[0] : t;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function ts(i, t) {
|
|
306
306
|
return i && i.length > 0 ? i[i.length - 1] : t;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function es(i, t, e) {
|
|
309
309
|
return i && i[t] !== void 0 ? i[t] : e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function ss(i, t, e) {
|
|
312
312
|
return i ? i.slice(t, e) : [];
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function is(...i) {
|
|
315
315
|
return i.reduce((t, e) => t.concat(e || []), []);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function ns(i, t = ",") {
|
|
318
318
|
return i ? i.join(t) : "";
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function rs(i, t, e = 0) {
|
|
321
321
|
if (!i) return -1;
|
|
322
322
|
if (Number.isNaN(t)) {
|
|
323
323
|
for (let s = e; s < i.length; s++)
|
|
@@ -326,7 +326,7 @@ function ss(i, t, e = 0) {
|
|
|
326
326
|
}
|
|
327
327
|
return i.indexOf(t, e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function as(i, t, e) {
|
|
330
330
|
if (!i) return -1;
|
|
331
331
|
if (Number.isNaN(t)) {
|
|
332
332
|
const s = e !== void 0 ? e : i.length - 1;
|
|
@@ -336,78 +336,78 @@ function is(i, t, e) {
|
|
|
336
336
|
}
|
|
337
337
|
return i.lastIndexOf(t, e);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function os(i, t) {
|
|
340
340
|
return i ? i.includes(t) : !1;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function ls(i, ...t) {
|
|
343
343
|
return i && i.push(...t), i;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function cs(i) {
|
|
346
346
|
return i ? i.pop() : void 0;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function hs(i) {
|
|
349
349
|
return i ? i.shift() : void 0;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ds(i, ...t) {
|
|
352
352
|
return i && i.unshift(...t), i;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function us(i, t) {
|
|
355
355
|
if (!i) return i;
|
|
356
356
|
const e = Number.isNaN(t) ? i.findIndex((s) => Number.isNaN(s)) : i.indexOf(t);
|
|
357
357
|
return e > -1 && i.splice(e, 1), i;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function ps(i, t) {
|
|
360
360
|
return !i || t < 0 || t >= i.length || i.splice(t, 1), i;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function fs(i, t, e) {
|
|
363
363
|
return i && (i.splice(t, 0, e), i);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function ms(i) {
|
|
366
366
|
return i ? i.slice().reverse() : [];
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function gs(i, t) {
|
|
369
369
|
return i ? i.slice().sort(t) : [];
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function _s(i, t, e = "asc") {
|
|
372
372
|
return i ? i.slice().sort((s, n) => {
|
|
373
373
|
const r = typeof s == "object" ? s[t] : s, a = typeof n == "object" ? n[t] : n;
|
|
374
374
|
return r < a ? e === "asc" ? -1 : 1 : r > a ? e === "asc" ? 1 : -1 : 0;
|
|
375
375
|
}) : [];
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function ys(i, t) {
|
|
378
378
|
return i ? i.filter(t) : [];
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function vs(i, t) {
|
|
381
381
|
return i ? i.map(t) : [];
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function bs(i, t, e) {
|
|
384
384
|
return i ? i.reduce(t, e) : e;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function xs(i, t) {
|
|
387
387
|
i && i.forEach(t);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Es(i, t) {
|
|
390
390
|
return i ? i.every(t) : !0;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function ks(i, t) {
|
|
393
393
|
return i ? i.some(t) : !1;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function ws(i, t) {
|
|
396
396
|
return i ? i.find(t) : void 0;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Cs(i, t) {
|
|
399
399
|
return i ? i.findIndex(t) : -1;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Ss(i, t = 1) {
|
|
402
402
|
return i ? i.flat(t) : [];
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(
|
|
404
|
+
function wt(i) {
|
|
405
|
+
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(wt(e)) : t.concat(e), []) : [];
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Ls(i) {
|
|
408
408
|
return i ? [...new Set(i)] : [];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Ds(i, t) {
|
|
411
411
|
if (!i) return [];
|
|
412
412
|
const e = /* @__PURE__ */ new Set();
|
|
413
413
|
return i.filter((s) => {
|
|
@@ -415,14 +415,14 @@ function Cs(i, t) {
|
|
|
415
415
|
return e.has(n) ? !1 : (e.add(n), !0);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Hs(i, t) {
|
|
419
419
|
if (!i || t <= 0) return [];
|
|
420
420
|
const e = [];
|
|
421
421
|
for (let s = 0; s < i.length; s += t)
|
|
422
422
|
e.push(i.slice(s, s + t));
|
|
423
423
|
return e;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Ms(i) {
|
|
426
426
|
if (!i) return [];
|
|
427
427
|
const t = i.slice();
|
|
428
428
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -431,57 +431,57 @@ function Ls(i) {
|
|
|
431
431
|
}
|
|
432
432
|
return t;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Ct(i) {
|
|
435
435
|
return i ? i.reduce((t, e) => t + (Number(e) || 0), 0) : 0;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return !i || i.length === 0 ? 0 :
|
|
437
|
+
function Is(i) {
|
|
438
|
+
return !i || i.length === 0 ? 0 : Ct(i) / i.length;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Ts(i) {
|
|
441
441
|
return i && i.length > 0 ? Math.max(...i) : -1 / 0;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function As(i) {
|
|
444
444
|
return i && i.length > 0 ? Math.min(...i) : 1 / 0;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function zs(...i) {
|
|
447
447
|
return i.length === 0 ? [] : i.reduce((t, e) => t.filter((s) => e && e.includes(s)));
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Ps(...i) {
|
|
450
450
|
return [...new Set(i.flat().filter(Boolean))];
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function $s(i, t) {
|
|
453
453
|
return i ? i.filter((e) => !t || !t.includes(e)) : [];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function qs(...i) {
|
|
456
456
|
if (i.length === 0) return [];
|
|
457
457
|
const t = Math.max(...i.map((e) => e ? e.length : 0));
|
|
458
458
|
return Array.from({ length: t }, (e, s) => i.map((n) => n && n[s]));
|
|
459
459
|
}
|
|
460
|
-
const
|
|
461
|
-
function
|
|
460
|
+
const Bs = { isArray: Je, isEmpty: Ge, size: Ze, first: Qe, last: ts, get: es, slice: ss, concat: is, join: ns, indexOf: rs, lastIndexOf: as, includes: os, push: ls, pop: cs, shift: hs, unshift: ds, remove: us, removeAt: ps, insert: fs, reverse: ms, sort: gs, sortBy: _s, filter: ys, map: vs, reduce: bs, forEach: xs, every: Es, some: ks, find: ws, findIndex: Cs, flat: Ss, flattenDeep: wt, unique: Ls, uniqueBy: Ds, chunk: Hs, shuffle: Ms, sum: Ct, average: Is, max: Ts, min: As, intersection: zs, union: Ps, difference: $s, zip: qs };
|
|
461
|
+
function it(i) {
|
|
462
462
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Fs(i) {
|
|
465
465
|
return !i || typeof i != "object" ? !0 : Object.keys(i).length === 0;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Ns(i) {
|
|
468
468
|
return i ? Object.keys(i) : [];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Os(i) {
|
|
471
471
|
return i ? Object.values(i) : [];
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Rs(i) {
|
|
474
474
|
return i ? Object.entries(i) : [];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Vs(i, t) {
|
|
477
477
|
return i ? Object.prototype.hasOwnProperty.call(i, t) : !1;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Ks(i, t, e) {
|
|
480
480
|
if (!i) return e;
|
|
481
481
|
const s = t.split(".");
|
|
482
482
|
return s.some(G) ? e : s.reduce((n, r) => n && n[r], i) ?? e;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ws(i, t, e) {
|
|
485
485
|
if (!i || typeof i != "object") return i;
|
|
486
486
|
const s = t.split(".");
|
|
487
487
|
if (s.some(G)) return i;
|
|
@@ -491,18 +491,18 @@ function Rs(i, t, e) {
|
|
|
491
491
|
(!r[a] || typeof r[a] != "object") && (r[a] = {}), r = r[a];
|
|
492
492
|
}), r[n] = e, i;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Us(i, t) {
|
|
495
495
|
return i ? t.reduce((e, s) => (i[s] !== void 0 && (e[s] = i[s]), e), {}) : {};
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ys(i, t) {
|
|
498
498
|
return i ? Object.keys(i).reduce((e, s) => (t.includes(s) || (e[s] = i[s]), e), {}) : {};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function St(...i) {
|
|
501
501
|
return i.reduce((t, e) => (e && typeof e == "object" && Object.keys(e).forEach((s) => {
|
|
502
|
-
G(s) || (
|
|
502
|
+
G(s) || (it(e[s]) && it(t[s]) ? t[s] = St(t[s], e[s]) : t[s] = e[s]);
|
|
503
503
|
}), t), {});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Xs(i) {
|
|
506
506
|
return i && JSON.parse(JSON.stringify(i));
|
|
507
507
|
}
|
|
508
508
|
function U(i, t = /* @__PURE__ */ new WeakMap()) {
|
|
@@ -527,154 +527,154 @@ function U(i, t = /* @__PURE__ */ new WeakMap()) {
|
|
|
527
527
|
G(s) || (e[s] = U(i[s], t));
|
|
528
528
|
}), e;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function js(i, t) {
|
|
531
531
|
i && Object.keys(i).forEach((e) => t(i[e], e, i));
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Js(i, t) {
|
|
534
534
|
if (!i) return {};
|
|
535
535
|
const e = {};
|
|
536
536
|
return Object.keys(i).forEach((s) => {
|
|
537
537
|
e[s] = t(i[s], s, i);
|
|
538
538
|
}), e;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Gs(i, t) {
|
|
541
541
|
if (!i) return {};
|
|
542
542
|
const e = {};
|
|
543
543
|
return Object.keys(i).forEach((s) => {
|
|
544
544
|
t(i[s], s, i) && (e[s] = i[s]);
|
|
545
545
|
}), e;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function Zs(i, t, e) {
|
|
548
548
|
return i ? Object.keys(i).reduce((s, n) => t(s, i[n], n, i), e) : e;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Qs(i) {
|
|
551
551
|
return i ? Object.keys(i).map((t) => ({ key: t, value: i[t] })) : [];
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function ti(i, t, e) {
|
|
554
554
|
return i ? i.reduce((s, n) => {
|
|
555
555
|
const r = typeof n == "object" ? n[t] : n, a = e ? n[e] : n;
|
|
556
556
|
return r !== void 0 && (s[r] = a), s;
|
|
557
557
|
}, {}) : {};
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function ei(i) {
|
|
560
560
|
return i ? Object.keys(i).length : 0;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function si(i) {
|
|
563
563
|
if (!i) return {};
|
|
564
564
|
const t = {};
|
|
565
565
|
return Object.keys(i).forEach((e) => {
|
|
566
566
|
t[i[e]] = e;
|
|
567
567
|
}), t;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Lt(i, t) {
|
|
570
570
|
if (i === t) return !0;
|
|
571
571
|
if (!i || !t || typeof i != "object" || typeof t != "object") return !1;
|
|
572
572
|
const e = Object.keys(i), s = Object.keys(t);
|
|
573
|
-
return e.length !== s.length ? !1 : e.every((n) =>
|
|
573
|
+
return e.length !== s.length ? !1 : e.every((n) => Lt(i[n], t[n]));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Dt(i) {
|
|
576
576
|
return i && (Object.freeze(i), Object.keys(i).forEach((t) => {
|
|
577
|
-
typeof i[t] == "object" &&
|
|
577
|
+
typeof i[t] == "object" && Dt(i[t]);
|
|
578
578
|
}), i);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function ii(i) {
|
|
581
581
|
return i && Object.seal(i);
|
|
582
582
|
}
|
|
583
|
-
const
|
|
583
|
+
const ni = { isObject: it, isEmpty: Fs, keys: Ns, values: Os, entries: Rs, has: Vs, get: Ks, set: Ws, pick: Us, omit: Ys, merge: St, clone: Xs, deepClone: U, forEach: js, map: Js, filter: Gs, reduce: Zs, toArray: Qs, fromArray: ti, size: ei, invert: si, isEqual: Lt, freeze: Dt, seal: ii };
|
|
584
584
|
function L(i) {
|
|
585
585
|
return typeof i == "number" && !isNaN(i);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ri(i) {
|
|
588
588
|
return Number.isInteger(i);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function ai(i) {
|
|
591
591
|
return L(i) && !Number.isInteger(i);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function oi(i) {
|
|
594
594
|
return L(i) && i > 0;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function li(i) {
|
|
597
597
|
return L(i) && i < 0;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function ci(i) {
|
|
600
600
|
return L(i) && i === 0;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function hi(i, t, e) {
|
|
603
603
|
return L(i) ? Math.min(Math.max(i, t), e) : i;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function di(i, t = 0) {
|
|
606
606
|
if (!L(i)) return i;
|
|
607
607
|
const e = Math.pow(10, t);
|
|
608
608
|
return Math.round(i * e) / e;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function ui(i) {
|
|
611
611
|
return L(i) ? Math.floor(i) : i;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function pi(i) {
|
|
614
614
|
return L(i) ? Math.ceil(i) : i;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function fi(i) {
|
|
617
617
|
return L(i) ? Math.abs(i) : i;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function mi(...i) {
|
|
620
620
|
const t = i.filter(L);
|
|
621
621
|
return t.length > 0 ? Math.min(...t) : void 0;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function gi(...i) {
|
|
624
624
|
const t = i.filter(L);
|
|
625
625
|
return t.length > 0 ? Math.max(...t) : void 0;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Ht(...i) {
|
|
628
628
|
return i.flat().filter(L).reduce((e, s) => e + s, 0);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function _i(...i) {
|
|
631
631
|
const t = i.flat().filter(L);
|
|
632
|
-
return t.length > 0 ?
|
|
632
|
+
return t.length > 0 ? Ht(t) / t.length : 0;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Mt(i = 0, t = 1) {
|
|
635
635
|
return Math.random() * (t - i) + i;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
return Math.floor(
|
|
637
|
+
function yi(i, t) {
|
|
638
|
+
return Math.floor(Mt(i, t + 1));
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function vi(i, t = 2) {
|
|
641
641
|
return L(i) ? i.toFixed(t) : String(i);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function bi(i, t = "CNY", e = 2) {
|
|
644
644
|
return L(i) ? new Intl.NumberFormat("zh-CN", { style: "currency", currency: t, minimumFractionDigits: e, maximumFractionDigits: e }).format(i) : String(i);
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function xi(i, t = 0) {
|
|
647
647
|
return L(i) ? `${(i * 100).toFixed(t)}%` : String(i);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Ei(i, t = 0) {
|
|
650
650
|
return L(i) ? i.toFixed(t) : String(i);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function ki(i, t = 6) {
|
|
653
653
|
return L(i) ? i.toPrecision(t) : String(i);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function wi(i) {
|
|
656
656
|
return Number.isNaN(i);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ci(i) {
|
|
659
659
|
return Number.isFinite(i);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Si(i, t = 10) {
|
|
662
662
|
return Number.parseInt(i, t);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Li(i) {
|
|
665
665
|
return Number.parseFloat(i);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Di(i, t = 0) {
|
|
668
668
|
const e = Number(i);
|
|
669
669
|
return isNaN(e) ? t : e;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Hi(i, t, e = 0) {
|
|
672
672
|
return !L(i) || !L(t) || t === 0 ? e : i / t;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Mi(...i) {
|
|
675
675
|
return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
|
|
676
676
|
}
|
|
677
|
-
const
|
|
677
|
+
const Ii = { isNumber: L, isInteger: ri, isFloat: ai, isPositive: oi, isNegative: li, isZero: ci, clamp: hi, round: di, floor: ui, ceil: pi, abs: fi, min: mi, max: gi, sum: Ht, average: _i, random: Mt, randomInt: yi, format: vi, formatCurrency: bi, formatPercent: xi, toFixed: Ei, toPrecision: ki, isNaN: wi, isFinite: Ci, parseInt: Si, parseFloat: Li, toNumber: Di, safeDivide: Hi, safeMultiply: Mi };
|
|
678
678
|
function Z() {
|
|
679
679
|
return Date.now();
|
|
680
680
|
}
|
|
@@ -682,51 +682,51 @@ function K() {
|
|
|
682
682
|
const i = /* @__PURE__ */ new Date();
|
|
683
683
|
return i.setHours(0, 0, 0, 0), i;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Ti() {
|
|
686
686
|
const i = K();
|
|
687
687
|
return i.setDate(i.getDate() + 1), i;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ai() {
|
|
690
690
|
const i = K();
|
|
691
691
|
return i.setDate(i.getDate() - 1), i;
|
|
692
692
|
}
|
|
693
693
|
function k(i) {
|
|
694
694
|
return i instanceof Date && !isNaN(i.getTime());
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function It(i) {
|
|
697
697
|
return k(i);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function zi(i) {
|
|
700
700
|
const t = new Date(i);
|
|
701
|
-
return
|
|
701
|
+
return It(t) ? t : null;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Pi(i, t = "YYYY-MM-DD HH:mm:ss") {
|
|
704
704
|
if (!k(i)) return "";
|
|
705
|
-
const e = i.getFullYear(), s = String(i.getMonth() + 1).padStart(2, "0"), n = String(i.getDate()).padStart(2, "0"), r = String(i.getHours()).padStart(2, "0"), a = String(i.getMinutes()).padStart(2, "0"), o = String(i.getSeconds()).padStart(2, "0"), l = String(i.getMilliseconds()).padStart(3, "0"),
|
|
706
|
-
return t.replace("YYYY", e).replace("MM", s).replace("DD", n).replace("HH", r).replace("mm", a).replace("ss", o).replace("SSS", l).replace("D", i.getDate()).replace("M", i.getMonth() + 1).replace("H", i.getHours()).replace("m", i.getMinutes()).replace("s", i.getSeconds()).replace("W",
|
|
705
|
+
const e = i.getFullYear(), s = String(i.getMonth() + 1).padStart(2, "0"), n = String(i.getDate()).padStart(2, "0"), r = String(i.getHours()).padStart(2, "0"), a = String(i.getMinutes()).padStart(2, "0"), o = String(i.getSeconds()).padStart(2, "0"), l = String(i.getMilliseconds()).padStart(3, "0"), h = ["日", "一", "二", "三", "四", "五", "六"][i.getDay()];
|
|
706
|
+
return t.replace("YYYY", e).replace("MM", s).replace("DD", n).replace("HH", r).replace("mm", a).replace("ss", o).replace("SSS", l).replace("D", i.getDate()).replace("M", i.getMonth() + 1).replace("H", i.getHours()).replace("m", i.getMinutes()).replace("s", i.getSeconds()).replace("W", h);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function $i(i) {
|
|
709
709
|
return k(i) ? i.toISOString() : "";
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function qi(i) {
|
|
712
712
|
return k(i) ? new Date(i.toUTCString()) : null;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Bi(i, t) {
|
|
715
715
|
if (!k(i)) return i;
|
|
716
716
|
const e = new Date(i);
|
|
717
717
|
return e.setDate(e.getDate() + t), e;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Fi(i, t) {
|
|
720
720
|
if (!k(i)) return i;
|
|
721
721
|
const e = new Date(i);
|
|
722
722
|
return e.setHours(e.getHours() + t), e;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function Ni(i, t) {
|
|
725
725
|
if (!k(i)) return i;
|
|
726
726
|
const e = new Date(i);
|
|
727
727
|
return e.setMinutes(e.getMinutes() + t), e;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Oi(i, t) {
|
|
730
730
|
if (!k(i)) return i;
|
|
731
731
|
const e = new Date(i);
|
|
732
732
|
return e.setSeconds(e.getSeconds() + t), e;
|
|
@@ -738,104 +738,104 @@ function Q(i, t) {
|
|
|
738
738
|
const s = new Date(t);
|
|
739
739
|
return s.setHours(0, 0, 0, 0), Math.floor((e.getTime() - s.getTime()) / (1e3 * 60 * 60 * 24));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Ri(i, t) {
|
|
742
742
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60 * 60));
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function Vi(i, t) {
|
|
745
745
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60));
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Ki(i, t) {
|
|
748
748
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / 1e3);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Wi(i) {
|
|
751
751
|
return k(i) ? Q(i, K()) === 0 : !1;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Ui(i) {
|
|
754
754
|
return k(i) ? Q(i, K()) === -1 : !1;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Yi(i) {
|
|
757
757
|
return k(i) ? Q(i, K()) === 1 : !1;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function Xi(i) {
|
|
760
760
|
return k(i) ? i.getTime() > Z() : !1;
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function ji(i) {
|
|
763
763
|
return k(i) ? i.getTime() < Z() : !1;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Ji(i) {
|
|
766
766
|
if (!k(i)) return !1;
|
|
767
767
|
const t = i.getFullYear();
|
|
768
768
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Gi(i) {
|
|
771
771
|
return k(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0).getDate() : 0;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function Zi(i) {
|
|
774
774
|
if (!k(i)) return 0;
|
|
775
775
|
const t = new Date(i.getFullYear(), 0, 1), e = i.getTime() - t.getTime();
|
|
776
776
|
return Math.ceil(e / (1e3 * 60 * 60 * 24 * 7));
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function Qi(i) {
|
|
779
779
|
return k(i) ? Math.ceil((i.getMonth() + 1) / 3) : 0;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function tn(i) {
|
|
782
782
|
if (!k(i)) return i;
|
|
783
783
|
const t = new Date(i);
|
|
784
784
|
return t.setHours(0, 0, 0, 0), t;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function en(i) {
|
|
787
787
|
if (!k(i)) return i;
|
|
788
788
|
const t = new Date(i);
|
|
789
789
|
return t.setHours(23, 59, 59, 999), t;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function sn(i) {
|
|
792
792
|
return k(i) ? new Date(i.getFullYear(), i.getMonth(), 1) : i;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function nn(i) {
|
|
795
795
|
return k(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0, 23, 59, 59, 999) : i;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Tt(i, t = 1) {
|
|
798
798
|
if (!k(i)) return i;
|
|
799
799
|
const e = new Date(i), s = e.getDay(), n = s >= t ? s - t : s + (7 - t);
|
|
800
800
|
return e.setDate(e.getDate() - n), e.setHours(0, 0, 0, 0), e;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function rn(i, t = 1) {
|
|
803
803
|
if (!k(i)) return i;
|
|
804
|
-
const e =
|
|
804
|
+
const e = Tt(i, t), s = new Date(e);
|
|
805
805
|
return s.setDate(s.getDate() + 6), s.setHours(23, 59, 59, 999), s;
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function an(i) {
|
|
808
808
|
if (!k(i)) return 0;
|
|
809
809
|
const t = /* @__PURE__ */ new Date();
|
|
810
810
|
let e = t.getFullYear() - i.getFullYear();
|
|
811
811
|
return (t.getMonth() < i.getMonth() || t.getMonth() === i.getMonth() && t.getDate() < i.getDate()) && e--, Math.max(0, e);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function on(i) {
|
|
814
814
|
if (!k(i)) return "";
|
|
815
815
|
const e = Z() - i.getTime(), s = 60 * 1e3, n = 60 * s, r = 24 * n, a = 7 * r, o = 30 * r, l = 365 * r;
|
|
816
816
|
return e < s ? "刚刚" : e < n ? `${Math.floor(e / s)}分钟前` : e < r ? `${Math.floor(e / n)}小时前` : e < a ? `${Math.floor(e / r)}天前` : e < o ? `${Math.floor(e / a)}周前` : e < l ? `${Math.floor(e / o)}个月前` : `${Math.floor(e / l)}年前`;
|
|
817
817
|
}
|
|
818
|
-
const
|
|
819
|
-
function
|
|
818
|
+
const ln = { now: Z, today: K, tomorrow: Ti, yesterday: Ai, isDate: k, isValid: It, parse: zi, format: Pi, toISO: $i, toUTC: qi, addDays: Bi, addHours: Fi, addMinutes: Ni, addSeconds: Oi, diffDays: Q, diffHours: Ri, diffMinutes: Vi, diffSeconds: Ki, isToday: Wi, isYesterday: Ui, isTomorrow: Yi, isFuture: Xi, isPast: ji, isLeapYear: Ji, getDaysInMonth: Gi, getWeekOfYear: Zi, getQuarter: Qi, startOfDay: tn, endOfDay: en, startOfMonth: sn, endOfMonth: nn, startOfWeek: Tt, endOfWeek: rn, getAge: an, fromNow: on };
|
|
819
|
+
function cn(i, t, e = {}) {
|
|
820
820
|
let s = null, n = null, r = null, a = 0;
|
|
821
821
|
const o = e.leading || !1, l = e.trailing !== !1;
|
|
822
822
|
function c() {
|
|
823
823
|
i.apply(r, n);
|
|
824
824
|
}
|
|
825
|
-
function d() {
|
|
826
|
-
a = Date.now(), o ? (s = setTimeout(h, t), c()) : s = setTimeout(h, t);
|
|
827
|
-
}
|
|
828
825
|
function h() {
|
|
826
|
+
a = Date.now(), o ? (s = setTimeout(d, t), c()) : s = setTimeout(d, t);
|
|
827
|
+
}
|
|
828
|
+
function d() {
|
|
829
829
|
s = null, l && n && c(), n = null, r = null;
|
|
830
830
|
}
|
|
831
831
|
function u() {
|
|
832
832
|
return Math.max(0, t - (Date.now() - a));
|
|
833
833
|
}
|
|
834
834
|
return function(...f) {
|
|
835
|
-
n = f, r = this, a = Date.now(), s ? (clearTimeout(s), s = setTimeout(
|
|
835
|
+
n = f, r = this, a = Date.now(), s ? (clearTimeout(s), s = setTimeout(d, u())) : h();
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function hn(i, t, e = {}) {
|
|
839
839
|
let s = !1;
|
|
840
840
|
const n = e.trailing || !1;
|
|
841
841
|
let r = null, a = null;
|
|
@@ -848,31 +848,31 @@ function on(i, t, e = {}) {
|
|
|
848
848
|
}, t));
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function dn(i) {
|
|
852
852
|
return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i || "");
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function un(i) {
|
|
855
855
|
return /^1[3-9]\d{9}$/.test(i || "");
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function pn(i) {
|
|
858
858
|
return /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w.-]*)*\/?$/.test(i || "");
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function At(i) {
|
|
861
861
|
return /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(i || "");
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function zt(i) {
|
|
864
864
|
return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(i || "");
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
866
|
+
function fn(i) {
|
|
867
|
+
return At(i) || zt(i);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function mn(i) {
|
|
870
870
|
return /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(i || "");
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function gn(i) {
|
|
873
873
|
return /^[A-Z][0-9]{8}$|^[A-Z]{2}[0-9]{7}$/.test(i || "");
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function _n(i) {
|
|
876
876
|
const t = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9]{2})[0-9]{12}|3[47][0-9]{13})$/, e = i.replace(/\s/g, "");
|
|
877
877
|
if (!t.test(e)) return !1;
|
|
878
878
|
let s = 0, n = !1;
|
|
@@ -882,113 +882,113 @@ function fn(i) {
|
|
|
882
882
|
}
|
|
883
883
|
return s % 10 === 0;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Pt(i) {
|
|
886
886
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i || "");
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function $t(i) {
|
|
889
889
|
const t = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(i || "");
|
|
890
890
|
return t ? t.slice(1).every((e) => parseInt(e) >= 0 && parseInt(e) <= 255) : !1;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function qt(i) {
|
|
893
893
|
const t = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*([01]|0\.\d+)\)$/.exec(i || "");
|
|
894
894
|
if (!t) return !1;
|
|
895
895
|
const [, e, s, n, r] = t;
|
|
896
896
|
return parseInt(e) >= 0 && parseInt(e) <= 255 && parseInt(s) >= 0 && parseInt(s) <= 255 && parseInt(n) >= 0 && parseInt(n) <= 255 && parseFloat(r) >= 0 && parseFloat(r) <= 1;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
return
|
|
898
|
+
function yn(i) {
|
|
899
|
+
return Pt(i) || $t(i) || qt(i);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function vn(i) {
|
|
902
902
|
return !isNaN(new Date(i).getTime());
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function bn(i) {
|
|
905
905
|
try {
|
|
906
906
|
return JSON.parse(i), !0;
|
|
907
907
|
} catch {
|
|
908
908
|
return !1;
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function xn(i) {
|
|
912
912
|
return !i || i.trim() === "";
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function En(i) {
|
|
915
915
|
return /^\s+$/.test(i || "");
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function kn(i) {
|
|
918
918
|
return !isNaN(parseFloat(i)) && isFinite(i);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function wn(i) {
|
|
921
921
|
return /^-?\d+$/.test(i || "");
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Cn(i) {
|
|
924
924
|
return /^-?\d+\.\d+$/.test(i || "");
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Sn(i) {
|
|
927
927
|
const t = parseFloat(i);
|
|
928
928
|
return !isNaN(t) && t > 0;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Ln(i) {
|
|
931
931
|
const t = parseFloat(i);
|
|
932
932
|
return !isNaN(t) && t < 0;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Dn(i) {
|
|
935
935
|
return /^[a-zA-Z]+$/.test(i || "");
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function Hn(i) {
|
|
938
938
|
return /^[a-zA-Z0-9]+$/.test(i || "");
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Mn(i) {
|
|
941
941
|
return /^[\u4e00-\u9fa5]+$/.test(i || "");
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function In(i, t, e) {
|
|
944
944
|
const s = (i || "").length;
|
|
945
945
|
return s >= t && (e === void 0 || s <= e);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Tn(i, t) {
|
|
948
948
|
return (i || "").length >= t;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function An(i, t) {
|
|
951
951
|
return (i || "").length <= t;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function zn(i, t) {
|
|
954
954
|
return t instanceof RegExp ? t.test(i || "") : !1;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Pn(i, t) {
|
|
957
957
|
return String(i) === String(t);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Bt(i, t) {
|
|
960
960
|
return (i || "").includes(t);
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return !
|
|
962
|
+
function $n(i, t) {
|
|
963
|
+
return !Bt(i, t);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function qn(i) {
|
|
966
966
|
return Array.isArray(i);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function Bn(i, t, e) {
|
|
969
969
|
const s = i ? i.length : 0;
|
|
970
970
|
return s >= t && (e === void 0 || s <= e);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Fn(i, t) {
|
|
973
973
|
return i ? i.length >= t : !1;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function Nn(i, t) {
|
|
976
976
|
return i ? i.length <= t : !1;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function On(i) {
|
|
979
979
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Rn(i, t) {
|
|
982
982
|
return !i || !t || !Array.isArray(t) ? !1 : t.every((e) => Object.prototype.hasOwnProperty.call(i, e));
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Vn(i, t) {
|
|
985
985
|
const e = {};
|
|
986
986
|
return Object.keys(t).forEach((s) => {
|
|
987
987
|
const n = i[s], r = t[s], a = [];
|
|
988
988
|
r.forEach((o) => {
|
|
989
989
|
if (typeof o == "string") {
|
|
990
990
|
const [l, ...c] = o.split(":");
|
|
991
|
-
|
|
991
|
+
Ft[l](n, ...c) || a.push(l);
|
|
992
992
|
} else if (typeof o == "function") {
|
|
993
993
|
const l = o(n, i);
|
|
994
994
|
l !== !0 && a.push(l || "validation_failed");
|
|
@@ -996,77 +996,77 @@ function Nn(i, t) {
|
|
|
996
996
|
}), a.length > 0 && (e[s] = a);
|
|
997
997
|
}), { valid: Object.keys(e).length === 0, errors: e };
|
|
998
998
|
}
|
|
999
|
-
const
|
|
1000
|
-
function
|
|
999
|
+
const Ft = { isEmail: dn, isPhone: un, isURL: pn, isIPv4: At, isIPv6: zt, isIP: fn, isIDCard: mn, isPassport: gn, isCreditCard: _n, isHexColor: Pt, isRGB: $t, isRGBA: qt, isColor: yn, isDate: vn, isJSON: bn, isEmpty: xn, isWhitespace: En, isNumber: kn, isInteger: wn, isFloat: Cn, isPositive: Sn, isNegative: Ln, isAlpha: Dn, isAlphaNumeric: Hn, isChinese: Mn, isLength: In, minLength: Tn, maxLength: An, matches: zn, equals: Pn, contains: Bt, notContains: $n, isArray: qn, arrayLength: Bn, arrayMinLength: Fn, arrayMaxLength: Nn, isObject: On, hasKeys: Rn, validate: Vn };
|
|
1000
|
+
function Kn(i) {
|
|
1001
1001
|
const t = i ? String(i) : "", e = [1732584193, 4023233417, 2562383102, 271733878], s = [3614090360, 3905402710, 606105819, 3250441966, 4118548399, 1200080426, 2821735955, 4249261313, 1770035416, 2336552879, 4294925233, 2304563134, 1804603682, 4254626195, 2792965006, 1236535329, 4129170786, 3225465664, 643717713, 3921069994, 3593408605, 38016083, 3634488961, 3889429448, 568446438, 3275163606, 4107603335, 1163531501, 2850285829, 4243563512, 1735328473, 2368359562, 4294588738, 2272392833, 1839030562, 4259657740, 2763975236, 1272893353, 4139469664, 3200236656, 681279174, 3936430074, 3572445317, 76029189, 3654602809, 3873151461, 530742520, 3299628645, 4096336452, 1126891415, 2878612391, 4237533241, 1700485571, 2399980690, 4293915773, 2240044497, 1873313359, 4264355552, 2734768916, 1309151649, 4149444226, 3174756917, 718787259, 3951481745], n = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]];
|
|
1002
|
-
function r(
|
|
1003
|
-
return
|
|
1002
|
+
function r(d, u) {
|
|
1003
|
+
return d << u | d >>> 32 - u;
|
|
1004
1004
|
}
|
|
1005
|
-
function a(
|
|
1006
|
-
const u =
|
|
1007
|
-
for (
|
|
1008
|
-
|
|
1005
|
+
function a(d) {
|
|
1006
|
+
const u = d.length * 8;
|
|
1007
|
+
for (d += ""; d.length % 64 !== 56; )
|
|
1008
|
+
d += "\0";
|
|
1009
1009
|
const f = u & 4294967295, p = u >>> 32 & 4294967295;
|
|
1010
1010
|
for (let m = 0; m < 4; m++)
|
|
1011
|
-
|
|
1011
|
+
d += String.fromCharCode(f >>> 8 * m & 255);
|
|
1012
1012
|
for (let m = 0; m < 4; m++)
|
|
1013
|
-
|
|
1014
|
-
return
|
|
1013
|
+
d += String.fromCharCode(p >>> 8 * m & 255);
|
|
1014
|
+
return d;
|
|
1015
1015
|
}
|
|
1016
|
-
function o(
|
|
1016
|
+
function o(d, u) {
|
|
1017
1017
|
const [f, p, m, y] = u, _ = [];
|
|
1018
1018
|
for (let S = 0; S < 16; S++)
|
|
1019
|
-
_[S] =
|
|
1020
|
-
let
|
|
1019
|
+
_[S] = d.charCodeAt(S * 4) & 255 | (d.charCodeAt(S * 4 + 1) & 255) << 8 | (d.charCodeAt(S * 4 + 2) & 255) << 16 | (d.charCodeAt(S * 4 + 3) & 255) << 24;
|
|
1020
|
+
let b = f, x = p, v = m, C = y;
|
|
1021
1021
|
for (let S = 0; S < 64; S++) {
|
|
1022
|
-
let
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1025
|
-
const B =
|
|
1026
|
-
|
|
1022
|
+
let w, A;
|
|
1023
|
+
const z = Math.floor(S / 16), D = S % 16;
|
|
1024
|
+
z === 0 ? (w = x & v | ~x & C, A = D) : z === 1 ? (w = C & x | ~C & v, A = (5 * D + 1) % 16) : z === 2 ? (w = x ^ v ^ C, A = (3 * D + 5) % 16) : (w = v ^ (x | ~C), A = 7 * D % 16);
|
|
1025
|
+
const B = C;
|
|
1026
|
+
C = v, v = x, x = x + r(b + w + s[S] + _[A] & 4294967295, n[z][S % 4]), b = B;
|
|
1027
1027
|
}
|
|
1028
|
-
return [f +
|
|
1028
|
+
return [f + b & 4294967295, p + x & 4294967295, m + v & 4294967295, y + C & 4294967295];
|
|
1029
1029
|
}
|
|
1030
1030
|
const l = a(t);
|
|
1031
1031
|
let c = [...e];
|
|
1032
|
-
for (let
|
|
1033
|
-
c = o(l.substring(
|
|
1034
|
-
let
|
|
1035
|
-
return c.forEach((
|
|
1032
|
+
for (let d = 0; d < l.length; d += 64)
|
|
1033
|
+
c = o(l.substring(d, d + 64), c);
|
|
1034
|
+
let h = "";
|
|
1035
|
+
return c.forEach((d) => {
|
|
1036
1036
|
for (let u = 0; u < 4; u++)
|
|
1037
|
-
|
|
1038
|
-
}),
|
|
1037
|
+
h += (d >>> 8 * u & 255).toString(16).padStart(2, "0");
|
|
1038
|
+
}), h;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Wn(i) {
|
|
1041
1041
|
const t = i ? String(i) : "", e = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298];
|
|
1042
|
-
function s(c,
|
|
1043
|
-
return c >>>
|
|
1042
|
+
function s(c, h) {
|
|
1043
|
+
return c >>> h | c << 32 - h;
|
|
1044
1044
|
}
|
|
1045
1045
|
function n(c) {
|
|
1046
|
-
const
|
|
1046
|
+
const h = c.length * 8;
|
|
1047
1047
|
for (c += ""; c.length % 64 !== 56; )
|
|
1048
1048
|
c += "\0";
|
|
1049
|
-
const
|
|
1049
|
+
const d = h & 4294967295, u = h >>> 32 & 4294967295;
|
|
1050
1050
|
for (let f = 0; f < 4; f++)
|
|
1051
1051
|
c += String.fromCharCode(u >>> 8 * f & 255);
|
|
1052
1052
|
for (let f = 0; f < 4; f++)
|
|
1053
|
-
c += String.fromCharCode(
|
|
1053
|
+
c += String.fromCharCode(d >>> 8 * f & 255);
|
|
1054
1054
|
return c;
|
|
1055
1055
|
}
|
|
1056
|
-
function r(c,
|
|
1057
|
-
const
|
|
1056
|
+
function r(c, h) {
|
|
1057
|
+
const d = [];
|
|
1058
1058
|
for (let v = 0; v < 16; v++)
|
|
1059
|
-
|
|
1059
|
+
d[v] = c.charCodeAt(v * 4) & 255 | (c.charCodeAt(v * 4 + 1) & 255) << 8 | (c.charCodeAt(v * 4 + 2) & 255) << 16 | (c.charCodeAt(v * 4 + 3) & 255) << 24;
|
|
1060
1060
|
for (let v = 16; v < 64; v++) {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1061
|
+
const C = s(d[v - 15], 7) ^ s(d[v - 15], 18) ^ d[v - 15] >>> 3, S = s(d[v - 2], 17) ^ s(d[v - 2], 19) ^ d[v - 2] >>> 10;
|
|
1062
|
+
d[v] = d[v - 16] + C + d[v - 7] + S & 4294967295;
|
|
1063
1063
|
}
|
|
1064
|
-
let [u, f, p, m, y, _,
|
|
1064
|
+
let [u, f, p, m, y, _, b, x] = h;
|
|
1065
1065
|
for (let v = 0; v < 64; v++) {
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1066
|
+
const C = s(y, 6) ^ s(y, 11) ^ s(y, 25), S = y & _ ^ ~y & b, w = x + C + S + e[v] + d[v] & 4294967295, A = s(u, 2) ^ s(u, 13) ^ s(u, 22), z = u & f ^ u & p ^ f & p, D = A + z & 4294967295;
|
|
1067
|
+
x = b, b = _, _ = y, y = m + w & 4294967295, m = p, p = f, f = u, u = w + D & 4294967295;
|
|
1068
1068
|
}
|
|
1069
|
-
return [
|
|
1069
|
+
return [h[0] + u & 4294967295, h[1] + f & 4294967295, h[2] + p & 4294967295, h[3] + m & 4294967295, h[4] + y & 4294967295, h[5] + _ & 4294967295, h[6] + b & 4294967295, h[7] + x & 4294967295];
|
|
1070
1070
|
}
|
|
1071
1071
|
const a = n(t);
|
|
1072
1072
|
let o = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225];
|
|
@@ -1074,48 +1074,48 @@ function Rn(i) {
|
|
|
1074
1074
|
o = r(a.substring(c, c + 64), o);
|
|
1075
1075
|
let l = "";
|
|
1076
1076
|
return o.forEach((c) => {
|
|
1077
|
-
for (let
|
|
1078
|
-
l += (c >>> 8 *
|
|
1077
|
+
for (let h = 3; h >= 0; h--)
|
|
1078
|
+
l += (c >>> 8 * h & 255).toString(16).padStart(2, "0");
|
|
1079
1079
|
}), l;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Un(i) {
|
|
1082
1082
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1083
1083
|
let e = "", s = 0;
|
|
1084
1084
|
const n = i ? i.split("").map((r) => r.charCodeAt(0)) : [];
|
|
1085
1085
|
for (; s < n.length; ) {
|
|
1086
|
-
const r = n[s++], a = n[s++] || 0, o = n[s++] || 0, l = r >> 2, c = (r & 3) << 4 | a >> 4,
|
|
1087
|
-
e += t[l] + t[c] + (s > n.length + 1 ? "=" : t[
|
|
1086
|
+
const r = n[s++], a = n[s++] || 0, o = n[s++] || 0, l = r >> 2, c = (r & 3) << 4 | a >> 4, h = (a & 15) << 2 | o >> 6, d = o & 63;
|
|
1087
|
+
e += t[l] + t[c] + (s > n.length + 1 ? "=" : t[h]) + (s > n.length ? "=" : t[d]);
|
|
1088
1088
|
}
|
|
1089
1089
|
return e;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Yn(i) {
|
|
1092
1092
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1093
1093
|
let e = "", s = 0;
|
|
1094
1094
|
for (i = i.replace(/[^A-Za-z0-9+/=]/g, ""); s < i.length; ) {
|
|
1095
|
-
const n = t.indexOf(i.charAt(s++)), r = t.indexOf(i.charAt(s++)), a = t.indexOf(i.charAt(s++)), o = t.indexOf(i.charAt(s++)), l = n << 2 | r >> 4, c = (r & 15) << 4 | a >> 2,
|
|
1096
|
-
e += String.fromCharCode(l), a !== 64 && (e += String.fromCharCode(c)), o !== 64 && (e += String.fromCharCode(
|
|
1095
|
+
const n = t.indexOf(i.charAt(s++)), r = t.indexOf(i.charAt(s++)), a = t.indexOf(i.charAt(s++)), o = t.indexOf(i.charAt(s++)), l = n << 2 | r >> 4, c = (r & 15) << 4 | a >> 2, h = (a & 3) << 6 | o;
|
|
1096
|
+
e += String.fromCharCode(l), a !== 64 && (e += String.fromCharCode(c)), o !== 64 && (e += String.fromCharCode(h));
|
|
1097
1097
|
}
|
|
1098
1098
|
return e;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Xn() {
|
|
1101
1101
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => {
|
|
1102
1102
|
const t = Math.random() * 16 | 0;
|
|
1103
1103
|
return (i === "x" ? t : t & 3 | 8).toString(16);
|
|
1104
1104
|
});
|
|
1105
1105
|
}
|
|
1106
|
-
const
|
|
1106
|
+
const jn = { md5: Kn, sha256: Wn, base64Encode: Un, base64Decode: Yn, uuid: Xn }, q = /* @__PURE__ */ new Map();
|
|
1107
1107
|
async function j(i, t = {}) {
|
|
1108
1108
|
const { crossOrigin: e = "anonymous" } = t;
|
|
1109
|
-
return
|
|
1109
|
+
return q.has(i) ? q.get(i) : new Promise((s, n) => {
|
|
1110
1110
|
const r = new Image();
|
|
1111
1111
|
r.crossOrigin = e, r.onload = () => {
|
|
1112
|
-
|
|
1112
|
+
q.set(i, r), s(r);
|
|
1113
1113
|
}, r.onerror = () => {
|
|
1114
1114
|
n(new Error(`Failed to load image: ${i}`));
|
|
1115
1115
|
}, r.src = i;
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
-
async function
|
|
1118
|
+
async function Jn(i, t = {}) {
|
|
1119
1119
|
const { parallel: e = !0 } = t;
|
|
1120
1120
|
if (e) return Promise.all(i.map((n) => j(n, t)));
|
|
1121
1121
|
const s = [];
|
|
@@ -1123,29 +1123,29 @@ async function Yn(i, t = {}) {
|
|
|
1123
1123
|
s.push(await j(n, t));
|
|
1124
1124
|
return s;
|
|
1125
1125
|
}
|
|
1126
|
-
async function
|
|
1126
|
+
async function Nt(i, t = {}) {
|
|
1127
1127
|
const { type: e = "text/javascript", async: s = !0, defer: n = !1 } = t;
|
|
1128
|
-
return
|
|
1128
|
+
return q.has(i) ? q.get(i) : new Promise((r, a) => {
|
|
1129
1129
|
const o = document.createElement("script");
|
|
1130
1130
|
o.type = e, o.async = s, o.defer = n, o.onload = () => {
|
|
1131
|
-
|
|
1131
|
+
q.set(i, o), r(o);
|
|
1132
1132
|
}, o.onerror = () => {
|
|
1133
1133
|
o.remove(), a(new Error(`Failed to load script: ${i}`));
|
|
1134
1134
|
}, o.src = i, document.head.appendChild(o);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
async function
|
|
1137
|
+
async function Ot(i, t = {}) {
|
|
1138
1138
|
const { media: e = "all" } = t;
|
|
1139
|
-
return
|
|
1139
|
+
return q.has(i) ? q.get(i) : new Promise((s, n) => {
|
|
1140
1140
|
const r = document.createElement("link");
|
|
1141
1141
|
r.rel = "stylesheet", r.href = i, r.media = e, r.onload = () => {
|
|
1142
|
-
|
|
1142
|
+
q.set(i, r), s(r);
|
|
1143
1143
|
}, r.onerror = () => {
|
|
1144
1144
|
r.remove(), n(new Error(`Failed to load stylesheet: ${i}`));
|
|
1145
1145
|
}, document.head.appendChild(r);
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
async function
|
|
1148
|
+
async function Gn(i, t, e = {}) {
|
|
1149
1149
|
const { weight: s = "normal", style: n = "normal" } = e, r = new FontFace(i, `url(${t})`, { weight: s, style: n });
|
|
1150
1150
|
try {
|
|
1151
1151
|
return await r.load(), document.fonts.add(r), r;
|
|
@@ -1153,41 +1153,41 @@ async function Xn(i, t, e = {}) {
|
|
|
1153
1153
|
throw new Error(`Failed to load font: ${i}`);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
async function
|
|
1156
|
+
async function Zn(i, t = "image") {
|
|
1157
1157
|
switch (t) {
|
|
1158
1158
|
case "image":
|
|
1159
1159
|
return j(i);
|
|
1160
1160
|
case "script":
|
|
1161
|
-
return
|
|
1161
|
+
return Nt(i);
|
|
1162
1162
|
case "stylesheet":
|
|
1163
1163
|
case "style":
|
|
1164
|
-
return
|
|
1164
|
+
return Ot(i);
|
|
1165
1165
|
default:
|
|
1166
1166
|
throw new Error(`Unsupported preload type: ${t}`);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
return
|
|
1169
|
+
function Qn(i) {
|
|
1170
|
+
return q.has(i);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1172
|
+
function tr() {
|
|
1173
|
+
q.clear();
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
|
|
1175
|
+
function er(i) {
|
|
1176
|
+
q.delete(i);
|
|
1177
1177
|
}
|
|
1178
|
-
const
|
|
1179
|
-
string:
|
|
1180
|
-
array:
|
|
1181
|
-
object:
|
|
1182
|
-
number:
|
|
1183
|
-
date:
|
|
1184
|
-
debounce:
|
|
1185
|
-
throttle:
|
|
1186
|
-
validator:
|
|
1187
|
-
crypto:
|
|
1188
|
-
preload:
|
|
1178
|
+
const sr = { loadImage: j, loadImages: Jn, loadScript: Nt, loadStylesheet: Ot, loadFont: Gn, preload: Zn, isLoaded: Qn, clearCache: tr, clearCacheByUrl: er }, Da = {
|
|
1179
|
+
string: je,
|
|
1180
|
+
array: Bs,
|
|
1181
|
+
object: ni,
|
|
1182
|
+
number: Ii,
|
|
1183
|
+
date: ln,
|
|
1184
|
+
debounce: cn,
|
|
1185
|
+
throttle: hn,
|
|
1186
|
+
validator: Ft,
|
|
1187
|
+
crypto: jn,
|
|
1188
|
+
preload: sr
|
|
1189
1189
|
};
|
|
1190
|
-
function
|
|
1190
|
+
function ir(i) {
|
|
1191
1191
|
if (!i) return "";
|
|
1192
1192
|
let t = String(i);
|
|
1193
1193
|
const e = /<\s*(script|iframe|object|embed|applet|form|base|link|meta|style)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>|<\s*(script|iframe|object|embed|applet|form|base|link|meta|style)\b[^>]*\/?>/gi;
|
|
@@ -1197,20 +1197,20 @@ function tr(i) {
|
|
|
1197
1197
|
while (t !== s);
|
|
1198
1198
|
return t = t.replace(/\bon\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, ""), t = t.replace(/(href|src|action|background)\s*=\s*(?:"[^"]*(?:javascript|vbscript|data)\s*:[^"]*"|'[^']*(?:javascript|vbscript|data)\s*:[^']*'|[^\s>]*(?:javascript|vbscript|data)\s*:[^\s>]*)/gi, '$1=""'), t = t.replace(/expression\s*\([^)]*\)/gi, ""), t;
|
|
1199
1199
|
}
|
|
1200
|
-
class
|
|
1200
|
+
class pt {
|
|
1201
1201
|
constructor() {
|
|
1202
1202
|
this.children = {}, this.keys = [];
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
class
|
|
1205
|
+
class st {
|
|
1206
1206
|
constructor() {
|
|
1207
|
-
this.root = new
|
|
1207
|
+
this.root = new pt();
|
|
1208
1208
|
}
|
|
1209
1209
|
insert(t) {
|
|
1210
1210
|
let e = this.root;
|
|
1211
1211
|
const s = t.split(".");
|
|
1212
1212
|
s.forEach((n, r) => {
|
|
1213
|
-
e.children[n] || (e.children[n] = new
|
|
1213
|
+
e.children[n] || (e.children[n] = new pt()), e = e.children[n], r === s.length - 1 && e.keys.push(t);
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
1216
|
getSubKeys(t) {
|
|
@@ -1242,9 +1242,9 @@ const g = {
|
|
|
1242
1242
|
path: Symbol("reactive_path"),
|
|
1243
1243
|
isReactive: Symbol("reactive_is_reactive")
|
|
1244
1244
|
};
|
|
1245
|
-
class
|
|
1245
|
+
class nr {
|
|
1246
1246
|
constructor() {
|
|
1247
|
-
this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new
|
|
1247
|
+
this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new st(), this.updateQueue = /* @__PURE__ */ new Map(), this.isProcessing = !1, this.pendingComputed = /* @__PURE__ */ new Set(), this.persistedKeys = /* @__PURE__ */ new Map(), this.snapshots = [], this.snapshotLimit = 10, this._proxyCache = /* @__PURE__ */ new WeakMap(), this.createReactiveData();
|
|
1248
1248
|
}
|
|
1249
1249
|
createReactiveData() {
|
|
1250
1250
|
const t = {
|
|
@@ -1280,8 +1280,8 @@ class er {
|
|
|
1280
1280
|
set: (r, a, o, l) => {
|
|
1281
1281
|
if (a === g.parent || a === g.path || a === g.isReactive || a === "__parent__" || a === "__path__" || a === "__isReactive__")
|
|
1282
1282
|
return !0;
|
|
1283
|
-
const c = Reflect.get(r, a, l),
|
|
1284
|
-
return this.notify(
|
|
1283
|
+
const c = Reflect.get(r, a, l), h = Reflect.set(r, a, o, l), d = `${r[g.path]}${r[g.path] ? "." : ""}${a}`;
|
|
1284
|
+
return this.notify(d, o, c), this.queueUpdate(d, o), h;
|
|
1285
1285
|
},
|
|
1286
1286
|
deleteProperty: (r, a) => {
|
|
1287
1287
|
if (a === g.parent || a === g.path || a === g.isReactive)
|
|
@@ -1382,7 +1382,7 @@ class er {
|
|
|
1382
1382
|
t.textContent !== String(e ?? "") && (t.textContent = e ?? "");
|
|
1383
1383
|
break;
|
|
1384
1384
|
case "html":
|
|
1385
|
-
const c =
|
|
1385
|
+
const c = ir(e);
|
|
1386
1386
|
t.innerHTML !== c && (t.innerHTML = c);
|
|
1387
1387
|
break;
|
|
1388
1388
|
case "value":
|
|
@@ -1395,8 +1395,8 @@ class er {
|
|
|
1395
1395
|
t.disabled !== !!e && (t.disabled = !!e);
|
|
1396
1396
|
break;
|
|
1397
1397
|
case "hidden":
|
|
1398
|
-
const
|
|
1399
|
-
t.style.display !==
|
|
1398
|
+
const h = e ? "none" : "";
|
|
1399
|
+
t.style.display !== h && (t.style.display = h);
|
|
1400
1400
|
break;
|
|
1401
1401
|
case "class":
|
|
1402
1402
|
l && (e ? t.classList.add(l) : t.classList.remove(l));
|
|
@@ -1440,7 +1440,7 @@ class er {
|
|
|
1440
1440
|
}), this.processComputed();
|
|
1441
1441
|
}
|
|
1442
1442
|
reset() {
|
|
1443
|
-
this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new
|
|
1443
|
+
this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new st(), this.updateQueue.clear(), this.snapshots = [], this.createReactiveData(), this.bind();
|
|
1444
1444
|
}
|
|
1445
1445
|
persist(t, e = {}) {
|
|
1446
1446
|
const {
|
|
@@ -1459,18 +1459,18 @@ class er {
|
|
|
1459
1459
|
encryptionKey: o
|
|
1460
1460
|
});
|
|
1461
1461
|
const c = this.get(t);
|
|
1462
|
-
c !== void 0 && this._persistSave(t, c, l, { version: r, encrypt: a, encryptionKey: o }), this.observe(t, (
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
this._persistSave(t,
|
|
1466
|
-
version:
|
|
1467
|
-
encrypt:
|
|
1468
|
-
encryptionKey:
|
|
1462
|
+
c !== void 0 && this._persistSave(t, c, l, { version: r, encrypt: a, encryptionKey: o }), this.observe(t, (h) => {
|
|
1463
|
+
const d = this.persistedKeys.get(t);
|
|
1464
|
+
d && (d.debounce > 0 ? (d.timeout && clearTimeout(d.timeout), d.timeout = setTimeout(() => {
|
|
1465
|
+
this._persistSave(t, h, d.storage, {
|
|
1466
|
+
version: d.version,
|
|
1467
|
+
encrypt: d.encrypt,
|
|
1468
|
+
encryptionKey: d.encryptionKey
|
|
1469
1469
|
});
|
|
1470
|
-
},
|
|
1471
|
-
version:
|
|
1472
|
-
encrypt:
|
|
1473
|
-
encryptionKey:
|
|
1470
|
+
}, d.debounce)) : this._persistSave(t, h, d.storage, {
|
|
1471
|
+
version: d.version,
|
|
1472
|
+
encrypt: d.encrypt,
|
|
1473
|
+
encryptionKey: d.encryptionKey
|
|
1474
1474
|
}));
|
|
1475
1475
|
});
|
|
1476
1476
|
}
|
|
@@ -1636,8 +1636,8 @@ class er {
|
|
|
1636
1636
|
set: (r, a, o, l) => {
|
|
1637
1637
|
if (a === g.parent || a === g.path || a === g.isReactive || a === "__parent__" || a === "__path__" || a === "__isReactive__")
|
|
1638
1638
|
return !0;
|
|
1639
|
-
const c = Reflect.get(r, a, l),
|
|
1640
|
-
return this.notify(
|
|
1639
|
+
const c = Reflect.get(r, a, l), h = Reflect.set(r, a, o, l), d = `${r[g.path]}${r[g.path] ? "." : ""}${a}`;
|
|
1640
|
+
return this.notify(d, o, c), this.queueUpdate(d, o), h;
|
|
1641
1641
|
},
|
|
1642
1642
|
deleteProperty: (r, a) => {
|
|
1643
1643
|
if (a === g.parent || a === g.path || a === g.isReactive)
|
|
@@ -1706,14 +1706,14 @@ class er {
|
|
|
1706
1706
|
});
|
|
1707
1707
|
}), this.persistedKeys.forEach((t, e) => {
|
|
1708
1708
|
t.timeout && clearTimeout(t.timeout);
|
|
1709
|
-
}), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new
|
|
1709
|
+
}), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new st(), this.updateQueue.clear(), this.snapshots = [];
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
|
-
class
|
|
1712
|
+
class ft {
|
|
1713
1713
|
constructor(t, e = {}) {
|
|
1714
1714
|
this.name = t, this._stateKey = `__store_${t}__`;
|
|
1715
1715
|
const s = e.state ? e.state() : {};
|
|
1716
|
-
this.getters = e.getters || {}, this.actions = e.actions || {}, this.mutations = e.mutations || {}, this.observers = {},
|
|
1716
|
+
this.getters = e.getters || {}, this.actions = e.actions || {}, this.mutations = e.mutations || {}, this.observers = {}, F ? (F.set(this._stateKey, s), this.state = F.data?.[this._stateKey] || F.createReactive(s, this._stateKey), F.observe(this._stateKey, (n) => {
|
|
1717
1717
|
this.notify(n);
|
|
1718
1718
|
})) : this.state = s, this._bindGetters(), this._bindActions();
|
|
1719
1719
|
}
|
|
@@ -1769,7 +1769,7 @@ class dt {
|
|
|
1769
1769
|
} catch (s) {
|
|
1770
1770
|
console.error(`Observer error for store ${this.name}:`, s);
|
|
1771
1771
|
}
|
|
1772
|
-
}),
|
|
1772
|
+
}), F && F.set(this.name, t);
|
|
1773
1773
|
}
|
|
1774
1774
|
toJSON() {
|
|
1775
1775
|
return {
|
|
@@ -1779,25 +1779,25 @@ class dt {
|
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
class
|
|
1782
|
+
class rr {
|
|
1783
1783
|
constructor() {
|
|
1784
1784
|
this.stores = /* @__PURE__ */ new Map();
|
|
1785
1785
|
}
|
|
1786
1786
|
createStore(t, e) {
|
|
1787
|
-
const s = new
|
|
1787
|
+
const s = new ft(t, e);
|
|
1788
1788
|
return this.stores.set(t, s), s;
|
|
1789
1789
|
}
|
|
1790
1790
|
getStore(t) {
|
|
1791
1791
|
return this.stores.get(t);
|
|
1792
1792
|
}
|
|
1793
1793
|
registerStore(t) {
|
|
1794
|
-
t instanceof
|
|
1794
|
+
t instanceof ft && this.stores.set(t.name, t);
|
|
1795
1795
|
}
|
|
1796
1796
|
dispose() {
|
|
1797
1797
|
this.stores.clear();
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
|
-
class
|
|
1800
|
+
class ar {
|
|
1801
1801
|
constructor() {
|
|
1802
1802
|
this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
|
|
1803
1803
|
}
|
|
@@ -1854,7 +1854,7 @@ class ir {
|
|
|
1854
1854
|
}), this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function I(i = null) {
|
|
1858
1858
|
const t = {
|
|
1859
1859
|
_value: i,
|
|
1860
1860
|
_subscribers: /* @__PURE__ */ new Set()
|
|
@@ -1874,14 +1874,14 @@ function T(i = null) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
}), t;
|
|
1876
1876
|
}
|
|
1877
|
-
const
|
|
1878
|
-
function
|
|
1879
|
-
return
|
|
1877
|
+
const F = new nr(), Ha = new ar(), Rt = new rr();
|
|
1878
|
+
function Ma(i, t) {
|
|
1879
|
+
return Rt.createStore(i, t);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return
|
|
1881
|
+
function Ia(i) {
|
|
1882
|
+
return Rt.getStore(i);
|
|
1883
1883
|
}
|
|
1884
|
-
const
|
|
1884
|
+
const T = {
|
|
1885
1885
|
paths: {
|
|
1886
1886
|
icons: "/icons/",
|
|
1887
1887
|
base: "/"
|
|
@@ -1896,7 +1896,52 @@ const F = {
|
|
|
1896
1896
|
},
|
|
1897
1897
|
http: {
|
|
1898
1898
|
baseURL: "",
|
|
1899
|
-
timeout: 1e4
|
|
1899
|
+
timeout: 1e4,
|
|
1900
|
+
headers: {},
|
|
1901
|
+
withCredentials: !1
|
|
1902
|
+
},
|
|
1903
|
+
ui: {
|
|
1904
|
+
defaultSize: "md",
|
|
1905
|
+
defaultVariant: "default"
|
|
1906
|
+
},
|
|
1907
|
+
performance: {
|
|
1908
|
+
lazyLoad: !0,
|
|
1909
|
+
debounceDelay: 300,
|
|
1910
|
+
throttleDelay: 100,
|
|
1911
|
+
animationEnabled: !0
|
|
1912
|
+
},
|
|
1913
|
+
security: {
|
|
1914
|
+
xssProtection: !0,
|
|
1915
|
+
sanitizeHtml: {
|
|
1916
|
+
enabled: !0,
|
|
1917
|
+
allowedTags: ["b", "i", "u", "em", "strong", "a", "br", "p", "span", "div", "img"],
|
|
1918
|
+
allowedAttributes: {
|
|
1919
|
+
a: ["href", "target", "rel"],
|
|
1920
|
+
img: ["src", "alt", "width", "height"],
|
|
1921
|
+
span: ["class", "style"],
|
|
1922
|
+
div: ["class", "style"]
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
maskData: {
|
|
1926
|
+
enabled: !0,
|
|
1927
|
+
patterns: {
|
|
1928
|
+
phone: { regex: "^(\\d{3})\\d{4}(\\d{4})$", replace: "$1****$2" },
|
|
1929
|
+
email: { regex: "^(.)(.*)(@.*)$", replace: "$1***$3" },
|
|
1930
|
+
idCard: { regex: "^(\\d{6})\\d{8}(\\d{4})$", replace: "$1********$2" },
|
|
1931
|
+
bankCard: { regex: "^(\\d{4})\\d{8}(\\d{4})$", replace: "$1 **** **** $2" }
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
secureId: {
|
|
1935
|
+
length: 16,
|
|
1936
|
+
charset: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
dev: {
|
|
1940
|
+
debug: !1,
|
|
1941
|
+
logLevel: "warn"
|
|
1942
|
+
},
|
|
1943
|
+
extend: {
|
|
1944
|
+
themeVariables: {}
|
|
1900
1945
|
},
|
|
1901
1946
|
components: {
|
|
1902
1947
|
autoInit: !0,
|
|
@@ -1910,33 +1955,51 @@ const F = {
|
|
|
1910
1955
|
global: !0
|
|
1911
1956
|
}
|
|
1912
1957
|
};
|
|
1913
|
-
function
|
|
1914
|
-
|
|
1958
|
+
function Ta(i) {
|
|
1959
|
+
Kt(T, i);
|
|
1960
|
+
}
|
|
1961
|
+
function ct(i) {
|
|
1962
|
+
return i ? hr(T, i) : T;
|
|
1963
|
+
}
|
|
1964
|
+
function Vt() {
|
|
1965
|
+
return T.paths.base + T.paths.icons.replace(/^\//, "");
|
|
1966
|
+
}
|
|
1967
|
+
function Aa() {
|
|
1968
|
+
return T.paths.base;
|
|
1969
|
+
}
|
|
1970
|
+
function or() {
|
|
1971
|
+
return T.theme.default;
|
|
1972
|
+
}
|
|
1973
|
+
function lr() {
|
|
1974
|
+
return T.theme.brand;
|
|
1975
|
+
}
|
|
1976
|
+
function za() {
|
|
1977
|
+
return T.http;
|
|
1915
1978
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return
|
|
1979
|
+
function cr() {
|
|
1980
|
+
return T.ui;
|
|
1918
1981
|
}
|
|
1919
|
-
function
|
|
1920
|
-
return
|
|
1982
|
+
function tt() {
|
|
1983
|
+
return T.security;
|
|
1921
1984
|
}
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
1985
|
+
function Pa() {
|
|
1986
|
+
return T.dev;
|
|
1924
1987
|
}
|
|
1925
|
-
function
|
|
1926
|
-
return
|
|
1988
|
+
function $a() {
|
|
1989
|
+
return T.performance;
|
|
1927
1990
|
}
|
|
1928
|
-
function
|
|
1929
|
-
return
|
|
1991
|
+
function qa() {
|
|
1992
|
+
return T.extend;
|
|
1930
1993
|
}
|
|
1931
|
-
function
|
|
1994
|
+
function Kt(i, t) {
|
|
1932
1995
|
for (const e in t)
|
|
1933
|
-
t[e] instanceof Object && e in i && i[e] instanceof Object ?
|
|
1996
|
+
t[e] instanceof Object && e in i && i[e] instanceof Object ? Kt(i[e], t[e]) : i[e] = t[e];
|
|
1934
1997
|
return i;
|
|
1935
1998
|
}
|
|
1936
|
-
function
|
|
1999
|
+
function hr(i, t) {
|
|
1937
2000
|
return t.split(".").reduce((e, s) => (e && e[s]) !== void 0 ? e[s] : void 0, i);
|
|
1938
2001
|
}
|
|
1939
|
-
const
|
|
2002
|
+
const Wt = "kupola-theme", Ut = "kupola-brand", Y = [
|
|
1940
2003
|
{ id: "green", name: "翠绿", color: "#32F08C" },
|
|
1941
2004
|
{ id: "xionghuang", name: "雄黄", color: "#FF9900" },
|
|
1942
2005
|
{ id: "jianghuang", name: "姜黄", color: "#E2C027" },
|
|
@@ -1950,11 +2013,11 @@ const Rt = "kupola-theme", Vt = "kupola-brand", Y = [
|
|
|
1950
2013
|
{ id: "roulan", name: "柔蓝", color: "#106898" }
|
|
1951
2014
|
];
|
|
1952
2015
|
function R() {
|
|
1953
|
-
return localStorage.getItem(
|
|
2016
|
+
return localStorage.getItem(Wt) || or();
|
|
1954
2017
|
}
|
|
1955
|
-
function
|
|
2018
|
+
function nt(i) {
|
|
1956
2019
|
if (i !== "dark" && i !== "light") return;
|
|
1957
|
-
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(
|
|
2020
|
+
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(Wt, i);
|
|
1958
2021
|
const t = document.querySelector("[data-theme-toggle]");
|
|
1959
2022
|
if (t) {
|
|
1960
2023
|
t.setAttribute("data-current-theme", i);
|
|
@@ -1966,12 +2029,12 @@ function it(i) {
|
|
|
1966
2029
|
}
|
|
1967
2030
|
}
|
|
1968
2031
|
function X() {
|
|
1969
|
-
return localStorage.getItem(
|
|
2032
|
+
return localStorage.getItem(Ut) || lr();
|
|
1970
2033
|
}
|
|
1971
|
-
function
|
|
2034
|
+
function rt(i) {
|
|
1972
2035
|
const t = Y.find((n) => n.id === i);
|
|
1973
2036
|
if (!t) return;
|
|
1974
|
-
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(
|
|
2037
|
+
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(Ut, i);
|
|
1975
2038
|
const e = document.querySelector("[data-brand-toggle]");
|
|
1976
2039
|
if (e) {
|
|
1977
2040
|
e.setAttribute("data-current-brand", i);
|
|
@@ -1984,26 +2047,26 @@ function nt(i) {
|
|
|
1984
2047
|
n.getAttribute("data-brand-btn") === i ? n.classList.add("is-active") : n.classList.remove("is-active");
|
|
1985
2048
|
});
|
|
1986
2049
|
}
|
|
1987
|
-
function
|
|
2050
|
+
function mt(i) {
|
|
1988
2051
|
const t = i.querySelector(".theme-icon");
|
|
1989
2052
|
if (t) {
|
|
1990
|
-
const e = R(), s =
|
|
2053
|
+
const e = R(), s = Vt();
|
|
1991
2054
|
t.src = e === "dark" ? s + "sun.svg" : s + "moon.svg";
|
|
1992
2055
|
}
|
|
1993
2056
|
}
|
|
1994
|
-
function
|
|
2057
|
+
function dr() {
|
|
1995
2058
|
const i = R();
|
|
1996
|
-
|
|
2059
|
+
nt(i);
|
|
1997
2060
|
const t = X();
|
|
1998
|
-
|
|
2061
|
+
rt(t);
|
|
1999
2062
|
const e = document.querySelector("[data-theme-toggle]");
|
|
2000
2063
|
if (e) {
|
|
2001
|
-
|
|
2064
|
+
mt(e);
|
|
2002
2065
|
const o = e.onclick;
|
|
2003
2066
|
e.onclick = function(l) {
|
|
2004
2067
|
l.preventDefault();
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2068
|
+
const h = R() === "dark" ? "light" : "dark";
|
|
2069
|
+
nt(h), mt(e), typeof o == "function" && o.call(this, l);
|
|
2007
2070
|
};
|
|
2008
2071
|
}
|
|
2009
2072
|
let s = document.getElementById("brand-picker");
|
|
@@ -2028,23 +2091,23 @@ function or() {
|
|
|
2028
2091
|
o.addEventListener("click", (l) => {
|
|
2029
2092
|
l.stopPropagation();
|
|
2030
2093
|
const c = o.getAttribute("data-brand-btn");
|
|
2031
|
-
|
|
2094
|
+
rt(c), s && (s.style.display = "none");
|
|
2032
2095
|
});
|
|
2033
2096
|
});
|
|
2034
2097
|
}
|
|
2035
|
-
function
|
|
2098
|
+
function Ba() {
|
|
2036
2099
|
const i = document.createElement("button");
|
|
2037
2100
|
i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme", R()), i.className = "ds-btn ds-btn--ghost ds-btn--sm ds-btn--icon", i.style.position = "fixed", i.style.top = "16px", i.style.right = "16px", i.style.zIndex = "9999";
|
|
2038
2101
|
const t = document.createElement("img");
|
|
2039
2102
|
t.className = "theme-icon";
|
|
2040
|
-
const e =
|
|
2103
|
+
const e = Vt();
|
|
2041
2104
|
return t.src = R() === "dark" ? e + "sun.svg" : e + "moon.svg", t.width = 14, t.height = 14, t.alt = "Toggle theme", i.appendChild(t), document.body.appendChild(i), i.onclick = function(s) {
|
|
2042
2105
|
s.preventDefault();
|
|
2043
2106
|
const r = R() === "dark" ? "light" : "dark";
|
|
2044
|
-
|
|
2107
|
+
nt(r);
|
|
2045
2108
|
}, i;
|
|
2046
2109
|
}
|
|
2047
|
-
function
|
|
2110
|
+
function Fa() {
|
|
2048
2111
|
const i = document.createElement("div");
|
|
2049
2112
|
i.id = "brand-picker-auto", i.style.position = "fixed", i.style.top = "56px", i.style.right = "16px", i.style.zIndex = "9998", i.style.display = "none", i.style.padding = "12px", i.style.width = "200px", i.style.gridTemplateColumns = "repeat(3, 1fr)", i.style.gap = "6px", i.style.backgroundColor = "var(--bg-base-secondary)", i.style.border = "1px solid var(--border-neutral-l1)", i.style.borderRadius = "8px", i.style.boxShadow = "0 4px 20px rgba(0, 0, 0, 0.2)", i.style.overflow = "hidden", Y.forEach((a) => {
|
|
2050
2113
|
const o = document.createElement("button");
|
|
@@ -2071,11 +2134,65 @@ function Ma() {
|
|
|
2071
2134
|
a.addEventListener("click", (o) => {
|
|
2072
2135
|
o.stopPropagation();
|
|
2073
2136
|
const l = a.getAttribute("data-brand-btn");
|
|
2074
|
-
|
|
2137
|
+
rt(l), i.style.display = "none";
|
|
2075
2138
|
});
|
|
2076
2139
|
}), { toggleBtn: t, container: i };
|
|
2077
2140
|
}
|
|
2078
|
-
|
|
2141
|
+
function Na(i, t = {}) {
|
|
2142
|
+
const s = tt()?.sanitizeHtml || {};
|
|
2143
|
+
if (!s.enabled && !t.force)
|
|
2144
|
+
return i;
|
|
2145
|
+
const n = t.allowedTags || s.allowedTags || [], r = t.allowedAttributes || s.allowedAttributes || {};
|
|
2146
|
+
if (typeof i != "string")
|
|
2147
|
+
return i;
|
|
2148
|
+
const o = new DOMParser().parseFromString(i, "text/html");
|
|
2149
|
+
return o.body.querySelectorAll("*").forEach((c) => {
|
|
2150
|
+
const h = c.tagName.toLowerCase();
|
|
2151
|
+
if (!n.includes(h)) {
|
|
2152
|
+
c.remove();
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
Array.from(c.attributes).forEach((d) => {
|
|
2156
|
+
const u = d.name.toLowerCase();
|
|
2157
|
+
(r[h] || []).includes(u) || c.removeAttribute(d.name);
|
|
2158
|
+
});
|
|
2159
|
+
}), o.body.innerHTML;
|
|
2160
|
+
}
|
|
2161
|
+
function Oa(i) {
|
|
2162
|
+
if (typeof i != "string")
|
|
2163
|
+
return i;
|
|
2164
|
+
const t = document.createElement("div");
|
|
2165
|
+
return t.textContent = i, t.innerHTML;
|
|
2166
|
+
}
|
|
2167
|
+
function Ra(i) {
|
|
2168
|
+
return typeof i != "string" ? i : new DOMParser().parseFromString(i, "text/html").body.textContent || "";
|
|
2169
|
+
}
|
|
2170
|
+
function Va(i, t, e = {}) {
|
|
2171
|
+
const n = tt()?.maskData || {};
|
|
2172
|
+
if (!n.enabled && !e.force || i == null)
|
|
2173
|
+
return i;
|
|
2174
|
+
const a = (e.patterns || n.patterns || {})[t];
|
|
2175
|
+
if (!a)
|
|
2176
|
+
return i;
|
|
2177
|
+
const o = typeof a.regex == "string" ? new RegExp(a.regex) : a.regex;
|
|
2178
|
+
return String(i).replace(o, a.replace);
|
|
2179
|
+
}
|
|
2180
|
+
function Ka(i, t) {
|
|
2181
|
+
const s = tt()?.secureId || {}, n = i || s.length || 16, r = s.charset || "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
2182
|
+
if (typeof crypto > "u" || !crypto.getRandomValues) {
|
|
2183
|
+
let l = "";
|
|
2184
|
+
for (let c = 0; c < n; c++)
|
|
2185
|
+
l += r[Math.floor(Math.random() * r.length)];
|
|
2186
|
+
return t ? `${t}_${l}` : l;
|
|
2187
|
+
}
|
|
2188
|
+
const a = new Uint32Array(n);
|
|
2189
|
+
crypto.getRandomValues(a);
|
|
2190
|
+
let o = "";
|
|
2191
|
+
for (let l = 0; l < n; l++)
|
|
2192
|
+
o += r[a[l] % r.length];
|
|
2193
|
+
return t ? `${t}_${o}` : o;
|
|
2194
|
+
}
|
|
2195
|
+
class ur {
|
|
2079
2196
|
constructor() {
|
|
2080
2197
|
this.initializers = /* @__PURE__ */ new Map(), this.cleanupFunctions = /* @__PURE__ */ new Map(), this.processedElements = /* @__PURE__ */ new WeakSet(), this._dataAttrs = ["data-component"], this._cssClasses = [], this._cachedSelector = null;
|
|
2081
2198
|
}
|
|
@@ -2182,7 +2299,7 @@ class lr {
|
|
|
2182
2299
|
}), await Promise.all(n);
|
|
2183
2300
|
}
|
|
2184
2301
|
}
|
|
2185
|
-
const E = new
|
|
2302
|
+
const E = new ur(), pr = [
|
|
2186
2303
|
{ attr: "data-dropdown", cls: "ds-dropdown" },
|
|
2187
2304
|
{ attr: "data-select", cls: "ds-select" },
|
|
2188
2305
|
{ attr: "data-datepicker", cls: "ds-datepicker" },
|
|
@@ -2204,11 +2321,11 @@ const E = new lr(), cr = [
|
|
|
2204
2321
|
{ cls: "ds-notification" },
|
|
2205
2322
|
{ cls: "ds-message" }
|
|
2206
2323
|
];
|
|
2207
|
-
for (const i of
|
|
2324
|
+
for (const i of pr)
|
|
2208
2325
|
i.attr && !E._dataAttrs.includes(i.attr) && E._dataAttrs.push(i.attr), i.cls && !E._cssClasses.includes(i.cls) && E._cssClasses.push(i.cls);
|
|
2209
2326
|
class J {
|
|
2210
2327
|
constructor(t) {
|
|
2211
|
-
this.element = t, this.isMounted = !1, this.isDestroyed = !1, this.props = this._parseProps(), this.state = {}, this.slots = this._parseSlots(), this._eventListeners = {}, this._appliedMixins = [], this.lifecycle = new
|
|
2328
|
+
this.element = t, this.isMounted = !1, this.isDestroyed = !1, this.props = this._parseProps(), this.state = {}, this.slots = this._parseSlots(), this._eventListeners = {}, this._appliedMixins = [], this.lifecycle = new lt(), this.setupContext = null;
|
|
2212
2329
|
}
|
|
2213
2330
|
_parseProps() {
|
|
2214
2331
|
const t = {};
|
|
@@ -2341,7 +2458,7 @@ class J {
|
|
|
2341
2458
|
setup() {
|
|
2342
2459
|
}
|
|
2343
2460
|
}
|
|
2344
|
-
function
|
|
2461
|
+
function gt(i, t) {
|
|
2345
2462
|
Object.keys(t).forEach((e) => {
|
|
2346
2463
|
if (e !== "constructor")
|
|
2347
2464
|
if (typeof t[e] == "function") {
|
|
@@ -2353,7 +2470,7 @@ function pt(i, t) {
|
|
|
2353
2470
|
i.prototype[e] = t[e];
|
|
2354
2471
|
});
|
|
2355
2472
|
}
|
|
2356
|
-
class
|
|
2473
|
+
class fr {
|
|
2357
2474
|
constructor() {
|
|
2358
2475
|
this.components = /* @__PURE__ */ new Map(), this.lazyComponents = /* @__PURE__ */ new Map(), this.loadedComponents = /* @__PURE__ */ new Map(), this.instances = /* @__PURE__ */ new Map(), this.observer = null, this.mixins = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
|
|
2359
2476
|
}
|
|
@@ -2397,7 +2514,7 @@ class hr {
|
|
|
2397
2514
|
useMixin(t, ...e) {
|
|
2398
2515
|
e.forEach((s) => {
|
|
2399
2516
|
const n = this.mixins.get(s);
|
|
2400
|
-
n &&
|
|
2517
|
+
n && gt(t, n);
|
|
2401
2518
|
});
|
|
2402
2519
|
}
|
|
2403
2520
|
async bootstrap(t = document) {
|
|
@@ -2438,7 +2555,7 @@ class hr {
|
|
|
2438
2555
|
const n = t.getAttribute("data-mixins"), r = s;
|
|
2439
2556
|
n && n.split(",").forEach((o) => {
|
|
2440
2557
|
const l = this.mixins.get(o.trim());
|
|
2441
|
-
l &&
|
|
2558
|
+
l && gt(r, l);
|
|
2442
2559
|
});
|
|
2443
2560
|
const a = new r(t);
|
|
2444
2561
|
t.__kupolaInstance = a, this.instances.set(t, a), a.mount();
|
|
@@ -2484,30 +2601,37 @@ class hr {
|
|
|
2484
2601
|
}
|
|
2485
2602
|
}
|
|
2486
2603
|
let M = null;
|
|
2487
|
-
typeof window < "u" && (M = new
|
|
2488
|
-
|
|
2604
|
+
typeof window < "u" && (M = new fr());
|
|
2605
|
+
function mr() {
|
|
2606
|
+
if (tt().xssProtection && typeof document < "u") {
|
|
2607
|
+
let t = document.querySelector('meta[http-equiv="X-XSS-Protection"]');
|
|
2608
|
+
t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-XSS-Protection"), t.setAttribute("content", "1; mode=block"), document.head.insertBefore(t, document.head.firstChild)), t = document.querySelector('meta[http-equiv="X-Content-Type-Options"]'), t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-Content-Type-Options"), t.setAttribute("content", "nosniff"), document.head.insertBefore(t, document.head.firstChild)), t = document.querySelector('meta[http-equiv="X-Frame-Options"]'), t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-Frame-Options"), t.setAttribute("content", "SAMEORIGIN"), document.head.insertBefore(t, document.head.firstChild));
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
async function _t() {
|
|
2489
2612
|
if (typeof window < "u") {
|
|
2490
|
-
|
|
2491
|
-
|
|
2613
|
+
mr();
|
|
2614
|
+
const i = ct();
|
|
2615
|
+
F.loadPersisted(), F.bind(), dr(), i.components?.autoInit !== !1 && (await E.initializeAll(), M && await M.bootstrap());
|
|
2492
2616
|
}
|
|
2493
2617
|
}
|
|
2494
|
-
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
2495
|
-
function
|
|
2618
|
+
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", _t) : typeof window < "u" && setTimeout(_t, 0);
|
|
2619
|
+
function Wa(i, t) {
|
|
2496
2620
|
M && M.register(i, t);
|
|
2497
2621
|
}
|
|
2498
|
-
function
|
|
2622
|
+
function Ua(i, t) {
|
|
2499
2623
|
M && M.registerLazy(i, t);
|
|
2500
2624
|
}
|
|
2501
|
-
function
|
|
2625
|
+
function Ya(i) {
|
|
2502
2626
|
return M ? M.bootstrap(i) : Promise.resolve();
|
|
2503
2627
|
}
|
|
2504
|
-
function
|
|
2628
|
+
function Xa(i, t) {
|
|
2505
2629
|
M && M.defineMixin(i, t);
|
|
2506
2630
|
}
|
|
2507
|
-
function
|
|
2631
|
+
function ja(i, ...t) {
|
|
2508
2632
|
M && M.useMixin(i, ...t);
|
|
2509
2633
|
}
|
|
2510
|
-
function
|
|
2634
|
+
function Ja(i, t) {
|
|
2511
2635
|
if (!t || typeof t != "object")
|
|
2512
2636
|
throw new Error(`defineComponent("${i}"): options must be an object`);
|
|
2513
2637
|
t.componentClass ? M && M.register(i, t.componentClass) : t.lazy && M && M.registerLazy(i, t.lazy), t.init ? E.register(i, t.init, t.cleanup || null, {
|
|
@@ -2519,9 +2643,9 @@ function $a(i, t) {
|
|
|
2519
2643
|
cssClass: t.cssClass
|
|
2520
2644
|
});
|
|
2521
2645
|
}
|
|
2522
|
-
class
|
|
2646
|
+
class Yt {
|
|
2523
2647
|
constructor(t = {}) {
|
|
2524
|
-
const e =
|
|
2648
|
+
const e = ct();
|
|
2525
2649
|
this.locales = t.locales || {}, this.currentLocale = t.defaultLocale || e.i18n?.locale || "zh-CN", this.fallbackLocale = t.fallbackLocale || e.i18n?.fallbackLocale || "en-US", this.delimiter = t.delimiter || ".", this.missingHandler = t.missingHandler || ((s) => (console.warn(`Missing translation: ${s}`), s)), this._initFromDOM();
|
|
2526
2650
|
}
|
|
2527
2651
|
_initFromDOM() {
|
|
@@ -2617,37 +2741,37 @@ class Kt {
|
|
|
2617
2741
|
return new Intl.RelativeTimeFormat(n, s).format(t, e);
|
|
2618
2742
|
}
|
|
2619
2743
|
}
|
|
2620
|
-
const O = new
|
|
2621
|
-
function
|
|
2622
|
-
return new
|
|
2744
|
+
const O = new Yt();
|
|
2745
|
+
function Ga(i) {
|
|
2746
|
+
return new Yt(i);
|
|
2623
2747
|
}
|
|
2624
|
-
function
|
|
2748
|
+
function Za(i, t = {}) {
|
|
2625
2749
|
return O.t(i, t);
|
|
2626
2750
|
}
|
|
2627
|
-
function
|
|
2751
|
+
function Qa(i, t, e = {}) {
|
|
2628
2752
|
return O.n(i, t, e);
|
|
2629
2753
|
}
|
|
2630
|
-
function
|
|
2754
|
+
function to(i) {
|
|
2631
2755
|
return O.setLocale(i);
|
|
2632
2756
|
}
|
|
2633
|
-
function
|
|
2757
|
+
function eo() {
|
|
2634
2758
|
return O.getLocale();
|
|
2635
2759
|
}
|
|
2636
|
-
function
|
|
2760
|
+
function so(i, t = {}) {
|
|
2637
2761
|
return O.formatDate(i, t);
|
|
2638
2762
|
}
|
|
2639
|
-
function
|
|
2763
|
+
function io(i, t = {}) {
|
|
2640
2764
|
return O.formatNumber(i, t);
|
|
2641
2765
|
}
|
|
2642
|
-
function
|
|
2766
|
+
function no(i, t, e = {}) {
|
|
2643
2767
|
return O.formatCurrency(i, t, e);
|
|
2644
2768
|
}
|
|
2645
|
-
class
|
|
2769
|
+
class gr {
|
|
2646
2770
|
constructor() {
|
|
2647
2771
|
this._listeners = /* @__PURE__ */ new Map(), this._scopeListeners = /* @__PURE__ */ new Map();
|
|
2648
2772
|
}
|
|
2649
2773
|
on(t, e, s, n = {}) {
|
|
2650
|
-
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(),
|
|
2774
|
+
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(), h = {
|
|
2651
2775
|
id: c,
|
|
2652
2776
|
target: t,
|
|
2653
2777
|
eventName: e,
|
|
@@ -2656,11 +2780,11 @@ class dr {
|
|
|
2656
2780
|
once: a,
|
|
2657
2781
|
wrappedHandler: null
|
|
2658
2782
|
};
|
|
2659
|
-
|
|
2783
|
+
h.wrappedHandler = (u) => {
|
|
2660
2784
|
a && this.offById(c), s.call(t, u);
|
|
2661
2785
|
};
|
|
2662
|
-
const
|
|
2663
|
-
return this._listeners.has(
|
|
2786
|
+
const d = this._getEventKey(t, e);
|
|
2787
|
+
return this._listeners.has(d) || this._listeners.set(d, []), this._listeners.get(d).push(h), r && (this._scopeListeners.has(r) || this._scopeListeners.set(r, []), this._scopeListeners.get(r).push(c)), t.addEventListener(e, h.wrappedHandler, {
|
|
2664
2788
|
passive: o,
|
|
2665
2789
|
capture: l
|
|
2666
2790
|
}), {
|
|
@@ -2772,32 +2896,32 @@ class dr {
|
|
|
2772
2896
|
this._listeners.clear(), this._scopeListeners.clear();
|
|
2773
2897
|
}
|
|
2774
2898
|
}
|
|
2775
|
-
const H = new
|
|
2776
|
-
function
|
|
2899
|
+
const H = new gr();
|
|
2900
|
+
function ro(i, t, e, s) {
|
|
2777
2901
|
return H.on(i, t, e, s);
|
|
2778
2902
|
}
|
|
2779
|
-
function
|
|
2903
|
+
function ao(i, t, e, s) {
|
|
2780
2904
|
return H.once(i, t, e, s);
|
|
2781
2905
|
}
|
|
2782
|
-
function
|
|
2906
|
+
function oo(i, t, e) {
|
|
2783
2907
|
H.off(i, t, e);
|
|
2784
2908
|
}
|
|
2785
|
-
function
|
|
2909
|
+
function lo(i, t, e) {
|
|
2786
2910
|
return H.emit(i, t, e);
|
|
2787
2911
|
}
|
|
2788
|
-
function
|
|
2912
|
+
function co(i, t) {
|
|
2789
2913
|
return H.emitGlobal(i, t);
|
|
2790
2914
|
}
|
|
2791
|
-
function
|
|
2915
|
+
function ho(i) {
|
|
2792
2916
|
H.offByScope(i);
|
|
2793
2917
|
}
|
|
2794
|
-
function
|
|
2918
|
+
function uo(i, t) {
|
|
2795
2919
|
H.offAll(i, t);
|
|
2796
2920
|
}
|
|
2797
|
-
function
|
|
2921
|
+
function po(i, t) {
|
|
2798
2922
|
return H.getListenerCount(i, t);
|
|
2799
2923
|
}
|
|
2800
|
-
class
|
|
2924
|
+
class _r {
|
|
2801
2925
|
constructor(t, e = {}) {
|
|
2802
2926
|
this.element = t, this.trigger = t.querySelector(".ds-dropdown__trigger"), this.menu = t.querySelector(".ds-dropdown__menu"), this.triggerText = this.trigger ? this.trigger.querySelector("span") : null, this.scope = `dropdown-${Math.random().toString(36).substr(2, 9)}`, this.triggerMode = e.trigger || t.getAttribute("data-dropdown-trigger") || "click", this.hoverDelay = e.hoverDelay || parseInt(t.getAttribute("data-dropdown-hover-delay")) || 150, this.disabled = e.disabled || t.hasAttribute("data-dropdown-disabled"), this.keyboardNav = e.keyboardNav !== !1, this.autoPosition = e.autoPosition !== !1, this.onSelect = e.onSelect || null, this.onShow = e.onShow || null, this.onHide = e.onHide || null, this.isOpen = !1, this.focusIndex = -1, this._hoverTimer = null, this._hoverLeaveTimer = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._itemClickHandler = null, this._keydownHandler = null, this._mouseenterHandler = null, this._mouseleaveHandler = null, this._triggerMouseenterHandler = null, this._triggerMouseleaveHandler = null, this._triggerKeydownHandler = null;
|
|
2803
2927
|
}
|
|
@@ -2899,25 +3023,25 @@ class ur {
|
|
|
2899
3023
|
}), this._mouseenterHandler && this.menu.removeEventListener("mouseenter", this._mouseenterHandler), this._mouseleaveHandler && this.menu.removeEventListener("mouseleave", this._mouseleaveHandler)), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._itemClickHandler = null, this._keydownHandler = null, this._mouseenterHandler = null, this._mouseleaveHandler = null, this._triggerMouseenterHandler = null, this._triggerMouseleaveHandler = null, this._triggerKeydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
2900
3024
|
}
|
|
2901
3025
|
}
|
|
2902
|
-
function
|
|
2903
|
-
const e = new
|
|
3026
|
+
function Xt(i, t) {
|
|
3027
|
+
const e = new _r(i, t);
|
|
2904
3028
|
e.init(), i._kupolaDropdown = e;
|
|
2905
3029
|
}
|
|
2906
|
-
function
|
|
3030
|
+
function fo(i = document) {
|
|
2907
3031
|
i.querySelectorAll(".ds-dropdown").forEach((t) => {
|
|
2908
|
-
|
|
3032
|
+
Xt(t);
|
|
2909
3033
|
});
|
|
2910
3034
|
}
|
|
2911
|
-
function
|
|
3035
|
+
function jt(i) {
|
|
2912
3036
|
i._kupolaDropdown && (i._kupolaDropdown.destroy(), i._kupolaDropdown = null);
|
|
2913
3037
|
}
|
|
2914
|
-
function
|
|
3038
|
+
function mo() {
|
|
2915
3039
|
document.querySelectorAll(".ds-dropdown").forEach((i) => {
|
|
2916
|
-
|
|
3040
|
+
jt(i);
|
|
2917
3041
|
});
|
|
2918
3042
|
}
|
|
2919
|
-
E.register("dropdown",
|
|
2920
|
-
class
|
|
3043
|
+
E.register("dropdown", Xt, jt);
|
|
3044
|
+
class yr {
|
|
2921
3045
|
constructor(t, e = {}) {
|
|
2922
3046
|
this.element = t, this.trigger = t.querySelector(".ds-select__trigger"), this.valueEl = t.querySelector(".ds-select__value") || t.querySelector(".ds-select__trigger span"), this.optionsEl = t.querySelector(".ds-select__options") || t.querySelector(".ds-select__menu"), this.nativeSelect = t.querySelector("select"), this.icon = t.querySelector(".ds-select__icon"), this.scope = `select-${Math.random().toString(36).substr(2, 9)}`, this.multiple = e.multiple || t.hasAttribute("data-select-multiple"), this.searchable = e.searchable || t.hasAttribute("data-select-search"), this.clearable = e.clearable || t.hasAttribute("data-select-clear"), this.placeholder = e.placeholder || t.getAttribute("data-select-placeholder") || "", this.disabled = e.disabled || t.hasAttribute("data-select-disabled"), this.maxSelection = e.maxSelection || parseInt(t.getAttribute("data-select-max")) || 1 / 0, this.remoteMethod = e.remoteMethod || null, this.onChange = e.onChange || null, this.isOpen = !1, this.selectedValues = /* @__PURE__ */ new Set(), this.allOptions = [], this.filteredOptions = [], this.focusIndex = -1, this.searchInput = null, this.clearBtn = null, this.tagsWrap = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._optionClickHandler = null, this._keydownHandler = null;
|
|
2923
3047
|
}
|
|
@@ -3130,20 +3254,20 @@ class pr {
|
|
|
3130
3254
|
}), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this.searchInput && this.searchInput.remove(), this.clearBtn && this.clearBtn.remove(), this.tagsWrap && this.tagsWrap.remove(), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._optionClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3131
3255
|
}
|
|
3132
3256
|
}
|
|
3133
|
-
function
|
|
3134
|
-
const e = new
|
|
3257
|
+
function Jt(i, t) {
|
|
3258
|
+
const e = new yr(i, t);
|
|
3135
3259
|
e.init(), i._kupolaSelect = e;
|
|
3136
3260
|
}
|
|
3137
|
-
function
|
|
3261
|
+
function go(i = document) {
|
|
3138
3262
|
i.querySelectorAll(".ds-select").forEach((t) => {
|
|
3139
|
-
|
|
3263
|
+
Jt(t);
|
|
3140
3264
|
});
|
|
3141
3265
|
}
|
|
3142
|
-
function
|
|
3266
|
+
function vr(i) {
|
|
3143
3267
|
i._kupolaSelect && (i._kupolaSelect.destroy(), i._kupolaSelect = null);
|
|
3144
3268
|
}
|
|
3145
|
-
E.register("select",
|
|
3146
|
-
class
|
|
3269
|
+
E.register("select", Jt, vr);
|
|
3270
|
+
class br {
|
|
3147
3271
|
constructor(t, e = {}) {
|
|
3148
3272
|
this.element = t, this.input = t.querySelector("input"), this.endInput = t.querySelector(".ds-datepicker__end-input"), this.icon = t.querySelector(".ds-datepicker__icon"), this.calendarEl = t.querySelector(".ds-datepicker__calendar"), this.scope = `datepicker-${Math.random().toString(36).substr(2, 9)}`, this.format = e.format || t.getAttribute("data-datepicker-format") || "YYYY-MM-DD", this.range = e.range || t.hasAttribute("data-datepicker-range"), this.minDate = e.minDate || t.getAttribute("data-datepicker-min") || null, this.maxDate = e.maxDate || t.getAttribute("data-datepicker-max") || null, this.disabledDate = e.disabledDate || null, this.weekStart = e.weekStart || parseInt(t.getAttribute("data-datepicker-week-start")) || 0, this.placeholder = e.placeholder || t.getAttribute("data-datepicker-placeholder") || "", this.showToday = e.showToday !== !1, this.showWeekNumber = e.showWeekNumber || t.hasAttribute("data-datepicker-week-number"), this.onChange = e.onChange || null, this.months = e.months || ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], this.weekDays = e.weekDays || ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], this.todayText = e.todayText || "Today", this.clearText = e.clearText || "Clear", this.currentDate = /* @__PURE__ */ new Date(), this.viewMode = "days", this.selectedDate = null, this.rangeStart = null, this.rangeEnd = null, this.isSelectingEnd = !1, this._iconClickHandler = null, this._inputClickHandler = null, this._endInputClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null;
|
|
3149
3273
|
}
|
|
@@ -3246,20 +3370,20 @@ class mr {
|
|
|
3246
3370
|
const m = document.createElement("span");
|
|
3247
3371
|
m.className = "ds-datepicker__weekday", m.textContent = p, l.appendChild(m);
|
|
3248
3372
|
}), t.appendChild(l);
|
|
3249
|
-
const
|
|
3250
|
-
|
|
3251
|
-
const
|
|
3373
|
+
const h = document.createElement("div");
|
|
3374
|
+
h.className = "ds-datepicker__days";
|
|
3375
|
+
const d = new Date(e, s, 1).getDay(), u = new Date(e, s + 1, 0).getDate(), f = (d - this.weekStart + 7) % 7;
|
|
3252
3376
|
for (let p = 0; p < f; p++) {
|
|
3253
3377
|
const m = document.createElement("span");
|
|
3254
|
-
m.className = "ds-datepicker__day ds-datepicker__day--empty",
|
|
3378
|
+
m.className = "ds-datepicker__day ds-datepicker__day--empty", h.appendChild(m);
|
|
3255
3379
|
}
|
|
3256
3380
|
for (let p = 1; p <= u; p++) {
|
|
3257
3381
|
const m = new Date(e, s, p), y = document.createElement("button");
|
|
3258
3382
|
y.className = "ds-datepicker__day", y.type = "button", y.textContent = p, this._formatDate(m), this._isToday(m) && y.classList.add("is-today"), this.range ? ((this._isSameDay(m, this.rangeStart) || this._isSameDay(m, this.rangeEnd)) && y.classList.add("is-selected"), this._isInRange(m) && y.classList.add("is-in-range")) : this._isSameDay(m, this.selectedDate) && y.classList.add("is-selected"), this._isDateDisabled(m) && (y.classList.add("is-disabled"), y.disabled = !0);
|
|
3259
3383
|
const _ = () => this._selectDate(m);
|
|
3260
|
-
y.addEventListener("click", _), y._dayClickHandler = _,
|
|
3384
|
+
y.addEventListener("click", _), y._dayClickHandler = _, h.appendChild(y);
|
|
3261
3385
|
}
|
|
3262
|
-
if (t.appendChild(
|
|
3386
|
+
if (t.appendChild(h), this.showToday) {
|
|
3263
3387
|
const p = document.createElement("div");
|
|
3264
3388
|
p.className = "ds-datepicker__footer";
|
|
3265
3389
|
const m = document.createElement("button");
|
|
@@ -3292,10 +3416,10 @@ class mr {
|
|
|
3292
3416
|
const l = document.createElement("div");
|
|
3293
3417
|
l.className = "ds-datepicker__years-grid";
|
|
3294
3418
|
for (let c = 0; c < 12; c++) {
|
|
3295
|
-
const
|
|
3296
|
-
|
|
3297
|
-
u.stopPropagation(), this.currentDate.setFullYear(
|
|
3298
|
-
}), l.appendChild(
|
|
3419
|
+
const h = s + c, d = document.createElement("button");
|
|
3420
|
+
d.className = "ds-datepicker__year-cell", d.type = "button", d.textContent = h, h === e && d.classList.add("is-selected"), d.addEventListener("click", (u) => {
|
|
3421
|
+
u.stopPropagation(), this.currentDate.setFullYear(h), this.viewMode = "months", this._renderCalendar();
|
|
3422
|
+
}), l.appendChild(d);
|
|
3299
3423
|
}
|
|
3300
3424
|
t.appendChild(l);
|
|
3301
3425
|
}
|
|
@@ -3318,10 +3442,10 @@ class mr {
|
|
|
3318
3442
|
}), s.appendChild(n), s.appendChild(r), s.appendChild(a), t.appendChild(s);
|
|
3319
3443
|
const o = document.createElement("div");
|
|
3320
3444
|
o.className = "ds-datepicker__months-grid", this.months.forEach((l, c) => {
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
}), o.appendChild(
|
|
3445
|
+
const h = document.createElement("button");
|
|
3446
|
+
h.className = "ds-datepicker__month-cell", h.type = "button", h.textContent = l, c === this.currentDate.getMonth() && h.classList.add("is-selected"), h.addEventListener("click", (d) => {
|
|
3447
|
+
d.stopPropagation(), this.currentDate.setMonth(c), this.viewMode = "days", this._renderCalendar();
|
|
3448
|
+
}), o.appendChild(h);
|
|
3325
3449
|
}), t.appendChild(o);
|
|
3326
3450
|
}
|
|
3327
3451
|
_selectDate(t) {
|
|
@@ -3381,20 +3505,20 @@ class mr {
|
|
|
3381
3505
|
}), this._documentClickHandler = null, this._resizeHandler = null, this._documentClickListener = null, this._resizeListener = null, this._iconClickHandler = null, this._inputClickHandler = null, this._endInputClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3382
3506
|
}
|
|
3383
3507
|
}
|
|
3384
|
-
function
|
|
3385
|
-
const e = new
|
|
3508
|
+
function Gt(i, t) {
|
|
3509
|
+
const e = new br(i, t);
|
|
3386
3510
|
e.init(), i._kupolaDatepicker = e;
|
|
3387
3511
|
}
|
|
3388
|
-
function
|
|
3512
|
+
function _o(i = document) {
|
|
3389
3513
|
i.querySelectorAll(".ds-datepicker").forEach((t) => {
|
|
3390
|
-
|
|
3514
|
+
Gt(t);
|
|
3391
3515
|
});
|
|
3392
3516
|
}
|
|
3393
|
-
function
|
|
3517
|
+
function xr(i) {
|
|
3394
3518
|
i._kupolaDatepicker && (i._kupolaDatepicker.destroy(), i._kupolaDatepicker = null);
|
|
3395
3519
|
}
|
|
3396
|
-
E.register("datepicker",
|
|
3397
|
-
class
|
|
3520
|
+
E.register("datepicker", Gt, xr);
|
|
3521
|
+
class Er {
|
|
3398
3522
|
constructor(t, e = {}) {
|
|
3399
3523
|
this.element = t, this.input = t.querySelector("input"), this.inputWrap = t.querySelector(".ds-timepicker__input-wrap"), this.panelEl = null, this.scope = `timepicker-${Math.random().toString(36).substr(2, 9)}`, this.showSeconds = e.showSeconds || t.hasAttribute("data-timepicker-seconds"), this.use12Hour = e.use12Hour || t.hasAttribute("data-timepicker-12h"), this.hourStep = e.hourStep || parseInt(t.getAttribute("data-timepicker-hour-step")) || 1, this.minuteStep = e.minuteStep || parseInt(t.getAttribute("data-timepicker-minute-step")) || 5, this.secondStep = e.secondStep || parseInt(t.getAttribute("data-timepicker-second-step")) || 5, this.minTime = e.minTime || t.getAttribute("data-timepicker-min") || null, this.maxTime = e.maxTime || t.getAttribute("data-timepicker-max") || null, this.disabledTime = e.disabledTime || null, this.placeholder = e.placeholder || t.getAttribute("data-timepicker-placeholder") || "", this.clearable = e.clearable || t.hasAttribute("data-timepicker-clear"), this.onChange = e.onChange || null, this.selectedHour = 12, this.selectedMinute = 0, this.selectedSecond = 0, this.isPM = !1, this._inputWrapClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null;
|
|
3400
3524
|
}
|
|
@@ -3576,20 +3700,20 @@ class _r {
|
|
|
3576
3700
|
this.element.__kupolaInitialized && (this.inputWrap && this._inputWrapClickHandler && this.inputWrap.removeEventListener("click", this._inputWrapClickHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this._resizeListener && this._resizeListener.unsubscribe ? this._resizeListener.unsubscribe() : this._resizeHandler && window.removeEventListener("resize", this._resizeHandler), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this.panelEl && (this.panelEl.remove(), this.panelEl = null), this._inputWrapClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3577
3701
|
}
|
|
3578
3702
|
}
|
|
3579
|
-
function
|
|
3580
|
-
const e = new
|
|
3703
|
+
function Zt(i, t) {
|
|
3704
|
+
const e = new Er(i, t);
|
|
3581
3705
|
e.init(), i._kupolaTimepicker = e;
|
|
3582
3706
|
}
|
|
3583
|
-
function
|
|
3707
|
+
function yo(i = document) {
|
|
3584
3708
|
i.querySelectorAll(".ds-timepicker").forEach((t) => {
|
|
3585
|
-
|
|
3709
|
+
Zt(t);
|
|
3586
3710
|
});
|
|
3587
3711
|
}
|
|
3588
|
-
function
|
|
3712
|
+
function kr(i) {
|
|
3589
3713
|
i._kupolaTimepicker && (i._kupolaTimepicker.destroy(), i._kupolaTimepicker = null);
|
|
3590
3714
|
}
|
|
3591
|
-
E.register("timepicker",
|
|
3592
|
-
class
|
|
3715
|
+
E.register("timepicker", Zt, kr);
|
|
3716
|
+
class wr {
|
|
3593
3717
|
constructor(t, e = {}) {
|
|
3594
3718
|
if (this.element = t, this.track = t.querySelector(".ds-slider__track"), this.fill = t.querySelector(".ds-slider__fill"), this.input = t.querySelector(".ds-slider__input"), this.valueEl = t.querySelector(".ds-slider__value"), this.range = e.range || t.hasAttribute("data-slider-range"), this.vertical = e.vertical || t.hasAttribute("data-slider-vertical"), this.disabled = e.disabled || t.hasAttribute("data-slider-disabled"), this.showTooltip = e.showTooltip !== !1, this.showMarks = e.marks || t.hasAttribute("data-slider-marks"), this.markStep = e.markStep || parseInt(t.getAttribute("data-slider-mark-step")) || 10, this.tooltipFormat = e.tooltipFormat || ((s) => s), this.onChange = e.onChange || null, this.onInput = e.onInput || null, this.inputEnd = t.querySelector(".ds-slider__input--end"), this.fillEnd = null, this.thumbStart = null, this.thumbEnd = null, this.tooltipStart = null, this.tooltipEnd = null, this.marksEl = null, this._listeners = [], this._isDragging = !1, this._activeThumb = null, !this.track || !this.fill)
|
|
3595
3719
|
throw new Error("Slider: Missing required elements");
|
|
@@ -3645,11 +3769,11 @@ class vr {
|
|
|
3645
3769
|
if (!this._isDragging) return;
|
|
3646
3770
|
a.preventDefault();
|
|
3647
3771
|
const o = a.touches ? a.touches[0].clientX : a.clientX, l = a.touches ? a.touches[0].clientY : a.clientY, c = this.track.getBoundingClientRect();
|
|
3648
|
-
let
|
|
3649
|
-
this.vertical ?
|
|
3650
|
-
const
|
|
3651
|
-
let p =
|
|
3652
|
-
if (p = Math.round(p / f) * f, p = Math.max(
|
|
3772
|
+
let h;
|
|
3773
|
+
this.vertical ? h = 1 - (l - c.top) / c.height : h = (o - c.left) / c.width, h = Math.max(0, Math.min(1, h));
|
|
3774
|
+
const d = parseFloat(this.input?.min || 0), u = parseFloat(this.input?.max || 100), f = parseFloat(this.input?.step || 1);
|
|
3775
|
+
let p = d + h * (u - d);
|
|
3776
|
+
if (p = Math.round(p / f) * f, p = Math.max(d, Math.min(u, p)), e === "start" && this.range && this.inputEnd) {
|
|
3653
3777
|
const m = parseFloat(this.inputEnd.value);
|
|
3654
3778
|
p > m && (p = m);
|
|
3655
3779
|
}
|
|
@@ -3657,7 +3781,7 @@ class vr {
|
|
|
3657
3781
|
const m = parseFloat(this.input.value);
|
|
3658
3782
|
p < m && (p = m);
|
|
3659
3783
|
}
|
|
3660
|
-
e === "start" && this.input ? this.input.value = p : e === "end" && this.inputEnd && (this.inputEnd.value = p), this.updateSlider(), this.onInput && this.onInput({ value: this.getValue(), percentage:
|
|
3784
|
+
e === "start" && this.input ? this.input.value = p : e === "end" && this.inputEnd && (this.inputEnd.value = p), this.updateSlider(), this.onInput && this.onInput({ value: this.getValue(), percentage: h });
|
|
3661
3785
|
}, r = () => {
|
|
3662
3786
|
this._isDragging = !1, this._activeThumb = null, this.element.classList.remove("is-dragging"), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), this.onChange && this.onChange({ value: this.getValue() }), this.element.dispatchEvent(new CustomEvent("kupola:slider-change", {
|
|
3663
3787
|
detail: { value: this.getValue() },
|
|
@@ -3677,8 +3801,8 @@ class vr {
|
|
|
3677
3801
|
const a = parseFloat(this.input?.min || 0), o = parseFloat(this.input?.max || 100), l = parseFloat(this.input?.step || 1);
|
|
3678
3802
|
let c = a + r * (o - a);
|
|
3679
3803
|
if (c = Math.round(c / l) * l, this.range) {
|
|
3680
|
-
const
|
|
3681
|
-
u <= f ? this.input && (this.input.value = Math.min(c,
|
|
3804
|
+
const h = parseFloat(this.input?.value || 0), d = parseFloat(this.inputEnd?.value || 0), u = Math.abs(c - h), f = Math.abs(c - d);
|
|
3805
|
+
u <= f ? this.input && (this.input.value = Math.min(c, d)) : this.inputEnd && (this.inputEnd.value = Math.max(c, h));
|
|
3682
3806
|
} else
|
|
3683
3807
|
this.input && (this.input.value = c);
|
|
3684
3808
|
this.updateSlider();
|
|
@@ -3737,26 +3861,26 @@ class vr {
|
|
|
3737
3861
|
this.disabled = !0, this.element.classList.add("is-disabled");
|
|
3738
3862
|
}
|
|
3739
3863
|
}
|
|
3740
|
-
function
|
|
3864
|
+
function Qt(i, t) {
|
|
3741
3865
|
if (!i.__kupolaInitialized)
|
|
3742
3866
|
try {
|
|
3743
|
-
const e = new
|
|
3867
|
+
const e = new wr(i, t);
|
|
3744
3868
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3745
3869
|
} catch (e) {
|
|
3746
3870
|
console.error("[Slider] Error initializing:", e);
|
|
3747
3871
|
}
|
|
3748
3872
|
}
|
|
3749
|
-
function
|
|
3873
|
+
function Cr(i) {
|
|
3750
3874
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3751
3875
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3752
3876
|
}
|
|
3753
|
-
function
|
|
3877
|
+
function vo() {
|
|
3754
3878
|
document.querySelectorAll(".ds-slider").forEach((i) => {
|
|
3755
|
-
|
|
3879
|
+
Qt(i);
|
|
3756
3880
|
});
|
|
3757
3881
|
}
|
|
3758
|
-
E.register("slider",
|
|
3759
|
-
class
|
|
3882
|
+
E.register("slider", Qt, Cr);
|
|
3883
|
+
class Sr {
|
|
3760
3884
|
constructor(t, e = {}) {
|
|
3761
3885
|
this.element = t, this.track = t.querySelector(".ds-carousel__track"), this.items = t.querySelectorAll(".ds-carousel__item"), this.prevBtn = t.querySelector(".ds-carousel__prev"), this.nextBtn = t.querySelector(".ds-carousel__next"), this.indicators = t.querySelectorAll(".ds-carousel__indicator"), this.autoBtn = t.querySelector(".ds-carousel__auto"), this.mode = e.mode || t.getAttribute("data-carousel-mode") || "slide", this.vertical = e.vertical || t.hasAttribute("data-carousel-vertical"), this.autoPlay = e.autoPlay !== !1, this.interval = e.interval || parseInt(t.getAttribute("data-carousel-interval")) || 3e3, this.transitionDuration = e.transitionDuration || parseInt(t.getAttribute("data-carousel-duration")) || 500, this.loop = e.loop !== !1, this.pauseOnHover = e.pauseOnHover !== !1, this.swipe = e.swipe !== !1, this.swipeThreshold = e.swipeThreshold || 50, this.keyboardNav = e.keyboardNav || t.hasAttribute("data-carousel-keyboard"), this.onChange = e.onChange || null, this.currentIndex = 0, this.totalItems = this.items.length, this.autoPlayTimer = null, this.isAutoPlaying = !1, this.isTransitioning = !1, this.touchStartX = 0, this.touchStartY = 0, this.touchDeltaX = 0, this.touchDeltaY = 0, this.isSwiping = !1, this._mouseEnterHandler = () => {
|
|
3762
3886
|
this.pauseOnHover && this.stopAutoPlay();
|
|
@@ -3837,22 +3961,22 @@ class xr {
|
|
|
3837
3961
|
}), this._touchStartHandler && this.element.removeEventListener("touchstart", this._touchStartHandler), this._touchMoveHandler && this.element.removeEventListener("touchmove", this._touchMoveHandler), this._touchEndHandler && this.element.removeEventListener("touchend", this._touchEndHandler), this._keydownHandler && this.element.removeEventListener("keydown", this._keydownHandler), this._prevClickHandler = null, this._nextClickHandler = null, this._autoClickHandler = null, this._indicatorClickHandlers = null;
|
|
3838
3962
|
}
|
|
3839
3963
|
}
|
|
3840
|
-
function
|
|
3964
|
+
function te(i, t) {
|
|
3841
3965
|
if (i.__kupolaInitialized) return;
|
|
3842
|
-
const e = new
|
|
3966
|
+
const e = new Sr(i, t);
|
|
3843
3967
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3844
3968
|
}
|
|
3845
|
-
function
|
|
3969
|
+
function bo(i = document) {
|
|
3846
3970
|
i.querySelectorAll(".ds-carousel").forEach((t) => {
|
|
3847
|
-
|
|
3971
|
+
te(t);
|
|
3848
3972
|
});
|
|
3849
3973
|
}
|
|
3850
|
-
function
|
|
3974
|
+
function Lr(i) {
|
|
3851
3975
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3852
3976
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3853
3977
|
}
|
|
3854
|
-
E.register("carousel",
|
|
3855
|
-
class
|
|
3978
|
+
E.register("carousel", te, Lr);
|
|
3979
|
+
class Dr {
|
|
3856
3980
|
constructor(t, e = {}) {
|
|
3857
3981
|
this.element = t, this.mask = t.querySelector(".ds-drawer-mask"), this.drawerEl = t.querySelector(".ds-drawer"), this.placement = e.placement || t.getAttribute("data-drawer-placement") || "right", this.width = e.width || t.getAttribute("data-drawer-width") || "400px", this.height = e.height || t.getAttribute("data-drawer-height") || "400px", this.escClose = e.escClose !== !1, this.maskClosable = e.maskClosable !== !1, this.showMask = e.showMask !== !1, this.onOpen = e.onOpen || null, this.onClose = e.onClose || null, this.onBeforeClose = e.onBeforeClose || null, this._keydownHandler = null, this._bindEvents();
|
|
3858
3982
|
}
|
|
@@ -3889,20 +4013,20 @@ class kr {
|
|
|
3889
4013
|
return this.drawerEl?.classList.contains("is-visible") || !1;
|
|
3890
4014
|
}
|
|
3891
4015
|
}
|
|
3892
|
-
function
|
|
4016
|
+
function at(i, t) {
|
|
3893
4017
|
if (i.__kupolaInitialized) return;
|
|
3894
|
-
const e = new
|
|
4018
|
+
const e = new Dr(i, t);
|
|
3895
4019
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3896
4020
|
}
|
|
3897
|
-
function
|
|
4021
|
+
function Hr(i) {
|
|
3898
4022
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3899
4023
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3900
4024
|
}
|
|
3901
|
-
function
|
|
4025
|
+
function xo() {
|
|
3902
4026
|
document.querySelectorAll("[data-drawer]").forEach((i) => {
|
|
3903
4027
|
i.addEventListener("click", () => {
|
|
3904
4028
|
const t = i.getAttribute("data-drawer"), e = document.getElementById(t);
|
|
3905
|
-
e && (
|
|
4029
|
+
e && (at(e, {
|
|
3906
4030
|
placement: i.getAttribute("data-drawer-placement") || "right",
|
|
3907
4031
|
width: i.getAttribute("data-drawer-width"),
|
|
3908
4032
|
height: i.getAttribute("data-drawer-height")
|
|
@@ -3910,11 +4034,11 @@ function ao() {
|
|
|
3910
4034
|
});
|
|
3911
4035
|
}), document.querySelectorAll(".ds-drawer-mask").forEach((i) => {
|
|
3912
4036
|
const t = i.parentElement;
|
|
3913
|
-
t &&
|
|
4037
|
+
t && at(t);
|
|
3914
4038
|
});
|
|
3915
4039
|
}
|
|
3916
|
-
E.register("drawer",
|
|
3917
|
-
class
|
|
4040
|
+
E.register("drawer", at, Hr);
|
|
4041
|
+
class $ {
|
|
3918
4042
|
constructor(t, e = {}) {
|
|
3919
4043
|
this.element = t, this.mask = t.querySelector(".ds-modal-mask"), this.modal = t.querySelector(".ds-modal"), this.closeBtn = t.querySelector(".ds-modal__close"), this.fullscreen = e.fullscreen || t.hasAttribute("data-modal-fullscreen"), this.closableOnMask = e.closableOnMask !== !1, this.escClose = e.escClose !== !1, this.width = e.width || t.getAttribute("data-modal-width") || "", this.center = e.center !== !1, this.onBeforeOpen = e.onBeforeOpen || null, this.onBeforeClose = e.onBeforeClose || null, this.onOpened = e.onOpened || null, this.onClosed = e.onClosed || null, this._isOpen = !1, this._keydownHandler = (s) => {
|
|
3920
4044
|
this.escClose && s.key === "Escape" && this.isVisible() && this.close();
|
|
@@ -3930,12 +4054,12 @@ class P {
|
|
|
3930
4054
|
this.mask.classList.add("ds-modal-fade-enter-active");
|
|
3931
4055
|
})), this.modal && (this.modal.classList.add("ds-modal-zoom-enter"), requestAnimationFrame(() => {
|
|
3932
4056
|
this.modal.classList.add("ds-modal-zoom-enter-active");
|
|
3933
|
-
})), this._isOpen || (
|
|
4057
|
+
})), this._isOpen || ($._openCount = ($._openCount || 0) + 1, this._isOpen = !0), document.body.style.overflow = "hidden", this.onOpened && setTimeout(() => this.onOpened(), 300), this.element.dispatchEvent(new CustomEvent("kupola:modal-open", { bubbles: !0 })));
|
|
3934
4058
|
}
|
|
3935
4059
|
close() {
|
|
3936
4060
|
this.onBeforeClose && this.onBeforeClose() === !1 || (this.mask && (this.mask.classList.remove("ds-modal-fade-enter-active"), this.mask.classList.add("ds-modal-fade-leave-active")), this.modal && (this.modal.classList.remove("ds-modal-zoom-enter-active"), this.modal.classList.add("ds-modal-zoom-leave-active")), setTimeout(() => {
|
|
3937
4061
|
this.mask && this.mask.classList.remove("is-visible", "ds-modal-fade-enter", "ds-modal-fade-leave-active"), this.modal && this.modal.classList.remove("ds-modal-zoom-enter", "ds-modal-zoom-leave-active");
|
|
3938
|
-
}, 300), this._isOpen && (
|
|
4062
|
+
}, 300), this._isOpen && ($._openCount = Math.max(0, ($._openCount || 0) - 1), this._isOpen = !1, $._openCount === 0 && (document.body.style.overflow = "")), this.onClosed && setTimeout(() => this.onClosed(), 300), this.element.dispatchEvent(new CustomEvent("kupola:modal-close", { bubbles: !0 })));
|
|
3939
4063
|
}
|
|
3940
4064
|
toggleFullscreen() {
|
|
3941
4065
|
this.fullscreen = !this.fullscreen, this.modal && this.modal.classList.toggle("ds-modal--fullscreen", this.fullscreen);
|
|
@@ -3944,11 +4068,11 @@ class P {
|
|
|
3944
4068
|
return this.mask && this.mask.classList.contains("is-visible");
|
|
3945
4069
|
}
|
|
3946
4070
|
destroy() {
|
|
3947
|
-
document.removeEventListener("keydown", this._keydownHandler), this.closeBtn && this.closeBtn.removeEventListener("click", this._closeBtnClickHandler), this.mask && this.mask.removeEventListener("click", this._maskClickHandler), this._isOpen && (
|
|
4071
|
+
document.removeEventListener("keydown", this._keydownHandler), this.closeBtn && this.closeBtn.removeEventListener("click", this._closeBtnClickHandler), this.mask && this.mask.removeEventListener("click", this._maskClickHandler), this._isOpen && ($._openCount = Math.max(0, ($._openCount || 0) - 1), this._isOpen = !1, $._openCount === 0 && (document.body.style.overflow = ""));
|
|
3948
4072
|
}
|
|
3949
4073
|
}
|
|
3950
|
-
|
|
3951
|
-
function
|
|
4074
|
+
$._openCount = 0;
|
|
4075
|
+
function ee(i = {}) {
|
|
3952
4076
|
const {
|
|
3953
4077
|
title: t = "",
|
|
3954
4078
|
content: e = "",
|
|
@@ -3959,22 +4083,23 @@ function Zt(i = {}) {
|
|
|
3959
4083
|
showConfirm: o = !0,
|
|
3960
4084
|
confirmText: l = "OK",
|
|
3961
4085
|
cancelText: c = "Cancel",
|
|
3962
|
-
confirmClass:
|
|
3963
|
-
cancelClass:
|
|
4086
|
+
confirmClass: h = "ds-btn--brand",
|
|
4087
|
+
cancelClass: d = "ds-btn--ghost",
|
|
3964
4088
|
closable: u = !0,
|
|
3965
4089
|
maskClosable: f = !0,
|
|
3966
4090
|
onConfirm: p,
|
|
3967
4091
|
onCancel: m,
|
|
3968
4092
|
onOpen: y,
|
|
3969
4093
|
onClose: _,
|
|
3970
|
-
footer:
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
${
|
|
3977
|
-
|
|
4094
|
+
footer: b = null,
|
|
4095
|
+
size: x = cr().defaultSize
|
|
4096
|
+
} = i, v = x === "sm" ? "ds-btn--sm" : x === "lg" ? "ds-btn--lg" : "", C = document.createElement("div");
|
|
4097
|
+
C.className = "ds-modal-container";
|
|
4098
|
+
let S = "";
|
|
4099
|
+
b !== null && (typeof b == "string" ? S = `<div class="ds-modal__footer">${b}</div>` : (o || a) && (S = `<div class="ds-modal__footer">
|
|
4100
|
+
${a ? `<button class="ds-btn ${v} ${d}" data-modal-cancel>${c}</button>` : ""}
|
|
4101
|
+
${o ? `<button class="ds-btn ${v} ${h}" data-modal-confirm>${l}</button>` : ""}
|
|
4102
|
+
</div>`)), C.innerHTML = `
|
|
3978
4103
|
<div class="ds-modal-mask">
|
|
3979
4104
|
<div class="ds-modal${r ? " ds-modal--fullscreen" : ""}" style="${r ? "" : "max-width: " + n}">
|
|
3980
4105
|
<div class="ds-modal__header">
|
|
@@ -3986,17 +4111,17 @@ function Zt(i = {}) {
|
|
|
3986
4111
|
</button>` : ""}
|
|
3987
4112
|
</div>
|
|
3988
4113
|
<div class="ds-modal__body"></div>
|
|
3989
|
-
${
|
|
4114
|
+
${S}
|
|
3990
4115
|
</div>
|
|
3991
4116
|
</div>
|
|
3992
|
-
`, document.body.appendChild(
|
|
3993
|
-
const w = new
|
|
3994
|
-
|
|
3995
|
-
const
|
|
3996
|
-
|
|
3997
|
-
const D =
|
|
3998
|
-
let
|
|
3999
|
-
const
|
|
4117
|
+
`, document.body.appendChild(C);
|
|
4118
|
+
const w = new $(C, { fullscreen: r, closableOnMask: f }), A = C.querySelector(".ds-modal__title");
|
|
4119
|
+
A && (A.textContent = t);
|
|
4120
|
+
const z = C.querySelector(".ds-modal__body");
|
|
4121
|
+
z && (s ? z.innerHTML = e : z.textContent = e);
|
|
4122
|
+
const D = C.querySelector("[data-modal-confirm]"), B = C.querySelector("[data-modal-cancel]");
|
|
4123
|
+
let ht = !1;
|
|
4124
|
+
const dt = async () => {
|
|
4000
4125
|
if (p) {
|
|
4001
4126
|
D.disabled = !0, D.classList.add("is-loading");
|
|
4002
4127
|
try {
|
|
@@ -4009,50 +4134,50 @@ function Zt(i = {}) {
|
|
|
4009
4134
|
return;
|
|
4010
4135
|
}
|
|
4011
4136
|
}
|
|
4012
|
-
|
|
4013
|
-
},
|
|
4137
|
+
ht = !0, w.close();
|
|
4138
|
+
}, ut = () => {
|
|
4014
4139
|
m && m(), w.close();
|
|
4015
4140
|
};
|
|
4016
|
-
D && D.addEventListener("click",
|
|
4017
|
-
const
|
|
4141
|
+
D && D.addEventListener("click", dt), B && B.addEventListener("click", ut);
|
|
4142
|
+
const Ee = () => {
|
|
4018
4143
|
setTimeout(() => {
|
|
4019
|
-
D && D.removeEventListener("click",
|
|
4144
|
+
D && D.removeEventListener("click", dt), B && B.removeEventListener("click", ut), w.destroy(), C.remove(), _ && _(ht);
|
|
4020
4145
|
}, 300);
|
|
4021
|
-
},
|
|
4146
|
+
}, ke = w.close.bind(w);
|
|
4022
4147
|
return w.close = () => {
|
|
4023
|
-
|
|
4148
|
+
ke(), Ee();
|
|
4024
4149
|
}, w.open(), y && setTimeout(() => y(), 50), w;
|
|
4025
4150
|
}
|
|
4026
|
-
function
|
|
4027
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4151
|
+
function Eo(i) {
|
|
4152
|
+
return typeof i == "string" && (i = { content: i }), ee({
|
|
4028
4153
|
...i,
|
|
4029
4154
|
showCancel: !0,
|
|
4030
4155
|
showConfirm: !0
|
|
4031
4156
|
});
|
|
4032
4157
|
}
|
|
4033
|
-
function
|
|
4034
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4158
|
+
function ko(i) {
|
|
4159
|
+
return typeof i == "string" && (i = { content: i }), ee({
|
|
4035
4160
|
...i,
|
|
4036
4161
|
showCancel: !1,
|
|
4037
4162
|
showConfirm: !0
|
|
4038
4163
|
});
|
|
4039
4164
|
}
|
|
4040
|
-
function
|
|
4165
|
+
function se(i) {
|
|
4041
4166
|
if (i.__kupolaInitialized) return;
|
|
4042
|
-
const t = new
|
|
4167
|
+
const t = new $(i);
|
|
4043
4168
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
4044
4169
|
}
|
|
4045
|
-
function
|
|
4170
|
+
function Mr(i) {
|
|
4046
4171
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4047
4172
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4048
4173
|
}
|
|
4049
|
-
function
|
|
4174
|
+
function wo() {
|
|
4050
4175
|
document.querySelectorAll(".ds-modal-container").forEach((i) => {
|
|
4051
|
-
|
|
4176
|
+
se(i);
|
|
4052
4177
|
});
|
|
4053
4178
|
}
|
|
4054
|
-
E.register("modal",
|
|
4055
|
-
class
|
|
4179
|
+
E.register("modal", se, Mr);
|
|
4180
|
+
class Co {
|
|
4056
4181
|
static normal(t = {}) {
|
|
4057
4182
|
return this._create({ type: "normal", ...t });
|
|
4058
4183
|
}
|
|
@@ -4103,7 +4228,7 @@ class ho {
|
|
|
4103
4228
|
</div>
|
|
4104
4229
|
</div>
|
|
4105
4230
|
`, document.body.appendChild(l), s && (l.querySelector(".ds-dialog__title").textContent = s), l.querySelector(".ds-dialog__content").textContent = n;
|
|
4106
|
-
const c = l.querySelector(".ds-modal-mask"),
|
|
4231
|
+
const c = l.querySelector(".ds-modal-mask"), h = l.querySelector("[data-dialog-confirm]"), d = l.querySelector("[data-dialog-cancel]"), u = function(_) {
|
|
4107
4232
|
_.key === "Escape" && (a && a(), y());
|
|
4108
4233
|
}, f = function(_) {
|
|
4109
4234
|
_.target === c && (a && a(), y());
|
|
@@ -4112,12 +4237,12 @@ class ho {
|
|
|
4112
4237
|
}, m = function() {
|
|
4113
4238
|
a && a(), y();
|
|
4114
4239
|
}, y = () => {
|
|
4115
|
-
c.classList.remove("is-visible"), document.body.style.overflow = "", document.removeEventListener("keydown", u), c.removeEventListener("click", f),
|
|
4240
|
+
c.classList.remove("is-visible"), document.body.style.overflow = "", document.removeEventListener("keydown", u), c.removeEventListener("click", f), h && h.removeEventListener("click", p), d && d.removeEventListener("click", m), setTimeout(() => l.remove(), 300);
|
|
4116
4241
|
};
|
|
4117
|
-
return c.classList.add("is-visible"), document.body.style.overflow = "hidden",
|
|
4242
|
+
return c.classList.add("is-visible"), document.body.style.overflow = "hidden", h && h.addEventListener("click", p), d && d.addEventListener("click", m), c.addEventListener("click", f), document.addEventListener("keydown", u), { close: y };
|
|
4118
4243
|
}
|
|
4119
4244
|
}
|
|
4120
|
-
const
|
|
4245
|
+
const So = {
|
|
4121
4246
|
normal: function(i) {
|
|
4122
4247
|
this.show({ ...i, type: "normal" });
|
|
4123
4248
|
},
|
|
@@ -4163,9 +4288,9 @@ const uo = {
|
|
|
4163
4288
|
}, n);
|
|
4164
4289
|
}
|
|
4165
4290
|
};
|
|
4166
|
-
function
|
|
4291
|
+
function Lo() {
|
|
4167
4292
|
}
|
|
4168
|
-
const
|
|
4293
|
+
const Do = {
|
|
4169
4294
|
normal: function(i, t = {}) {
|
|
4170
4295
|
this.show(i, "normal", t);
|
|
4171
4296
|
},
|
|
@@ -4203,12 +4328,12 @@ const fo = {
|
|
|
4203
4328
|
}, s);
|
|
4204
4329
|
}
|
|
4205
4330
|
};
|
|
4206
|
-
function
|
|
4331
|
+
function Ho() {
|
|
4207
4332
|
}
|
|
4208
|
-
function
|
|
4333
|
+
function yt(i) {
|
|
4209
4334
|
return i ? i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4210
4335
|
}
|
|
4211
|
-
class
|
|
4336
|
+
class Ir {
|
|
4212
4337
|
constructor(t) {
|
|
4213
4338
|
this.element = t, this.dropzone = t.querySelector(".ds-fileupload__dropzone"), this.input = t.querySelector(".ds-fileupload__input"), this.list = t.querySelector(".ds-fileupload__list"), this.progress = t.querySelector(".ds-fileupload__preview"), this.files = [], this.maxSize = parseInt(t.getAttribute("data-max-size")) || 0, this.maxCount = parseInt(t.getAttribute("data-max-count")) || 0, this._listeners = [], this.init();
|
|
4214
4339
|
}
|
|
@@ -4264,7 +4389,7 @@ class Sr {
|
|
|
4264
4389
|
<div class="ds-fileupload__icon" style="width: 24px; height: 24px; border-radius: 4px;">
|
|
4265
4390
|
${s}
|
|
4266
4391
|
</div>
|
|
4267
|
-
<span class="ds-fileupload__filename">${this.truncateFilename(
|
|
4392
|
+
<span class="ds-fileupload__filename">${this.truncateFilename(yt(t.name))}</span>
|
|
4268
4393
|
<span class="ds-fileupload__size">${this.formatSize(t.size)}</span>
|
|
4269
4394
|
<button class="ds-fileupload__remove" type="button" aria-label="Remove file">
|
|
4270
4395
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -4316,7 +4441,7 @@ class Sr {
|
|
|
4316
4441
|
e.onload = (s) => {
|
|
4317
4442
|
const n = document.createElement("div");
|
|
4318
4443
|
n.className = "ds-fileupload__preview-item", n.innerHTML = `
|
|
4319
|
-
<img src="${s.target.result}" alt="${
|
|
4444
|
+
<img src="${s.target.result}" alt="${yt(t.name)}">
|
|
4320
4445
|
<button class="ds-fileupload__preview-remove" type="button" aria-label="Remove preview">
|
|
4321
4446
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
4322
4447
|
<path d="M18 6L6 18"/>
|
|
@@ -4366,22 +4491,22 @@ class Sr {
|
|
|
4366
4491
|
}), this._listeners = null, this.files = [], this.dropzone = null, this.input = null, this.list = null, this.progress = null, this.preview = null, this.element = null;
|
|
4367
4492
|
}
|
|
4368
4493
|
}
|
|
4369
|
-
function
|
|
4494
|
+
function ie(i) {
|
|
4370
4495
|
if (i.__kupolaInitialized) return;
|
|
4371
|
-
const t = new
|
|
4496
|
+
const t = new Ir(i);
|
|
4372
4497
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
4373
4498
|
}
|
|
4374
|
-
function
|
|
4499
|
+
function Tr(i) {
|
|
4375
4500
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4376
4501
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4377
4502
|
}
|
|
4378
|
-
function
|
|
4503
|
+
function Mo() {
|
|
4379
4504
|
document.querySelectorAll(".ds-fileupload").forEach((i) => {
|
|
4380
|
-
|
|
4505
|
+
ie(i);
|
|
4381
4506
|
});
|
|
4382
4507
|
}
|
|
4383
|
-
E.register("fileupload",
|
|
4384
|
-
class
|
|
4508
|
+
E.register("fileupload", ie, Tr);
|
|
4509
|
+
class Ar {
|
|
4385
4510
|
constructor(t, e = {}) {
|
|
4386
4511
|
this.element = t, this.headers = [], this._listeners = [], this.accordion = e.accordion || t.hasAttribute("data-collapse-accordion"), this.animationDuration = e.animationDuration || parseInt(t.getAttribute("data-collapse-duration")) || 300, this.disabledItems = e.disabledItems || [], this.defaultExpanded = e.defaultExpanded || [], this._init();
|
|
4387
4512
|
}
|
|
@@ -4398,8 +4523,8 @@ class Dr {
|
|
|
4398
4523
|
const l = () => {
|
|
4399
4524
|
if (a) return;
|
|
4400
4525
|
const c = n.classList.contains("is-active");
|
|
4401
|
-
this.accordion && !c && this.headers.forEach((
|
|
4402
|
-
|
|
4526
|
+
this.accordion && !c && this.headers.forEach((h, d) => {
|
|
4527
|
+
d !== s && h.item.classList.contains("is-active") && this._collapseItem(h);
|
|
4403
4528
|
}), c ? this._collapseItem({ item: n, content: r }) : this._expandItem({ item: n, content: r }), this.element.dispatchEvent(new CustomEvent("kupola:collapse-toggle", {
|
|
4404
4529
|
detail: { index: s, expanded: !c, item: n },
|
|
4405
4530
|
bubbles: !0
|
|
@@ -4463,22 +4588,22 @@ class Dr {
|
|
|
4463
4588
|
this.headers[t] && (this.headers[t].isDisabled = !1, this.headers[t].item.classList.remove("is-disabled"));
|
|
4464
4589
|
}
|
|
4465
4590
|
}
|
|
4466
|
-
function
|
|
4591
|
+
function ne(i, t) {
|
|
4467
4592
|
if (i.__kupolaInitialized) return;
|
|
4468
|
-
const e = new
|
|
4593
|
+
const e = new Ar(i, t);
|
|
4469
4594
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4470
4595
|
}
|
|
4471
|
-
function
|
|
4596
|
+
function zr(i) {
|
|
4472
4597
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4473
4598
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4474
4599
|
}
|
|
4475
|
-
function
|
|
4600
|
+
function Io() {
|
|
4476
4601
|
document.querySelectorAll(".ds-collapse").forEach((i) => {
|
|
4477
|
-
|
|
4602
|
+
ne(i);
|
|
4478
4603
|
});
|
|
4479
4604
|
}
|
|
4480
|
-
E.register("collapse",
|
|
4481
|
-
class
|
|
4605
|
+
E.register("collapse", ne, zr);
|
|
4606
|
+
class Pr {
|
|
4482
4607
|
constructor(t, e = {}) {
|
|
4483
4608
|
this.element = t, this.trigger = t.querySelector(".ds-color-picker__trigger"), this.panel = t.querySelector(".ds-color-picker__panel"), this.valueSpan = t.querySelector(".ds-color-picker__value"), this.customInput = t.querySelector(".ds-color-picker__input"), this.scope = `colorpicker-${Math.random().toString(36).substr(2, 9)}`, this.options = e, this.value = e.value || "#007bff", this.showAlpha = e.showAlpha !== !1, this.mode = e.mode || "hex", this.previousColors = e.previousColors || this._getStoredColors(), this.previousColorsLimit = e.previousColorsLimit || 12, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._colorClickHandler = null, this._inputInputHandler = null, this._alphaChangeHandler = null, this._modeChangeHandler = null, this._hueChangeHandler = null, this._saturationChangeHandler = null, this._valueChangeHandler = null, this.hue = 210, this.saturation = 100, this.brightness = 50, this.alpha = 100, this._colorStringToHSB(this.value);
|
|
4484
4609
|
}
|
|
@@ -4502,9 +4627,9 @@ class Mr {
|
|
|
4502
4627
|
}
|
|
4503
4628
|
_colorStringToHSB(t) {
|
|
4504
4629
|
const e = t.replace(/^#/, ""), s = parseInt(e.substring(0, 2), 16) / 255, n = parseInt(e.substring(2, 4), 16) / 255, r = parseInt(e.substring(4, 6), 16) / 255, a = e.length === 8 ? parseInt(e.substring(6, 8), 16) / 255 : 1, o = Math.max(s, n, r), l = Math.min(s, n, r);
|
|
4505
|
-
let c = 0,
|
|
4630
|
+
let c = 0, h = 0, d = o;
|
|
4506
4631
|
const u = o - l;
|
|
4507
|
-
if (
|
|
4632
|
+
if (h = o === 0 ? 0 : u / o, o !== l)
|
|
4508
4633
|
switch (o) {
|
|
4509
4634
|
case s:
|
|
4510
4635
|
c = ((n - r) / u + (n < r ? 6 : 0)) / 6;
|
|
@@ -4516,17 +4641,17 @@ class Mr {
|
|
|
4516
4641
|
c = ((s - n) / u + 4) / 6;
|
|
4517
4642
|
break;
|
|
4518
4643
|
}
|
|
4519
|
-
this.hue = Math.round(c * 360), this.saturation = Math.round(
|
|
4644
|
+
this.hue = Math.round(c * 360), this.saturation = Math.round(h * 100), this.brightness = Math.round(d * 100), this.alpha = Math.round(a * 100);
|
|
4520
4645
|
}
|
|
4521
4646
|
_HSBToColorString(t, e, s, n = 1) {
|
|
4522
4647
|
e /= 100, s /= 100, n /= 100;
|
|
4523
|
-
const r = (
|
|
4648
|
+
const r = (d) => (d + t / 60) % 6, a = (d) => s * (1 - e * Math.max(0, Math.min(r(d), 4 - r(d), 1))), o = Math.round(a(5) * 255), l = Math.round(a(3) * 255), c = Math.round(a(1) * 255);
|
|
4524
4649
|
if (this.mode === "rgb")
|
|
4525
4650
|
return n < 1 ? `rgba(${o}, ${l}, ${c}, ${n.toFixed(2)})` : `rgb(${o}, ${l}, ${c})`;
|
|
4526
4651
|
if (this.mode === "hsl")
|
|
4527
4652
|
return n < 1 ? `hsla(${t}, ${Math.round(e * 100)}%, ${Math.round(s * 100)}%, ${n.toFixed(2)})` : `hsl(${t}, ${Math.round(e * 100)}%, ${Math.round(s * 100)}%)`;
|
|
4528
|
-
const
|
|
4529
|
-
return n < 1 ?
|
|
4653
|
+
const h = `#${o.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${c.toString(16).padStart(2, "0")}`;
|
|
4654
|
+
return n < 1 ? h + Math.round(n * 255).toString(16).padStart(2, "0") : h;
|
|
4530
4655
|
}
|
|
4531
4656
|
_renderPreviousColors() {
|
|
4532
4657
|
const t = this.panel.querySelector(".ds-color-picker__previous");
|
|
@@ -4643,20 +4768,20 @@ class Mr {
|
|
|
4643
4768
|
}), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._colorClickHandler = null, this._inputInputHandler = null, this._alphaChangeHandler = null, this._modeChangeHandler = null, this._hueChangeHandler = null, this._saturationChangeHandler = null, this._valueChangeHandler = null, this.element.__kupolaInitialized = !1;
|
|
4644
4769
|
}
|
|
4645
4770
|
}
|
|
4646
|
-
function
|
|
4647
|
-
const e = new
|
|
4771
|
+
function re(i, t) {
|
|
4772
|
+
const e = new Pr(i, t);
|
|
4648
4773
|
e.init(), i._kupolaColorPicker = e;
|
|
4649
4774
|
}
|
|
4650
|
-
function
|
|
4775
|
+
function To(i = document) {
|
|
4651
4776
|
i.querySelectorAll(".ds-color-picker").forEach((t) => {
|
|
4652
|
-
|
|
4777
|
+
re(t);
|
|
4653
4778
|
});
|
|
4654
4779
|
}
|
|
4655
|
-
function
|
|
4780
|
+
function $r(i) {
|
|
4656
4781
|
i._kupolaColorPicker && (i._kupolaColorPicker.destroy(), i._kupolaColorPicker = null);
|
|
4657
4782
|
}
|
|
4658
|
-
E.register("color-picker",
|
|
4659
|
-
class
|
|
4783
|
+
E.register("color-picker", re, $r);
|
|
4784
|
+
class qr {
|
|
4660
4785
|
constructor(t, e = {}) {
|
|
4661
4786
|
if (this.element = t, this.titleEl = t.querySelector(".ds-calendar__title"), this.daysEl = t.querySelector(".ds-calendar__days"), this.prevBtn = t.querySelector(".ds-calendar__nav--prev"), this.nextBtn = t.querySelector(".ds-calendar__nav--next"), this.todayBtn = t.querySelector(".ds-calendar__nav--today"), this._listeners = [], !this.titleEl || !this.daysEl)
|
|
4662
4787
|
throw new Error("Calendar: Missing required elements");
|
|
@@ -4736,22 +4861,22 @@ class Tr {
|
|
|
4736
4861
|
for (let o = 1; o <= n; o++) {
|
|
4737
4862
|
const l = new Date(t, e, o), c = document.createElement("button");
|
|
4738
4863
|
c.className = "ds-calendar__day", c.textContent = o;
|
|
4739
|
-
const
|
|
4740
|
-
|
|
4741
|
-
const
|
|
4742
|
-
if (
|
|
4864
|
+
const h = this._formatDate(l);
|
|
4865
|
+
h === a && c.classList.add("is-today"), this._isSameDay(l, this.selectedDate) && c.classList.add("is-selected"), this.isRangeMode && (this._isRangeStart(l) && c.classList.add("is-range-start"), this._isRangeEnd(l) && c.classList.add("is-range-end"), this._isDateInRange(l) && c.classList.add("is-in-range"));
|
|
4866
|
+
const d = this._getEventsForDate(l);
|
|
4867
|
+
if (d.length > 0) {
|
|
4743
4868
|
c.classList.add("has-events");
|
|
4744
4869
|
const f = document.createElement("span");
|
|
4745
|
-
f.className = "ds-calendar__day-event", f.style.backgroundColor =
|
|
4870
|
+
f.className = "ds-calendar__day-event", f.style.backgroundColor = d[0].color || "#007bff", c.appendChild(f);
|
|
4746
4871
|
}
|
|
4747
4872
|
const u = () => {
|
|
4748
4873
|
this.element.querySelectorAll(".ds-calendar__day").forEach((f) => f.classList.remove("is-selected")), c.classList.add("is-selected"), this.isRangeMode ? !this.rangeStart || this.rangeEnd && !this._isSameDay(l, this.rangeEnd) ? (this.rangeStart = l, this.rangeEnd = null) : this.rangeStart && !this.rangeEnd && (l < this.rangeStart ? (this.rangeEnd = this.rangeStart, this.rangeStart = l) : this.rangeEnd = l, this.onRangeSelect && this.onRangeSelect({ start: this.rangeStart, end: this.rangeEnd }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-range-select", {
|
|
4749
4874
|
detail: { start: this.rangeStart, end: this.rangeEnd },
|
|
4750
4875
|
bubbles: !0
|
|
4751
|
-
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr:
|
|
4752
|
-
detail: { date: l, dateStr:
|
|
4876
|
+
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr: h }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-select", {
|
|
4877
|
+
detail: { date: l, dateStr: h },
|
|
4753
4878
|
bubbles: !0
|
|
4754
|
-
}))),
|
|
4879
|
+
}))), d.forEach((f) => {
|
|
4755
4880
|
this.onEventClick && this.onEventClick(f, l);
|
|
4756
4881
|
}), this.render();
|
|
4757
4882
|
};
|
|
@@ -4763,31 +4888,31 @@ class Tr {
|
|
|
4763
4888
|
a.setDate(n.getDate() + 6), this.titleEl.textContent = `${this.i18n.shortMonths[r.getMonth()]} ${r.getDate()} - ${this.i18n.shortMonths[a.getMonth()]} ${a.getDate()} ${t}`, this.daysEl.innerHTML = "";
|
|
4764
4889
|
const o = /* @__PURE__ */ new Date(), l = this._formatDate(o);
|
|
4765
4890
|
for (let c = 0; c < 7; c++) {
|
|
4766
|
-
const
|
|
4767
|
-
|
|
4768
|
-
const
|
|
4769
|
-
|
|
4891
|
+
const h = new Date(n);
|
|
4892
|
+
h.setDate(n.getDate() + c);
|
|
4893
|
+
const d = document.createElement("button");
|
|
4894
|
+
d.className = "ds-calendar__day ds-calendar__day--week";
|
|
4770
4895
|
const u = document.createElement("span");
|
|
4771
|
-
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[
|
|
4896
|
+
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[h.getDay()], d.appendChild(u);
|
|
4772
4897
|
const f = document.createElement("span");
|
|
4773
|
-
f.className = "ds-calendar__day-number", f.textContent =
|
|
4774
|
-
const p = this._formatDate(
|
|
4775
|
-
p === l &&
|
|
4776
|
-
const m = this._getEventsForDate(
|
|
4898
|
+
f.className = "ds-calendar__day-number", f.textContent = h.getDate(), d.appendChild(f);
|
|
4899
|
+
const p = this._formatDate(h);
|
|
4900
|
+
p === l && d.classList.add("is-today"), this._isSameDay(h, this.selectedDate) && d.classList.add("is-selected");
|
|
4901
|
+
const m = this._getEventsForDate(h);
|
|
4777
4902
|
if (m.length > 0) {
|
|
4778
4903
|
const _ = document.createElement("span");
|
|
4779
|
-
_.className = "ds-calendar__day-events", m.slice(0, 3).forEach((
|
|
4780
|
-
const
|
|
4781
|
-
|
|
4782
|
-
}),
|
|
4904
|
+
_.className = "ds-calendar__day-events", m.slice(0, 3).forEach((b) => {
|
|
4905
|
+
const x = document.createElement("span");
|
|
4906
|
+
x.className = "ds-calendar__day-event", x.style.backgroundColor = b.color || "#007bff", _.appendChild(x);
|
|
4907
|
+
}), d.appendChild(_);
|
|
4783
4908
|
}
|
|
4784
4909
|
const y = () => {
|
|
4785
|
-
this.element.querySelectorAll(".ds-calendar__day").forEach((_) => _.classList.remove("is-selected")),
|
|
4786
|
-
detail: { date:
|
|
4910
|
+
this.element.querySelectorAll(".ds-calendar__day").forEach((_) => _.classList.remove("is-selected")), d.classList.add("is-selected"), this.selectedDate = h, this.onSelect && this.onSelect({ date: h, dateStr: p }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-select", {
|
|
4911
|
+
detail: { date: h, dateStr: p },
|
|
4787
4912
|
bubbles: !0
|
|
4788
4913
|
})), this.render();
|
|
4789
4914
|
};
|
|
4790
|
-
|
|
4915
|
+
d.addEventListener("click", y), this._listeners.push({ el: d, event: "click", handler: y }), this.daysEl.appendChild(d);
|
|
4791
4916
|
}
|
|
4792
4917
|
}
|
|
4793
4918
|
destroy() {
|
|
@@ -4853,26 +4978,26 @@ class Tr {
|
|
|
4853
4978
|
this.isRangeMode = !this.isRangeMode, this.rangeStart = null, this.rangeEnd = null, this.render(), this._emitChange();
|
|
4854
4979
|
}
|
|
4855
4980
|
}
|
|
4856
|
-
function
|
|
4981
|
+
function ae(i, t) {
|
|
4857
4982
|
if (!i.__kupolaInitialized)
|
|
4858
4983
|
try {
|
|
4859
|
-
const e = new
|
|
4984
|
+
const e = new qr(i, t);
|
|
4860
4985
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4861
4986
|
} catch (e) {
|
|
4862
4987
|
console.error("[Calendar] Error initializing:", e);
|
|
4863
4988
|
}
|
|
4864
4989
|
}
|
|
4865
|
-
function
|
|
4990
|
+
function Br(i) {
|
|
4866
4991
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4867
4992
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4868
4993
|
}
|
|
4869
|
-
function
|
|
4994
|
+
function Ao() {
|
|
4870
4995
|
document.querySelectorAll(".ds-calendar").forEach((i) => {
|
|
4871
|
-
|
|
4996
|
+
ae(i);
|
|
4872
4997
|
});
|
|
4873
4998
|
}
|
|
4874
|
-
E.register("calendar",
|
|
4875
|
-
class
|
|
4999
|
+
E.register("calendar", ae, Br);
|
|
5000
|
+
class Fr {
|
|
4876
5001
|
constructor(t, e = {}) {
|
|
4877
5002
|
this.element = t, this.input = t.querySelector(".ds-dynamic-tags__input"), this._listeners = [], this.maxCount = e.maxCount || parseInt(t.getAttribute("data-dynamic-tags-max")) || 1 / 0, this.allowDuplicates = e.allowDuplicates !== !1, this.color = e.color || t.getAttribute("data-dynamic-tags-color") || "default", this.init();
|
|
4878
5003
|
}
|
|
@@ -5018,22 +5143,22 @@ class zr {
|
|
|
5018
5143
|
}), this._listeners = null, this.input = null, this.element = null;
|
|
5019
5144
|
}
|
|
5020
5145
|
}
|
|
5021
|
-
function
|
|
5146
|
+
function oe(i, t) {
|
|
5022
5147
|
if (i.__kupolaInitialized) return;
|
|
5023
|
-
const e = new
|
|
5148
|
+
const e = new Fr(i, t);
|
|
5024
5149
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5025
5150
|
}
|
|
5026
|
-
function
|
|
5151
|
+
function Nr(i) {
|
|
5027
5152
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5028
5153
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5029
5154
|
}
|
|
5030
|
-
function
|
|
5155
|
+
function zo() {
|
|
5031
5156
|
document.querySelectorAll(".ds-dynamic-tags").forEach((i) => {
|
|
5032
|
-
|
|
5157
|
+
oe(i);
|
|
5033
5158
|
});
|
|
5034
5159
|
}
|
|
5035
|
-
E.register("dynamic-tags",
|
|
5036
|
-
class
|
|
5160
|
+
E.register("dynamic-tags", oe, Nr);
|
|
5161
|
+
class le {
|
|
5037
5162
|
constructor(t = {}) {
|
|
5038
5163
|
this.images = t.images || [], this.currentIndex = t.currentIndex || 0, this.overlay = null, this.closeHandler = this.close.bind(this), this.keyHandler = this.handleKeydown.bind(this), this.clickHandler = this.handleOverlayClick.bind(this), this.zoom = 1, this.rotation = 0, this.zoomStep = t.zoomStep || 0.2, this.minZoom = t.minZoom || 0.5, this.maxZoom = t.maxZoom || 3, this.init();
|
|
5039
5164
|
}
|
|
@@ -5225,18 +5350,18 @@ class re {
|
|
|
5225
5350
|
}
|
|
5226
5351
|
}
|
|
5227
5352
|
let V = null;
|
|
5228
|
-
function
|
|
5229
|
-
V || (V = new
|
|
5353
|
+
function Po() {
|
|
5354
|
+
V || (V = new le()), document.querySelectorAll("[data-image-preview]").forEach((i) => {
|
|
5230
5355
|
i.addEventListener("click", () => {
|
|
5231
5356
|
const t = JSON.parse(i.getAttribute("data-image-preview")), e = parseInt(i.getAttribute("data-image-index")) || 0;
|
|
5232
5357
|
V.show(t, e);
|
|
5233
5358
|
});
|
|
5234
5359
|
});
|
|
5235
5360
|
}
|
|
5236
|
-
function
|
|
5237
|
-
V || (V = new
|
|
5361
|
+
function $o(i, t = 0) {
|
|
5362
|
+
V || (V = new le()), V.show(i, t);
|
|
5238
5363
|
}
|
|
5239
|
-
class
|
|
5364
|
+
class Or {
|
|
5240
5365
|
constructor(t, e = {}) {
|
|
5241
5366
|
this.element = t, this.closeBtn = t.querySelector(".ds-tag__close"), this.checkbox = t.querySelector(".ds-tag__checkbox"), this.editInput = t.querySelector(".ds-tag__input"), this._listeners = [], this.color = e.color || t.getAttribute("data-tag-color") || "default", this.size = e.size || t.getAttribute("data-tag-size") || "default", this.checkable = e.checkable || t.hasAttribute("data-tag-checkable"), this.checked = e.checked || t.hasAttribute("data-tag-checked"), this.editable = e.editable || t.hasAttribute("data-tag-editable"), this.maxLength = e.maxLength || parseInt(t.getAttribute("data-tag-maxlength")) || 50, this.init();
|
|
5242
5367
|
}
|
|
@@ -5366,22 +5491,22 @@ class $r {
|
|
|
5366
5491
|
}), this._listeners = [], this.closeBtn = null, this.checkbox = null, this.editInput = null, this.element = null;
|
|
5367
5492
|
}
|
|
5368
5493
|
}
|
|
5369
|
-
function
|
|
5494
|
+
function ce(i, t) {
|
|
5370
5495
|
if (i.__kupolaInitialized) return;
|
|
5371
|
-
const e = new
|
|
5496
|
+
const e = new Or(i, t);
|
|
5372
5497
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5373
5498
|
}
|
|
5374
|
-
function
|
|
5499
|
+
function Rr(i) {
|
|
5375
5500
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5376
5501
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5377
5502
|
}
|
|
5378
|
-
function
|
|
5503
|
+
function qo() {
|
|
5379
5504
|
document.querySelectorAll(".ds-tag").forEach((i) => {
|
|
5380
|
-
|
|
5505
|
+
ce(i);
|
|
5381
5506
|
});
|
|
5382
5507
|
}
|
|
5383
|
-
E.register("tag",
|
|
5384
|
-
class
|
|
5508
|
+
E.register("tag", ce, Rr);
|
|
5509
|
+
class Vr {
|
|
5385
5510
|
constructor(t) {
|
|
5386
5511
|
this.element = t, this.valueElement = t.querySelector(".ds-statcard__value"), this.progressFill = t.querySelector(".ds-statcard__progress-fill"), this.animated = !1, this._observer = null, this.init();
|
|
5387
5512
|
}
|
|
@@ -5396,8 +5521,8 @@ class Br {
|
|
|
5396
5521
|
if (!this.valueElement) return;
|
|
5397
5522
|
const t = this.valueElement.textContent, e = t.match(/[\d.,]+/);
|
|
5398
5523
|
if (!e) return;
|
|
5399
|
-
const s = parseFloat(e[0].replace(",", "")), n = t.substring(0, e.index), r = t.substring(e.index + e[0].length), a = 1500, o = performance.now(), l = 0, c = (
|
|
5400
|
-
const
|
|
5524
|
+
const s = parseFloat(e[0].replace(",", "")), n = t.substring(0, e.index), r = t.substring(e.index + e[0].length), a = 1500, o = performance.now(), l = 0, c = (h) => {
|
|
5525
|
+
const d = h - o, u = Math.min(d / a, 1), f = 1 - Math.pow(1 - u, 3), p = l + (s - l) * f;
|
|
5401
5526
|
let m;
|
|
5402
5527
|
s >= 1e6 ? m = (p / 1e6).toFixed(1) + "M" : s >= 1e3 ? m = (p / 1e3).toFixed(1) + "K" : Number.isInteger(s) ? m = Math.floor(p).toLocaleString() : m = p.toFixed(2), this.valueElement.textContent = n + m + r, u < 1 && requestAnimationFrame(c);
|
|
5403
5528
|
};
|
|
@@ -5415,18 +5540,18 @@ class Br {
|
|
|
5415
5540
|
this.valueElement.textContent = t;
|
|
5416
5541
|
return;
|
|
5417
5542
|
}
|
|
5418
|
-
const a = n.substring(0, r.index), o = n.substring(r.index + r[0].length), l = parseFloat(r[0].replace(",", "")), c = parseFloat(t),
|
|
5419
|
-
const f = u -
|
|
5543
|
+
const a = n.substring(0, r.index), o = n.substring(r.index + r[0].length), l = parseFloat(r[0].replace(",", "")), c = parseFloat(t), h = performance.now(), d = (u) => {
|
|
5544
|
+
const f = u - h, p = Math.min(f / s, 1), m = 1 - Math.pow(1 - p, 3), y = l + (c - l) * m;
|
|
5420
5545
|
let _;
|
|
5421
|
-
c >= 1e6 ? _ = (y / 1e6).toFixed(1) + "M" : c >= 1e3 ? _ = (y / 1e3).toFixed(1) + "K" : Number.isInteger(c) ? _ = Math.floor(y).toLocaleString() : _ = y.toFixed(2), this.valueElement.textContent = a + _ + o, p < 1 && requestAnimationFrame(
|
|
5546
|
+
c >= 1e6 ? _ = (y / 1e6).toFixed(1) + "M" : c >= 1e3 ? _ = (y / 1e3).toFixed(1) + "K" : Number.isInteger(c) ? _ = Math.floor(y).toLocaleString() : _ = y.toFixed(2), this.valueElement.textContent = a + _ + o, p < 1 && requestAnimationFrame(d);
|
|
5422
5547
|
};
|
|
5423
|
-
requestAnimationFrame(
|
|
5548
|
+
requestAnimationFrame(d);
|
|
5424
5549
|
}
|
|
5425
5550
|
updateProgress(t, e = {}) {
|
|
5426
5551
|
if (!this.progressFill) return;
|
|
5427
5552
|
const s = e.duration || 600, n = parseFloat(this.progressFill.style.width || "0"), r = Math.min(Math.max(t, 0), 100), a = performance.now(), o = (l) => {
|
|
5428
|
-
const c = l - a,
|
|
5429
|
-
this.progressFill.style.width = u + "%",
|
|
5553
|
+
const c = l - a, h = Math.min(c / s, 1), d = 1 - Math.pow(1 - h, 3), u = n + (r - n) * d;
|
|
5554
|
+
this.progressFill.style.width = u + "%", h < 1 && requestAnimationFrame(o);
|
|
5430
5555
|
};
|
|
5431
5556
|
requestAnimationFrame(o);
|
|
5432
5557
|
}
|
|
@@ -5441,22 +5566,22 @@ class Br {
|
|
|
5441
5566
|
this._observer && (this._observer.disconnect(), this._observer = null), this.animated = !1, this.valueElement = null, this.progressFill = null, this.element = null;
|
|
5442
5567
|
}
|
|
5443
5568
|
}
|
|
5444
|
-
function
|
|
5569
|
+
function he(i) {
|
|
5445
5570
|
if (i.__kupolaInitialized) return;
|
|
5446
|
-
const t = new
|
|
5571
|
+
const t = new Vr(i);
|
|
5447
5572
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
5448
5573
|
}
|
|
5449
|
-
function
|
|
5574
|
+
function Kr(i) {
|
|
5450
5575
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5451
5576
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5452
5577
|
}
|
|
5453
|
-
function
|
|
5578
|
+
function Bo() {
|
|
5454
5579
|
document.querySelectorAll(".ds-statcard").forEach((i) => {
|
|
5455
|
-
|
|
5580
|
+
he(i);
|
|
5456
5581
|
});
|
|
5457
5582
|
}
|
|
5458
|
-
E.register("statcard",
|
|
5459
|
-
class
|
|
5583
|
+
E.register("statcard", he, Kr);
|
|
5584
|
+
class Wr {
|
|
5460
5585
|
constructor(t, e = {}) {
|
|
5461
5586
|
this.element = t, this.data = e.data || [], this.startDate = e.startDate || this.getOneYearAgo(), this.endDate = e.endDate || /* @__PURE__ */ new Date(), this.cellSize = e.cellSize || 14, this.onCellClick = e.onCellClick || null, this.tooltip = null, this.baseColor = e.color || t.getAttribute("data-color") || "#22c55e", this._listeners = [], this.init();
|
|
5462
5587
|
}
|
|
@@ -5527,48 +5652,48 @@ class Nr {
|
|
|
5527
5652
|
s.push(new Date(_)), (_.getDay() === 6 || _.getTime() === this.endDate.getTime()) && (e.push(s), s = []);
|
|
5528
5653
|
const a = e.length, o = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16, l = a * o, c = document.createElement("div");
|
|
5529
5654
|
c.className = "ds-heatmap__container";
|
|
5530
|
-
const d = document.createElement("div");
|
|
5531
|
-
d.className = "ds-heatmap__labels-and-grid";
|
|
5532
5655
|
const h = document.createElement("div");
|
|
5533
|
-
h.className = "ds-
|
|
5656
|
+
h.className = "ds-heatmap__labels-and-grid";
|
|
5657
|
+
const d = document.createElement("div");
|
|
5658
|
+
d.className = "ds-heatmap__weekday-labels";
|
|
5534
5659
|
const u = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16;
|
|
5535
5660
|
this.getWeekdayLabels().forEach((_) => {
|
|
5536
|
-
const
|
|
5537
|
-
|
|
5538
|
-
}),
|
|
5661
|
+
const b = document.createElement("div");
|
|
5662
|
+
b.className = "ds-heatmap__weekday-label", b.textContent = _, b.style.height = u + "px", b.style.lineHeight = u + "px", d.appendChild(b);
|
|
5663
|
+
}), h.appendChild(d);
|
|
5539
5664
|
const f = document.createElement("div");
|
|
5540
5665
|
f.className = "ds-heatmap__grid-container";
|
|
5541
5666
|
const p = document.createElement("div");
|
|
5542
5667
|
p.className = "ds-heatmap__month-labels", p.style.width = l + "px";
|
|
5543
5668
|
const m = this.getMonthLabels();
|
|
5544
|
-
m.forEach((_,
|
|
5545
|
-
const
|
|
5546
|
-
|
|
5547
|
-
const v = m[
|
|
5548
|
-
let
|
|
5549
|
-
v ?
|
|
5669
|
+
m.forEach((_, b) => {
|
|
5670
|
+
const x = document.createElement("div");
|
|
5671
|
+
x.className = "ds-heatmap__month-label", x.textContent = _.label;
|
|
5672
|
+
const v = m[b + 1];
|
|
5673
|
+
let C;
|
|
5674
|
+
v ? C = Math.ceil((v.offset - _.offset) / 7) : C = a - Math.floor(_.offset / 7), x.style.width = C * o + "px", p.appendChild(x);
|
|
5550
5675
|
}), f.appendChild(p);
|
|
5551
5676
|
const y = document.createElement("div");
|
|
5552
5677
|
y.className = "ds-heatmap__grid", e.forEach((_) => {
|
|
5553
|
-
const
|
|
5554
|
-
|
|
5555
|
-
if (
|
|
5678
|
+
const b = document.createElement("div");
|
|
5679
|
+
b.className = "ds-heatmap__week-column", _.forEach((x) => {
|
|
5680
|
+
if (x === null) {
|
|
5556
5681
|
const v = document.createElement("div");
|
|
5557
|
-
v.className = "ds-heatmap__cell", v.style.visibility = "hidden",
|
|
5682
|
+
v.className = "ds-heatmap__cell", v.style.visibility = "hidden", b.appendChild(v);
|
|
5558
5683
|
} else {
|
|
5559
|
-
const v = this.getDataByDate(
|
|
5560
|
-
|
|
5561
|
-
const
|
|
5562
|
-
this.onCellClick && this.onCellClick({ date: this.formatDate(
|
|
5684
|
+
const v = this.getDataByDate(x), C = Math.max(...this.data.map((B) => B.value), 1), S = this.getLevel(v, C), w = document.createElement("div");
|
|
5685
|
+
w.className = "ds-heatmap__cell", w.dataset.date = this.formatDate(x), w.dataset.value = v, w.style.backgroundColor = this.getCellColor(S);
|
|
5686
|
+
const A = (B) => this.showTooltip(B, x, v), z = () => this.hideTooltip(), D = () => {
|
|
5687
|
+
this.onCellClick && this.onCellClick({ date: this.formatDate(x), value: v });
|
|
5563
5688
|
};
|
|
5564
|
-
|
|
5565
|
-
{ el:
|
|
5566
|
-
{ el:
|
|
5567
|
-
{ el:
|
|
5568
|
-
),
|
|
5689
|
+
w.addEventListener("mouseenter", A), w.addEventListener("mouseleave", z), w.addEventListener("click", D), this._listeners.push(
|
|
5690
|
+
{ el: w, event: "mouseenter", handler: A },
|
|
5691
|
+
{ el: w, event: "mouseleave", handler: z },
|
|
5692
|
+
{ el: w, event: "click", handler: D }
|
|
5693
|
+
), b.appendChild(w);
|
|
5569
5694
|
}
|
|
5570
|
-
}), y.appendChild(
|
|
5571
|
-
}), f.appendChild(y),
|
|
5695
|
+
}), y.appendChild(b);
|
|
5696
|
+
}), f.appendChild(y), h.appendChild(f), c.appendChild(h), t.appendChild(c), this.renderLegend(t);
|
|
5572
5697
|
}
|
|
5573
5698
|
renderLegend(t) {
|
|
5574
5699
|
const e = document.createElement("div");
|
|
@@ -5611,7 +5736,7 @@ class Nr {
|
|
|
5611
5736
|
}), this._listeners = null, this.tooltip && this.tooltip.parentNode && this.tooltip.parentNode.removeChild(this.tooltip), this.tooltip = null, this.data = [], this.element = null;
|
|
5612
5737
|
}
|
|
5613
5738
|
}
|
|
5614
|
-
function
|
|
5739
|
+
function de(i) {
|
|
5615
5740
|
if (i.__kupolaInitialized) return;
|
|
5616
5741
|
const t = i.getAttribute("data-heatmap-data");
|
|
5617
5742
|
let e = [];
|
|
@@ -5619,27 +5744,27 @@ function le(i) {
|
|
|
5619
5744
|
try {
|
|
5620
5745
|
e = JSON.parse(t);
|
|
5621
5746
|
} catch {
|
|
5622
|
-
e =
|
|
5747
|
+
e = vt();
|
|
5623
5748
|
}
|
|
5624
5749
|
else
|
|
5625
|
-
e =
|
|
5626
|
-
const s = new
|
|
5750
|
+
e = vt();
|
|
5751
|
+
const s = new Wr(i, {
|
|
5627
5752
|
data: e,
|
|
5628
5753
|
onCellClick: (n) => {
|
|
5629
5754
|
}
|
|
5630
5755
|
});
|
|
5631
5756
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
5632
5757
|
}
|
|
5633
|
-
function
|
|
5758
|
+
function Ur(i) {
|
|
5634
5759
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5635
5760
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5636
5761
|
}
|
|
5637
|
-
function
|
|
5762
|
+
function Fo() {
|
|
5638
5763
|
document.querySelectorAll(".ds-heatmap").forEach((i) => {
|
|
5639
|
-
|
|
5764
|
+
de(i);
|
|
5640
5765
|
});
|
|
5641
5766
|
}
|
|
5642
|
-
function
|
|
5767
|
+
function vt() {
|
|
5643
5768
|
const i = [], t = /* @__PURE__ */ new Date(), e = /* @__PURE__ */ new Date();
|
|
5644
5769
|
e.setFullYear(e.getFullYear() - 1);
|
|
5645
5770
|
for (let s = new Date(e); s <= t; s.setDate(s.getDate() + 1)) {
|
|
@@ -5651,8 +5776,8 @@ function gt() {
|
|
|
5651
5776
|
}
|
|
5652
5777
|
return i;
|
|
5653
5778
|
}
|
|
5654
|
-
E.register("heatmap",
|
|
5655
|
-
class
|
|
5779
|
+
E.register("heatmap", de, Ur);
|
|
5780
|
+
class Yr {
|
|
5656
5781
|
constructor(t, e = {}) {
|
|
5657
5782
|
this.element = t, this.tooltipEl = null, this.options = e, this.delay = e.delay || parseInt(t.getAttribute("data-tooltip-delay")) || 0, this.hideDelay = e.hideDelay || parseInt(t.getAttribute("data-tooltip-hide-delay")) || 0, this.trigger = e.trigger || t.getAttribute("data-tooltip-trigger") || "hover", this.html = e.html || t.hasAttribute("data-tooltip-html"), this.theme = e.theme || t.getAttribute("data-tooltip-theme") || "default", this.position = e.position || t.getAttribute("data-tooltip-position") || "top", this.animation = e.animation !== !1, this.mouseFollow = e.mouseFollow || t.hasAttribute("data-tooltip-mouse-follow"), this._showTooltip = null, this._hideTooltip = null, this._showTimer = null, this._hideTimer = null, this._clickHandler = null, this._focusHandler = null, this._blurHandler = null, this._mouseMoveHandler = null, this.isVisible = !1;
|
|
5658
5783
|
}
|
|
@@ -5743,20 +5868,20 @@ class Rr {
|
|
|
5743
5868
|
this.element.__kupolaInitialized && (this._showTimer && (clearTimeout(this._showTimer), this._showTimer = null), this._hideTimer && (clearTimeout(this._hideTimer), this._hideTimer = null), (this.trigger === "hover" || this.trigger === "focus") && (this.element.removeEventListener("mouseenter", this._showTooltip), this.element.removeEventListener("mouseleave", this._hideTooltip)), this.trigger === "click" && this.element.removeEventListener("click", this._clickHandler), (this.trigger === "focus" || this.trigger === "hover") && (this.element.removeEventListener("focus", this._showTooltip), this.element.removeEventListener("blur", this._hideTooltip)), this.mouseFollow && this.element.removeEventListener("mousemove", this._mouseMoveHandler), this.tooltipEl && (this.tooltipEl.remove(), this.tooltipEl = null), this.isVisible = !1, this._showTooltip = null, this._hideTooltip = null, this._clickHandler = null, this._mouseMoveHandler = null, this.element.__kupolaInitialized = !1);
|
|
5744
5869
|
}
|
|
5745
5870
|
}
|
|
5746
|
-
function
|
|
5747
|
-
const e = new
|
|
5871
|
+
function ue(i, t) {
|
|
5872
|
+
const e = new Yr(i, t);
|
|
5748
5873
|
e.init(), i._kupolaTooltip = e;
|
|
5749
5874
|
}
|
|
5750
|
-
function
|
|
5875
|
+
function No(i = document) {
|
|
5751
5876
|
i.querySelectorAll("[data-tooltip]").forEach((t) => {
|
|
5752
|
-
|
|
5877
|
+
ue(t);
|
|
5753
5878
|
});
|
|
5754
5879
|
}
|
|
5755
|
-
function
|
|
5880
|
+
function Xr(i) {
|
|
5756
5881
|
i._kupolaTooltip && (i._kupolaTooltip.destroy(), i._kupolaTooltip = null);
|
|
5757
5882
|
}
|
|
5758
|
-
E.register("tooltip",
|
|
5759
|
-
class
|
|
5883
|
+
E.register("tooltip", ue, Xr);
|
|
5884
|
+
class jr {
|
|
5760
5885
|
constructor() {
|
|
5761
5886
|
this.validators = {
|
|
5762
5887
|
required: this.validateRequired,
|
|
@@ -5784,11 +5909,11 @@ class Kr {
|
|
|
5784
5909
|
let r = !1;
|
|
5785
5910
|
return n.forEach((a) => {
|
|
5786
5911
|
const o = a.name || a.id, l = this.parseRules(a.getAttribute("data-validate")), c = this.getValue(a);
|
|
5787
|
-
for (const [
|
|
5788
|
-
if ((this.customValidators[
|
|
5912
|
+
for (const [h, d] of Object.entries(l))
|
|
5913
|
+
if ((this.customValidators[h] || this.validators[h])?.(c, d))
|
|
5789
5914
|
this.clearError(a);
|
|
5790
5915
|
else {
|
|
5791
|
-
s[o] = this.getErrorMessage(
|
|
5916
|
+
s[o] = this.getErrorMessage(h, d, a), this.showError(a, s[o]), r = !0;
|
|
5792
5917
|
break;
|
|
5793
5918
|
}
|
|
5794
5919
|
}), this.formStates[e] = {
|
|
@@ -5831,8 +5956,8 @@ class Kr {
|
|
|
5831
5956
|
await this.validateInputAsync(l) || (a = !0);
|
|
5832
5957
|
const o = {};
|
|
5833
5958
|
return r.forEach((l) => {
|
|
5834
|
-
const c = l.name || l.id,
|
|
5835
|
-
|
|
5959
|
+
const c = l.name || l.id, h = l.parentElement.querySelector(".ds-input__error");
|
|
5960
|
+
h && (o[c] = h.textContent);
|
|
5836
5961
|
}), this.formStates[s] = {
|
|
5837
5962
|
valid: !a,
|
|
5838
5963
|
errors: o,
|
|
@@ -5982,20 +6107,20 @@ class Kr {
|
|
|
5982
6107
|
}[t] || "Invalid input";
|
|
5983
6108
|
}
|
|
5984
6109
|
}
|
|
5985
|
-
const
|
|
6110
|
+
const P = new jr();
|
|
5986
6111
|
window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized = !0, document.addEventListener("DOMContentLoaded", () => {
|
|
5987
6112
|
document.querySelectorAll("form[data-validation]").forEach((i) => {
|
|
5988
6113
|
i.addEventListener("submit", async (t) => {
|
|
5989
6114
|
const e = i.id || `form-${Math.random().toString(36).substr(2, 9)}`;
|
|
5990
|
-
if (
|
|
6115
|
+
if (P.submitting.has(e)) {
|
|
5991
6116
|
t.preventDefault();
|
|
5992
6117
|
return;
|
|
5993
6118
|
}
|
|
5994
6119
|
t.preventDefault();
|
|
5995
6120
|
const s = i.querySelector("[data-validate-async]") !== null;
|
|
5996
6121
|
let n;
|
|
5997
|
-
if (s ? n = await
|
|
5998
|
-
|
|
6122
|
+
if (s ? n = await P.validateAsync(i) : n = P.validate(i), n) {
|
|
6123
|
+
P.submitting.add(e);
|
|
5999
6124
|
const r = i.querySelector('button[type="submit"]');
|
|
6000
6125
|
if (r) {
|
|
6001
6126
|
const a = r.textContent;
|
|
@@ -6005,7 +6130,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6005
6130
|
const a = i.getAttribute("data-on-submit");
|
|
6006
6131
|
a && window[a] ? await window[a](i) : i.submit();
|
|
6007
6132
|
} finally {
|
|
6008
|
-
|
|
6133
|
+
P.submitting.delete(e), r && (r.textContent = r.getAttribute("data-original-text") || "Submit", r.disabled = !1);
|
|
6009
6134
|
}
|
|
6010
6135
|
} else {
|
|
6011
6136
|
const r = i.querySelector(".ds-input--error");
|
|
@@ -6017,7 +6142,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6017
6142
|
const n = document.activeElement;
|
|
6018
6143
|
if (n && n.closest(".ds-select"))
|
|
6019
6144
|
return;
|
|
6020
|
-
|
|
6145
|
+
P.validateInput(t) && t.value.trim() && P.showSuccess(t);
|
|
6021
6146
|
}, 50);
|
|
6022
6147
|
});
|
|
6023
6148
|
const s = ((n, r) => {
|
|
@@ -6026,16 +6151,16 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6026
6151
|
clearTimeout(a), a = setTimeout(() => n(...o), r);
|
|
6027
6152
|
};
|
|
6028
6153
|
})(() => {
|
|
6029
|
-
const n =
|
|
6030
|
-
n.length > 0 || t.classList.contains("ds-input--error") ?
|
|
6154
|
+
const n = P.getValue(t);
|
|
6155
|
+
n.length > 0 || t.classList.contains("ds-input--error") ? P.validateInput(t) && n && P.showSuccess(t) : P.removeStatusIcon(t);
|
|
6031
6156
|
}, 300);
|
|
6032
6157
|
t.addEventListener("input", s), t.addEventListener("keyup", (n) => {
|
|
6033
|
-
n.key === "Enter" &&
|
|
6158
|
+
n.key === "Enter" && P.validateInput(t) && t.value.trim() && P.showSuccess(t);
|
|
6034
6159
|
});
|
|
6035
6160
|
});
|
|
6036
6161
|
});
|
|
6037
6162
|
}));
|
|
6038
|
-
class
|
|
6163
|
+
class Jr {
|
|
6039
6164
|
constructor(t, e = {}) {
|
|
6040
6165
|
this.element = t, this.data = e.data || [], this.itemHeight = e.itemHeight || 48, this.itemWidth = e.itemWidth || 200, this.bufferSize = e.bufferSize || 5, this.renderItem = e.renderItem || this.defaultRenderItem, this.onItemClick = e.onItemClick || null, this.onItemSelect = e.onItemSelect || null, this.onScroll = e.onScroll || null, this.onScrollEnd = e.onScrollEnd || null, this.selectedKey = e.selectedKey || null, this.keyField = e.keyField || "id", this.useDynamicHeight = e.useDynamicHeight || !1, this.dynamicHeightCache = /* @__PURE__ */ new Map(), this.estimatedHeight = e.estimatedHeight || 48, this.container = null, this.scrollbarTrack = null, this.scrollbarThumb = null, this.totalHeight = 0, this.startIndex = 0, this.endIndex = 0, this.isScrolling = !1, this.scrollTimeout = null, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.init();
|
|
6041
6166
|
}
|
|
@@ -6159,9 +6284,9 @@ class Wr {
|
|
|
6159
6284
|
const c = t ? this.itemWidth : this.itemHeight;
|
|
6160
6285
|
l = n * c;
|
|
6161
6286
|
}
|
|
6162
|
-
a.forEach((c,
|
|
6163
|
-
const
|
|
6164
|
-
o += this._buildItemHtml(c,
|
|
6287
|
+
a.forEach((c, h) => {
|
|
6288
|
+
const d = n + h, u = c[this.keyField] || d, f = this.selectedKey === u, p = this.getItemSize(d);
|
|
6289
|
+
o += this._buildItemHtml(c, d, u, f, p, l, t), l += p;
|
|
6165
6290
|
}), this.container.innerHTML = o, this.useDynamicHeight && this.updateDynamicHeights(), this.container.querySelectorAll(".ds-virtual-list__item").forEach((c) => {
|
|
6166
6291
|
c.addEventListener("click", () => this.handleItemClick(c));
|
|
6167
6292
|
});
|
|
@@ -6274,7 +6399,7 @@ class Wr {
|
|
|
6274
6399
|
}), this.data = [], this.dynamicHeightCache.clear(), this.container.innerHTML = "", this._listeners = null, this._scrollHandler = null, this._thumbDragStartHandler = null, this._thumbDragMoveHandler = null, this._thumbDragEndHandler = null, this._wheelHandler = null, this.container = null, this.scrollbarThumb = null, this.element = null;
|
|
6275
6400
|
}
|
|
6276
6401
|
}
|
|
6277
|
-
function
|
|
6402
|
+
function bt(i = 1e3) {
|
|
6278
6403
|
const t = [], e = ["Document", "Image", "Video", "Folder", "Archive", "Spreadsheet", "Presentation", "Code"];
|
|
6279
6404
|
for (let s = 1; s <= i; s++) {
|
|
6280
6405
|
const n = Math.floor(Math.random() * e.length), r = Math.floor(Math.random() * 1e4);
|
|
@@ -6287,7 +6412,7 @@ function _t(i = 1e3) {
|
|
|
6287
6412
|
}
|
|
6288
6413
|
return t;
|
|
6289
6414
|
}
|
|
6290
|
-
function
|
|
6415
|
+
function Gr(i) {
|
|
6291
6416
|
if (i.__kupolaInitialized) return;
|
|
6292
6417
|
const t = i.getAttribute("data-virtual-list");
|
|
6293
6418
|
let e = [];
|
|
@@ -6295,11 +6420,11 @@ function Ur(i) {
|
|
|
6295
6420
|
try {
|
|
6296
6421
|
e = JSON.parse(t);
|
|
6297
6422
|
} catch {
|
|
6298
|
-
e =
|
|
6423
|
+
e = bt(1e3);
|
|
6299
6424
|
}
|
|
6300
6425
|
else
|
|
6301
|
-
e =
|
|
6302
|
-
const s = new
|
|
6426
|
+
e = bt(1e3);
|
|
6427
|
+
const s = new Jr(i, {
|
|
6303
6428
|
data: e,
|
|
6304
6429
|
onItemClick: (n) => {
|
|
6305
6430
|
},
|
|
@@ -6308,12 +6433,12 @@ function Ur(i) {
|
|
|
6308
6433
|
});
|
|
6309
6434
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
6310
6435
|
}
|
|
6311
|
-
function
|
|
6436
|
+
function Zr(i) {
|
|
6312
6437
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6313
6438
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6314
6439
|
}
|
|
6315
|
-
E.register("virtual-list",
|
|
6316
|
-
const
|
|
6440
|
+
E.register("virtual-list", Gr, Zr);
|
|
6441
|
+
const Qr = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"', pe = {
|
|
6317
6442
|
globe: '<circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 0 1 0 20"/><path d="M12 2a15.3 15.3 0 0 0 0 20"/>',
|
|
6318
6443
|
dashboard: '<rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/>',
|
|
6319
6444
|
mouse: '<rect x="6" y="2" width="12" height="20" rx="6"/><line x1="12" y1="6" x2="12" y2="11"/>',
|
|
@@ -6423,19 +6548,19 @@ const Xr = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0
|
|
|
6423
6548
|
code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
|
|
6424
6549
|
apple: '<path fill="currentColor" stroke="none" d="M17.05 12.04c-.03-3.04 2.49-4.5 2.6-4.57-1.42-2.07-3.62-2.36-4.4-2.39-1.87-.19-3.65 1.1-4.6 1.1-.96 0-2.42-1.08-3.98-1.05-2.05.03-3.94 1.19-4.99 3.02-2.13 3.69-.54 9.13 1.53 12.12 1.01 1.46 2.21 3.1 3.78 3.04 1.52-.06 2.09-.98 3.93-.98 1.83 0 2.36.98 3.97.95 1.64-.03 2.68-1.49 3.68-2.96 1.16-1.7 1.64-3.35 1.66-3.43-.04-.02-3.18-1.22-3.21-4.85zM14.06 4.34c.83-1.01 1.39-2.41 1.24-3.81-1.2.05-2.65.8-3.51 1.8-.77.89-1.45 2.31-1.27 3.68 1.34.1 2.71-.68 3.54-1.67z"/>'
|
|
6425
6550
|
};
|
|
6426
|
-
function
|
|
6427
|
-
const s =
|
|
6428
|
-
return s ? `<svg ${
|
|
6551
|
+
function fe(i, t = 16, e = "0 0 24 24") {
|
|
6552
|
+
const s = pe[i];
|
|
6553
|
+
return s ? `<svg ${Qr.replace('width="16"', `width="${t}"`).replace('height="16"', `height="${t}"`).replace('viewBox="0 0 24 24"', `viewBox="${e}"`)}>${s}</svg>` : "";
|
|
6429
6554
|
}
|
|
6430
|
-
function
|
|
6555
|
+
function ot(i = document) {
|
|
6431
6556
|
i.querySelectorAll("[data-icon]").forEach((t) => {
|
|
6432
6557
|
const e = t.getAttribute("data-icon"), s = +t.getAttribute("data-size") || 16, n = t.getAttribute("data-viewbox") || "0 0 24 24";
|
|
6433
|
-
t.innerHTML =
|
|
6558
|
+
t.innerHTML = fe(e, s, n), t.classList.add("icon");
|
|
6434
6559
|
});
|
|
6435
6560
|
}
|
|
6436
|
-
const
|
|
6437
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
6438
|
-
class
|
|
6561
|
+
const Oo = { svg: fe, render: ot, PATHS: pe };
|
|
6562
|
+
typeof document < "u" && (document.readyState !== "loading" ? ot() : document.addEventListener("DOMContentLoaded", () => ot()));
|
|
6563
|
+
class ta {
|
|
6439
6564
|
constructor(t) {
|
|
6440
6565
|
this.element = t, this.hoursEl = t.querySelector(".ds-countdown__item--hours .ds-countdown__value"), this.minutesEl = t.querySelector(".ds-countdown__item--minutes .ds-countdown__value"), this.secondsEl = t.querySelector(".ds-countdown__item--seconds .ds-countdown__value"), this.endTime = this.parseEndTime(), this.interval = null, this.init();
|
|
6441
6566
|
}
|
|
@@ -6487,22 +6612,22 @@ class jr {
|
|
|
6487
6612
|
this.stop(), this.hoursEl = null, this.minutesEl = null, this.secondsEl = null, this.element = null;
|
|
6488
6613
|
}
|
|
6489
6614
|
}
|
|
6490
|
-
function
|
|
6615
|
+
function me(i) {
|
|
6491
6616
|
if (i.__kupolaInitialized) return;
|
|
6492
|
-
const t = new
|
|
6617
|
+
const t = new ta(i);
|
|
6493
6618
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6494
6619
|
}
|
|
6495
|
-
function
|
|
6620
|
+
function ea(i) {
|
|
6496
6621
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6497
6622
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6498
6623
|
}
|
|
6499
|
-
function
|
|
6624
|
+
function Ro() {
|
|
6500
6625
|
document.querySelectorAll(".ds-countdown").forEach((t) => {
|
|
6501
|
-
|
|
6626
|
+
me(t);
|
|
6502
6627
|
});
|
|
6503
6628
|
}
|
|
6504
|
-
E.register("countdown",
|
|
6505
|
-
class
|
|
6629
|
+
E.register("countdown", me, ea);
|
|
6630
|
+
class sa {
|
|
6506
6631
|
constructor(t) {
|
|
6507
6632
|
if (this.element = t, this.minusBtn = t.querySelector(".ds-number-input__btn--decrease"), this.plusBtn = t.querySelector(".ds-number-input__btn--increase"), this.inputEl = t.querySelector(".ds-number-input__input"), this._listeners = [], !this.minusBtn || !this.plusBtn || !this.inputEl)
|
|
6508
6633
|
throw new Error("NumberInput: Missing required elements");
|
|
@@ -6553,26 +6678,26 @@ class Gr {
|
|
|
6553
6678
|
}), this._listeners = null, this.minusBtn = null, this.plusBtn = null, this.inputEl = null, this.element = null;
|
|
6554
6679
|
}
|
|
6555
6680
|
}
|
|
6556
|
-
function
|
|
6681
|
+
function ge(i) {
|
|
6557
6682
|
if (!i.__kupolaInitialized)
|
|
6558
6683
|
try {
|
|
6559
|
-
const t = new
|
|
6684
|
+
const t = new sa(i);
|
|
6560
6685
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6561
6686
|
} catch (t) {
|
|
6562
6687
|
console.error("[NumberInput] Error initializing:", t);
|
|
6563
6688
|
}
|
|
6564
6689
|
}
|
|
6565
|
-
function
|
|
6690
|
+
function ia(i) {
|
|
6566
6691
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6567
6692
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6568
6693
|
}
|
|
6569
|
-
function
|
|
6694
|
+
function Vo() {
|
|
6570
6695
|
document.querySelectorAll(".ds-number-input").forEach((i) => {
|
|
6571
|
-
|
|
6696
|
+
ge(i);
|
|
6572
6697
|
});
|
|
6573
6698
|
}
|
|
6574
|
-
E.register("number-input",
|
|
6575
|
-
class
|
|
6699
|
+
E.register("number-input", ge, ia);
|
|
6700
|
+
class na {
|
|
6576
6701
|
constructor(t) {
|
|
6577
6702
|
this.container = t, this.track = t.querySelector(".ds-slider-captcha__track"), this.btn = t.querySelector(".ds-slider-captcha__btn"), this.text = t.querySelector(".ds-slider-captcha__text"), this.progress = t.querySelector(".ds-slider-captcha__progress"), this.statusEl = t.querySelector(".ds-slider-captcha__status"), this.refreshBtn = t.querySelector(".ds-slider-captcha__refresh"), this.footerRefreshBtn = t.querySelector(".ds-slider-captcha__footer-refresh"), this.config = {
|
|
6578
6703
|
tolerance: 6,
|
|
@@ -6632,11 +6757,11 @@ class Qr {
|
|
|
6632
6757
|
const n = Date.now() - this.startTime;
|
|
6633
6758
|
let r = 0, a = 0;
|
|
6634
6759
|
if (this.trackData.length > 0) {
|
|
6635
|
-
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x,
|
|
6636
|
-
if (
|
|
6637
|
-
const
|
|
6760
|
+
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x, h = n - l.t;
|
|
6761
|
+
if (h > 0 && (r = c / h, this.trackData.length > 1)) {
|
|
6762
|
+
const d = this.trackData[this.trackData.length - 2], u = l.t - d.t;
|
|
6638
6763
|
if (u > 0) {
|
|
6639
|
-
const f = (l.x -
|
|
6764
|
+
const f = (l.x - d.x) / u;
|
|
6640
6765
|
a = r - f;
|
|
6641
6766
|
}
|
|
6642
6767
|
}
|
|
@@ -6660,9 +6785,9 @@ class Qr {
|
|
|
6660
6785
|
if (s > this.config.tolerance)
|
|
6661
6786
|
return { passed: !1, msg: "验证失败" };
|
|
6662
6787
|
const n = [];
|
|
6663
|
-
for (let
|
|
6664
|
-
const
|
|
6665
|
-
u > 0 && u < 500 && n.push(
|
|
6788
|
+
for (let h = 1; h < this.trackData.length; h++) {
|
|
6789
|
+
const d = this.trackData[h].x - this.trackData[h - 1].x, u = this.trackData[h].t - this.trackData[h - 1].t;
|
|
6790
|
+
u > 0 && u < 500 && n.push(d / u);
|
|
6666
6791
|
}
|
|
6667
6792
|
if (n.length < 3)
|
|
6668
6793
|
return { passed: !1, msg: "验证失败" };
|
|
@@ -6670,8 +6795,8 @@ class Qr {
|
|
|
6670
6795
|
if (r - a < this.config.minSpeedDelta)
|
|
6671
6796
|
return { passed: !1, msg: "验证失败" };
|
|
6672
6797
|
let o = !1;
|
|
6673
|
-
for (const
|
|
6674
|
-
if (Math.abs(
|
|
6798
|
+
for (const h of this.trackData)
|
|
6799
|
+
if (Math.abs(h.y) > 2) {
|
|
6675
6800
|
o = !0;
|
|
6676
6801
|
break;
|
|
6677
6802
|
}
|
|
@@ -6683,9 +6808,9 @@ class Qr {
|
|
|
6683
6808
|
if (l > this.config.maxDuration)
|
|
6684
6809
|
return { passed: !1, msg: "验证失败" };
|
|
6685
6810
|
const c = [];
|
|
6686
|
-
for (let
|
|
6687
|
-
c.push(Math.abs(n[
|
|
6688
|
-
return c.length > 2 && c.reduce((
|
|
6811
|
+
for (let h = 1; h < n.length; h++)
|
|
6812
|
+
c.push(Math.abs(n[h] - n[h - 1]));
|
|
6813
|
+
return c.length > 2 && c.reduce((d, u) => d + u, 0) / c.length < 0.05 ? { passed: !1, msg: "验证失败" } : { passed: !0, msg: "验证通过" };
|
|
6689
6814
|
}
|
|
6690
6815
|
verifyCaptcha() {
|
|
6691
6816
|
this.isProcessing || this.isVerified || (this.isProcessing = !0, this.statusEl && (this.statusEl.textContent = "验证中...", this.statusEl.className = "ds-slider-captcha__status is-loading"), this.btn.style.cursor = "wait", this.container.classList.add("is-disabled"), setTimeout(() => {
|
|
@@ -6715,22 +6840,22 @@ class Qr {
|
|
|
6715
6840
|
this.container._initialized && (this.btn && this._mouseDownHandler && this.btn.removeEventListener("mousedown", this._mouseDownHandler), this.btn && this._touchStartHandler && this.btn.removeEventListener("touchstart", this._touchStartHandler), this.refreshBtn && this.refreshBtn.removeEventListener("click", () => this.loadCaptcha()), this.footerRefreshBtn && this.footerRefreshBtn.removeEventListener("click", () => this.loadCaptcha()), this._mouseMoveListener && this._mouseMoveListener.unsubscribe ? this._mouseMoveListener.unsubscribe() : this._mouseMoveHandler && document.removeEventListener("mousemove", this._mouseMoveHandler), this._mouseUpListener && this._mouseUpListener.unsubscribe ? this._mouseUpListener.unsubscribe() : this._mouseUpHandler && document.removeEventListener("mouseup", this._mouseUpHandler), this._touchMoveListener && this._touchMoveListener.unsubscribe ? this._touchMoveListener.unsubscribe() : this._touchMoveHandler && document.removeEventListener("touchmove", this._touchMoveHandler), this._touchEndListener && this._touchEndListener.unsubscribe ? this._touchEndListener.unsubscribe() : this._touchEndHandler && document.removeEventListener("touchend", this._touchEndHandler), this.container._initialized = !1);
|
|
6716
6841
|
}
|
|
6717
6842
|
}
|
|
6718
|
-
function
|
|
6843
|
+
function ra() {
|
|
6719
6844
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
6720
|
-
const t = new
|
|
6845
|
+
const t = new na(i);
|
|
6721
6846
|
t.init(), i._kupolaSlideCaptcha = t;
|
|
6722
6847
|
});
|
|
6723
6848
|
}
|
|
6724
|
-
function
|
|
6849
|
+
function aa(i) {
|
|
6725
6850
|
i._kupolaSlideCaptcha && (i._kupolaSlideCaptcha.destroy(), i._kupolaSlideCaptcha = null);
|
|
6726
6851
|
}
|
|
6727
|
-
function
|
|
6852
|
+
function oa() {
|
|
6728
6853
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
6729
|
-
|
|
6854
|
+
aa(i);
|
|
6730
6855
|
});
|
|
6731
6856
|
}
|
|
6732
|
-
E.register("slide-captcha",
|
|
6733
|
-
class
|
|
6857
|
+
E.register("slide-captcha", ra, oa);
|
|
6858
|
+
class la {
|
|
6734
6859
|
constructor(t) {
|
|
6735
6860
|
this.form = t, this.fields = [], this.validators = {}, this.errorMessages = {}, this._submitHandler = null, this._fieldHandlers = /* @__PURE__ */ new Map(), this._init();
|
|
6736
6861
|
}
|
|
@@ -6870,23 +6995,23 @@ class ia {
|
|
|
6870
6995
|
}), this._submitHandler = null, this._fieldHandlers.clear(), this._fieldHandlers = null, this.fields = null, this.validators = null, this.errorMessages = null, this.form = null;
|
|
6871
6996
|
}
|
|
6872
6997
|
}
|
|
6873
|
-
function
|
|
6998
|
+
function ca(i) {
|
|
6874
6999
|
const t = document.querySelectorAll(i || ".ds-form");
|
|
6875
7000
|
return t.forEach((e) => {
|
|
6876
7001
|
if (e._kupolaForm) return;
|
|
6877
|
-
const s = new
|
|
7002
|
+
const s = new la(e);
|
|
6878
7003
|
e._kupolaForm = s;
|
|
6879
7004
|
}), t.length;
|
|
6880
7005
|
}
|
|
6881
|
-
function
|
|
7006
|
+
function Ko(i) {
|
|
6882
7007
|
return i._kupolaForm;
|
|
6883
7008
|
}
|
|
6884
|
-
function
|
|
7009
|
+
function Wo(i) {
|
|
6885
7010
|
const t = i._kupolaForm;
|
|
6886
7011
|
return t ? t.validate() : !1;
|
|
6887
7012
|
}
|
|
6888
|
-
E.register("form-validation",
|
|
6889
|
-
class
|
|
7013
|
+
E.register("form-validation", ca);
|
|
7014
|
+
class ha {
|
|
6890
7015
|
constructor() {
|
|
6891
7016
|
this._queue = /* @__PURE__ */ new Set(), this._scheduled = !1, this._flushDepth = 0, this._maxDepth = 10;
|
|
6892
7017
|
}
|
|
@@ -6913,8 +7038,8 @@ class ra {
|
|
|
6913
7038
|
this._flushDepth--;
|
|
6914
7039
|
}
|
|
6915
7040
|
}
|
|
6916
|
-
const
|
|
6917
|
-
class
|
|
7041
|
+
const da = new ha();
|
|
7042
|
+
class ua {
|
|
6918
7043
|
constructor(t, e) {
|
|
6919
7044
|
this.data = t, this.createdAt = Date.now(), this.ttl = e;
|
|
6920
7045
|
}
|
|
@@ -6925,7 +7050,7 @@ class oa {
|
|
|
6925
7050
|
return !this.isFresh;
|
|
6926
7051
|
}
|
|
6927
7052
|
}
|
|
6928
|
-
class
|
|
7053
|
+
class _e {
|
|
6929
7054
|
constructor() {
|
|
6930
7055
|
this._store = /* @__PURE__ */ new Map();
|
|
6931
7056
|
}
|
|
@@ -6934,7 +7059,7 @@ class fe {
|
|
|
6934
7059
|
return e || null;
|
|
6935
7060
|
}
|
|
6936
7061
|
set(t, e, s = 6e4) {
|
|
6937
|
-
this._store.set(t, new
|
|
7062
|
+
this._store.set(t, new ua(e, s));
|
|
6938
7063
|
}
|
|
6939
7064
|
has(t) {
|
|
6940
7065
|
return this._store.has(t);
|
|
@@ -6956,17 +7081,17 @@ class N extends Error {
|
|
|
6956
7081
|
super(t), this.name = "DependsError", this.code = e, this.cause = s, this.timestamp = Date.now();
|
|
6957
7082
|
}
|
|
6958
7083
|
}
|
|
6959
|
-
let
|
|
6960
|
-
function
|
|
7084
|
+
let et = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
7085
|
+
function Uo(i) {
|
|
6961
7086
|
if (!i || typeof i.fetch != "function")
|
|
6962
7087
|
throw new TypeError("[Kupola] configureHttpClient: client must provide a fetch function");
|
|
6963
|
-
|
|
7088
|
+
et = i.fetch.bind(i);
|
|
6964
7089
|
}
|
|
6965
|
-
function
|
|
6966
|
-
return
|
|
7090
|
+
function Yo() {
|
|
7091
|
+
return et;
|
|
6967
7092
|
}
|
|
6968
|
-
function
|
|
6969
|
-
|
|
7093
|
+
function Xo() {
|
|
7094
|
+
et = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
6970
7095
|
}
|
|
6971
7096
|
class W {
|
|
6972
7097
|
constructor(t, e) {
|
|
@@ -6979,7 +7104,7 @@ class W {
|
|
|
6979
7104
|
};
|
|
6980
7105
|
}
|
|
6981
7106
|
notify() {
|
|
6982
|
-
|
|
7107
|
+
da.schedule(() => {
|
|
6983
7108
|
this.subscribers.forEach((t) => {
|
|
6984
7109
|
try {
|
|
6985
7110
|
t();
|
|
@@ -7027,37 +7152,37 @@ class W {
|
|
|
7027
7152
|
this.subscribers = [], this.pending = null;
|
|
7028
7153
|
}
|
|
7029
7154
|
}
|
|
7030
|
-
class
|
|
7155
|
+
class pa extends W {
|
|
7031
7156
|
constructor(t, e) {
|
|
7032
7157
|
super(t, e), this.method = t.method || "GET", this.headers = t.headers || {}, this.queryParams = t.query || {};
|
|
7033
7158
|
}
|
|
7034
7159
|
async fetch(t) {
|
|
7035
7160
|
let e = this.config.source;
|
|
7036
|
-
const s =
|
|
7161
|
+
const s = ct("http");
|
|
7037
7162
|
s?.baseURL && !e.startsWith("http://") && !e.startsWith("https://") && (e = s.baseURL + e.replace(/^\//, ""));
|
|
7038
|
-
for (const
|
|
7039
|
-
e = e.replace(`:${
|
|
7163
|
+
for (const u in t)
|
|
7164
|
+
e = e.replace(`:${u}`, encodeURIComponent(t[u]));
|
|
7040
7165
|
const n = [];
|
|
7041
|
-
for (const [
|
|
7042
|
-
n.push(`${encodeURIComponent(
|
|
7043
|
-
for (const
|
|
7044
|
-
this.config.source.includes(`:${
|
|
7166
|
+
for (const [u, f] of Object.entries(this.queryParams || {}))
|
|
7167
|
+
n.push(`${encodeURIComponent(u)}=${encodeURIComponent(f)}`);
|
|
7168
|
+
for (const u in t)
|
|
7169
|
+
this.config.source.includes(`:${u}`) || n.push(`${encodeURIComponent(u)}=${encodeURIComponent(t[u])}`);
|
|
7045
7170
|
n.length > 0 && (e += (e.includes("?") ? "&" : "?") + n.join("&"));
|
|
7046
|
-
const r = {
|
|
7171
|
+
const r = s?.headers || {}, a = {
|
|
7047
7172
|
method: this.method.toUpperCase(),
|
|
7048
|
-
headers: { "Content-Type": "application/json", ...this.headers }
|
|
7173
|
+
headers: { "Content-Type": "application/json", ...r, ...this.headers }
|
|
7049
7174
|
};
|
|
7050
|
-
["POST", "PUT", "PATCH"].includes(
|
|
7051
|
-
const
|
|
7052
|
-
if (!
|
|
7175
|
+
s?.withCredentials && (a.credentials = "include"), ["POST", "PUT", "PATCH"].includes(a.method) && (a.body = JSON.stringify(t));
|
|
7176
|
+
const o = et;
|
|
7177
|
+
if (!o)
|
|
7053
7178
|
throw new N("No HTTP client available. Use configureHttpClient() to set one.", "NO_HTTP_CLIENT");
|
|
7054
|
-
const
|
|
7055
|
-
if (!
|
|
7056
|
-
throw new N(`HTTP ${
|
|
7057
|
-
return typeof
|
|
7179
|
+
const l = await o(e, a), c = typeof l.ok == "boolean" ? l.ok : l.status >= 200 && l.status < 300, h = typeof l.status == "number" ? l.status : 0;
|
|
7180
|
+
if (!c)
|
|
7181
|
+
throw new N(`HTTP ${h}`, "HTTP_ERROR");
|
|
7182
|
+
return typeof l.json == "function" ? await l.json() : l.data !== void 0 ? l.data : l;
|
|
7058
7183
|
}
|
|
7059
7184
|
}
|
|
7060
|
-
class
|
|
7185
|
+
class ye extends W {
|
|
7061
7186
|
constructor(t, e) {
|
|
7062
7187
|
super(t, e), this.storageKey = t.source.replace("localStorage:", ""), this.defaultValue = t.default, this.sync = t.sync !== !1, this.sync && typeof window < "u" && (this._storageHandler = (s) => {
|
|
7063
7188
|
s.key === this.storageKey && (this.cache.delete(this.cacheKey), this.notify());
|
|
@@ -7084,7 +7209,7 @@ class me extends W {
|
|
|
7084
7209
|
super.destroy(), this._storageHandler && window.removeEventListener("storage", this._storageHandler);
|
|
7085
7210
|
}
|
|
7086
7211
|
}
|
|
7087
|
-
class
|
|
7212
|
+
class fa extends W {
|
|
7088
7213
|
constructor(t, e) {
|
|
7089
7214
|
super(t, e), this.paramName = t.source.replace("route:", "");
|
|
7090
7215
|
}
|
|
@@ -7094,17 +7219,17 @@ class ca extends W {
|
|
|
7094
7219
|
return e ? decodeURIComponent(e[1]) : new URLSearchParams(location.search).get(this.paramName) || "";
|
|
7095
7220
|
}
|
|
7096
7221
|
}
|
|
7097
|
-
class
|
|
7222
|
+
class ma extends W {
|
|
7098
7223
|
async fetch(t) {
|
|
7099
7224
|
return await this.config.source(t);
|
|
7100
7225
|
}
|
|
7101
7226
|
}
|
|
7102
|
-
class
|
|
7227
|
+
class ga extends W {
|
|
7103
7228
|
async fetch() {
|
|
7104
7229
|
return this.config.source;
|
|
7105
7230
|
}
|
|
7106
7231
|
}
|
|
7107
|
-
class
|
|
7232
|
+
class ve extends W {
|
|
7108
7233
|
constructor(t, e) {
|
|
7109
7234
|
super(t, e), this.ws = null, this.reconnect = t.reconnect !== !1, this.reconnectDelay = t.reconnectDelay || 3e3, this._reconnectAttempt = 0, this._maxReconnectDelay = t.maxReconnectDelay || 3e4, this.messageHandler = null, this._connected = !1, this._destroyed = !1;
|
|
7110
7235
|
}
|
|
@@ -7144,66 +7269,66 @@ class ge extends W {
|
|
|
7144
7269
|
this._destroyed = !0, super.destroy(), this.ws && (this.ws.onmessage = null, this.ws.onclose = null, this.ws.close(), this.ws = null);
|
|
7145
7270
|
}
|
|
7146
7271
|
}
|
|
7147
|
-
function
|
|
7272
|
+
function be(i, t) {
|
|
7148
7273
|
const e = i.source;
|
|
7149
|
-
return typeof e == "function" ? new
|
|
7274
|
+
return typeof e == "function" ? new ma(i, t) : typeof e == "string" && (e.startsWith("ws://") || e.startsWith("wss://")) ? new ve(i, t) : typeof e == "string" && (e.startsWith("/") || e.startsWith("http")) ? new pa(i, t) : typeof e == "string" && e.startsWith("localStorage:") ? new ye(i, t) : typeof e == "string" && e.startsWith("route:") ? new fa(i, t) : new ga(i, t);
|
|
7150
7275
|
}
|
|
7151
|
-
function
|
|
7152
|
-
const e = {}, s = new
|
|
7276
|
+
function jo(i, t) {
|
|
7277
|
+
const e = {}, s = new _e(), n = [];
|
|
7153
7278
|
for (const r in t) {
|
|
7154
7279
|
let p = function() {
|
|
7155
|
-
return
|
|
7280
|
+
return xt(i);
|
|
7156
7281
|
}, a = t[r];
|
|
7157
7282
|
typeof a == "string" && (a = { source: a });
|
|
7158
7283
|
const o = {
|
|
7159
7284
|
...a,
|
|
7160
|
-
cacheKey: a.cacheKey || `${r}-${JSON.stringify(
|
|
7161
|
-
}, l =
|
|
7285
|
+
cacheKey: a.cacheKey || `${r}-${JSON.stringify(xt(i))}`
|
|
7286
|
+
}, l = be(o, s), c = I(null), h = I(!0), d = I(null), u = I(null);
|
|
7162
7287
|
let f = 0;
|
|
7163
7288
|
async function m() {
|
|
7164
|
-
const
|
|
7165
|
-
|
|
7289
|
+
const b = ++f;
|
|
7290
|
+
h.value = !0, d.value = null;
|
|
7166
7291
|
try {
|
|
7167
|
-
const
|
|
7168
|
-
if (
|
|
7169
|
-
c.value =
|
|
7170
|
-
} catch (
|
|
7171
|
-
if (
|
|
7172
|
-
|
|
7292
|
+
const x = await l.getValue(p());
|
|
7293
|
+
if (b !== f) return;
|
|
7294
|
+
c.value = x, u.value = Date.now();
|
|
7295
|
+
} catch (x) {
|
|
7296
|
+
if (b !== f) return;
|
|
7297
|
+
d.value = x.message || "Unknown error";
|
|
7173
7298
|
} finally {
|
|
7174
|
-
|
|
7299
|
+
b === f && (h.value = !1);
|
|
7175
7300
|
}
|
|
7176
7301
|
}
|
|
7177
7302
|
m();
|
|
7178
7303
|
const y = l.subscribe(() => {
|
|
7179
|
-
const
|
|
7180
|
-
|
|
7304
|
+
const b = s.getStale(l.cacheKey);
|
|
7305
|
+
b != null && (c.value = b, u.value = Date.now());
|
|
7181
7306
|
});
|
|
7182
7307
|
n.push(y);
|
|
7183
7308
|
const _ = Object.keys(i);
|
|
7184
|
-
_.length > 0 && _.forEach((
|
|
7185
|
-
const
|
|
7186
|
-
if (
|
|
7309
|
+
_.length > 0 && _.forEach((b) => {
|
|
7310
|
+
const x = i[b];
|
|
7311
|
+
if (x && typeof x == "object" && "value" in x && x._subscribers) {
|
|
7187
7312
|
const v = () => {
|
|
7188
7313
|
l.invalidate(), m();
|
|
7189
7314
|
};
|
|
7190
|
-
|
|
7315
|
+
x._subscribers.add(v), n.push(() => x._subscribers.delete(v));
|
|
7191
7316
|
}
|
|
7192
7317
|
}), e[r] = {
|
|
7193
7318
|
data: c,
|
|
7194
|
-
loading:
|
|
7195
|
-
error:
|
|
7319
|
+
loading: h,
|
|
7320
|
+
error: d,
|
|
7196
7321
|
lastUpdated: u,
|
|
7197
7322
|
refresh() {
|
|
7198
7323
|
return l.invalidate(), m();
|
|
7199
7324
|
},
|
|
7200
7325
|
// For StorageSource
|
|
7201
|
-
setValue(
|
|
7202
|
-
l instanceof
|
|
7326
|
+
setValue(b) {
|
|
7327
|
+
l instanceof ye && (l.setValue(b), c.value = b);
|
|
7203
7328
|
},
|
|
7204
7329
|
// For WebSocketSource
|
|
7205
|
-
send(
|
|
7206
|
-
l instanceof
|
|
7330
|
+
send(b) {
|
|
7331
|
+
l instanceof ve && l.send(b);
|
|
7207
7332
|
},
|
|
7208
7333
|
_source: l
|
|
7209
7334
|
};
|
|
@@ -7215,8 +7340,8 @@ function Po(i, t) {
|
|
|
7215
7340
|
}
|
|
7216
7341
|
}, window.__kupolaDepInstances || (window.__kupolaDepInstances = []), window.__kupolaDepInstances.push(e), e;
|
|
7217
7342
|
}
|
|
7218
|
-
function
|
|
7219
|
-
const t = new
|
|
7343
|
+
function Jo(i) {
|
|
7344
|
+
const t = new _e(), e = be(i, t), s = I(null), n = I(!0), r = I(null);
|
|
7220
7345
|
let a = 0;
|
|
7221
7346
|
async function o() {
|
|
7222
7347
|
const l = ++a;
|
|
@@ -7244,7 +7369,7 @@ function $o(i) {
|
|
|
7244
7369
|
}
|
|
7245
7370
|
};
|
|
7246
7371
|
}
|
|
7247
|
-
function
|
|
7372
|
+
function xt(i) {
|
|
7248
7373
|
const t = {};
|
|
7249
7374
|
for (const e in i) {
|
|
7250
7375
|
const s = i[e];
|
|
@@ -7252,11 +7377,11 @@ function yt(i) {
|
|
|
7252
7377
|
}
|
|
7253
7378
|
return t;
|
|
7254
7379
|
}
|
|
7255
|
-
function
|
|
7380
|
+
function Go() {
|
|
7256
7381
|
}
|
|
7257
|
-
class
|
|
7382
|
+
class _a {
|
|
7258
7383
|
constructor(t, e = {}) {
|
|
7259
|
-
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this.columns = (e.columns || []).map((s, n) => ({ ...s, _index: n })), this.rowKey = e.rowKey || "id", this._data = [], this._loading = !1, this.striped = e.striped !== !1, this.bordered = e.bordered || !1, this.hoverable = e.hoverable !== !1, this.compact = e.compact || !1, this.emptyText = e.emptyText || "暂无数据", this.loadingText = e.loadingText || "加载中...", this.multiSort = e.multiSort || !1, this._sorts = [], this._filterText = "", this._showPagination = e.pagination !== !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._pageSize = e.pageSize || 10, this._currentPage = 1, this._total = 0, this.selection = e.selection || null, this._selectedKeys = /* @__PURE__ */ new Set(), this.selectionColumnTitle = e.selectionColumnTitle || "", this.expandable = e.expandable || null, this._expandedKeys = /* @__PURE__ */ new Set(), this.expandColumnTitle = e.expandColumnTitle || "", this.editable = e.editable || !1, this._editingCell = null, this._editBuffer = {}, this.resizable = e.resizable || !1, this.draggable = e.draggable || !1, this._dragState = null, this.tree = e.tree || null, this._treeExpandedKeys = /* @__PURE__ */ new Set(), e.tree?.defaultExpandAll && (this._treeExpandAll = !0), this.virtualScroll = e.virtualScroll || null, this._scrollContainer = null, this._scrollHandler = null, this._resizeCleanups = [], this._filterDebounceTimer = null, this._reactiveCleanups = [], this.mergeCells = e.mergeCells || null, this.onSort = e.onSort || null, this.onPageChange = e.onPageChange || null, this.onRowClick = e.onRowClick || null, this.onFilter = e.onFilter || null, this.onSelect = e.onSelect || null, this.onExpand = e.onExpand || null, this.onEditSave = e.onEditSave || null, this.onEditCancel = e.onEditCancel || null, this.onRowDragEnd = e.onRowDragEnd || null, this.onColumnResize = e.onColumnResize || null, this.sortKey =
|
|
7384
|
+
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this.columns = (e.columns || []).map((s, n) => ({ ...s, _index: n })), this.rowKey = e.rowKey || "id", this._data = [], this._loading = !1, this.striped = e.striped !== !1, this.bordered = e.bordered || !1, this.hoverable = e.hoverable !== !1, this.compact = e.compact || !1, this.emptyText = e.emptyText || "暂无数据", this.loadingText = e.loadingText || "加载中...", this.multiSort = e.multiSort || !1, this._sorts = [], this._filterText = "", this._showPagination = e.pagination !== !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._pageSize = e.pageSize || 10, this._currentPage = 1, this._total = 0, this.selection = e.selection || null, this._selectedKeys = /* @__PURE__ */ new Set(), this.selectionColumnTitle = e.selectionColumnTitle || "", this.expandable = e.expandable || null, this._expandedKeys = /* @__PURE__ */ new Set(), this.expandColumnTitle = e.expandColumnTitle || "", this.editable = e.editable || !1, this._editingCell = null, this._editBuffer = {}, this.resizable = e.resizable || !1, this.draggable = e.draggable || !1, this._dragState = null, this.tree = e.tree || null, this._treeExpandedKeys = /* @__PURE__ */ new Set(), e.tree?.defaultExpandAll && (this._treeExpandAll = !0), this.virtualScroll = e.virtualScroll || null, this._scrollContainer = null, this._scrollHandler = null, this._resizeCleanups = [], this._filterDebounceTimer = null, this._reactiveCleanups = [], this.mergeCells = e.mergeCells || null, this.onSort = e.onSort || null, this.onPageChange = e.onPageChange || null, this.onRowClick = e.onRowClick || null, this.onFilter = e.onFilter || null, this.onSelect = e.onSelect || null, this.onExpand = e.onExpand || null, this.onEditSave = e.onEditSave || null, this.onEditCancel = e.onEditCancel || null, this.onRowDragEnd = e.onRowDragEnd || null, this.onColumnResize = e.onColumnResize || null, this.sortKey = I(null), this.sortOrder = I(null), this.currentPage = I(1), this.filterText = I(""), this.selectedKeys = I([]), this._init();
|
|
7260
7385
|
}
|
|
7261
7386
|
_init() {
|
|
7262
7387
|
this.element.classList.add("kupola-table-wrapper"), this.virtualScroll && this.element.classList.add("kupola-table-virtual-wrapper"), this.render();
|
|
@@ -7408,8 +7533,8 @@ class ua {
|
|
|
7408
7533
|
s.forEach((a) => n.set(`${a.row}-${a.col}`, a));
|
|
7409
7534
|
const r = /* @__PURE__ */ new Set();
|
|
7410
7535
|
t.forEach((a, o) => {
|
|
7411
|
-
const l = a[this.rowKey] ?? o, c = this._selectedKeys.has(l),
|
|
7412
|
-
if (e.appendChild(
|
|
7536
|
+
const l = a[this.rowKey] ?? o, c = this._selectedKeys.has(l), h = this._expandedKeys.has(l), d = this._renderDataRow(a, o, l, c, r, n);
|
|
7537
|
+
if (e.appendChild(d), this.expandable && h) {
|
|
7413
7538
|
const u = document.createElement("tr");
|
|
7414
7539
|
u.className = "kupola-table-expand-row";
|
|
7415
7540
|
const f = document.createElement("td"), p = this.columns.length + (this.selection ? 1 : 0) + 1;
|
|
@@ -7425,8 +7550,8 @@ class ua {
|
|
|
7425
7550
|
const o = document.createElement("tr");
|
|
7426
7551
|
return o.setAttribute("data-row-key", s), n && o.classList.add("kupola-table-row-selected"), this.draggable && (o.draggable = !0, o.classList.add("kupola-table-draggable")), this.selection && this._renderSelectionCell(o, s, n), this.expandable && this._renderExpandCell(o, s), this.columns.forEach((l, c) => {
|
|
7427
7552
|
if (r.has(`${e}-${c}`)) return;
|
|
7428
|
-
const
|
|
7429
|
-
o.appendChild(
|
|
7553
|
+
const h = this._renderDataCell(t, e, s, l, c, r, a);
|
|
7554
|
+
o.appendChild(h);
|
|
7430
7555
|
}), this.onRowClick && (o.style.cursor = "pointer", o.addEventListener("click", (l) => {
|
|
7431
7556
|
l.target.closest(".kupola-table-expand-btn, .kupola-table-tree-toggle, input, button") || this.onRowClick(t, e, l);
|
|
7432
7557
|
})), o;
|
|
@@ -7451,20 +7576,20 @@ class ua {
|
|
|
7451
7576
|
const c = o.get(`${e}-${r}`);
|
|
7452
7577
|
if (c) {
|
|
7453
7578
|
c.rowSpan > 1 && (l.rowSpan = c.rowSpan), c.colSpan > 1 && (l.colSpan = c.colSpan);
|
|
7454
|
-
for (let
|
|
7579
|
+
for (let d = 0; d < (c.rowSpan || 1); d++)
|
|
7455
7580
|
for (let u = 0; u < (c.colSpan || 1); u++)
|
|
7456
|
-
|
|
7581
|
+
d === 0 && u === 0 || a.add(`${e + d}-${r + u}`);
|
|
7457
7582
|
}
|
|
7458
7583
|
this.tree && r === 0 && t._level > 0 && this._renderTreeIndent(l, t);
|
|
7459
|
-
const
|
|
7460
|
-
if (
|
|
7584
|
+
const h = this._editingCell && this._editingCell.rowKey === s && this._editingCell.colKey === n.key;
|
|
7585
|
+
if (h)
|
|
7461
7586
|
l.appendChild(this._renderEditCell(n, t));
|
|
7462
7587
|
else if (n.render) {
|
|
7463
|
-
const
|
|
7464
|
-
typeof
|
|
7588
|
+
const d = n.render(t[n.key], t, e);
|
|
7589
|
+
typeof d == "string" ? l.innerHTML = d : d instanceof HTMLElement && l.appendChild(d);
|
|
7465
7590
|
} else
|
|
7466
7591
|
l.textContent = t[n.key] ?? "";
|
|
7467
|
-
return this.editable && !
|
|
7592
|
+
return this.editable && !h && n.editable !== !1 && (l.classList.add("kupola-table-editable-cell"), l.addEventListener("dblclick", () => this._startEdit(s, n.key, t[n.key]))), l;
|
|
7468
7593
|
}
|
|
7469
7594
|
_renderTreeIndent(t, e) {
|
|
7470
7595
|
const s = document.createElement("span");
|
|
@@ -7502,16 +7627,16 @@ class ua {
|
|
|
7502
7627
|
if (!this._virtualData) return;
|
|
7503
7628
|
const { data: t, rowHeight: e, overscan: s, tbody: n, topSpacer: r } = this._virtualData, a = this.element.querySelector(".kupola-table-container");
|
|
7504
7629
|
if (!a) return;
|
|
7505
|
-
const o = a.scrollTop, l = a.clientHeight, c = Math.max(0, Math.floor(o / e) - s),
|
|
7630
|
+
const o = a.scrollTop, l = a.clientHeight, c = Math.max(0, Math.floor(o / e) - s), h = Math.min(t.length, Math.ceil((o + l) / e) + s);
|
|
7506
7631
|
n.querySelectorAll(".kupola-table-virtual-row").forEach((p) => p.remove());
|
|
7507
7632
|
const u = document.createDocumentFragment();
|
|
7508
|
-
for (let p = c; p <
|
|
7633
|
+
for (let p = c; p < h; p++) {
|
|
7509
7634
|
const m = t[p], y = m[this.rowKey] ?? p, _ = this._renderDataRow(m, p, y, this._selectedKeys.has(y), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map());
|
|
7510
7635
|
_.classList.add("kupola-table-virtual-row"), _.style.height = e + "px", u.appendChild(_);
|
|
7511
7636
|
}
|
|
7512
7637
|
r.style.height = c * e + "px";
|
|
7513
7638
|
const f = n.querySelector(".kupola-table-virtual-spacer-bottom");
|
|
7514
|
-
f && (f.style.height = (t.length -
|
|
7639
|
+
f && (f.style.height = (t.length - h) * e + "px"), r.after(u);
|
|
7515
7640
|
}
|
|
7516
7641
|
// ================================================================
|
|
7517
7642
|
// INLINE EDIT
|
|
@@ -7523,8 +7648,8 @@ class ua {
|
|
|
7523
7648
|
if (n.type = t.editType || "text", n.className = "ds-input kupola-table-edit-input", n.value = this._editBuffer[t.key] ?? e[t.key] ?? "", t.editOptions) {
|
|
7524
7649
|
const l = document.createElement("select");
|
|
7525
7650
|
l.className = "ds-input kupola-table-edit-input", t.editOptions.forEach((c) => {
|
|
7526
|
-
const
|
|
7527
|
-
|
|
7651
|
+
const h = document.createElement("option");
|
|
7652
|
+
h.value = typeof c == "object" ? c.value : c, h.textContent = typeof c == "object" ? c.label : c, String(h.value) === String(n.value) && (h.selected = !0), l.appendChild(h);
|
|
7528
7653
|
}), l.addEventListener("change", () => {
|
|
7529
7654
|
this._editBuffer[t.key] = l.value;
|
|
7530
7655
|
}), s.appendChild(l);
|
|
@@ -7614,11 +7739,11 @@ class ua {
|
|
|
7614
7739
|
this.element.querySelectorAll(".kupola-table-resize-handle").forEach((e) => {
|
|
7615
7740
|
e.addEventListener("mousedown", (s) => {
|
|
7616
7741
|
s.preventDefault();
|
|
7617
|
-
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (
|
|
7618
|
-
const
|
|
7619
|
-
r.style.width =
|
|
7742
|
+
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (h) => {
|
|
7743
|
+
const d = Math.max(50, o + (h.clientX - a));
|
|
7744
|
+
r.style.width = d + "px";
|
|
7620
7745
|
const u = this.columns.find((f) => f.key === n);
|
|
7621
|
-
u && (u.width =
|
|
7746
|
+
u && (u.width = d), this.onColumnResize && this.onColumnResize(n, d);
|
|
7622
7747
|
}, c = () => {
|
|
7623
7748
|
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", c);
|
|
7624
7749
|
};
|
|
@@ -7762,9 +7887,9 @@ class ua {
|
|
|
7762
7887
|
// ================================================================
|
|
7763
7888
|
exportCSV(t = "export.csv") {
|
|
7764
7889
|
const e = this.getProcessedData(), s = this.columns.map((c) => c.title || c.key), n = e.map(
|
|
7765
|
-
(c) => this.columns.map((
|
|
7766
|
-
let
|
|
7767
|
-
return
|
|
7890
|
+
(c) => this.columns.map((h) => {
|
|
7891
|
+
let d = c[h.key];
|
|
7892
|
+
return d == null && (d = ""), d = String(d).replace(/"/g, '""'), `"${d}"`;
|
|
7768
7893
|
}).join(",")
|
|
7769
7894
|
), r = "\uFEFF" + [s.join(","), ...n].join(`
|
|
7770
7895
|
`), a = new Blob([r], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(a), l = document.createElement("a");
|
|
@@ -7794,10 +7919,10 @@ class ua {
|
|
|
7794
7919
|
this._filterDebounceTimer && (clearTimeout(this._filterDebounceTimer), this._filterDebounceTimer = null), this._resizeCleanups.forEach((t) => t()), this._resizeCleanups = [], this._reactiveCleanups.forEach((t) => t.unsubscribe()), this._reactiveCleanups = [], this.element.innerHTML = "", this.element.classList.remove("kupola-table-wrapper", "kupola-table-virtual-wrapper"), this._data = [], this._virtualData = null, this._dragState = null, this._editingCell = null, this._editBuffer = {};
|
|
7795
7920
|
}
|
|
7796
7921
|
}
|
|
7797
|
-
function
|
|
7798
|
-
return new
|
|
7922
|
+
function xe(i, t) {
|
|
7923
|
+
return new _a(i, t);
|
|
7799
7924
|
}
|
|
7800
|
-
function
|
|
7925
|
+
function Zo() {
|
|
7801
7926
|
document.querySelectorAll("[data-kupola-table]").forEach((i) => {
|
|
7802
7927
|
const t = i.getAttribute("data-kupola-table");
|
|
7803
7928
|
let e = {};
|
|
@@ -7806,13 +7931,13 @@ function Bo() {
|
|
|
7806
7931
|
e = JSON.parse(t);
|
|
7807
7932
|
} catch {
|
|
7808
7933
|
}
|
|
7809
|
-
|
|
7934
|
+
xe(i, e);
|
|
7810
7935
|
});
|
|
7811
7936
|
}
|
|
7812
|
-
E.register("table",
|
|
7813
|
-
class
|
|
7937
|
+
E.register("table", xe);
|
|
7938
|
+
class ya {
|
|
7814
7939
|
constructor(t, e = {}) {
|
|
7815
|
-
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this._current = e.current || 1, this._total = e.total || 0, this._pageSize = e.pageSize || 10, this._maxPages = e.maxPages || 7, this._showTotal = e.showTotal !== !1, this._showSizeChanger = e.showSizeChanger || !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._simple = e.simple || !1, this.current =
|
|
7940
|
+
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this._current = e.current || 1, this._total = e.total || 0, this._pageSize = e.pageSize || 10, this._maxPages = e.maxPages || 7, this._showTotal = e.showTotal !== !1, this._showSizeChanger = e.showSizeChanger || !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._simple = e.simple || !1, this.current = I(this._current), this.total = I(this._total), this.onChange = e.onChange || null, this.onPageSizeChange = e.onPageSizeChange || null, this._init();
|
|
7816
7941
|
}
|
|
7817
7942
|
_init() {
|
|
7818
7943
|
this.element.classList.add("kupola-pagination"), this.render();
|
|
@@ -7910,9 +8035,9 @@ class pa {
|
|
|
7910
8035
|
this.element.innerHTML = "", this.element.classList.remove("kupola-pagination");
|
|
7911
8036
|
}
|
|
7912
8037
|
}
|
|
7913
|
-
let
|
|
7914
|
-
function
|
|
7915
|
-
if (
|
|
8038
|
+
let Et = !1;
|
|
8039
|
+
function va() {
|
|
8040
|
+
if (Et || typeof document > "u") return;
|
|
7916
8041
|
const i = document.createElement("style");
|
|
7917
8042
|
i.textContent = `
|
|
7918
8043
|
.kupola-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
@@ -7928,13 +8053,13 @@ function fa() {
|
|
|
7928
8053
|
.kupola-pagination-jumper { font-size: 14px; color: #666; }
|
|
7929
8054
|
.kupola-pagination-jumper input { width: 50px; height: 28px; margin: 0 4px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; text-align: center; font-size: 13px; }
|
|
7930
8055
|
.kupola-pagination-jumper input:focus { outline: none; border-color: #1890ff; }
|
|
7931
|
-
`, document.head.appendChild(i),
|
|
8056
|
+
`, document.head.appendChild(i), Et = !0;
|
|
7932
8057
|
}
|
|
7933
|
-
function
|
|
7934
|
-
return
|
|
8058
|
+
function Qo(i, t) {
|
|
8059
|
+
return va(), new ya(i, t);
|
|
7935
8060
|
}
|
|
7936
|
-
let
|
|
7937
|
-
class
|
|
8061
|
+
let kt = !1;
|
|
8062
|
+
class ba extends HTMLElement {
|
|
7938
8063
|
static get observedAttributes() {
|
|
7939
8064
|
return ["open"];
|
|
7940
8065
|
}
|
|
@@ -7956,7 +8081,7 @@ class ma extends HTMLElement {
|
|
|
7956
8081
|
}
|
|
7957
8082
|
}
|
|
7958
8083
|
}
|
|
7959
|
-
class
|
|
8084
|
+
class xa extends HTMLElement {
|
|
7960
8085
|
static get observedAttributes() {
|
|
7961
8086
|
return ["title", "position"];
|
|
7962
8087
|
}
|
|
@@ -7971,7 +8096,7 @@ class ga extends HTMLElement {
|
|
|
7971
8096
|
}
|
|
7972
8097
|
}
|
|
7973
8098
|
}
|
|
7974
|
-
class
|
|
8099
|
+
class Ea extends HTMLElement {
|
|
7975
8100
|
connectedCallback() {
|
|
7976
8101
|
this._render();
|
|
7977
8102
|
}
|
|
@@ -7989,13 +8114,13 @@ class _a extends HTMLElement {
|
|
|
7989
8114
|
}), this.innerHTML = "", this.appendChild(t);
|
|
7990
8115
|
}
|
|
7991
8116
|
}
|
|
7992
|
-
class
|
|
8117
|
+
class ka extends HTMLElement {
|
|
7993
8118
|
static get observedAttributes() {
|
|
7994
8119
|
return ["title"];
|
|
7995
8120
|
}
|
|
7996
8121
|
// Content is read by parent <k-collapse> during its connectedCallback
|
|
7997
8122
|
}
|
|
7998
|
-
class
|
|
8123
|
+
class wa extends HTMLElement {
|
|
7999
8124
|
static get observedAttributes() {
|
|
8000
8125
|
return ["position", "open"];
|
|
8001
8126
|
}
|
|
@@ -8013,7 +8138,7 @@ class va extends HTMLElement {
|
|
|
8013
8138
|
}
|
|
8014
8139
|
}
|
|
8015
8140
|
}
|
|
8016
|
-
class
|
|
8141
|
+
class Ca extends HTMLElement {
|
|
8017
8142
|
static get observedAttributes() {
|
|
8018
8143
|
return ["title", "open"];
|
|
8019
8144
|
}
|
|
@@ -8056,220 +8181,231 @@ class ba extends HTMLElement {
|
|
|
8056
8181
|
this.removeAttribute("open");
|
|
8057
8182
|
}
|
|
8058
8183
|
}
|
|
8059
|
-
function
|
|
8060
|
-
if (
|
|
8061
|
-
|
|
8184
|
+
function tl() {
|
|
8185
|
+
if (kt || typeof customElements > "u") return;
|
|
8186
|
+
kt = !0;
|
|
8062
8187
|
const i = [
|
|
8063
|
-
["k-dropdown",
|
|
8064
|
-
["k-tooltip",
|
|
8065
|
-
["k-collapse",
|
|
8066
|
-
["k-collapse-item",
|
|
8067
|
-
["k-drawer",
|
|
8068
|
-
["k-modal",
|
|
8188
|
+
["k-dropdown", ba],
|
|
8189
|
+
["k-tooltip", xa],
|
|
8190
|
+
["k-collapse", Ea],
|
|
8191
|
+
["k-collapse-item", ka],
|
|
8192
|
+
["k-drawer", wa],
|
|
8193
|
+
["k-modal", Ca]
|
|
8069
8194
|
];
|
|
8070
8195
|
for (const [t, e] of i)
|
|
8071
8196
|
customElements.get(t) || customElements.define(t, e);
|
|
8072
8197
|
}
|
|
8073
8198
|
export {
|
|
8074
8199
|
Y as BRAND_OPTIONS,
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8200
|
+
ua as CacheEntry,
|
|
8201
|
+
_e as CacheManager,
|
|
8202
|
+
qr as Calendar,
|
|
8203
|
+
Sr as Carousel,
|
|
8204
|
+
Ar as Collapse,
|
|
8205
|
+
Pr as ColorPicker,
|
|
8206
|
+
ur as ComponentInitializerRegistry,
|
|
8207
|
+
ta as Countdown,
|
|
8208
|
+
br as Datepicker,
|
|
8084
8209
|
N as DependsError,
|
|
8085
8210
|
W as DependsSource,
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8211
|
+
Co as Dialog,
|
|
8212
|
+
Dr as Drawer,
|
|
8213
|
+
_r as Dropdown,
|
|
8214
|
+
Fr as DynamicTags,
|
|
8215
|
+
pa as FetchedSource,
|
|
8216
|
+
Ir as FileUpload,
|
|
8217
|
+
ma as FunctionSource,
|
|
8218
|
+
gr as GlobalEvents,
|
|
8219
|
+
Wr as Heatmap,
|
|
8220
|
+
Oo as Icons,
|
|
8221
|
+
le as ImagePreview,
|
|
8097
8222
|
J as KupolaComponent,
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8223
|
+
fr as KupolaComponentRegistry,
|
|
8224
|
+
nr as KupolaDataBind,
|
|
8225
|
+
ar as KupolaEventBus,
|
|
8226
|
+
la as KupolaForm,
|
|
8227
|
+
Yt as KupolaI18n,
|
|
8228
|
+
lt as KupolaLifecycle,
|
|
8229
|
+
ya as KupolaPagination,
|
|
8230
|
+
ft as KupolaStore,
|
|
8231
|
+
rr as KupolaStoreManager,
|
|
8232
|
+
_a as KupolaTable,
|
|
8233
|
+
Da as KupolaUtils,
|
|
8234
|
+
jr as KupolaValidator,
|
|
8235
|
+
Do as Message,
|
|
8236
|
+
$ as Modal,
|
|
8237
|
+
So as Notification,
|
|
8238
|
+
sa as NumberInput,
|
|
8239
|
+
pe as PATHS,
|
|
8240
|
+
fa as RouteSource,
|
|
8241
|
+
ha as Scheduler,
|
|
8242
|
+
yr as Select,
|
|
8243
|
+
na as SlideCaptcha,
|
|
8244
|
+
wr as Slider,
|
|
8245
|
+
Vr as StatCard,
|
|
8246
|
+
ga as StaticSource,
|
|
8247
|
+
ye as StorageSource,
|
|
8248
|
+
Or as Tag,
|
|
8249
|
+
Er as Timepicker,
|
|
8250
|
+
Yr as Tooltip,
|
|
8251
|
+
Jr as VirtualList,
|
|
8252
|
+
ve as WebSocketSource,
|
|
8253
|
+
ko as alertModal,
|
|
8254
|
+
gt as applyMixin,
|
|
8255
|
+
Bs as arrayUtils,
|
|
8256
|
+
Ya as bootstrapComponents,
|
|
8257
|
+
mo as cleanupAllDropdowns,
|
|
8258
|
+
oa as cleanupAllSlideCaptchas,
|
|
8259
|
+
Br as cleanupCalendar,
|
|
8260
|
+
Lr as cleanupCarousel,
|
|
8261
|
+
zr as cleanupCollapse,
|
|
8262
|
+
$r as cleanupColorPicker,
|
|
8263
|
+
ea as cleanupCountdown,
|
|
8264
|
+
xr as cleanupDatepicker,
|
|
8265
|
+
Hr as cleanupDrawer,
|
|
8266
|
+
jt as cleanupDropdown,
|
|
8267
|
+
Nr as cleanupDynamicTags,
|
|
8268
|
+
Tr as cleanupFileUpload,
|
|
8269
|
+
Ur as cleanupHeatmap,
|
|
8270
|
+
Mr as cleanupModal,
|
|
8271
|
+
ia as cleanupNumberInput,
|
|
8272
|
+
vr as cleanupSelect,
|
|
8273
|
+
aa as cleanupSlideCaptcha,
|
|
8274
|
+
Cr as cleanupSlider,
|
|
8275
|
+
Kr as cleanupStatCard,
|
|
8276
|
+
Rr as cleanupTag,
|
|
8277
|
+
kr as cleanupTimepicker,
|
|
8278
|
+
Xr as cleanupTooltip,
|
|
8279
|
+
Zr as cleanupVirtualList,
|
|
8280
|
+
Go as clearCache,
|
|
8281
|
+
Uo as configureHttpClient,
|
|
8282
|
+
Eo as confirmModal,
|
|
8283
|
+
Fa as createBrandPicker,
|
|
8284
|
+
Ga as createI18n,
|
|
8285
|
+
La as createLifecycle,
|
|
8286
|
+
ee as createModal,
|
|
8287
|
+
be as createSource,
|
|
8288
|
+
Ma as createStore,
|
|
8289
|
+
Ba as createThemeToggle,
|
|
8290
|
+
jn as cryptoUtils,
|
|
8291
|
+
ln as dateUtils,
|
|
8292
|
+
cn as debounce,
|
|
8293
|
+
Ja as defineComponent,
|
|
8294
|
+
Xa as defineMixin,
|
|
8295
|
+
lo as emit,
|
|
8296
|
+
co as emitGlobal,
|
|
8297
|
+
Oa as escapeHtml,
|
|
8298
|
+
no as formatCurrency,
|
|
8299
|
+
so as formatDate,
|
|
8300
|
+
io as formatNumber,
|
|
8301
|
+
Ka as generateSecureId,
|
|
8302
|
+
Aa as getBasePath,
|
|
8176
8303
|
X as getBrand,
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8304
|
+
ct as getConfig,
|
|
8305
|
+
lr as getDefaultBrand,
|
|
8306
|
+
or as getDefaultTheme,
|
|
8307
|
+
Pa as getDevConfig,
|
|
8308
|
+
qa as getExtendConfig,
|
|
8309
|
+
Ko as getFormInstance,
|
|
8310
|
+
Yo as getHttpClient,
|
|
8311
|
+
za as getHttpConfig,
|
|
8312
|
+
Vt as getIconsPath,
|
|
8313
|
+
po as getListenerCount,
|
|
8314
|
+
eo as getLocale,
|
|
8315
|
+
$a as getPerformanceConfig,
|
|
8316
|
+
tt as getSecurityConfig,
|
|
8317
|
+
Ia as getStore,
|
|
8186
8318
|
R as getTheme,
|
|
8319
|
+
cr as getUiConfig,
|
|
8187
8320
|
H as globalEvents,
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8321
|
+
Zo as initAllTables,
|
|
8322
|
+
ae as initCalendar,
|
|
8323
|
+
Ao as initCalendars,
|
|
8324
|
+
te as initCarousel,
|
|
8325
|
+
bo as initCarousels,
|
|
8326
|
+
ne as initCollapse,
|
|
8327
|
+
Io as initCollapses,
|
|
8328
|
+
re as initColorPicker,
|
|
8329
|
+
To as initColorPickers,
|
|
8330
|
+
me as initCountdown,
|
|
8331
|
+
Ro as initCountdowns,
|
|
8332
|
+
Gt as initDatepicker,
|
|
8333
|
+
_o as initDatepickers,
|
|
8334
|
+
at as initDrawer,
|
|
8335
|
+
xo as initDrawers,
|
|
8336
|
+
Xt as initDropdown,
|
|
8337
|
+
fo as initDropdowns,
|
|
8338
|
+
oe as initDynamicTags,
|
|
8339
|
+
zo as initDynamicTagsAll,
|
|
8340
|
+
ie as initFileUpload,
|
|
8341
|
+
Mo as initFileUploads,
|
|
8342
|
+
ca as initFormValidation,
|
|
8343
|
+
de as initHeatmap,
|
|
8344
|
+
Fo as initHeatmaps,
|
|
8345
|
+
Po as initImagePreview,
|
|
8346
|
+
Ho as initMessages,
|
|
8347
|
+
se as initModal,
|
|
8348
|
+
wo as initModals,
|
|
8349
|
+
Lo as initNotifications,
|
|
8350
|
+
ge as initNumberInput,
|
|
8351
|
+
Vo as initNumberInputs,
|
|
8352
|
+
Qo as initPagination,
|
|
8353
|
+
Jt as initSelect,
|
|
8354
|
+
go as initSelects,
|
|
8355
|
+
ra as initSlideCaptchas,
|
|
8356
|
+
Qt as initSlider,
|
|
8357
|
+
vo as initSliders,
|
|
8358
|
+
he as initStatCard,
|
|
8359
|
+
Bo as initStatCards,
|
|
8360
|
+
xe as initTable,
|
|
8361
|
+
ce as initTag,
|
|
8362
|
+
qo as initTags,
|
|
8363
|
+
dr as initTheme,
|
|
8364
|
+
Zt as initTimepicker,
|
|
8365
|
+
yo as initTimepickers,
|
|
8366
|
+
ue as initTooltip,
|
|
8367
|
+
No as initTooltips,
|
|
8368
|
+
Gr as initVirtualList,
|
|
8369
|
+
_t as kupolaBootstrap,
|
|
8370
|
+
F as kupolaData,
|
|
8371
|
+
Ha as kupolaEvents,
|
|
8239
8372
|
O as kupolaI18n,
|
|
8240
8373
|
E as kupolaInitializer,
|
|
8241
|
-
|
|
8374
|
+
Sa as kupolaLifecycle,
|
|
8242
8375
|
M as kupolaRegistry,
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8376
|
+
Rt as kupolaStoreManager,
|
|
8377
|
+
Va as maskData,
|
|
8378
|
+
Qa as n,
|
|
8379
|
+
Ii as numberUtils,
|
|
8380
|
+
ni as objectUtils,
|
|
8381
|
+
oo as off,
|
|
8382
|
+
uo as offAll,
|
|
8383
|
+
ho as offByScope,
|
|
8384
|
+
ro as on,
|
|
8385
|
+
ao as once,
|
|
8386
|
+
sr as preloadUtils,
|
|
8387
|
+
I as ref,
|
|
8388
|
+
Wa as registerComponent,
|
|
8389
|
+
Ua as registerLazyComponent,
|
|
8390
|
+
tl as registerWebComponents,
|
|
8391
|
+
ot as renderIcon,
|
|
8392
|
+
Xo as resetHttpClient,
|
|
8393
|
+
Na as sanitizeHtml,
|
|
8394
|
+
rt as setBrand,
|
|
8395
|
+
Ta as setConfig,
|
|
8396
|
+
to as setLocale,
|
|
8397
|
+
nt as setTheme,
|
|
8398
|
+
$o as showImagePreview,
|
|
8399
|
+
je as stringUtils,
|
|
8400
|
+
Ra as stripHtml,
|
|
8401
|
+
fe as svg,
|
|
8402
|
+
Za as t,
|
|
8403
|
+
hn as throttle,
|
|
8404
|
+
jo as useDeps,
|
|
8405
|
+
ja as useMixin,
|
|
8406
|
+
Jo as useQuery,
|
|
8407
|
+
Wo as validateForm,
|
|
8408
|
+
P as validator,
|
|
8409
|
+
Ft as validatorUtils
|
|
8274
8410
|
};
|
|
8275
8411
|
//# sourceMappingURL=kupola.esm.js.map
|