randmarcomps 1.342.0 → 1.343.0
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/randmarcomps.js +344 -335
- package/dist/randmarcomps.umd.cjs +19 -19
- package/package.json +1 -1
package/dist/randmarcomps.js
CHANGED
|
@@ -3,8 +3,8 @@ var Mn = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var Yn = (t, e, n) => e in t ? Kn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var rr = (t, e, n) => Yn(t, typeof e != "symbol" ? e + "" : e, n), Zn = (t, e, n) => e.has(t) || Mn("Cannot " + n);
|
|
7
|
+
var or = (t, e, n) => (Zn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Hr = (t, e, n) => e.has(t) ? Mn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
8
8
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import React__default, { forwardRef, createElement, useState, useLayoutEffect, useEffect, useCallback, useDebugValue, useMemo, useRef, createContext, useContext, isValidElement, Children, PureComponent, useImperativeHandle, cloneElement, Component, Fragment as Fragment$2 } from "react";
|
|
@@ -76,27 +76,27 @@ var jt = React.createContext({}), Lt = React.forwardRef((t, e) => {
|
|
|
76
76
|
ze(null), Qe(null);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
let Ft = Je.selectionStart, Ke = Je.selectionEnd, nt = Je.selectionDirection, st = Je.maxLength, ct = Je.value, dt = Fe.current.prev, ft = -1, mt = -1,
|
|
79
|
+
let Ft = Je.selectionStart, Ke = Je.selectionEnd, nt = Je.selectionDirection, st = Je.maxLength, ct = Je.value, dt = Fe.current.prev, ft = -1, mt = -1, zt;
|
|
80
80
|
if (ct.length !== 0 && Ft !== null && Ke !== null) {
|
|
81
81
|
let qt = Ft === Ke, Pr = Ft === ct.length && ct.length < st;
|
|
82
82
|
if (qt && !Pr) {
|
|
83
83
|
let gr = Ft;
|
|
84
|
-
if (gr === 0) ft = 0, mt = 1,
|
|
85
|
-
else if (gr === st) ft = gr - 1, mt = gr,
|
|
84
|
+
if (gr === 0) ft = 0, mt = 1, zt = "forward";
|
|
85
|
+
else if (gr === st) ft = gr - 1, mt = gr, zt = "backward";
|
|
86
86
|
else if (st > 1 && ct.length > 1) {
|
|
87
|
-
let
|
|
87
|
+
let dr = 0;
|
|
88
88
|
if (dt[0] !== null && dt[1] !== null) {
|
|
89
|
-
|
|
89
|
+
zt = gr < dt[1] ? "backward" : "forward";
|
|
90
90
|
let vr = dt[0] === dt[1] && dt[0] < st;
|
|
91
|
-
|
|
91
|
+
zt === "backward" && !vr && (dr = -1);
|
|
92
92
|
}
|
|
93
|
-
ft =
|
|
93
|
+
ft = dr + gr, mt = dr + gr + 1;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
ft !== -1 && mt !== -1 && ft !== mt && $e.current.setSelectionRange(ft, mt,
|
|
96
|
+
ft !== -1 && mt !== -1 && ft !== mt && $e.current.setSelectionRange(ft, mt, zt);
|
|
97
97
|
}
|
|
98
|
-
let Yt = ft !== -1 ? ft : Ft, sr = mt !== -1 ? mt : Ke,
|
|
99
|
-
ze(Yt), Qe(sr), Fe.current.prev = [Yt, sr,
|
|
98
|
+
let Yt = ft !== -1 ? ft : Ft, sr = mt !== -1 ? mt : Ke, ur = zt ?? nt;
|
|
99
|
+
ze(Yt), Qe(sr), Fe.current.prev = [Yt, sr, ur];
|
|
100
100
|
}
|
|
101
101
|
if (document.addEventListener("selectionchange", Mt, { capture: !0 }), Mt(), document.activeElement === Je && qe(!0), !document.getElementById("input-otp-style")) {
|
|
102
102
|
let Ft = document.createElement("style");
|
|
@@ -10305,7 +10305,7 @@ var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXI
|
|
|
10305
10305
|
type-only property to distinguish between RejectWithValue and FulfillWithMeta
|
|
10306
10306
|
does not exist at runtime
|
|
10307
10307
|
*/
|
|
10308
|
-
|
|
10308
|
+
rr(this, "_type");
|
|
10309
10309
|
this.payload = t, this.meta = e;
|
|
10310
10310
|
}
|
|
10311
10311
|
}, FulfillWithMeta = class {
|
|
@@ -10314,7 +10314,7 @@ var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXI
|
|
|
10314
10314
|
type-only property to distinguish between RejectWithValue and FulfillWithMeta
|
|
10315
10315
|
does not exist at runtime
|
|
10316
10316
|
*/
|
|
10317
|
-
|
|
10317
|
+
rr(this, "_type");
|
|
10318
10318
|
this.payload = t, this.meta = e;
|
|
10319
10319
|
}
|
|
10320
10320
|
}, miniSerializeError = (t) => {
|
|
@@ -10680,7 +10680,7 @@ var SchemaError = class extends Error {
|
|
|
10680
10680
|
/**
|
|
10681
10681
|
* The schema issues.
|
|
10682
10682
|
*/
|
|
10683
|
-
|
|
10683
|
+
rr(this, "issues");
|
|
10684
10684
|
this.name = "SchemaError", this.issues = e;
|
|
10685
10685
|
}
|
|
10686
10686
|
}, QueryStatus = /* @__PURE__ */ ((t) => (t.uninitialized = "uninitialized", t.pending = "pending", t.fulfilled = "fulfilled", t.rejected = "rejected", t))(QueryStatus || {});
|
|
@@ -34733,8 +34733,8 @@ var getTooltipContent = function(e, n, o, l) {
|
|
|
34733
34733
|
st.axisType,
|
|
34734
34734
|
"Id on the targeted graphical component "
|
|
34735
34735
|
).concat((ct = Le == null || (dt = Le.type) === null || dt === void 0 ? void 0 : dt.displayName) !== null && ct !== void 0 ? ct : "")) : invariant$1());
|
|
34736
|
-
var
|
|
34737
|
-
return _objectSpread(_objectSpread({}, nt), {}, _defineProperty(_defineProperty({}, st.axisType,
|
|
34736
|
+
var zt = ft[mt];
|
|
34737
|
+
return _objectSpread(_objectSpread({}, nt), {}, _defineProperty(_defineProperty({}, st.axisType, zt), "".concat(st.axisType, "Ticks"), getTicksOfAxis(zt)));
|
|
34738
34738
|
}, Xe), et = at[Fe], ot = at["".concat(Fe, "Ticks")], it = Q && Q[Ze] && Q[Ze].hasStack && getStackedDataOfItem(Le, Q[Ze].stackGroups), He = getDisplayName(Le.type).indexOf("Bar") >= 0, Ct = getBandSizeOfAxis(et, ot), Je = [], pt = Ue && getBarSizeList({
|
|
34739
34739
|
barSize: oe,
|
|
34740
34740
|
stackGroups: Q,
|
|
@@ -37222,8 +37222,8 @@ var lottie = createCommonjsModule(function(module, exports) {
|
|
|
37222
37222
|
function M(Oe, Le, qe, Ge, ze, Ye, Qe, Ze, tt, Xe, at, et, ot, it, He, Ct) {
|
|
37223
37223
|
var Je = this.props;
|
|
37224
37224
|
if (Oe === 1 && Le === 0 && qe === 0 && Ge === 0 && ze === 0 && Ye === 1 && Qe === 0 && Ze === 0 && tt === 0 && Xe === 0 && at === 1 && et === 0) return Je[12] = Je[12] * Oe + Je[15] * ot, Je[13] = Je[13] * Ye + Je[15] * it, Je[14] = Je[14] * at + Je[15] * He, Je[15] *= Ct, this._identityCalculated = !1, this;
|
|
37225
|
-
var pt = Je[0], Mt = Je[1], Vt = Je[2], Ut = Je[3], Ft = Je[4], Ke = Je[5], nt = Je[6], st = Je[7], ct = Je[8], dt = Je[9], ft = Je[10], mt = Je[11],
|
|
37226
|
-
return Je[0] = pt * Oe + Mt * ze + Vt * tt + Ut * ot, Je[1] = pt * Le + Mt * Ye + Vt * Xe + Ut * it, Je[2] = pt * qe + Mt * Qe + Vt * at + Ut * He, Je[3] = pt * Ge + Mt * Ze + Vt * et + Ut * Ct, Je[4] = Ft * Oe + Ke * ze + nt * tt + st * ot, Je[5] = Ft * Le + Ke * Ye + nt * Xe + st * it, Je[6] = Ft * qe + Ke * Qe + nt * at + st * He, Je[7] = Ft * Ge + Ke * Ze + nt * et + st * Ct, Je[8] = ct * Oe + dt * ze + ft * tt + mt * ot, Je[9] = ct * Le + dt * Ye + ft * Xe + mt * it, Je[10] = ct * qe + dt * Qe + ft * at + mt * He, Je[11] = ct * Ge + dt * Ze + ft * et + mt * Ct, Je[12] =
|
|
37225
|
+
var pt = Je[0], Mt = Je[1], Vt = Je[2], Ut = Je[3], Ft = Je[4], Ke = Je[5], nt = Je[6], st = Je[7], ct = Je[8], dt = Je[9], ft = Je[10], mt = Je[11], zt = Je[12], Yt = Je[13], sr = Je[14], ur = Je[15];
|
|
37226
|
+
return Je[0] = pt * Oe + Mt * ze + Vt * tt + Ut * ot, Je[1] = pt * Le + Mt * Ye + Vt * Xe + Ut * it, Je[2] = pt * qe + Mt * Qe + Vt * at + Ut * He, Je[3] = pt * Ge + Mt * Ze + Vt * et + Ut * Ct, Je[4] = Ft * Oe + Ke * ze + nt * tt + st * ot, Je[5] = Ft * Le + Ke * Ye + nt * Xe + st * it, Je[6] = Ft * qe + Ke * Qe + nt * at + st * He, Je[7] = Ft * Ge + Ke * Ze + nt * et + st * Ct, Je[8] = ct * Oe + dt * ze + ft * tt + mt * ot, Je[9] = ct * Le + dt * Ye + ft * Xe + mt * it, Je[10] = ct * qe + dt * Qe + ft * at + mt * He, Je[11] = ct * Ge + dt * Ze + ft * et + mt * Ct, Je[12] = zt * Oe + Yt * ze + sr * tt + ur * ot, Je[13] = zt * Le + Yt * Ye + sr * Xe + ur * it, Je[14] = zt * qe + Yt * Qe + sr * at + ur * He, Je[15] = zt * Ge + Yt * Ze + sr * et + ur * Ct, this._identityCalculated = !1, this;
|
|
37227
37227
|
}
|
|
37228
37228
|
function I(Oe) {
|
|
37229
37229
|
var Le = Oe.props;
|
|
@@ -58502,10 +58502,10 @@ function indentCodeCompensation(t, e, n) {
|
|
|
58502
58502
|
var _Tokenizer = class {
|
|
58503
58503
|
// set by the lexer
|
|
58504
58504
|
constructor(t) {
|
|
58505
|
-
|
|
58506
|
-
|
|
58505
|
+
rr(this, "options");
|
|
58506
|
+
rr(this, "rules");
|
|
58507
58507
|
// set by the lexer
|
|
58508
|
-
|
|
58508
|
+
rr(this, "lexer");
|
|
58509
58509
|
this.options = t || _defaults;
|
|
58510
58510
|
}
|
|
58511
58511
|
space(t) {
|
|
@@ -58983,11 +58983,11 @@ ${_}` : _;
|
|
|
58983
58983
|
}
|
|
58984
58984
|
}, _Lexer = class yn {
|
|
58985
58985
|
constructor(e) {
|
|
58986
|
-
|
|
58987
|
-
|
|
58988
|
-
|
|
58989
|
-
|
|
58990
|
-
|
|
58986
|
+
rr(this, "tokens");
|
|
58987
|
+
rr(this, "options");
|
|
58988
|
+
rr(this, "state");
|
|
58989
|
+
rr(this, "tokenizer");
|
|
58990
|
+
rr(this, "inlineQueue");
|
|
58991
58991
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || _defaults, this.options.tokenizer = this.options.tokenizer || new _Tokenizer(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
58992
58992
|
inLink: !1,
|
|
58993
58993
|
inRawBlock: !1,
|
|
@@ -59228,8 +59228,8 @@ ${_}` : _;
|
|
|
59228
59228
|
}, _Renderer = class {
|
|
59229
59229
|
// set by the parser
|
|
59230
59230
|
constructor(t) {
|
|
59231
|
-
|
|
59232
|
-
|
|
59231
|
+
rr(this, "options");
|
|
59232
|
+
rr(this, "parser");
|
|
59233
59233
|
this.options = t || _defaults;
|
|
59234
59234
|
}
|
|
59235
59235
|
space(t) {
|
|
@@ -59391,9 +59391,9 @@ ${t}</tr>
|
|
|
59391
59391
|
}
|
|
59392
59392
|
}, _Parser = class vn {
|
|
59393
59393
|
constructor(e) {
|
|
59394
|
-
|
|
59395
|
-
|
|
59396
|
-
|
|
59394
|
+
rr(this, "options");
|
|
59395
|
+
rr(this, "renderer");
|
|
59396
|
+
rr(this, "textRenderer");
|
|
59397
59397
|
this.options = e || _defaults, this.options.renderer = this.options.renderer || new _Renderer(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new _TextRenderer();
|
|
59398
59398
|
}
|
|
59399
59399
|
/**
|
|
@@ -59553,8 +59553,8 @@ ${t}</tr>
|
|
|
59553
59553
|
}
|
|
59554
59554
|
}, gn, _Hooks = (gn = class {
|
|
59555
59555
|
constructor(t) {
|
|
59556
|
-
|
|
59557
|
-
|
|
59556
|
+
rr(this, "options");
|
|
59557
|
+
rr(this, "block");
|
|
59558
59558
|
this.options = t || _defaults;
|
|
59559
59559
|
}
|
|
59560
59560
|
/**
|
|
@@ -59587,22 +59587,22 @@ ${t}</tr>
|
|
|
59587
59587
|
provideParser() {
|
|
59588
59588
|
return this.block ? _Parser.parse : _Parser.parseInline;
|
|
59589
59589
|
}
|
|
59590
|
-
},
|
|
59590
|
+
}, rr(gn, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
59591
59591
|
"preprocess",
|
|
59592
59592
|
"postprocess",
|
|
59593
59593
|
"processAllTokens"
|
|
59594
59594
|
])), gn), Marked = class {
|
|
59595
59595
|
constructor(...t) {
|
|
59596
|
-
|
|
59597
|
-
|
|
59598
|
-
|
|
59599
|
-
|
|
59600
|
-
|
|
59601
|
-
|
|
59602
|
-
|
|
59603
|
-
|
|
59604
|
-
|
|
59605
|
-
|
|
59596
|
+
rr(this, "defaults", _getDefaults());
|
|
59597
|
+
rr(this, "options", this.setOptions);
|
|
59598
|
+
rr(this, "parse", this.parseMarkdown(!0));
|
|
59599
|
+
rr(this, "parseInline", this.parseMarkdown(!1));
|
|
59600
|
+
rr(this, "Parser", _Parser);
|
|
59601
|
+
rr(this, "Renderer", _Renderer);
|
|
59602
|
+
rr(this, "TextRenderer", _TextRenderer);
|
|
59603
|
+
rr(this, "Lexer", _Lexer);
|
|
59604
|
+
rr(this, "Tokenizer", _Tokenizer);
|
|
59605
|
+
rr(this, "Hooks", _Hooks);
|
|
59606
59606
|
this.use(...t);
|
|
59607
59607
|
}
|
|
59608
59608
|
/**
|
|
@@ -60013,25 +60013,25 @@ function createDOMPurify() {
|
|
|
60013
60013
|
})), tt = null, Xe = null, at = !0, et = !0, ot = !1, it = !0, He = !1, Ct = !0, Je = !1, pt = !1, Mt = !1, Vt = !1, Ut = !1, Ft = !1, Ke = !0, nt = !1;
|
|
60014
60014
|
const st = "user-content-";
|
|
60015
60015
|
let ct = !0, dt = !1, ft = {}, mt = null;
|
|
60016
|
-
const
|
|
60016
|
+
const zt = addToSet({}, ["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"]);
|
|
60017
60017
|
let Yt = null;
|
|
60018
60018
|
const sr = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
60019
|
-
let
|
|
60020
|
-
const qt = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Pr = "http://www.w3.org/1998/Math/MathML", gr = "http://www.w3.org/2000/svg",
|
|
60021
|
-
let vr =
|
|
60022
|
-
const yt = addToSet({}, [Pr, gr,
|
|
60023
|
-
let
|
|
60024
|
-
const
|
|
60025
|
-
let
|
|
60026
|
-
const
|
|
60027
|
-
let
|
|
60019
|
+
let ur = null;
|
|
60020
|
+
const qt = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Pr = "http://www.w3.org/1998/Math/MathML", gr = "http://www.w3.org/2000/svg", dr = "http://www.w3.org/1999/xhtml";
|
|
60021
|
+
let vr = dr, Jt = !1, Nr = null;
|
|
60022
|
+
const yt = addToSet({}, [Pr, gr, dr], stringToString);
|
|
60023
|
+
let Qt = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]), Zt = addToSet({}, ["annotation-xml"]);
|
|
60024
|
+
const tr = addToSet({}, ["title", "style", "font", "a", "script"]);
|
|
60025
|
+
let Wt = null;
|
|
60026
|
+
const mr = ["application/xhtml+xml", "text/html"], Xt = "text/html";
|
|
60027
|
+
let ar = null, Cr = null;
|
|
60028
60028
|
const _r = n.createElement("form"), Mr = function(rt) {
|
|
60029
60029
|
return rt instanceof RegExp || rt instanceof Function;
|
|
60030
60030
|
}, Tr = function() {
|
|
60031
60031
|
let rt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
60032
60032
|
if (!(Cr && Cr === rt)) {
|
|
60033
|
-
if ((!rt || typeof rt != "object") && (rt = {}), rt = clone(rt),
|
|
60034
|
-
|
|
60033
|
+
if ((!rt || typeof rt != "object") && (rt = {}), rt = clone(rt), Wt = // eslint-disable-next-line unicorn/prefer-includes
|
|
60034
|
+
mr.indexOf(rt.PARSER_MEDIA_TYPE) === -1 ? Xt : rt.PARSER_MEDIA_TYPE, ar = Wt === "application/xhtml+xml" ? stringToString : stringToLowerCase, Ge = objectHasOwnProperty(rt, "ALLOWED_TAGS") ? addToSet({}, rt.ALLOWED_TAGS, ar) : ze, Ye = objectHasOwnProperty(rt, "ALLOWED_ATTR") ? addToSet({}, rt.ALLOWED_ATTR, ar) : Qe, Nr = objectHasOwnProperty(rt, "ALLOWED_NAMESPACES") ? addToSet({}, rt.ALLOWED_NAMESPACES, stringToString) : yt, ur = objectHasOwnProperty(rt, "ADD_URI_SAFE_ATTR") ? addToSet(clone(qt), rt.ADD_URI_SAFE_ATTR, ar) : qt, Yt = objectHasOwnProperty(rt, "ADD_DATA_URI_TAGS") ? addToSet(clone(sr), rt.ADD_DATA_URI_TAGS, ar) : sr, mt = objectHasOwnProperty(rt, "FORBID_CONTENTS") ? addToSet({}, rt.FORBID_CONTENTS, ar) : zt, tt = objectHasOwnProperty(rt, "FORBID_TAGS") ? addToSet({}, rt.FORBID_TAGS, ar) : clone({}), Xe = objectHasOwnProperty(rt, "FORBID_ATTR") ? addToSet({}, rt.FORBID_ATTR, ar) : clone({}), ft = objectHasOwnProperty(rt, "USE_PROFILES") ? rt.USE_PROFILES : !1, at = rt.ALLOW_ARIA_ATTR !== !1, et = rt.ALLOW_DATA_ATTR !== !1, ot = rt.ALLOW_UNKNOWN_PROTOCOLS || !1, it = rt.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = rt.SAFE_FOR_TEMPLATES || !1, Ct = rt.SAFE_FOR_XML !== !1, Je = rt.WHOLE_DOCUMENT || !1, Vt = rt.RETURN_DOM || !1, Ut = rt.RETURN_DOM_FRAGMENT || !1, Ft = rt.RETURN_TRUSTED_TYPE || !1, Mt = rt.FORCE_BODY || !1, Ke = rt.SANITIZE_DOM !== !1, nt = rt.SANITIZE_NAMED_PROPS || !1, ct = rt.KEEP_CONTENT !== !1, dt = rt.IN_PLACE || !1, qe = rt.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, vr = rt.NAMESPACE || dr, Qt = rt.MATHML_TEXT_INTEGRATION_POINTS || Qt, Zt = rt.HTML_INTEGRATION_POINTS || Zt, Ze = rt.CUSTOM_ELEMENT_HANDLING || {}, rt.CUSTOM_ELEMENT_HANDLING && Mr(rt.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Ze.tagNameCheck = rt.CUSTOM_ELEMENT_HANDLING.tagNameCheck), rt.CUSTOM_ELEMENT_HANDLING && Mr(rt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Ze.attributeNameCheck = rt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), rt.CUSTOM_ELEMENT_HANDLING && typeof rt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Ze.allowCustomizedBuiltInElements = rt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && (et = !1), Ut && (Vt = !0), ft && (Ge = addToSet({}, text$1), Ye = [], ft.html === !0 && (addToSet(Ge, html$1), addToSet(Ye, html)), ft.svg === !0 && (addToSet(Ge, svg$1), addToSet(Ye, svg), addToSet(Ye, xml)), ft.svgFilters === !0 && (addToSet(Ge, svgFilters), addToSet(Ye, svg), addToSet(Ye, xml)), ft.mathMl === !0 && (addToSet(Ge, mathMl$1), addToSet(Ye, mathMl), addToSet(Ye, xml))), rt.ADD_TAGS && (Ge === ze && (Ge = clone(Ge)), addToSet(Ge, rt.ADD_TAGS, ar)), rt.ADD_ATTR && (Ye === Qe && (Ye = clone(Ye)), addToSet(Ye, rt.ADD_ATTR, ar)), rt.ADD_URI_SAFE_ATTR && addToSet(ur, rt.ADD_URI_SAFE_ATTR, ar), rt.FORBID_CONTENTS && (mt === zt && (mt = clone(mt)), addToSet(mt, rt.FORBID_CONTENTS, ar)), ct && (Ge["#text"] = !0), Je && addToSet(Ge, ["html", "head", "body"]), Ge.table && (addToSet(Ge, ["tbody"]), delete tt.tbody), rt.TRUSTED_TYPES_POLICY) {
|
|
60035
60035
|
if (typeof rt.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
60036
60036
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
60037
60037
|
if (typeof rt.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -60048,7 +60048,7 @@ function createDOMPurify() {
|
|
|
60048
60048
|
tagName: "template"
|
|
60049
60049
|
});
|
|
60050
60050
|
const Ht = stringToLowerCase(rt.tagName), cr = stringToLowerCase(Rt.tagName);
|
|
60051
|
-
return Nr[rt.namespaceURI] ? rt.namespaceURI === gr ? Rt.namespaceURI ===
|
|
60051
|
+
return Nr[rt.namespaceURI] ? rt.namespaceURI === gr ? Rt.namespaceURI === dr ? Ht === "svg" : Rt.namespaceURI === Pr ? Ht === "svg" && (cr === "annotation-xml" || Qt[cr]) : !!jr[Ht] : rt.namespaceURI === Pr ? Rt.namespaceURI === dr ? Ht === "math" : Rt.namespaceURI === gr ? Ht === "math" && Zt[cr] : !!Br[Ht] : rt.namespaceURI === dr ? Rt.namespaceURI === gr && !Zt[cr] || Rt.namespaceURI === Pr && !Qt[cr] ? !1 : !Br[Ht] && (tr[Ht] || !jr[Ht]) : !!(Wt === "application/xhtml+xml" && Nr[rt.namespaceURI]) : !1;
|
|
60052
60052
|
}, wr = function(rt) {
|
|
60053
60053
|
arrayPush(e.removed, {
|
|
60054
60054
|
element: rt
|
|
@@ -60086,14 +60086,14 @@ function createDOMPurify() {
|
|
|
60086
60086
|
if (Mt)
|
|
60087
60087
|
rt = "<remove></remove>" + rt;
|
|
60088
60088
|
else {
|
|
60089
|
-
const
|
|
60090
|
-
Ht =
|
|
60089
|
+
const pr = stringMatch(rt, /^[\r\n\t ]+/);
|
|
60090
|
+
Ht = pr && pr[0];
|
|
60091
60091
|
}
|
|
60092
|
-
|
|
60092
|
+
Wt === "application/xhtml+xml" && vr === dr && (rt = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + rt + "</body></html>");
|
|
60093
60093
|
const cr = Q ? Q.createHTML(rt) : rt;
|
|
60094
|
-
if (vr ===
|
|
60094
|
+
if (vr === dr)
|
|
60095
60095
|
try {
|
|
60096
|
-
Rt = new E().parseFromString(cr,
|
|
60096
|
+
Rt = new E().parseFromString(cr, Wt);
|
|
60097
60097
|
} catch {
|
|
60098
60098
|
}
|
|
60099
60099
|
if (!Rt || !Rt.documentElement) {
|
|
@@ -60104,7 +60104,7 @@ function createDOMPurify() {
|
|
|
60104
60104
|
}
|
|
60105
60105
|
}
|
|
60106
60106
|
const xr = Rt.body || Rt.documentElement;
|
|
60107
|
-
return rt && Ht && xr.insertBefore(n.createTextNode(Ht), xr.childNodes[0] || null), vr ===
|
|
60107
|
+
return rt && Ht && xr.insertBefore(n.createTextNode(Ht), xr.childNodes[0] || null), vr === dr ? oe.call(Rt, Je ? "html" : "body")[0] : Je ? Rt.documentElement : xr;
|
|
60108
60108
|
}, Xr = function(rt) {
|
|
60109
60109
|
return te.call(
|
|
60110
60110
|
rt.ownerDocument || rt,
|
|
@@ -60127,7 +60127,7 @@ function createDOMPurify() {
|
|
|
60127
60127
|
let Rt = null;
|
|
60128
60128
|
if ($r(se.beforeSanitizeElements, rt, null), zr(rt))
|
|
60129
60129
|
return wr(rt), !0;
|
|
60130
|
-
const Ht =
|
|
60130
|
+
const Ht = ar(rt.nodeName);
|
|
60131
60131
|
if ($r(se.uponSanitizeElement, rt, {
|
|
60132
60132
|
tagName: Ht,
|
|
60133
60133
|
allowedTags: Ge
|
|
@@ -60139,8 +60139,8 @@ function createDOMPurify() {
|
|
|
60139
60139
|
if (ct && !mt[Ht]) {
|
|
60140
60140
|
const cr = z(rt) || rt.parentNode, xr = q(rt) || rt.childNodes;
|
|
60141
60141
|
if (xr && cr) {
|
|
60142
|
-
const
|
|
60143
|
-
for (let Sr =
|
|
60142
|
+
const pr = xr.length;
|
|
60143
|
+
for (let Sr = pr - 1; Sr >= 0; --Sr) {
|
|
60144
60144
|
const Er = M(xr[Sr], !0);
|
|
60145
60145
|
Er.__removalCount = (rt.__removalCount || 0) + 1, cr.insertBefore(Er, O(rt));
|
|
60146
60146
|
}
|
|
@@ -60167,7 +60167,7 @@ function createDOMPurify() {
|
|
|
60167
60167
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
60168
60168
|
Rt === "is" && Ze.allowCustomizedBuiltInElements && (Ze.tagNameCheck instanceof RegExp && regExpTest(Ze.tagNameCheck, Ht) || Ze.tagNameCheck instanceof Function && Ze.tagNameCheck(Ht)))
|
|
60169
60169
|
) return !1;
|
|
60170
|
-
} else if (!
|
|
60170
|
+
} else if (!ur[Rt]) {
|
|
60171
60171
|
if (!regExpTest(qe, stringReplace(Ht, Oe, ""))) {
|
|
60172
60172
|
if (!((Rt === "src" || Rt === "xlink:href" || Rt === "href") && rt !== "script" && stringIndexOf(Ht, "data:") === 0 && Yt[rt])) {
|
|
60173
60173
|
if (!(ot && !regExpTest(Ue, stringReplace(Ht, Oe, "")))) {
|
|
@@ -60199,31 +60199,31 @@ function createDOMPurify() {
|
|
|
60199
60199
|
let cr = Rt.length;
|
|
60200
60200
|
for (; cr--; ) {
|
|
60201
60201
|
const xr = Rt[cr], {
|
|
60202
|
-
name:
|
|
60202
|
+
name: pr,
|
|
60203
60203
|
namespaceURI: Sr,
|
|
60204
60204
|
value: Er
|
|
60205
|
-
} = xr, Lr =
|
|
60206
|
-
let $t =
|
|
60207
|
-
if (Ht.attrName = Lr, Ht.attrValue = $t, Ht.keepAttr = !0, Ht.forceKeepAttr = void 0, $r(se.uponSanitizeAttribute, rt, Ht), $t = Ht.attrValue, nt && (Lr === "id" || Lr === "name") && (Vr(
|
|
60208
|
-
Vr(
|
|
60205
|
+
} = xr, Lr = ar(pr), en = Er;
|
|
60206
|
+
let $t = pr === "value" ? en : stringTrim(en);
|
|
60207
|
+
if (Ht.attrName = Lr, Ht.attrValue = $t, Ht.keepAttr = !0, Ht.forceKeepAttr = void 0, $r(se.uponSanitizeAttribute, rt, Ht), $t = Ht.attrValue, nt && (Lr === "id" || Lr === "name") && (Vr(pr, rt), $t = st + $t), Ct && regExpTest(/((--!?|])>)|<\/(style|title)/i, $t)) {
|
|
60208
|
+
Vr(pr, rt);
|
|
60209
60209
|
continue;
|
|
60210
60210
|
}
|
|
60211
60211
|
if (Ht.forceKeepAttr)
|
|
60212
60212
|
continue;
|
|
60213
60213
|
if (!Ht.keepAttr) {
|
|
60214
|
-
Vr(
|
|
60214
|
+
Vr(pr, rt);
|
|
60215
60215
|
continue;
|
|
60216
60216
|
}
|
|
60217
60217
|
if (!it && regExpTest(/\/>/i, $t)) {
|
|
60218
|
-
Vr(
|
|
60218
|
+
Vr(pr, rt);
|
|
60219
60219
|
continue;
|
|
60220
60220
|
}
|
|
60221
60221
|
He && arrayForEach([Ne, $e, Ae], (Rr) => {
|
|
60222
60222
|
$t = stringReplace($t, Rr, " ");
|
|
60223
60223
|
});
|
|
60224
|
-
const qr =
|
|
60224
|
+
const qr = ar(rt.nodeName);
|
|
60225
60225
|
if (!an(qr, Lr, $t)) {
|
|
60226
|
-
Vr(
|
|
60226
|
+
Vr(pr, rt);
|
|
60227
60227
|
continue;
|
|
60228
60228
|
}
|
|
60229
60229
|
if (Q && typeof R == "object" && typeof R.getAttributeType == "function" && !Sr)
|
|
@@ -60239,9 +60239,9 @@ function createDOMPurify() {
|
|
|
60239
60239
|
}
|
|
60240
60240
|
if ($t !== en)
|
|
60241
60241
|
try {
|
|
60242
|
-
Sr ? rt.setAttributeNS(Sr,
|
|
60242
|
+
Sr ? rt.setAttributeNS(Sr, pr, $t) : rt.setAttribute(pr, $t), zr(rt) ? wr(rt) : arrayPop(e.removed);
|
|
60243
60243
|
} catch {
|
|
60244
|
-
Vr(
|
|
60244
|
+
Vr(pr, rt);
|
|
60245
60245
|
}
|
|
60246
60246
|
}
|
|
60247
60247
|
$r(se.afterSanitizeAttributes, rt, null);
|
|
@@ -60264,7 +60264,7 @@ function createDOMPurify() {
|
|
|
60264
60264
|
return Kt;
|
|
60265
60265
|
if (pt || Tr(rt), e.removed = [], typeof Kt == "string" && (dt = !1), dt) {
|
|
60266
60266
|
if (Kt.nodeName) {
|
|
60267
|
-
const Er =
|
|
60267
|
+
const Er = ar(Kt.nodeName);
|
|
60268
60268
|
if (!Ge[Er] || tt[Er])
|
|
60269
60269
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
60270
60270
|
}
|
|
@@ -60278,8 +60278,8 @@ function createDOMPurify() {
|
|
|
60278
60278
|
return Vt ? null : Ft ? j : "";
|
|
60279
60279
|
}
|
|
60280
60280
|
Rt && Mt && wr(Rt.firstChild);
|
|
60281
|
-
const
|
|
60282
|
-
for (; cr =
|
|
60281
|
+
const pr = Xr(dt ? Kt : Rt);
|
|
60282
|
+
for (; cr = pr.nextNode(); )
|
|
60283
60283
|
nn(cr), Qr(cr), cr.content instanceof d && sn(cr.content);
|
|
60284
60284
|
if (dt)
|
|
60285
60285
|
return Kt;
|
|
@@ -60303,7 +60303,7 @@ function createDOMPurify() {
|
|
|
60303
60303
|
Cr = null, pt = !1;
|
|
60304
60304
|
}, e.isValidAttribute = function(Kt, rt, Rt) {
|
|
60305
60305
|
Cr || Tr({});
|
|
60306
|
-
const Ht =
|
|
60306
|
+
const Ht = ar(Kt), cr = ar(rt);
|
|
60307
60307
|
return an(Ht, cr, Rt);
|
|
60308
60308
|
}, e.addHook = function(Kt, rt) {
|
|
60309
60309
|
typeof rt == "function" && arrayPush(se[Kt], rt);
|
|
@@ -60706,32 +60706,32 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60706
60706
|
}
|
|
60707
60707
|
if (!b) return;
|
|
60708
60708
|
(async () => {
|
|
60709
|
-
const
|
|
60710
|
-
var Xt,
|
|
60711
|
-
const
|
|
60709
|
+
const Zt = b.map(async (Wt) => {
|
|
60710
|
+
var Xt, ar, Cr;
|
|
60711
|
+
const mr = await te({
|
|
60712
60712
|
routeApplicationId: t,
|
|
60713
|
-
conversationId:
|
|
60713
|
+
conversationId: Wt.ConversationId
|
|
60714
60714
|
});
|
|
60715
60715
|
return {
|
|
60716
|
-
partner1:
|
|
60717
|
-
partner2:
|
|
60718
|
-
name: ((Xt =
|
|
60719
|
-
unread: ((
|
|
60720
|
-
pending:
|
|
60721
|
-
messages: ((Cr =
|
|
60716
|
+
partner1: Wt.Participant1,
|
|
60717
|
+
partner2: Wt.Participant2,
|
|
60718
|
+
name: ((Xt = Wt.Participant) == null ? void 0 : Xt.PublicName) ?? "missing public name",
|
|
60719
|
+
unread: ((ar = mr.data) == null ? void 0 : ar.filter((_r) => !_r.Read && _r.SenderId != t).length) ?? 0,
|
|
60720
|
+
pending: Wt.Status !== "Approved",
|
|
60721
|
+
messages: ((Cr = mr.data) == null ? void 0 : Cr.map((_r) => ({
|
|
60722
60722
|
id: "history" + _r.MessageId,
|
|
60723
60723
|
fromPartnerID: _r.SenderId,
|
|
60724
|
-
toPartnerID: _r.SenderId ==
|
|
60724
|
+
toPartnerID: _r.SenderId == Wt.Participant1 ? Wt.Participant2 : Wt.Participant1,
|
|
60725
60725
|
senderName: _r.SenderName ?? "missing name",
|
|
60726
60726
|
timestamp: (/* @__PURE__ */ new Date(_r.SentDate + "Z")).getTime(),
|
|
60727
60727
|
content: _r.Content ?? "no content"
|
|
60728
60728
|
}))) ?? [],
|
|
60729
|
-
conversationID:
|
|
60729
|
+
conversationID: Wt.ConversationId
|
|
60730
60730
|
};
|
|
60731
|
-
}),
|
|
60732
|
-
|
|
60733
|
-
var
|
|
60734
|
-
return (
|
|
60731
|
+
}), tr = await Promise.all(Zt);
|
|
60732
|
+
tr.sort(sortChats), Qe([yt, ...tr]), setTimeout(() => {
|
|
60733
|
+
var Wt;
|
|
60734
|
+
return (Wt = Vt.current) == null ? void 0 : Wt.focus();
|
|
60735
60735
|
}, 50);
|
|
60736
60736
|
})();
|
|
60737
60737
|
}, [b, o, t]);
|
|
@@ -60745,8 +60745,8 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60745
60745
|
}, [d, se, Ue, I]);
|
|
60746
60746
|
const ct = useMemo(() => Ye.filter((yt) => {
|
|
60747
60747
|
if (yt.partner1 === ASSISTANT_ID || yt.partner2 === ASSISTANT_ID) return !0;
|
|
60748
|
-
const
|
|
60749
|
-
return Ve === "approved" ?
|
|
60748
|
+
const Zt = yt.name.toLowerCase().includes(Ze.toLowerCase());
|
|
60749
|
+
return Ve === "approved" ? Zt && !yt.pending : Ve === "pending" ? Zt && yt.pending : Zt;
|
|
60750
60750
|
}), [Ye, Ze, Ve]);
|
|
60751
60751
|
useEffect(() => {
|
|
60752
60752
|
var yt;
|
|
@@ -60755,7 +60755,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60755
60755
|
oe.length !== 0 && (oe.forEach((yt) => {
|
|
60756
60756
|
if (!yt || yt.isComponent)
|
|
60757
60757
|
return;
|
|
60758
|
-
const
|
|
60758
|
+
const Qt = {
|
|
60759
60759
|
id: yt.timestamp.toString(),
|
|
60760
60760
|
fromPartnerID: ASSISTANT_ID,
|
|
60761
60761
|
toPartnerID: t,
|
|
@@ -60763,60 +60763,69 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60763
60763
|
timestamp: yt.timestamp.getTime(),
|
|
60764
60764
|
content: yt.content
|
|
60765
60765
|
};
|
|
60766
|
-
dt(
|
|
60766
|
+
dt(Qt);
|
|
60767
60767
|
}), ge());
|
|
60768
60768
|
}, [oe]);
|
|
60769
|
-
const dt = (yt) => Mt((
|
|
60769
|
+
const dt = (yt) => Mt((Qt) => [...Qt, yt]);
|
|
60770
60770
|
useEffect(() => {
|
|
60771
|
-
pt.length
|
|
60772
|
-
|
|
60773
|
-
|
|
60774
|
-
|
|
60775
|
-
|
|
60776
|
-
|
|
60777
|
-
|
|
60778
|
-
|
|
60779
|
-
|
|
60780
|
-
|
|
60771
|
+
if (pt.length == 0) return;
|
|
60772
|
+
console.log(pt.length, "unprocessedMessages detected");
|
|
60773
|
+
const yt = (Zt, tr) => tr.partner1 === Zt.toPartnerID && tr.partner2 === Zt.fromPartnerID || tr.partner2 === Zt.toPartnerID && tr.partner1 === Zt.fromPartnerID;
|
|
60774
|
+
let Qt = !1;
|
|
60775
|
+
pt.forEach((Zt) => {
|
|
60776
|
+
if (!Ye.some((tr) => yt(Zt, tr))) {
|
|
60777
|
+
console.log("message received for unknown convo ID - need to refetch!"), Qt = !0;
|
|
60778
|
+
return;
|
|
60779
|
+
}
|
|
60780
|
+
Qe((tr) => tr.map((Wt) => {
|
|
60781
|
+
if (!yt(Zt, Wt) || Wt.messages.some((ar) => ar.id === Zt.id)) return Wt;
|
|
60782
|
+
let mr = 1;
|
|
60783
|
+
const Xt = document.activeElement && document.activeElement === Vt.current;
|
|
60784
|
+
return (Ue == null ? void 0 : Ue[0]) == Wt.partner1 && Ue[1] == Wt.partner2 && Xt && (mr = 0, st(), setTimeout(() => {
|
|
60785
|
+
var ar;
|
|
60786
|
+
return (ar = et.current) == null ? void 0 : ar.scrollIntoView({ behavior: "smooth" });
|
|
60787
|
+
}, 50), Wt.pending && Fe("approved")), { ...Wt, pending: !1, unread: Wt.unread + mr, messages: [...Wt.messages, Zt] };
|
|
60781
60788
|
}).sort(sortChats));
|
|
60782
|
-
}), Mt([])
|
|
60789
|
+
}), console.log("need refetch:", Qt), Qt && S(), Mt([]);
|
|
60783
60790
|
}, [pt, Mt, Qe, Oe, Ue]), useEffect(() => {
|
|
60784
60791
|
if (o === !0) return;
|
|
60785
60792
|
const yt = new HubConnectionBuilder().withUrl("https://api.randmar.io/hub", {
|
|
60786
60793
|
accessTokenFactory: () => localStorage.getItem("access_token"),
|
|
60787
60794
|
headers: { "X-Impersonated-Id": t }
|
|
60788
60795
|
}).configureLogging(LogLevel.Information).withAutomaticReconnect().withHubProtocol(new JsonHubProtocol()).build();
|
|
60789
|
-
return yt.on("ReceiveMessage", dt), yt.start().catch((
|
|
60796
|
+
return yt.on("ReceiveMessage", dt), yt.start().catch((Qt) => console.error("Error connecting to SignalR hub:", Qt)), at(yt), () => {
|
|
60790
60797
|
yt && yt.stop();
|
|
60791
60798
|
};
|
|
60792
60799
|
}, [t, o]), useEffect(() => {
|
|
60793
|
-
var
|
|
60800
|
+
var Qt;
|
|
60801
|
+
!Ue || !Ke() || (Qt = Vt.current) == null || Qt.focus();
|
|
60802
|
+
}, [Ue]), useEffect(() => {
|
|
60794
60803
|
if (!Ue) return;
|
|
60795
60804
|
const yt = Ke();
|
|
60796
|
-
|
|
60797
|
-
|
|
60798
|
-
|
|
60799
|
-
|
|
60800
|
-
}, [Ye, Ue]), useEffect(() => {
|
|
60805
|
+
if (!yt) return;
|
|
60806
|
+
const Qt = document.activeElement && document.activeElement === Vt.current;
|
|
60807
|
+
yt.unread > 0 && Qt && (st(), Qe((Zt) => Zt.map((tr) => tr.partner1 === Ue[0] && tr.partner2 === Ue[1] ? { ...tr, unread: 0 } : tr)));
|
|
60808
|
+
}, [Ue, Ye]), useEffect(() => {
|
|
60801
60809
|
g(Ye.some((yt) => yt.unread > 0));
|
|
60802
60810
|
}, [Ye, g]);
|
|
60803
|
-
const ft = (yt,
|
|
60804
|
-
|
|
60811
|
+
const ft = (yt, Qt) => {
|
|
60812
|
+
console.log("doSend", Qt), console.log("target", yt);
|
|
60813
|
+
const Zt = {
|
|
60805
60814
|
id: crypto.randomUUID(),
|
|
60806
60815
|
senderName: e,
|
|
60807
60816
|
fromPartnerID: t,
|
|
60808
60817
|
toPartnerID: yt.partner1 === t ? yt.partner2 : yt.partner1,
|
|
60809
|
-
content:
|
|
60818
|
+
content: Qt + (it ? ` (${it == null ? void 0 : it.name} attached)` : ""),
|
|
60810
60819
|
timestamp: Date.now()
|
|
60811
60820
|
};
|
|
60812
|
-
dt(
|
|
60813
|
-
}, mt = (yt,
|
|
60821
|
+
dt(Zt), Zt.toPartnerID == ASSISTANT_ID ? (ne(Zt.content, it ?? void 0), it && Je((tr) => [...tr, it.name])) : (console.log("signal R send!"), Xe.invoke("NewMessage", Zt).catch((tr) => console.error("Error sending message:", tr))), qe(""), He(null), Ut.current && (Ut.current.value = "");
|
|
60822
|
+
}, mt = (yt, Qt) => ze([yt, Qt]);
|
|
60814
60823
|
if (useEffect(() => {
|
|
60815
60824
|
if (Ge === null) return;
|
|
60816
|
-
const yt = Ye.find((
|
|
60825
|
+
const yt = Ye.find((Zt) => Zt.conversationID === Ge[0]);
|
|
60817
60826
|
if (!yt || (yt.pending && Fe("pending"), Oe([yt.partner1, yt.partner2]), Ge[0] === -1 && !se) || Ge[0] !== -1 && !Xe) return;
|
|
60818
|
-
const
|
|
60819
|
-
ze(null),
|
|
60827
|
+
const Qt = Ge[1];
|
|
60828
|
+
ze(null), Qt && ft(yt, Qt);
|
|
60820
60829
|
}, [Ge, Ye, Fe, Oe, se, Xe]), useImperativeHandle(f, () => ({
|
|
60821
60830
|
setActiveChatAndSendMessage: mt
|
|
60822
60831
|
})), !se)
|
|
@@ -60824,50 +60833,50 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60824
60833
|
/* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4" }),
|
|
60825
60834
|
/* @__PURE__ */ jsx("p", { children: "Loading API functions..." })
|
|
60826
60835
|
] }) }) });
|
|
60827
|
-
const
|
|
60828
|
-
var
|
|
60836
|
+
const zt = (yt) => {
|
|
60837
|
+
var Zt;
|
|
60829
60838
|
if (!nt()) return;
|
|
60830
|
-
const
|
|
60831
|
-
if (
|
|
60832
|
-
for (let
|
|
60833
|
-
if (
|
|
60834
|
-
const
|
|
60835
|
-
if (
|
|
60836
|
-
He(
|
|
60839
|
+
const Qt = (Zt = yt.clipboardData) == null ? void 0 : Zt.items;
|
|
60840
|
+
if (Qt) {
|
|
60841
|
+
for (let tr = 0; tr < Qt.length; tr++)
|
|
60842
|
+
if (Qt[tr].type.indexOf("image") !== -1) {
|
|
60843
|
+
const Wt = Qt[tr].getAsFile();
|
|
60844
|
+
if (Wt) {
|
|
60845
|
+
He(Wt);
|
|
60837
60846
|
return;
|
|
60838
60847
|
}
|
|
60839
60848
|
}
|
|
60840
60849
|
}
|
|
60841
60850
|
}, Yt = () => {
|
|
60842
|
-
!Jt || !Le.trim() || !Ue || o !== !0 && !Xe || ft(Jt, Le);
|
|
60851
|
+
!Jt || !Le.trim() || !Ue || o !== !0 && !Xe || (Jt.unread > 0 && (st(), Qe((yt) => yt.map((Qt) => Qt.partner1 === Ue[0] && Qt.partner2 === Ue[1] ? { ...Qt, unread: 0 } : Qt))), ft(Jt, Le));
|
|
60843
60852
|
}, sr = (yt) => {
|
|
60844
60853
|
yt.target.files && yt.target.files[0] ? He(yt.target.files[0]) : He(null);
|
|
60845
|
-
},
|
|
60854
|
+
}, ur = () => {
|
|
60846
60855
|
var yt;
|
|
60847
60856
|
(yt = Ut.current) == null || yt.click();
|
|
60848
60857
|
}, qt = () => {
|
|
60849
60858
|
var yt;
|
|
60850
60859
|
He(null), Ft({ title: "File removed", description: "No file will be sent to the assistant.", variant: "secondary" }), (yt = Vt.current) == null || yt.focus();
|
|
60851
60860
|
}, Pr = () => {
|
|
60852
|
-
const
|
|
60853
|
-
messages: Ye.find((
|
|
60861
|
+
const Qt = {
|
|
60862
|
+
messages: Ye.find((Zt) => Zt.partner1 === ASSISTANT_ID || Zt.partner2 === ASSISTANT_ID),
|
|
60854
60863
|
debug: Ne
|
|
60855
60864
|
};
|
|
60856
60865
|
_({
|
|
60857
60866
|
applicationId: t,
|
|
60858
60867
|
emailAddress: e,
|
|
60859
|
-
body:
|
|
60868
|
+
body: Qt
|
|
60860
60869
|
});
|
|
60861
60870
|
}, gr = async () => {
|
|
60862
|
-
var yt,
|
|
60871
|
+
var yt, Qt, Zt, tr, Wt;
|
|
60863
60872
|
M.current && (M.current.disabled = !0), Q(!0);
|
|
60864
60873
|
try {
|
|
60865
|
-
const
|
|
60866
|
-
(
|
|
60874
|
+
const mr = await O({ applicationId: t }), Xt = ((yt = mr.data) == null ? void 0 : yt.About) ?? "a new business venture", ar = [];
|
|
60875
|
+
(Qt = mr.data) != null && Qt.IsManufacturer && ar.push("Manufacturer"), (Zt = mr.data) != null && Zt.IsReseller && ar.push("Reseller"), (tr = mr.data) != null && tr.IsSalesAgency && ar.push("Sales Agency");
|
|
60867
60876
|
const _r = `
|
|
60868
60877
|
Your task is to draft a ready-to-send opening message from a user to the Randmar team.
|
|
60869
60878
|
|
|
60870
|
-
**Your Persona:** You are an entrepreneur and a ${
|
|
60879
|
+
**Your Persona:** You are an entrepreneur and a ${ar.length > 0 ? ar.join("/") : "Entrepreneur"}.
|
|
60871
60880
|
**Your Company's Description:**
|
|
60872
60881
|
\`\`\`html
|
|
60873
60882
|
${Xt}
|
|
@@ -60882,14 +60891,14 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60882
60891
|
- Output only the plain text of the message itself.
|
|
60883
60892
|
`, Mr = await q(_r);
|
|
60884
60893
|
if (Mr) {
|
|
60885
|
-
const jr = (
|
|
60894
|
+
const jr = (Wt = (await j({ routeApplicationId: t, partnerId: "2" })).data) == null ? void 0 : Wt.ConversationId;
|
|
60886
60895
|
if (jr)
|
|
60887
60896
|
await S(), mt(jr, Mr);
|
|
60888
60897
|
else
|
|
60889
60898
|
throw new Error("Failed to retrieve conversation ID after creation.");
|
|
60890
60899
|
}
|
|
60891
|
-
} catch (
|
|
60892
|
-
console.error("Error during 'Chat with Randmar' initiation:",
|
|
60900
|
+
} catch (mr) {
|
|
60901
|
+
console.error("Error during 'Chat with Randmar' initiation:", mr), Ft({
|
|
60893
60902
|
title: "Error",
|
|
60894
60903
|
description: "Could not initiate chat. Please try again later.",
|
|
60895
60904
|
variant: "destructive"
|
|
@@ -60897,8 +60906,8 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60897
60906
|
} finally {
|
|
60898
60907
|
M.current && (M.current.disabled = !1), Q(!1);
|
|
60899
60908
|
}
|
|
60900
|
-
},
|
|
60901
|
-
Qe((yt) => yt.map((
|
|
60909
|
+
}, dr = () => {
|
|
60910
|
+
Qe((yt) => yt.map((Zt) => Zt.partner1 !== ASSISTANT_ID && Zt.partner2 !== ASSISTANT_ID ? Zt : { ...Zt, messages: [] })), Je([]), Ae();
|
|
60902
60911
|
}, vr = () => {
|
|
60903
60912
|
Ue && C({ routeApplicationId: t, partnerId: Ue[0] == t ? Ue[1] : Ue[0] }).then(() => {
|
|
60904
60913
|
Fe("approved");
|
|
@@ -60959,11 +60968,11 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
60959
60968
|
/* @__PURE__ */ jsx("div", { className: "ml-3 font-medium", children: "Randmar Assistant" }),
|
|
60960
60969
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 ml-auto", children: [
|
|
60961
60970
|
/* @__PURE__ */ jsx(Switch, { id: "smartSwitch", disabled: !!$e, checked: R, onCheckedChange: (yt) => {
|
|
60962
|
-
|
|
60971
|
+
dr(), setTimeout(() => A(yt), 20);
|
|
60963
60972
|
} }),
|
|
60964
60973
|
/* @__PURE__ */ jsx(Label$2, { htmlFor: "smartSwitch", children: "Think harder" })
|
|
60965
60974
|
] }),
|
|
60966
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "ml-1", onClick: () =>
|
|
60975
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "ml-1", onClick: () => dr(), children: /* @__PURE__ */ jsx(MessageCircleX, { className: "h-5 w-5" }) }),
|
|
60967
60976
|
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "ml-1", confirmationDialog: { title: "Report Issue", content: "This action will send a copy of your chat to Randmar. Send it?", onConfirm: () => Pr() }, children: /* @__PURE__ */ jsx(MessageSquareShare, { className: "h-5 w-5" }) })
|
|
60968
60977
|
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60969
60978
|
/* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8 flex-shrink-0 rounded-none", children: /* @__PURE__ */ jsx(PartnerLogo, { id: Ue[0] === t ? Ue[1] : Ue[0], width: 72, height: 72 }) }),
|
|
@@ -61007,7 +61016,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
61007
61016
|
ref: Vt,
|
|
61008
61017
|
placeholder: "Type a message...",
|
|
61009
61018
|
value: Le,
|
|
61010
|
-
onPaste:
|
|
61019
|
+
onPaste: zt,
|
|
61011
61020
|
onChange: (yt) => qe(yt.target.value),
|
|
61012
61021
|
onKeyDown: (yt) => {
|
|
61013
61022
|
yt.key !== "Enter" || yt.shiftKey || (yt.preventDefault(), Yt());
|
|
@@ -61042,7 +61051,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
|
|
|
61042
61051
|
{
|
|
61043
61052
|
size: "icon",
|
|
61044
61053
|
variant: "default",
|
|
61045
|
-
onClick:
|
|
61054
|
+
onClick: ur,
|
|
61046
61055
|
className: Jt != null && Jt.pending ? "collapse" : "ml-2 h-8 w-8",
|
|
61047
61056
|
disabled: $e !== "" || (Jt == null ? void 0 : Jt.pending) || !!it,
|
|
61048
61057
|
children: /* @__PURE__ */ jsx(Paperclip, { className: "h-5 w-5" })
|
|
@@ -61620,22 +61629,22 @@ function createFormControl(t = {}) {
|
|
|
61620
61629
|
}
|
|
61621
61630
|
}, j = (Ke, nt, st, ct, dt) => {
|
|
61622
61631
|
let ft = !1, mt = !1;
|
|
61623
|
-
const
|
|
61632
|
+
const zt = {
|
|
61624
61633
|
name: Ke
|
|
61625
61634
|
};
|
|
61626
61635
|
if (!e.disabled) {
|
|
61627
61636
|
if (!st || ct) {
|
|
61628
|
-
(_.isDirty || C.isDirty) && (mt = n.isDirty, n.isDirty =
|
|
61637
|
+
(_.isDirty || C.isDirty) && (mt = n.isDirty, n.isDirty = zt.isDirty = se(), ft = mt !== zt.isDirty);
|
|
61629
61638
|
const Yt = deepEqual$1(get(l, Ke), nt);
|
|
61630
|
-
mt = !!get(n.dirtyFields, Ke), Yt ? unset(n.dirtyFields, Ke) : set(n.dirtyFields, Ke, !0),
|
|
61639
|
+
mt = !!get(n.dirtyFields, Ke), Yt ? unset(n.dirtyFields, Ke) : set(n.dirtyFields, Ke, !0), zt.dirtyFields = n.dirtyFields, ft = ft || (_.dirtyFields || C.dirtyFields) && mt !== !Yt;
|
|
61631
61640
|
}
|
|
61632
61641
|
if (st) {
|
|
61633
61642
|
const Yt = get(n.touchedFields, Ke);
|
|
61634
|
-
Yt || (set(n.touchedFields, Ke, st),
|
|
61643
|
+
Yt || (set(n.touchedFields, Ke, st), zt.touchedFields = n.touchedFields, ft = ft || (_.touchedFields || C.touchedFields) && Yt !== st);
|
|
61635
61644
|
}
|
|
61636
|
-
ft && dt && E.state.next(
|
|
61645
|
+
ft && dt && E.state.next(zt);
|
|
61637
61646
|
}
|
|
61638
|
-
return ft ?
|
|
61647
|
+
return ft ? zt : {};
|
|
61639
61648
|
}, F = (Ke, nt, st, ct) => {
|
|
61640
61649
|
const dt = get(n.errors, Ke), ft = (_.isValid || C.isValid) && isBoolean(nt) && n.isValid !== nt;
|
|
61641
61650
|
if (e.delayError && st ? (b = A(() => q(Ke, st)), b(e.delayError)) : (clearTimeout(S), b = null, st ? set(n.errors, Ke, st) : unset(n.errors, Ke)), (st ? !deepEqual$1(dt, st) : dt) || !isEmptyObject$1(ct) || ft) {
|
|
@@ -61672,12 +61681,12 @@ function createFormControl(t = {}) {
|
|
|
61672
61681
|
if (dt) {
|
|
61673
61682
|
const { _f: ft, ...mt } = dt;
|
|
61674
61683
|
if (ft) {
|
|
61675
|
-
const
|
|
61684
|
+
const zt = g.array.has(ft.name), Yt = dt._f && hasPromiseValidation(dt._f);
|
|
61676
61685
|
Yt && _.validatingFields && I([ct], !0);
|
|
61677
|
-
const sr = await validateField(dt, g.disabled, d, R, e.shouldUseNativeValidation && !nt,
|
|
61686
|
+
const sr = await validateField(dt, g.disabled, d, R, e.shouldUseNativeValidation && !nt, zt);
|
|
61678
61687
|
if (Yt && _.validatingFields && I([ct]), sr[ft.name] && (st.valid = !1, nt))
|
|
61679
61688
|
break;
|
|
61680
|
-
!nt && (get(sr, ft.name) ?
|
|
61689
|
+
!nt && (get(sr, ft.name) ? zt ? updateFieldArrayRootError(n.errors, sr, ft.name) : set(n.errors, ft.name, sr[ft.name]) : unset(n.errors, ft.name));
|
|
61681
61690
|
}
|
|
61682
61691
|
!isEmptyObject$1(mt) && await oe(mt, nt, st);
|
|
61683
61692
|
}
|
|
@@ -61697,7 +61706,7 @@ function createFormControl(t = {}) {
|
|
|
61697
61706
|
if (ct) {
|
|
61698
61707
|
const ft = ct._f;
|
|
61699
61708
|
ft && (!ft.disabled && set(d, Ke, getFieldValueAs(nt, ft)), dt = isHTMLElement(ft.ref) && isNullOrUndefined(nt) ? "" : nt, isMultipleSelect(ft.ref) ? [...ft.ref.options].forEach((mt) => mt.selected = dt.includes(mt.value)) : ft.refs ? isCheckBoxInput(ft.ref) ? ft.refs.forEach((mt) => {
|
|
61700
|
-
(!mt.defaultChecked || !mt.disabled) && (Array.isArray(dt) ? mt.checked = !!dt.find((
|
|
61709
|
+
(!mt.defaultChecked || !mt.disabled) && (Array.isArray(dt) ? mt.checked = !!dt.find((zt) => zt === mt.value) : mt.checked = dt === mt.value || !!dt);
|
|
61701
61710
|
}) : ft.refs.forEach((mt) => mt.checked = mt.value === dt) : isFileInput(ft.ref) ? ft.ref.value = "" : (ft.ref.value = dt, ft.ref.type || E.state.next({
|
|
61702
61711
|
name: Ke,
|
|
61703
61712
|
values: cloneObject(d)
|
|
@@ -61730,27 +61739,27 @@ function createFormControl(t = {}) {
|
|
|
61730
61739
|
let st = nt.name, ct = !0;
|
|
61731
61740
|
const dt = get(o, st), ft = (Yt) => {
|
|
61732
61741
|
ct = Number.isNaN(Yt) || isDateObject(Yt) && isNaN(Yt.getTime()) || deepEqual$1(Yt, get(d, st, Yt));
|
|
61733
|
-
}, mt = getValidationModes(e.mode),
|
|
61742
|
+
}, mt = getValidationModes(e.mode), zt = getValidationModes(e.reValidateMode);
|
|
61734
61743
|
if (dt) {
|
|
61735
61744
|
let Yt, sr;
|
|
61736
|
-
const
|
|
61737
|
-
set(d, st,
|
|
61738
|
-
const
|
|
61745
|
+
const ur = nt.type ? getFieldValue(dt._f) : getEventValue(Ke), qt = Ke.type === EVENTS.BLUR || Ke.type === EVENTS.FOCUS_OUT, Pr = !hasValidation(dt._f) && !e.resolver && !get(n.errors, st) && !dt._f.deps || skipValidation(qt, get(n.touchedFields, st), n.isSubmitted, zt, mt), gr = isWatched(st, g, qt);
|
|
61746
|
+
set(d, st, ur), qt ? (dt._f.onBlur && dt._f.onBlur(Ke), b && b(0)) : dt._f.onChange && dt._f.onChange(Ke);
|
|
61747
|
+
const dr = j(st, ur, qt), vr = !isEmptyObject$1(dr) || gr;
|
|
61739
61748
|
if (!qt && E.state.next({
|
|
61740
61749
|
name: st,
|
|
61741
61750
|
type: Ke.type,
|
|
61742
61751
|
values: cloneObject(d)
|
|
61743
61752
|
}), Pr)
|
|
61744
|
-
return (_.isValid || C.isValid) && (e.mode === "onBlur" ? qt && M() : qt || M()), vr && E.state.next({ name: st, ...gr ? {} :
|
|
61753
|
+
return (_.isValid || C.isValid) && (e.mode === "onBlur" ? qt && M() : qt || M()), vr && E.state.next({ name: st, ...gr ? {} : dr });
|
|
61745
61754
|
if (!qt && gr && E.state.next({ ...n }), e.resolver) {
|
|
61746
61755
|
const { errors: Jt } = await te([st]);
|
|
61747
|
-
if (ft(
|
|
61756
|
+
if (ft(ur), ct) {
|
|
61748
61757
|
const Nr = schemaErrorLookup(n.errors, o, st), yt = schemaErrorLookup(Jt, o, Nr.name || st);
|
|
61749
61758
|
Yt = yt.error, st = yt.name, sr = isEmptyObject$1(Jt);
|
|
61750
61759
|
}
|
|
61751
61760
|
} else
|
|
61752
|
-
I([st], !0), Yt = (await validateField(dt, g.disabled, d, R, e.shouldUseNativeValidation))[st], I([st]), ft(
|
|
61753
|
-
ct && (dt._f.deps && Le(dt._f.deps), F(st, sr, Yt,
|
|
61761
|
+
I([st], !0), Yt = (await validateField(dt, g.disabled, d, R, e.shouldUseNativeValidation))[st], I([st]), ft(ur), ct && (Yt ? sr = !1 : (_.isValid || C.isValid) && (sr = await oe(o, !0)));
|
|
61762
|
+
ct && (dt._f.deps && Le(dt._f.deps), F(st, sr, Yt, dr));
|
|
61754
61763
|
}
|
|
61755
61764
|
}, Oe = (Ke, nt) => {
|
|
61756
61765
|
if (get(n.errors, nt) && Ke.focus)
|
|
@@ -61786,7 +61795,7 @@ function createFormControl(t = {}) {
|
|
|
61786
61795
|
errors: Ke ? n.errors : {}
|
|
61787
61796
|
});
|
|
61788
61797
|
}, Ye = (Ke, nt, st) => {
|
|
61789
|
-
const ct = (get(o, Ke, { _f: {} })._f || {}).ref, dt = get(n.errors, Ke) || {}, { ref: ft, message: mt, type:
|
|
61798
|
+
const ct = (get(o, Ke, { _f: {} })._f || {}).ref, dt = get(n.errors, Ke) || {}, { ref: ft, message: mt, type: zt, ...Yt } = dt;
|
|
61790
61799
|
set(n.errors, Ke, {
|
|
61791
61800
|
...Yt,
|
|
61792
61801
|
...nt,
|
|
@@ -61853,15 +61862,15 @@ function createFormControl(t = {}) {
|
|
|
61853
61862
|
ref: (dt) => {
|
|
61854
61863
|
if (dt) {
|
|
61855
61864
|
et(Ke, nt), st = get(o, Ke);
|
|
61856
|
-
const ft = isUndefined(dt.value) && dt.querySelectorAll && dt.querySelectorAll("input,select,textarea")[0] || dt, mt = isRadioOrCheckbox(ft),
|
|
61857
|
-
if (mt ?
|
|
61865
|
+
const ft = isUndefined(dt.value) && dt.querySelectorAll && dt.querySelectorAll("input,select,textarea")[0] || dt, mt = isRadioOrCheckbox(ft), zt = st._f.refs || [];
|
|
61866
|
+
if (mt ? zt.find((Yt) => Yt === ft) : ft === st._f.ref)
|
|
61858
61867
|
return;
|
|
61859
61868
|
set(o, Ke, {
|
|
61860
61869
|
_f: {
|
|
61861
61870
|
...st._f,
|
|
61862
61871
|
...mt ? {
|
|
61863
61872
|
refs: [
|
|
61864
|
-
...
|
|
61873
|
+
...zt.filter(live),
|
|
61865
61874
|
ft,
|
|
61866
61875
|
...Array.isArray(get(l, Ke)) ? [{}] : []
|
|
61867
61876
|
],
|
|
@@ -61923,14 +61932,14 @@ function createFormControl(t = {}) {
|
|
|
61923
61932
|
...g.mount,
|
|
61924
61933
|
...Object.keys(getDirtyFields(l, d))
|
|
61925
61934
|
]);
|
|
61926
|
-
for (const
|
|
61927
|
-
get(n.dirtyFields,
|
|
61935
|
+
for (const zt of Array.from(mt))
|
|
61936
|
+
get(n.dirtyFields, zt) ? set(ft, zt, get(d, zt)) : Fe(zt, get(ft, zt));
|
|
61928
61937
|
} else {
|
|
61929
61938
|
if (isWeb && isUndefined(Ke))
|
|
61930
61939
|
for (const mt of g.mount) {
|
|
61931
|
-
const
|
|
61932
|
-
if (
|
|
61933
|
-
const Yt = Array.isArray(
|
|
61940
|
+
const zt = get(o, mt);
|
|
61941
|
+
if (zt && zt._f) {
|
|
61942
|
+
const Yt = Array.isArray(zt._f.refs) ? zt._f.refs[0] : zt._f.ref;
|
|
61934
61943
|
if (isHTMLElement(Yt)) {
|
|
61935
61944
|
const sr = Yt.closest("form");
|
|
61936
61945
|
if (sr) {
|
|
@@ -68737,17 +68746,17 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68737
68746
|
var lt = (We ? We + " " : "") + g.strict;
|
|
68738
68747
|
this.reservedWordsStrict = Le(lt), this.reservedWordsStrictBind = Le(lt + " " + g.strictBind), this.input = String(Be), this.containsEsc = !1, je ? (this.pos = je, this.lineStart = this.input.lastIndexOf(`
|
|
68739
68748
|
`, je - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(te).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = F.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = ae.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && ae.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(et), this.regexpState = null, this.privateNameStack = [];
|
|
68740
|
-
},
|
|
68749
|
+
}, zt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
68741
68750
|
mt.prototype.parse = function() {
|
|
68742
68751
|
var ae = this.options.program || this.startNode();
|
|
68743
68752
|
return this.nextToken(), this.parseTopLevel(ae);
|
|
68744
|
-
},
|
|
68753
|
+
}, zt.inFunction.get = function() {
|
|
68745
68754
|
return (this.currentVarScope().flags & ot) > 0;
|
|
68746
|
-
},
|
|
68755
|
+
}, zt.inGenerator.get = function() {
|
|
68747
68756
|
return (this.currentVarScope().flags & He) > 0 && !this.currentVarScope().inClassFieldInit;
|
|
68748
|
-
},
|
|
68757
|
+
}, zt.inAsync.get = function() {
|
|
68749
68758
|
return (this.currentVarScope().flags & it) > 0 && !this.currentVarScope().inClassFieldInit;
|
|
68750
|
-
},
|
|
68759
|
+
}, zt.canAwait.get = function() {
|
|
68751
68760
|
for (var V = this.scopeStack.length - 1; V >= 0; V--) {
|
|
68752
68761
|
var ae = this.scopeStack[V];
|
|
68753
68762
|
if (ae.inClassFieldInit || ae.flags & Vt)
|
|
@@ -68756,17 +68765,17 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68756
68765
|
return (ae.flags & it) > 0;
|
|
68757
68766
|
}
|
|
68758
68767
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
68759
|
-
},
|
|
68768
|
+
}, zt.allowSuper.get = function() {
|
|
68760
68769
|
var V = this.currentThisScope(), ae = V.flags, Be = V.inClassFieldInit;
|
|
68761
68770
|
return (ae & pt) > 0 || Be || this.options.allowSuperOutsideMethod;
|
|
68762
|
-
},
|
|
68771
|
+
}, zt.allowDirectSuper.get = function() {
|
|
68763
68772
|
return (this.currentThisScope().flags & Mt) > 0;
|
|
68764
|
-
},
|
|
68773
|
+
}, zt.treatFunctionsAsVar.get = function() {
|
|
68765
68774
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
68766
|
-
},
|
|
68775
|
+
}, zt.allowNewDotTarget.get = function() {
|
|
68767
68776
|
var V = this.currentThisScope(), ae = V.flags, Be = V.inClassFieldInit;
|
|
68768
68777
|
return (ae & (ot | Vt)) > 0 || Be;
|
|
68769
|
-
},
|
|
68778
|
+
}, zt.inClassStaticBlock.get = function() {
|
|
68770
68779
|
return (this.currentVarScope().flags & Vt) > 0;
|
|
68771
68780
|
}, mt.extend = function() {
|
|
68772
68781
|
for (var ae = [], Be = arguments.length; Be--; )
|
|
@@ -68781,7 +68790,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68781
68790
|
return We.nextToken(), We.parseExpression();
|
|
68782
68791
|
}, mt.tokenizer = function(ae, Be) {
|
|
68783
68792
|
return new this(Be, ae);
|
|
68784
|
-
}, Object.defineProperties(mt.prototype,
|
|
68793
|
+
}, Object.defineProperties(mt.prototype, zt);
|
|
68785
68794
|
var Yt = mt.prototype, sr = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
68786
68795
|
Yt.strictDirective = function(V) {
|
|
68787
68796
|
if (this.options.ecmaVersion < 5)
|
|
@@ -68821,7 +68830,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68821
68830
|
}, Yt.unexpected = function(V) {
|
|
68822
68831
|
this.raise(V ?? this.start, "Unexpected token");
|
|
68823
68832
|
};
|
|
68824
|
-
var
|
|
68833
|
+
var ur = function() {
|
|
68825
68834
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
68826
68835
|
};
|
|
68827
68836
|
Yt.checkPatternErrors = function(V, ae) {
|
|
@@ -68933,8 +68942,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68933
68942
|
default:
|
|
68934
68943
|
if (this.isAsyncFunction())
|
|
68935
68944
|
return V && this.unexpected(), this.next(), this.parseFunctionStatement(We, !0, !V);
|
|
68936
|
-
var
|
|
68937
|
-
return je === F.name &&
|
|
68945
|
+
var nr = this.value, er = this.parseExpression();
|
|
68946
|
+
return je === F.name && er.type === "Identifier" && this.eat(F.colon) ? this.parseLabeledStatement(We, nr, er, V) : this.parseExpressionStatement(We, er);
|
|
68938
68947
|
}
|
|
68939
68948
|
}, qt.parseBreakContinueStatement = function(V, ae) {
|
|
68940
68949
|
var Be = ae === "break";
|
|
@@ -68959,8 +68968,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68959
68968
|
var je = this.startNode(), We = Be ? "let" : this.value;
|
|
68960
68969
|
return this.next(), this.parseVar(je, !0, We), this.finishNode(je, "VariableDeclaration"), (this.type === F._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && je.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === F._in ? ae > -1 && this.unexpected(ae) : V.await = ae > -1), this.parseForIn(V, je)) : (ae > -1 && this.unexpected(ae), this.parseFor(V, je));
|
|
68961
68970
|
}
|
|
68962
|
-
var lt = this.isContextual("let"), ut = !1, It = this.containsEsc, Dt = new
|
|
68963
|
-
return this.type === F._in || (ut = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (ae > -1 ? (this.type === F._in && this.unexpected(ae), V.await = !0) : ut && this.options.ecmaVersion >= 8 && (
|
|
68971
|
+
var lt = this.isContextual("let"), ut = !1, It = this.containsEsc, Dt = new ur(), nr = this.start, er = ae > -1 ? this.parseExprSubscripts(Dt, "await") : this.parseExpression(!0, Dt);
|
|
68972
|
+
return this.type === F._in || (ut = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (ae > -1 ? (this.type === F._in && this.unexpected(ae), V.await = !0) : ut && this.options.ecmaVersion >= 8 && (er.start === nr && !It && er.type === "Identifier" && er.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (V.await = !1)), lt && ut && this.raise(er.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(er, !1, Dt), this.checkLValPattern(er), this.parseForIn(V, er)) : (this.checkExpressionErrors(Dt, !0), ae > -1 && this.unexpected(ae), this.parseFor(V, er));
|
|
68964
68973
|
}, qt.parseFunctionStatement = function(V, ae, Be) {
|
|
68965
68974
|
return this.next(), this.parseFunction(V, vr | (Be ? 0 : Jt), !1, ae);
|
|
68966
68975
|
}, qt.parseIfStatement = function(V) {
|
|
@@ -68979,7 +68988,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68979
68988
|
}, qt.parseThrowStatement = function(V) {
|
|
68980
68989
|
return this.next(), te.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), V.argument = this.parseExpression(), this.semicolon(), this.finishNode(V, "ThrowStatement");
|
|
68981
68990
|
};
|
|
68982
|
-
var
|
|
68991
|
+
var dr = [];
|
|
68983
68992
|
qt.parseCatchClauseParam = function() {
|
|
68984
68993
|
var V = this.parseBindingAtom(), ae = V.type === "Identifier";
|
|
68985
68994
|
return this.enterScope(ae ? Je : 0), this.checkLValPattern(V, ae ? dt : st), this.expect(F.parenR), V;
|
|
@@ -69003,9 +69012,9 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69003
69012
|
ut.name === ae && this.raise(Be.start, "Label '" + ae + "' is already declared");
|
|
69004
69013
|
}
|
|
69005
69014
|
for (var It = this.type.isLoop ? "loop" : this.type === F._switch ? "switch" : null, Dt = this.labels.length - 1; Dt >= 0; Dt--) {
|
|
69006
|
-
var
|
|
69007
|
-
if (
|
|
69008
|
-
|
|
69015
|
+
var nr = this.labels[Dt];
|
|
69016
|
+
if (nr.statementStart === V.start)
|
|
69017
|
+
nr.statementStart = this.start, nr.kind = It;
|
|
69009
69018
|
else
|
|
69010
69019
|
break;
|
|
69011
69020
|
}
|
|
@@ -69064,8 +69073,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69064
69073
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? ut = Dt : je = Dt);
|
|
69065
69074
|
}
|
|
69066
69075
|
if (je ? (Be.computed = !1, Be.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), Be.key.name = je, this.finishNode(Be.key, "Identifier")) : this.parseClassElementName(Be), ae < 13 || this.type === F.parenL || ut !== "method" || We || lt) {
|
|
69067
|
-
var
|
|
69068
|
-
|
|
69076
|
+
var nr = !Be.static && Qt(Be, "constructor"), er = nr && V;
|
|
69077
|
+
nr && ut !== "method" && this.raise(Be.key.start, "Constructor can't have get/set modifier"), Be.kind = nr ? "constructor" : ut, this.parseClassMethod(Be, We, lt, er);
|
|
69069
69078
|
} else
|
|
69070
69079
|
this.parseClassField(Be);
|
|
69071
69080
|
return Be;
|
|
@@ -69075,11 +69084,11 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69075
69084
|
this.type === F.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), V.computed = !1, V.key = this.parsePrivateIdent()) : this.parsePropertyName(V);
|
|
69076
69085
|
}, qt.parseClassMethod = function(V, ae, Be, je) {
|
|
69077
69086
|
var We = V.key;
|
|
69078
|
-
V.kind === "constructor" ? (ae && this.raise(We.start, "Constructor can't be a generator"), Be && this.raise(We.start, "Constructor can't be an async method")) : V.static &&
|
|
69087
|
+
V.kind === "constructor" ? (ae && this.raise(We.start, "Constructor can't be a generator"), Be && this.raise(We.start, "Constructor can't be an async method")) : V.static && Qt(V, "prototype") && this.raise(We.start, "Classes may not have a static property named prototype");
|
|
69079
69088
|
var lt = V.value = this.parseMethod(ae, Be, je);
|
|
69080
69089
|
return V.kind === "get" && lt.params.length !== 0 && this.raiseRecoverable(lt.start, "getter should have no params"), V.kind === "set" && lt.params.length !== 1 && this.raiseRecoverable(lt.start, "setter should have exactly one param"), V.kind === "set" && lt.params[0].type === "RestElement" && this.raiseRecoverable(lt.params[0].start, "Setter cannot use rest params"), this.finishNode(V, "MethodDefinition");
|
|
69081
69090
|
}, qt.parseClassField = function(V) {
|
|
69082
|
-
if (
|
|
69091
|
+
if (Qt(V, "constructor") ? this.raise(V.key.start, "Classes can't have a field named 'constructor'") : V.static && Qt(V, "prototype") && this.raise(V.key.start, "Classes can't have a static field named 'prototype'"), this.eat(F.eq)) {
|
|
69083
69092
|
var ae = this.currentThisScope(), Be = ae.inClassFieldInit;
|
|
69084
69093
|
ae.inClassFieldInit = !0, V.value = this.parseMaybeAssign(), ae.inClassFieldInit = Be;
|
|
69085
69094
|
} else
|
|
@@ -69112,7 +69121,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69112
69121
|
var Be = ae.key.name, je = V[Be], We = "true";
|
|
69113
69122
|
return ae.type === "MethodDefinition" && (ae.kind === "get" || ae.kind === "set") && (We = (ae.static ? "s" : "i") + ae.kind), je === "iget" && We === "iset" || je === "iset" && We === "iget" || je === "sget" && We === "sset" || je === "sset" && We === "sget" ? (V[Be] = "true", !1) : je ? !0 : (V[Be] = We, !1);
|
|
69114
69123
|
}
|
|
69115
|
-
function
|
|
69124
|
+
function Qt(V, ae) {
|
|
69116
69125
|
var Be = V.computed, je = V.key;
|
|
69117
69126
|
return !Be && (je.type === "Identifier" && je.name === ae || je.type === "Literal" && je.value === ae);
|
|
69118
69127
|
}
|
|
@@ -69191,7 +69200,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69191
69200
|
}
|
|
69192
69201
|
return ae;
|
|
69193
69202
|
}, qt.parseImport = function(V) {
|
|
69194
|
-
return this.next(), this.type === F.string ? (V.specifiers =
|
|
69203
|
+
return this.next(), this.type === F.string ? (V.specifiers = dr, V.source = this.parseExprAtom()) : (V.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), V.source = this.type === F.string ? this.parseExprAtom() : this.unexpected()), this.semicolon(), this.finishNode(V, "ImportDeclaration");
|
|
69195
69204
|
}, qt.parseImportSpecifier = function() {
|
|
69196
69205
|
var V = this.startNode();
|
|
69197
69206
|
return V.imported = this.parseModuleExportName(), this.eatContextual("as") ? V.local = this.parseIdent() : (this.checkUnreserved(V.imported), V.local = V.imported), this.checkLValSimple(V.local, st), this.finishNode(V, "ImportSpecifier");
|
|
@@ -69227,8 +69236,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69227
69236
|
}, qt.isDirectiveCandidate = function(V) {
|
|
69228
69237
|
return this.options.ecmaVersion >= 5 && V.type === "ExpressionStatement" && V.expression.type === "Literal" && typeof V.expression.value == "string" && (this.input[V.start] === '"' || this.input[V.start] === "'");
|
|
69229
69238
|
};
|
|
69230
|
-
var
|
|
69231
|
-
|
|
69239
|
+
var Zt = mt.prototype;
|
|
69240
|
+
Zt.toAssignable = function(V, ae, Be) {
|
|
69232
69241
|
if (this.options.ecmaVersion >= 6 && V)
|
|
69233
69242
|
switch (V.type) {
|
|
69234
69243
|
case "Identifier":
|
|
@@ -69272,7 +69281,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69272
69281
|
}
|
|
69273
69282
|
else Be && this.checkPatternErrors(Be, !0);
|
|
69274
69283
|
return V;
|
|
69275
|
-
},
|
|
69284
|
+
}, Zt.toAssignableList = function(V, ae) {
|
|
69276
69285
|
for (var Be = V.length, je = 0; je < Be; je++) {
|
|
69277
69286
|
var We = V[je];
|
|
69278
69287
|
We && this.toAssignable(We, ae);
|
|
@@ -69282,13 +69291,13 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69282
69291
|
this.options.ecmaVersion === 6 && ae && lt && lt.type === "RestElement" && lt.argument.type !== "Identifier" && this.unexpected(lt.argument.start);
|
|
69283
69292
|
}
|
|
69284
69293
|
return V;
|
|
69285
|
-
},
|
|
69294
|
+
}, Zt.parseSpread = function(V) {
|
|
69286
69295
|
var ae = this.startNode();
|
|
69287
69296
|
return this.next(), ae.argument = this.parseMaybeAssign(!1, V), this.finishNode(ae, "SpreadElement");
|
|
69288
|
-
},
|
|
69297
|
+
}, Zt.parseRestBinding = function() {
|
|
69289
69298
|
var V = this.startNode();
|
|
69290
69299
|
return this.next(), this.options.ecmaVersion === 6 && this.type !== F.name && this.unexpected(), V.argument = this.parseBindingAtom(), this.finishNode(V, "RestElement");
|
|
69291
|
-
},
|
|
69300
|
+
}, Zt.parseBindingAtom = function() {
|
|
69292
69301
|
if (this.options.ecmaVersion >= 6)
|
|
69293
69302
|
switch (this.type) {
|
|
69294
69303
|
case F.bracketL:
|
|
@@ -69298,7 +69307,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69298
69307
|
return this.parseObj(!0);
|
|
69299
69308
|
}
|
|
69300
69309
|
return this.parseIdent();
|
|
69301
|
-
},
|
|
69310
|
+
}, Zt.parseBindingList = function(V, ae, Be, je) {
|
|
69302
69311
|
for (var We = [], lt = !0; !this.eat(V); )
|
|
69303
69312
|
if (lt ? lt = !1 : this.expect(F.comma), ae && this.type === F.comma)
|
|
69304
69313
|
We.push(null);
|
|
@@ -69313,17 +69322,17 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69313
69322
|
We.push(this.parseAssignableListItem(je));
|
|
69314
69323
|
}
|
|
69315
69324
|
return We;
|
|
69316
|
-
},
|
|
69325
|
+
}, Zt.parseAssignableListItem = function(V) {
|
|
69317
69326
|
var ae = this.parseMaybeDefault(this.start, this.startLoc);
|
|
69318
69327
|
return this.parseBindingListItem(ae), ae;
|
|
69319
|
-
},
|
|
69328
|
+
}, Zt.parseBindingListItem = function(V) {
|
|
69320
69329
|
return V;
|
|
69321
|
-
},
|
|
69330
|
+
}, Zt.parseMaybeDefault = function(V, ae, Be) {
|
|
69322
69331
|
if (Be = Be || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(F.eq))
|
|
69323
69332
|
return Be;
|
|
69324
69333
|
var je = this.startNodeAt(V, ae);
|
|
69325
69334
|
return je.left = Be, je.right = this.parseMaybeAssign(), this.finishNode(je, "AssignmentPattern");
|
|
69326
|
-
},
|
|
69335
|
+
}, Zt.checkLValSimple = function(V, ae, Be) {
|
|
69327
69336
|
ae === void 0 && (ae = Ke);
|
|
69328
69337
|
var je = ae !== Ke;
|
|
69329
69338
|
switch (V.type) {
|
|
@@ -69341,7 +69350,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69341
69350
|
default:
|
|
69342
69351
|
this.raise(V.start, (je ? "Binding" : "Assigning to") + " rvalue");
|
|
69343
69352
|
}
|
|
69344
|
-
},
|
|
69353
|
+
}, Zt.checkLValPattern = function(V, ae, Be) {
|
|
69345
69354
|
switch (ae === void 0 && (ae = Ke), V.type) {
|
|
69346
69355
|
case "ObjectPattern":
|
|
69347
69356
|
for (var je = 0, We = V.properties; je < We.length; je += 1) {
|
|
@@ -69358,7 +69367,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69358
69367
|
default:
|
|
69359
69368
|
this.checkLValSimple(V, ae, Be);
|
|
69360
69369
|
}
|
|
69361
|
-
},
|
|
69370
|
+
}, Zt.checkLValInnerPattern = function(V, ae, Be) {
|
|
69362
69371
|
switch (ae === void 0 && (ae = Ke), V.type) {
|
|
69363
69372
|
case "Property":
|
|
69364
69373
|
this.checkLValInnerPattern(V.value, ae, Be);
|
|
@@ -69373,40 +69382,40 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69373
69382
|
this.checkLValPattern(V, ae, Be);
|
|
69374
69383
|
}
|
|
69375
69384
|
};
|
|
69376
|
-
var
|
|
69385
|
+
var tr = function(ae, Be, je, We, lt) {
|
|
69377
69386
|
this.token = ae, this.isExpr = !!Be, this.preserveSpace = !!je, this.override = We, this.generator = !!lt;
|
|
69378
|
-
},
|
|
69379
|
-
b_stat: new
|
|
69380
|
-
b_expr: new
|
|
69381
|
-
b_tmpl: new
|
|
69382
|
-
p_stat: new
|
|
69383
|
-
p_expr: new
|
|
69384
|
-
q_tmpl: new
|
|
69387
|
+
}, Wt = {
|
|
69388
|
+
b_stat: new tr("{", !1),
|
|
69389
|
+
b_expr: new tr("{", !0),
|
|
69390
|
+
b_tmpl: new tr("${", !1),
|
|
69391
|
+
p_stat: new tr("(", !1),
|
|
69392
|
+
p_expr: new tr("(", !0),
|
|
69393
|
+
q_tmpl: new tr("`", !0, !0, function(V) {
|
|
69385
69394
|
return V.tryReadTemplateToken();
|
|
69386
69395
|
}),
|
|
69387
|
-
f_stat: new
|
|
69388
|
-
f_expr: new
|
|
69389
|
-
f_expr_gen: new
|
|
69390
|
-
f_gen: new
|
|
69391
|
-
},
|
|
69392
|
-
|
|
69393
|
-
return [
|
|
69394
|
-
},
|
|
69396
|
+
f_stat: new tr("function", !1),
|
|
69397
|
+
f_expr: new tr("function", !0),
|
|
69398
|
+
f_expr_gen: new tr("function", !0, !1, null, !0),
|
|
69399
|
+
f_gen: new tr("function", !1, !1, null, !0)
|
|
69400
|
+
}, mr = mt.prototype;
|
|
69401
|
+
mr.initialContext = function() {
|
|
69402
|
+
return [Wt.b_stat];
|
|
69403
|
+
}, mr.curContext = function() {
|
|
69395
69404
|
return this.context[this.context.length - 1];
|
|
69396
|
-
},
|
|
69405
|
+
}, mr.braceIsBlock = function(V) {
|
|
69397
69406
|
var ae = this.curContext();
|
|
69398
|
-
return ae ===
|
|
69399
|
-
},
|
|
69407
|
+
return ae === Wt.f_expr || ae === Wt.f_stat ? !0 : V === F.colon && (ae === Wt.b_stat || ae === Wt.b_expr) ? !ae.isExpr : V === F._return || V === F.name && this.exprAllowed ? te.test(this.input.slice(this.lastTokEnd, this.start)) : V === F._else || V === F.semi || V === F.eof || V === F.parenR || V === F.arrow ? !0 : V === F.braceL ? ae === Wt.b_stat : V === F._var || V === F._const || V === F.name ? !1 : !this.exprAllowed;
|
|
69408
|
+
}, mr.inGeneratorContext = function() {
|
|
69400
69409
|
for (var V = this.context.length - 1; V >= 1; V--) {
|
|
69401
69410
|
var ae = this.context[V];
|
|
69402
69411
|
if (ae.token === "function")
|
|
69403
69412
|
return ae.generator;
|
|
69404
69413
|
}
|
|
69405
69414
|
return !1;
|
|
69406
|
-
},
|
|
69415
|
+
}, mr.updateContext = function(V) {
|
|
69407
69416
|
var ae, Be = this.type;
|
|
69408
69417
|
Be.keyword && V === F.dot ? this.exprAllowed = !1 : (ae = Be.updateContext) ? ae.call(this, V) : this.exprAllowed = Be.beforeExpr;
|
|
69409
|
-
},
|
|
69418
|
+
}, mr.overrideContext = function(V) {
|
|
69410
69419
|
this.curContext() !== V && (this.context[this.context.length - 1] = V);
|
|
69411
69420
|
}, F.parenR.updateContext = F.braceR.updateContext = function() {
|
|
69412
69421
|
if (this.context.length === 1) {
|
|
@@ -69414,25 +69423,25 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69414
69423
|
return;
|
|
69415
69424
|
}
|
|
69416
69425
|
var V = this.context.pop();
|
|
69417
|
-
V ===
|
|
69426
|
+
V === Wt.b_stat && this.curContext().token === "function" && (V = this.context.pop()), this.exprAllowed = !V.isExpr;
|
|
69418
69427
|
}, F.braceL.updateContext = function(V) {
|
|
69419
|
-
this.context.push(this.braceIsBlock(V) ?
|
|
69428
|
+
this.context.push(this.braceIsBlock(V) ? Wt.b_stat : Wt.b_expr), this.exprAllowed = !0;
|
|
69420
69429
|
}, F.dollarBraceL.updateContext = function() {
|
|
69421
|
-
this.context.push(
|
|
69430
|
+
this.context.push(Wt.b_tmpl), this.exprAllowed = !0;
|
|
69422
69431
|
}, F.parenL.updateContext = function(V) {
|
|
69423
69432
|
var ae = V === F._if || V === F._for || V === F._with || V === F._while;
|
|
69424
|
-
this.context.push(ae ?
|
|
69433
|
+
this.context.push(ae ? Wt.p_stat : Wt.p_expr), this.exprAllowed = !0;
|
|
69425
69434
|
}, F.incDec.updateContext = function() {
|
|
69426
69435
|
}, F._function.updateContext = F._class.updateContext = function(V) {
|
|
69427
|
-
V.beforeExpr && V !== F._else && !(V === F.semi && this.curContext() !==
|
|
69436
|
+
V.beforeExpr && V !== F._else && !(V === F.semi && this.curContext() !== Wt.p_stat) && !(V === F._return && te.test(this.input.slice(this.lastTokEnd, this.start))) && !((V === F.colon || V === F.braceL) && this.curContext() === Wt.b_stat) ? this.context.push(Wt.f_expr) : this.context.push(Wt.f_stat), this.exprAllowed = !1;
|
|
69428
69437
|
}, F.colon.updateContext = function() {
|
|
69429
69438
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
69430
69439
|
}, F.backQuote.updateContext = function() {
|
|
69431
|
-
this.curContext() ===
|
|
69440
|
+
this.curContext() === Wt.q_tmpl ? this.context.pop() : this.context.push(Wt.q_tmpl), this.exprAllowed = !1;
|
|
69432
69441
|
}, F.star.updateContext = function(V) {
|
|
69433
69442
|
if (V === F._function) {
|
|
69434
69443
|
var ae = this.context.length - 1;
|
|
69435
|
-
this.context[ae] ===
|
|
69444
|
+
this.context[ae] === Wt.f_expr ? this.context[ae] = Wt.f_expr_gen : this.context[ae] = Wt.f_gen;
|
|
69436
69445
|
}
|
|
69437
69446
|
this.exprAllowed = !0;
|
|
69438
69447
|
}, F.name.updateContext = function(V) {
|
|
@@ -69487,16 +69496,16 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69487
69496
|
this.exprAllowed = !1;
|
|
69488
69497
|
}
|
|
69489
69498
|
var je = !1, We = -1, lt = -1, ut = -1;
|
|
69490
|
-
ae ? (We = ae.parenthesizedAssign, lt = ae.trailingComma, ut = ae.doubleProto, ae.parenthesizedAssign = ae.trailingComma = -1) : (ae = new
|
|
69499
|
+
ae ? (We = ae.parenthesizedAssign, lt = ae.trailingComma, ut = ae.doubleProto, ae.parenthesizedAssign = ae.trailingComma = -1) : (ae = new ur(), je = !0);
|
|
69491
69500
|
var It = this.start, Dt = this.startLoc;
|
|
69492
69501
|
(this.type === F.parenL || this.type === F.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = V === "await");
|
|
69493
|
-
var
|
|
69494
|
-
if (Be && (
|
|
69495
|
-
var
|
|
69496
|
-
return
|
|
69502
|
+
var nr = this.parseMaybeConditional(V, ae);
|
|
69503
|
+
if (Be && (nr = Be.call(this, nr, It, Dt)), this.type.isAssign) {
|
|
69504
|
+
var er = this.startNodeAt(It, Dt);
|
|
69505
|
+
return er.operator = this.value, this.type === F.eq && (nr = this.toAssignable(nr, !1, ae)), je || (ae.parenthesizedAssign = ae.trailingComma = ae.doubleProto = -1), ae.shorthandAssign >= nr.start && (ae.shorthandAssign = -1), this.type === F.eq ? this.checkLValPattern(nr) : this.checkLValSimple(nr), er.left = nr, this.next(), er.right = this.parseMaybeAssign(V), ut > -1 && (ae.doubleProto = ut), this.finishNode(er, "AssignmentExpression");
|
|
69497
69506
|
} else
|
|
69498
69507
|
je && this.checkExpressionErrors(ae, !0);
|
|
69499
|
-
return We > -1 && (ae.parenthesizedAssign = We), lt > -1 && (ae.trailingComma = lt),
|
|
69508
|
+
return We > -1 && (ae.parenthesizedAssign = We), lt > -1 && (ae.trailingComma = lt), nr;
|
|
69500
69509
|
}, Xt.parseMaybeConditional = function(V, ae) {
|
|
69501
69510
|
var Be = this.start, je = this.startLoc, We = this.parseExprOps(V, ae);
|
|
69502
69511
|
if (this.checkExpressionErrors(ae))
|
|
@@ -69516,7 +69525,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69516
69525
|
It && (lt = F.logicalAND.binop);
|
|
69517
69526
|
var Dt = this.value;
|
|
69518
69527
|
this.next();
|
|
69519
|
-
var
|
|
69528
|
+
var nr = this.start, er = this.startLoc, yr = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, We), nr, er, lt, We), Ur = this.buildBinary(ae, Be, V, yr, Dt, ut || It);
|
|
69520
69529
|
return (ut && this.type === F.coalesce || It && (this.type === F.logicalOR || this.type === F.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(Ur, ae, Be, je, We);
|
|
69521
69530
|
}
|
|
69522
69531
|
return V;
|
|
@@ -69530,15 +69539,15 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69530
69539
|
ut = this.parseAwait(je), ae = !0;
|
|
69531
69540
|
else if (this.type.prefix) {
|
|
69532
69541
|
var It = this.startNode(), Dt = this.type === F.incDec;
|
|
69533
|
-
It.operator = this.value, It.prefix = !0, this.next(), It.argument = this.parseMaybeUnary(null, !0, Dt, je), this.checkExpressionErrors(V, !0), Dt ? this.checkLValSimple(It.argument) : this.strict && It.operator === "delete" &&
|
|
69542
|
+
It.operator = this.value, It.prefix = !0, this.next(), It.argument = this.parseMaybeUnary(null, !0, Dt, je), this.checkExpressionErrors(V, !0), Dt ? this.checkLValSimple(It.argument) : this.strict && It.operator === "delete" && ar(It.argument) ? this.raiseRecoverable(It.start, "Deleting local variable in strict mode") : It.operator === "delete" && Cr(It.argument) ? this.raiseRecoverable(It.start, "Private fields can not be deleted") : ae = !0, ut = this.finishNode(It, Dt ? "UpdateExpression" : "UnaryExpression");
|
|
69534
69543
|
} else if (!ae && this.type === F.privateId)
|
|
69535
69544
|
(je || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), ut = this.parsePrivateIdent(), this.type !== F._in && this.unexpected();
|
|
69536
69545
|
else {
|
|
69537
69546
|
if (ut = this.parseExprSubscripts(V, je), this.checkExpressionErrors(V))
|
|
69538
69547
|
return ut;
|
|
69539
69548
|
for (; this.type.postfix && !this.canInsertSemicolon(); ) {
|
|
69540
|
-
var
|
|
69541
|
-
|
|
69549
|
+
var nr = this.startNodeAt(We, lt);
|
|
69550
|
+
nr.operator = this.value, nr.prefix = !1, nr.argument = ut, this.checkLValSimple(ut), this.next(), ut = this.finishNode(nr, "UpdateExpression");
|
|
69542
69551
|
}
|
|
69543
69552
|
}
|
|
69544
69553
|
if (!Be && this.eat(F.starstar))
|
|
@@ -69549,8 +69558,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69549
69558
|
else
|
|
69550
69559
|
return ut;
|
|
69551
69560
|
};
|
|
69552
|
-
function
|
|
69553
|
-
return V.type === "Identifier" || V.type === "ParenthesizedExpression" &&
|
|
69561
|
+
function ar(V) {
|
|
69562
|
+
return V.type === "Identifier" || V.type === "ParenthesizedExpression" && ar(V.expression);
|
|
69554
69563
|
}
|
|
69555
69564
|
function Cr(V) {
|
|
69556
69565
|
return V.type === "MemberExpression" && V.property.type === "PrivateIdentifier" || V.type === "ChainExpression" && Cr(V.expression) || V.type === "ParenthesizedExpression" && Cr(V.expression);
|
|
@@ -69580,12 +69589,12 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69580
69589
|
}, Xt.parseSubscript = function(V, ae, Be, je, We, lt, ut) {
|
|
69581
69590
|
var It = this.options.ecmaVersion >= 11, Dt = It && this.eat(F.questionDot);
|
|
69582
69591
|
je && Dt && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
69583
|
-
var
|
|
69584
|
-
if (
|
|
69585
|
-
var
|
|
69586
|
-
|
|
69592
|
+
var nr = this.eat(F.bracketL);
|
|
69593
|
+
if (nr || Dt && this.type !== F.parenL && this.type !== F.backQuote || this.eat(F.dot)) {
|
|
69594
|
+
var er = this.startNodeAt(ae, Be);
|
|
69595
|
+
er.object = V, nr ? (er.property = this.parseExpression(), this.expect(F.bracketR)) : this.type === F.privateId && V.type !== "Super" ? er.property = this.parsePrivateIdent() : er.property = this.parseIdent(this.options.allowReserved !== "never"), er.computed = !!nr, It && (er.optional = Dt), V = this.finishNode(er, "MemberExpression");
|
|
69587
69596
|
} else if (!je && this.eat(F.parenL)) {
|
|
69588
|
-
var yr = new
|
|
69597
|
+
var yr = new ur(), Ur = this.yieldPos, tn = this.awaitPos, Gr = this.awaitIdentPos;
|
|
69589
69598
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
69590
69599
|
var fn = this.parseExprList(F.parenR, this.options.ecmaVersion >= 8, !1, yr);
|
|
69591
69600
|
if (We && !Dt && this.shouldParseAsyncArrow())
|
|
@@ -69610,7 +69619,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69610
69619
|
case F.name:
|
|
69611
69620
|
var lt = this.start, ut = this.startLoc, It = this.containsEsc, Dt = this.parseIdent(!1);
|
|
69612
69621
|
if (this.options.ecmaVersion >= 8 && !It && Dt.name === "async" && !this.canInsertSemicolon() && this.eat(F._function))
|
|
69613
|
-
return this.overrideContext(
|
|
69622
|
+
return this.overrideContext(Wt.f_expr), this.parseFunction(this.startNodeAt(lt, ut), 0, !1, !0, ae);
|
|
69614
69623
|
if (We && !this.canInsertSemicolon()) {
|
|
69615
69624
|
if (this.eat(F.arrow))
|
|
69616
69625
|
return this.parseArrowExpression(this.startNodeAt(lt, ut), [Dt], !1, ae);
|
|
@@ -69619,8 +69628,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69619
69628
|
}
|
|
69620
69629
|
return Dt;
|
|
69621
69630
|
case F.regexp:
|
|
69622
|
-
var
|
|
69623
|
-
return je = this.parseLiteral(
|
|
69631
|
+
var nr = this.value;
|
|
69632
|
+
return je = this.parseLiteral(nr.value), je.regex = { pattern: nr.pattern, flags: nr.flags }, je;
|
|
69624
69633
|
case F.num:
|
|
69625
69634
|
case F.string:
|
|
69626
69635
|
return this.parseLiteral(this.value);
|
|
@@ -69629,12 +69638,12 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69629
69638
|
case F._false:
|
|
69630
69639
|
return je = this.startNode(), je.value = this.type === F._null ? null : this.type === F._true, je.raw = this.type.keyword, this.next(), this.finishNode(je, "Literal");
|
|
69631
69640
|
case F.parenL:
|
|
69632
|
-
var
|
|
69633
|
-
return V && (V.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(yr) && (V.parenthesizedAssign =
|
|
69641
|
+
var er = this.start, yr = this.parseParenAndDistinguishExpression(We, ae);
|
|
69642
|
+
return V && (V.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(yr) && (V.parenthesizedAssign = er), V.parenthesizedBind < 0 && (V.parenthesizedBind = er)), yr;
|
|
69634
69643
|
case F.bracketL:
|
|
69635
69644
|
return je = this.startNode(), this.next(), je.elements = this.parseExprList(F.bracketR, !0, !0, V), this.finishNode(je, "ArrayExpression");
|
|
69636
69645
|
case F.braceL:
|
|
69637
|
-
return this.overrideContext(
|
|
69646
|
+
return this.overrideContext(Wt.b_expr), this.parseObj(!1, V);
|
|
69638
69647
|
case F._function:
|
|
69639
69648
|
return je = this.startNode(), this.next(), this.parseFunction(je, 0);
|
|
69640
69649
|
case F._class:
|
|
@@ -69682,10 +69691,10 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69682
69691
|
var Be = this.start, je = this.startLoc, We, lt = this.options.ecmaVersion >= 8;
|
|
69683
69692
|
if (this.options.ecmaVersion >= 6) {
|
|
69684
69693
|
this.next();
|
|
69685
|
-
var ut = this.start, It = this.startLoc, Dt = [],
|
|
69694
|
+
var ut = this.start, It = this.startLoc, Dt = [], nr = !0, er = !1, yr = new ur(), Ur = this.yieldPos, tn = this.awaitPos, Gr;
|
|
69686
69695
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== F.parenR; )
|
|
69687
|
-
if (
|
|
69688
|
-
|
|
69696
|
+
if (nr ? nr = !1 : this.expect(F.comma), lt && this.afterTrailingComma(F.parenR, !0)) {
|
|
69697
|
+
er = !0;
|
|
69689
69698
|
break;
|
|
69690
69699
|
} else if (this.type === F.ellipsis) {
|
|
69691
69700
|
Gr = this.start, Dt.push(this.parseParenItem(this.parseRestBinding())), this.type === F.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
|
|
@@ -69695,7 +69704,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69695
69704
|
var fn = this.lastTokEnd, Wr = this.lastTokEndLoc;
|
|
69696
69705
|
if (this.expect(F.parenR), V && this.shouldParseArrow(Dt) && this.eat(F.arrow))
|
|
69697
69706
|
return this.checkPatternErrors(yr, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = Ur, this.awaitPos = tn, this.parseParenArrowList(Be, je, Dt, ae);
|
|
69698
|
-
(!Dt.length ||
|
|
69707
|
+
(!Dt.length || er) && this.unexpected(this.lastTokStart), Gr && this.unexpected(Gr), this.checkExpressionErrors(yr, !0), this.yieldPos = Ur || this.yieldPos, this.awaitPos = tn || this.awaitPos, Dt.length > 1 ? (We = this.startNodeAt(ut, It), We.expressions = Dt, this.finishNodeAt(We, "SequenceExpression", fn, Wr)) : We = Dt[0];
|
|
69699
69708
|
} else
|
|
69700
69709
|
We = this.parseParenExpression();
|
|
69701
69710
|
if (this.options.preserveParens) {
|
|
@@ -69943,9 +69952,9 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69943
69952
|
12: Rt,
|
|
69944
69953
|
13: Ht,
|
|
69945
69954
|
14: cr
|
|
69946
|
-
},
|
|
69955
|
+
}, pr = {};
|
|
69947
69956
|
function Sr(V) {
|
|
69948
|
-
var ae =
|
|
69957
|
+
var ae = pr[V] = {
|
|
69949
69958
|
binary: Le(nn[V] + " " + Qr),
|
|
69950
69959
|
binaryOfStrings: Le(on[V]),
|
|
69951
69960
|
nonBinary: {
|
|
@@ -69972,7 +69981,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69972
69981
|
return new qr(this.parent, this.base);
|
|
69973
69982
|
};
|
|
69974
69983
|
var Rr = function(ae) {
|
|
69975
|
-
this.parser = ae, this.validFlags = "gim" + (ae.options.ecmaVersion >= 6 ? "uy" : "") + (ae.options.ecmaVersion >= 9 ? "s" : "") + (ae.options.ecmaVersion >= 13 ? "d" : "") + (ae.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
69984
|
+
this.parser = ae, this.validFlags = "gim" + (ae.options.ecmaVersion >= 6 ? "uy" : "") + (ae.options.ecmaVersion >= 9 ? "s" : "") + (ae.options.ecmaVersion >= 13 ? "d" : "") + (ae.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = pr[ae.options.ecmaVersion >= 14 ? 14 : ae.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
69976
69985
|
};
|
|
69977
69986
|
Rr.prototype.reset = function(ae, Be, je) {
|
|
69978
69987
|
var We = je.indexOf("v") !== -1, lt = je.indexOf("u") !== -1;
|
|
@@ -70749,15 +70758,15 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70749
70758
|
}
|
|
70750
70759
|
return this.finishToken(F.regexp, { pattern: We, flags: ut, value: Dt });
|
|
70751
70760
|
}, ir.readInt = function(V, ae, Be) {
|
|
70752
|
-
for (var je = this.options.ecmaVersion >= 12 && ae === void 0, We = Be && this.input.charCodeAt(this.pos) === 48, lt = this.pos, ut = 0, It = 0, Dt = 0,
|
|
70753
|
-
var
|
|
70754
|
-
if (je &&
|
|
70755
|
-
We && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), It === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), Dt === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), It =
|
|
70761
|
+
for (var je = this.options.ecmaVersion >= 12 && ae === void 0, We = Be && this.input.charCodeAt(this.pos) === 48, lt = this.pos, ut = 0, It = 0, Dt = 0, nr = ae ?? 1 / 0; Dt < nr; ++Dt, ++this.pos) {
|
|
70762
|
+
var er = this.input.charCodeAt(this.pos), yr = void 0;
|
|
70763
|
+
if (je && er === 95) {
|
|
70764
|
+
We && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), It === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), Dt === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), It = er;
|
|
70756
70765
|
continue;
|
|
70757
70766
|
}
|
|
70758
|
-
if (
|
|
70767
|
+
if (er >= 97 ? yr = er - 97 + 10 : er >= 65 ? yr = er - 65 + 10 : er >= 48 && er <= 57 ? yr = er - 48 : yr = 1 / 0, yr >= V)
|
|
70759
70768
|
break;
|
|
70760
|
-
It =
|
|
70769
|
+
It = er, ut = ut * V + yr;
|
|
70761
70770
|
}
|
|
70762
70771
|
return je && It === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === lt || ae != null && this.pos - lt !== ae ? null : ut;
|
|
70763
70772
|
};
|
|
@@ -70804,13 +70813,13 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70804
70813
|
}
|
|
70805
70814
|
return ae += this.input.slice(Be, this.pos++), this.finishToken(F.string, ae);
|
|
70806
70815
|
};
|
|
70807
|
-
var
|
|
70816
|
+
var kn = {};
|
|
70808
70817
|
ir.tryReadTemplateToken = function() {
|
|
70809
70818
|
this.inTemplateElement = !0;
|
|
70810
70819
|
try {
|
|
70811
70820
|
this.readTmplToken();
|
|
70812
70821
|
} catch (V) {
|
|
70813
|
-
if (V ===
|
|
70822
|
+
if (V === kn)
|
|
70814
70823
|
this.readInvalidTemplateToken();
|
|
70815
70824
|
else
|
|
70816
70825
|
throw V;
|
|
@@ -70818,7 +70827,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70818
70827
|
this.inTemplateElement = !1;
|
|
70819
70828
|
}, ir.invalidStringToken = function(V, ae) {
|
|
70820
70829
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
70821
|
-
throw
|
|
70830
|
+
throw kn;
|
|
70822
70831
|
this.raise(V, ae);
|
|
70823
70832
|
}, ir.readTmplToken = function() {
|
|
70824
70833
|
for (var V = "", ae = this.pos; ; ) {
|
|
@@ -70927,10 +70936,10 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70927
70936
|
var V = this.readWord1(), ae = F.name;
|
|
70928
70937
|
return this.keywords.test(V) && (ae = Q[V]), this.finishToken(ae, V);
|
|
70929
70938
|
};
|
|
70930
|
-
var
|
|
70939
|
+
var Nn = "8.12.1";
|
|
70931
70940
|
mt.acorn = {
|
|
70932
70941
|
Parser: mt,
|
|
70933
|
-
version:
|
|
70942
|
+
version: Nn,
|
|
70934
70943
|
defaultOptions: Ze,
|
|
70935
70944
|
Position: ze,
|
|
70936
70945
|
SourceLocation: Ye,
|
|
@@ -70939,8 +70948,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70939
70948
|
TokenType: I,
|
|
70940
70949
|
tokTypes: F,
|
|
70941
70950
|
keywordTypes: Q,
|
|
70942
|
-
TokContext:
|
|
70943
|
-
tokContexts:
|
|
70951
|
+
TokContext: tr,
|
|
70952
|
+
tokContexts: Wt,
|
|
70944
70953
|
isIdentifierChar: M,
|
|
70945
70954
|
isIdentifierStart: A,
|
|
70946
70955
|
Token: dn,
|
|
@@ -70958,7 +70967,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70958
70967
|
function Wn(V, ae) {
|
|
70959
70968
|
return mt.tokenizer(V, ae);
|
|
70960
70969
|
}
|
|
70961
|
-
n.Node = Br, n.Parser = mt, n.Position = ze, n.SourceLocation = Ye, n.TokContext =
|
|
70970
|
+
n.Node = Br, n.Parser = mt, n.Position = ze, n.SourceLocation = Ye, n.TokContext = tr, n.Token = dn, n.TokenType = I, n.defaultOptions = Ze, n.getLineInfo = Qe, n.isIdentifierChar = M, n.isIdentifierStart = A, n.isNewLine = oe, n.keywordTypes = Q, n.lineBreak = te, n.lineBreakG = ne, n.nonASCIIwhitespace = se, n.parse = zn, n.parseExpressionAt = Gn, n.tokContexts = Wt, n.tokTypes = F, n.tokenizer = Wn, n.version = Nn;
|
|
70962
70971
|
});
|
|
70963
70972
|
}), require_acorn_jsx = __commonJS((t, e) => {
|
|
70964
70973
|
var n = require_xhtml(), o = /^[\da-fA-F]+$/, l = /^\d+$/, d = /* @__PURE__ */ new WeakMap();
|
|
@@ -73996,7 +74005,7 @@ var hn, lr, pn, mn, Yr, rn;
|
|
|
73996
74005
|
class JsxParser extends React__default.Component {
|
|
73997
74006
|
constructor() {
|
|
73998
74007
|
super(...arguments);
|
|
73999
|
-
|
|
74008
|
+
rr(this, "ParsedChildren", null);
|
|
74000
74009
|
Hr(this, hn, (n) => {
|
|
74001
74010
|
const o = Parser.extend(AcornJSX.default({
|
|
74002
74011
|
autoCloseVoidElements: this.props.autoCloseVoidElements
|
|
@@ -74007,27 +74016,27 @@ class JsxParser extends React__default.Component {
|
|
|
74007
74016
|
} catch (f) {
|
|
74008
74017
|
return this.props.showWarnings && console.warn(f), this.props.onError && this.props.onError(f), this.props.renderError ? this.props.renderError({ error: String(f) }) : null;
|
|
74009
74018
|
}
|
|
74010
|
-
return d.map((f) =>
|
|
74019
|
+
return d.map((f) => or(this, lr).call(this, f)).filter(Boolean);
|
|
74011
74020
|
});
|
|
74012
74021
|
Hr(this, lr, (n, o) => {
|
|
74013
74022
|
var l, d;
|
|
74014
74023
|
switch (n.type) {
|
|
74015
74024
|
case "JSXAttribute":
|
|
74016
|
-
return n.value === null ? !0 :
|
|
74025
|
+
return n.value === null ? !0 : or(this, lr).call(this, n.value, o);
|
|
74017
74026
|
case "JSXElement":
|
|
74018
74027
|
case "JSXFragment":
|
|
74019
|
-
return
|
|
74028
|
+
return or(this, rn).call(this, n, o);
|
|
74020
74029
|
case "JSXExpressionContainer":
|
|
74021
|
-
return
|
|
74030
|
+
return or(this, lr).call(this, n.expression, o);
|
|
74022
74031
|
case "JSXText":
|
|
74023
74032
|
const f = this.props.disableKeyGeneration ? void 0 : randomHash();
|
|
74024
74033
|
return this.props.disableFragments ? n.value : /* @__PURE__ */ React__default.createElement(Fragment$2, {
|
|
74025
74034
|
key: f
|
|
74026
74035
|
}, n.value);
|
|
74027
74036
|
case "ArrayExpression":
|
|
74028
|
-
return n.elements.map((A) =>
|
|
74037
|
+
return n.elements.map((A) => or(this, lr).call(this, A, o));
|
|
74029
74038
|
case "BinaryExpression":
|
|
74030
|
-
const g =
|
|
74039
|
+
const g = or(this, lr).call(this, n.left, o), b = or(this, lr).call(this, n.right, o);
|
|
74031
74040
|
let S;
|
|
74032
74041
|
switch (n.operator) {
|
|
74033
74042
|
case "-":
|
|
@@ -74078,40 +74087,40 @@ class JsxParser extends React__default.Component {
|
|
|
74078
74087
|
}
|
|
74079
74088
|
return handleNaN(S);
|
|
74080
74089
|
case "CallExpression":
|
|
74081
|
-
const _ =
|
|
74090
|
+
const _ = or(this, lr).call(this, n.callee, o);
|
|
74082
74091
|
if (_ === void 0) {
|
|
74083
74092
|
if (n.optional)
|
|
74084
74093
|
throw new NullishShortCircuit();
|
|
74085
74094
|
this.props.onError(new Error(`The expression '${n.callee}' could not be resolved, resulting in an undefined return value.`));
|
|
74086
74095
|
return;
|
|
74087
74096
|
}
|
|
74088
|
-
return _(...n.arguments.map((A) =>
|
|
74097
|
+
return _(...n.arguments.map((A) => or(this, lr).call(this, A, o)));
|
|
74089
74098
|
case "ConditionalExpression":
|
|
74090
|
-
return
|
|
74099
|
+
return or(this, lr).call(this, n.test, o) ? or(this, lr).call(this, n.consequent, o) : or(this, lr).call(this, n.alternate, o);
|
|
74091
74100
|
case "ExpressionStatement":
|
|
74092
|
-
return
|
|
74101
|
+
return or(this, lr).call(this, n.expression, o);
|
|
74093
74102
|
case "Identifier":
|
|
74094
74103
|
return n.name === "Infinity" ? 1 / 0 : n.name === "-Infinity" ? -1 / 0 : n.name === "NaN" ? NaN : o && n.name in o ? handleNaN(o[n.name]) : handleNaN((this.props.bindings || {})[n.name]);
|
|
74095
74104
|
case "Literal":
|
|
74096
74105
|
return n.value;
|
|
74097
74106
|
case "LogicalExpression":
|
|
74098
|
-
const C =
|
|
74099
|
-
return n.operator === "||" && C ? C : n.operator === "&&" && C || n.operator === "||" && !C ?
|
|
74107
|
+
const C = or(this, lr).call(this, n.left, o);
|
|
74108
|
+
return n.operator === "||" && C ? C : n.operator === "&&" && C || n.operator === "||" && !C ? or(this, lr).call(this, n.right, o) : !1;
|
|
74100
74109
|
case "MemberExpression":
|
|
74101
|
-
return
|
|
74110
|
+
return or(this, mn).call(this, n, o);
|
|
74102
74111
|
case "ChainExpression":
|
|
74103
|
-
return
|
|
74112
|
+
return or(this, pn).call(this, n, o);
|
|
74104
74113
|
case "ObjectExpression":
|
|
74105
74114
|
const E = {};
|
|
74106
74115
|
return n.properties.forEach((A) => {
|
|
74107
|
-
E[A.key.name || A.key.value] =
|
|
74116
|
+
E[A.key.name || A.key.value] = or(this, lr).call(this, A.value, o);
|
|
74108
74117
|
}), E;
|
|
74109
74118
|
case "TemplateElement":
|
|
74110
74119
|
return n.value.cooked;
|
|
74111
74120
|
case "TemplateLiteral":
|
|
74112
|
-
return [...n.expressions, ...n.quasis].sort((A, M) => A.start < M.start ? -1 : 1).map((A) =>
|
|
74121
|
+
return [...n.expressions, ...n.quasis].sort((A, M) => A.start < M.start ? -1 : 1).map((A) => or(this, lr).call(this, A, o)).join("");
|
|
74113
74122
|
case "UnaryExpression":
|
|
74114
|
-
const R =
|
|
74123
|
+
const R = or(this, lr).call(this, n.argument, o);
|
|
74115
74124
|
switch (n.operator) {
|
|
74116
74125
|
case "+":
|
|
74117
74126
|
return +R;
|
|
@@ -74126,7 +74135,7 @@ class JsxParser extends React__default.Component {
|
|
|
74126
74135
|
const M = { ...o };
|
|
74127
74136
|
return n.params.forEach((I, O) => {
|
|
74128
74137
|
M[I.name] = A[O];
|
|
74129
|
-
}),
|
|
74138
|
+
}), or(this, lr).call(this, n.body, M);
|
|
74130
74139
|
};
|
|
74131
74140
|
default:
|
|
74132
74141
|
this.props.onError(new Error(`The expression type '${n.type}' is not supported.`));
|
|
@@ -74135,7 +74144,7 @@ class JsxParser extends React__default.Component {
|
|
|
74135
74144
|
});
|
|
74136
74145
|
Hr(this, pn, (n, o) => {
|
|
74137
74146
|
try {
|
|
74138
|
-
return
|
|
74147
|
+
return or(this, lr).call(this, n.expression, o);
|
|
74139
74148
|
} catch (l) {
|
|
74140
74149
|
if (l instanceof NullishShortCircuit)
|
|
74141
74150
|
return;
|
|
@@ -74143,10 +74152,10 @@ class JsxParser extends React__default.Component {
|
|
|
74143
74152
|
}
|
|
74144
74153
|
});
|
|
74145
74154
|
Hr(this, mn, (n, o) => {
|
|
74146
|
-
const l =
|
|
74155
|
+
const l = or(this, lr).call(this, n.object, o);
|
|
74147
74156
|
let d;
|
|
74148
74157
|
if (n.computed)
|
|
74149
|
-
d =
|
|
74158
|
+
d = or(this, lr).call(this, n.property, o);
|
|
74150
74159
|
else if (n.property.type === "Identifier")
|
|
74151
74160
|
d = n.property.name;
|
|
74152
74161
|
else {
|
|
@@ -74164,11 +74173,11 @@ class JsxParser extends React__default.Component {
|
|
|
74164
74173
|
}
|
|
74165
74174
|
return typeof f == "function" ? f.bind(l) : f;
|
|
74166
74175
|
});
|
|
74167
|
-
Hr(this, Yr, (n) => n.type === "JSXIdentifier" ? n.name : `${
|
|
74176
|
+
Hr(this, Yr, (n) => n.type === "JSXIdentifier" ? n.name : `${or(this, Yr).call(this, n.object)}.${or(this, Yr).call(this, n.property)}`);
|
|
74168
74177
|
Hr(this, rn, (n, o) => {
|
|
74169
|
-
const { allowUnknownElements: l, components: d, componentsOnly: f, onError: g } = this.props, { children: b = [] } = n, S = n.type === "JSXElement" ? n.openingElement : n.openingFragment, { attributes: _ = [] } = S, C = n.type === "JSXElement" ?
|
|
74178
|
+
const { allowUnknownElements: l, components: d, componentsOnly: f, onError: g } = this.props, { children: b = [] } = n, S = n.type === "JSXElement" ? n.openingElement : n.openingFragment, { attributes: _ = [] } = S, C = n.type === "JSXElement" ? or(this, Yr).call(this, S.name) : "", E = (this.props.blacklistedAttrs || []).map((z) => z instanceof RegExp ? z : new RegExp(z, "i")), R = (this.props.blacklistedTags || []).map((z) => z.trim().toLowerCase()).filter(Boolean);
|
|
74170
74179
|
if (/^(html|head|body)$/i.test(C))
|
|
74171
|
-
return b.map((z) =>
|
|
74180
|
+
return b.map((z) => or(this, rn).call(this, z, o));
|
|
74172
74181
|
const A = C.trim().toLowerCase();
|
|
74173
74182
|
if (R.indexOf(A) !== -1)
|
|
74174
74183
|
return g(new Error(`The tag <${C}> is blacklisted, and will not be rendered.`)), null;
|
|
@@ -74180,7 +74189,7 @@ class JsxParser extends React__default.Component {
|
|
|
74180
74189
|
}
|
|
74181
74190
|
let M, I = n.type === "JSXElement" ? resolvePath(d, C) : Fragment$2;
|
|
74182
74191
|
if (I || canHaveChildren(C)) {
|
|
74183
|
-
if (M = b.map((Q) =>
|
|
74192
|
+
if (M = b.map((Q) => or(this, lr).call(this, Q, o)), C.includes(".")) {
|
|
74184
74193
|
const j = C.split(".").reduce((F, te) => F ? F[te] : d == null ? void 0 : d[te], null);
|
|
74185
74194
|
j && (I = j);
|
|
74186
74195
|
}
|
|
@@ -74193,10 +74202,10 @@ class JsxParser extends React__default.Component {
|
|
|
74193
74202
|
};
|
|
74194
74203
|
_.forEach((z) => {
|
|
74195
74204
|
if (z.type === "JSXAttribute") {
|
|
74196
|
-
const Q = z.name.name, j = attributeNames_default[Q] || Q, F =
|
|
74205
|
+
const Q = z.name.name, j = attributeNames_default[Q] || Q, F = or(this, lr).call(this, z, o);
|
|
74197
74206
|
E.filter((ne) => ne.test(j)).length === 0 && (O[j] = F);
|
|
74198
74207
|
} else if (z.type === "JSXSpreadAttribute" && z.argument.type === "Identifier" || z.argument.type === "MemberExpression") {
|
|
74199
|
-
const Q =
|
|
74208
|
+
const Q = or(this, lr).call(this, z.argument, o);
|
|
74200
74209
|
typeof Q == "object" && Object.keys(Q).forEach((j) => {
|
|
74201
74210
|
const F = attributeNames_default[j] || j;
|
|
74202
74211
|
E.filter((ne) => ne.test(F)).length === 0 && (O[F] = Q[j]);
|
|
@@ -74209,14 +74218,14 @@ class JsxParser extends React__default.Component {
|
|
|
74209
74218
|
}
|
|
74210
74219
|
render() {
|
|
74211
74220
|
const n = (this.props.jsx || "").trim().replace(/<!DOCTYPE([^>]*)>/g, "");
|
|
74212
|
-
this.ParsedChildren =
|
|
74221
|
+
this.ParsedChildren = or(this, hn).call(this, n);
|
|
74213
74222
|
const o = [.../* @__PURE__ */ new Set(["jsx-parser", ...String(this.props.className).split(" ")])].filter(Boolean).join(" ");
|
|
74214
74223
|
return this.props.renderInWrapper ? /* @__PURE__ */ React__default.createElement("div", {
|
|
74215
74224
|
className: o
|
|
74216
74225
|
}, this.ParsedChildren) : this.ParsedChildren;
|
|
74217
74226
|
}
|
|
74218
74227
|
}
|
|
74219
|
-
hn = new WeakMap(), lr = new WeakMap(), pn = new WeakMap(), mn = new WeakMap(), Yr = new WeakMap(), rn = new WeakMap(),
|
|
74228
|
+
hn = new WeakMap(), lr = new WeakMap(), pn = new WeakMap(), mn = new WeakMap(), Yr = new WeakMap(), rn = new WeakMap(), rr(JsxParser, "displayName", "JsxParser"), rr(JsxParser, "defaultProps", {
|
|
74220
74229
|
allowUnknownElements: !0,
|
|
74221
74230
|
autoCloseVoidElements: !1,
|
|
74222
74231
|
bindings: {},
|
|
@@ -93264,7 +93273,7 @@ const generateUniqueID = () => (uniqueID += 1, `reactgooglegraph-${uniqueID}`),
|
|
|
93264
93273
|
/**
|
|
93265
93274
|
* Initialize the controls once chart is ready
|
|
93266
93275
|
*/
|
|
93267
|
-
|
|
93276
|
+
rr(Or, "initializeControls", (e) => {
|
|
93268
93277
|
for (let n = 0; n < e.length; n += 1) {
|
|
93269
93278
|
const { controlType: o, options: l, controlWrapperParams: d } = e[n].controlProp;
|
|
93270
93279
|
d && "state" in d && e[n].control.setState(d.state), e[n].control.setOptions(l), e[n].control.setControlType(o);
|
|
@@ -93272,7 +93281,7 @@ er(Or, "initializeControls", (e) => {
|
|
|
93272
93281
|
}), /**
|
|
93273
93282
|
* listen to the control events (ready, statechange, error) specified in the controlEvents prop
|
|
93274
93283
|
*/
|
|
93275
|
-
|
|
93284
|
+
rr(Or, "listenToControlEvents", (e, n) => {
|
|
93276
93285
|
const { google: o } = n;
|
|
93277
93286
|
return e.flatMap((l) => {
|
|
93278
93287
|
const { control: d, controlProp: f } = l, { controlEvents: g = [] } = f;
|
|
@@ -93294,13 +93303,13 @@ er(Or, "listenToControlEvents", (e, n) => {
|
|
|
93294
93303
|
}), /**
|
|
93295
93304
|
* If controlID is not provided, generate a unique controlID
|
|
93296
93305
|
*/
|
|
93297
|
-
|
|
93306
|
+
rr(Or, "createControlId", (e) => {
|
|
93298
93307
|
let n;
|
|
93299
93308
|
return typeof e > "u" ? n = `googlechart-control-${generateUniqueID()}` : n = e, n;
|
|
93300
93309
|
}), /**
|
|
93301
93310
|
* Map the control props to Google Chart Controls
|
|
93302
93311
|
*/
|
|
93303
|
-
|
|
93312
|
+
rr(Or, "createChartControls", (e) => {
|
|
93304
93313
|
const { controls: n, google: o } = e;
|
|
93305
93314
|
return n ? n.map((l, d) => {
|
|
93306
93315
|
const { controlID: f, controlType: g, options: b, controlWrapperParams: S } = l, _ = Or.createControlId(f);
|
|
@@ -93314,7 +93323,7 @@ er(Or, "createChartControls", (e) => {
|
|
|
93314
93323
|
})
|
|
93315
93324
|
};
|
|
93316
93325
|
}) : null;
|
|
93317
|
-
}),
|
|
93326
|
+
}), rr(Or, "addControls", (e) => {
|
|
93318
93327
|
const { chartWrapper: n, chartDashboard: o } = e, l = Or.createChartControls(e);
|
|
93319
93328
|
return !l || !o || !n ? null : (o.bind(l.map((d) => {
|
|
93320
93329
|
let { control: f } = d;
|
|
@@ -93408,7 +93417,7 @@ const useCreateChartControls = (t) => {
|
|
|
93408
93417
|
});
|
|
93409
93418
|
}, GRAY_COLOR = "#CCCCCC", Ir = class Ir {
|
|
93410
93419
|
};
|
|
93411
|
-
|
|
93420
|
+
rr(Ir, "grayOutHiddenColumnsLabel", (e, n) => {
|
|
93412
93421
|
const { googleChartWrapper: o, options: l } = e;
|
|
93413
93422
|
if (!o) {
|
|
93414
93423
|
console.error("googleChartWrapper is not defined");
|
|
@@ -93432,7 +93441,7 @@ er(Ir, "grayOutHiddenColumnsLabel", (e, n) => {
|
|
|
93432
93441
|
* Listens to user clicking on the legend to toggle the visibility of a column.
|
|
93433
93442
|
* When a user clicks on a legend item, the column id is added to / removed from the hiddenColumns state.
|
|
93434
93443
|
*/
|
|
93435
|
-
|
|
93444
|
+
rr(Ir, "listenToLegendToggle", (e, n) => {
|
|
93436
93445
|
const [o, l] = n, { google: d, googleChartWrapper: f } = e;
|
|
93437
93446
|
if (!f) {
|
|
93438
93447
|
console.error("googleChartWrapper is not defined");
|
|
@@ -93454,7 +93463,7 @@ er(Ir, "listenToLegendToggle", (e, n) => {
|
|
|
93454
93463
|
}), /**
|
|
93455
93464
|
* (Re-)Draw a Google Chart with the given data, options, and chart type.
|
|
93456
93465
|
*/
|
|
93457
|
-
|
|
93466
|
+
rr(Ir, "draw", async (e) => {
|
|
93458
93467
|
const { data: n, diffdata: o, rows: l, columns: d, options: f, chartType: g, formatters: b, spreadSheetUrl: S, spreadSheetQueryParameters: _, googleChartDashboard: C, googleChartWrapper: E, google: R, hiddenColumns: A, legendToggle: M, legend_toggle: I } = e;
|
|
93459
93468
|
if (!E) {
|
|
93460
93469
|
console.error("draw was called with googleChartWrapper = null");
|
|
@@ -93488,10 +93497,10 @@ er(Ir, "draw", async (e) => {
|
|
|
93488
93497
|
* Get the column ID of a column in a GoogleDataTable.
|
|
93489
93498
|
* If the column has an ID, return the ID, otherwise return the label.
|
|
93490
93499
|
*/
|
|
93491
|
-
|
|
93500
|
+
rr(Ir, "getColumnId", (e, n) => e.getColumnId(n) || e.getColumnLabel(n)), /**
|
|
93492
93501
|
* Apply Chart Formatters passed under the formatters prop to the GoogleDataTable
|
|
93493
93502
|
*/
|
|
93494
|
-
|
|
93503
|
+
rr(Ir, "applyFormatters", (e) => {
|
|
93495
93504
|
let { dataTable: n, formatters: o, google: l } = e;
|
|
93496
93505
|
for (let d of o)
|
|
93497
93506
|
switch (d.type) {
|