vue-layout-gitcode 1.9.70 → 1.9.71
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/{GloabarSearch-CMasCO54.js → GloabarSearch-CEkNjbFh.js} +3 -3
- package/{MenuItem-DT80cDkE.js → MenuItem-BW-RKfni.js} +1 -1
- package/{ProjectMenuList-CxZpYg6t.js → ProjectMenuList-B4xsh-YN.js} +2 -2
- package/{ProjectMenuListV2-CPX2ENzi.js → ProjectMenuListV2-DphiQXSk.js} +2 -2
- package/{ProjectSearch-fbhOUw3r.js → ProjectSearch-CP5f2uzQ.js} +1 -1
- package/{SearchHistoryList-eRyE6IJy.js → SearchHistoryList-DsrmcbM0.js} +1 -1
- package/{SearchPrefixTag-CjwjKtxw.js → SearchPrefixTag-tKXyTB5i.js} +1 -1
- package/{SearchRecommed-BC6pQ6Zt.js → SearchRecommed-FMF216bj.js} +2 -2
- package/{SearchScopeList-rtCteBn2.js → SearchScopeList-DQIY50Dz.js} +1 -1
- package/{UserSearch-CEFSvB9w.js → UserSearch-CafkeCZN.js} +1 -1
- package/{index-Ce7E58Ei.js → index-B3UFg393.js} +2 -2
- package/{index-DTcdp2D1.js → index-D4eGNb4j.js} +1 -1
- package/{index-BQfk_s6b.js → index-DwqwoFOY.js} +435 -307
- package/{index-CWhGYEY3.js → index-eKuz_K7l.js} +1 -1
- package/index.d.ts +8 -8
- package/index.js +1 -1
- package/{notice-BRZH1mKv.js → notice-DRDO7WND.js} +1 -1
- package/package.json +2 -2
- package/{transWebUrl-BG_F10BD.js → transWebUrl-De6tTQPS.js} +1 -1
|
@@ -546,7 +546,7 @@ const LOGO_MAP = {
|
|
|
546
546
|
aiLogoDark: "https://cdn-static.gitcode.com/static/images/gitcode-ai-logo-dark_atomgit.png"
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
/*! @license DOMPurify 3.
|
|
549
|
+
/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
|
|
550
550
|
const {
|
|
551
551
|
entries,
|
|
552
552
|
setPrototypeOf,
|
|
@@ -574,12 +574,18 @@ if (!seal) {
|
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
if (!apply$1) {
|
|
577
|
-
apply$1 = function apply2(
|
|
578
|
-
|
|
577
|
+
apply$1 = function apply2(func, thisArg) {
|
|
578
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
579
|
+
args[_key - 2] = arguments[_key];
|
|
580
|
+
}
|
|
581
|
+
return func.apply(thisArg, args);
|
|
579
582
|
};
|
|
580
583
|
}
|
|
581
584
|
if (!construct) {
|
|
582
|
-
construct = function construct2(Func
|
|
585
|
+
construct = function construct2(Func) {
|
|
586
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
587
|
+
args[_key2 - 1] = arguments[_key2];
|
|
588
|
+
}
|
|
583
589
|
return new Func(...args);
|
|
584
590
|
};
|
|
585
591
|
}
|
|
@@ -602,18 +608,18 @@ function unapply(func) {
|
|
|
602
608
|
if (thisArg instanceof RegExp) {
|
|
603
609
|
thisArg.lastIndex = 0;
|
|
604
610
|
}
|
|
605
|
-
for (var
|
|
606
|
-
args[
|
|
611
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
612
|
+
args[_key3 - 1] = arguments[_key3];
|
|
607
613
|
}
|
|
608
614
|
return apply$1(func, thisArg, args);
|
|
609
615
|
};
|
|
610
616
|
}
|
|
611
|
-
function unconstruct(
|
|
617
|
+
function unconstruct(Func) {
|
|
612
618
|
return function() {
|
|
613
|
-
for (var
|
|
614
|
-
args[
|
|
619
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
620
|
+
args[_key4] = arguments[_key4];
|
|
615
621
|
}
|
|
616
|
-
return construct(
|
|
622
|
+
return construct(Func, args);
|
|
617
623
|
};
|
|
618
624
|
}
|
|
619
625
|
function addToSet(set, array) {
|
|
@@ -680,15 +686,15 @@ function lookupGetter(object, prop) {
|
|
|
680
686
|
}
|
|
681
687
|
return fallbackValue;
|
|
682
688
|
}
|
|
683
|
-
const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
684
|
-
const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
689
|
+
const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
690
|
+
const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
685
691
|
const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
686
692
|
const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
|
|
687
693
|
const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
688
694
|
const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
689
695
|
const text = freeze(["#text"]);
|
|
690
|
-
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
|
|
691
|
-
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
696
|
+
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
|
|
697
|
+
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
692
698
|
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
693
699
|
const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
694
700
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
@@ -697,7 +703,7 @@ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
|
|
|
697
703
|
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
|
|
698
704
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
|
|
699
705
|
const IS_ALLOWED_URI = seal(
|
|
700
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
706
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
701
707
|
// eslint-disable-line no-useless-escape
|
|
702
708
|
);
|
|
703
709
|
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
@@ -771,7 +777,7 @@ const _createHooksMap = function _createHooksMap2() {
|
|
|
771
777
|
function createDOMPurify() {
|
|
772
778
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
773
779
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
774
|
-
DOMPurify.version = "3.
|
|
780
|
+
DOMPurify.version = "3.3.0";
|
|
775
781
|
DOMPurify.removed = [];
|
|
776
782
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
777
783
|
DOMPurify.isSupported = false;
|
|
@@ -857,6 +863,20 @@ function createDOMPurify() {
|
|
|
857
863
|
}));
|
|
858
864
|
let FORBID_TAGS = null;
|
|
859
865
|
let FORBID_ATTR = null;
|
|
866
|
+
const EXTRA_ELEMENT_HANDLING = Object.seal(create$1(null, {
|
|
867
|
+
tagCheck: {
|
|
868
|
+
writable: true,
|
|
869
|
+
configurable: false,
|
|
870
|
+
enumerable: true,
|
|
871
|
+
value: null
|
|
872
|
+
},
|
|
873
|
+
attributeCheck: {
|
|
874
|
+
writable: true,
|
|
875
|
+
configurable: false,
|
|
876
|
+
enumerable: true,
|
|
877
|
+
value: null
|
|
878
|
+
}
|
|
879
|
+
}));
|
|
860
880
|
let ALLOW_ARIA_ATTR = true;
|
|
861
881
|
let ALLOW_DATA_ATTR = true;
|
|
862
882
|
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
@@ -918,8 +938,8 @@ function createDOMPurify() {
|
|
|
918
938
|
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
919
939
|
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
920
940
|
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
921
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
|
922
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
|
941
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
942
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
923
943
|
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
924
944
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
925
945
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
@@ -980,16 +1000,24 @@ function createDOMPurify() {
|
|
|
980
1000
|
}
|
|
981
1001
|
}
|
|
982
1002
|
if (cfg.ADD_TAGS) {
|
|
983
|
-
if (
|
|
984
|
-
|
|
1003
|
+
if (typeof cfg.ADD_TAGS === "function") {
|
|
1004
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
1005
|
+
} else {
|
|
1006
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
1007
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
1008
|
+
}
|
|
1009
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
985
1010
|
}
|
|
986
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
987
1011
|
}
|
|
988
1012
|
if (cfg.ADD_ATTR) {
|
|
989
|
-
if (
|
|
990
|
-
|
|
1013
|
+
if (typeof cfg.ADD_ATTR === "function") {
|
|
1014
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
1015
|
+
} else {
|
|
1016
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
1017
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
1018
|
+
}
|
|
1019
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
991
1020
|
}
|
|
992
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
993
1021
|
}
|
|
994
1022
|
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
995
1023
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
@@ -1183,7 +1211,7 @@ function createDOMPurify() {
|
|
|
1183
1211
|
tagName,
|
|
1184
1212
|
allowedTags: ALLOWED_TAGS
|
|
1185
1213
|
});
|
|
1186
|
-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
1214
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
1187
1215
|
_forceRemove(currentNode);
|
|
1188
1216
|
return true;
|
|
1189
1217
|
}
|
|
@@ -1195,7 +1223,7 @@ function createDOMPurify() {
|
|
|
1195
1223
|
_forceRemove(currentNode);
|
|
1196
1224
|
return true;
|
|
1197
1225
|
}
|
|
1198
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
1226
|
+
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
|
|
1199
1227
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1200
1228
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1201
1229
|
return false;
|
|
@@ -1248,12 +1276,13 @@ function createDOMPurify() {
|
|
|
1248
1276
|
}
|
|
1249
1277
|
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
|
|
1250
1278
|
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
|
|
1279
|
+
else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ;
|
|
1251
1280
|
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
1252
1281
|
if (
|
|
1253
1282
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1254
1283
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1255
1284
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1256
|
-
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1285
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1257
1286
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1258
1287
|
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
|
|
1259
1288
|
) ;
|
|
@@ -1296,7 +1325,8 @@ function createDOMPurify() {
|
|
|
1296
1325
|
value: attrValue
|
|
1297
1326
|
} = attr;
|
|
1298
1327
|
const lcName = transformCaseFunc(name);
|
|
1299
|
-
|
|
1328
|
+
const initValue = attrValue;
|
|
1329
|
+
let value = name === "value" ? initValue : stringTrim(initValue);
|
|
1300
1330
|
hookEvent.attrName = lcName;
|
|
1301
1331
|
hookEvent.attrValue = value;
|
|
1302
1332
|
hookEvent.keepAttr = true;
|
|
@@ -1307,15 +1337,19 @@ function createDOMPurify() {
|
|
|
1307
1337
|
_removeAttribute(name, currentNode);
|
|
1308
1338
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
1309
1339
|
}
|
|
1310
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
1340
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
|
|
1341
|
+
_removeAttribute(name, currentNode);
|
|
1342
|
+
continue;
|
|
1343
|
+
}
|
|
1344
|
+
if (lcName === "attributename" && stringMatch(value, "href")) {
|
|
1311
1345
|
_removeAttribute(name, currentNode);
|
|
1312
1346
|
continue;
|
|
1313
1347
|
}
|
|
1314
1348
|
if (hookEvent.forceKeepAttr) {
|
|
1315
1349
|
continue;
|
|
1316
1350
|
}
|
|
1317
|
-
_removeAttribute(name, currentNode);
|
|
1318
1351
|
if (!hookEvent.keepAttr) {
|
|
1352
|
+
_removeAttribute(name, currentNode);
|
|
1319
1353
|
continue;
|
|
1320
1354
|
}
|
|
1321
1355
|
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
|
@@ -1329,6 +1363,7 @@ function createDOMPurify() {
|
|
|
1329
1363
|
}
|
|
1330
1364
|
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1331
1365
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
1366
|
+
_removeAttribute(name, currentNode);
|
|
1332
1367
|
continue;
|
|
1333
1368
|
}
|
|
1334
1369
|
if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
|
|
@@ -1346,18 +1381,21 @@ function createDOMPurify() {
|
|
|
1346
1381
|
}
|
|
1347
1382
|
}
|
|
1348
1383
|
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1384
|
+
if (value !== initValue) {
|
|
1385
|
+
try {
|
|
1386
|
+
if (namespaceURI) {
|
|
1387
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1388
|
+
} else {
|
|
1389
|
+
currentNode.setAttribute(name, value);
|
|
1390
|
+
}
|
|
1391
|
+
if (_isClobbered(currentNode)) {
|
|
1392
|
+
_forceRemove(currentNode);
|
|
1393
|
+
} else {
|
|
1394
|
+
arrayPop(DOMPurify.removed);
|
|
1395
|
+
}
|
|
1396
|
+
} catch (_) {
|
|
1397
|
+
_removeAttribute(name, currentNode);
|
|
1359
1398
|
}
|
|
1360
|
-
} catch (_) {
|
|
1361
1399
|
}
|
|
1362
1400
|
}
|
|
1363
1401
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
@@ -1670,7 +1708,7 @@ const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g,
|
|
|
1670
1708
|
const isNumber$1 = (val) => typeof val === "number" && isFinite(val);
|
|
1671
1709
|
const isDate$1 = (val) => toTypeString(val) === "[object Date]";
|
|
1672
1710
|
const isRegExp$1 = (val) => toTypeString(val) === "[object RegExp]";
|
|
1673
|
-
const isEmptyObject = (val) => isPlainObject$1(val) && Object.keys(val).length === 0;
|
|
1711
|
+
const isEmptyObject$1 = (val) => isPlainObject$1(val) && Object.keys(val).length === 0;
|
|
1674
1712
|
const assign$1 = Object.assign;
|
|
1675
1713
|
const _create = Object.create;
|
|
1676
1714
|
const create = (obj = null) => _create(obj);
|
|
@@ -1686,12 +1724,12 @@ function hasOwn(obj, key) {
|
|
|
1686
1724
|
return hasOwnProperty$1.call(obj, key);
|
|
1687
1725
|
}
|
|
1688
1726
|
const isArray$1 = Array.isArray;
|
|
1689
|
-
const isFunction$
|
|
1727
|
+
const isFunction$2 = (val) => typeof val === "function";
|
|
1690
1728
|
const isString$2 = (val) => typeof val === "string";
|
|
1691
1729
|
const isBoolean$1 = (val) => typeof val === "boolean";
|
|
1692
1730
|
const isObject$3 = (val) => val !== null && typeof val === "object";
|
|
1693
1731
|
const isPromise = (val) => {
|
|
1694
|
-
return isObject$3(val) && isFunction$
|
|
1732
|
+
return isObject$3(val) && isFunction$2(val.then) && isFunction$2(val.catch);
|
|
1695
1733
|
};
|
|
1696
1734
|
const objectToString = Object.prototype.toString;
|
|
1697
1735
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -3798,7 +3836,7 @@ function resolveValue$1(obj, path) {
|
|
|
3798
3836
|
if (val === void 0) {
|
|
3799
3837
|
return null;
|
|
3800
3838
|
}
|
|
3801
|
-
if (isFunction$
|
|
3839
|
+
if (isFunction$2(last)) {
|
|
3802
3840
|
return null;
|
|
3803
3841
|
}
|
|
3804
3842
|
last = val;
|
|
@@ -3833,8 +3871,8 @@ function normalizeNamed(pluralIndex, props) {
|
|
|
3833
3871
|
function createMessageContext(options = {}) {
|
|
3834
3872
|
const locale2 = options.locale;
|
|
3835
3873
|
const pluralIndex = getPluralIndex(options);
|
|
3836
|
-
const pluralRule = isObject$3(options.pluralRules) && isString$2(locale2) && isFunction$
|
|
3837
|
-
const orgPluralRule = isObject$3(options.pluralRules) && isString$2(locale2) && isFunction$
|
|
3874
|
+
const pluralRule = isObject$3(options.pluralRules) && isString$2(locale2) && isFunction$2(options.pluralRules[locale2]) ? options.pluralRules[locale2] : pluralDefault;
|
|
3875
|
+
const orgPluralRule = isObject$3(options.pluralRules) && isString$2(locale2) && isFunction$2(options.pluralRules[locale2]) ? pluralDefault : void 0;
|
|
3838
3876
|
const plural = (messages) => {
|
|
3839
3877
|
return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
|
|
3840
3878
|
};
|
|
@@ -3844,12 +3882,12 @@ function createMessageContext(options = {}) {
|
|
|
3844
3882
|
isNumber$1(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
|
|
3845
3883
|
const named = (key) => _named[key];
|
|
3846
3884
|
function message(key) {
|
|
3847
|
-
const msg = isFunction$
|
|
3885
|
+
const msg = isFunction$2(options.messages) ? options.messages(key) : isObject$3(options.messages) ? options.messages[key] : false;
|
|
3848
3886
|
return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
|
|
3849
3887
|
}
|
|
3850
3888
|
const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
|
|
3851
|
-
const normalize = isPlainObject$1(options.processor) && isFunction$
|
|
3852
|
-
const interpolate = isPlainObject$1(options.processor) && isFunction$
|
|
3889
|
+
const normalize = isPlainObject$1(options.processor) && isFunction$2(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
|
|
3890
|
+
const interpolate = isPlainObject$1(options.processor) && isFunction$2(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
|
|
3853
3891
|
const type = isPlainObject$1(options.processor) && isString$2(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
|
|
3854
3892
|
const linked = (key, ...args) => {
|
|
3855
3893
|
const [arg1, arg2] = args;
|
|
@@ -4008,7 +4046,7 @@ function resolveLocale(locale2) {
|
|
|
4008
4046
|
if (isString$2(locale2)) {
|
|
4009
4047
|
return locale2;
|
|
4010
4048
|
} else {
|
|
4011
|
-
if (isFunction$
|
|
4049
|
+
if (isFunction$2(locale2)) {
|
|
4012
4050
|
if (locale2.resolvedOnce && _resolveLocale != null) {
|
|
4013
4051
|
return _resolveLocale;
|
|
4014
4052
|
} else if (locale2.constructor.name === "Function") {
|
|
@@ -4130,31 +4168,31 @@ const setFallbackContext = (context) => {
|
|
|
4130
4168
|
const getFallbackContext = () => _fallbackContext;
|
|
4131
4169
|
let _cid = 0;
|
|
4132
4170
|
function createCoreContext(options = {}) {
|
|
4133
|
-
const onWarn = isFunction$
|
|
4171
|
+
const onWarn = isFunction$2(options.onWarn) ? options.onWarn : warn;
|
|
4134
4172
|
const version = isString$2(options.version) ? options.version : VERSION$3;
|
|
4135
|
-
const locale2 = isString$2(options.locale) || isFunction$
|
|
4136
|
-
const _locale = isFunction$
|
|
4173
|
+
const locale2 = isString$2(options.locale) || isFunction$2(options.locale) ? options.locale : DEFAULT_LOCALE;
|
|
4174
|
+
const _locale = isFunction$2(locale2) ? DEFAULT_LOCALE : locale2;
|
|
4137
4175
|
const fallbackLocale = isArray$1(options.fallbackLocale) || isPlainObject$1(options.fallbackLocale) || isString$2(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale;
|
|
4138
4176
|
const messages = isPlainObject$1(options.messages) ? options.messages : createResources(_locale);
|
|
4139
4177
|
const datetimeFormats = isPlainObject$1(options.datetimeFormats) ? options.datetimeFormats : createResources(_locale);
|
|
4140
4178
|
const numberFormats = isPlainObject$1(options.numberFormats) ? options.numberFormats : createResources(_locale);
|
|
4141
4179
|
const modifiers = assign$1(create(), options.modifiers, getDefaultLinkedModifiers());
|
|
4142
4180
|
const pluralRules = options.pluralRules || create();
|
|
4143
|
-
const missing = isFunction$
|
|
4181
|
+
const missing = isFunction$2(options.missing) ? options.missing : null;
|
|
4144
4182
|
const missingWarn = isBoolean$1(options.missingWarn) || isRegExp$1(options.missingWarn) ? options.missingWarn : true;
|
|
4145
4183
|
const fallbackWarn = isBoolean$1(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
4146
4184
|
const fallbackFormat = !!options.fallbackFormat;
|
|
4147
4185
|
const unresolving = !!options.unresolving;
|
|
4148
|
-
const postTranslation = isFunction$
|
|
4186
|
+
const postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : null;
|
|
4149
4187
|
const processor = isPlainObject$1(options.processor) ? options.processor : null;
|
|
4150
4188
|
const warnHtmlMessage = isBoolean$1(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
4151
4189
|
const escapeParameter = !!options.escapeParameter;
|
|
4152
|
-
const messageCompiler = isFunction$
|
|
4153
|
-
if (process.env.NODE_ENV !== "production" && true && true && isFunction$
|
|
4190
|
+
const messageCompiler = isFunction$2(options.messageCompiler) ? options.messageCompiler : _compiler;
|
|
4191
|
+
if (process.env.NODE_ENV !== "production" && true && true && isFunction$2(options.messageCompiler)) {
|
|
4154
4192
|
warnOnce(getWarnMessage$1(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
4155
4193
|
}
|
|
4156
|
-
const messageResolver = isFunction$
|
|
4157
|
-
const localeFallbacker = isFunction$
|
|
4194
|
+
const messageResolver = isFunction$2(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue;
|
|
4195
|
+
const localeFallbacker = isFunction$2(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple;
|
|
4158
4196
|
const fallbackContext = isObject$3(options.fallbackContext) ? options.fallbackContext : void 0;
|
|
4159
4197
|
const internalOptions = options;
|
|
4160
4198
|
const __datetimeFormatters = isObject$3(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
|
|
@@ -4472,7 +4510,7 @@ function compile(message, context) {
|
|
|
4472
4510
|
}
|
|
4473
4511
|
}
|
|
4474
4512
|
const NOOP_MESSAGE_FUNCTION = () => "";
|
|
4475
|
-
const isMessageFunction = (val) => isFunction$
|
|
4513
|
+
const isMessageFunction = (val) => isFunction$2(val);
|
|
4476
4514
|
function translate(context, ...args) {
|
|
4477
4515
|
const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
|
|
4478
4516
|
const [key, options] = parseTranslateArgs(...args);
|
|
@@ -4704,7 +4742,7 @@ function parseTranslateArgs(...args) {
|
|
|
4704
4742
|
options.plural = arg2;
|
|
4705
4743
|
} else if (isString$2(arg2)) {
|
|
4706
4744
|
options.default = arg2;
|
|
4707
|
-
} else if (isPlainObject$1(arg2) && !isEmptyObject(arg2)) {
|
|
4745
|
+
} else if (isPlainObject$1(arg2) && !isEmptyObject$1(arg2)) {
|
|
4708
4746
|
options.named = arg2;
|
|
4709
4747
|
} else if (isArray$1(arg2)) {
|
|
4710
4748
|
options.list = arg2;
|
|
@@ -4861,7 +4899,7 @@ function datetime(context, ...args) {
|
|
|
4861
4899
|
return unresolving ? NOT_REOSLVED : key;
|
|
4862
4900
|
}
|
|
4863
4901
|
let id = `${targetLocale}__${key}`;
|
|
4864
|
-
if (!isEmptyObject(overrides)) {
|
|
4902
|
+
if (!isEmptyObject$1(overrides)) {
|
|
4865
4903
|
id = `${id}__${JSON.stringify(overrides)}`;
|
|
4866
4904
|
}
|
|
4867
4905
|
let formatter = __datetimeFormatters.get(id);
|
|
@@ -5009,7 +5047,7 @@ function number(context, ...args) {
|
|
|
5009
5047
|
return unresolving ? NOT_REOSLVED : key;
|
|
5010
5048
|
}
|
|
5011
5049
|
let id = `${targetLocale}__${key}`;
|
|
5012
|
-
if (!isEmptyObject(overrides)) {
|
|
5050
|
+
if (!isEmptyObject$1(overrides)) {
|
|
5013
5051
|
id = `${id}__${JSON.stringify(overrides)}`;
|
|
5014
5052
|
}
|
|
5015
5053
|
let formatter = __numberFormatters.get(id);
|
|
@@ -5516,9 +5554,9 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
5516
5554
|
let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean$1(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
5517
5555
|
let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean$1(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
5518
5556
|
let _fallbackFormat = !!options.fallbackFormat;
|
|
5519
|
-
let _missing = isFunction$
|
|
5520
|
-
let _runtimeMissing = isFunction$
|
|
5521
|
-
let _postTranslation = isFunction$
|
|
5557
|
+
let _missing = isFunction$2(options.missing) ? options.missing : null;
|
|
5558
|
+
let _runtimeMissing = isFunction$2(options.missing) ? defineCoreMissingHandler(options.missing) : null;
|
|
5559
|
+
let _postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : null;
|
|
5522
5560
|
let _warnHtmlMessage = __root ? __root.warnHtmlMessage : isBoolean$1(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
5523
5561
|
let _escapeParameter = !!options.escapeParameter;
|
|
5524
5562
|
const _modifiers = __root ? __root.modifiers : isPlainObject$1(options.modifiers) ? options.modifiers : {};
|
|
@@ -5588,7 +5626,7 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
5588
5626
|
const datetimeFormats = /* @__PURE__ */ computed(() => _datetimeFormats.value);
|
|
5589
5627
|
const numberFormats = /* @__PURE__ */ computed(() => _numberFormats.value);
|
|
5590
5628
|
function getPostTranslationHandler() {
|
|
5591
|
-
return isFunction$
|
|
5629
|
+
return isFunction$2(_postTranslation) ? _postTranslation : null;
|
|
5592
5630
|
}
|
|
5593
5631
|
function setPostTranslationHandler(handler) {
|
|
5594
5632
|
_postTranslation = handler;
|
|
@@ -5939,14 +5977,14 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
5939
5977
|
function convertComposerOptions(options) {
|
|
5940
5978
|
const locale2 = isString$2(options.locale) ? options.locale : DEFAULT_LOCALE;
|
|
5941
5979
|
const fallbackLocale = isString$2(options.fallbackLocale) || isArray$1(options.fallbackLocale) || isPlainObject$1(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
|
|
5942
|
-
const missing = isFunction$
|
|
5980
|
+
const missing = isFunction$2(options.missing) ? options.missing : void 0;
|
|
5943
5981
|
const missingWarn = isBoolean$1(options.silentTranslationWarn) || isRegExp$1(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
|
|
5944
5982
|
const fallbackWarn = isBoolean$1(options.silentFallbackWarn) || isRegExp$1(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
|
|
5945
5983
|
const fallbackRoot = isBoolean$1(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
5946
5984
|
const fallbackFormat = !!options.formatFallbackMessages;
|
|
5947
5985
|
const modifiers = isPlainObject$1(options.modifiers) ? options.modifiers : {};
|
|
5948
5986
|
const pluralizationRules = options.pluralizationRules;
|
|
5949
|
-
const postTranslation = isFunction$
|
|
5987
|
+
const postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : void 0;
|
|
5950
5988
|
const warnHtmlMessage = isString$2(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
|
|
5951
5989
|
const escapeParameter = !!options.escapeParameterHtml;
|
|
5952
5990
|
const inheritLocale = isBoolean$1(options.sync) ? options.sync : true;
|
|
@@ -6723,7 +6761,7 @@ function getLocaleMessageValue(messages) {
|
|
|
6723
6761
|
const value = {};
|
|
6724
6762
|
Object.keys(messages).forEach((key) => {
|
|
6725
6763
|
const v = messages[key];
|
|
6726
|
-
if (isFunction$
|
|
6764
|
+
if (isFunction$2(v) && "source" in v) {
|
|
6727
6765
|
value[key] = getMessageFunctionDetails(v);
|
|
6728
6766
|
} else if (isMessageAST(v) && v.loc && v.loc.source) {
|
|
6729
6767
|
value[key] = v.loc.source;
|
|
@@ -7191,7 +7229,7 @@ function getI18nInstance(instance) {
|
|
|
7191
7229
|
}
|
|
7192
7230
|
}
|
|
7193
7231
|
function getScope(options, componentOptions) {
|
|
7194
|
-
return isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
|
|
7232
|
+
return isEmptyObject$1(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
|
|
7195
7233
|
}
|
|
7196
7234
|
function getGlobalComposer(i18n2) {
|
|
7197
7235
|
return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
|
|
@@ -7283,8 +7321,8 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
7283
7321
|
const _fallbackWarn = isLocalScope ? root.fallbackWarn : isBoolean$1(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
7284
7322
|
const _fallbackRoot = isLocalScope ? root.fallbackRoot : isBoolean$1(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
7285
7323
|
const _fallbackFormat = !!options.fallbackFormat;
|
|
7286
|
-
const _missing = isFunction$
|
|
7287
|
-
const _postTranslation = isFunction$
|
|
7324
|
+
const _missing = isFunction$2(options.missing) ? options.missing : null;
|
|
7325
|
+
const _postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : null;
|
|
7288
7326
|
const _warnHtmlMessage = isLocalScope ? root.warnHtmlMessage : isBoolean$1(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
7289
7327
|
const _escapeParameter = !!options.escapeParameter;
|
|
7290
7328
|
const _modifiers = isLocalScope ? root.modifiers : isPlainObject$1(options.modifiers) ? options.modifiers : {};
|
|
@@ -8524,6 +8562,7 @@ function bind(fn, thisArg) {
|
|
|
8524
8562
|
}
|
|
8525
8563
|
const { toString } = Object.prototype;
|
|
8526
8564
|
const { getPrototypeOf } = Object;
|
|
8565
|
+
const { iterator, toStringTag } = Symbol;
|
|
8527
8566
|
const kindOf = /* @__PURE__ */ ((cache2) => (thing) => {
|
|
8528
8567
|
const str = toString.call(thing);
|
|
8529
8568
|
return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -8536,7 +8575,7 @@ const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
|
8536
8575
|
const { isArray } = Array;
|
|
8537
8576
|
const isUndefined$1 = typeOfTest("undefined");
|
|
8538
8577
|
function isBuffer(val) {
|
|
8539
|
-
return val !== null && !isUndefined$1(val) && val.constructor !== null && !isUndefined$1(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
8578
|
+
return val !== null && !isUndefined$1(val) && val.constructor !== null && !isUndefined$1(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
8540
8579
|
}
|
|
8541
8580
|
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
8542
8581
|
function isArrayBufferView(val) {
|
|
@@ -8549,7 +8588,7 @@ function isArrayBufferView(val) {
|
|
|
8549
8588
|
return result2;
|
|
8550
8589
|
}
|
|
8551
8590
|
const isString = typeOfTest("string");
|
|
8552
|
-
const isFunction = typeOfTest("function");
|
|
8591
|
+
const isFunction$1 = typeOfTest("function");
|
|
8553
8592
|
const isNumber = typeOfTest("number");
|
|
8554
8593
|
const isObject$1 = (thing) => thing !== null && typeof thing === "object";
|
|
8555
8594
|
const isBoolean = (thing) => thing === true || thing === false;
|
|
@@ -8558,17 +8597,27 @@ const isPlainObject = (val) => {
|
|
|
8558
8597
|
return false;
|
|
8559
8598
|
}
|
|
8560
8599
|
const prototype2 = getPrototypeOf(val);
|
|
8561
|
-
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(
|
|
8600
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
8601
|
+
};
|
|
8602
|
+
const isEmptyObject = (val) => {
|
|
8603
|
+
if (!isObject$1(val) || isBuffer(val)) {
|
|
8604
|
+
return false;
|
|
8605
|
+
}
|
|
8606
|
+
try {
|
|
8607
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
8608
|
+
} catch (e) {
|
|
8609
|
+
return false;
|
|
8610
|
+
}
|
|
8562
8611
|
};
|
|
8563
8612
|
const isDate = kindOfTest("Date");
|
|
8564
8613
|
const isFile = kindOfTest("File");
|
|
8565
8614
|
const isBlob = kindOfTest("Blob");
|
|
8566
8615
|
const isFileList = kindOfTest("FileList");
|
|
8567
|
-
const isStream = (val) => isObject$1(val) && isFunction(val.pipe);
|
|
8616
|
+
const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
|
|
8568
8617
|
const isFormData = (thing) => {
|
|
8569
8618
|
let kind;
|
|
8570
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
8571
|
-
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
8619
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
8620
|
+
kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
|
|
8572
8621
|
};
|
|
8573
8622
|
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
8574
8623
|
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
@@ -8587,6 +8636,9 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
8587
8636
|
fn.call(null, obj[i], i, obj);
|
|
8588
8637
|
}
|
|
8589
8638
|
} else {
|
|
8639
|
+
if (isBuffer(obj)) {
|
|
8640
|
+
return;
|
|
8641
|
+
}
|
|
8590
8642
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
8591
8643
|
const len = keys.length;
|
|
8592
8644
|
let key;
|
|
@@ -8597,6 +8649,9 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
8597
8649
|
}
|
|
8598
8650
|
}
|
|
8599
8651
|
function findKey(obj, key) {
|
|
8652
|
+
if (isBuffer(obj)) {
|
|
8653
|
+
return null;
|
|
8654
|
+
}
|
|
8600
8655
|
key = key.toLowerCase();
|
|
8601
8656
|
const keys = Object.keys(obj);
|
|
8602
8657
|
let i = keys.length;
|
|
@@ -8615,7 +8670,7 @@ const _global = (() => {
|
|
|
8615
8670
|
})();
|
|
8616
8671
|
const isContextDefined = (context) => !isUndefined$1(context) && context !== _global;
|
|
8617
8672
|
function merge() {
|
|
8618
|
-
const { caseless } = isContextDefined(this) && this || {};
|
|
8673
|
+
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
8619
8674
|
const result2 = {};
|
|
8620
8675
|
const assignValue = (val, key) => {
|
|
8621
8676
|
const targetKey = caseless && findKey(result2, key) || key;
|
|
@@ -8626,7 +8681,9 @@ function merge() {
|
|
|
8626
8681
|
} else if (isArray(val)) {
|
|
8627
8682
|
result2[targetKey] = val.slice();
|
|
8628
8683
|
} else {
|
|
8629
|
-
|
|
8684
|
+
if (!skipUndefined || !isUndefined$1(val)) {
|
|
8685
|
+
result2[targetKey] = val;
|
|
8686
|
+
}
|
|
8630
8687
|
}
|
|
8631
8688
|
};
|
|
8632
8689
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
@@ -8636,7 +8693,7 @@ function merge() {
|
|
|
8636
8693
|
}
|
|
8637
8694
|
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
8638
8695
|
forEach(b, (val, key) => {
|
|
8639
|
-
if (thisArg && isFunction(val)) {
|
|
8696
|
+
if (thisArg && isFunction$1(val)) {
|
|
8640
8697
|
a[key] = bind(val, thisArg);
|
|
8641
8698
|
} else {
|
|
8642
8699
|
a[key] = val;
|
|
@@ -8705,10 +8762,10 @@ const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
|
8705
8762
|
};
|
|
8706
8763
|
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
8707
8764
|
const forEachEntry = (obj, fn) => {
|
|
8708
|
-
const generator = obj && obj[
|
|
8709
|
-
const
|
|
8765
|
+
const generator = obj && obj[iterator];
|
|
8766
|
+
const _iterator = generator.call(obj);
|
|
8710
8767
|
let result2;
|
|
8711
|
-
while ((result2 =
|
|
8768
|
+
while ((result2 = _iterator.next()) && !result2.done) {
|
|
8712
8769
|
const pair = result2.value;
|
|
8713
8770
|
fn.call(obj, pair[0], pair[1]);
|
|
8714
8771
|
}
|
|
@@ -8745,11 +8802,11 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
8745
8802
|
};
|
|
8746
8803
|
const freezeMethods = (obj) => {
|
|
8747
8804
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
8748
|
-
if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
8805
|
+
if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
8749
8806
|
return false;
|
|
8750
8807
|
}
|
|
8751
8808
|
const value = obj[name];
|
|
8752
|
-
if (!isFunction(value)) return;
|
|
8809
|
+
if (!isFunction$1(value)) return;
|
|
8753
8810
|
descriptor.enumerable = false;
|
|
8754
8811
|
if ("writable" in descriptor) {
|
|
8755
8812
|
descriptor.writable = false;
|
|
@@ -8778,7 +8835,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
8778
8835
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
8779
8836
|
};
|
|
8780
8837
|
function isSpecCompliantForm(thing) {
|
|
8781
|
-
return !!(thing && isFunction(thing.append) && thing[
|
|
8838
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
8782
8839
|
}
|
|
8783
8840
|
const toJSONObject = (obj) => {
|
|
8784
8841
|
const stack = new Array(10);
|
|
@@ -8787,6 +8844,9 @@ const toJSONObject = (obj) => {
|
|
|
8787
8844
|
if (stack.indexOf(source) >= 0) {
|
|
8788
8845
|
return;
|
|
8789
8846
|
}
|
|
8847
|
+
if (isBuffer(source)) {
|
|
8848
|
+
return source;
|
|
8849
|
+
}
|
|
8790
8850
|
if (!("toJSON" in source)) {
|
|
8791
8851
|
stack[i] = source;
|
|
8792
8852
|
const target = isArray(source) ? [] : {};
|
|
@@ -8803,7 +8863,7 @@ const toJSONObject = (obj) => {
|
|
|
8803
8863
|
return visit(obj, 0);
|
|
8804
8864
|
};
|
|
8805
8865
|
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
8806
|
-
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
8866
|
+
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
8807
8867
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
8808
8868
|
if (setImmediateSupported) {
|
|
8809
8869
|
return setImmediate;
|
|
@@ -8821,9 +8881,10 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
8821
8881
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
8822
8882
|
})(
|
|
8823
8883
|
typeof setImmediate === "function",
|
|
8824
|
-
isFunction(_global.postMessage)
|
|
8884
|
+
isFunction$1(_global.postMessage)
|
|
8825
8885
|
);
|
|
8826
8886
|
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
8887
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
8827
8888
|
const utils$1 = {
|
|
8828
8889
|
isArray,
|
|
8829
8890
|
isArrayBuffer,
|
|
@@ -8835,6 +8896,7 @@ const utils$1 = {
|
|
|
8835
8896
|
isBoolean,
|
|
8836
8897
|
isObject: isObject$1,
|
|
8837
8898
|
isPlainObject,
|
|
8899
|
+
isEmptyObject,
|
|
8838
8900
|
isReadableStream,
|
|
8839
8901
|
isRequest,
|
|
8840
8902
|
isResponse,
|
|
@@ -8844,7 +8906,7 @@ const utils$1 = {
|
|
|
8844
8906
|
isFile,
|
|
8845
8907
|
isBlob,
|
|
8846
8908
|
isRegExp,
|
|
8847
|
-
isFunction,
|
|
8909
|
+
isFunction: isFunction$1,
|
|
8848
8910
|
isStream,
|
|
8849
8911
|
isURLSearchParams,
|
|
8850
8912
|
isTypedArray,
|
|
@@ -8880,7 +8942,8 @@ const utils$1 = {
|
|
|
8880
8942
|
isAsyncFn,
|
|
8881
8943
|
isThenable,
|
|
8882
8944
|
setImmediate: _setImmediate,
|
|
8883
|
-
asap
|
|
8945
|
+
asap,
|
|
8946
|
+
isIterable
|
|
8884
8947
|
};
|
|
8885
8948
|
function AxiosError$1(message, code2, config, request, response) {
|
|
8886
8949
|
Error.call(this);
|
|
@@ -8948,9 +9011,13 @@ AxiosError$1.from = (error, code2, config, request, response, customProps) => {
|
|
|
8948
9011
|
}, (prop) => {
|
|
8949
9012
|
return prop !== "isAxiosError";
|
|
8950
9013
|
});
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
axiosError
|
|
9014
|
+
const msg = error && error.message ? error.message : "Error";
|
|
9015
|
+
const errCode = code2 == null && error ? error.code : code2;
|
|
9016
|
+
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
|
|
9017
|
+
if (error && axiosError.cause == null) {
|
|
9018
|
+
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
9019
|
+
}
|
|
9020
|
+
axiosError.name = error && error.name || "Error";
|
|
8954
9021
|
customProps && Object.assign(axiosError, customProps);
|
|
8955
9022
|
return axiosError;
|
|
8956
9023
|
};
|
|
@@ -9000,6 +9067,9 @@ function toFormData$1(obj, formData, options) {
|
|
|
9000
9067
|
if (utils$1.isDate(value)) {
|
|
9001
9068
|
return value.toISOString();
|
|
9002
9069
|
}
|
|
9070
|
+
if (utils$1.isBoolean(value)) {
|
|
9071
|
+
return value.toString();
|
|
9072
|
+
}
|
|
9003
9073
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
9004
9074
|
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
9005
9075
|
}
|
|
@@ -9095,7 +9165,7 @@ prototype.toString = function toString2(encoder) {
|
|
|
9095
9165
|
}, "").join("&");
|
|
9096
9166
|
};
|
|
9097
9167
|
function encode(val) {
|
|
9098
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
|
|
9168
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
9099
9169
|
}
|
|
9100
9170
|
function buildURL(url, params, options) {
|
|
9101
9171
|
if (!params) {
|
|
@@ -9222,15 +9292,16 @@ const platform = {
|
|
|
9222
9292
|
...platform$1
|
|
9223
9293
|
};
|
|
9224
9294
|
function toURLEncodedForm(data, options) {
|
|
9225
|
-
return toFormData$1(data, new platform.classes.URLSearchParams(),
|
|
9295
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
9226
9296
|
visitor: function(value, key, path, helpers) {
|
|
9227
9297
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
9228
9298
|
this.append(key, value.toString("base64"));
|
|
9229
9299
|
return false;
|
|
9230
9300
|
}
|
|
9231
9301
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
9232
|
-
}
|
|
9233
|
-
|
|
9302
|
+
},
|
|
9303
|
+
...options
|
|
9304
|
+
});
|
|
9234
9305
|
}
|
|
9235
9306
|
function parsePropPath(name) {
|
|
9236
9307
|
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
@@ -9350,7 +9421,7 @@ const defaults = {
|
|
|
9350
9421
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
9351
9422
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
9352
9423
|
try {
|
|
9353
|
-
return JSON.parse(data);
|
|
9424
|
+
return JSON.parse(data, this.parseReviver);
|
|
9354
9425
|
} catch (e) {
|
|
9355
9426
|
if (strictJSONParsing) {
|
|
9356
9427
|
if (e.name === "SyntaxError") {
|
|
@@ -9503,10 +9574,15 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
|
9503
9574
|
setHeaders(header, valueOrRewrite);
|
|
9504
9575
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
9505
9576
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
9506
|
-
} else if (utils$1.
|
|
9507
|
-
|
|
9508
|
-
|
|
9577
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
9578
|
+
let obj = {}, dest, key;
|
|
9579
|
+
for (const entry of header) {
|
|
9580
|
+
if (!utils$1.isArray(entry)) {
|
|
9581
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
9582
|
+
}
|
|
9583
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
9509
9584
|
}
|
|
9585
|
+
setHeaders(obj, valueOrRewrite);
|
|
9510
9586
|
} else {
|
|
9511
9587
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
9512
9588
|
}
|
|
@@ -9610,6 +9686,9 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
|
9610
9686
|
toString() {
|
|
9611
9687
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
9612
9688
|
}
|
|
9689
|
+
getSetCookie() {
|
|
9690
|
+
return this.get("set-cookie") || [];
|
|
9691
|
+
}
|
|
9613
9692
|
get [Symbol.toStringTag]() {
|
|
9614
9693
|
return "AxiosHeaders";
|
|
9615
9694
|
}
|
|
@@ -9733,7 +9812,7 @@ function throttle(fn, freq) {
|
|
|
9733
9812
|
clearTimeout(timer);
|
|
9734
9813
|
timer = null;
|
|
9735
9814
|
}
|
|
9736
|
-
fn
|
|
9815
|
+
fn(...args);
|
|
9737
9816
|
};
|
|
9738
9817
|
const throttled = (...args) => {
|
|
9739
9818
|
const now2 = Date.now();
|
|
@@ -9908,7 +9987,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
9908
9987
|
validateStatus: mergeDirectKeys,
|
|
9909
9988
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
9910
9989
|
};
|
|
9911
|
-
utils$1.forEach(Object.keys(
|
|
9990
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
9912
9991
|
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
9913
9992
|
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
9914
9993
|
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
@@ -9926,13 +10005,17 @@ const resolveConfig = (config) => {
|
|
|
9926
10005
|
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
9927
10006
|
);
|
|
9928
10007
|
}
|
|
9929
|
-
let contentType;
|
|
9930
10008
|
if (utils$1.isFormData(data)) {
|
|
9931
10009
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
9932
10010
|
headers.setContentType(void 0);
|
|
9933
|
-
} else if ((
|
|
9934
|
-
const
|
|
9935
|
-
|
|
10011
|
+
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
10012
|
+
const formHeaders = data.getHeaders();
|
|
10013
|
+
const allowedHeaders = ["content-type", "content-length"];
|
|
10014
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
10015
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
10016
|
+
headers.set(key, val);
|
|
10017
|
+
}
|
|
10018
|
+
});
|
|
9936
10019
|
}
|
|
9937
10020
|
}
|
|
9938
10021
|
if (platform.hasStandardBrowserEnv) {
|
|
@@ -10010,8 +10093,11 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
10010
10093
|
reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
|
|
10011
10094
|
request = null;
|
|
10012
10095
|
};
|
|
10013
|
-
request.onerror = function handleError() {
|
|
10014
|
-
|
|
10096
|
+
request.onerror = function handleError(event) {
|
|
10097
|
+
const msg = event && event.message ? event.message : "Network Error";
|
|
10098
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
10099
|
+
err.event = event || null;
|
|
10100
|
+
reject(err);
|
|
10015
10101
|
request = null;
|
|
10016
10102
|
};
|
|
10017
10103
|
request.ontimeout = function handleTimeout() {
|
|
@@ -10142,7 +10228,7 @@ const readStream = async function* (stream) {
|
|
|
10142
10228
|
}
|
|
10143
10229
|
};
|
|
10144
10230
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
10145
|
-
const
|
|
10231
|
+
const iterator2 = readBytes(stream, chunkSize);
|
|
10146
10232
|
let bytes = 0;
|
|
10147
10233
|
let done;
|
|
10148
10234
|
let _onFinish = (e) => {
|
|
@@ -10154,7 +10240,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
10154
10240
|
return new ReadableStream({
|
|
10155
10241
|
async pull(controller) {
|
|
10156
10242
|
try {
|
|
10157
|
-
const { done: done2, value } = await
|
|
10243
|
+
const { done: done2, value } = await iterator2.next();
|
|
10158
10244
|
if (done2) {
|
|
10159
10245
|
_onFinish();
|
|
10160
10246
|
controller.close();
|
|
@@ -10173,15 +10259,23 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
10173
10259
|
},
|
|
10174
10260
|
cancel(reason) {
|
|
10175
10261
|
_onFinish(reason);
|
|
10176
|
-
return
|
|
10262
|
+
return iterator2.return();
|
|
10177
10263
|
}
|
|
10178
10264
|
}, {
|
|
10179
10265
|
highWaterMark: 2
|
|
10180
10266
|
});
|
|
10181
10267
|
};
|
|
10182
|
-
const
|
|
10183
|
-
const
|
|
10184
|
-
const
|
|
10268
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
10269
|
+
const { isFunction } = utils$1;
|
|
10270
|
+
const globalFetchAPI = (({ fetch: fetch2, Request, Response }) => ({
|
|
10271
|
+
fetch: fetch2,
|
|
10272
|
+
Request,
|
|
10273
|
+
Response
|
|
10274
|
+
}))(utils$1.global);
|
|
10275
|
+
const {
|
|
10276
|
+
ReadableStream: ReadableStream$1,
|
|
10277
|
+
TextEncoder
|
|
10278
|
+
} = utils$1.global;
|
|
10185
10279
|
const test = (fn, ...args) => {
|
|
10186
10280
|
try {
|
|
10187
10281
|
return !!fn(...args);
|
|
@@ -10189,162 +10283,200 @@ const test = (fn, ...args) => {
|
|
|
10189
10283
|
return false;
|
|
10190
10284
|
}
|
|
10191
10285
|
};
|
|
10192
|
-
const
|
|
10193
|
-
|
|
10194
|
-
const
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
return "half";
|
|
10200
|
-
}
|
|
10201
|
-
}).headers.has("Content-Type");
|
|
10202
|
-
return duplexAccessed && !hasContentType;
|
|
10203
|
-
});
|
|
10204
|
-
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
10205
|
-
const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
10206
|
-
const resolvers = {
|
|
10207
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
10208
|
-
};
|
|
10209
|
-
isFetchSupported && ((res) => {
|
|
10210
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
10211
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
10212
|
-
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
10213
|
-
});
|
|
10214
|
-
});
|
|
10215
|
-
})(new Response());
|
|
10216
|
-
const getBodyLength = async (body) => {
|
|
10217
|
-
if (body == null) {
|
|
10218
|
-
return 0;
|
|
10219
|
-
}
|
|
10220
|
-
if (utils$1.isBlob(body)) {
|
|
10221
|
-
return body.size;
|
|
10286
|
+
const factory = (env) => {
|
|
10287
|
+
const { fetch: fetch2, Request, Response } = Object.assign({}, globalFetchAPI, env);
|
|
10288
|
+
const isFetchSupported = isFunction(fetch2);
|
|
10289
|
+
const isRequestSupported = isFunction(Request);
|
|
10290
|
+
const isResponseSupported = isFunction(Response);
|
|
10291
|
+
if (!isFetchSupported) {
|
|
10292
|
+
return false;
|
|
10222
10293
|
}
|
|
10223
|
-
|
|
10224
|
-
|
|
10294
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
10295
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
10296
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
10297
|
+
let duplexAccessed = false;
|
|
10298
|
+
const hasContentType = new Request(platform.origin, {
|
|
10299
|
+
body: new ReadableStream$1(),
|
|
10225
10300
|
method: "POST",
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
return
|
|
10232
|
-
}
|
|
10233
|
-
if (utils$1.isURLSearchParams(body)) {
|
|
10234
|
-
body = body + "";
|
|
10235
|
-
}
|
|
10236
|
-
if (utils$1.isString(body)) {
|
|
10237
|
-
return (await encodeText(body)).byteLength;
|
|
10238
|
-
}
|
|
10239
|
-
};
|
|
10240
|
-
const resolveBodyLength = async (headers, body) => {
|
|
10241
|
-
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
10242
|
-
return length == null ? getBodyLength(body) : length;
|
|
10243
|
-
};
|
|
10244
|
-
const fetchAdapter = isFetchSupported && (async (config) => {
|
|
10245
|
-
let {
|
|
10246
|
-
url,
|
|
10247
|
-
method,
|
|
10248
|
-
data,
|
|
10249
|
-
signal,
|
|
10250
|
-
cancelToken,
|
|
10251
|
-
timeout,
|
|
10252
|
-
onDownloadProgress,
|
|
10253
|
-
onUploadProgress,
|
|
10254
|
-
responseType,
|
|
10255
|
-
headers,
|
|
10256
|
-
withCredentials = "same-origin",
|
|
10257
|
-
fetchOptions
|
|
10258
|
-
} = resolveConfig(config);
|
|
10259
|
-
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
10260
|
-
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
10261
|
-
let request;
|
|
10262
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
10263
|
-
composedSignal.unsubscribe();
|
|
10301
|
+
get duplex() {
|
|
10302
|
+
duplexAccessed = true;
|
|
10303
|
+
return "half";
|
|
10304
|
+
}
|
|
10305
|
+
}).headers.has("Content-Type");
|
|
10306
|
+
return duplexAccessed && !hasContentType;
|
|
10264
10307
|
});
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10308
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
10309
|
+
const resolvers = {
|
|
10310
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
10311
|
+
};
|
|
10312
|
+
isFetchSupported && (() => {
|
|
10313
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
10314
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
10315
|
+
let method = res && res[type];
|
|
10316
|
+
if (method) {
|
|
10317
|
+
return method.call(res);
|
|
10318
|
+
}
|
|
10319
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
10272
10320
|
});
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
const [onProgress, flush] = progressEventDecorator(
|
|
10279
|
-
requestContentLength,
|
|
10280
|
-
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
10281
|
-
);
|
|
10282
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
10283
|
-
}
|
|
10321
|
+
});
|
|
10322
|
+
})();
|
|
10323
|
+
const getBodyLength = async (body) => {
|
|
10324
|
+
if (body == null) {
|
|
10325
|
+
return 0;
|
|
10284
10326
|
}
|
|
10285
|
-
if (
|
|
10286
|
-
|
|
10327
|
+
if (utils$1.isBlob(body)) {
|
|
10328
|
+
return body.size;
|
|
10287
10329
|
}
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
method: method.toUpperCase(),
|
|
10293
|
-
headers: headers.normalize().toJSON(),
|
|
10294
|
-
body: data,
|
|
10295
|
-
duplex: "half",
|
|
10296
|
-
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
10297
|
-
});
|
|
10298
|
-
let response = await fetch(request);
|
|
10299
|
-
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
10300
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
10301
|
-
const options = {};
|
|
10302
|
-
["status", "statusText", "headers"].forEach((prop) => {
|
|
10303
|
-
options[prop] = response[prop];
|
|
10330
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
|
10331
|
+
const _request = new Request(platform.origin, {
|
|
10332
|
+
method: "POST",
|
|
10333
|
+
body
|
|
10304
10334
|
});
|
|
10305
|
-
|
|
10306
|
-
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
10307
|
-
responseContentLength,
|
|
10308
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
10309
|
-
) || [];
|
|
10310
|
-
response = new Response(
|
|
10311
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
10312
|
-
flush && flush();
|
|
10313
|
-
unsubscribe && unsubscribe();
|
|
10314
|
-
}),
|
|
10315
|
-
options
|
|
10316
|
-
);
|
|
10335
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
10317
10336
|
}
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10337
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
10338
|
+
return body.byteLength;
|
|
10339
|
+
}
|
|
10340
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
10341
|
+
body = body + "";
|
|
10342
|
+
}
|
|
10343
|
+
if (utils$1.isString(body)) {
|
|
10344
|
+
return (await encodeText(body)).byteLength;
|
|
10345
|
+
}
|
|
10346
|
+
};
|
|
10347
|
+
const resolveBodyLength = async (headers, body) => {
|
|
10348
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
10349
|
+
return length == null ? getBodyLength(body) : length;
|
|
10350
|
+
};
|
|
10351
|
+
return async (config) => {
|
|
10352
|
+
let {
|
|
10353
|
+
url,
|
|
10354
|
+
method,
|
|
10355
|
+
data,
|
|
10356
|
+
signal,
|
|
10357
|
+
cancelToken,
|
|
10358
|
+
timeout,
|
|
10359
|
+
onDownloadProgress,
|
|
10360
|
+
onUploadProgress,
|
|
10361
|
+
responseType,
|
|
10362
|
+
headers,
|
|
10363
|
+
withCredentials = "same-origin",
|
|
10364
|
+
fetchOptions
|
|
10365
|
+
} = resolveConfig(config);
|
|
10366
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
10367
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
10368
|
+
let request = null;
|
|
10369
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
10370
|
+
composedSignal.unsubscribe();
|
|
10330
10371
|
});
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10372
|
+
let requestContentLength;
|
|
10373
|
+
try {
|
|
10374
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
10375
|
+
let _request = new Request(url, {
|
|
10376
|
+
method: "POST",
|
|
10377
|
+
body: data,
|
|
10378
|
+
duplex: "half"
|
|
10379
|
+
});
|
|
10380
|
+
let contentTypeHeader;
|
|
10381
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
10382
|
+
headers.setContentType(contentTypeHeader);
|
|
10338
10383
|
}
|
|
10339
|
-
|
|
10384
|
+
if (_request.body) {
|
|
10385
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
10386
|
+
requestContentLength,
|
|
10387
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
10388
|
+
);
|
|
10389
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
10390
|
+
}
|
|
10391
|
+
}
|
|
10392
|
+
if (!utils$1.isString(withCredentials)) {
|
|
10393
|
+
withCredentials = withCredentials ? "include" : "omit";
|
|
10394
|
+
}
|
|
10395
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
10396
|
+
const resolvedOptions = {
|
|
10397
|
+
...fetchOptions,
|
|
10398
|
+
signal: composedSignal,
|
|
10399
|
+
method: method.toUpperCase(),
|
|
10400
|
+
headers: headers.normalize().toJSON(),
|
|
10401
|
+
body: data,
|
|
10402
|
+
duplex: "half",
|
|
10403
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
10404
|
+
};
|
|
10405
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
10406
|
+
let response = await (isRequestSupported ? fetch2(request, fetchOptions) : fetch2(url, resolvedOptions));
|
|
10407
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
10408
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
10409
|
+
const options = {};
|
|
10410
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
|
10411
|
+
options[prop] = response[prop];
|
|
10412
|
+
});
|
|
10413
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
10414
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
10415
|
+
responseContentLength,
|
|
10416
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
10417
|
+
) || [];
|
|
10418
|
+
response = new Response(
|
|
10419
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
10420
|
+
flush && flush();
|
|
10421
|
+
unsubscribe && unsubscribe();
|
|
10422
|
+
}),
|
|
10423
|
+
options
|
|
10424
|
+
);
|
|
10425
|
+
}
|
|
10426
|
+
responseType = responseType || "text";
|
|
10427
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
|
|
10428
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
10429
|
+
return await new Promise((resolve, reject) => {
|
|
10430
|
+
settle(resolve, reject, {
|
|
10431
|
+
data: responseData,
|
|
10432
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
10433
|
+
status: response.status,
|
|
10434
|
+
statusText: response.statusText,
|
|
10435
|
+
config,
|
|
10436
|
+
request
|
|
10437
|
+
});
|
|
10438
|
+
});
|
|
10439
|
+
} catch (err) {
|
|
10440
|
+
unsubscribe && unsubscribe();
|
|
10441
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
10442
|
+
throw Object.assign(
|
|
10443
|
+
new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
|
|
10444
|
+
{
|
|
10445
|
+
cause: err.cause || err
|
|
10446
|
+
}
|
|
10447
|
+
);
|
|
10448
|
+
}
|
|
10449
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
10340
10450
|
}
|
|
10341
|
-
|
|
10451
|
+
};
|
|
10452
|
+
};
|
|
10453
|
+
const seedCache = /* @__PURE__ */ new Map();
|
|
10454
|
+
const getFetch = (config) => {
|
|
10455
|
+
let env = utils$1.merge.call({
|
|
10456
|
+
skipUndefined: true
|
|
10457
|
+
}, globalFetchAPI, config ? config.env : null);
|
|
10458
|
+
const { fetch: fetch2, Request, Response } = env;
|
|
10459
|
+
const seeds = [
|
|
10460
|
+
Request,
|
|
10461
|
+
Response,
|
|
10462
|
+
fetch2
|
|
10463
|
+
];
|
|
10464
|
+
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
10465
|
+
while (i--) {
|
|
10466
|
+
seed = seeds[i];
|
|
10467
|
+
target = map.get(seed);
|
|
10468
|
+
target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
|
|
10469
|
+
map = target;
|
|
10342
10470
|
}
|
|
10343
|
-
|
|
10471
|
+
return target;
|
|
10472
|
+
};
|
|
10473
|
+
getFetch();
|
|
10344
10474
|
const knownAdapters = {
|
|
10345
10475
|
http: httpAdapter,
|
|
10346
10476
|
xhr: xhrAdapter,
|
|
10347
|
-
fetch:
|
|
10477
|
+
fetch: {
|
|
10478
|
+
get: getFetch
|
|
10479
|
+
}
|
|
10348
10480
|
};
|
|
10349
10481
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
10350
10482
|
if (fn) {
|
|
@@ -10358,7 +10490,7 @@ utils$1.forEach(knownAdapters, (fn, value) => {
|
|
|
10358
10490
|
const renderReason = (reason) => `- ${reason}`;
|
|
10359
10491
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
10360
10492
|
const adapters = {
|
|
10361
|
-
getAdapter: (adapters2) => {
|
|
10493
|
+
getAdapter: (adapters2, config) => {
|
|
10362
10494
|
adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
|
|
10363
10495
|
const { length } = adapters2;
|
|
10364
10496
|
let nameOrAdapter;
|
|
@@ -10374,7 +10506,7 @@ const adapters = {
|
|
|
10374
10506
|
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
|
10375
10507
|
}
|
|
10376
10508
|
}
|
|
10377
|
-
if (adapter) {
|
|
10509
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
10378
10510
|
break;
|
|
10379
10511
|
}
|
|
10380
10512
|
rejectedReasons[id || "#" + i] = adapter;
|
|
@@ -10411,7 +10543,7 @@ function dispatchRequest(config) {
|
|
|
10411
10543
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
10412
10544
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
10413
10545
|
}
|
|
10414
|
-
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
10546
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
10415
10547
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
10416
10548
|
throwIfCancellationRequested(config);
|
|
10417
10549
|
response.data = transformData.call(
|
|
@@ -10436,7 +10568,7 @@ function dispatchRequest(config) {
|
|
|
10436
10568
|
return Promise.reject(reason);
|
|
10437
10569
|
});
|
|
10438
10570
|
}
|
|
10439
|
-
const VERSION$1 = "1.
|
|
10571
|
+
const VERSION$1 = "1.12.0";
|
|
10440
10572
|
const validators$1 = {};
|
|
10441
10573
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
10442
10574
|
validators$1[type] = function validator2(thing) {
|
|
@@ -10502,7 +10634,7 @@ const validator = {
|
|
|
10502
10634
|
const validators = validator.validators;
|
|
10503
10635
|
let Axios$1 = class Axios {
|
|
10504
10636
|
constructor(instanceConfig) {
|
|
10505
|
-
this.defaults = instanceConfig;
|
|
10637
|
+
this.defaults = instanceConfig || {};
|
|
10506
10638
|
this.interceptors = {
|
|
10507
10639
|
request: new InterceptorManager(),
|
|
10508
10640
|
response: new InterceptorManager()
|
|
@@ -10604,8 +10736,8 @@ let Axios$1 = class Axios {
|
|
|
10604
10736
|
let len;
|
|
10605
10737
|
if (!synchronousRequestInterceptors) {
|
|
10606
10738
|
const chain = [dispatchRequest.bind(this), void 0];
|
|
10607
|
-
chain.unshift
|
|
10608
|
-
chain.push
|
|
10739
|
+
chain.unshift(...requestInterceptorChain);
|
|
10740
|
+
chain.push(...responseInterceptorChain);
|
|
10609
10741
|
len = chain.length;
|
|
10610
10742
|
promise = Promise.resolve(config);
|
|
10611
10743
|
while (i < len) {
|
|
@@ -13898,9 +14030,9 @@ function requireCore() {
|
|
|
13898
14030
|
if (hasRequiredCore) return core.exports;
|
|
13899
14031
|
hasRequiredCore = 1;
|
|
13900
14032
|
(function(module, exports) {
|
|
13901
|
-
(function(root,
|
|
14033
|
+
(function(root, factory2) {
|
|
13902
14034
|
{
|
|
13903
|
-
module.exports =
|
|
14035
|
+
module.exports = factory2();
|
|
13904
14036
|
}
|
|
13905
14037
|
})(commonjsGlobal, function() {
|
|
13906
14038
|
var CryptoJS = CryptoJS || function(Math2, undefined$1) {
|
|
@@ -14505,9 +14637,9 @@ function requireEncBase64() {
|
|
|
14505
14637
|
if (hasRequiredEncBase64) return encBase64.exports;
|
|
14506
14638
|
hasRequiredEncBase64 = 1;
|
|
14507
14639
|
(function(module, exports) {
|
|
14508
|
-
(function(root,
|
|
14640
|
+
(function(root, factory2) {
|
|
14509
14641
|
{
|
|
14510
|
-
module.exports =
|
|
14642
|
+
module.exports = factory2(requireCore());
|
|
14511
14643
|
}
|
|
14512
14644
|
})(commonjsGlobal, function(CryptoJS) {
|
|
14513
14645
|
(function() {
|
|
@@ -14612,9 +14744,9 @@ function requireMd5() {
|
|
|
14612
14744
|
if (hasRequiredMd5) return md5.exports;
|
|
14613
14745
|
hasRequiredMd5 = 1;
|
|
14614
14746
|
(function(module, exports) {
|
|
14615
|
-
(function(root,
|
|
14747
|
+
(function(root, factory2) {
|
|
14616
14748
|
{
|
|
14617
|
-
module.exports =
|
|
14749
|
+
module.exports = factory2(requireCore());
|
|
14618
14750
|
}
|
|
14619
14751
|
})(commonjsGlobal, function(CryptoJS) {
|
|
14620
14752
|
(function(Math2) {
|
|
@@ -14791,9 +14923,9 @@ function requireSha1() {
|
|
|
14791
14923
|
if (hasRequiredSha1) return sha1.exports;
|
|
14792
14924
|
hasRequiredSha1 = 1;
|
|
14793
14925
|
(function(module, exports) {
|
|
14794
|
-
(function(root,
|
|
14926
|
+
(function(root, factory2) {
|
|
14795
14927
|
{
|
|
14796
|
-
module.exports =
|
|
14928
|
+
module.exports = factory2(requireCore());
|
|
14797
14929
|
}
|
|
14798
14930
|
})(commonjsGlobal, function(CryptoJS) {
|
|
14799
14931
|
(function() {
|
|
@@ -14881,9 +15013,9 @@ function requireHmac() {
|
|
|
14881
15013
|
if (hasRequiredHmac) return hmac.exports;
|
|
14882
15014
|
hasRequiredHmac = 1;
|
|
14883
15015
|
(function(module, exports) {
|
|
14884
|
-
(function(root,
|
|
15016
|
+
(function(root, factory2) {
|
|
14885
15017
|
{
|
|
14886
|
-
module.exports =
|
|
15018
|
+
module.exports = factory2(requireCore());
|
|
14887
15019
|
}
|
|
14888
15020
|
})(commonjsGlobal, function(CryptoJS) {
|
|
14889
15021
|
(function() {
|
|
@@ -14986,9 +15118,9 @@ function requireEvpkdf() {
|
|
|
14986
15118
|
if (hasRequiredEvpkdf) return evpkdf.exports;
|
|
14987
15119
|
hasRequiredEvpkdf = 1;
|
|
14988
15120
|
(function(module, exports) {
|
|
14989
|
-
(function(root,
|
|
15121
|
+
(function(root, factory2, undef) {
|
|
14990
15122
|
{
|
|
14991
|
-
module.exports =
|
|
15123
|
+
module.exports = factory2(requireCore(), requireSha1(), requireHmac());
|
|
14992
15124
|
}
|
|
14993
15125
|
})(commonjsGlobal, function(CryptoJS) {
|
|
14994
15126
|
(function() {
|
|
@@ -15076,9 +15208,9 @@ function requireCipherCore() {
|
|
|
15076
15208
|
if (hasRequiredCipherCore) return cipherCore.exports;
|
|
15077
15209
|
hasRequiredCipherCore = 1;
|
|
15078
15210
|
(function(module, exports) {
|
|
15079
|
-
(function(root,
|
|
15211
|
+
(function(root, factory2, undef) {
|
|
15080
15212
|
{
|
|
15081
|
-
module.exports =
|
|
15213
|
+
module.exports = factory2(requireCore(), requireEvpkdf());
|
|
15082
15214
|
}
|
|
15083
15215
|
})(commonjsGlobal, function(CryptoJS) {
|
|
15084
15216
|
CryptoJS.lib.Cipher || function(undefined$1) {
|
|
@@ -15634,15 +15766,11 @@ function requireCipherCore() {
|
|
|
15634
15766
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
15635
15767
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
15636
15768
|
*/
|
|
15637
|
-
execute: function(password, keySize, ivSize, salt
|
|
15769
|
+
execute: function(password, keySize, ivSize, salt) {
|
|
15638
15770
|
if (!salt) {
|
|
15639
15771
|
salt = WordArray.random(64 / 8);
|
|
15640
15772
|
}
|
|
15641
|
-
|
|
15642
|
-
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
|
|
15643
|
-
} else {
|
|
15644
|
-
var key = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt);
|
|
15645
|
-
}
|
|
15773
|
+
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
|
|
15646
15774
|
var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
|
|
15647
15775
|
key.sigBytes = keySize * 4;
|
|
15648
15776
|
return CipherParams.create({ key, iv, salt });
|
|
@@ -15676,7 +15804,7 @@ function requireCipherCore() {
|
|
|
15676
15804
|
*/
|
|
15677
15805
|
encrypt: function(cipher, message, password, cfg) {
|
|
15678
15806
|
cfg = this.cfg.extend(cfg);
|
|
15679
|
-
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize
|
|
15807
|
+
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
|
|
15680
15808
|
cfg.iv = derivedParams.iv;
|
|
15681
15809
|
var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
|
|
15682
15810
|
ciphertext.mixIn(derivedParams);
|
|
@@ -15702,7 +15830,7 @@ function requireCipherCore() {
|
|
|
15702
15830
|
decrypt: function(cipher, ciphertext, password, cfg) {
|
|
15703
15831
|
cfg = this.cfg.extend(cfg);
|
|
15704
15832
|
ciphertext = this._parse(ciphertext, cfg.format);
|
|
15705
|
-
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt
|
|
15833
|
+
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
|
|
15706
15834
|
cfg.iv = derivedParams.iv;
|
|
15707
15835
|
var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
|
|
15708
15836
|
return plaintext;
|
|
@@ -15714,9 +15842,9 @@ function requireCipherCore() {
|
|
|
15714
15842
|
return cipherCore.exports;
|
|
15715
15843
|
}
|
|
15716
15844
|
(function(module, exports) {
|
|
15717
|
-
(function(root,
|
|
15845
|
+
(function(root, factory2, undef) {
|
|
15718
15846
|
{
|
|
15719
|
-
module.exports =
|
|
15847
|
+
module.exports = factory2(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
15720
15848
|
}
|
|
15721
15849
|
})(commonjsGlobal, function(CryptoJS) {
|
|
15722
15850
|
(function() {
|
|
@@ -15863,9 +15991,9 @@ var aesExports = aes.exports;
|
|
|
15863
15991
|
const AES = /* @__PURE__ */ getDefaultExportFromCjs(aesExports);
|
|
15864
15992
|
var padPkcs7 = { exports: {} };
|
|
15865
15993
|
(function(module, exports) {
|
|
15866
|
-
(function(root,
|
|
15994
|
+
(function(root, factory2, undef) {
|
|
15867
15995
|
{
|
|
15868
|
-
module.exports =
|
|
15996
|
+
module.exports = factory2(requireCore(), requireCipherCore());
|
|
15869
15997
|
}
|
|
15870
15998
|
})(commonjsGlobal, function(CryptoJS) {
|
|
15871
15999
|
return CryptoJS.pad.Pkcs7;
|
|
@@ -15875,9 +16003,9 @@ var padPkcs7Exports = padPkcs7.exports;
|
|
|
15875
16003
|
const Pkcs7 = /* @__PURE__ */ getDefaultExportFromCjs(padPkcs7Exports);
|
|
15876
16004
|
var encUtf8 = { exports: {} };
|
|
15877
16005
|
(function(module, exports) {
|
|
15878
|
-
(function(root,
|
|
16006
|
+
(function(root, factory2) {
|
|
15879
16007
|
{
|
|
15880
|
-
module.exports =
|
|
16008
|
+
module.exports = factory2(requireCore());
|
|
15881
16009
|
}
|
|
15882
16010
|
})(commonjsGlobal, function(CryptoJS) {
|
|
15883
16011
|
return CryptoJS.enc.Utf8;
|
|
@@ -17116,13 +17244,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
17116
17244
|
var _a;
|
|
17117
17245
|
const layoutConfig2 = useLayoutConfig();
|
|
17118
17246
|
const { t: $t } = i18n.global;
|
|
17119
|
-
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-
|
|
17120
|
-
const UserSearch = defineAsyncComponent(() => import("./UserSearch-
|
|
17121
|
-
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-
|
|
17122
|
-
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-
|
|
17123
|
-
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-
|
|
17124
|
-
const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-
|
|
17125
|
-
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-
|
|
17247
|
+
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CP5f2uzQ.js"));
|
|
17248
|
+
const UserSearch = defineAsyncComponent(() => import("./UserSearch-CafkeCZN.js"));
|
|
17249
|
+
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CEkNjbFh.js"));
|
|
17250
|
+
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-DsrmcbM0.js"));
|
|
17251
|
+
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DQIY50Dz.js"));
|
|
17252
|
+
const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-tKXyTB5i.js"));
|
|
17253
|
+
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-FMF216bj.js"));
|
|
17126
17254
|
const props = __props;
|
|
17127
17255
|
const repoInfo = inject("repoInfo");
|
|
17128
17256
|
const orgInfo = inject("orgInfo");
|
|
@@ -17871,7 +17999,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
|
|
|
17871
17999
|
loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
|
|
17872
18000
|
}
|
|
17873
18001
|
};
|
|
17874
|
-
const NoticeModal = defineAsyncComponent(() => import("./notice-
|
|
18002
|
+
const NoticeModal = defineAsyncComponent(() => import("./notice-DRDO7WND.js"));
|
|
17875
18003
|
function clearNotice() {
|
|
17876
18004
|
if (localStorage$2.getItem("validator_email")) {
|
|
17877
18005
|
localStorage$2.removeItem("validator_email");
|
|
@@ -18673,9 +18801,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
18673
18801
|
const layoutConfig2 = useLayoutConfig();
|
|
18674
18802
|
const { t: t2 } = i18n.global;
|
|
18675
18803
|
const route = useRoute();
|
|
18676
|
-
const MenuItem = defineAsyncComponent(() => import("./MenuItem-
|
|
18677
|
-
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-
|
|
18678
|
-
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-
|
|
18804
|
+
const MenuItem = defineAsyncComponent(() => import("./MenuItem-BW-RKfni.js"));
|
|
18805
|
+
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-DphiQXSk.js"));
|
|
18806
|
+
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-B4xsh-YN.js"));
|
|
18679
18807
|
const props = __props;
|
|
18680
18808
|
console.log("slotKeys", props.slotKeys);
|
|
18681
18809
|
console.log("props", props);
|
|
@@ -24570,7 +24698,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
24570
24698
|
}
|
|
24571
24699
|
});
|
|
24572
24700
|
const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
24573
|
-
const SlidCaptcha = defineAsyncComponent(() => import("./index-
|
|
24701
|
+
const SlidCaptcha = defineAsyncComponent(() => import("./index-D4eGNb4j.js"));
|
|
24574
24702
|
const useSlidCaptcha = () => {
|
|
24575
24703
|
const { mount, unMount } = usePopup("slid-captcha-popup");
|
|
24576
24704
|
const open = (config) => {
|
|
@@ -24589,7 +24717,7 @@ const useSlidCaptcha = () => {
|
|
|
24589
24717
|
close: unMount
|
|
24590
24718
|
};
|
|
24591
24719
|
};
|
|
24592
|
-
const YunpianCaptcha = defineAsyncComponent(() => import("./index-
|
|
24720
|
+
const YunpianCaptcha = defineAsyncComponent(() => import("./index-eKuz_K7l.js"));
|
|
24593
24721
|
const useYunpianCaptcha = () => {
|
|
24594
24722
|
const { mount, unMount } = usePopup("yunpian-captcha-popup");
|
|
24595
24723
|
const open = (config) => {
|