ai-client-sdk 3.0.4 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-client-sdk.mjs +656 -656
- package/dist/ai-client-sdk.umd.js +1 -1
- package/dist/view/template.d.ts +1 -0
- package/package.json +1 -1
package/dist/ai-client-sdk.mjs
CHANGED
|
@@ -2,7 +2,7 @@ function Ya(e) {
|
|
|
2
2
|
if (e)
|
|
3
3
|
throw e;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function ki(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
8
|
var Ki, Ga;
|
|
@@ -46,7 +46,7 @@ function Yf() {
|
|
|
46
46
|
}, Ki;
|
|
47
47
|
}
|
|
48
48
|
var Gf = Yf();
|
|
49
|
-
const Zi = /* @__PURE__ */
|
|
49
|
+
const Zi = /* @__PURE__ */ ki(Gf);
|
|
50
50
|
function Us(e) {
|
|
51
51
|
if (typeof e != "object" || e === null)
|
|
52
52
|
return !1;
|
|
@@ -1410,7 +1410,7 @@ function we(e) {
|
|
|
1410
1410
|
function de(e) {
|
|
1411
1411
|
return e === -2 || e === -1 || e === 32;
|
|
1412
1412
|
}
|
|
1413
|
-
const
|
|
1413
|
+
const Ei = Ut(new RegExp("\\p{P}|\\p{S}", "u")), Qt = Ut(/\s/);
|
|
1414
1414
|
function Ut(e) {
|
|
1415
1415
|
return t;
|
|
1416
1416
|
function t(n) {
|
|
@@ -1448,9 +1448,9 @@ function pe(e, t, n, r) {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
const Td = {
|
|
1451
|
-
tokenize:
|
|
1451
|
+
tokenize: kd
|
|
1452
1452
|
};
|
|
1453
|
-
function
|
|
1453
|
+
function kd(e) {
|
|
1454
1454
|
const t = e.attempt(this.parser.constructs.contentInitial, r, i);
|
|
1455
1455
|
let n;
|
|
1456
1456
|
return t;
|
|
@@ -1479,7 +1479,7 @@ function Ed(e) {
|
|
|
1479
1479
|
return ie(o) ? (e.consume(o), e.exit("chunkText"), s) : (e.consume(o), a);
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
|
-
const
|
|
1482
|
+
const Ed = {
|
|
1483
1483
|
tokenize: Sd
|
|
1484
1484
|
}, ro = {
|
|
1485
1485
|
tokenize: xd
|
|
@@ -1602,7 +1602,7 @@ function xd(e, t, n) {
|
|
|
1602
1602
|
function yn(e) {
|
|
1603
1603
|
if (e === null || we(e) || Qt(e))
|
|
1604
1604
|
return 1;
|
|
1605
|
-
if (
|
|
1605
|
+
if (Ei(e))
|
|
1606
1606
|
return 2;
|
|
1607
1607
|
}
|
|
1608
1608
|
function Si(e, t, n) {
|
|
@@ -2545,25 +2545,25 @@ function hh(e, t, n) {
|
|
|
2545
2545
|
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(_), f;
|
|
2546
2546
|
}
|
|
2547
2547
|
function f(_) {
|
|
2548
|
-
return _ === 33 ? (e.consume(_), h) : _ === 47 ? (e.consume(_), s = !0, T) : _ === 63 ? (e.consume(_), i = 3, r.interrupt ? t :
|
|
2548
|
+
return _ === 33 ? (e.consume(_), h) : _ === 47 ? (e.consume(_), s = !0, T) : _ === 63 ? (e.consume(_), i = 3, r.interrupt ? t : k) : Ye(_) ? (e.consume(_), a = String.fromCharCode(_), y) : n(_);
|
|
2549
2549
|
}
|
|
2550
2550
|
function h(_) {
|
|
2551
|
-
return _ === 45 ? (e.consume(_), i = 2, d) : _ === 91 ? (e.consume(_), i = 5, o = 0, g) : Ye(_) ? (e.consume(_), i = 4, r.interrupt ? t :
|
|
2551
|
+
return _ === 45 ? (e.consume(_), i = 2, d) : _ === 91 ? (e.consume(_), i = 5, o = 0, g) : Ye(_) ? (e.consume(_), i = 4, r.interrupt ? t : k) : n(_);
|
|
2552
2552
|
}
|
|
2553
2553
|
function d(_) {
|
|
2554
|
-
return _ === 45 ? (e.consume(_), r.interrupt ? t :
|
|
2554
|
+
return _ === 45 ? (e.consume(_), r.interrupt ? t : k) : n(_);
|
|
2555
2555
|
}
|
|
2556
2556
|
function g(_) {
|
|
2557
|
-
const
|
|
2558
|
-
return _ ===
|
|
2557
|
+
const E = "CDATA[";
|
|
2558
|
+
return _ === E.charCodeAt(o++) ? (e.consume(_), o === E.length ? r.interrupt ? t : U : g) : n(_);
|
|
2559
2559
|
}
|
|
2560
2560
|
function T(_) {
|
|
2561
2561
|
return Ye(_) ? (e.consume(_), a = String.fromCharCode(_), y) : n(_);
|
|
2562
2562
|
}
|
|
2563
2563
|
function y(_) {
|
|
2564
2564
|
if (_ === null || _ === 47 || _ === 62 || we(_)) {
|
|
2565
|
-
const
|
|
2566
|
-
return !
|
|
2565
|
+
const E = _ === 47, P = a.toLowerCase();
|
|
2566
|
+
return !E && !s && oo.includes(P) ? (i = 1, r.interrupt ? t(_) : U(_)) : lh.includes(a.toLowerCase()) ? (i = 6, E ? (e.consume(_), m) : r.interrupt ? t(_) : U(_)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(_) : s ? p(_) : b(_));
|
|
2567
2567
|
}
|
|
2568
2568
|
return _ === 45 || Ue(_) ? (e.consume(_), a += String.fromCharCode(_), y) : n(_);
|
|
2569
2569
|
}
|
|
@@ -2601,7 +2601,7 @@ function hh(e, t, n) {
|
|
|
2601
2601
|
return _ === null || ie(_) ? U(_) : de(_) ? (e.consume(_), C) : n(_);
|
|
2602
2602
|
}
|
|
2603
2603
|
function U(_) {
|
|
2604
|
-
return _ === 45 && i === 2 ? (e.consume(_), B) : _ === 60 && i === 1 ? (e.consume(_), Z) : _ === 62 && i === 4 ? (e.consume(_), D) : _ === 63 && i === 3 ? (e.consume(_),
|
|
2604
|
+
return _ === 45 && i === 2 ? (e.consume(_), B) : _ === 60 && i === 1 ? (e.consume(_), Z) : _ === 62 && i === 4 ? (e.consume(_), D) : _ === 63 && i === 3 ? (e.consume(_), k) : _ === 93 && i === 5 ? (e.consume(_), ee) : ie(_) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(ch, I, K)(_)) : _ === null || ie(_) ? (e.exit("htmlFlowData"), K(_)) : (e.consume(_), U);
|
|
2605
2605
|
}
|
|
2606
2606
|
function K(_) {
|
|
2607
2607
|
return e.check(fh, H, I)(_);
|
|
@@ -2613,23 +2613,23 @@ function hh(e, t, n) {
|
|
|
2613
2613
|
return _ === null || ie(_) ? K(_) : (e.enter("htmlFlowData"), U(_));
|
|
2614
2614
|
}
|
|
2615
2615
|
function B(_) {
|
|
2616
|
-
return _ === 45 ? (e.consume(_),
|
|
2616
|
+
return _ === 45 ? (e.consume(_), k) : U(_);
|
|
2617
2617
|
}
|
|
2618
2618
|
function Z(_) {
|
|
2619
2619
|
return _ === 47 ? (e.consume(_), a = "", q) : U(_);
|
|
2620
2620
|
}
|
|
2621
2621
|
function q(_) {
|
|
2622
2622
|
if (_ === 62) {
|
|
2623
|
-
const
|
|
2624
|
-
return oo.includes(
|
|
2623
|
+
const E = a.toLowerCase();
|
|
2624
|
+
return oo.includes(E) ? (e.consume(_), D) : U(_);
|
|
2625
2625
|
}
|
|
2626
2626
|
return Ye(_) && a.length < 8 ? (e.consume(_), a += String.fromCharCode(_), q) : U(_);
|
|
2627
2627
|
}
|
|
2628
2628
|
function ee(_) {
|
|
2629
|
-
return _ === 93 ? (e.consume(_),
|
|
2629
|
+
return _ === 93 ? (e.consume(_), k) : U(_);
|
|
2630
2630
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return _ === 62 ? (e.consume(_), D) : _ === 45 && i === 2 ? (e.consume(_),
|
|
2631
|
+
function k(_) {
|
|
2632
|
+
return _ === 62 ? (e.consume(_), D) : _ === 45 && i === 2 ? (e.consume(_), k) : U(_);
|
|
2633
2633
|
}
|
|
2634
2634
|
function D(_) {
|
|
2635
2635
|
return _ === null || ie(_) ? (e.exit("htmlFlowData"), I(_)) : (e.consume(_), D);
|
|
@@ -2662,102 +2662,102 @@ function yh(e, t, n) {
|
|
|
2662
2662
|
const r = this;
|
|
2663
2663
|
let i, s, a;
|
|
2664
2664
|
return o;
|
|
2665
|
-
function o(
|
|
2666
|
-
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(
|
|
2665
|
+
function o(k) {
|
|
2666
|
+
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(k), l;
|
|
2667
2667
|
}
|
|
2668
|
-
function l(
|
|
2669
|
-
return
|
|
2668
|
+
function l(k) {
|
|
2669
|
+
return k === 33 ? (e.consume(k), u) : k === 47 ? (e.consume(k), v) : k === 63 ? (e.consume(k), b) : Ye(k) ? (e.consume(k), N) : n(k);
|
|
2670
2670
|
}
|
|
2671
|
-
function u(
|
|
2672
|
-
return
|
|
2671
|
+
function u(k) {
|
|
2672
|
+
return k === 45 ? (e.consume(k), c) : k === 91 ? (e.consume(k), s = 0, g) : Ye(k) ? (e.consume(k), p) : n(k);
|
|
2673
2673
|
}
|
|
2674
|
-
function c(
|
|
2675
|
-
return
|
|
2674
|
+
function c(k) {
|
|
2675
|
+
return k === 45 ? (e.consume(k), d) : n(k);
|
|
2676
2676
|
}
|
|
2677
|
-
function f(
|
|
2678
|
-
return
|
|
2677
|
+
function f(k) {
|
|
2678
|
+
return k === null ? n(k) : k === 45 ? (e.consume(k), h) : ie(k) ? (a = f, Z(k)) : (e.consume(k), f);
|
|
2679
2679
|
}
|
|
2680
|
-
function h(
|
|
2681
|
-
return
|
|
2680
|
+
function h(k) {
|
|
2681
|
+
return k === 45 ? (e.consume(k), d) : f(k);
|
|
2682
2682
|
}
|
|
2683
|
-
function d(
|
|
2684
|
-
return
|
|
2683
|
+
function d(k) {
|
|
2684
|
+
return k === 62 ? B(k) : k === 45 ? h(k) : f(k);
|
|
2685
2685
|
}
|
|
2686
|
-
function g(
|
|
2686
|
+
function g(k) {
|
|
2687
2687
|
const D = "CDATA[";
|
|
2688
|
-
return
|
|
2688
|
+
return k === D.charCodeAt(s++) ? (e.consume(k), s === D.length ? T : g) : n(k);
|
|
2689
2689
|
}
|
|
2690
|
-
function T(
|
|
2691
|
-
return
|
|
2690
|
+
function T(k) {
|
|
2691
|
+
return k === null ? n(k) : k === 93 ? (e.consume(k), y) : ie(k) ? (a = T, Z(k)) : (e.consume(k), T);
|
|
2692
2692
|
}
|
|
2693
|
-
function y(
|
|
2694
|
-
return
|
|
2693
|
+
function y(k) {
|
|
2694
|
+
return k === 93 ? (e.consume(k), m) : T(k);
|
|
2695
2695
|
}
|
|
2696
|
-
function m(
|
|
2697
|
-
return
|
|
2696
|
+
function m(k) {
|
|
2697
|
+
return k === 62 ? B(k) : k === 93 ? (e.consume(k), m) : T(k);
|
|
2698
2698
|
}
|
|
2699
|
-
function p(
|
|
2700
|
-
return
|
|
2699
|
+
function p(k) {
|
|
2700
|
+
return k === null || k === 62 ? B(k) : ie(k) ? (a = p, Z(k)) : (e.consume(k), p);
|
|
2701
2701
|
}
|
|
2702
|
-
function b(
|
|
2703
|
-
return
|
|
2702
|
+
function b(k) {
|
|
2703
|
+
return k === null ? n(k) : k === 63 ? (e.consume(k), S) : ie(k) ? (a = b, Z(k)) : (e.consume(k), b);
|
|
2704
2704
|
}
|
|
2705
|
-
function S(
|
|
2706
|
-
return
|
|
2705
|
+
function S(k) {
|
|
2706
|
+
return k === 62 ? B(k) : b(k);
|
|
2707
2707
|
}
|
|
2708
|
-
function v(
|
|
2709
|
-
return Ye(
|
|
2708
|
+
function v(k) {
|
|
2709
|
+
return Ye(k) ? (e.consume(k), w) : n(k);
|
|
2710
2710
|
}
|
|
2711
|
-
function w(
|
|
2712
|
-
return
|
|
2711
|
+
function w(k) {
|
|
2712
|
+
return k === 45 || Ue(k) ? (e.consume(k), w) : x(k);
|
|
2713
2713
|
}
|
|
2714
|
-
function x(
|
|
2715
|
-
return ie(
|
|
2714
|
+
function x(k) {
|
|
2715
|
+
return ie(k) ? (a = x, Z(k)) : de(k) ? (e.consume(k), x) : B(k);
|
|
2716
2716
|
}
|
|
2717
|
-
function N(
|
|
2718
|
-
return
|
|
2717
|
+
function N(k) {
|
|
2718
|
+
return k === 45 || Ue(k) ? (e.consume(k), N) : k === 47 || k === 62 || we(k) ? F(k) : n(k);
|
|
2719
2719
|
}
|
|
2720
|
-
function F(
|
|
2721
|
-
return
|
|
2720
|
+
function F(k) {
|
|
2721
|
+
return k === 47 ? (e.consume(k), B) : k === 58 || k === 95 || Ye(k) ? (e.consume(k), A) : ie(k) ? (a = F, Z(k)) : de(k) ? (e.consume(k), F) : B(k);
|
|
2722
2722
|
}
|
|
2723
|
-
function A(
|
|
2724
|
-
return
|
|
2723
|
+
function A(k) {
|
|
2724
|
+
return k === 45 || k === 46 || k === 58 || k === 95 || Ue(k) ? (e.consume(k), A) : C(k);
|
|
2725
2725
|
}
|
|
2726
|
-
function C(
|
|
2727
|
-
return
|
|
2726
|
+
function C(k) {
|
|
2727
|
+
return k === 61 ? (e.consume(k), U) : ie(k) ? (a = C, Z(k)) : de(k) ? (e.consume(k), C) : F(k);
|
|
2728
2728
|
}
|
|
2729
|
-
function U(
|
|
2730
|
-
return
|
|
2729
|
+
function U(k) {
|
|
2730
|
+
return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? n(k) : k === 34 || k === 39 ? (e.consume(k), i = k, K) : ie(k) ? (a = U, Z(k)) : de(k) ? (e.consume(k), U) : (e.consume(k), H);
|
|
2731
2731
|
}
|
|
2732
|
-
function K(
|
|
2733
|
-
return
|
|
2732
|
+
function K(k) {
|
|
2733
|
+
return k === i ? (e.consume(k), i = void 0, j) : k === null ? n(k) : ie(k) ? (a = K, Z(k)) : (e.consume(k), K);
|
|
2734
2734
|
}
|
|
2735
|
-
function H(
|
|
2736
|
-
return
|
|
2735
|
+
function H(k) {
|
|
2736
|
+
return k === null || k === 34 || k === 39 || k === 60 || k === 61 || k === 96 ? n(k) : k === 47 || k === 62 || we(k) ? F(k) : (e.consume(k), H);
|
|
2737
2737
|
}
|
|
2738
|
-
function j(
|
|
2739
|
-
return
|
|
2738
|
+
function j(k) {
|
|
2739
|
+
return k === 47 || k === 62 || we(k) ? F(k) : n(k);
|
|
2740
2740
|
}
|
|
2741
|
-
function B(
|
|
2742
|
-
return
|
|
2741
|
+
function B(k) {
|
|
2742
|
+
return k === 62 ? (e.consume(k), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(k);
|
|
2743
2743
|
}
|
|
2744
|
-
function Z(
|
|
2745
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(
|
|
2744
|
+
function Z(k) {
|
|
2745
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(k), e.exit("lineEnding"), q;
|
|
2746
2746
|
}
|
|
2747
|
-
function q(
|
|
2748
|
-
return de(
|
|
2747
|
+
function q(k) {
|
|
2748
|
+
return de(k) ? pe(e, ee, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(k) : ee(k);
|
|
2749
2749
|
}
|
|
2750
|
-
function ee(
|
|
2751
|
-
return e.enter("htmlTextData"), a(
|
|
2750
|
+
function ee(k) {
|
|
2751
|
+
return e.enter("htmlTextData"), a(k);
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
2754
2754
|
const pa = {
|
|
2755
2755
|
name: "labelEnd",
|
|
2756
2756
|
resolveAll: vh,
|
|
2757
2757
|
resolveTo: Th,
|
|
2758
|
-
tokenize: Eh
|
|
2759
|
-
}, bh = {
|
|
2760
2758
|
tokenize: kh
|
|
2759
|
+
}, bh = {
|
|
2760
|
+
tokenize: Eh
|
|
2761
2761
|
}, wh = {
|
|
2762
2762
|
tokenize: Sh
|
|
2763
2763
|
}, _h = {
|
|
@@ -2815,7 +2815,7 @@ function Th(e, t) {
|
|
|
2815
2815
|
};
|
|
2816
2816
|
return o = [["enter", l, t], ["enter", u, t]], o = dt(o, e.slice(s + 1, s + r + 3)), o = dt(o, [["enter", c, t]]), o = dt(o, Si(t.parser.constructs.insideSpan.null, e.slice(s + r + 4, a - 3), t)), o = dt(o, [["exit", c, t], e[a - 2], e[a - 1], ["exit", u, t]]), o = dt(o, e.slice(a + 1)), o = dt(o, [["exit", l, t]]), lt(e, s, e.length, o), e;
|
|
2817
2817
|
}
|
|
2818
|
-
function
|
|
2818
|
+
function kh(e, t, n) {
|
|
2819
2819
|
const r = this;
|
|
2820
2820
|
let i = r.events.length, s, a;
|
|
2821
2821
|
for (; i--; )
|
|
@@ -2843,7 +2843,7 @@ function Eh(e, t, n) {
|
|
|
2843
2843
|
return s._balanced = !0, n(h);
|
|
2844
2844
|
}
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function Eh(e, t, n) {
|
|
2847
2847
|
return r;
|
|
2848
2848
|
function r(f) {
|
|
2849
2849
|
return e.enter("resource"), e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), i;
|
|
@@ -3369,7 +3369,7 @@ function ip(e, t, n) {
|
|
|
3369
3369
|
function x(C, U) {
|
|
3370
3370
|
return K;
|
|
3371
3371
|
function K(H, j, B) {
|
|
3372
|
-
let Z, q, ee,
|
|
3372
|
+
let Z, q, ee, k;
|
|
3373
3373
|
return Array.isArray(H) ? (
|
|
3374
3374
|
/* c8 ignore next 1 */
|
|
3375
3375
|
I(H)
|
|
@@ -3398,22 +3398,22 @@ function ip(e, t, n) {
|
|
|
3398
3398
|
function _(M) {
|
|
3399
3399
|
return X;
|
|
3400
3400
|
function X(J) {
|
|
3401
|
-
return
|
|
3401
|
+
return k = F(), ee = M, M.partial || (u.currentConstruct = M), M.name && u.parser.constructs.disable.null.includes(M.name) ? P() : M.tokenize.call(
|
|
3402
3402
|
// If we do have fields, create an object w/ `context` as its
|
|
3403
3403
|
// prototype.
|
|
3404
3404
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
3405
3405
|
U ? Object.assign(Object.create(u), U) : u,
|
|
3406
3406
|
l,
|
|
3407
|
-
|
|
3407
|
+
E,
|
|
3408
3408
|
P
|
|
3409
3409
|
)(J);
|
|
3410
3410
|
}
|
|
3411
3411
|
}
|
|
3412
|
-
function
|
|
3413
|
-
return C(ee,
|
|
3412
|
+
function E(M) {
|
|
3413
|
+
return C(ee, k), j;
|
|
3414
3414
|
}
|
|
3415
3415
|
function P(M) {
|
|
3416
|
-
return
|
|
3416
|
+
return k.restore(), ++q < Z.length ? _(Z[q]) : B;
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
3419
3419
|
}
|
|
@@ -3496,7 +3496,7 @@ function op(e) {
|
|
|
3496
3496
|
),
|
|
3497
3497
|
content: i(Td),
|
|
3498
3498
|
defined: [],
|
|
3499
|
-
document: i(
|
|
3499
|
+
document: i(Ed),
|
|
3500
3500
|
flow: i(qh),
|
|
3501
3501
|
lazy: {},
|
|
3502
3502
|
string: i(Vh),
|
|
@@ -3595,9 +3595,9 @@ function pp(e) {
|
|
|
3595
3595
|
emphasis: s(G),
|
|
3596
3596
|
hardBreakEscape: s(oe),
|
|
3597
3597
|
hardBreakTrailing: s(oe),
|
|
3598
|
-
htmlFlow: s(
|
|
3598
|
+
htmlFlow: s(Ee, a),
|
|
3599
3599
|
htmlFlowData: F,
|
|
3600
|
-
htmlText: s(
|
|
3600
|
+
htmlText: s(Ee, a),
|
|
3601
3601
|
htmlTextData: F,
|
|
3602
3602
|
image: s($e),
|
|
3603
3603
|
label: a,
|
|
@@ -3656,8 +3656,8 @@ function pp(e) {
|
|
|
3656
3656
|
listOrdered: l(),
|
|
3657
3657
|
listUnordered: l(),
|
|
3658
3658
|
paragraph: l(),
|
|
3659
|
-
referenceString:
|
|
3660
|
-
resourceDestinationString:
|
|
3659
|
+
referenceString: E,
|
|
3660
|
+
resourceDestinationString: k,
|
|
3661
3661
|
resourceTitleString: D,
|
|
3662
3662
|
resource: I,
|
|
3663
3663
|
setextHeading: l(N),
|
|
@@ -3931,7 +3931,7 @@ function pp(e) {
|
|
|
3931
3931
|
} else
|
|
3932
3932
|
se.alt = V;
|
|
3933
3933
|
}
|
|
3934
|
-
function
|
|
3934
|
+
function k() {
|
|
3935
3935
|
const L = this.resume(), V = this.stack[this.stack.length - 1];
|
|
3936
3936
|
V.url = L;
|
|
3937
3937
|
}
|
|
@@ -3945,7 +3945,7 @@ function pp(e) {
|
|
|
3945
3945
|
function _() {
|
|
3946
3946
|
this.data.referenceType = "collapsed";
|
|
3947
3947
|
}
|
|
3948
|
-
function
|
|
3948
|
+
function E(L) {
|
|
3949
3949
|
const V = this.resume(), se = this.stack[this.stack.length - 1];
|
|
3950
3950
|
se.label = V, se.identifier = bt(this.sliceSerialize(L)).toLowerCase(), this.data.referenceType = "full";
|
|
3951
3951
|
}
|
|
@@ -4021,7 +4021,7 @@ function pp(e) {
|
|
|
4021
4021
|
type: "break"
|
|
4022
4022
|
};
|
|
4023
4023
|
}
|
|
4024
|
-
function
|
|
4024
|
+
function Ee() {
|
|
4025
4025
|
return {
|
|
4026
4026
|
type: "html",
|
|
4027
4027
|
value: ""
|
|
@@ -4250,7 +4250,7 @@ function vp() {
|
|
|
4250
4250
|
function Tp(e) {
|
|
4251
4251
|
return e !== null && typeof e == "object" && "type" in e;
|
|
4252
4252
|
}
|
|
4253
|
-
const tc = [],
|
|
4253
|
+
const tc = [], kp = !0, Ws = !1, Ep = "skip";
|
|
4254
4254
|
function nc(e, t, n, r) {
|
|
4255
4255
|
let i;
|
|
4256
4256
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
@@ -4283,7 +4283,7 @@ function nc(e, t, n, r) {
|
|
|
4283
4283
|
/** @type {UnistParent} */
|
|
4284
4284
|
l
|
|
4285
4285
|
);
|
|
4286
|
-
if (m.children && d[0] !==
|
|
4286
|
+
if (m.children && d[0] !== Ep)
|
|
4287
4287
|
for (T = (r ? m.children.length : -1) + a, y = c.concat(m); T > -1 && T < m.children.length; ) {
|
|
4288
4288
|
const p = m.children[T];
|
|
4289
4289
|
if (g = o(p, T, y)(), g[0] === Ws)
|
|
@@ -4296,7 +4296,7 @@ function nc(e, t, n, r) {
|
|
|
4296
4296
|
}
|
|
4297
4297
|
}
|
|
4298
4298
|
function Sp(e) {
|
|
4299
|
-
return Array.isArray(e) ? e : typeof e == "number" ? [
|
|
4299
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [kp, e] : e == null ? tc : [e];
|
|
4300
4300
|
}
|
|
4301
4301
|
function xp(e, t, n) {
|
|
4302
4302
|
const i = xi((n || {}).ignore || []), s = Pp(t);
|
|
@@ -4481,7 +4481,7 @@ function Up(e) {
|
|
|
4481
4481
|
}
|
|
4482
4482
|
function rc(e, t) {
|
|
4483
4483
|
const n = e.input.charCodeAt(e.index - 1);
|
|
4484
|
-
return (e.index === 0 || Qt(n) ||
|
|
4484
|
+
return (e.index === 0 || Qt(n) || Ei(n)) && // If it’s an email, the previous character should not be a slash.
|
|
4485
4485
|
(!t || n !== 47);
|
|
4486
4486
|
}
|
|
4487
4487
|
ic.peek = Zp;
|
|
@@ -4953,14 +4953,14 @@ function Tm(e, t, n, r) {
|
|
|
4953
4953
|
});
|
|
4954
4954
|
return /^[\t ]/.test(u) && (u = Un(u.charCodeAt(0)) + u.slice(1)), u = u ? a + " " + u : a, n.options.closeAtx && (u += " " + a), l(), o(), u;
|
|
4955
4955
|
}
|
|
4956
|
-
uc.peek =
|
|
4956
|
+
uc.peek = km;
|
|
4957
4957
|
function uc(e) {
|
|
4958
4958
|
return e.value || "";
|
|
4959
4959
|
}
|
|
4960
|
-
function
|
|
4960
|
+
function km() {
|
|
4961
4961
|
return "<";
|
|
4962
4962
|
}
|
|
4963
|
-
cc.peek =
|
|
4963
|
+
cc.peek = Em;
|
|
4964
4964
|
function cc(e, t, n, r) {
|
|
4965
4965
|
const i = ma(n), s = i === '"' ? "Quote" : "Apostrophe", a = n.enter("image");
|
|
4966
4966
|
let o = n.enter("label");
|
|
@@ -4986,7 +4986,7 @@ function cc(e, t, n, r) {
|
|
|
4986
4986
|
})
|
|
4987
4987
|
), u += l.move(i), o()), u += l.move(")"), a(), u;
|
|
4988
4988
|
}
|
|
4989
|
-
function
|
|
4989
|
+
function Em() {
|
|
4990
4990
|
return "!";
|
|
4991
4991
|
}
|
|
4992
4992
|
fc.peek = Sm;
|
|
@@ -5528,8 +5528,8 @@ const tg = {
|
|
|
5528
5528
|
}, Tc = {
|
|
5529
5529
|
name: "wwwAutolink",
|
|
5530
5530
|
tokenize: sg,
|
|
5531
|
-
previous:
|
|
5532
|
-
},
|
|
5531
|
+
previous: Ec
|
|
5532
|
+
}, kc = {
|
|
5533
5533
|
name: "protocolAutolink",
|
|
5534
5534
|
tokenize: ag,
|
|
5535
5535
|
previous: Sc
|
|
@@ -5550,8 +5550,8 @@ xt[43] = It;
|
|
|
5550
5550
|
xt[45] = It;
|
|
5551
5551
|
xt[46] = It;
|
|
5552
5552
|
xt[95] = It;
|
|
5553
|
-
xt[72] = [It,
|
|
5554
|
-
xt[104] = [It,
|
|
5553
|
+
xt[72] = [It, kc];
|
|
5554
|
+
xt[104] = [It, kc];
|
|
5555
5555
|
xt[87] = [It, Tc];
|
|
5556
5556
|
xt[119] = [It, Tc];
|
|
5557
5557
|
function ig(e, t, n) {
|
|
@@ -5578,7 +5578,7 @@ function sg(e, t, n) {
|
|
|
5578
5578
|
const r = this;
|
|
5579
5579
|
return i;
|
|
5580
5580
|
function i(a) {
|
|
5581
|
-
return a !== 87 && a !== 119 || !
|
|
5581
|
+
return a !== 87 && a !== 119 || !Ec.call(r, r.previous) || ya(r.events) ? n(a) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(tg, e.attempt(wc, e.attempt(_c, s), n), n)(a));
|
|
5582
5582
|
}
|
|
5583
5583
|
function s(a) {
|
|
5584
5584
|
return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(a);
|
|
@@ -5605,7 +5605,7 @@ function ag(e, t, n) {
|
|
|
5605
5605
|
return f === 47 ? (e.consume(f), s ? u : (s = !0, l)) : n(f);
|
|
5606
5606
|
}
|
|
5607
5607
|
function u(f) {
|
|
5608
|
-
return f === null || di(f) || we(f) || Qt(f) ||
|
|
5608
|
+
return f === null || di(f) || we(f) || Qt(f) || Ei(f) ? n(f) : e.attempt(wc, e.attempt(_c, c), n)(f);
|
|
5609
5609
|
}
|
|
5610
5610
|
function c(f) {
|
|
5611
5611
|
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(f);
|
|
@@ -5625,7 +5625,7 @@ function lg(e, t, n) {
|
|
|
5625
5625
|
let r, i, s;
|
|
5626
5626
|
return a;
|
|
5627
5627
|
function a(u) {
|
|
5628
|
-
return u === 46 || u === 95 ? e.check(vc, l, o)(u) : u === null || we(u) || Qt(u) || u !== 45 &&
|
|
5628
|
+
return u === 46 || u === 95 ? e.check(vc, l, o)(u) : u === null || we(u) || Qt(u) || u !== 45 && Ei(u) ? l(u) : (s = !0, e.consume(u), a);
|
|
5629
5629
|
}
|
|
5630
5630
|
function o(u) {
|
|
5631
5631
|
return u === 95 ? r = !0 : (i = r, r = void 0), e.consume(u), a;
|
|
@@ -5672,7 +5672,7 @@ function fg(e, t, n) {
|
|
|
5672
5672
|
return Ue(s) ? n(s) : t(s);
|
|
5673
5673
|
}
|
|
5674
5674
|
}
|
|
5675
|
-
function
|
|
5675
|
+
function Ec(e) {
|
|
5676
5676
|
return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || we(e);
|
|
5677
5677
|
}
|
|
5678
5678
|
function Sc(e) {
|
|
@@ -5961,7 +5961,7 @@ class Tg {
|
|
|
5961
5961
|
* @returns {undefined}
|
|
5962
5962
|
*/
|
|
5963
5963
|
add(t, n, r) {
|
|
5964
|
-
|
|
5964
|
+
kg(this, t, n, r);
|
|
5965
5965
|
}
|
|
5966
5966
|
// To do: add this when moving to `micromark`.
|
|
5967
5967
|
// /**
|
|
@@ -6000,7 +6000,7 @@ class Tg {
|
|
|
6000
6000
|
this.map.length = 0;
|
|
6001
6001
|
}
|
|
6002
6002
|
}
|
|
6003
|
-
function
|
|
6003
|
+
function kg(e, t, n, r) {
|
|
6004
6004
|
let i = 0;
|
|
6005
6005
|
if (!(n === 0 && r.length === 0)) {
|
|
6006
6006
|
for (; i < e.map.length; ) {
|
|
@@ -6013,7 +6013,7 @@ function Eg(e, t, n, r) {
|
|
|
6013
6013
|
e.map.push([t, n, r]);
|
|
6014
6014
|
}
|
|
6015
6015
|
}
|
|
6016
|
-
function
|
|
6016
|
+
function Eg(e, t) {
|
|
6017
6017
|
let n = !1;
|
|
6018
6018
|
const r = [];
|
|
6019
6019
|
for (; t < e.length; ) {
|
|
@@ -6133,7 +6133,7 @@ function Pg(e, t) {
|
|
|
6133
6133
|
}
|
|
6134
6134
|
for (l !== 0 && bo(h, t, l, u, c), h.consume(t.events), n = -1; ++n < t.events.length; ) {
|
|
6135
6135
|
const d = t.events[n];
|
|
6136
|
-
d[0] === "enter" && d[1].type === "table" && (d[1]._align =
|
|
6136
|
+
d[0] === "enter" && d[1].type === "table" && (d[1]._align = Eg(t.events, n));
|
|
6137
6137
|
}
|
|
6138
6138
|
return e;
|
|
6139
6139
|
}
|
|
@@ -6653,7 +6653,7 @@ const Cc = -1, Ai = 0, jn = 1, mi = 2, ba = 3, wa = 4, _a = 5, va = 6, Rc = 7, N
|
|
|
6653
6653
|
return n(new To[s](a), i);
|
|
6654
6654
|
};
|
|
6655
6655
|
return r;
|
|
6656
|
-
},
|
|
6656
|
+
}, ko = (e) => ly(/* @__PURE__ */ new Map(), e)(0), on = "", { toString: uy } = {}, { keys: cy } = Object, Pn = (e) => {
|
|
6657
6657
|
const t = typeof e;
|
|
6658
6658
|
if (t !== "object" || !e)
|
|
6659
6659
|
return [Ai, t];
|
|
@@ -6751,13 +6751,13 @@ const Cc = -1, Ai = 0, jn = 1, mi = 2, ba = 3, wa = 4, _a = 5, va = 6, Rc = 7, N
|
|
|
6751
6751
|
return i([o, { name: l, message: u }], a);
|
|
6752
6752
|
};
|
|
6753
6753
|
return s;
|
|
6754
|
-
},
|
|
6754
|
+
}, Eo = (e, { json: t, lossy: n } = {}) => {
|
|
6755
6755
|
const r = [];
|
|
6756
6756
|
return fy(!(t || n), !!t, /* @__PURE__ */ new Map(), r)(e), r;
|
|
6757
6757
|
}, gi = typeof structuredClone == "function" ? (
|
|
6758
6758
|
/* c8 ignore start */
|
|
6759
|
-
(e, t) => t && ("json" in t || "lossy" in t) ? Eo(
|
|
6760
|
-
) : (e, t) => Eo(
|
|
6759
|
+
(e, t) => t && ("json" in t || "lossy" in t) ? ko(Eo(e, t)) : structuredClone(e)
|
|
6760
|
+
) : (e, t) => ko(Eo(e, t));
|
|
6761
6761
|
function dy(e, t) {
|
|
6762
6762
|
const n = [{ type: "text", value: "↩" }];
|
|
6763
6763
|
return t > 1 && n.push({
|
|
@@ -7030,10 +7030,10 @@ nt.prototype.overloadedBoolean = !1;
|
|
|
7030
7030
|
nt.prototype.property = "";
|
|
7031
7031
|
nt.prototype.spaceSeparated = !1;
|
|
7032
7032
|
nt.prototype.space = void 0;
|
|
7033
|
-
let
|
|
7033
|
+
let ky = 0;
|
|
7034
7034
|
const ue = tn(), Re = tn(), Zs = tn(), Y = tn(), _e = tn(), mn = tn(), st = tn();
|
|
7035
7035
|
function tn() {
|
|
7036
|
-
return 2 ** ++
|
|
7036
|
+
return 2 ** ++ky;
|
|
7037
7037
|
}
|
|
7038
7038
|
const Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7039
7039
|
__proto__: null,
|
|
@@ -7150,7 +7150,7 @@ function Lc(e, t) {
|
|
|
7150
7150
|
function Fc(e, t) {
|
|
7151
7151
|
return Lc(e, t.toLowerCase());
|
|
7152
7152
|
}
|
|
7153
|
-
const
|
|
7153
|
+
const Ey = wn({
|
|
7154
7154
|
attributes: {
|
|
7155
7155
|
acceptcharset: "accept-charset",
|
|
7156
7156
|
classname: "class",
|
|
@@ -8122,7 +8122,7 @@ function Dy(e) {
|
|
|
8122
8122
|
function $y(e) {
|
|
8123
8123
|
return e.charAt(1).toUpperCase();
|
|
8124
8124
|
}
|
|
8125
|
-
const Oy = Mc([Ic,
|
|
8125
|
+
const Oy = Mc([Ic, Ey, jc, zc, Uc], "html"), qc = Mc([Ic, Sy, jc, zc, Uc], "svg"), Cy = /["&'<>`]/g, Ry = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Ny = (
|
|
8126
8126
|
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
8127
8127
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
8128
8128
|
), My = /[|\\{}()[\]^$+*?.]/g, Do = /* @__PURE__ */ new WeakMap();
|
|
@@ -8597,7 +8597,7 @@ function e0(e) {
|
|
|
8597
8597
|
return e.join(" ").trim();
|
|
8598
8598
|
}
|
|
8599
8599
|
const t0 = /[ \t\n\f\r]/g;
|
|
8600
|
-
function
|
|
8600
|
+
function ka(e) {
|
|
8601
8601
|
return typeof e == "object" ? e.type === "text" ? $o(e.value) : !1 : $o(e);
|
|
8602
8602
|
}
|
|
8603
8603
|
function $o(e) {
|
|
@@ -8610,7 +8610,7 @@ function Vc(e) {
|
|
|
8610
8610
|
const s = n ? n.children : n0;
|
|
8611
8611
|
let a = (r || 0) + e, o = s[a];
|
|
8612
8612
|
if (!i)
|
|
8613
|
-
for (; o &&
|
|
8613
|
+
for (; o && ka(o); )
|
|
8614
8614
|
a += e, o = s[a];
|
|
8615
8615
|
return o;
|
|
8616
8616
|
}
|
|
@@ -8622,7 +8622,7 @@ function Wc(e) {
|
|
|
8622
8622
|
return r0.call(e, n.tagName) && e[n.tagName](n, r, i);
|
|
8623
8623
|
}
|
|
8624
8624
|
}
|
|
8625
|
-
const
|
|
8625
|
+
const Ea = Wc({
|
|
8626
8626
|
body: s0,
|
|
8627
8627
|
caption: fs,
|
|
8628
8628
|
colgroup: fs,
|
|
@@ -8645,7 +8645,7 @@ const ka = Wc({
|
|
|
8645
8645
|
});
|
|
8646
8646
|
function fs(e, t, n) {
|
|
8647
8647
|
const r = Me(n, t, !0);
|
|
8648
|
-
return !r || r.type !== "comment" && !(r.type === "text" &&
|
|
8648
|
+
return !r || r.type !== "comment" && !(r.type === "text" && ka(r.value.charAt(0)));
|
|
8649
8649
|
}
|
|
8650
8650
|
function i0(e, t, n) {
|
|
8651
8651
|
const r = Me(n, t);
|
|
@@ -8726,15 +8726,15 @@ function b0(e) {
|
|
|
8726
8726
|
}
|
|
8727
8727
|
function w0(e) {
|
|
8728
8728
|
const t = Me(e, -1, !0);
|
|
8729
|
-
return !t || t.type !== "comment" && !(t.type === "text" &&
|
|
8729
|
+
return !t || t.type !== "comment" && !(t.type === "text" && ka(t.value.charAt(0))) && !(t.type === "element" && (t.tagName === "meta" || t.tagName === "link" || t.tagName === "script" || t.tagName === "style" || t.tagName === "template"));
|
|
8730
8730
|
}
|
|
8731
8731
|
function _0(e, t, n) {
|
|
8732
8732
|
const r = Bc(n, t), i = Me(e, -1, !0);
|
|
8733
|
-
return n && r && r.type === "element" && r.tagName === "colgroup" &&
|
|
8733
|
+
return n && r && r.type === "element" && r.tagName === "colgroup" && Ea(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "col");
|
|
8734
8734
|
}
|
|
8735
8735
|
function v0(e, t, n) {
|
|
8736
8736
|
const r = Bc(n, t), i = Me(e, -1);
|
|
8737
|
-
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") &&
|
|
8737
|
+
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && Ea(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "tr");
|
|
8738
8738
|
}
|
|
8739
8739
|
const rr = {
|
|
8740
8740
|
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
@@ -8772,18 +8772,18 @@ function T0(e, t, n, r) {
|
|
|
8772
8772
|
const o = [];
|
|
8773
8773
|
let l;
|
|
8774
8774
|
i.space === "html" && e.tagName === "svg" && (r.schema = qc);
|
|
8775
|
-
const u =
|
|
8775
|
+
const u = k0(r, e.properties), c = r.all(
|
|
8776
8776
|
i.space === "html" && e.tagName === "template" ? e.content : e
|
|
8777
8777
|
);
|
|
8778
|
-
return r.schema = i, c && (a = !1), (u || !s || !g0(e, t, n)) && (o.push("<", e.tagName, u ? " " + u : ""), a && (i.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && o.push(" "), o.push("/")), o.push(">")), o.push(c), !a && (!s || !
|
|
8778
|
+
return r.schema = i, c && (a = !1), (u || !s || !g0(e, t, n)) && (o.push("<", e.tagName, u ? " " + u : ""), a && (i.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && o.push(" "), o.push("/")), o.push(">")), o.push(c), !a && (!s || !Ea(e, t, n)) && o.push("</" + e.tagName + ">"), o.join("");
|
|
8779
8779
|
}
|
|
8780
|
-
function
|
|
8780
|
+
function k0(e, t) {
|
|
8781
8781
|
const n = [];
|
|
8782
8782
|
let r = -1, i;
|
|
8783
8783
|
if (t) {
|
|
8784
8784
|
for (i in t)
|
|
8785
8785
|
if (t[i] !== null && t[i] !== void 0) {
|
|
8786
|
-
const s =
|
|
8786
|
+
const s = E0(e, i, t[i]);
|
|
8787
8787
|
s && n.push(s);
|
|
8788
8788
|
}
|
|
8789
8789
|
}
|
|
@@ -8793,7 +8793,7 @@ function E0(e, t) {
|
|
|
8793
8793
|
}
|
|
8794
8794
|
return n.join("");
|
|
8795
8795
|
}
|
|
8796
|
-
function
|
|
8796
|
+
function E0(e, t, n) {
|
|
8797
8797
|
const r = Ay(e.schema, t), i = e.settings.allowParseErrors && e.schema.space === "html" ? 0 : 1, s = e.settings.allowDangerousCharacters ? 0 : 1;
|
|
8798
8798
|
let a = e.quote, o;
|
|
8799
8799
|
if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
|
|
@@ -8971,10 +8971,10 @@ function W0(e) {
|
|
|
8971
8971
|
at(e, t) || (e[t] = null);
|
|
8972
8972
|
return e;
|
|
8973
8973
|
}
|
|
8974
|
-
function
|
|
8974
|
+
function Et(e) {
|
|
8975
8975
|
const t = oi(null);
|
|
8976
8976
|
for (const [n, r] of Gc(e))
|
|
8977
|
-
at(e, n) && (Array.isArray(r) ? t[n] = W0(r) : r && typeof r == "object" && r.constructor === Object ? t[n] =
|
|
8977
|
+
at(e, n) && (Array.isArray(r) ? t[n] = W0(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Et(r) : t[n] = r);
|
|
8978
8978
|
return t;
|
|
8979
8979
|
}
|
|
8980
8980
|
function On(e, t) {
|
|
@@ -9099,11 +9099,11 @@ function Jc() {
|
|
|
9099
9099
|
CUSTOM_ELEMENT: ee
|
|
9100
9100
|
} = jo;
|
|
9101
9101
|
let {
|
|
9102
|
-
IS_ALLOWED_URI:
|
|
9102
|
+
IS_ALLOWED_URI: k
|
|
9103
9103
|
} = jo, D = null;
|
|
9104
9104
|
const I = fe({}, [...Mo, ...ps, ...ms, ...gs, ...Io]);
|
|
9105
9105
|
let _ = null;
|
|
9106
|
-
const
|
|
9106
|
+
const E = fe({}, [...Lo, ...ys, ...Fo, ...sr]);
|
|
9107
9107
|
let P = Object.seal(oi(null, {
|
|
9108
9108
|
tagNameCheck: {
|
|
9109
9109
|
writable: !0,
|
|
@@ -9138,7 +9138,7 @@ function Jc() {
|
|
|
9138
9138
|
value: null
|
|
9139
9139
|
}
|
|
9140
9140
|
}));
|
|
9141
|
-
let ae = !0, ne = !0, O = !1, R = !0, z = !1, G = !0, Q = !1, oe = !1,
|
|
9141
|
+
let ae = !0, ne = !0, O = !1, R = !0, z = !1, G = !0, Q = !1, oe = !1, Ee = !1, $e = !1, Pe = !1, Ae = !1, De = !0, pt = !1;
|
|
9142
9142
|
const je = "user-content-";
|
|
9143
9143
|
let At = !0, mt = !1, L = {}, V = null;
|
|
9144
9144
|
const se = fe({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
@@ -9158,8 +9158,8 @@ function Jc() {
|
|
|
9158
9158
|
}, Wi = function() {
|
|
9159
9159
|
let $ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9160
9160
|
if (!(sn && sn === $)) {
|
|
9161
|
-
if ((!$ || typeof $ != "object") && ($ = {}), $ =
|
|
9162
|
-
qf.indexOf($.PARSER_MEDIA_TYPE) === -1 ? Hf : $.PARSER_MEDIA_TYPE, Ne = Sn === "application/xhtml+xml" ? ds : li, D = at($, "ALLOWED_TAGS") ? fe({}, $.ALLOWED_TAGS, Ne) : I, _ = at($, "ALLOWED_ATTR") ? fe({}, $.ALLOWED_ATTR, Ne) :
|
|
9161
|
+
if ((!$ || typeof $ != "object") && ($ = {}), $ = Et($), Sn = // eslint-disable-next-line unicorn/prefer-includes
|
|
9162
|
+
qf.indexOf($.PARSER_MEDIA_TYPE) === -1 ? Hf : $.PARSER_MEDIA_TYPE, Ne = Sn === "application/xhtml+xml" ? ds : li, D = at($, "ALLOWED_TAGS") ? fe({}, $.ALLOWED_TAGS, Ne) : I, _ = at($, "ALLOWED_ATTR") ? fe({}, $.ALLOWED_ATTR, Ne) : E, rt = at($, "ALLOWED_NAMESPACES") ? fe({}, $.ALLOWED_NAMESPACES, ds) : zf, qe = at($, "ADD_URI_SAFE_ATTR") ? fe(Et(_t), $.ADD_URI_SAFE_ATTR, Ne) : _t, le = at($, "ADD_DATA_URI_TAGS") ? fe(Et(ge), $.ADD_DATA_URI_TAGS, Ne) : ge, V = at($, "FORBID_CONTENTS") ? fe({}, $.FORBID_CONTENTS, Ne) : se, M = at($, "FORBID_TAGS") ? fe({}, $.FORBID_TAGS, Ne) : Et({}), X = at($, "FORBID_ATTR") ? fe({}, $.FORBID_ATTR, Ne) : Et({}), L = at($, "USE_PROFILES") ? $.USE_PROFILES : !1, ae = $.ALLOW_ARIA_ATTR !== !1, ne = $.ALLOW_DATA_ATTR !== !1, O = $.ALLOW_UNKNOWN_PROTOCOLS || !1, R = $.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z = $.SAFE_FOR_TEMPLATES || !1, G = $.SAFE_FOR_XML !== !1, Q = $.WHOLE_DOCUMENT || !1, $e = $.RETURN_DOM || !1, Pe = $.RETURN_DOM_FRAGMENT || !1, Ae = $.RETURN_TRUSTED_TYPE || !1, Ee = $.FORCE_BODY || !1, De = $.SANITIZE_DOM !== !1, pt = $.SANITIZE_NAMED_PROPS || !1, At = $.KEEP_CONTENT !== !1, mt = $.IN_PLACE || !1, k = $.ALLOWED_URI_REGEXP || Kc, Oe = $.NAMESPACE || He, Zn = $.MATHML_TEXT_INTEGRATION_POINTS || Zn, Jn = $.HTML_INTEGRATION_POINTS || Jn, P = $.CUSTOM_ELEMENT_HANDLING || {}, $.CUSTOM_ELEMENT_HANDLING && Ma($.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = $.CUSTOM_ELEMENT_HANDLING.tagNameCheck), $.CUSTOM_ELEMENT_HANDLING && Ma($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = $.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), $.CUSTOM_ELEMENT_HANDLING && typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), z && (ne = !1), Pe && ($e = !0), L && (D = fe({}, Io), _ = oi(null), L.html === !0 && (fe(D, Mo), fe(_, Lo)), L.svg === !0 && (fe(D, ps), fe(_, ys), fe(_, sr)), L.svgFilters === !0 && (fe(D, ms), fe(_, ys), fe(_, sr)), L.mathMl === !0 && (fe(D, gs), fe(_, Fo), fe(_, sr))), at($, "ADD_TAGS") || (J.tagCheck = null), at($, "ADD_ATTR") || (J.attributeCheck = null), $.ADD_TAGS && (typeof $.ADD_TAGS == "function" ? J.tagCheck = $.ADD_TAGS : (D === I && (D = Et(D)), fe(D, $.ADD_TAGS, Ne))), $.ADD_ATTR && (typeof $.ADD_ATTR == "function" ? J.attributeCheck = $.ADD_ATTR : (_ === E && (_ = Et(_)), fe(_, $.ADD_ATTR, Ne))), $.ADD_URI_SAFE_ATTR && fe(qe, $.ADD_URI_SAFE_ATTR, Ne), $.FORBID_CONTENTS && (V === se && (V = Et(V)), fe(V, $.FORBID_CONTENTS, Ne)), $.ADD_FORBID_CONTENTS && (V === se && (V = Et(V)), fe(V, $.ADD_FORBID_CONTENTS, Ne)), At && (D["#text"] = !0), Q && fe(D, ["html", "head", "body"]), D.table && (fe(D, ["tbody"]), delete M.tbody), $.TRUSTED_TYPES_POLICY) {
|
|
9163
9163
|
if (typeof $.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
9164
9164
|
throw $n('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
9165
9165
|
if (typeof $.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -9177,7 +9177,7 @@ function Jc() {
|
|
|
9177
9177
|
});
|
|
9178
9178
|
const te = li($.tagName), Se = li(W.tagName);
|
|
9179
9179
|
return rt[$.namespaceURI] ? $.namespaceURI === vt ? W.namespaceURI === He ? te === "svg" : W.namespaceURI === Xe ? te === "svg" && (Se === "annotation-xml" || Zn[Se]) : !!Ia[te] : $.namespaceURI === Xe ? W.namespaceURI === He ? te === "math" : W.namespaceURI === vt ? te === "math" && Jn[Se] : !!La[te] : $.namespaceURI === He ? W.namespaceURI === vt && !Jn[Se] || W.namespaceURI === Xe && !Zn[Se] ? !1 : !La[te] && (Uf[te] || !Ia[te]) : !!(Sn === "application/xhtml+xml" && rt[$.namespaceURI]) : !1;
|
|
9180
|
-
},
|
|
9180
|
+
}, kt = function($) {
|
|
9181
9181
|
An(t.removed, {
|
|
9182
9182
|
element: $
|
|
9183
9183
|
});
|
|
@@ -9201,7 +9201,7 @@ function Jc() {
|
|
|
9201
9201
|
if (W.removeAttribute($), $ === "is")
|
|
9202
9202
|
if ($e || Pe)
|
|
9203
9203
|
try {
|
|
9204
|
-
|
|
9204
|
+
kt(W);
|
|
9205
9205
|
} catch {
|
|
9206
9206
|
}
|
|
9207
9207
|
else
|
|
@@ -9211,7 +9211,7 @@ function Jc() {
|
|
|
9211
9211
|
}
|
|
9212
9212
|
}, Fa = function($) {
|
|
9213
9213
|
let W = null, te = null;
|
|
9214
|
-
if (
|
|
9214
|
+
if (Ee)
|
|
9215
9215
|
$ = "<remove></remove>" + $;
|
|
9216
9216
|
else {
|
|
9217
9217
|
const Ce = hs($, /^[\r\n\t ]+/);
|
|
@@ -9254,13 +9254,13 @@ function Jc() {
|
|
|
9254
9254
|
const Ua = function($) {
|
|
9255
9255
|
let W = null;
|
|
9256
9256
|
if (Dt(C.beforeSanitizeElements, $, null), Yi($))
|
|
9257
|
-
return
|
|
9257
|
+
return kt($), !0;
|
|
9258
9258
|
const te = Ne($.nodeName);
|
|
9259
9259
|
if (Dt(C.uponSanitizeElement, $, {
|
|
9260
9260
|
tagName: te,
|
|
9261
9261
|
allowedTags: D
|
|
9262
9262
|
}), G && $.hasChildNodes() && !za($.firstElementChild) && Be(/<[/\w!]/g, $.innerHTML) && Be(/<[/\w!]/g, $.textContent) || $.nodeType === Cn.progressingInstruction || G && $.nodeType === Cn.comment && Be(/<[/\w]/g, $.data))
|
|
9263
|
-
return
|
|
9263
|
+
return kt($), !0;
|
|
9264
9264
|
if (!(J.tagCheck instanceof Function && J.tagCheck(te)) && (!D[te] || M[te])) {
|
|
9265
9265
|
if (!M[te] && Ha(te) && (P.tagNameCheck instanceof RegExp && Be(P.tagNameCheck, te) || P.tagNameCheck instanceof Function && P.tagNameCheck(te)))
|
|
9266
9266
|
return !1;
|
|
@@ -9274,9 +9274,9 @@ function Jc() {
|
|
|
9274
9274
|
}
|
|
9275
9275
|
}
|
|
9276
9276
|
}
|
|
9277
|
-
return
|
|
9277
|
+
return kt($), !0;
|
|
9278
9278
|
}
|
|
9279
|
-
return $ instanceof l && !Vf($) || (te === "noscript" || te === "noembed" || te === "noframes") && Be(/<\/no(script|embed|frames)/i, $.innerHTML) ? (
|
|
9279
|
+
return $ instanceof l && !Vf($) || (te === "noscript" || te === "noembed" || te === "noframes") && Be(/<\/no(script|embed|frames)/i, $.innerHTML) ? (kt($), !0) : (z && $.nodeType === Cn.text && (W = $.textContent, ir([U, K, H], (Se) => {
|
|
9280
9280
|
W = Dn(W, Se, " ");
|
|
9281
9281
|
}), $.textContent !== W && (An(t.removed, {
|
|
9282
9282
|
element: $.cloneNode()
|
|
@@ -9297,7 +9297,7 @@ function Jc() {
|
|
|
9297
9297
|
W === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && Be(P.tagNameCheck, te) || P.tagNameCheck instanceof Function && P.tagNameCheck(te)))
|
|
9298
9298
|
) return !1;
|
|
9299
9299
|
} else if (!qe[W]) {
|
|
9300
|
-
if (!Be(
|
|
9300
|
+
if (!Be(k, Dn(te, q, ""))) {
|
|
9301
9301
|
if (!((W === "src" || W === "xlink:href" || W === "href") && $ !== "script" && H0(te, "data:") === 0 && le[$])) {
|
|
9302
9302
|
if (!(O && !Be(Z, Dn(te, q, "")))) {
|
|
9303
9303
|
if (te)
|
|
@@ -9373,7 +9373,7 @@ function Jc() {
|
|
|
9373
9373
|
}
|
|
9374
9374
|
if (Le !== Gi)
|
|
9375
9375
|
try {
|
|
9376
|
-
Qe ? $.setAttributeNS(Qe, Ce, Le) : $.setAttribute(Ce, Le), Yi($) ?
|
|
9376
|
+
Qe ? $.setAttributeNS(Qe, Ce, Le) : $.setAttribute(Ce, Le), Yi($) ? kt($) : No(t.removed);
|
|
9377
9377
|
} catch {
|
|
9378
9378
|
Bt(Ce, $);
|
|
9379
9379
|
}
|
|
@@ -9411,7 +9411,7 @@ function Jc() {
|
|
|
9411
9411
|
if (W = Fa(re), !W)
|
|
9412
9412
|
return $e ? null : Ae ? v : "";
|
|
9413
9413
|
}
|
|
9414
|
-
W &&
|
|
9414
|
+
W && Ee && kt(W.firstChild);
|
|
9415
9415
|
const Ce = ja(mt ? re : W);
|
|
9416
9416
|
for (; Se = Ce.nextNode(); )
|
|
9417
9417
|
Ua(Se), Ba(Se), Se.content instanceof s && Wf(Se.content);
|
|
@@ -9949,126 +9949,126 @@ function he() {
|
|
|
9949
9949
|
optimizeNodes() {
|
|
9950
9950
|
return this;
|
|
9951
9951
|
}
|
|
9952
|
-
optimizeNames(
|
|
9952
|
+
optimizeNames(E, P) {
|
|
9953
9953
|
return this;
|
|
9954
9954
|
}
|
|
9955
9955
|
}
|
|
9956
9956
|
class a extends s {
|
|
9957
|
-
constructor(
|
|
9958
|
-
super(), this.varKind =
|
|
9957
|
+
constructor(E, P, M) {
|
|
9958
|
+
super(), this.varKind = E, this.name = P, this.rhs = M;
|
|
9959
9959
|
}
|
|
9960
|
-
render({ es5:
|
|
9961
|
-
const M =
|
|
9960
|
+
render({ es5: E, _n: P }) {
|
|
9961
|
+
const M = E ? n.varKinds.var : this.varKind, X = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
9962
9962
|
return `${M} ${this.name}${X};` + P;
|
|
9963
9963
|
}
|
|
9964
|
-
optimizeNames(
|
|
9965
|
-
if (
|
|
9966
|
-
return this.rhs && (this.rhs = H(this.rhs,
|
|
9964
|
+
optimizeNames(E, P) {
|
|
9965
|
+
if (E[this.name.str])
|
|
9966
|
+
return this.rhs && (this.rhs = H(this.rhs, E, P)), this;
|
|
9967
9967
|
}
|
|
9968
9968
|
get names() {
|
|
9969
9969
|
return this.rhs instanceof t._CodeOrName ? this.rhs.names : {};
|
|
9970
9970
|
}
|
|
9971
9971
|
}
|
|
9972
9972
|
class o extends s {
|
|
9973
|
-
constructor(
|
|
9974
|
-
super(), this.lhs =
|
|
9973
|
+
constructor(E, P, M) {
|
|
9974
|
+
super(), this.lhs = E, this.rhs = P, this.sideEffects = M;
|
|
9975
9975
|
}
|
|
9976
|
-
render({ _n:
|
|
9977
|
-
return `${this.lhs} = ${this.rhs};` +
|
|
9976
|
+
render({ _n: E }) {
|
|
9977
|
+
return `${this.lhs} = ${this.rhs};` + E;
|
|
9978
9978
|
}
|
|
9979
|
-
optimizeNames(
|
|
9980
|
-
if (!(this.lhs instanceof t.Name && !
|
|
9981
|
-
return this.rhs = H(this.rhs,
|
|
9979
|
+
optimizeNames(E, P) {
|
|
9980
|
+
if (!(this.lhs instanceof t.Name && !E[this.lhs.str] && !this.sideEffects))
|
|
9981
|
+
return this.rhs = H(this.rhs, E, P), this;
|
|
9982
9982
|
}
|
|
9983
9983
|
get names() {
|
|
9984
|
-
const
|
|
9985
|
-
return K(
|
|
9984
|
+
const E = this.lhs instanceof t.Name ? {} : { ...this.lhs.names };
|
|
9985
|
+
return K(E, this.rhs);
|
|
9986
9986
|
}
|
|
9987
9987
|
}
|
|
9988
9988
|
class l extends o {
|
|
9989
|
-
constructor(
|
|
9990
|
-
super(
|
|
9989
|
+
constructor(E, P, M, X) {
|
|
9990
|
+
super(E, M, X), this.op = P;
|
|
9991
9991
|
}
|
|
9992
|
-
render({ _n:
|
|
9993
|
-
return `${this.lhs} ${this.op}= ${this.rhs};` +
|
|
9992
|
+
render({ _n: E }) {
|
|
9993
|
+
return `${this.lhs} ${this.op}= ${this.rhs};` + E;
|
|
9994
9994
|
}
|
|
9995
9995
|
}
|
|
9996
9996
|
class u extends s {
|
|
9997
|
-
constructor(
|
|
9998
|
-
super(), this.label =
|
|
9997
|
+
constructor(E) {
|
|
9998
|
+
super(), this.label = E, this.names = {};
|
|
9999
9999
|
}
|
|
10000
|
-
render({ _n:
|
|
10001
|
-
return `${this.label}:` +
|
|
10000
|
+
render({ _n: E }) {
|
|
10001
|
+
return `${this.label}:` + E;
|
|
10002
10002
|
}
|
|
10003
10003
|
}
|
|
10004
10004
|
class c extends s {
|
|
10005
|
-
constructor(
|
|
10006
|
-
super(), this.label =
|
|
10005
|
+
constructor(E) {
|
|
10006
|
+
super(), this.label = E, this.names = {};
|
|
10007
10007
|
}
|
|
10008
|
-
render({ _n:
|
|
10009
|
-
return `break${this.label ? ` ${this.label}` : ""};` +
|
|
10008
|
+
render({ _n: E }) {
|
|
10009
|
+
return `break${this.label ? ` ${this.label}` : ""};` + E;
|
|
10010
10010
|
}
|
|
10011
10011
|
}
|
|
10012
10012
|
class f extends s {
|
|
10013
|
-
constructor(
|
|
10014
|
-
super(), this.error =
|
|
10013
|
+
constructor(E) {
|
|
10014
|
+
super(), this.error = E;
|
|
10015
10015
|
}
|
|
10016
|
-
render({ _n:
|
|
10017
|
-
return `throw ${this.error};` +
|
|
10016
|
+
render({ _n: E }) {
|
|
10017
|
+
return `throw ${this.error};` + E;
|
|
10018
10018
|
}
|
|
10019
10019
|
get names() {
|
|
10020
10020
|
return this.error.names;
|
|
10021
10021
|
}
|
|
10022
10022
|
}
|
|
10023
10023
|
class h extends s {
|
|
10024
|
-
constructor(
|
|
10025
|
-
super(), this.code =
|
|
10024
|
+
constructor(E) {
|
|
10025
|
+
super(), this.code = E;
|
|
10026
10026
|
}
|
|
10027
|
-
render({ _n:
|
|
10028
|
-
return `${this.code};` +
|
|
10027
|
+
render({ _n: E }) {
|
|
10028
|
+
return `${this.code};` + E;
|
|
10029
10029
|
}
|
|
10030
10030
|
optimizeNodes() {
|
|
10031
10031
|
return `${this.code}` ? this : void 0;
|
|
10032
10032
|
}
|
|
10033
|
-
optimizeNames(
|
|
10034
|
-
return this.code = H(this.code,
|
|
10033
|
+
optimizeNames(E, P) {
|
|
10034
|
+
return this.code = H(this.code, E, P), this;
|
|
10035
10035
|
}
|
|
10036
10036
|
get names() {
|
|
10037
10037
|
return this.code instanceof t._CodeOrName ? this.code.names : {};
|
|
10038
10038
|
}
|
|
10039
10039
|
}
|
|
10040
10040
|
class d extends s {
|
|
10041
|
-
constructor(
|
|
10042
|
-
super(), this.nodes =
|
|
10041
|
+
constructor(E = []) {
|
|
10042
|
+
super(), this.nodes = E;
|
|
10043
10043
|
}
|
|
10044
|
-
render(
|
|
10045
|
-
return this.nodes.reduce((P, M) => P + M.render(
|
|
10044
|
+
render(E) {
|
|
10045
|
+
return this.nodes.reduce((P, M) => P + M.render(E), "");
|
|
10046
10046
|
}
|
|
10047
10047
|
optimizeNodes() {
|
|
10048
|
-
const { nodes:
|
|
10049
|
-
let P =
|
|
10048
|
+
const { nodes: E } = this;
|
|
10049
|
+
let P = E.length;
|
|
10050
10050
|
for (; P--; ) {
|
|
10051
|
-
const M =
|
|
10052
|
-
Array.isArray(M) ?
|
|
10051
|
+
const M = E[P].optimizeNodes();
|
|
10052
|
+
Array.isArray(M) ? E.splice(P, 1, ...M) : M ? E[P] = M : E.splice(P, 1);
|
|
10053
10053
|
}
|
|
10054
|
-
return
|
|
10054
|
+
return E.length > 0 ? this : void 0;
|
|
10055
10055
|
}
|
|
10056
|
-
optimizeNames(
|
|
10056
|
+
optimizeNames(E, P) {
|
|
10057
10057
|
const { nodes: M } = this;
|
|
10058
10058
|
let X = M.length;
|
|
10059
10059
|
for (; X--; ) {
|
|
10060
10060
|
const J = M[X];
|
|
10061
|
-
J.optimizeNames(
|
|
10061
|
+
J.optimizeNames(E, P) || (j(E, J.names), M.splice(X, 1));
|
|
10062
10062
|
}
|
|
10063
10063
|
return M.length > 0 ? this : void 0;
|
|
10064
10064
|
}
|
|
10065
10065
|
get names() {
|
|
10066
|
-
return this.nodes.reduce((
|
|
10066
|
+
return this.nodes.reduce((E, P) => U(E, P.names), {});
|
|
10067
10067
|
}
|
|
10068
10068
|
}
|
|
10069
10069
|
class g extends d {
|
|
10070
|
-
render(
|
|
10071
|
-
return "{" +
|
|
10070
|
+
render(E) {
|
|
10071
|
+
return "{" + E._n + super.render(E) + "}" + E._n;
|
|
10072
10072
|
}
|
|
10073
10073
|
}
|
|
10074
10074
|
class T extends d {
|
|
@@ -10077,17 +10077,17 @@ function he() {
|
|
|
10077
10077
|
}
|
|
10078
10078
|
y.kind = "else";
|
|
10079
10079
|
class m extends g {
|
|
10080
|
-
constructor(
|
|
10081
|
-
super(P), this.condition =
|
|
10080
|
+
constructor(E, P) {
|
|
10081
|
+
super(P), this.condition = E;
|
|
10082
10082
|
}
|
|
10083
|
-
render(
|
|
10084
|
-
let P = `if(${this.condition})` + super.render(
|
|
10085
|
-
return this.else && (P += "else " + this.else.render(
|
|
10083
|
+
render(E) {
|
|
10084
|
+
let P = `if(${this.condition})` + super.render(E);
|
|
10085
|
+
return this.else && (P += "else " + this.else.render(E)), P;
|
|
10086
10086
|
}
|
|
10087
10087
|
optimizeNodes() {
|
|
10088
10088
|
super.optimizeNodes();
|
|
10089
|
-
const
|
|
10090
|
-
if (
|
|
10089
|
+
const E = this.condition;
|
|
10090
|
+
if (E === !0)
|
|
10091
10091
|
return this.nodes;
|
|
10092
10092
|
let P = this.else;
|
|
10093
10093
|
if (P) {
|
|
@@ -10095,18 +10095,18 @@ function he() {
|
|
|
10095
10095
|
P = this.else = Array.isArray(M) ? new y(M) : M;
|
|
10096
10096
|
}
|
|
10097
10097
|
if (P)
|
|
10098
|
-
return
|
|
10099
|
-
if (!(
|
|
10098
|
+
return E === !1 ? P instanceof m ? P : P.nodes : this.nodes.length ? this : new m(B(E), P instanceof m ? [P] : P.nodes);
|
|
10099
|
+
if (!(E === !1 || !this.nodes.length))
|
|
10100
10100
|
return this;
|
|
10101
10101
|
}
|
|
10102
|
-
optimizeNames(
|
|
10102
|
+
optimizeNames(E, P) {
|
|
10103
10103
|
var M;
|
|
10104
|
-
if (this.else = (M = this.else) === null || M === void 0 ? void 0 : M.optimizeNames(
|
|
10105
|
-
return this.condition = H(this.condition,
|
|
10104
|
+
if (this.else = (M = this.else) === null || M === void 0 ? void 0 : M.optimizeNames(E, P), !!(super.optimizeNames(E, P) || this.else))
|
|
10105
|
+
return this.condition = H(this.condition, E, P), this;
|
|
10106
10106
|
}
|
|
10107
10107
|
get names() {
|
|
10108
|
-
const
|
|
10109
|
-
return K(
|
|
10108
|
+
const E = super.names;
|
|
10109
|
+
return K(E, this.condition), this.else && U(E, this.else.names), E;
|
|
10110
10110
|
}
|
|
10111
10111
|
}
|
|
10112
10112
|
m.kind = "if";
|
|
@@ -10114,166 +10114,166 @@ function he() {
|
|
|
10114
10114
|
}
|
|
10115
10115
|
p.kind = "for";
|
|
10116
10116
|
class b extends p {
|
|
10117
|
-
constructor(
|
|
10118
|
-
super(), this.iteration =
|
|
10117
|
+
constructor(E) {
|
|
10118
|
+
super(), this.iteration = E;
|
|
10119
10119
|
}
|
|
10120
|
-
render(
|
|
10121
|
-
return `for(${this.iteration})` + super.render(
|
|
10120
|
+
render(E) {
|
|
10121
|
+
return `for(${this.iteration})` + super.render(E);
|
|
10122
10122
|
}
|
|
10123
|
-
optimizeNames(
|
|
10124
|
-
if (super.optimizeNames(
|
|
10125
|
-
return this.iteration = H(this.iteration,
|
|
10123
|
+
optimizeNames(E, P) {
|
|
10124
|
+
if (super.optimizeNames(E, P))
|
|
10125
|
+
return this.iteration = H(this.iteration, E, P), this;
|
|
10126
10126
|
}
|
|
10127
10127
|
get names() {
|
|
10128
10128
|
return U(super.names, this.iteration.names);
|
|
10129
10129
|
}
|
|
10130
10130
|
}
|
|
10131
10131
|
class S extends p {
|
|
10132
|
-
constructor(
|
|
10133
|
-
super(), this.varKind =
|
|
10132
|
+
constructor(E, P, M, X) {
|
|
10133
|
+
super(), this.varKind = E, this.name = P, this.from = M, this.to = X;
|
|
10134
10134
|
}
|
|
10135
|
-
render(
|
|
10136
|
-
const P =
|
|
10137
|
-
return `for(${P} ${M}=${X}; ${M}<${J}; ${M}++)` + super.render(
|
|
10135
|
+
render(E) {
|
|
10136
|
+
const P = E.es5 ? n.varKinds.var : this.varKind, { name: M, from: X, to: J } = this;
|
|
10137
|
+
return `for(${P} ${M}=${X}; ${M}<${J}; ${M}++)` + super.render(E);
|
|
10138
10138
|
}
|
|
10139
10139
|
get names() {
|
|
10140
|
-
const
|
|
10141
|
-
return K(
|
|
10140
|
+
const E = K(super.names, this.from);
|
|
10141
|
+
return K(E, this.to);
|
|
10142
10142
|
}
|
|
10143
10143
|
}
|
|
10144
10144
|
class v extends p {
|
|
10145
|
-
constructor(
|
|
10146
|
-
super(), this.loop =
|
|
10145
|
+
constructor(E, P, M, X) {
|
|
10146
|
+
super(), this.loop = E, this.varKind = P, this.name = M, this.iterable = X;
|
|
10147
10147
|
}
|
|
10148
|
-
render(
|
|
10149
|
-
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(
|
|
10148
|
+
render(E) {
|
|
10149
|
+
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(E);
|
|
10150
10150
|
}
|
|
10151
|
-
optimizeNames(
|
|
10152
|
-
if (super.optimizeNames(
|
|
10153
|
-
return this.iterable = H(this.iterable,
|
|
10151
|
+
optimizeNames(E, P) {
|
|
10152
|
+
if (super.optimizeNames(E, P))
|
|
10153
|
+
return this.iterable = H(this.iterable, E, P), this;
|
|
10154
10154
|
}
|
|
10155
10155
|
get names() {
|
|
10156
10156
|
return U(super.names, this.iterable.names);
|
|
10157
10157
|
}
|
|
10158
10158
|
}
|
|
10159
10159
|
class w extends g {
|
|
10160
|
-
constructor(
|
|
10161
|
-
super(), this.name =
|
|
10160
|
+
constructor(E, P, M) {
|
|
10161
|
+
super(), this.name = E, this.args = P, this.async = M;
|
|
10162
10162
|
}
|
|
10163
|
-
render(
|
|
10164
|
-
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(
|
|
10163
|
+
render(E) {
|
|
10164
|
+
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(E);
|
|
10165
10165
|
}
|
|
10166
10166
|
}
|
|
10167
10167
|
w.kind = "func";
|
|
10168
10168
|
class x extends d {
|
|
10169
|
-
render(
|
|
10170
|
-
return "return " + super.render(
|
|
10169
|
+
render(E) {
|
|
10170
|
+
return "return " + super.render(E);
|
|
10171
10171
|
}
|
|
10172
10172
|
}
|
|
10173
10173
|
x.kind = "return";
|
|
10174
10174
|
class N extends g {
|
|
10175
|
-
render(
|
|
10176
|
-
let P = "try" + super.render(
|
|
10177
|
-
return this.catch && (P += this.catch.render(
|
|
10175
|
+
render(E) {
|
|
10176
|
+
let P = "try" + super.render(E);
|
|
10177
|
+
return this.catch && (P += this.catch.render(E)), this.finally && (P += this.finally.render(E)), P;
|
|
10178
10178
|
}
|
|
10179
10179
|
optimizeNodes() {
|
|
10180
|
-
var
|
|
10181
|
-
return super.optimizeNodes(), (
|
|
10180
|
+
var E, P;
|
|
10181
|
+
return super.optimizeNodes(), (E = this.catch) === null || E === void 0 || E.optimizeNodes(), (P = this.finally) === null || P === void 0 || P.optimizeNodes(), this;
|
|
10182
10182
|
}
|
|
10183
|
-
optimizeNames(
|
|
10183
|
+
optimizeNames(E, P) {
|
|
10184
10184
|
var M, X;
|
|
10185
|
-
return super.optimizeNames(
|
|
10185
|
+
return super.optimizeNames(E, P), (M = this.catch) === null || M === void 0 || M.optimizeNames(E, P), (X = this.finally) === null || X === void 0 || X.optimizeNames(E, P), this;
|
|
10186
10186
|
}
|
|
10187
10187
|
get names() {
|
|
10188
|
-
const
|
|
10189
|
-
return this.catch && U(
|
|
10188
|
+
const E = super.names;
|
|
10189
|
+
return this.catch && U(E, this.catch.names), this.finally && U(E, this.finally.names), E;
|
|
10190
10190
|
}
|
|
10191
10191
|
}
|
|
10192
10192
|
class F extends g {
|
|
10193
|
-
constructor(
|
|
10194
|
-
super(), this.error =
|
|
10193
|
+
constructor(E) {
|
|
10194
|
+
super(), this.error = E;
|
|
10195
10195
|
}
|
|
10196
|
-
render(
|
|
10197
|
-
return `catch(${this.error})` + super.render(
|
|
10196
|
+
render(E) {
|
|
10197
|
+
return `catch(${this.error})` + super.render(E);
|
|
10198
10198
|
}
|
|
10199
10199
|
}
|
|
10200
10200
|
F.kind = "catch";
|
|
10201
10201
|
class A extends g {
|
|
10202
|
-
render(
|
|
10203
|
-
return "finally" + super.render(
|
|
10202
|
+
render(E) {
|
|
10203
|
+
return "finally" + super.render(E);
|
|
10204
10204
|
}
|
|
10205
10205
|
}
|
|
10206
10206
|
A.kind = "finally";
|
|
10207
10207
|
class C {
|
|
10208
|
-
constructor(
|
|
10208
|
+
constructor(E, P = {}) {
|
|
10209
10209
|
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...P, _n: P.lines ? `
|
|
10210
|
-
` : "" }, this._extScope =
|
|
10210
|
+
` : "" }, this._extScope = E, this._scope = new n.Scope({ parent: E }), this._nodes = [new T()];
|
|
10211
10211
|
}
|
|
10212
10212
|
toString() {
|
|
10213
10213
|
return this._root.render(this.opts);
|
|
10214
10214
|
}
|
|
10215
10215
|
// returns unique name in the internal scope
|
|
10216
|
-
name(
|
|
10217
|
-
return this._scope.name(
|
|
10216
|
+
name(E) {
|
|
10217
|
+
return this._scope.name(E);
|
|
10218
10218
|
}
|
|
10219
10219
|
// reserves unique name in the external scope
|
|
10220
|
-
scopeName(
|
|
10221
|
-
return this._extScope.name(
|
|
10220
|
+
scopeName(E) {
|
|
10221
|
+
return this._extScope.name(E);
|
|
10222
10222
|
}
|
|
10223
10223
|
// reserves unique name in the external scope and assigns value to it
|
|
10224
|
-
scopeValue(
|
|
10225
|
-
const M = this._extScope.value(
|
|
10224
|
+
scopeValue(E, P) {
|
|
10225
|
+
const M = this._extScope.value(E, P);
|
|
10226
10226
|
return (this._values[M.prefix] || (this._values[M.prefix] = /* @__PURE__ */ new Set())).add(M), M;
|
|
10227
10227
|
}
|
|
10228
|
-
getScopeValue(
|
|
10229
|
-
return this._extScope.getValue(
|
|
10228
|
+
getScopeValue(E, P) {
|
|
10229
|
+
return this._extScope.getValue(E, P);
|
|
10230
10230
|
}
|
|
10231
10231
|
// return code that assigns values in the external scope to the names that are used internally
|
|
10232
10232
|
// (same names that were returned by gen.scopeName or gen.scopeValue)
|
|
10233
|
-
scopeRefs(
|
|
10234
|
-
return this._extScope.scopeRefs(
|
|
10233
|
+
scopeRefs(E) {
|
|
10234
|
+
return this._extScope.scopeRefs(E, this._values);
|
|
10235
10235
|
}
|
|
10236
10236
|
scopeCode() {
|
|
10237
10237
|
return this._extScope.scopeCode(this._values);
|
|
10238
10238
|
}
|
|
10239
|
-
_def(
|
|
10239
|
+
_def(E, P, M, X) {
|
|
10240
10240
|
const J = this._scope.toName(P);
|
|
10241
|
-
return M !== void 0 && X && (this._constants[J.str] = M), this._leafNode(new a(
|
|
10241
|
+
return M !== void 0 && X && (this._constants[J.str] = M), this._leafNode(new a(E, J, M)), J;
|
|
10242
10242
|
}
|
|
10243
10243
|
// `const` declaration (`var` in es5 mode)
|
|
10244
|
-
const(
|
|
10245
|
-
return this._def(n.varKinds.const,
|
|
10244
|
+
const(E, P, M) {
|
|
10245
|
+
return this._def(n.varKinds.const, E, P, M);
|
|
10246
10246
|
}
|
|
10247
10247
|
// `let` declaration with optional assignment (`var` in es5 mode)
|
|
10248
|
-
let(
|
|
10249
|
-
return this._def(n.varKinds.let,
|
|
10248
|
+
let(E, P, M) {
|
|
10249
|
+
return this._def(n.varKinds.let, E, P, M);
|
|
10250
10250
|
}
|
|
10251
10251
|
// `var` declaration with optional assignment
|
|
10252
|
-
var(
|
|
10253
|
-
return this._def(n.varKinds.var,
|
|
10252
|
+
var(E, P, M) {
|
|
10253
|
+
return this._def(n.varKinds.var, E, P, M);
|
|
10254
10254
|
}
|
|
10255
10255
|
// assignment code
|
|
10256
|
-
assign(
|
|
10257
|
-
return this._leafNode(new o(
|
|
10256
|
+
assign(E, P, M) {
|
|
10257
|
+
return this._leafNode(new o(E, P, M));
|
|
10258
10258
|
}
|
|
10259
10259
|
// `+=` code
|
|
10260
|
-
add(
|
|
10261
|
-
return this._leafNode(new l(
|
|
10260
|
+
add(E, P) {
|
|
10261
|
+
return this._leafNode(new l(E, e.operators.ADD, P));
|
|
10262
10262
|
}
|
|
10263
10263
|
// appends passed SafeExpr to code or executes Block
|
|
10264
|
-
code(
|
|
10265
|
-
return typeof
|
|
10264
|
+
code(E) {
|
|
10265
|
+
return typeof E == "function" ? E() : E !== t.nil && this._leafNode(new h(E)), this;
|
|
10266
10266
|
}
|
|
10267
10267
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
10268
|
-
object(...
|
|
10268
|
+
object(...E) {
|
|
10269
10269
|
const P = ["{"];
|
|
10270
|
-
for (const [M, X] of
|
|
10270
|
+
for (const [M, X] of E)
|
|
10271
10271
|
P.length > 1 && P.push(","), P.push(M), (M !== X || this.opts.es5) && (P.push(":"), (0, t.addCodeArg)(P, X));
|
|
10272
10272
|
return P.push("}"), new t._Code(P);
|
|
10273
10273
|
}
|
|
10274
10274
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
10275
|
-
if(
|
|
10276
|
-
if (this._blockNode(new m(
|
|
10275
|
+
if(E, P, M) {
|
|
10276
|
+
if (this._blockNode(new m(E)), P && M)
|
|
10277
10277
|
this.code(P).else().code(M).endIf();
|
|
10278
10278
|
else if (P)
|
|
10279
10279
|
this.code(P).endIf();
|
|
@@ -10282,8 +10282,8 @@ function he() {
|
|
|
10282
10282
|
return this;
|
|
10283
10283
|
}
|
|
10284
10284
|
// `else if` clause - invalid without `if` or after `else` clauses
|
|
10285
|
-
elseIf(
|
|
10286
|
-
return this._elseNode(new m(
|
|
10285
|
+
elseIf(E) {
|
|
10286
|
+
return this._elseNode(new m(E));
|
|
10287
10287
|
}
|
|
10288
10288
|
// `else` clause - only valid after `if` or `else if` clauses
|
|
10289
10289
|
else() {
|
|
@@ -10293,21 +10293,21 @@ function he() {
|
|
|
10293
10293
|
endIf() {
|
|
10294
10294
|
return this._endBlockNode(m, y);
|
|
10295
10295
|
}
|
|
10296
|
-
_for(
|
|
10297
|
-
return this._blockNode(
|
|
10296
|
+
_for(E, P) {
|
|
10297
|
+
return this._blockNode(E), P && this.code(P).endFor(), this;
|
|
10298
10298
|
}
|
|
10299
10299
|
// a generic `for` clause (or statement if `forBody` is passed)
|
|
10300
|
-
for(
|
|
10301
|
-
return this._for(new b(
|
|
10300
|
+
for(E, P) {
|
|
10301
|
+
return this._for(new b(E), P);
|
|
10302
10302
|
}
|
|
10303
10303
|
// `for` statement for a range of values
|
|
10304
|
-
forRange(
|
|
10305
|
-
const ae = this._scope.toName(
|
|
10304
|
+
forRange(E, P, M, X, J = this.opts.es5 ? n.varKinds.var : n.varKinds.let) {
|
|
10305
|
+
const ae = this._scope.toName(E);
|
|
10306
10306
|
return this._for(new S(J, ae, P, M), () => X(ae));
|
|
10307
10307
|
}
|
|
10308
10308
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
10309
|
-
forOf(
|
|
10310
|
-
const J = this._scope.toName(
|
|
10309
|
+
forOf(E, P, M, X = n.varKinds.const) {
|
|
10310
|
+
const J = this._scope.toName(E);
|
|
10311
10311
|
if (this.opts.es5) {
|
|
10312
10312
|
const ae = P instanceof t.Name ? P : this.var("_arr", P);
|
|
10313
10313
|
return this.forRange("_i", 0, (0, t._)`${ae}.length`, (ne) => {
|
|
@@ -10318,10 +10318,10 @@ function he() {
|
|
|
10318
10318
|
}
|
|
10319
10319
|
// `for-in` statement.
|
|
10320
10320
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
10321
|
-
forIn(
|
|
10321
|
+
forIn(E, P, M, X = this.opts.es5 ? n.varKinds.var : n.varKinds.const) {
|
|
10322
10322
|
if (this.opts.ownProperties)
|
|
10323
|
-
return this.forOf(
|
|
10324
|
-
const J = this._scope.toName(
|
|
10323
|
+
return this.forOf(E, (0, t._)`Object.keys(${P})`, M);
|
|
10324
|
+
const J = this._scope.toName(E);
|
|
10325
10325
|
return this._for(new v("in", X, J, P), () => M(J));
|
|
10326
10326
|
}
|
|
10327
10327
|
// end `for` loop
|
|
@@ -10329,101 +10329,101 @@ function he() {
|
|
|
10329
10329
|
return this._endBlockNode(p);
|
|
10330
10330
|
}
|
|
10331
10331
|
// `label` statement
|
|
10332
|
-
label(
|
|
10333
|
-
return this._leafNode(new u(
|
|
10332
|
+
label(E) {
|
|
10333
|
+
return this._leafNode(new u(E));
|
|
10334
10334
|
}
|
|
10335
10335
|
// `break` statement
|
|
10336
|
-
break(
|
|
10337
|
-
return this._leafNode(new c(
|
|
10336
|
+
break(E) {
|
|
10337
|
+
return this._leafNode(new c(E));
|
|
10338
10338
|
}
|
|
10339
10339
|
// `return` statement
|
|
10340
|
-
return(
|
|
10340
|
+
return(E) {
|
|
10341
10341
|
const P = new x();
|
|
10342
|
-
if (this._blockNode(P), this.code(
|
|
10342
|
+
if (this._blockNode(P), this.code(E), P.nodes.length !== 1)
|
|
10343
10343
|
throw new Error('CodeGen: "return" should have one node');
|
|
10344
10344
|
return this._endBlockNode(x);
|
|
10345
10345
|
}
|
|
10346
10346
|
// `try` statement
|
|
10347
|
-
try(
|
|
10347
|
+
try(E, P, M) {
|
|
10348
10348
|
if (!P && !M)
|
|
10349
10349
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
10350
10350
|
const X = new N();
|
|
10351
|
-
if (this._blockNode(X), this.code(
|
|
10351
|
+
if (this._blockNode(X), this.code(E), P) {
|
|
10352
10352
|
const J = this.name("e");
|
|
10353
10353
|
this._currNode = X.catch = new F(J), P(J);
|
|
10354
10354
|
}
|
|
10355
10355
|
return M && (this._currNode = X.finally = new A(), this.code(M)), this._endBlockNode(F, A);
|
|
10356
10356
|
}
|
|
10357
10357
|
// `throw` statement
|
|
10358
|
-
throw(
|
|
10359
|
-
return this._leafNode(new f(
|
|
10358
|
+
throw(E) {
|
|
10359
|
+
return this._leafNode(new f(E));
|
|
10360
10360
|
}
|
|
10361
10361
|
// start self-balancing block
|
|
10362
|
-
block(
|
|
10363
|
-
return this._blockStarts.push(this._nodes.length),
|
|
10362
|
+
block(E, P) {
|
|
10363
|
+
return this._blockStarts.push(this._nodes.length), E && this.code(E).endBlock(P), this;
|
|
10364
10364
|
}
|
|
10365
10365
|
// end the current self-balancing block
|
|
10366
|
-
endBlock(
|
|
10366
|
+
endBlock(E) {
|
|
10367
10367
|
const P = this._blockStarts.pop();
|
|
10368
10368
|
if (P === void 0)
|
|
10369
10369
|
throw new Error("CodeGen: not in self-balancing block");
|
|
10370
10370
|
const M = this._nodes.length - P;
|
|
10371
|
-
if (M < 0 ||
|
|
10372
|
-
throw new Error(`CodeGen: wrong number of nodes: ${M} vs ${
|
|
10371
|
+
if (M < 0 || E !== void 0 && M !== E)
|
|
10372
|
+
throw new Error(`CodeGen: wrong number of nodes: ${M} vs ${E} expected`);
|
|
10373
10373
|
return this._nodes.length = P, this;
|
|
10374
10374
|
}
|
|
10375
10375
|
// `function` heading (or definition if funcBody is passed)
|
|
10376
|
-
func(
|
|
10377
|
-
return this._blockNode(new w(
|
|
10376
|
+
func(E, P = t.nil, M, X) {
|
|
10377
|
+
return this._blockNode(new w(E, P, M)), X && this.code(X).endFunc(), this;
|
|
10378
10378
|
}
|
|
10379
10379
|
// end function definition
|
|
10380
10380
|
endFunc() {
|
|
10381
10381
|
return this._endBlockNode(w);
|
|
10382
10382
|
}
|
|
10383
|
-
optimize(
|
|
10384
|
-
for (;
|
|
10383
|
+
optimize(E = 1) {
|
|
10384
|
+
for (; E-- > 0; )
|
|
10385
10385
|
this._root.optimizeNodes(), this._root.optimizeNames(this._root.names, this._constants);
|
|
10386
10386
|
}
|
|
10387
|
-
_leafNode(
|
|
10388
|
-
return this._currNode.nodes.push(
|
|
10387
|
+
_leafNode(E) {
|
|
10388
|
+
return this._currNode.nodes.push(E), this;
|
|
10389
10389
|
}
|
|
10390
|
-
_blockNode(
|
|
10391
|
-
this._currNode.nodes.push(
|
|
10390
|
+
_blockNode(E) {
|
|
10391
|
+
this._currNode.nodes.push(E), this._nodes.push(E);
|
|
10392
10392
|
}
|
|
10393
|
-
_endBlockNode(
|
|
10393
|
+
_endBlockNode(E, P) {
|
|
10394
10394
|
const M = this._currNode;
|
|
10395
|
-
if (M instanceof
|
|
10395
|
+
if (M instanceof E || P && M instanceof P)
|
|
10396
10396
|
return this._nodes.pop(), this;
|
|
10397
|
-
throw new Error(`CodeGen: not in block "${P ? `${
|
|
10397
|
+
throw new Error(`CodeGen: not in block "${P ? `${E.kind}/${P.kind}` : E.kind}"`);
|
|
10398
10398
|
}
|
|
10399
|
-
_elseNode(
|
|
10399
|
+
_elseNode(E) {
|
|
10400
10400
|
const P = this._currNode;
|
|
10401
10401
|
if (!(P instanceof m))
|
|
10402
10402
|
throw new Error('CodeGen: "else" without "if"');
|
|
10403
|
-
return this._currNode = P.else =
|
|
10403
|
+
return this._currNode = P.else = E, this;
|
|
10404
10404
|
}
|
|
10405
10405
|
get _root() {
|
|
10406
10406
|
return this._nodes[0];
|
|
10407
10407
|
}
|
|
10408
10408
|
get _currNode() {
|
|
10409
|
-
const
|
|
10410
|
-
return
|
|
10409
|
+
const E = this._nodes;
|
|
10410
|
+
return E[E.length - 1];
|
|
10411
10411
|
}
|
|
10412
|
-
set _currNode(
|
|
10412
|
+
set _currNode(E) {
|
|
10413
10413
|
const P = this._nodes;
|
|
10414
|
-
P[P.length - 1] =
|
|
10414
|
+
P[P.length - 1] = E;
|
|
10415
10415
|
}
|
|
10416
10416
|
}
|
|
10417
10417
|
e.CodeGen = C;
|
|
10418
|
-
function U(_,
|
|
10419
|
-
for (const P in
|
|
10420
|
-
_[P] = (_[P] || 0) + (
|
|
10418
|
+
function U(_, E) {
|
|
10419
|
+
for (const P in E)
|
|
10420
|
+
_[P] = (_[P] || 0) + (E[P] || 0);
|
|
10421
10421
|
return _;
|
|
10422
10422
|
}
|
|
10423
|
-
function K(_,
|
|
10424
|
-
return
|
|
10423
|
+
function K(_, E) {
|
|
10424
|
+
return E instanceof t._CodeOrName ? U(_, E.names) : _;
|
|
10425
10425
|
}
|
|
10426
|
-
function H(_,
|
|
10426
|
+
function H(_, E, P) {
|
|
10427
10427
|
if (_ instanceof t.Name)
|
|
10428
10428
|
return M(_);
|
|
10429
10429
|
if (!X(_))
|
|
@@ -10431,15 +10431,15 @@ function he() {
|
|
|
10431
10431
|
return new t._Code(_._items.reduce((J, ae) => (ae instanceof t.Name && (ae = M(ae)), ae instanceof t._Code ? J.push(...ae._items) : J.push(ae), J), []));
|
|
10432
10432
|
function M(J) {
|
|
10433
10433
|
const ae = P[J.str];
|
|
10434
|
-
return ae === void 0 ||
|
|
10434
|
+
return ae === void 0 || E[J.str] !== 1 ? J : (delete E[J.str], ae);
|
|
10435
10435
|
}
|
|
10436
10436
|
function X(J) {
|
|
10437
|
-
return J instanceof t._Code && J._items.some((ae) => ae instanceof t.Name &&
|
|
10437
|
+
return J instanceof t._Code && J._items.some((ae) => ae instanceof t.Name && E[ae.str] === 1 && P[ae.str] !== void 0);
|
|
10438
10438
|
}
|
|
10439
10439
|
}
|
|
10440
|
-
function j(_,
|
|
10441
|
-
for (const P in
|
|
10442
|
-
_[P] = (_[P] || 0) - (
|
|
10440
|
+
function j(_, E) {
|
|
10441
|
+
for (const P in E)
|
|
10442
|
+
_[P] = (_[P] || 0) - (E[P] || 0);
|
|
10443
10443
|
}
|
|
10444
10444
|
function B(_) {
|
|
10445
10445
|
return typeof _ == "boolean" || typeof _ == "number" || _ === null ? !_ : (0, t._)`!${I(_)}`;
|
|
@@ -10451,12 +10451,12 @@ function he() {
|
|
|
10451
10451
|
}
|
|
10452
10452
|
e.and = q;
|
|
10453
10453
|
const ee = D(e.operators.OR);
|
|
10454
|
-
function
|
|
10454
|
+
function k(..._) {
|
|
10455
10455
|
return _.reduce(ee);
|
|
10456
10456
|
}
|
|
10457
|
-
e.or =
|
|
10457
|
+
e.or = k;
|
|
10458
10458
|
function D(_) {
|
|
10459
|
-
return (
|
|
10459
|
+
return (E, P) => E === t.nil ? P : P === t.nil ? E : (0, t._)`${I(E)} ${_} ${I(P)}`;
|
|
10460
10460
|
}
|
|
10461
10461
|
function I(_) {
|
|
10462
10462
|
return _ instanceof t.Name ? _ : (0, t._)`(${_})`;
|
|
@@ -11221,9 +11221,9 @@ function hb() {
|
|
|
11221
11221
|
}
|
|
11222
11222
|
return Rt.extendSubschemaMode = i, Rt;
|
|
11223
11223
|
}
|
|
11224
|
-
var Ve = {},
|
|
11224
|
+
var Ve = {}, ks, rl;
|
|
11225
11225
|
function ef() {
|
|
11226
|
-
return rl || (rl = 1,
|
|
11226
|
+
return rl || (rl = 1, ks = function e(t, n) {
|
|
11227
11227
|
if (t === n) return !0;
|
|
11228
11228
|
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
11229
11229
|
if (t.constructor !== n.constructor) return !1;
|
|
@@ -11247,13 +11247,13 @@ function ef() {
|
|
|
11247
11247
|
return !0;
|
|
11248
11248
|
}
|
|
11249
11249
|
return t !== t && n !== n;
|
|
11250
|
-
}),
|
|
11250
|
+
}), ks;
|
|
11251
11251
|
}
|
|
11252
|
-
var
|
|
11252
|
+
var Es = { exports: {} }, il;
|
|
11253
11253
|
function pb() {
|
|
11254
|
-
if (il) return
|
|
11254
|
+
if (il) return Es.exports;
|
|
11255
11255
|
il = 1;
|
|
11256
|
-
var e =
|
|
11256
|
+
var e = Es.exports = function(r, i, s) {
|
|
11257
11257
|
typeof i == "function" && (s = i, i = {}), s = i.cb || s;
|
|
11258
11258
|
var a = typeof s == "function" ? s : s.pre || function() {
|
|
11259
11259
|
}, o = s.post || function() {
|
|
@@ -11322,7 +11322,7 @@ function pb() {
|
|
|
11322
11322
|
function n(r) {
|
|
11323
11323
|
return r.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
11324
11324
|
}
|
|
11325
|
-
return
|
|
11325
|
+
return Es.exports;
|
|
11326
11326
|
}
|
|
11327
11327
|
var sl;
|
|
11328
11328
|
function $i() {
|
|
@@ -11412,8 +11412,8 @@ function $i() {
|
|
|
11412
11412
|
if (q = f(j ? ee(j, q) : q), x.has(q))
|
|
11413
11413
|
throw F(q);
|
|
11414
11414
|
x.add(q);
|
|
11415
|
-
let
|
|
11416
|
-
return typeof
|
|
11415
|
+
let k = this.refs[q];
|
|
11416
|
+
return typeof k == "string" && (k = this.refs[k]), typeof k == "object" ? N(A, k.schema, q) : q !== f(H) && (q[0] === "#" ? (N(A, w[q], q), w[q] = A) : this.refs[q] = H), q;
|
|
11417
11417
|
}
|
|
11418
11418
|
function Z(q) {
|
|
11419
11419
|
if (typeof q == "string") {
|
|
@@ -11529,8 +11529,8 @@ function Oi() {
|
|
|
11529
11529
|
if (Q.$comment === !0)
|
|
11530
11530
|
O.code((0, o._)`${l.default.self}.logger.log(${oe})`);
|
|
11531
11531
|
else if (typeof Q.$comment == "function") {
|
|
11532
|
-
const
|
|
11533
|
-
O.code((0, o._)`${l.default.self}.opts.$comment(${oe}, ${
|
|
11532
|
+
const Ee = (0, o.str)`${G}/$comment`, $e = O.scopeValue("root", { ref: R.root });
|
|
11533
|
+
O.code((0, o._)`${l.default.self}.opts.$comment(${oe}, ${Ee}, ${$e}.schema)`);
|
|
11534
11534
|
}
|
|
11535
11535
|
}
|
|
11536
11536
|
function H(O) {
|
|
@@ -11541,7 +11541,7 @@ function Oi() {
|
|
|
11541
11541
|
z instanceof o.Name && O.assign((0, o._)`${R}.props`, z), G instanceof o.Name && O.assign((0, o._)`${R}.items`, G);
|
|
11542
11542
|
}
|
|
11543
11543
|
function B(O, R, z, G) {
|
|
11544
|
-
const { gen: Q, schema: oe, data:
|
|
11544
|
+
const { gen: Q, schema: oe, data: Ee, allErrors: $e, opts: Pe, self: Ae } = O, { RULES: De } = Ae;
|
|
11545
11545
|
if (oe.$ref && (Pe.ignoreKeywordsWithRef || !(0, c.schemaHasRulesButRef)(oe, De))) {
|
|
11546
11546
|
Q.block(() => X(O, "$ref", De.all.$ref.definition));
|
|
11547
11547
|
return;
|
|
@@ -11552,7 +11552,7 @@ function Oi() {
|
|
|
11552
11552
|
pt(De.post);
|
|
11553
11553
|
});
|
|
11554
11554
|
function pt(je) {
|
|
11555
|
-
(0, n.shouldUseGroup)(oe, je) && (je.type ? (Q.if((0, r.checkDataType)(je.type,
|
|
11555
|
+
(0, n.shouldUseGroup)(oe, je) && (je.type ? (Q.if((0, r.checkDataType)(je.type, Ee, Pe.strictNumbers)), Z(O, je), R.length === 1 && R[0] === je.type && z && (Q.else(), (0, r.reportTypeError)(O)), Q.endIf()) : Z(O, je), $e || Q.if((0, o._)`${l.default.errors} === ${G || 0}`));
|
|
11556
11556
|
}
|
|
11557
11557
|
}
|
|
11558
11558
|
function Z(O, R) {
|
|
@@ -11563,7 +11563,7 @@ function Oi() {
|
|
|
11563
11563
|
});
|
|
11564
11564
|
}
|
|
11565
11565
|
function q(O, R) {
|
|
11566
|
-
O.schemaEnv.meta || !O.opts.strictTypes || (ee(O, R), O.opts.allowUnionTypes ||
|
|
11566
|
+
O.schemaEnv.meta || !O.opts.strictTypes || (ee(O, R), O.opts.allowUnionTypes || k(O, R), D(O, O.dataTypes));
|
|
11567
11567
|
}
|
|
11568
11568
|
function ee(O, R) {
|
|
11569
11569
|
if (R.length) {
|
|
@@ -11573,10 +11573,10 @@ function Oi() {
|
|
|
11573
11573
|
}
|
|
11574
11574
|
R.forEach((z) => {
|
|
11575
11575
|
_(O.dataTypes, z) || P(O, `type "${z}" not allowed by context "${O.dataTypes.join(",")}"`);
|
|
11576
|
-
}),
|
|
11576
|
+
}), E(O, R);
|
|
11577
11577
|
}
|
|
11578
11578
|
}
|
|
11579
|
-
function
|
|
11579
|
+
function k(O, R) {
|
|
11580
11580
|
R.length > 1 && !(R.length === 2 && R.includes("null")) && P(O, "use allowUnionTypes to allow union type keyword");
|
|
11581
11581
|
}
|
|
11582
11582
|
function D(O, R) {
|
|
@@ -11585,7 +11585,7 @@ function Oi() {
|
|
|
11585
11585
|
const Q = z[G];
|
|
11586
11586
|
if (typeof Q == "object" && (0, n.shouldUseRule)(O.schema, Q)) {
|
|
11587
11587
|
const { type: oe } = Q.definition;
|
|
11588
|
-
oe.length && !oe.some((
|
|
11588
|
+
oe.length && !oe.some((Ee) => I(R, Ee)) && P(O, `missing type "${oe.join(",")}" for keyword "${G}"`);
|
|
11589
11589
|
}
|
|
11590
11590
|
}
|
|
11591
11591
|
}
|
|
@@ -11595,7 +11595,7 @@ function Oi() {
|
|
|
11595
11595
|
function _(O, R) {
|
|
11596
11596
|
return O.includes(R) || R === "integer" && O.includes("number");
|
|
11597
11597
|
}
|
|
11598
|
-
function
|
|
11598
|
+
function E(O, R) {
|
|
11599
11599
|
const z = [];
|
|
11600
11600
|
for (const G of O.dataTypes)
|
|
11601
11601
|
_(R, G) ? z.push(G) : R.includes("integer") && G === "number" && z.push("integer");
|
|
@@ -11667,13 +11667,13 @@ function Oi() {
|
|
|
11667
11667
|
check$data(R = o.nil, z = o.nil) {
|
|
11668
11668
|
if (!this.$data)
|
|
11669
11669
|
return;
|
|
11670
|
-
const { gen: G, schemaCode: Q, schemaType: oe, def:
|
|
11671
|
-
G.if((0, o.or)((0, o._)`${Q} === undefined`, z)), R !== o.nil && G.assign(R, !0), (oe.length ||
|
|
11670
|
+
const { gen: G, schemaCode: Q, schemaType: oe, def: Ee } = this;
|
|
11671
|
+
G.if((0, o.or)((0, o._)`${Q} === undefined`, z)), R !== o.nil && G.assign(R, !0), (oe.length || Ee.validateSchema) && (G.elseIf(this.invalid$data()), this.$dataError(), R !== o.nil && G.assign(R, !1)), G.else();
|
|
11672
11672
|
}
|
|
11673
11673
|
invalid$data() {
|
|
11674
11674
|
const { gen: R, schemaCode: z, schemaType: G, def: Q, it: oe } = this;
|
|
11675
|
-
return (0, o.or)(
|
|
11676
|
-
function
|
|
11675
|
+
return (0, o.or)(Ee(), $e());
|
|
11676
|
+
function Ee() {
|
|
11677
11677
|
if (G.length) {
|
|
11678
11678
|
if (!(z instanceof o.Name))
|
|
11679
11679
|
throw new Error("ajv implementation error");
|
|
@@ -11735,11 +11735,11 @@ function Oi() {
|
|
|
11735
11735
|
if (oe = z[R - De], !Q)
|
|
11736
11736
|
return oe;
|
|
11737
11737
|
}
|
|
11738
|
-
let
|
|
11738
|
+
let Ee = oe;
|
|
11739
11739
|
const $e = Q.split("/");
|
|
11740
11740
|
for (const Ae of $e)
|
|
11741
|
-
Ae && (oe = (0, o._)`${oe}${(0, o.getProperty)((0, c.unescapeJsonPointer)(Ae))}`,
|
|
11742
|
-
return
|
|
11741
|
+
Ae && (oe = (0, o._)`${oe}${(0, o.getProperty)((0, c.unescapeJsonPointer)(Ae))}`, Ee = (0, o._)`${Ee} && ${oe}`);
|
|
11742
|
+
return Ee;
|
|
11743
11743
|
function Pe(Ae, De) {
|
|
11744
11744
|
return `Cannot access ${Ae} ${De} levels up, current level is ${R}`;
|
|
11745
11745
|
}
|
|
@@ -12247,7 +12247,7 @@ function Tb() {
|
|
|
12247
12247
|
}, xs;
|
|
12248
12248
|
}
|
|
12249
12249
|
var dl;
|
|
12250
|
-
function
|
|
12250
|
+
function kb() {
|
|
12251
12251
|
if (dl) return Nn.exports;
|
|
12252
12252
|
dl = 1;
|
|
12253
12253
|
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: n, normalizeComponentEncoding: r, isIPv4: i, nonSimpleDomain: s } = tf(), { SCHEMES: a, getSchemeHandler: o } = Tb();
|
|
@@ -12338,10 +12338,10 @@ function Eb() {
|
|
|
12338
12338
|
return Nn.exports = T, Nn.exports.default = T, Nn.exports.fastUri = T, Nn.exports;
|
|
12339
12339
|
}
|
|
12340
12340
|
var hl;
|
|
12341
|
-
function
|
|
12341
|
+
function Eb() {
|
|
12342
12342
|
if (hl) return cr;
|
|
12343
12343
|
hl = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
|
|
12344
|
-
const e =
|
|
12344
|
+
const e = kb();
|
|
12345
12345
|
return e.code = 'require("ajv/dist/runtime/uri").default', cr.default = e, cr;
|
|
12346
12346
|
}
|
|
12347
12347
|
var pl;
|
|
@@ -12366,7 +12366,7 @@ function Sb() {
|
|
|
12366
12366
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
12367
12367
|
return n.CodeGen;
|
|
12368
12368
|
} });
|
|
12369
|
-
const r = /* @__PURE__ */ Sa(), i = /* @__PURE__ */ Ci(), s = /* @__PURE__ */ Xc(), a = /* @__PURE__ */ xa(), o = /* @__PURE__ */ he(), l = /* @__PURE__ */ $i(), u = /* @__PURE__ */ bi(), c = /* @__PURE__ */ me(), f = vb, h = /* @__PURE__ */
|
|
12369
|
+
const r = /* @__PURE__ */ Sa(), i = /* @__PURE__ */ Ci(), s = /* @__PURE__ */ Xc(), a = /* @__PURE__ */ xa(), o = /* @__PURE__ */ he(), l = /* @__PURE__ */ $i(), u = /* @__PURE__ */ bi(), c = /* @__PURE__ */ me(), f = vb, h = /* @__PURE__ */ Eb(), d = (k, D) => new RegExp(k, D);
|
|
12370
12370
|
d.code = "new RegExp";
|
|
12371
12371
|
const g = ["removeAdditional", "useDefaults", "coerceTypes"], T = /* @__PURE__ */ new Set([
|
|
12372
12372
|
"validate",
|
|
@@ -12403,27 +12403,27 @@ function Sb() {
|
|
|
12403
12403
|
jsPropertySyntax: "",
|
|
12404
12404
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
12405
12405
|
}, p = 200;
|
|
12406
|
-
function b(
|
|
12407
|
-
var D, I, _,
|
|
12408
|
-
const L =
|
|
12406
|
+
function b(k) {
|
|
12407
|
+
var D, I, _, E, P, M, X, J, ae, ne, O, R, z, G, Q, oe, Ee, $e, Pe, Ae, De, pt, je, At, mt;
|
|
12408
|
+
const L = k.strict, V = (D = k.code) === null || D === void 0 ? void 0 : D.optimize, se = V === !0 || V === void 0 ? 1 : V || 0, le = (_ = (I = k.code) === null || I === void 0 ? void 0 : I.regExp) !== null && _ !== void 0 ? _ : d, ge = (E = k.uriResolver) !== null && E !== void 0 ? E : h.default;
|
|
12409
12409
|
return {
|
|
12410
|
-
strictSchema: (M = (P =
|
|
12411
|
-
strictNumbers: (J = (X =
|
|
12412
|
-
strictTypes: (ne = (ae =
|
|
12413
|
-
strictTuples: (R = (O =
|
|
12414
|
-
strictRequired: (G = (z =
|
|
12415
|
-
code:
|
|
12416
|
-
loopRequired: (Q =
|
|
12417
|
-
loopEnum: (oe =
|
|
12418
|
-
meta: (
|
|
12419
|
-
messages: ($e =
|
|
12420
|
-
inlineRefs: (Pe =
|
|
12421
|
-
schemaId: (Ae =
|
|
12422
|
-
addUsedSchema: (De =
|
|
12423
|
-
validateSchema: (pt =
|
|
12424
|
-
validateFormats: (je =
|
|
12425
|
-
unicodeRegExp: (At =
|
|
12426
|
-
int32range: (mt =
|
|
12410
|
+
strictSchema: (M = (P = k.strictSchema) !== null && P !== void 0 ? P : L) !== null && M !== void 0 ? M : !0,
|
|
12411
|
+
strictNumbers: (J = (X = k.strictNumbers) !== null && X !== void 0 ? X : L) !== null && J !== void 0 ? J : !0,
|
|
12412
|
+
strictTypes: (ne = (ae = k.strictTypes) !== null && ae !== void 0 ? ae : L) !== null && ne !== void 0 ? ne : "log",
|
|
12413
|
+
strictTuples: (R = (O = k.strictTuples) !== null && O !== void 0 ? O : L) !== null && R !== void 0 ? R : "log",
|
|
12414
|
+
strictRequired: (G = (z = k.strictRequired) !== null && z !== void 0 ? z : L) !== null && G !== void 0 ? G : !1,
|
|
12415
|
+
code: k.code ? { ...k.code, optimize: se, regExp: le } : { optimize: se, regExp: le },
|
|
12416
|
+
loopRequired: (Q = k.loopRequired) !== null && Q !== void 0 ? Q : p,
|
|
12417
|
+
loopEnum: (oe = k.loopEnum) !== null && oe !== void 0 ? oe : p,
|
|
12418
|
+
meta: (Ee = k.meta) !== null && Ee !== void 0 ? Ee : !0,
|
|
12419
|
+
messages: ($e = k.messages) !== null && $e !== void 0 ? $e : !0,
|
|
12420
|
+
inlineRefs: (Pe = k.inlineRefs) !== null && Pe !== void 0 ? Pe : !0,
|
|
12421
|
+
schemaId: (Ae = k.schemaId) !== null && Ae !== void 0 ? Ae : "$id",
|
|
12422
|
+
addUsedSchema: (De = k.addUsedSchema) !== null && De !== void 0 ? De : !0,
|
|
12423
|
+
validateSchema: (pt = k.validateSchema) !== null && pt !== void 0 ? pt : !0,
|
|
12424
|
+
validateFormats: (je = k.validateFormats) !== null && je !== void 0 ? je : !0,
|
|
12425
|
+
unicodeRegExp: (At = k.unicodeRegExp) !== null && At !== void 0 ? At : !0,
|
|
12426
|
+
int32range: (mt = k.int32range) !== null && mt !== void 0 ? mt : !0,
|
|
12427
12427
|
uriResolver: ge
|
|
12428
12428
|
};
|
|
12429
12429
|
}
|
|
@@ -12432,16 +12432,16 @@ function Sb() {
|
|
|
12432
12432
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), D = this.opts = { ...D, ...b(D) };
|
|
12433
12433
|
const { es5: I, lines: _ } = this.opts.code;
|
|
12434
12434
|
this.scope = new o.ValueScope({ scope: {}, prefixes: T, es5: I, lines: _ }), this.logger = U(D.logger);
|
|
12435
|
-
const
|
|
12436
|
-
D.validateFormats = !1, this.RULES = (0, s.getRules)(), v.call(this, y, D, "NOT SUPPORTED"), v.call(this, m, D, "DEPRECATED", "warn"), this._metaOpts = A.call(this), D.formats && N.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), D.keywords && F.call(this, D.keywords), typeof D.meta == "object" && this.addMetaSchema(D.meta), x.call(this), D.validateFormats =
|
|
12435
|
+
const E = D.validateFormats;
|
|
12436
|
+
D.validateFormats = !1, this.RULES = (0, s.getRules)(), v.call(this, y, D, "NOT SUPPORTED"), v.call(this, m, D, "DEPRECATED", "warn"), this._metaOpts = A.call(this), D.formats && N.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), D.keywords && F.call(this, D.keywords), typeof D.meta == "object" && this.addMetaSchema(D.meta), x.call(this), D.validateFormats = E;
|
|
12437
12437
|
}
|
|
12438
12438
|
_addVocabularies() {
|
|
12439
12439
|
this.addKeyword("$async");
|
|
12440
12440
|
}
|
|
12441
12441
|
_addDefaultMetaSchema() {
|
|
12442
12442
|
const { $data: D, meta: I, schemaId: _ } = this.opts;
|
|
12443
|
-
let
|
|
12444
|
-
_ === "id" && (
|
|
12443
|
+
let E = f;
|
|
12444
|
+
_ === "id" && (E = { ...f }, E.id = E.$id, delete E.$id), I && D && this.addMetaSchema(E, E[_], !1);
|
|
12445
12445
|
}
|
|
12446
12446
|
defaultMeta() {
|
|
12447
12447
|
const { meta: D, schemaId: I } = this.opts;
|
|
@@ -12454,8 +12454,8 @@ function Sb() {
|
|
|
12454
12454
|
throw new Error(`no schema with key or ref "${D}"`);
|
|
12455
12455
|
} else
|
|
12456
12456
|
_ = this.compile(D);
|
|
12457
|
-
const
|
|
12458
|
-
return "$async" in _ || (this.errors = _.errors),
|
|
12457
|
+
const E = _(I);
|
|
12458
|
+
return "$async" in _ || (this.errors = _.errors), E;
|
|
12459
12459
|
}
|
|
12460
12460
|
compile(D, I) {
|
|
12461
12461
|
const _ = this._addSchema(D, I);
|
|
@@ -12465,14 +12465,14 @@ function Sb() {
|
|
|
12465
12465
|
if (typeof this.opts.loadSchema != "function")
|
|
12466
12466
|
throw new Error("options.loadSchema should be a function");
|
|
12467
12467
|
const { loadSchema: _ } = this.opts;
|
|
12468
|
-
return
|
|
12469
|
-
async function
|
|
12468
|
+
return E.call(this, D, I);
|
|
12469
|
+
async function E(ne, O) {
|
|
12470
12470
|
await P.call(this, ne.$schema);
|
|
12471
12471
|
const R = this._addSchema(ne, O);
|
|
12472
12472
|
return R.validate || M.call(this, R);
|
|
12473
12473
|
}
|
|
12474
12474
|
async function P(ne) {
|
|
12475
|
-
ne && !this.getSchema(ne) && await
|
|
12475
|
+
ne && !this.getSchema(ne) && await E.call(this, { $ref: ne }, !0);
|
|
12476
12476
|
}
|
|
12477
12477
|
async function M(ne) {
|
|
12478
12478
|
try {
|
|
@@ -12503,10 +12503,10 @@ function Sb() {
|
|
|
12503
12503
|
}
|
|
12504
12504
|
}
|
|
12505
12505
|
// Adds schema to the instance
|
|
12506
|
-
addSchema(D, I, _,
|
|
12506
|
+
addSchema(D, I, _, E = this.opts.validateSchema) {
|
|
12507
12507
|
if (Array.isArray(D)) {
|
|
12508
12508
|
for (const M of D)
|
|
12509
|
-
this.addSchema(M, void 0, _,
|
|
12509
|
+
this.addSchema(M, void 0, _, E);
|
|
12510
12510
|
return this;
|
|
12511
12511
|
}
|
|
12512
12512
|
let P;
|
|
@@ -12515,7 +12515,7 @@ function Sb() {
|
|
|
12515
12515
|
if (P = D[M], P !== void 0 && typeof P != "string")
|
|
12516
12516
|
throw new Error(`schema ${M} must be string`);
|
|
12517
12517
|
}
|
|
12518
|
-
return I = (0, l.normalizeId)(I || P), this._checkUnique(I), this.schemas[I] = this._addSchema(D, _, I,
|
|
12518
|
+
return I = (0, l.normalizeId)(I || P), this._checkUnique(I), this.schemas[I] = this._addSchema(D, _, I, E, !0), this;
|
|
12519
12519
|
}
|
|
12520
12520
|
// Add schema that will be used to validate other schemas
|
|
12521
12521
|
// options in META_IGNORE_OPTIONS are alway set to false
|
|
@@ -12531,15 +12531,15 @@ function Sb() {
|
|
|
12531
12531
|
throw new Error("$schema must be a string");
|
|
12532
12532
|
if (_ = _ || this.opts.defaultMeta || this.defaultMeta(), !_)
|
|
12533
12533
|
return this.logger.warn("meta-schema not available"), this.errors = null, !0;
|
|
12534
|
-
const
|
|
12535
|
-
if (!
|
|
12534
|
+
const E = this.validate(_, D);
|
|
12535
|
+
if (!E && I) {
|
|
12536
12536
|
const P = "schema is invalid: " + this.errorsText();
|
|
12537
12537
|
if (this.opts.validateSchema === "log")
|
|
12538
12538
|
this.logger.error(P);
|
|
12539
12539
|
else
|
|
12540
12540
|
throw new Error(P);
|
|
12541
12541
|
}
|
|
12542
|
-
return
|
|
12542
|
+
return E;
|
|
12543
12543
|
}
|
|
12544
12544
|
// Get compiled schema by `key` or `ref`.
|
|
12545
12545
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
@@ -12548,8 +12548,8 @@ function Sb() {
|
|
|
12548
12548
|
for (; typeof (I = w.call(this, D)) == "string"; )
|
|
12549
12549
|
D = I;
|
|
12550
12550
|
if (I === void 0) {
|
|
12551
|
-
const { schemaId: _ } = this.opts,
|
|
12552
|
-
if (I = a.resolveSchema.call(this,
|
|
12551
|
+
const { schemaId: _ } = this.opts, E = new a.SchemaEnv({ schema: {}, schemaId: _ });
|
|
12552
|
+
if (I = a.resolveSchema.call(this, E, D), !I)
|
|
12553
12553
|
return;
|
|
12554
12554
|
this.refs[D] = I;
|
|
12555
12555
|
}
|
|
@@ -12597,12 +12597,12 @@ function Sb() {
|
|
|
12597
12597
|
if (H.call(this, _, I), !I)
|
|
12598
12598
|
return (0, c.eachItem)(_, (P) => j.call(this, P)), this;
|
|
12599
12599
|
Z.call(this, I);
|
|
12600
|
-
const
|
|
12600
|
+
const E = {
|
|
12601
12601
|
...I,
|
|
12602
12602
|
type: (0, u.getJSONTypes)(I.type),
|
|
12603
12603
|
schemaType: (0, u.getJSONTypes)(I.schemaType)
|
|
12604
12604
|
};
|
|
12605
|
-
return (0, c.eachItem)(_,
|
|
12605
|
+
return (0, c.eachItem)(_, E.type.length === 0 ? (P) => j.call(this, P, E) : (P) => E.type.forEach((M) => j.call(this, P, E, M))), this;
|
|
12606
12606
|
}
|
|
12607
12607
|
getKeyword(D) {
|
|
12608
12608
|
const I = this.RULES.all[D];
|
|
@@ -12613,8 +12613,8 @@ function Sb() {
|
|
|
12613
12613
|
const { RULES: I } = this;
|
|
12614
12614
|
delete I.keywords[D], delete I.all[D];
|
|
12615
12615
|
for (const _ of I.rules) {
|
|
12616
|
-
const
|
|
12617
|
-
|
|
12616
|
+
const E = _.rules.findIndex((P) => P.keyword === D);
|
|
12617
|
+
E >= 0 && _.rules.splice(E, 1);
|
|
12618
12618
|
}
|
|
12619
12619
|
return this;
|
|
12620
12620
|
}
|
|
@@ -12623,13 +12623,13 @@ function Sb() {
|
|
|
12623
12623
|
return typeof I == "string" && (I = new RegExp(I)), this.formats[D] = I, this;
|
|
12624
12624
|
}
|
|
12625
12625
|
errorsText(D = this.errors, { separator: I = ", ", dataVar: _ = "data" } = {}) {
|
|
12626
|
-
return !D || D.length === 0 ? "No errors" : D.map((
|
|
12626
|
+
return !D || D.length === 0 ? "No errors" : D.map((E) => `${_}${E.instancePath} ${E.message}`).reduce((E, P) => E + I + P);
|
|
12627
12627
|
}
|
|
12628
12628
|
$dataMetaSchema(D, I) {
|
|
12629
12629
|
const _ = this.RULES.all;
|
|
12630
12630
|
D = JSON.parse(JSON.stringify(D));
|
|
12631
|
-
for (const
|
|
12632
|
-
const P =
|
|
12631
|
+
for (const E of I) {
|
|
12632
|
+
const P = E.split("/").slice(1);
|
|
12633
12633
|
let M = D;
|
|
12634
12634
|
for (const X of P)
|
|
12635
12635
|
M = M[X];
|
|
@@ -12645,11 +12645,11 @@ function Sb() {
|
|
|
12645
12645
|
}
|
|
12646
12646
|
_removeAllSchemas(D, I) {
|
|
12647
12647
|
for (const _ in D) {
|
|
12648
|
-
const
|
|
12649
|
-
(!I || I.test(_)) && (typeof
|
|
12648
|
+
const E = D[_];
|
|
12649
|
+
(!I || I.test(_)) && (typeof E == "string" ? delete D[_] : E && !E.meta && (this._cache.delete(E.schema), delete D[_]));
|
|
12650
12650
|
}
|
|
12651
12651
|
}
|
|
12652
|
-
_addSchema(D, I, _,
|
|
12652
|
+
_addSchema(D, I, _, E = this.opts.validateSchema, P = this.opts.addUsedSchema) {
|
|
12653
12653
|
let M;
|
|
12654
12654
|
const { schemaId: X } = this.opts;
|
|
12655
12655
|
if (typeof D == "object")
|
|
@@ -12665,7 +12665,7 @@ function Sb() {
|
|
|
12665
12665
|
return J;
|
|
12666
12666
|
_ = (0, l.normalizeId)(M || _);
|
|
12667
12667
|
const ae = l.getSchemaRefs.call(this, D, _);
|
|
12668
|
-
return J = new a.SchemaEnv({ schema: D, schemaId: X, meta: I, baseId: _, localRefs: ae }), this._cache.set(J.schema, J), P && !_.startsWith("#") && (_ && this._checkUnique(_), this.refs[_] = J),
|
|
12668
|
+
return J = new a.SchemaEnv({ schema: D, schemaId: X, meta: I, baseId: _, localRefs: ae }), this._cache.set(J.schema, J), P && !_.startsWith("#") && (_ && this._checkUnique(_), this.refs[_] = J), E && this.validateSchema(D, !0), J;
|
|
12669
12669
|
}
|
|
12670
12670
|
_checkUnique(D) {
|
|
12671
12671
|
if (this.schemas[D] || this.refs[D])
|
|
@@ -12687,64 +12687,64 @@ function Sb() {
|
|
|
12687
12687
|
}
|
|
12688
12688
|
}
|
|
12689
12689
|
S.ValidationError = r.default, S.MissingRefError = i.default, e.default = S;
|
|
12690
|
-
function v(
|
|
12691
|
-
for (const
|
|
12692
|
-
const P =
|
|
12693
|
-
P in D && this.logger[_](`${I}: option ${
|
|
12690
|
+
function v(k, D, I, _ = "error") {
|
|
12691
|
+
for (const E in k) {
|
|
12692
|
+
const P = E;
|
|
12693
|
+
P in D && this.logger[_](`${I}: option ${E}. ${k[P]}`);
|
|
12694
12694
|
}
|
|
12695
12695
|
}
|
|
12696
|
-
function w(
|
|
12697
|
-
return
|
|
12696
|
+
function w(k) {
|
|
12697
|
+
return k = (0, l.normalizeId)(k), this.schemas[k] || this.refs[k];
|
|
12698
12698
|
}
|
|
12699
12699
|
function x() {
|
|
12700
|
-
const
|
|
12701
|
-
if (
|
|
12702
|
-
if (Array.isArray(
|
|
12703
|
-
this.addSchema(
|
|
12700
|
+
const k = this.opts.schemas;
|
|
12701
|
+
if (k)
|
|
12702
|
+
if (Array.isArray(k))
|
|
12703
|
+
this.addSchema(k);
|
|
12704
12704
|
else
|
|
12705
|
-
for (const D in
|
|
12706
|
-
this.addSchema(
|
|
12705
|
+
for (const D in k)
|
|
12706
|
+
this.addSchema(k[D], D);
|
|
12707
12707
|
}
|
|
12708
12708
|
function N() {
|
|
12709
|
-
for (const
|
|
12710
|
-
const D = this.opts.formats[
|
|
12711
|
-
D && this.addFormat(
|
|
12709
|
+
for (const k in this.opts.formats) {
|
|
12710
|
+
const D = this.opts.formats[k];
|
|
12711
|
+
D && this.addFormat(k, D);
|
|
12712
12712
|
}
|
|
12713
12713
|
}
|
|
12714
|
-
function F(
|
|
12715
|
-
if (Array.isArray(
|
|
12716
|
-
this.addVocabulary(
|
|
12714
|
+
function F(k) {
|
|
12715
|
+
if (Array.isArray(k)) {
|
|
12716
|
+
this.addVocabulary(k);
|
|
12717
12717
|
return;
|
|
12718
12718
|
}
|
|
12719
12719
|
this.logger.warn("keywords option as map is deprecated, pass array");
|
|
12720
|
-
for (const D in
|
|
12721
|
-
const I =
|
|
12720
|
+
for (const D in k) {
|
|
12721
|
+
const I = k[D];
|
|
12722
12722
|
I.keyword || (I.keyword = D), this.addKeyword(I);
|
|
12723
12723
|
}
|
|
12724
12724
|
}
|
|
12725
12725
|
function A() {
|
|
12726
|
-
const
|
|
12726
|
+
const k = { ...this.opts };
|
|
12727
12727
|
for (const D of g)
|
|
12728
|
-
delete
|
|
12729
|
-
return
|
|
12728
|
+
delete k[D];
|
|
12729
|
+
return k;
|
|
12730
12730
|
}
|
|
12731
12731
|
const C = { log() {
|
|
12732
12732
|
}, warn() {
|
|
12733
12733
|
}, error() {
|
|
12734
12734
|
} };
|
|
12735
|
-
function U(
|
|
12736
|
-
if (
|
|
12735
|
+
function U(k) {
|
|
12736
|
+
if (k === !1)
|
|
12737
12737
|
return C;
|
|
12738
|
-
if (
|
|
12738
|
+
if (k === void 0)
|
|
12739
12739
|
return console;
|
|
12740
|
-
if (
|
|
12741
|
-
return
|
|
12740
|
+
if (k.log && k.warn && k.error)
|
|
12741
|
+
return k;
|
|
12742
12742
|
throw new Error("logger must implement log, warn and error methods");
|
|
12743
12743
|
}
|
|
12744
12744
|
const K = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
12745
|
-
function H(
|
|
12745
|
+
function H(k, D) {
|
|
12746
12746
|
const { RULES: I } = this;
|
|
12747
|
-
if ((0, c.eachItem)(
|
|
12747
|
+
if ((0, c.eachItem)(k, (_) => {
|
|
12748
12748
|
if (I.keywords[_])
|
|
12749
12749
|
throw new Error(`Keyword ${_} is already defined`);
|
|
12750
12750
|
if (!K.test(_))
|
|
@@ -12752,38 +12752,38 @@ function Sb() {
|
|
|
12752
12752
|
}), !!D && D.$data && !("code" in D || "validate" in D))
|
|
12753
12753
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
12754
12754
|
}
|
|
12755
|
-
function j(
|
|
12755
|
+
function j(k, D, I) {
|
|
12756
12756
|
var _;
|
|
12757
|
-
const
|
|
12758
|
-
if (I &&
|
|
12757
|
+
const E = D?.post;
|
|
12758
|
+
if (I && E)
|
|
12759
12759
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
12760
12760
|
const { RULES: P } = this;
|
|
12761
|
-
let M =
|
|
12762
|
-
if (M || (M = { type: I, rules: [] }, P.rules.push(M)), P.keywords[
|
|
12761
|
+
let M = E ? P.post : P.rules.find(({ type: J }) => J === I);
|
|
12762
|
+
if (M || (M = { type: I, rules: [] }, P.rules.push(M)), P.keywords[k] = !0, !D)
|
|
12763
12763
|
return;
|
|
12764
12764
|
const X = {
|
|
12765
|
-
keyword:
|
|
12765
|
+
keyword: k,
|
|
12766
12766
|
definition: {
|
|
12767
12767
|
...D,
|
|
12768
12768
|
type: (0, u.getJSONTypes)(D.type),
|
|
12769
12769
|
schemaType: (0, u.getJSONTypes)(D.schemaType)
|
|
12770
12770
|
}
|
|
12771
12771
|
};
|
|
12772
|
-
D.before ? B.call(this, M, X, D.before) : M.rules.push(X), P.all[
|
|
12772
|
+
D.before ? B.call(this, M, X, D.before) : M.rules.push(X), P.all[k] = X, (_ = D.implements) === null || _ === void 0 || _.forEach((J) => this.addKeyword(J));
|
|
12773
12773
|
}
|
|
12774
|
-
function B(
|
|
12775
|
-
const _ =
|
|
12776
|
-
_ >= 0 ?
|
|
12774
|
+
function B(k, D, I) {
|
|
12775
|
+
const _ = k.rules.findIndex((E) => E.keyword === I);
|
|
12776
|
+
_ >= 0 ? k.rules.splice(_, 0, D) : (k.rules.push(D), this.logger.warn(`rule ${I} is not defined`));
|
|
12777
12777
|
}
|
|
12778
|
-
function Z(
|
|
12779
|
-
let { metaSchema: D } =
|
|
12780
|
-
D !== void 0 && (
|
|
12778
|
+
function Z(k) {
|
|
12779
|
+
let { metaSchema: D } = k;
|
|
12780
|
+
D !== void 0 && (k.$data && this.opts.$data && (D = ee(D)), k.validateSchema = this.compile(D, !0));
|
|
12781
12781
|
}
|
|
12782
12782
|
const q = {
|
|
12783
12783
|
$ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
|
|
12784
12784
|
};
|
|
12785
|
-
function ee(
|
|
12786
|
-
return { anyOf: [
|
|
12785
|
+
function ee(k) {
|
|
12786
|
+
return { anyOf: [k, q] };
|
|
12787
12787
|
}
|
|
12788
12788
|
})(bs)), bs;
|
|
12789
12789
|
}
|
|
@@ -13009,10 +13009,10 @@ function Rb() {
|
|
|
13009
13009
|
};
|
|
13010
13010
|
return wr.default = i, wr;
|
|
13011
13011
|
}
|
|
13012
|
-
var _r = {},
|
|
13012
|
+
var _r = {}, kl;
|
|
13013
13013
|
function Nb() {
|
|
13014
|
-
if (
|
|
13015
|
-
|
|
13014
|
+
if (kl) return _r;
|
|
13015
|
+
kl = 1, Object.defineProperty(_r, "__esModule", { value: !0 });
|
|
13016
13016
|
const e = /* @__PURE__ */ he(), n = {
|
|
13017
13017
|
keyword: ["maxProperties", "minProperties"],
|
|
13018
13018
|
type: "object",
|
|
@@ -13032,10 +13032,10 @@ function Nb() {
|
|
|
13032
13032
|
};
|
|
13033
13033
|
return _r.default = n, _r;
|
|
13034
13034
|
}
|
|
13035
|
-
var vr = {},
|
|
13035
|
+
var vr = {}, El;
|
|
13036
13036
|
function Mb() {
|
|
13037
|
-
if (
|
|
13038
|
-
|
|
13037
|
+
if (El) return vr;
|
|
13038
|
+
El = 1, Object.defineProperty(vr, "__esModule", { value: !0 });
|
|
13039
13039
|
const e = /* @__PURE__ */ wt(), t = /* @__PURE__ */ he(), n = /* @__PURE__ */ me(), i = {
|
|
13040
13040
|
keyword: "required",
|
|
13041
13041
|
type: "object",
|
|
@@ -13112,17 +13112,17 @@ function Ib() {
|
|
|
13112
13112
|
};
|
|
13113
13113
|
return Tr.default = n, Tr;
|
|
13114
13114
|
}
|
|
13115
|
-
var
|
|
13115
|
+
var kr = {}, Er = {}, xl;
|
|
13116
13116
|
function Pa() {
|
|
13117
|
-
if (xl) return
|
|
13118
|
-
xl = 1, Object.defineProperty(
|
|
13117
|
+
if (xl) return Er;
|
|
13118
|
+
xl = 1, Object.defineProperty(Er, "__esModule", { value: !0 });
|
|
13119
13119
|
const e = ef();
|
|
13120
|
-
return e.code = 'require("ajv/dist/runtime/equal").default',
|
|
13120
|
+
return e.code = 'require("ajv/dist/runtime/equal").default', Er.default = e, Er;
|
|
13121
13121
|
}
|
|
13122
13122
|
var Pl;
|
|
13123
13123
|
function Lb() {
|
|
13124
|
-
if (Pl) return
|
|
13125
|
-
Pl = 1, Object.defineProperty(
|
|
13124
|
+
if (Pl) return kr;
|
|
13125
|
+
Pl = 1, Object.defineProperty(kr, "__esModule", { value: !0 });
|
|
13126
13126
|
const e = /* @__PURE__ */ bi(), t = /* @__PURE__ */ he(), n = /* @__PURE__ */ me(), r = /* @__PURE__ */ Pa(), s = {
|
|
13127
13127
|
keyword: "uniqueItems",
|
|
13128
13128
|
type: "array",
|
|
@@ -13161,7 +13161,7 @@ function Lb() {
|
|
|
13161
13161
|
}
|
|
13162
13162
|
}
|
|
13163
13163
|
};
|
|
13164
|
-
return
|
|
13164
|
+
return kr.default = s, kr;
|
|
13165
13165
|
}
|
|
13166
13166
|
var Sr = {}, Al;
|
|
13167
13167
|
function Fb() {
|
|
@@ -14097,7 +14097,7 @@ function p1() {
|
|
|
14097
14097
|
})(ar, ar.exports)), ar.exports;
|
|
14098
14098
|
}
|
|
14099
14099
|
var m1 = /* @__PURE__ */ p1();
|
|
14100
|
-
const g1 = /* @__PURE__ */
|
|
14100
|
+
const g1 = /* @__PURE__ */ ki(m1);
|
|
14101
14101
|
var af = typeof global == "object" && global && global.Object === Object && global, y1 = typeof self == "object" && self && self.Object === Object && self, _n = af || y1 || Function("return this")(), wi = _n.Symbol, of = Object.prototype, b1 = of.hasOwnProperty, w1 = of.toString, In = wi ? wi.toStringTag : void 0;
|
|
14102
14102
|
function _1(e) {
|
|
14103
14103
|
var t = b1.call(e, In), n = e[In];
|
|
@@ -14110,12 +14110,12 @@ function _1(e) {
|
|
|
14110
14110
|
return r && (t ? e[In] = n : delete e[In]), i;
|
|
14111
14111
|
}
|
|
14112
14112
|
var v1 = Object.prototype, T1 = v1.toString;
|
|
14113
|
-
function
|
|
14113
|
+
function k1(e) {
|
|
14114
14114
|
return T1.call(e);
|
|
14115
14115
|
}
|
|
14116
|
-
var
|
|
14116
|
+
var E1 = "[object Null]", S1 = "[object Undefined]", tu = wi ? wi.toStringTag : void 0;
|
|
14117
14117
|
function Ri(e) {
|
|
14118
|
-
return e == null ? e === void 0 ? S1 :
|
|
14118
|
+
return e == null ? e === void 0 ? S1 : E1 : tu && tu in Object(e) ? _1(e) : k1(e);
|
|
14119
14119
|
}
|
|
14120
14120
|
function Yn(e) {
|
|
14121
14121
|
return e != null && typeof e == "object";
|
|
@@ -14324,9 +14324,9 @@ var df = Object.prototype, hw = df.hasOwnProperty, pw = df.propertyIsEnumerable,
|
|
|
14324
14324
|
function mw() {
|
|
14325
14325
|
return !1;
|
|
14326
14326
|
}
|
|
14327
|
-
var hf = typeof exports == "object" && exports && !exports.nodeType && exports, au = hf && typeof module == "object" && module && !module.nodeType && module, gw = au && au.exports === hf, ou = gw ? _n.Buffer : void 0, yw = ou ? ou.isBuffer : void 0, pf = yw || mw, bw = "[object Arguments]", ww = "[object Array]", _w = "[object Boolean]", vw = "[object Date]", Tw = "[object Error]",
|
|
14327
|
+
var hf = typeof exports == "object" && exports && !exports.nodeType && exports, au = hf && typeof module == "object" && module && !module.nodeType && module, gw = au && au.exports === hf, ou = gw ? _n.Buffer : void 0, yw = ou ? ou.isBuffer : void 0, pf = yw || mw, bw = "[object Arguments]", ww = "[object Array]", _w = "[object Boolean]", vw = "[object Date]", Tw = "[object Error]", kw = "[object Function]", Ew = "[object Map]", Sw = "[object Number]", xw = "[object Object]", Pw = "[object RegExp]", Aw = "[object Set]", Dw = "[object String]", $w = "[object WeakMap]", Ow = "[object ArrayBuffer]", Cw = "[object DataView]", Rw = "[object Float32Array]", Nw = "[object Float64Array]", Mw = "[object Int8Array]", Iw = "[object Int16Array]", Lw = "[object Int32Array]", Fw = "[object Uint8Array]", jw = "[object Uint8ClampedArray]", zw = "[object Uint16Array]", Uw = "[object Uint32Array]", ve = {};
|
|
14328
14328
|
ve[Rw] = ve[Nw] = ve[Mw] = ve[Iw] = ve[Lw] = ve[Fw] = ve[jw] = ve[zw] = ve[Uw] = !0;
|
|
14329
|
-
ve[bw] = ve[ww] = ve[Ow] = ve[_w] = ve[Cw] = ve[vw] = ve[Tw] = ve[
|
|
14329
|
+
ve[bw] = ve[ww] = ve[Ow] = ve[_w] = ve[Cw] = ve[vw] = ve[Tw] = ve[kw] = ve[Ew] = ve[Sw] = ve[xw] = ve[Pw] = ve[Aw] = ve[Dw] = ve[$w] = !1;
|
|
14330
14330
|
function qw(e) {
|
|
14331
14331
|
return Yn(e) && cf(e.length) && !!ve[Ri(e)];
|
|
14332
14332
|
}
|
|
@@ -14497,14 +14497,14 @@ vn.prototype.delete = y_;
|
|
|
14497
14497
|
vn.prototype.get = b_;
|
|
14498
14498
|
vn.prototype.has = w_;
|
|
14499
14499
|
vn.prototype.set = __;
|
|
14500
|
-
var wf = Ww(Object.getPrototypeOf, Object), v_ = "[object Object]", T_ = Function.prototype,
|
|
14500
|
+
var wf = Ww(Object.getPrototypeOf, Object), v_ = "[object Object]", T_ = Function.prototype, k_ = Object.prototype, _f = T_.toString, E_ = k_.hasOwnProperty, S_ = _f.call(Object);
|
|
14501
14501
|
function x_(e) {
|
|
14502
14502
|
if (!Yn(e) || Ri(e) != v_)
|
|
14503
14503
|
return !1;
|
|
14504
14504
|
var t = wf(e);
|
|
14505
14505
|
if (t === null)
|
|
14506
14506
|
return !0;
|
|
14507
|
-
var n =
|
|
14507
|
+
var n = E_.call(t, "constructor") && t.constructor;
|
|
14508
14508
|
return typeof n == "function" && n instanceof n && _f.call(n) == S_;
|
|
14509
14509
|
}
|
|
14510
14510
|
function P_() {
|
|
@@ -14661,7 +14661,7 @@ class B_ {
|
|
|
14661
14661
|
return r(n);
|
|
14662
14662
|
}
|
|
14663
14663
|
}
|
|
14664
|
-
class
|
|
14664
|
+
class Uk extends B_ {
|
|
14665
14665
|
model = "";
|
|
14666
14666
|
url = "";
|
|
14667
14667
|
messages = [];
|
|
@@ -14891,8 +14891,8 @@ class K_ {
|
|
|
14891
14891
|
const Ca = new K_(), Z_ = (e) => {
|
|
14892
14892
|
ob(e), G_(), ot.setPaddingBottom();
|
|
14893
14893
|
}, J_ = "button{outline:0;border:0;display:flex;justify-content:center;align-items:center;cursor:pointer}button.icon{padding:4px}button.text{padding:0 12px;height:28px}button.square{border-radius:6px}button.circle{border-radius:50%}button.primary{background-color:#0000000a}button.plain{background-color:transparent}button.error{background-color:#ff4d4f;color:#fff}button.primary:hover{background-color:#0000000f}button.plain:hover{background-color:#0000000a}button.error:hover{background-color:#ff7875}button[data-action=copy] .copied-text{display:none}button[data-action=copy].copied .copied-text{display:block}button[data-action=copy].copied svg{display:none}", X_ = ".tooltip{position:relative}.tooltip .tooltip-text{visibility:hidden;opacity:0;background-color:#000000b3;color:#fff;border-radius:4px;padding:4px 8px;position:absolute;z-index:1;white-space:nowrap;font-size:12px;transition:opacity .3s}.tooltip .tooltip-text.top-left{bottom:115%;right:0}.tooltip .tooltip-text.top-right{bottom:115%;left:0}.tooltip .tooltip-text.bottom-left{top:115%;right:0}.tooltip .tooltip-text.bottom-right{top:115%;left:0}.tooltip:hover .tooltip-text{visibility:visible;opacity:1}", Q_ = ".alert{position:absolute;left:50%;transform:translate(-50%);background-color:#fff;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;z-index:1000;pointer-events:all;padding:9px 12px;animation:slide 3s ease-in-out forwards;font-size:12px;white-space:nowrap}@keyframes slide{0%{top:0;opacity:0}10%{top:50px;opacity:1}75%{top:50px;opacity:1}to{top:0;opacity:0}}", ev = '.loading-dots{font-weight:700;margin-left:3px}.loading-dots:after{content:"";animation:typing 1.5s infinite}@keyframes typing{0%{content:"."}33%{content:".."}66%{content:"..."}to{content:"."}}', tv = ".app-container{height:100%;display:flex;flex-direction:column;background:#fff}.bottom-container{margin:12px}.action-bar{margin-bottom:12px;display:flex;align-items:center;gap:12px}.user-input-container{padding:12px;border-radius:16px;border:1px solid rgba(114,118,139,.16);box-shadow:0 10px 30px #0003;display:flex;flex-direction:column}.user-input{border:0;resize:none;width:100%;font-size:14px;line-height:1.5}.button-wrap{display:flex;justify-content:flex-end;align-items:center;gap:12px}.messages-container{flex:1;padding-top:12px;padding-left:12px;padding-right:12px;overflow-x:hidden;overflow-y:auto}.message{max-width:80%;margin-bottom:12px;font-size:14px;line-height:1.5}.body-container{padding:0 14px;border-radius:8px;overflow-x:auto;color:#000}.message.user{margin-left:auto}.message.user .body-container{background:#e3f2fd}.message.assistant{margin-right:auto}.message.assistant .body-container{background:#f1f1f1}.button-container{display:flex;margin-top:4px}.button-container button{height:26px;display:flex;align-items:center}.message.user .button-container{justify-content:flex-end}.message.assistant .button-container{justify-content:flex-start}.submit-icon,.stop-icon{width:28px;height:28px;display:flex;justify-content:center;align-items:center;background-color:#000;border-radius:50%;color:#fff}.content-container{word-wrap:break-word}.message.assistant table{border-collapse:collapse;margin-block-start:1em;margin-block-end:1em}.message.assistant table th,.message.assistant table td{border:1px solid #ccc;padding:8px}.message.assistant table th{background-color:#e0e0e0}.message.assistant .reasoning-container{padding:0 14px;border-radius:8px;overflow-x:auto;color:#6b7280;background-color:#f9fafb;font-size:12px;margin-bottom:8px}.message.assistant .reasoning-container .reasoning-header{display:flex;align-items:center;gap:4px;padding-top:8px;margin-bottom:8px;cursor:pointer}.message.assistant .reasoning-container .reasoning-header svg{transform:rotate(90deg);transition:transform .3s}.message.assistant .reasoning-container.collapse .reasoning-header svg{transform:rotate(0);transition:transform .3s}.message.assistant .reasoning-container.collapse .reasoning-content{height:0;overflow:hidden}", nv = "*{box-sizing:border-box}textarea{padding:0}textarea:focus-visible,select:focus-visible{outline:0}.flex{display:flex}:host{position:relative}", rv = [J_, X_, Q_, ev, tv, nv].join(`
|
|
14894
|
-
`),
|
|
14895
|
-
|
|
14894
|
+
`), kf = document.createElement("template");
|
|
14895
|
+
kf.innerHTML = `
|
|
14896
14896
|
<style>${rv}</style>
|
|
14897
14897
|
<div class="app-container">
|
|
14898
14898
|
<div class="messages-container" id="messages-container"></div>
|
|
@@ -14904,7 +14904,7 @@ Ef.innerHTML = `
|
|
|
14904
14904
|
</button>
|
|
14905
14905
|
</div>
|
|
14906
14906
|
<div class="user-input-container" id="user-input-container">
|
|
14907
|
-
<textarea class="user-input" id="user-input" placeholder="
|
|
14907
|
+
<textarea class="user-input" id="user-input" placeholder="发消息..."></textarea>
|
|
14908
14908
|
<div class="button-wrap">
|
|
14909
14909
|
<button class="icon square plain tooltip" id="submit-icon" type="button" aria-label="发送">
|
|
14910
14910
|
<div class="submit-icon">
|
|
@@ -14938,7 +14938,7 @@ var ft;
|
|
|
14938
14938
|
function rn(e, t) {
|
|
14939
14939
|
e.assign("day", t.getDate()), e.assign("month", t.getMonth() + 1), e.assign("year", t.getFullYear());
|
|
14940
14940
|
}
|
|
14941
|
-
function
|
|
14941
|
+
function Ef(e, t) {
|
|
14942
14942
|
e.assign("hour", t.getHours()), e.assign("minute", t.getMinutes()), e.assign("second", t.getSeconds()), e.assign("millisecond", t.getMilliseconds()), e.assign("meridiem", t.getHours() < 12 ? ye.AM : ye.PM);
|
|
14943
14943
|
}
|
|
14944
14944
|
function pn(e, t) {
|
|
@@ -15294,7 +15294,7 @@ class Te {
|
|
|
15294
15294
|
static createRelativeFromReference(t, n = sv) {
|
|
15295
15295
|
let r = Ie(t.getDateWithAdjustedTimezone(), n);
|
|
15296
15296
|
const i = new Te(t);
|
|
15297
|
-
return i.addTag("result/relativeDate"), "hour" in n || "minute" in n || "second" in n || "millisecond" in n ? (i.addTag("result/relativeDateAndTime"),
|
|
15297
|
+
return i.addTag("result/relativeDate"), "hour" in n || "minute" in n || "second" in n || "millisecond" in n ? (i.addTag("result/relativeDateAndTime"), Ef(i, r), rn(i, r), i.assign("timezoneOffset", t.getTimezoneOffset())) : (Ra(i, r), i.imply("timezoneOffset", t.getTimezoneOffset()), "day" in n ? (i.assign("day", r.getDate()), i.assign("month", r.getMonth() + 1), i.assign("year", r.getFullYear()), i.assign("weekday", r.getDay())) : "week" in n ? (i.assign("day", r.getDate()), i.assign("month", r.getMonth() + 1), i.assign("year", r.getFullYear()), i.imply("weekday", r.getDay())) : (i.imply("day", r.getDate()), "month" in n ? (i.assign("month", r.getMonth() + 1), i.assign("year", r.getFullYear())) : (i.imply("month", r.getMonth() + 1), "year" in n ? i.assign("year", r.getFullYear()) : i.imply("year", r.getFullYear())))), i;
|
|
15298
15298
|
}
|
|
15299
15299
|
get(t) {
|
|
15300
15300
|
return t in this.knownValues ? this.knownValues[t] : t in this.impliedValues ? this.impliedValues[t] : null;
|
|
@@ -15372,7 +15372,7 @@ class Te {
|
|
|
15372
15372
|
return t.setFullYear(this.get("year")), t;
|
|
15373
15373
|
}
|
|
15374
15374
|
}
|
|
15375
|
-
class
|
|
15375
|
+
class kn {
|
|
15376
15376
|
refDate;
|
|
15377
15377
|
index;
|
|
15378
15378
|
text;
|
|
@@ -15383,7 +15383,7 @@ class En {
|
|
|
15383
15383
|
this.reference = t, this.refDate = t.instant, this.index = n, this.text = r, this.start = i || new Te(t), this.end = s;
|
|
15384
15384
|
}
|
|
15385
15385
|
clone() {
|
|
15386
|
-
const t = new
|
|
15386
|
+
const t = new kn(this.reference, this.index, this.text);
|
|
15387
15387
|
return t.start = this.start ? this.start.clone() : null, t.end = this.end ? this.end.clone() : null, t;
|
|
15388
15388
|
}
|
|
15389
15389
|
date() {
|
|
@@ -15620,7 +15620,7 @@ function Ui(e) {
|
|
|
15620
15620
|
return Pf(t);
|
|
15621
15621
|
}
|
|
15622
15622
|
const Of = `(${$f})\\s{0,3}(${Pt(ji)})`, mu = new RegExp(Of, "i"), lv = `(${$f})\\s{0,3}(${Pt(Df)})`, Cf = "\\s{0,5},?(?:\\s*and)?\\s{0,5}", Gn = xf("(?:(?:about|around)\\s{0,3})?", Of, Cf), qi = xf("(?:(?:about|around)\\s{0,3})?", lv, Cf);
|
|
15623
|
-
function
|
|
15623
|
+
function En(e) {
|
|
15624
15624
|
const t = {};
|
|
15625
15625
|
let n = e, r = mu.exec(n);
|
|
15626
15626
|
for (; r; )
|
|
@@ -15633,7 +15633,7 @@ function uv(e, t) {
|
|
|
15633
15633
|
const n = ov(t[1]), r = ji[t[2].toLowerCase()];
|
|
15634
15634
|
e[r] = n;
|
|
15635
15635
|
}
|
|
15636
|
-
class
|
|
15636
|
+
class ke {
|
|
15637
15637
|
innerPatternHasChange(t, n) {
|
|
15638
15638
|
return this.innerPattern(t) !== n;
|
|
15639
15639
|
}
|
|
@@ -15654,7 +15654,7 @@ class Ee {
|
|
|
15654
15654
|
}
|
|
15655
15655
|
}
|
|
15656
15656
|
const cv = new RegExp(`(?:(?:within|in|for)\\s*)?(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Gn})(?=\\W|$)`, "i"), fv = new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Gn})(?=\\W|$)`, "i"), dv = new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${qi})(?=\\W|$)`, "i");
|
|
15657
|
-
class hv extends
|
|
15657
|
+
class hv extends ke {
|
|
15658
15658
|
strictMode;
|
|
15659
15659
|
constructor(t) {
|
|
15660
15660
|
super(), this.strictMode = t;
|
|
@@ -15665,12 +15665,12 @@ class hv extends Ee {
|
|
|
15665
15665
|
innerExtract(t, n) {
|
|
15666
15666
|
if (n[0].match(/^for\s*the\s*\w+/))
|
|
15667
15667
|
return null;
|
|
15668
|
-
const r =
|
|
15668
|
+
const r = En(n[1]);
|
|
15669
15669
|
return r ? Te.createRelativeFromReference(t.reference, r) : null;
|
|
15670
15670
|
}
|
|
15671
15671
|
}
|
|
15672
15672
|
const pv = new RegExp(`(?:on\\s{0,3})?(${vi})(?:\\s{0,3}(?:to|\\-|\\–|until|through|till)?\\s{0,3}(${vi}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Pt(Ht)})(?:(?:-|/|,?\\s{0,3})(${zi}(?!\\w)))?(?=\\W|$)`, "i"), gu = 1, yu = 2, mv = 3, bu = 4;
|
|
15673
|
-
class gv extends
|
|
15673
|
+
class gv extends ke {
|
|
15674
15674
|
innerPattern() {
|
|
15675
15675
|
return pv;
|
|
15676
15676
|
}
|
|
@@ -15693,7 +15693,7 @@ class gv extends Ee {
|
|
|
15693
15693
|
}
|
|
15694
15694
|
}
|
|
15695
15695
|
const yv = new RegExp(`(${Pt(Ht)})(?:-|/|\\s*,?\\s*)(${vi})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${vi})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${zi}))?(?=\\W|$)(?!\\:\\d)`, "i"), bv = 1, wu = 2, $s = 3, Os = 4;
|
|
15696
|
-
class wv extends
|
|
15696
|
+
class wv extends ke {
|
|
15697
15697
|
shouldSkipYearLikeDate;
|
|
15698
15698
|
constructor(t) {
|
|
15699
15699
|
super(), this.shouldSkipYearLikeDate = t;
|
|
@@ -15723,7 +15723,7 @@ class wv extends Ee {
|
|
|
15723
15723
|
}
|
|
15724
15724
|
}
|
|
15725
15725
|
const _v = new RegExp(`((?:in)\\s*)?(${Pt(Ht)})\\s*(?:(?:,|-|of)?\\s*(${zi})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`, "i"), vv = 1, Tv = 2, _u = 3;
|
|
15726
|
-
class
|
|
15726
|
+
class kv extends ke {
|
|
15727
15727
|
innerPattern() {
|
|
15728
15728
|
return _v;
|
|
15729
15729
|
}
|
|
@@ -15744,14 +15744,14 @@ class Ev extends Ee {
|
|
|
15744
15744
|
return i;
|
|
15745
15745
|
}
|
|
15746
15746
|
}
|
|
15747
|
-
const
|
|
15748
|
-
class Av extends
|
|
15747
|
+
const Ev = new RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${Pt(Ht)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`, "i"), Sv = 1, xv = 2, vu = 3, Pv = 4;
|
|
15748
|
+
class Av extends ke {
|
|
15749
15749
|
strictMonthDateOrder;
|
|
15750
15750
|
constructor(t) {
|
|
15751
15751
|
super(), this.strictMonthDateOrder = t;
|
|
15752
15752
|
}
|
|
15753
15753
|
innerPattern() {
|
|
15754
|
-
return
|
|
15754
|
+
return Ev;
|
|
15755
15755
|
}
|
|
15756
15756
|
innerExtract(t, n) {
|
|
15757
15757
|
const r = parseInt(n[Sv]);
|
|
@@ -15769,7 +15769,7 @@ class Av extends Ee {
|
|
|
15769
15769
|
}
|
|
15770
15770
|
}
|
|
15771
15771
|
const Dv = new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})", "i"), $v = 1, Ov = 2;
|
|
15772
|
-
class Cv extends
|
|
15772
|
+
class Cv extends ke {
|
|
15773
15773
|
innerPattern() {
|
|
15774
15774
|
return Dv;
|
|
15775
15775
|
}
|
|
@@ -15952,7 +15952,7 @@ class Iv extends Mv {
|
|
|
15952
15952
|
}
|
|
15953
15953
|
}
|
|
15954
15954
|
const Lv = new RegExp(`(${Gn})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`, "i"), Fv = new RegExp(`(${qi})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`, "i");
|
|
15955
|
-
class jv extends
|
|
15955
|
+
class jv extends ke {
|
|
15956
15956
|
strictMode;
|
|
15957
15957
|
constructor(t) {
|
|
15958
15958
|
super(), this.strictMode = t;
|
|
@@ -15961,12 +15961,12 @@ class jv extends Ee {
|
|
|
15961
15961
|
return this.strictMode ? Fv : Lv;
|
|
15962
15962
|
}
|
|
15963
15963
|
innerExtract(t, n) {
|
|
15964
|
-
const r =
|
|
15964
|
+
const r = En(n[1]);
|
|
15965
15965
|
return r ? Te.createRelativeFromReference(t.reference, Li(r)) : null;
|
|
15966
15966
|
}
|
|
15967
15967
|
}
|
|
15968
15968
|
const zv = new RegExp(`(${Gn})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`, "i"), Uv = new RegExp(`(${qi})\\s{0,5}(later|after|from now)(?=\\W|$)`, "i"), qv = 1;
|
|
15969
|
-
class Hv extends
|
|
15969
|
+
class Hv extends ke {
|
|
15970
15970
|
strictMode;
|
|
15971
15971
|
constructor(t) {
|
|
15972
15972
|
super(), this.strictMode = t;
|
|
@@ -15975,7 +15975,7 @@ class Hv extends Ee {
|
|
|
15975
15975
|
return this.strictMode ? Uv : zv;
|
|
15976
15976
|
}
|
|
15977
15977
|
innerExtract(t, n) {
|
|
15978
|
-
const r =
|
|
15978
|
+
const r = En(n[qv]);
|
|
15979
15979
|
return r ? Te.createRelativeFromReference(t.reference, r) : null;
|
|
15980
15980
|
}
|
|
15981
15981
|
}
|
|
@@ -16029,8 +16029,8 @@ class Bv extends Nf {
|
|
|
16029
16029
|
}
|
|
16030
16030
|
function Tu(e, t) {
|
|
16031
16031
|
const n = e.clone(), r = e.start, i = t.start;
|
|
16032
|
-
if (n.start =
|
|
16033
|
-
const s = e.end == null ? e.start : e.end, a = t.end == null ? t.start : t.end, o =
|
|
16032
|
+
if (n.start = ku(r, i), e.end != null || t.end != null) {
|
|
16033
|
+
const s = e.end == null ? e.start : e.end, a = t.end == null ? t.start : t.end, o = ku(s, a);
|
|
16034
16034
|
if (e.end == null && o.date().getTime() < n.start.date().getTime()) {
|
|
16035
16035
|
const l = new Date(o.date().getTime());
|
|
16036
16036
|
l.setDate(l.getDate() + 1), o.isCertain("day") ? rn(o, l) : pn(o, l);
|
|
@@ -16039,7 +16039,7 @@ function Tu(e, t) {
|
|
|
16039
16039
|
}
|
|
16040
16040
|
return n;
|
|
16041
16041
|
}
|
|
16042
|
-
function
|
|
16042
|
+
function ku(e, t) {
|
|
16043
16043
|
const n = e.clone();
|
|
16044
16044
|
return t.isCertain("hour") ? (n.assign("hour", t.get("hour")), n.assign("minute", t.get("minute")), t.isCertain("second") ? (n.assign("second", t.get("second")), t.isCertain("millisecond") ? n.assign("millisecond", t.get("millisecond")) : n.imply("millisecond", t.get("millisecond"))) : (n.imply("second", t.get("second")), n.imply("millisecond", t.get("millisecond")))) : (n.imply("hour", t.get("hour")), n.imply("minute", t.get("minute")), n.imply("second", t.get("second")), n.imply("millisecond", t.get("millisecond"))), t.isCertain("timezoneOffset") && n.assign("timezoneOffset", t.get("timezoneOffset")), t.isCertain("meridiem") ? n.assign("meridiem", t.get("meridiem")) : t.get("meridiem") != null && n.get("meridiem") == null && n.imply("meridiem", t.get("meridiem")), n.get("meridiem") == ye.PM && n.get("hour") < 12 && (t.isCertain("hour") ? n.assign("hour", n.get("hour") + 12) : n.imply("hour", n.get("hour") + 12)), n.addTags(e.tags()), n.addTags(t.tags()), n;
|
|
16045
16045
|
}
|
|
@@ -16052,7 +16052,7 @@ class Mf extends Kn {
|
|
|
16052
16052
|
return i.index = n.index, i.text = n.text + t + r.text, i;
|
|
16053
16053
|
}
|
|
16054
16054
|
}
|
|
16055
|
-
class
|
|
16055
|
+
class Eu extends Mf {
|
|
16056
16056
|
patternBetween() {
|
|
16057
16057
|
return new RegExp("^\\s*(T|at|after|before|on|of|,|-|\\.|∙|:)?\\s*$");
|
|
16058
16058
|
}
|
|
@@ -16170,7 +16170,7 @@ class Xv extends Rf {
|
|
|
16170
16170
|
}
|
|
16171
16171
|
}
|
|
16172
16172
|
const Qv = new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)", "i"), eT = 1, tT = 2, nT = 3, Su = 4, rT = 5, xu = 6, Pu = 7, iT = 8, Au = 9, Du = 10;
|
|
16173
|
-
class sT extends
|
|
16173
|
+
class sT extends ke {
|
|
16174
16174
|
innerPattern() {
|
|
16175
16175
|
return Qv;
|
|
16176
16176
|
}
|
|
@@ -16206,7 +16206,7 @@ function Lf(e, t = !1) {
|
|
|
16206
16206
|
}
|
|
16207
16207
|
function oT(e) {
|
|
16208
16208
|
const t = e.getDateWithAdjustedTimezone(), n = new Te(e, {});
|
|
16209
|
-
return rn(n, t),
|
|
16209
|
+
return rn(n, t), Ef(n, t), n.assign("timezoneOffset", e.getTimezoneOffset()), n.addTag("casualReference/now"), n;
|
|
16210
16210
|
}
|
|
16211
16211
|
function lT(e) {
|
|
16212
16212
|
const t = e.getDateWithAdjustedTimezone(), n = new Te(e, {});
|
|
@@ -16250,7 +16250,7 @@ function yT(e) {
|
|
|
16250
16250
|
return t.imply("meridiem", ye.AM), t.assign("hour", 12), t.imply("minute", 0), t.imply("second", 0), t.imply("millisecond", 0), t.addTag("casualReference/noon"), t;
|
|
16251
16251
|
}
|
|
16252
16252
|
const bT = /(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i;
|
|
16253
|
-
class wT extends
|
|
16253
|
+
class wT extends ke {
|
|
16254
16254
|
innerPattern(t) {
|
|
16255
16255
|
return bT;
|
|
16256
16256
|
}
|
|
@@ -16293,7 +16293,7 @@ class wT extends Ee {
|
|
|
16293
16293
|
}
|
|
16294
16294
|
}
|
|
16295
16295
|
const _T = /(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i;
|
|
16296
|
-
class vT extends
|
|
16296
|
+
class vT extends ke {
|
|
16297
16297
|
innerPattern() {
|
|
16298
16298
|
return _T;
|
|
16299
16299
|
}
|
|
@@ -16322,11 +16322,11 @@ class vT extends Ee {
|
|
|
16322
16322
|
}
|
|
16323
16323
|
}
|
|
16324
16324
|
function TT(e, t, n) {
|
|
16325
|
-
const r = e.getDateWithAdjustedTimezone(), i =
|
|
16325
|
+
const r = e.getDateWithAdjustedTimezone(), i = kT(r, t, n);
|
|
16326
16326
|
let s = new Te(e);
|
|
16327
16327
|
return s = s.addDurationAsImplied({ day: i }), s.assign("weekday", t), s;
|
|
16328
16328
|
}
|
|
16329
|
-
function
|
|
16329
|
+
function kT(e, t, n) {
|
|
16330
16330
|
const r = e.getDay();
|
|
16331
16331
|
switch (n) {
|
|
16332
16332
|
case "this":
|
|
@@ -16336,9 +16336,9 @@ function ET(e, t, n) {
|
|
|
16336
16336
|
case "next":
|
|
16337
16337
|
return r == xe.SUNDAY ? t == xe.SUNDAY ? 7 : t : r == xe.SATURDAY ? t == xe.SATURDAY ? 7 : t == xe.SUNDAY ? 8 : 1 + t : t < r && t != xe.SUNDAY ? ui(e, t) : ui(e, t) + 7;
|
|
16338
16338
|
}
|
|
16339
|
-
return
|
|
16339
|
+
return ET(e, t);
|
|
16340
16340
|
}
|
|
16341
|
-
function
|
|
16341
|
+
function ET(e, t) {
|
|
16342
16342
|
const n = Ff(e, t), r = ui(e, t);
|
|
16343
16343
|
return r < -n ? r : n;
|
|
16344
16344
|
}
|
|
@@ -16353,7 +16353,7 @@ function Ff(e, t) {
|
|
|
16353
16353
|
return r >= 0 && (r -= 7), r;
|
|
16354
16354
|
}
|
|
16355
16355
|
const ST = new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${Pt(oa)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`, "i"), xT = 1, PT = 2, AT = 3;
|
|
16356
|
-
class DT extends
|
|
16356
|
+
class DT extends ke {
|
|
16357
16357
|
innerPattern() {
|
|
16358
16358
|
return ST;
|
|
16359
16359
|
}
|
|
@@ -16378,7 +16378,7 @@ class DT extends Ee {
|
|
|
16378
16378
|
}
|
|
16379
16379
|
}
|
|
16380
16380
|
const $T = new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Pt(ji)})(?=\\s*)(?=\\W|$)`, "i"), OT = 1, CT = 2;
|
|
16381
|
-
class RT extends
|
|
16381
|
+
class RT extends ke {
|
|
16382
16382
|
innerPattern() {
|
|
16383
16383
|
return $T;
|
|
16384
16384
|
}
|
|
@@ -16434,7 +16434,7 @@ class LT {
|
|
|
16434
16434
|
}
|
|
16435
16435
|
}
|
|
16436
16436
|
const FT = new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Gn})(?=\\W|$)`, "i"), jT = new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${qi})(?=\\W|$)`, "i");
|
|
16437
|
-
class zT extends
|
|
16437
|
+
class zT extends ke {
|
|
16438
16438
|
allowAbbreviations;
|
|
16439
16439
|
constructor(t = !0) {
|
|
16440
16440
|
super(), this.allowAbbreviations = t;
|
|
@@ -16444,7 +16444,7 @@ class zT extends Ee {
|
|
|
16444
16444
|
}
|
|
16445
16445
|
innerExtract(t, n) {
|
|
16446
16446
|
const r = n[1].toLowerCase();
|
|
16447
|
-
let i =
|
|
16447
|
+
let i = En(n[2]);
|
|
16448
16448
|
if (!i)
|
|
16449
16449
|
return null;
|
|
16450
16450
|
switch (r) {
|
|
@@ -16468,10 +16468,10 @@ class qT extends Kn {
|
|
|
16468
16468
|
return t.match(/^\s*$/i) ? UT(r) || Cu(r) : !1;
|
|
16469
16469
|
}
|
|
16470
16470
|
mergeResults(t, n, r, i) {
|
|
16471
|
-
let s =
|
|
16471
|
+
let s = En(r.text);
|
|
16472
16472
|
Cu(r) && (s = Li(s));
|
|
16473
16473
|
const a = Te.createRelativeFromReference(Xt.fromDate(n.start.date()), s);
|
|
16474
|
-
return new
|
|
16474
|
+
return new kn(n.reference, n.index, `${n.text}${t}${r.text}`, a);
|
|
16475
16475
|
}
|
|
16476
16476
|
}
|
|
16477
16477
|
function Ru(e) {
|
|
@@ -16488,10 +16488,10 @@ class BT extends Kn {
|
|
|
16488
16488
|
return !t.match(this.patternBetween()) || !Ru(n) && !HT(n) ? !1 : !!r.start.get("day") && !!r.start.get("month") && !!r.start.get("year");
|
|
16489
16489
|
}
|
|
16490
16490
|
mergeResults(t, n, r) {
|
|
16491
|
-
let i =
|
|
16491
|
+
let i = En(n.text);
|
|
16492
16492
|
Ru(n) && (i = Li(i));
|
|
16493
16493
|
const s = Te.createRelativeFromReference(Xt.fromDate(r.start.date()), i);
|
|
16494
|
-
return new
|
|
16494
|
+
return new kn(r.reference, n.index, `${n.text}${t}${r.text}`, s);
|
|
16495
16495
|
}
|
|
16496
16496
|
}
|
|
16497
16497
|
const VT = new RegExp(`^\\s*(${zi})`, "i"), WT = 1;
|
|
@@ -16527,7 +16527,7 @@ class GT extends Rf {
|
|
|
16527
16527
|
class KT {
|
|
16528
16528
|
createCasualConfiguration(t = !1) {
|
|
16529
16529
|
const n = this.createConfiguration(!1, t);
|
|
16530
|
-
return n.parsers.push(new wT()), n.parsers.push(new vT()), n.parsers.push(new
|
|
16530
|
+
return n.parsers.push(new wT()), n.parsers.push(new vT()), n.parsers.push(new kv()), n.parsers.push(new RT()), n.parsers.push(new zT()), n.refiners.push(new GT()), n;
|
|
16531
16531
|
}
|
|
16532
16532
|
createConfiguration(t = !0, n = !1) {
|
|
16533
16533
|
const r = Lf({
|
|
@@ -16542,9 +16542,9 @@ class KT {
|
|
|
16542
16542
|
new jv(t),
|
|
16543
16543
|
new Hv(t)
|
|
16544
16544
|
],
|
|
16545
|
-
refiners: [new
|
|
16545
|
+
refiners: [new Eu()]
|
|
16546
16546
|
}, t);
|
|
16547
|
-
return r.parsers.unshift(new Av(t)), r.refiners.unshift(new BT()), r.refiners.unshift(new qT()), r.refiners.unshift(new ca()), r.refiners.push(new
|
|
16547
|
+
return r.parsers.unshift(new Av(t)), r.refiners.unshift(new BT()), r.refiners.unshift(new qT()), r.refiners.unshift(new ca()), r.refiners.push(new Eu()), r.refiners.push(new YT()), r.refiners.push(new Bv()), r;
|
|
16548
16548
|
}
|
|
16549
16549
|
}
|
|
16550
16550
|
class Hn {
|
|
@@ -16586,7 +16586,7 @@ class Hn {
|
|
|
16586
16586
|
continue;
|
|
16587
16587
|
}
|
|
16588
16588
|
let c = null;
|
|
16589
|
-
u instanceof
|
|
16589
|
+
u instanceof kn ? c = u : u instanceof Te ? (c = t.createParsingResult(o.index, o[0]), c.start = u) : c = t.createParsingResult(o.index, o[0], u);
|
|
16590
16590
|
const f = c.index, h = c.text;
|
|
16591
16591
|
t.debug(() => console.log(`${n.constructor.name} extracted (at index=${f}) '${h}'`)), r.push(c), a = s.substring(f + h.length), o = i.exec(a);
|
|
16592
16592
|
}
|
|
@@ -16606,7 +16606,7 @@ class ZT {
|
|
|
16606
16606
|
}
|
|
16607
16607
|
createParsingResult(t, n, r, i) {
|
|
16608
16608
|
const s = typeof n == "string" ? n : this.text.substring(t, n), a = r ? this.createParsingComponents(r) : null, o = i ? this.createParsingComponents(i) : null;
|
|
16609
|
-
return new
|
|
16609
|
+
return new kn(this.reference, t, s, a, o);
|
|
16610
16610
|
}
|
|
16611
16611
|
debug(t) {
|
|
16612
16612
|
this.option.debug && (this.option.debug instanceof Function ? this.option.debug(t) : this.option.debug.debug(t));
|
|
@@ -16653,7 +16653,7 @@ function JT(e) {
|
|
|
16653
16653
|
return parseInt(t);
|
|
16654
16654
|
}
|
|
16655
16655
|
const Ns = 1, Nu = 2, Ms = 3;
|
|
16656
|
-
class XT extends
|
|
16656
|
+
class XT extends ke {
|
|
16657
16657
|
innerPattern() {
|
|
16658
16658
|
return new RegExp("(\\d{2,4}|[" + Object.keys(Ge).join("") + "]{4}|[" + Object.keys(Ge).join("") + "]{2})?(?:\\s*)(?:年)?(?:[\\s|,|,]*)(\\d{1,2}|[" + Object.keys(Ge).join("") + "]{1,3})(?:\\s*)(?:月)(?:\\s*)(\\d{1,2}|[" + Object.keys(Ge).join("") + "]{1,3})?(?:\\s*)(?:日|号)?");
|
|
16659
16659
|
}
|
|
@@ -16673,8 +16673,8 @@ class XT extends Ee {
|
|
|
16673
16673
|
return r;
|
|
16674
16674
|
}
|
|
16675
16675
|
}
|
|
16676
|
-
const QT = new RegExp("(\\d+|[" + Object.keys(Ge).join("") + "]+|半|几)(?:\\s*)(?:个)?(秒(?:钟)?|分钟|小时|钟|日|天|星期|礼拜|月|年)(?:(?:之|过)?后|(?:之)?内)", "i"), Is = 1,
|
|
16677
|
-
class
|
|
16676
|
+
const QT = new RegExp("(\\d+|[" + Object.keys(Ge).join("") + "]+|半|几)(?:\\s*)(?:个)?(秒(?:钟)?|分钟|小时|钟|日|天|星期|礼拜|月|年)(?:(?:之|过)?后|(?:之)?内)", "i"), Is = 1, ek = 2;
|
|
16677
|
+
class tk extends ke {
|
|
16678
16678
|
innerPattern() {
|
|
16679
16679
|
return QT;
|
|
16680
16680
|
}
|
|
@@ -16690,7 +16690,7 @@ class tE extends Ee {
|
|
|
16690
16690
|
else
|
|
16691
16691
|
return null;
|
|
16692
16692
|
}
|
|
16693
|
-
const s = {}, o = n[
|
|
16693
|
+
const s = {}, o = n[ek][0];
|
|
16694
16694
|
if (o.match(/[日天星礼月年]/)) {
|
|
16695
16695
|
o == "日" || o == "天" ? s.day = i : o == "星" || o == "礼" ? s.week = i : o == "月" ? s.month = i : o == "年" && (s.year = i);
|
|
16696
16696
|
const u = Ie(t.refDate, s);
|
|
@@ -16701,10 +16701,10 @@ class tE extends Ee {
|
|
|
16701
16701
|
return r.start.imply("year", l.getFullYear()), r.start.imply("month", l.getMonth() + 1), r.start.imply("day", l.getDate()), r.start.assign("hour", l.getHours()), r.start.assign("minute", l.getMinutes()), r.start.assign("second", l.getSeconds()), r;
|
|
16702
16702
|
}
|
|
16703
16703
|
}
|
|
16704
|
-
const
|
|
16705
|
-
class
|
|
16704
|
+
const nk = new RegExp("(?<prefix>上|下|这)(?:个)?(?:星期|礼拜|周)(?<weekday>" + Object.keys(Hi).join("|") + ")");
|
|
16705
|
+
class rk extends ke {
|
|
16706
16706
|
innerPattern() {
|
|
16707
|
-
return
|
|
16707
|
+
return nk;
|
|
16708
16708
|
}
|
|
16709
16709
|
innerExtract(t, n) {
|
|
16710
16710
|
const r = t.createParsingResult(n.index, n[0]), i = n.groups.weekday, s = Hi[i];
|
|
@@ -16729,10 +16729,10 @@ class rE extends Ee {
|
|
|
16729
16729
|
return r.start.assign("weekday", s), u ? (r.start.assign("day", l.getDate()), r.start.assign("month", l.getMonth() + 1), r.start.assign("year", l.getFullYear())) : (r.start.imply("day", l.getDate()), r.start.imply("month", l.getMonth() + 1), r.start.imply("year", l.getFullYear())), r;
|
|
16730
16730
|
}
|
|
16731
16731
|
}
|
|
16732
|
-
const
|
|
16733
|
-
class
|
|
16732
|
+
const ik = new RegExp("(?:从|自)?(?:(今|明|前|大前|后|大后|昨)(早|朝|晚)|(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|后|大后|昨)(?:日|天)(?:[\\s,,]*)(?:(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|[" + Object.keys(Ge).join("") + "]+)(?:\\s*)(?:点|时|:|:)(?:\\s*)(\\d+|半|正|整|[" + Object.keys(Ge).join("") + "]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|[" + Object.keys(Ge).join("") + "]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?", "i"), sk = new RegExp("(?:^\\s*(?:到|至|\\-|\\–|\\~|\\〜)\\s*)(?:(今|明|前|大前|后|大后|昨)(早|朝|晚)|(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|后|大后|昨)(?:日|天)(?:[\\s,,]*)(?:(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|[" + Object.keys(Ge).join("") + "]+)(?:\\s*)(?:点|时|:|:)(?:\\s*)(\\d+|半|正|整|[" + Object.keys(Ge).join("") + "]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|[" + Object.keys(Ge).join("") + "]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?", "i"), Wr = 1, Yr = 2, Gr = 3, Kr = 4, Zr = 5, Jr = 6, ut = 7, fn = 8, Xr = 9;
|
|
16733
|
+
class ak extends ke {
|
|
16734
16734
|
innerPattern() {
|
|
16735
|
-
return
|
|
16735
|
+
return ik;
|
|
16736
16736
|
}
|
|
16737
16737
|
innerExtract(t, n) {
|
|
16738
16738
|
if (n.index > 0 && t.text[n.index - 1].match(/\w/))
|
|
@@ -16771,7 +16771,7 @@ class aE extends Ee {
|
|
|
16771
16771
|
f == "上" || f == "早" || f == "凌" ? (o = 0, s == 12 && (s = 0)) : (f == "下" || f == "晚") && (o = 1, s != 12 && (s += 12));
|
|
16772
16772
|
}
|
|
16773
16773
|
r.start.assign("hour", s), r.start.assign("minute", a), o >= 0 ? r.start.assign("meridiem", o) : s < 12 ? r.start.imply("meridiem", 0) : r.start.imply("meridiem", 1);
|
|
16774
|
-
const l =
|
|
16774
|
+
const l = sk.exec(t.text.substring(r.index + r.text.length));
|
|
16775
16775
|
if (!l)
|
|
16776
16776
|
return r.text.match(/^\d+$/) ? null : r;
|
|
16777
16777
|
const u = new Date(i.getTime());
|
|
@@ -16809,10 +16809,10 @@ class aE extends Ee {
|
|
|
16809
16809
|
return r.text = r.text + l[0], r.end.assign("hour", s), r.end.assign("minute", a), o >= 0 ? r.end.assign("meridiem", o) : r.start.isCertain("meridiem") && r.start.get("meridiem") == 1 && r.start.get("hour") > s ? r.end.imply("meridiem", 0) : s > 12 && r.end.imply("meridiem", 1), r.end.date().getTime() < r.start.date().getTime() && r.end.imply("day", r.end.get("day") + 1), r;
|
|
16810
16810
|
}
|
|
16811
16811
|
}
|
|
16812
|
-
const
|
|
16813
|
-
class
|
|
16812
|
+
const ok = new RegExp("(?:星期|礼拜|周)(?<weekday>" + Object.keys(Hi).join("|") + ")");
|
|
16813
|
+
class lk extends ke {
|
|
16814
16814
|
innerPattern() {
|
|
16815
|
-
return
|
|
16815
|
+
return ok;
|
|
16816
16816
|
}
|
|
16817
16817
|
innerExtract(t, n) {
|
|
16818
16818
|
const r = t.createParsingResult(n.index, n[0]), i = n.groups.weekday, s = Hi[i];
|
|
@@ -16823,18 +16823,18 @@ class lE extends Ee {
|
|
|
16823
16823
|
return Math.abs(l - 7) < Math.abs(l) && (l -= 7), Math.abs(l + 7) < Math.abs(l) && (l += 7), a.setDate(a.getDate() + l), r.start.assign("weekday", s), r.start.imply("day", a.getDate()), r.start.imply("month", a.getMonth() + 1), r.start.imply("year", a.getFullYear()), r;
|
|
16824
16824
|
}
|
|
16825
16825
|
}
|
|
16826
|
-
const
|
|
16827
|
-
class
|
|
16826
|
+
const uk = 1, Mu = 2, ck = 3, Iu = 4, Lu = 5, fk = 6;
|
|
16827
|
+
class dk extends ke {
|
|
16828
16828
|
innerPattern(t) {
|
|
16829
16829
|
return new RegExp("(而家|立(?:刻|即)|即刻)|(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s|,|,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?", "i");
|
|
16830
16830
|
}
|
|
16831
16831
|
innerExtract(t, n) {
|
|
16832
16832
|
const r = n.index, i = t.createParsingResult(r, n[0]), s = t.refDate;
|
|
16833
16833
|
let a = new Date(s.getTime());
|
|
16834
|
-
if (n[
|
|
16834
|
+
if (n[uk])
|
|
16835
16835
|
i.start.imply("hour", s.getHours()), i.start.imply("minute", s.getMinutes()), i.start.imply("second", s.getSeconds()), i.start.imply("millisecond", s.getMilliseconds());
|
|
16836
16836
|
else if (n[Mu]) {
|
|
16837
|
-
const o = n[Mu], l = n[
|
|
16837
|
+
const o = n[Mu], l = n[ck];
|
|
16838
16838
|
o == "明" || o == "聽" ? s.getHours() > 1 && a.setDate(a.getDate() + 1) : o == "昨" || o == "尋" || o == "琴" ? a.setDate(a.getDate() - 1) : o == "前" ? a.setDate(a.getDate() - 2) : o == "大前" ? a.setDate(a.getDate() - 3) : o == "後" ? a.setDate(a.getDate() + 2) : o == "大後" && a.setDate(a.getDate() + 3), l == "早" || l == "朝" ? i.start.imply("hour", 6) : l == "晚" && (i.start.imply("hour", 22), i.start.imply("meridiem", 1));
|
|
16839
16839
|
} else if (n[Iu]) {
|
|
16840
16840
|
const l = n[Iu][0];
|
|
@@ -16842,7 +16842,7 @@ class dE extends Ee {
|
|
|
16842
16842
|
} else if (n[Lu]) {
|
|
16843
16843
|
const o = n[Lu];
|
|
16844
16844
|
o == "明" || o == "聽" ? s.getHours() > 1 && a.setDate(a.getDate() + 1) : o == "昨" || o == "尋" || o == "琴" ? a.setDate(a.getDate() - 1) : o == "前" ? a.setDate(a.getDate() - 2) : o == "大前" ? a.setDate(a.getDate() - 3) : o == "後" ? a.setDate(a.getDate() + 2) : o == "大後" && a.setDate(a.getDate() + 3);
|
|
16845
|
-
const l = n[
|
|
16845
|
+
const l = n[fk];
|
|
16846
16846
|
if (l) {
|
|
16847
16847
|
const u = l[0];
|
|
16848
16848
|
u == "早" || u == "朝" || u == "上" ? i.start.imply("hour", 6) : u == "下" || u == "晏" ? (i.start.imply("hour", 15), i.start.imply("meridiem", 1)) : u == "中" ? (i.start.imply("hour", 12), i.start.imply("meridiem", 1)) : u == "夜" || u == "晚" ? (i.start.imply("hour", 22), i.start.imply("meridiem", 1)) : u == "凌" && i.start.imply("hour", 0);
|
|
@@ -16884,7 +16884,7 @@ function Mt(e) {
|
|
|
16884
16884
|
}
|
|
16885
16885
|
return t;
|
|
16886
16886
|
}
|
|
16887
|
-
function
|
|
16887
|
+
function hk(e) {
|
|
16888
16888
|
let t = "";
|
|
16889
16889
|
for (let n = 0; n < e.length; n++) {
|
|
16890
16890
|
const r = e[n];
|
|
@@ -16893,7 +16893,7 @@ function hE(e) {
|
|
|
16893
16893
|
return parseInt(t);
|
|
16894
16894
|
}
|
|
16895
16895
|
const Ls = 1, Fu = 2, Fs = 3;
|
|
16896
|
-
class
|
|
16896
|
+
class pk extends ke {
|
|
16897
16897
|
innerPattern() {
|
|
16898
16898
|
return new RegExp("(\\d{2,4}|[" + Object.keys(Ke).join("") + "]{4}|[" + Object.keys(Ke).join("") + "]{2})?(?:\\s*)(?:年)?(?:[\\s|,|,]*)(\\d{1,2}|[" + Object.keys(Ke).join("") + "]{1,2})(?:\\s*)(?:月)(?:\\s*)(\\d{1,2}|[" + Object.keys(Ke).join("") + "]{1,2})?(?:\\s*)(?:日|號)?");
|
|
16899
16899
|
}
|
|
@@ -16907,16 +16907,16 @@ class pE extends Ee {
|
|
|
16907
16907
|
r.start.imply("day", t.refDate.getDate());
|
|
16908
16908
|
if (n[Ls]) {
|
|
16909
16909
|
let s = parseInt(n[Ls]);
|
|
16910
|
-
isNaN(s) && (s =
|
|
16910
|
+
isNaN(s) && (s = hk(n[Ls])), r.start.assign("year", s);
|
|
16911
16911
|
} else
|
|
16912
16912
|
r.start.imply("year", t.refDate.getFullYear());
|
|
16913
16913
|
return r;
|
|
16914
16914
|
}
|
|
16915
16915
|
}
|
|
16916
|
-
const
|
|
16917
|
-
class
|
|
16916
|
+
const mk = new RegExp("(\\d+|[" + Object.keys(Ke).join("") + "]+|半|幾)(?:\\s*)(?:個)?(秒(?:鐘)?|分鐘|小時|鐘|日|天|星期|禮拜|月|年)(?:(?:之|過)?後|(?:之)?內)", "i"), js = 1, gk = 2;
|
|
16917
|
+
class yk extends ke {
|
|
16918
16918
|
innerPattern() {
|
|
16919
|
-
return
|
|
16919
|
+
return mk;
|
|
16920
16920
|
}
|
|
16921
16921
|
innerExtract(t, n) {
|
|
16922
16922
|
const r = t.createParsingResult(n.index, n[0]);
|
|
@@ -16930,7 +16930,7 @@ class yE extends Ee {
|
|
|
16930
16930
|
else
|
|
16931
16931
|
return null;
|
|
16932
16932
|
}
|
|
16933
|
-
const s = {}, o = n[
|
|
16933
|
+
const s = {}, o = n[gk][0];
|
|
16934
16934
|
if (o.match(/[日天星禮月年]/)) {
|
|
16935
16935
|
o == "日" || o == "天" ? s.day = i : o == "星" || o == "禮" ? s.week = i : o == "月" ? s.month = i : o == "年" && (s.year = i);
|
|
16936
16936
|
const u = Ie(t.refDate, s);
|
|
@@ -16941,10 +16941,10 @@ class yE extends Ee {
|
|
|
16941
16941
|
return r.start.imply("year", l.getFullYear()), r.start.imply("month", l.getMonth() + 1), r.start.imply("day", l.getDate()), r.start.assign("hour", l.getHours()), r.start.assign("minute", l.getMinutes()), r.start.assign("second", l.getSeconds()), r;
|
|
16942
16942
|
}
|
|
16943
16943
|
}
|
|
16944
|
-
const
|
|
16945
|
-
class
|
|
16944
|
+
const bk = new RegExp("(?<prefix>上|今|下|這|呢)(?:個)?(?:星期|禮拜|週)(?<weekday>" + Object.keys(Bi).join("|") + ")");
|
|
16945
|
+
class wk extends ke {
|
|
16946
16946
|
innerPattern() {
|
|
16947
|
-
return
|
|
16947
|
+
return bk;
|
|
16948
16948
|
}
|
|
16949
16949
|
innerExtract(t, n) {
|
|
16950
16950
|
const r = t.createParsingResult(n.index, n[0]), i = n.groups.weekday, s = Bi[i];
|
|
@@ -16969,10 +16969,10 @@ class wE extends Ee {
|
|
|
16969
16969
|
return r.start.assign("weekday", s), u ? (r.start.assign("day", l.getDate()), r.start.assign("month", l.getMonth() + 1), r.start.assign("year", l.getFullYear())) : (r.start.imply("day", l.getDate()), r.start.imply("month", l.getMonth() + 1), r.start.imply("year", l.getFullYear())), r;
|
|
16970
16970
|
}
|
|
16971
16971
|
}
|
|
16972
|
-
const
|
|
16973
|
-
class
|
|
16972
|
+
const _k = new RegExp("(?:由|從|自)?(?:(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s,,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|[" + Object.keys(Ke).join("") + "]+)(?:\\s*)(?:點|時|:|:)(?:\\s*)(\\d+|半|正|整|[" + Object.keys(Ke).join("") + "]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|[" + Object.keys(Ke).join("") + "]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?", "i"), vk = new RegExp("(?:^\\s*(?:到|至|\\-|\\–|\\~|\\〜)\\s*)(?:(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s,,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|[" + Object.keys(Ke).join("") + "]+)(?:\\s*)(?:點|時|:|:)(?:\\s*)(\\d+|半|正|整|[" + Object.keys(Ke).join("") + "]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|[" + Object.keys(Ke).join("") + "]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?", "i"), Qr = 1, ei = 2, ti = 3, ni = 4, ri = 5, ii = 6, ct = 7, dn = 8, si = 9;
|
|
16973
|
+
class Tk extends ke {
|
|
16974
16974
|
innerPattern() {
|
|
16975
|
-
return
|
|
16975
|
+
return _k;
|
|
16976
16976
|
}
|
|
16977
16977
|
innerExtract(t, n) {
|
|
16978
16978
|
if (n.index > 0 && t.text[n.index - 1].match(/\w/))
|
|
@@ -17011,7 +17011,7 @@ class TE extends Ee {
|
|
|
17011
17011
|
T == "上" || T == "朝" || T == "早" || T == "凌" ? (o = 0, s == 12 && (s = 0)) : (T == "下" || T == "晏" || T == "晚") && (o = 1, s != 12 && (s += 12));
|
|
17012
17012
|
}
|
|
17013
17013
|
r.start.assign("hour", s), r.start.assign("minute", a), o >= 0 ? r.start.assign("meridiem", o) : s < 12 ? r.start.imply("meridiem", 0) : r.start.imply("meridiem", 1);
|
|
17014
|
-
const y =
|
|
17014
|
+
const y = vk.exec(t.text.substring(r.index + r.text.length));
|
|
17015
17015
|
if (!y)
|
|
17016
17016
|
return r.text.match(/^\d+$/) ? null : r;
|
|
17017
17017
|
const m = new Date(i.getTime());
|
|
@@ -17049,10 +17049,10 @@ class TE extends Ee {
|
|
|
17049
17049
|
return r.text = r.text + y[0], r.end.assign("hour", s), r.end.assign("minute", a), o >= 0 ? r.end.assign("meridiem", o) : r.start.isCertain("meridiem") && r.start.get("meridiem") == 1 && r.start.get("hour") > s ? r.end.imply("meridiem", 0) : s > 12 && r.end.imply("meridiem", 1), r.end.date().getTime() < r.start.date().getTime() && r.end.imply("day", r.end.get("day") + 1), r;
|
|
17050
17050
|
}
|
|
17051
17051
|
}
|
|
17052
|
-
const
|
|
17053
|
-
class
|
|
17052
|
+
const kk = new RegExp("(?:星期|禮拜|週)(?<weekday>" + Object.keys(Bi).join("|") + ")");
|
|
17053
|
+
class Ek extends ke {
|
|
17054
17054
|
innerPattern() {
|
|
17055
|
-
return
|
|
17055
|
+
return kk;
|
|
17056
17056
|
}
|
|
17057
17057
|
innerExtract(t, n) {
|
|
17058
17058
|
const r = t.createParsingResult(n.index, n[0]), i = n.groups.weekday, s = Bi[i];
|
|
@@ -17063,49 +17063,49 @@ class kE extends Ee {
|
|
|
17063
17063
|
return Math.abs(l - 7) < Math.abs(l) && (l -= 7), Math.abs(l + 7) < Math.abs(l) && (l += 7), a.setDate(a.getDate() + l), r.start.assign("weekday", s), r.start.imply("day", a.getDate()), r.start.imply("month", a.getMonth() + 1), r.start.imply("year", a.getFullYear()), r;
|
|
17064
17064
|
}
|
|
17065
17065
|
}
|
|
17066
|
-
class
|
|
17066
|
+
class Sk extends Nf {
|
|
17067
17067
|
patternBetween() {
|
|
17068
17068
|
return /^\s*(至|到|\-|\~|~|-|ー)\s*$/i;
|
|
17069
17069
|
}
|
|
17070
17070
|
}
|
|
17071
|
-
class
|
|
17071
|
+
class xk extends Mf {
|
|
17072
17072
|
patternBetween() {
|
|
17073
17073
|
return /^\s*$/i;
|
|
17074
17074
|
}
|
|
17075
17075
|
}
|
|
17076
|
-
const
|
|
17076
|
+
const Pk = new Hn(Dk());
|
|
17077
17077
|
new Hn(jf());
|
|
17078
|
-
function
|
|
17079
|
-
return
|
|
17078
|
+
function Ak(e, t, n) {
|
|
17079
|
+
return Pk.parseDate(e, t, n);
|
|
17080
17080
|
}
|
|
17081
|
-
function
|
|
17081
|
+
function Dk() {
|
|
17082
17082
|
const e = jf();
|
|
17083
|
-
return e.parsers.unshift(new
|
|
17083
|
+
return e.parsers.unshift(new dk()), e;
|
|
17084
17084
|
}
|
|
17085
17085
|
function jf() {
|
|
17086
17086
|
const e = Lf({
|
|
17087
17087
|
parsers: [
|
|
17088
|
-
new
|
|
17088
|
+
new pk(),
|
|
17089
17089
|
new XT(),
|
|
17090
|
-
new
|
|
17091
|
-
new
|
|
17092
|
-
new
|
|
17093
|
-
new
|
|
17094
|
-
new
|
|
17095
|
-
new
|
|
17096
|
-
new
|
|
17097
|
-
new
|
|
17090
|
+
new wk(),
|
|
17091
|
+
new rk(),
|
|
17092
|
+
new Ek(),
|
|
17093
|
+
new lk(),
|
|
17094
|
+
new Tk(),
|
|
17095
|
+
new ak(),
|
|
17096
|
+
new yk(),
|
|
17097
|
+
new tk()
|
|
17098
17098
|
],
|
|
17099
|
-
refiners: [new
|
|
17099
|
+
refiners: [new Sk(), new xk()]
|
|
17100
17100
|
});
|
|
17101
17101
|
return e.refiners = e.refiners.filter((t) => !(t instanceof If)), e;
|
|
17102
17102
|
}
|
|
17103
|
-
var ci = { exports: {} }, $
|
|
17104
|
-
function
|
|
17103
|
+
var ci = { exports: {} }, $k = ci.exports, ju;
|
|
17104
|
+
function Ok() {
|
|
17105
17105
|
return ju || (ju = 1, (function(e, t) {
|
|
17106
17106
|
(function(n, r) {
|
|
17107
17107
|
e.exports = r();
|
|
17108
|
-
})($
|
|
17108
|
+
})($k, (function() {
|
|
17109
17109
|
var n = 1e3, r = 6e4, i = 36e5, s = "millisecond", a = "second", o = "minute", l = "hour", u = "day", c = "week", f = "month", h = "quarter", d = "year", g = "date", T = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, p = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(H) {
|
|
17110
17110
|
var j = ["th", "st", "nd", "rd"], B = H % 100;
|
|
17111
17111
|
return "[" + H + (j[(B - 20) % 10] || j[B] || j[0]) + "]";
|
|
@@ -17117,8 +17117,8 @@ function OE() {
|
|
|
17117
17117
|
return (j <= 0 ? "+" : "-") + b(Z, 2, "0") + ":" + b(q, 2, "0");
|
|
17118
17118
|
}, m: function H(j, B) {
|
|
17119
17119
|
if (j.date() < B.date()) return -H(B, j);
|
|
17120
|
-
var Z = 12 * (B.year() - j.year()) + (B.month() - j.month()), q = j.clone().add(Z, f), ee = B - q < 0,
|
|
17121
|
-
return +(-(Z + (B - q) / (ee ? q -
|
|
17120
|
+
var Z = 12 * (B.year() - j.year()) + (B.month() - j.month()), q = j.clone().add(Z, f), ee = B - q < 0, k = j.clone().add(Z + (ee ? -1 : 1), f);
|
|
17121
|
+
return +(-(Z + (B - q) / (ee ? q - k : k - q)) || 0);
|
|
17122
17122
|
}, a: function(H) {
|
|
17123
17123
|
return H < 0 ? Math.ceil(H) || 0 : Math.floor(H);
|
|
17124
17124
|
}, p: function(H) {
|
|
@@ -17135,8 +17135,8 @@ function OE() {
|
|
|
17135
17135
|
if (typeof j == "string") {
|
|
17136
17136
|
var ee = j.toLowerCase();
|
|
17137
17137
|
w[ee] && (q = ee), B && (w[ee] = B, q = ee);
|
|
17138
|
-
var
|
|
17139
|
-
if (!q &&
|
|
17138
|
+
var k = j.split("-");
|
|
17139
|
+
if (!q && k.length > 1) return H(k[0]);
|
|
17140
17140
|
} else {
|
|
17141
17141
|
var D = j.name;
|
|
17142
17142
|
w[D] = j, q = D;
|
|
@@ -17162,10 +17162,10 @@ function OE() {
|
|
|
17162
17162
|
if (C.u(q)) return /* @__PURE__ */ new Date();
|
|
17163
17163
|
if (q instanceof Date) return new Date(q);
|
|
17164
17164
|
if (typeof q == "string" && !/Z$/i.test(q)) {
|
|
17165
|
-
var
|
|
17166
|
-
if (
|
|
17167
|
-
var D =
|
|
17168
|
-
return ee ? new Date(Date.UTC(
|
|
17165
|
+
var k = q.match(y);
|
|
17166
|
+
if (k) {
|
|
17167
|
+
var D = k[2] - 1 || 0, I = (k[7] || "0").substring(0, 3);
|
|
17168
|
+
return ee ? new Date(Date.UTC(k[1], D, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, I)) : new Date(k[1], D, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, I);
|
|
17169
17169
|
}
|
|
17170
17170
|
}
|
|
17171
17171
|
return new Date(q);
|
|
@@ -17191,20 +17191,20 @@ function OE() {
|
|
|
17191
17191
|
}, j.valueOf = function() {
|
|
17192
17192
|
return this.$d.getTime();
|
|
17193
17193
|
}, j.startOf = function(B, Z) {
|
|
17194
|
-
var q = this, ee = !!C.u(Z) || Z,
|
|
17194
|
+
var q = this, ee = !!C.u(Z) || Z, k = C.p(B), D = function(ae, ne) {
|
|
17195
17195
|
var O = C.w(q.$u ? Date.UTC(q.$y, ne, ae) : new Date(q.$y, ne, ae), q);
|
|
17196
17196
|
return ee ? O : O.endOf(u);
|
|
17197
17197
|
}, I = function(ae, ne) {
|
|
17198
17198
|
return C.w(q.toDate()[ae].apply(q.toDate("s"), (ee ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), q);
|
|
17199
|
-
}, _ = this.$W,
|
|
17200
|
-
switch (
|
|
17199
|
+
}, _ = this.$W, E = this.$M, P = this.$D, M = "set" + (this.$u ? "UTC" : "");
|
|
17200
|
+
switch (k) {
|
|
17201
17201
|
case d:
|
|
17202
17202
|
return ee ? D(1, 0) : D(31, 11);
|
|
17203
17203
|
case f:
|
|
17204
|
-
return ee ? D(1,
|
|
17204
|
+
return ee ? D(1, E) : D(0, E + 1);
|
|
17205
17205
|
case c:
|
|
17206
17206
|
var X = this.$locale().weekStart || 0, J = (_ < X ? _ + 7 : _) - X;
|
|
17207
|
-
return D(ee ? P - J : P + (6 - J),
|
|
17207
|
+
return D(ee ? P - J : P + (6 - J), E);
|
|
17208
17208
|
case u:
|
|
17209
17209
|
case g:
|
|
17210
17210
|
return I(M + "Hours", 0);
|
|
@@ -17220,7 +17220,7 @@ function OE() {
|
|
|
17220
17220
|
}, j.endOf = function(B) {
|
|
17221
17221
|
return this.startOf(B, !1);
|
|
17222
17222
|
}, j.$set = function(B, Z) {
|
|
17223
|
-
var q, ee = C.p(B),
|
|
17223
|
+
var q, ee = C.p(B), k = "set" + (this.$u ? "UTC" : ""), D = (q = {}, q[u] = k + "Date", q[g] = k + "Date", q[f] = k + "Month", q[d] = k + "FullYear", q[l] = k + "Hours", q[o] = k + "Minutes", q[a] = k + "Seconds", q[s] = k + "Milliseconds", q)[ee], I = ee === u ? this.$D + (Z - this.$W) : Z;
|
|
17224
17224
|
if (ee === f || ee === d) {
|
|
17225
17225
|
var _ = this.clone().set(g, 1);
|
|
17226
17226
|
_.$d[D](I), _.init(), this.$d = _.set(g, Math.min(this.$D, _.daysInMonth())).$d;
|
|
@@ -17233,22 +17233,22 @@ function OE() {
|
|
|
17233
17233
|
}, j.add = function(B, Z) {
|
|
17234
17234
|
var q, ee = this;
|
|
17235
17235
|
B = Number(B);
|
|
17236
|
-
var
|
|
17236
|
+
var k = C.p(Z), D = function(E) {
|
|
17237
17237
|
var P = A(ee);
|
|
17238
|
-
return C.w(P.date(P.date() + Math.round(
|
|
17238
|
+
return C.w(P.date(P.date() + Math.round(E * B)), ee);
|
|
17239
17239
|
};
|
|
17240
|
-
if (
|
|
17241
|
-
if (
|
|
17242
|
-
if (
|
|
17243
|
-
if (
|
|
17244
|
-
var I = (q = {}, q[o] = r, q[l] = i, q[a] = n, q)[
|
|
17240
|
+
if (k === f) return this.set(f, this.$M + B);
|
|
17241
|
+
if (k === d) return this.set(d, this.$y + B);
|
|
17242
|
+
if (k === u) return D(1);
|
|
17243
|
+
if (k === c) return D(7);
|
|
17244
|
+
var I = (q = {}, q[o] = r, q[l] = i, q[a] = n, q)[k] || 1, _ = this.$d.getTime() + B * I;
|
|
17245
17245
|
return C.w(_, this);
|
|
17246
17246
|
}, j.subtract = function(B, Z) {
|
|
17247
17247
|
return this.add(-1 * B, Z);
|
|
17248
17248
|
}, j.format = function(B) {
|
|
17249
17249
|
var Z = this, q = this.$locale();
|
|
17250
17250
|
if (!this.isValid()) return q.invalidDate || T;
|
|
17251
|
-
var ee = B || "YYYY-MM-DDTHH:mm:ssZ",
|
|
17251
|
+
var ee = B || "YYYY-MM-DDTHH:mm:ssZ", k = C.z(this), D = this.$H, I = this.$m, _ = this.$M, E = q.weekdays, P = q.months, M = q.meridiem, X = function(ne, O, R, z) {
|
|
17252
17252
|
return ne && (ne[O] || ne(Z, ee)) || R[O].slice(0, z);
|
|
17253
17253
|
}, J = function(ne) {
|
|
17254
17254
|
return C.s(D % 12 || 12, ne, "0");
|
|
@@ -17278,11 +17278,11 @@ function OE() {
|
|
|
17278
17278
|
case "d":
|
|
17279
17279
|
return String(Z.$W);
|
|
17280
17280
|
case "dd":
|
|
17281
|
-
return X(q.weekdaysMin, Z.$W,
|
|
17281
|
+
return X(q.weekdaysMin, Z.$W, E, 2);
|
|
17282
17282
|
case "ddd":
|
|
17283
|
-
return X(q.weekdaysShort, Z.$W,
|
|
17283
|
+
return X(q.weekdaysShort, Z.$W, E, 3);
|
|
17284
17284
|
case "dddd":
|
|
17285
|
-
return
|
|
17285
|
+
return E[Z.$W];
|
|
17286
17286
|
case "H":
|
|
17287
17287
|
return String(D);
|
|
17288
17288
|
case "HH":
|
|
@@ -17306,16 +17306,16 @@ function OE() {
|
|
|
17306
17306
|
case "SSS":
|
|
17307
17307
|
return C.s(Z.$ms, 3, "0");
|
|
17308
17308
|
case "Z":
|
|
17309
|
-
return
|
|
17309
|
+
return k;
|
|
17310
17310
|
}
|
|
17311
17311
|
return null;
|
|
17312
|
-
})(ne) ||
|
|
17312
|
+
})(ne) || k.replace(":", "");
|
|
17313
17313
|
}));
|
|
17314
17314
|
}, j.utcOffset = function() {
|
|
17315
17315
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
17316
17316
|
}, j.diff = function(B, Z, q) {
|
|
17317
|
-
var ee,
|
|
17318
|
-
return C.m(
|
|
17317
|
+
var ee, k = this, D = C.p(Z), I = A(B), _ = (I.utcOffset() - this.utcOffset()) * r, E = this - I, P = function() {
|
|
17318
|
+
return C.m(k, I);
|
|
17319
17319
|
};
|
|
17320
17320
|
switch (D) {
|
|
17321
17321
|
case d:
|
|
@@ -17328,22 +17328,22 @@ function OE() {
|
|
|
17328
17328
|
ee = P() / 3;
|
|
17329
17329
|
break;
|
|
17330
17330
|
case c:
|
|
17331
|
-
ee = (
|
|
17331
|
+
ee = (E - _) / 6048e5;
|
|
17332
17332
|
break;
|
|
17333
17333
|
case u:
|
|
17334
|
-
ee = (
|
|
17334
|
+
ee = (E - _) / 864e5;
|
|
17335
17335
|
break;
|
|
17336
17336
|
case l:
|
|
17337
|
-
ee =
|
|
17337
|
+
ee = E / i;
|
|
17338
17338
|
break;
|
|
17339
17339
|
case o:
|
|
17340
|
-
ee =
|
|
17340
|
+
ee = E / r;
|
|
17341
17341
|
break;
|
|
17342
17342
|
case a:
|
|
17343
|
-
ee =
|
|
17343
|
+
ee = E / n;
|
|
17344
17344
|
break;
|
|
17345
17345
|
default:
|
|
17346
|
-
ee =
|
|
17346
|
+
ee = E;
|
|
17347
17347
|
}
|
|
17348
17348
|
return q ? ee : C.a(ee);
|
|
17349
17349
|
}, j.daysInMonth = function() {
|
|
@@ -17378,14 +17378,14 @@ function OE() {
|
|
|
17378
17378
|
}));
|
|
17379
17379
|
})(ci)), ci.exports;
|
|
17380
17380
|
}
|
|
17381
|
-
var
|
|
17382
|
-
const Vi = /* @__PURE__ */
|
|
17383
|
-
var fi = { exports: {} },
|
|
17384
|
-
function
|
|
17381
|
+
var Ck = Ok();
|
|
17382
|
+
const Vi = /* @__PURE__ */ ki(Ck);
|
|
17383
|
+
var fi = { exports: {} }, Rk = fi.exports, zu;
|
|
17384
|
+
function Nk() {
|
|
17385
17385
|
return zu || (zu = 1, (function(e, t) {
|
|
17386
17386
|
(function(n, r) {
|
|
17387
17387
|
e.exports = r();
|
|
17388
|
-
})(
|
|
17388
|
+
})(Rk, (function() {
|
|
17389
17389
|
var n = "day";
|
|
17390
17390
|
return function(r, i, s) {
|
|
17391
17391
|
var a = function(u) {
|
|
@@ -17409,14 +17409,14 @@ function NE() {
|
|
|
17409
17409
|
}));
|
|
17410
17410
|
})(fi)), fi.exports;
|
|
17411
17411
|
}
|
|
17412
|
-
var
|
|
17413
|
-
const
|
|
17414
|
-
Vi.extend(
|
|
17415
|
-
function
|
|
17412
|
+
var Mk = Nk();
|
|
17413
|
+
const Ik = /* @__PURE__ */ ki(Mk);
|
|
17414
|
+
Vi.extend(Ik);
|
|
17415
|
+
function Lk() {
|
|
17416
17416
|
return Vi().startOf("isoWeek").toDate();
|
|
17417
17417
|
}
|
|
17418
17418
|
const zs = /大*后天/g;
|
|
17419
|
-
function
|
|
17419
|
+
function Fk(e) {
|
|
17420
17420
|
if (!zs.test(e))
|
|
17421
17421
|
return e;
|
|
17422
17422
|
const t = Vi();
|
|
@@ -17425,13 +17425,13 @@ function FE(e) {
|
|
|
17425
17425
|
return t.add(i, "day").format("YYYY年MM月DD日");
|
|
17426
17426
|
});
|
|
17427
17427
|
}
|
|
17428
|
-
function
|
|
17429
|
-
const t =
|
|
17430
|
-
instant: n ?
|
|
17428
|
+
function jk(e) {
|
|
17429
|
+
const t = Fk(e), n = /(?:本|这|上|下)?(?:周|星期)/.test(t), r = Ak(t, {
|
|
17430
|
+
instant: n ? Lk() : /* @__PURE__ */ new Date()
|
|
17431
17431
|
});
|
|
17432
17432
|
return r ? Vi(r).format("YYYY-MM-DD HH:mm:ss") : "无法解析,请输入具体时间";
|
|
17433
17433
|
}
|
|
17434
|
-
const
|
|
17434
|
+
const qk = {
|
|
17435
17435
|
parse_relative_date: {
|
|
17436
17436
|
def: {
|
|
17437
17437
|
type: "function",
|
|
@@ -17450,19 +17450,19 @@ const qE = {
|
|
|
17450
17450
|
}
|
|
17451
17451
|
}
|
|
17452
17452
|
},
|
|
17453
|
-
handler: (e) =>
|
|
17453
|
+
handler: (e) => jk(e.input)
|
|
17454
17454
|
}
|
|
17455
17455
|
};
|
|
17456
|
-
class
|
|
17456
|
+
class zk extends HTMLElement {
|
|
17457
17457
|
constructor() {
|
|
17458
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot && this.shadowRoot.appendChild(
|
|
17458
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot && this.shadowRoot.appendChild(kf.content.cloneNode(!0));
|
|
17459
17459
|
}
|
|
17460
17460
|
connectedCallback() {
|
|
17461
17461
|
this.shadowRoot && Z_(this.shadowRoot);
|
|
17462
17462
|
}
|
|
17463
17463
|
}
|
|
17464
|
-
customElements.define("ai-chat-panel",
|
|
17465
|
-
class
|
|
17464
|
+
customElements.define("ai-chat-panel", zk);
|
|
17465
|
+
class Hk {
|
|
17466
17466
|
on = Ca.on;
|
|
17467
17467
|
pushMessage = ot.pushMessage;
|
|
17468
17468
|
pushMessages = ot.pushMessages;
|
|
@@ -17479,7 +17479,7 @@ class HE {
|
|
|
17479
17479
|
}
|
|
17480
17480
|
}
|
|
17481
17481
|
export {
|
|
17482
|
-
|
|
17483
|
-
|
|
17484
|
-
|
|
17482
|
+
Hk as AIChatPanel,
|
|
17483
|
+
Uk as Agent,
|
|
17484
|
+
qk as tools
|
|
17485
17485
|
};
|