From bb9fab8d0358262b8236c372d62660a50b5b3417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 15 Dec 2022 16:49:58 +0900 Subject: [PATCH] fix(es/minifier): Abort IIFE invoker completely on eval (#6659) **Related issue:** - Closes https://github.com/swc-project/swc/issues/6628. --- .../src/compress/optimize/iife.rs | 8 +- .../tests/fixture/issues/6628/input.js | 18 + .../tests/fixture/issues/6628/mangle.json | 1 + .../tests/fixture/issues/6628/output.js | 13 + .../tests/fixture/next/43052/output.js | 7 +- .../feedback-3/579-dcac359116b2707c/output.js | 2492 ++++++++--------- .../fixture/next/wrap-contracts/output.js | 554 ++-- .../tests/projects/output/mootools-1.4.5.js | 177 +- 8 files changed, 1675 insertions(+), 1595 deletions(-) create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/6628/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/6628/mangle.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js diff --git a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs index 28d5f3c4cbf9..257e0a5db04d 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs @@ -15,7 +15,7 @@ use crate::debug::dump; use crate::{ compress::optimize::{util::Remapper, Ctx}, mode::Mode, - util::{contains_eval, idents_captured_by, idents_used_by, make_number}, + util::{idents_captured_by, idents_used_by, make_number}, }; /// Methods related to the option `negate_iife`. @@ -730,7 +730,11 @@ where // Abort on eval. // See https://github.com/swc-project/swc/pull/6478 - if contains_eval(body, false) { + // + // We completetly abort on eval, because we cannot know whether a variable in + // upper scope will be afftected by eval. + // https://github.com/swc-project/swc/issues/6628 + if self.data.top.has_eval_call { log_abort!("iife: [x] Aborting because of eval"); return false; } diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/6628/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/6628/input.js new file mode 100644 index 000000000000..81d6a07e5cf7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/6628/input.js @@ -0,0 +1,18 @@ +(function () { + var Collector = function () { + var e = function e(e) { }; + return e.usePlugin = function (t, i, n) { + + }, e.plugins = [], e; + }(); + var CallbackType; + !function (e) { + e[e.Var = 0] = "Var", e[e.All = 1] = "All"; + }(CallbackType || (CallbackType = {})); + var CepRule = function () { + eval(); + }(); + Collector.usePlugin(CepRule, "cep"); + + exports.Collector = Collector; +})() \ No newline at end of file diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/6628/mangle.json b/crates/swc_ecma_minifier/tests/fixture/issues/6628/mangle.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/6628/mangle.json @@ -0,0 +1 @@ +{} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js new file mode 100644 index 000000000000..5d12f36e0bb6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js @@ -0,0 +1,13 @@ +!function() { + var CallbackType, Collector = function() { + var n = function(n) {}; + return n.usePlugin = function(n, u, l) {}, n.plugins = [], n; + }(); + !function(n) { + n[n.Var = 0] = "Var", n[n.All = 1] = "All"; + }(CallbackType || (CallbackType = {})); + var CepRule = function() { + eval(); + }(); + Collector.usePlugin(CepRule, "cep"), exports.Collector = Collector; +}(); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js b/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js index eaa6e4f57569..48f1422456fd 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js @@ -1,6 +1,7 @@ use(function(__unused_webpack_module, exports, __webpack_require__) { - var e, t; - e = this, t = function(exports, React) { + !function(e, t) { + t(exports, __webpack_require__(7294), __webpack_require__(1321)); + }(this, function(exports, React) { "use strict"; var index_production = { exports: {} @@ -23,7 +24,7 @@ use(function(__unused_webpack_module, exports, __webpack_require__) { exports.chunkBlocks = index_production.exports.chunkBlocks, exports.encodeDirectory = index_production.exports.encodeDirectory, exports.encodeFile = index_production.exports.encodeFile, Object.defineProperty(exports, "__esModule", { value: !0 }); - }, t(exports, __webpack_require__(7294), __webpack_require__(1321)), true; + }); }); (function e() { const e = 1; diff --git a/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js b/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js index 2d11c517eb50..968798acaa6f 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js @@ -4,1303 +4,1301 @@ ], { 7029: function(t, e, r) { - r.g, t.exports = function() { - return (()=>{ - var t = { - 873: (t)=>{ - t.exports = function(t) { - if (void 0 === t) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); - return t; - }, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 575: (t)=>{ - t.exports = function(t, e) { - if (!(t instanceof e)) throw TypeError("Cannot call a class as a function"); - }, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 754: (t)=>{ - function e(r) { - return t.exports = e = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, t.exports.default = t.exports, t.exports.__esModule = !0, e(r); + r.g, t.exports = (()=>{ + var t = { + 873: (t)=>{ + t.exports = function(t) { + if (void 0 === t) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); + return t; + }, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 575: (t)=>{ + t.exports = function(t, e) { + if (!(t instanceof e)) throw TypeError("Cannot call a class as a function"); + }, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 754: (t)=>{ + function e(r) { + return t.exports = e = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, t.exports.default = t.exports, t.exports.__esModule = !0, e(r); + } + t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 205: (t, e, r)=>{ + var o = r(489); + t.exports = function(t, e) { + if ("function" != typeof e && null !== e) throw TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), e && o(t, e); + }, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 585: (t, e, r)=>{ + var o = r(8).default, n = r(873); + t.exports = function(t, e) { + return e && ("object" === o(e) || "function" == typeof e) ? e : n(t); + }, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 489: (t)=>{ + function e(r, o) { + return t.exports = e = Object.setPrototypeOf || function(t, e) { + return t.__proto__ = e, t; + }, t.exports.default = t.exports, t.exports.__esModule = !0, e(r, o); + } + t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 8: (t)=>{ + function e(r) { + return "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? (t.exports = e = function(t) { + return typeof t; + }, t.exports.default = t.exports, t.exports.__esModule = !0) : (t.exports = e = function(t) { + return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; + }, t.exports.default = t.exports, t.exports.__esModule = !0), e(r); + } + t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; + }, + 924: (t, e, r)=>{ + "use strict"; + var o = r(210), n = r(559), i = n(o("String.prototype.indexOf")); + t.exports = function(t, e) { + var r = o(t, !!e); + return "function" == typeof r && i(t, ".prototype.") > -1 ? n(r) : r; + }; + }, + 559: (t, e, r)=>{ + "use strict"; + var o = r(612), n = r(210), i = n("%Function.prototype.apply%"), a = n("%Function.prototype.call%"), p = n("%Reflect.apply%", !0) || o.call(a, i), c = n("%Object.getOwnPropertyDescriptor%", !0), u = n("%Object.defineProperty%", !0), f = n("%Math.max%"); + if (u) try { + u({}, "a", { + value: 1 + }); + } catch (y) { + u = null; + } + t.exports = function(t) { + var e = p(o, a, arguments); + return c && u && c(e, "length").configurable && u(e, "length", { + value: 1 + f(0, t.length - (arguments.length - 1)) + }), e; + }; + var l = function() { + return p(o, i, arguments); + }; + u ? u(t.exports, "apply", { + value: l + }) : t.exports.apply = l; + }, + 729: (t)=>{ + "use strict"; + var e = Object.prototype.hasOwnProperty, r = "~"; + function o() {} + function n(t, e, r) { + this.fn = t, this.context = e, this.once = r || !1; + } + function i(t, e, o, i, a) { + if ("function" != typeof o) throw TypeError("The listener must be a function"); + var p = new n(o, i || t, a), c = r ? r + e : e; + return t._events[c] ? t._events[c].fn ? t._events[c] = [ + t._events[c], + p + ] : t._events[c].push(p) : (t._events[c] = p, t._eventsCount++), t; + } + function a(t, e) { + 0 == --t._eventsCount ? t._events = new o : delete t._events[e]; + } + function p() { + this._events = new o, this._eventsCount = 0; + } + Object.create && (o.prototype = Object.create(null), (new o).__proto__ || (r = !1)), p.prototype.eventNames = function() { + var t, o, n = []; + if (0 === this._eventsCount) return n; + for(o in t = this._events)e.call(t, o) && n.push(r ? o.slice(1) : o); + return Object.getOwnPropertySymbols ? n.concat(Object.getOwnPropertySymbols(t)) : n; + }, p.prototype.listeners = function(t) { + var e = r ? r + t : t, o = this._events[e]; + if (!o) return []; + if (o.fn) return [ + o.fn + ]; + for(var n = 0, i = o.length, a = Array(i); n < i; n++)a[n] = o[n].fn; + return a; + }, p.prototype.listenerCount = function(t) { + var e = r ? r + t : t, o = this._events[e]; + return o ? o.fn ? 1 : o.length : 0; + }, p.prototype.emit = function(t, e, o, n, i, a) { + var p = r ? r + t : t; + if (!this._events[p]) return !1; + var c, u, f = this._events[p], y = arguments.length; + if (f.fn) { + switch(f.once && this.removeListener(t, f.fn, void 0, !0), y){ + case 1: + return f.fn.call(f.context), !0; + case 2: + return f.fn.call(f.context, e), !0; + case 3: + return f.fn.call(f.context, e, o), !0; + case 4: + return f.fn.call(f.context, e, o, n), !0; + case 5: + return f.fn.call(f.context, e, o, n, i), !0; + case 6: + return f.fn.call(f.context, e, o, n, i, a), !0; + } + for(u = 1, c = Array(y - 1); u < y; u++)c[u - 1] = arguments[u]; + f.fn.apply(f.context, c); + } else { + var l, s = f.length; + for(u = 0; u < s; u++)switch(f[u].once && this.removeListener(t, f[u].fn, void 0, !0), y){ + case 1: + f[u].fn.call(f[u].context); + break; + case 2: + f[u].fn.call(f[u].context, e); + break; + case 3: + f[u].fn.call(f[u].context, e, o); + break; + case 4: + f[u].fn.call(f[u].context, e, o, n); + break; + default: + if (!c) for(l = 1, c = Array(y - 1); l < y; l++)c[l - 1] = arguments[l]; + f[u].fn.apply(f[u].context, c); + } + } + return !0; + }, p.prototype.on = function(t, e, r) { + return i(this, t, e, r, !1); + }, p.prototype.once = function(t, e, r) { + return i(this, t, e, r, !0); + }, p.prototype.removeListener = function(t, e, o, n) { + var i = r ? r + t : t; + if (!this._events[i]) return this; + if (!e) return a(this, i), this; + var p = this._events[i]; + if (p.fn) p.fn !== e || n && !p.once || o && p.context !== o || a(this, i); + else { + for(var c = 0, u = [], f = p.length; c < f; c++)(p[c].fn !== e || n && !p[c].once || o && p[c].context !== o) && u.push(p[c]); + u.length ? this._events[i] = 1 === u.length ? u[0] : u : a(this, i); + } + return this; + }, p.prototype.removeAllListeners = function(t) { + var e; + return t ? (e = r ? r + t : t, this._events[e] && a(this, e)) : (this._events = new o, this._eventsCount = 0), this; + }, p.prototype.off = p.prototype.removeListener, p.prototype.addListener = p.prototype.on, p.prefixed = r, p.EventEmitter = p, t.exports = p; + }, + 648: (t)=>{ + "use strict"; + var e = Array.prototype.slice, r = Object.prototype.toString; + t.exports = function(t) { + var o = this; + if ("function" != typeof o || "[object Function]" !== r.call(o)) throw TypeError("Function.prototype.bind called on incompatible " + o); + for(var n, i = e.call(arguments, 1), a = Math.max(0, o.length - i.length), p = [], c = 0; c < a; c++)p.push("$" + c); + if (n = Function("binder", "return function (" + p.join(",") + "){ return binder.apply(this,arguments); }")(function() { + if (this instanceof n) { + var r = o.apply(this, i.concat(e.call(arguments))); + return Object(r) === r ? r : this; + } + return o.apply(t, i.concat(e.call(arguments))); + }), o.prototype) { + var u = function() {}; + u.prototype = o.prototype, n.prototype = new u, u.prototype = null; + } + return n; + }; + }, + 612: (t, e, r)=>{ + "use strict"; + var o = r(648); + t.exports = Function.prototype.bind || o; + }, + 210: (t, e, r)=>{ + "use strict"; + var o, n = SyntaxError, i = Function, a = TypeError, p = function(t) { + try { + return i('"use strict"; return (' + t + ").constructor;")(); + } catch (e) {} + }, c = Object.getOwnPropertyDescriptor; + if (c) try { + c({}, ""); + } catch (u) { + c = null; + } + var f = function() { + throw new a; + }, y = c ? function() { + try { + return f; + } catch (e) { + try { + return c(arguments, "callee").get; + } catch (t) { + return f; + } + } + }() : f, l = r(405)(), s = Object.getPrototypeOf || function(t) { + return t.__proto__; + }, d = {}, b = "undefined" == typeof Uint8Array ? o : s(Uint8Array), g = { + "%AggregateError%": "undefined" == typeof AggregateError ? o : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? o : ArrayBuffer, + "%ArrayIteratorPrototype%": l ? s([][Symbol.iterator]()) : o, + "%AsyncFromSyncIteratorPrototype%": o, + "%AsyncFunction%": d, + "%AsyncGenerator%": d, + "%AsyncGeneratorFunction%": d, + "%AsyncIteratorPrototype%": d, + "%Atomics%": "undefined" == typeof Atomics ? o : Atomics, + "%BigInt%": "undefined" == typeof BigInt ? o : BigInt, + "%Boolean%": Boolean, + "%DataView%": "undefined" == typeof DataView ? o : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": Error, + "%eval%": eval, + "%EvalError%": EvalError, + "%Float32Array%": "undefined" == typeof Float32Array ? o : Float32Array, + "%Float64Array%": "undefined" == typeof Float64Array ? o : Float64Array, + "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? o : FinalizationRegistry, + "%Function%": i, + "%GeneratorFunction%": d, + "%Int8Array%": "undefined" == typeof Int8Array ? o : Int8Array, + "%Int16Array%": "undefined" == typeof Int16Array ? o : Int16Array, + "%Int32Array%": "undefined" == typeof Int32Array ? o : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": l ? s(s([][Symbol.iterator]())) : o, + "%JSON%": "object" == typeof JSON ? JSON : o, + "%Map%": "undefined" == typeof Map ? o : Map, + "%MapIteratorPrototype%": "undefined" != typeof Map && l ? s((new Map)[Symbol.iterator]()) : o, + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": "undefined" == typeof Promise ? o : Promise, + "%Proxy%": "undefined" == typeof Proxy ? o : Proxy, + "%RangeError%": RangeError, + "%ReferenceError%": ReferenceError, + "%Reflect%": "undefined" == typeof Reflect ? o : Reflect, + "%RegExp%": RegExp, + "%Set%": "undefined" == typeof Set ? o : Set, + "%SetIteratorPrototype%": "undefined" != typeof Set && l ? s((new Set)[Symbol.iterator]()) : o, + "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? o : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": l ? s(""[Symbol.iterator]()) : o, + "%Symbol%": l ? Symbol : o, + "%SyntaxError%": n, + "%ThrowTypeError%": y, + "%TypedArray%": b, + "%TypeError%": a, + "%Uint8Array%": "undefined" == typeof Uint8Array ? o : Uint8Array, + "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? o : Uint8ClampedArray, + "%Uint16Array%": "undefined" == typeof Uint16Array ? o : Uint16Array, + "%Uint32Array%": "undefined" == typeof Uint32Array ? o : Uint32Array, + "%URIError%": URIError, + "%WeakMap%": "undefined" == typeof WeakMap ? o : WeakMap, + "%WeakRef%": "undefined" == typeof WeakRef ? o : WeakRef, + "%WeakSet%": "undefined" == typeof WeakSet ? o : WeakSet + }, h = function t(e) { + var r; + if ("%AsyncFunction%" === e) r = p("async function () {}"); + else if ("%GeneratorFunction%" === e) r = p("function* () {}"); + else if ("%AsyncGeneratorFunction%" === e) r = p("async function* () {}"); + else if ("%AsyncGenerator%" === e) { + var o = t("%AsyncGeneratorFunction%"); + o && (r = o.prototype); + } else if ("%AsyncIteratorPrototype%" === e) { + var n = t("%AsyncGenerator%"); + n && (r = s(n.prototype)); + } + return g[e] = r, r; + }, m = { + "%ArrayBufferPrototype%": [ + "ArrayBuffer", + "prototype" + ], + "%ArrayPrototype%": [ + "Array", + "prototype" + ], + "%ArrayProto_entries%": [ + "Array", + "prototype", + "entries" + ], + "%ArrayProto_forEach%": [ + "Array", + "prototype", + "forEach" + ], + "%ArrayProto_keys%": [ + "Array", + "prototype", + "keys" + ], + "%ArrayProto_values%": [ + "Array", + "prototype", + "values" + ], + "%AsyncFunctionPrototype%": [ + "AsyncFunction", + "prototype" + ], + "%AsyncGenerator%": [ + "AsyncGeneratorFunction", + "prototype" + ], + "%AsyncGeneratorPrototype%": [ + "AsyncGeneratorFunction", + "prototype", + "prototype" + ], + "%BooleanPrototype%": [ + "Boolean", + "prototype" + ], + "%DataViewPrototype%": [ + "DataView", + "prototype" + ], + "%DatePrototype%": [ + "Date", + "prototype" + ], + "%ErrorPrototype%": [ + "Error", + "prototype" + ], + "%EvalErrorPrototype%": [ + "EvalError", + "prototype" + ], + "%Float32ArrayPrototype%": [ + "Float32Array", + "prototype" + ], + "%Float64ArrayPrototype%": [ + "Float64Array", + "prototype" + ], + "%FunctionPrototype%": [ + "Function", + "prototype" + ], + "%Generator%": [ + "GeneratorFunction", + "prototype" + ], + "%GeneratorPrototype%": [ + "GeneratorFunction", + "prototype", + "prototype" + ], + "%Int8ArrayPrototype%": [ + "Int8Array", + "prototype" + ], + "%Int16ArrayPrototype%": [ + "Int16Array", + "prototype" + ], + "%Int32ArrayPrototype%": [ + "Int32Array", + "prototype" + ], + "%JSONParse%": [ + "JSON", + "parse" + ], + "%JSONStringify%": [ + "JSON", + "stringify" + ], + "%MapPrototype%": [ + "Map", + "prototype" + ], + "%NumberPrototype%": [ + "Number", + "prototype" + ], + "%ObjectPrototype%": [ + "Object", + "prototype" + ], + "%ObjProto_toString%": [ + "Object", + "prototype", + "toString" + ], + "%ObjProto_valueOf%": [ + "Object", + "prototype", + "valueOf" + ], + "%PromisePrototype%": [ + "Promise", + "prototype" + ], + "%PromiseProto_then%": [ + "Promise", + "prototype", + "then" + ], + "%Promise_all%": [ + "Promise", + "all" + ], + "%Promise_reject%": [ + "Promise", + "reject" + ], + "%Promise_resolve%": [ + "Promise", + "resolve" + ], + "%RangeErrorPrototype%": [ + "RangeError", + "prototype" + ], + "%ReferenceErrorPrototype%": [ + "ReferenceError", + "prototype" + ], + "%RegExpPrototype%": [ + "RegExp", + "prototype" + ], + "%SetPrototype%": [ + "Set", + "prototype" + ], + "%SharedArrayBufferPrototype%": [ + "SharedArrayBuffer", + "prototype" + ], + "%StringPrototype%": [ + "String", + "prototype" + ], + "%SymbolPrototype%": [ + "Symbol", + "prototype" + ], + "%SyntaxErrorPrototype%": [ + "SyntaxError", + "prototype" + ], + "%TypedArrayPrototype%": [ + "TypedArray", + "prototype" + ], + "%TypeErrorPrototype%": [ + "TypeError", + "prototype" + ], + "%Uint8ArrayPrototype%": [ + "Uint8Array", + "prototype" + ], + "%Uint8ClampedArrayPrototype%": [ + "Uint8ClampedArray", + "prototype" + ], + "%Uint16ArrayPrototype%": [ + "Uint16Array", + "prototype" + ], + "%Uint32ArrayPrototype%": [ + "Uint32Array", + "prototype" + ], + "%URIErrorPrototype%": [ + "URIError", + "prototype" + ], + "%WeakMapPrototype%": [ + "WeakMap", + "prototype" + ], + "%WeakSetPrototype%": [ + "WeakSet", + "prototype" + ] + }, v = r(612), S = r(642), A = v.call(Function.call, Array.prototype.concat), O = v.call(Function.apply, Array.prototype.splice), j = v.call(Function.call, String.prototype.replace), P = v.call(Function.call, String.prototype.slice), x = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, w = /\\(\\)?/g, E = function(t) { + var e = P(t, 0, 1), r = P(t, -1); + if ("%" === e && "%" !== r) throw new n("invalid intrinsic syntax, expected closing `%`"); + if ("%" === r && "%" !== e) throw new n("invalid intrinsic syntax, expected opening `%`"); + var o = []; + return j(t, x, function(t, e, r, n) { + o[o.length] = r ? j(n, w, "$1") : e || t; + }), o; + }, F = function(t, e) { + var r, o = t; + if (S(m, o) && (o = "%" + (r = m[o])[0] + "%"), S(g, o)) { + var i = g[o]; + if (i === d && (i = h(o)), void 0 === i && !e) throw new a("intrinsic " + t + " exists, but is not available. Please file an issue!"); + return { + alias: r, + name: o, + value: i + }; + } + throw new n("intrinsic " + t + " does not exist!"); + }; + t.exports = function(t, e) { + if ("string" != typeof t || 0 === t.length) throw new a("intrinsic name must be a non-empty string"); + if (arguments.length > 1 && "boolean" != typeof e) throw new a('"allowMissing" argument must be a boolean'); + var r = E(t), o = r.length > 0 ? r[0] : "", i = F("%" + o + "%", e), p = i.name, u = i.value, f = !1, y = i.alias; + y && (o = y[0], O(r, A([ + 0, + 1 + ], y))); + for(var l = 1, s = !0; l < r.length; l += 1){ + var d = r[l], b = P(d, 0, 1), h = P(d, -1); + if (('"' === b || "'" === b || "`" === b || '"' === h || "'" === h || "`" === h) && b !== h) throw new n("property names with quotes must have matching quotes"); + if ("constructor" !== d && s || (f = !0), S(g, p = "%" + (o += "." + d) + "%")) u = g[p]; + else if (null != u) { + if (!(d in u)) { + if (!e) throw new a("base intrinsic for " + t + " exists, but the property is not available."); + return; + } + if (c && l + 1 >= r.length) { + var m = c(u, d); + u = (s = !!m) && "get" in m && !("originalValue" in m.get) ? m.get : u[d]; + } else s = S(u, d), u = u[d]; + s && !f && (g[p] = u); + } + } + return u; + }; + }, + 405: (t, e, r)=>{ + "use strict"; + var o = "undefined" != typeof Symbol && Symbol, n = r(419); + t.exports = function() { + return "function" == typeof o && "function" == typeof Symbol && "symbol" == typeof o("foo") && "symbol" == typeof Symbol("bar") && n(); + }; + }, + 419: (t)=>{ + "use strict"; + t.exports = function() { + if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; + if ("symbol" == typeof Symbol.iterator) return !0; + var t = {}, e = Symbol("test"), r = Object(e); + if ("string" == typeof e || "[object Symbol]" !== Object.prototype.toString.call(e) || "[object Symbol]" !== Object.prototype.toString.call(r)) return !1; + for(e in t[e] = 42, t)return !1; + if ("function" == typeof Object.keys && 0 !== Object.keys(t).length || "function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(t).length) return !1; + var o = Object.getOwnPropertySymbols(t); + if (1 !== o.length || o[0] !== e || !Object.prototype.propertyIsEnumerable.call(t, e)) return !1; + if ("function" == typeof Object.getOwnPropertyDescriptor) { + var n = Object.getOwnPropertyDescriptor(t, e); + if (42 !== n.value || !0 !== n.enumerable) return !1; } - t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 205: (t, e, r)=>{ - var o = r(489); - t.exports = function(t, e) { - if ("function" != typeof e && null !== e) throw TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), e && o(t, e); - }, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 585: (t, e, r)=>{ - var o = r(8).default, n = r(873); - t.exports = function(t, e) { - return e && ("object" === o(e) || "function" == typeof e) ? e : n(t); - }, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 489: (t)=>{ - function e(r, o) { - return t.exports = e = Object.setPrototypeOf || function(t, e) { - return t.__proto__ = e, t; - }, t.exports.default = t.exports, t.exports.__esModule = !0, e(r, o); + return !0; + }; + }, + 642: (t, e, r)=>{ + "use strict"; + var o = r(612); + t.exports = o.call(Function.call, Object.prototype.hasOwnProperty); + }, + 631: (t, e, r)=>{ + var o = "function" == typeof Map && Map.prototype, n = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = o && n && "function" == typeof n.get ? n.get : null, a = o && Map.prototype.forEach, p = "function" == typeof Set && Set.prototype, c = Object.getOwnPropertyDescriptor && p ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, u = p && c && "function" == typeof c.get ? c.get : null, f = p && Set.prototype.forEach, y = "function" == typeof WeakMap && WeakMap.prototype ? WeakMap.prototype.has : null, l = "function" == typeof WeakSet && WeakSet.prototype ? WeakSet.prototype.has : null, s = "function" == typeof WeakRef && WeakRef.prototype ? WeakRef.prototype.deref : null, d = Boolean.prototype.valueOf, b = Object.prototype.toString, g = Function.prototype.toString, h = String.prototype.match, m = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, v = Object.getOwnPropertySymbols, S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol.prototype.toString : null, A = "function" == typeof Symbol && "object" == typeof Symbol.iterator, O = Object.prototype.propertyIsEnumerable, j = ("function" == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { + return t.__proto__; + } : null), P = r(794).custom, x = P && I(P) ? P : null, w = "function" == typeof Symbol && void 0 !== Symbol.toStringTag ? Symbol.toStringTag : null; + function E(t, e, r) { + var o = "double" === (r.quoteStyle || e) ? '"' : "'"; + return o + t + o; + } + function F(t) { + return !("[object Array]" !== R(t) || w && "object" == typeof t && w in t); + } + function I(t) { + if (A) return t && "object" == typeof t && t instanceof Symbol; + if ("symbol" == typeof t) return !0; + if (!t || "object" != typeof t || !S) return !1; + try { + return S.call(t), !0; + } catch (e) {} + return !1; + } + t.exports = function t(e, r, o, n) { + var p = r || {}; + if (_(p, "quoteStyle") && "single" !== p.quoteStyle && "double" !== p.quoteStyle) throw TypeError('option "quoteStyle" must be "single" or "double"'); + if (_(p, "maxStringLength") && ("number" == typeof p.maxStringLength ? p.maxStringLength < 0 && p.maxStringLength !== 1 / 0 : null !== p.maxStringLength)) throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + var c = !_(p, "customInspect") || p.customInspect; + if ("boolean" != typeof c && "symbol" !== c) throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + if (_(p, "indent") && null !== p.indent && "\t" !== p.indent && !(parseInt(p.indent, 10) === p.indent && p.indent > 0)) throw TypeError('options "indent" must be "\\t", an integer > 0, or `null`'); + if (void 0 === e) return "undefined"; + if (null === e) return "null"; + if ("boolean" == typeof e) return e ? "true" : "false"; + if ("string" == typeof e) return function t(e, r) { + if (e.length > r.maxStringLength) { + var o = e.length - r.maxStringLength; + return t(e.slice(0, r.maxStringLength), r) + "... " + o + " more character" + (o > 1 ? "s" : ""); + } + return E(e.replace(/(['\\])/g, "\\$1").replace(/[\x00-\x1f]/g, U), "single", r); + }(e, p); + if ("number" == typeof e) return 0 === e ? 1 / 0 / e > 0 ? "0" : "-0" : String(e); + if ("bigint" == typeof e) return String(e) + "n"; + var b = void 0 === p.depth ? 5 : p.depth; + if (void 0 === o && (o = 0), o >= b && b > 0 && "object" == typeof e) return F(e) ? "[Array]" : "[Object]"; + var v = function(t, e) { + var r; + if ("\t" === t.indent) r = "\t"; + else { + if (!("number" == typeof t.indent && t.indent > 0)) return null; + r = Array(t.indent + 1).join(" "); + } + return { + base: r, + prev: Array(e + 1).join(r) + }; + }(p, o); + if (void 0 === n) n = []; + else if (M(n, e) >= 0) return "[Circular]"; + function O(e, r, i) { + if (r && (n = n.slice()).push(r), i) { + var a = { + depth: p.depth + }; + return _(p, "quoteStyle") && (a.quoteStyle = p.quoteStyle), t(e, a, o + 1, n); + } + return t(e, p, o + 1, n); } - t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 8: (t)=>{ - function e(r) { - return "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? (t.exports = e = function(t) { - return typeof t; - }, t.exports.default = t.exports, t.exports.__esModule = !0) : (t.exports = e = function(t) { - return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; - }, t.exports.default = t.exports, t.exports.__esModule = !0), e(r); + if ("function" == typeof e) { + var P = function(t) { + if (t.name) return t.name; + var e = h.call(g.call(t), /^function\s*([\w$]+)/); + return e ? e[1] : null; + }(e), k = C(e, O); + return "[Function" + (P ? ": " + P : " (anonymous)") + "]" + (k.length > 0 ? " { " + k.join(", ") + " }" : ""); } - t.exports = e, t.exports.default = t.exports, t.exports.__esModule = !0; - }, - 924: (t, e, r)=>{ - "use strict"; - var o = r(210), n = r(559), i = n(o("String.prototype.indexOf")); - t.exports = function(t, e) { - var r = o(t, !!e); - return "function" == typeof r && i(t, ".prototype.") > -1 ? n(r) : r; - }; - }, - 559: (t, e, r)=>{ - "use strict"; - var o = r(612), n = r(210), i = n("%Function.prototype.apply%"), a = n("%Function.prototype.call%"), p = n("%Reflect.apply%", !0) || o.call(a, i), c = n("%Object.getOwnPropertyDescriptor%", !0), u = n("%Object.defineProperty%", !0), f = n("%Math.max%"); - if (u) try { - u({}, "a", { - value: 1 - }); - } catch (y) { - u = null; + if (I(e)) { + var W = A ? String(e).replace(/^(Symbol\(.*\))_[^)]*$/, "$1") : S.call(e); + return "object" != typeof e || A ? W : N(W); } - t.exports = function(t) { - var e = p(o, a, arguments); - return c && u && c(e, "length").configurable && u(e, "length", { - value: 1 + f(0, t.length - (arguments.length - 1)) - }), e; - }; - var l = function() { - return p(o, i, arguments); - }; - u ? u(t.exports, "apply", { - value: l - }) : t.exports.apply = l; - }, - 729: (t)=>{ - "use strict"; - var e = Object.prototype.hasOwnProperty, r = "~"; - function o() {} - function n(t, e, r) { - this.fn = t, this.context = e, this.once = r || !1; + if (e && "object" == typeof e && ("undefined" != typeof HTMLElement && e instanceof HTMLElement || "string" == typeof e.nodeName && "function" == typeof e.getAttribute)) { + for(var G = "<" + String(e.nodeName).toLowerCase(), z = e.attributes || [], L = 0; L < z.length; L++)G += " " + z[L].name + "=" + E(String(z[L].value).replace(/"/g, """), "double", p); + return G += ">", e.childNodes && e.childNodes.length && (G += "..."), G + ""; } - function i(t, e, o, i, a) { - if ("function" != typeof o) throw TypeError("The listener must be a function"); - var p = new n(o, i || t, a), c = r ? r + e : e; - return t._events[c] ? t._events[c].fn ? t._events[c] = [ - t._events[c], - p - ] : t._events[c].push(p) : (t._events[c] = p, t._eventsCount++), t; + if (F(e)) { + if (0 === e.length) return "[]"; + var V = C(e, O); + return v && !function(t) { + for(var e = 0; e < t.length; e++)if (M(t[e], "\n") >= 0) return !1; + return !0; + }(V) ? "[" + T(V, v) + "]" : "[ " + V.join(", ") + " ]"; } - function a(t, e) { - 0 == --t._eventsCount ? t._events = new o : delete t._events[e]; + if (!("[object Error]" !== R(e) || w && "object" == typeof e && w in e)) { + var $ = C(e, O); + return 0 === $.length ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + $.join(", ") + " }"; } - function p() { - this._events = new o, this._eventsCount = 0; + if ("object" == typeof e && c) { + if (x && "function" == typeof e[x]) return e[x](); + if ("symbol" !== c && "function" == typeof e.inspect) return e.inspect(); } - Object.create && (o.prototype = Object.create(null), (new o).__proto__ || (r = !1)), p.prototype.eventNames = function() { - var t, o, n = []; - if (0 === this._eventsCount) return n; - for(o in t = this._events)e.call(t, o) && n.push(r ? o.slice(1) : o); - return Object.getOwnPropertySymbols ? n.concat(Object.getOwnPropertySymbols(t)) : n; - }, p.prototype.listeners = function(t) { - var e = r ? r + t : t, o = this._events[e]; - if (!o) return []; - if (o.fn) return [ - o.fn - ]; - for(var n = 0, i = o.length, a = Array(i); n < i; n++)a[n] = o[n].fn; - return a; - }, p.prototype.listenerCount = function(t) { - var e = r ? r + t : t, o = this._events[e]; - return o ? o.fn ? 1 : o.length : 0; - }, p.prototype.emit = function(t, e, o, n, i, a) { - var p = r ? r + t : t; - if (!this._events[p]) return !1; - var c, u, f = this._events[p], y = arguments.length; - if (f.fn) { - switch(f.once && this.removeListener(t, f.fn, void 0, !0), y){ - case 1: - return f.fn.call(f.context), !0; - case 2: - return f.fn.call(f.context, e), !0; - case 3: - return f.fn.call(f.context, e, o), !0; - case 4: - return f.fn.call(f.context, e, o, n), !0; - case 5: - return f.fn.call(f.context, e, o, n, i), !0; - case 6: - return f.fn.call(f.context, e, o, n, i, a), !0; - } - for(u = 1, c = Array(y - 1); u < y; u++)c[u - 1] = arguments[u]; - f.fn.apply(f.context, c); - } else { - var l, s = f.length; - for(u = 0; u < s; u++)switch(f[u].once && this.removeListener(t, f[u].fn, void 0, !0), y){ - case 1: - f[u].fn.call(f[u].context); - break; - case 2: - f[u].fn.call(f[u].context, e); - break; - case 3: - f[u].fn.call(f[u].context, e, o); - break; - case 4: - f[u].fn.call(f[u].context, e, o, n); - break; - default: - if (!c) for(l = 1, c = Array(y - 1); l < y; l++)c[l - 1] = arguments[l]; - f[u].fn.apply(f[u].context, c); - } - } - return !0; - }, p.prototype.on = function(t, e, r) { - return i(this, t, e, r, !1); - }, p.prototype.once = function(t, e, r) { - return i(this, t, e, r, !0); - }, p.prototype.removeListener = function(t, e, o, n) { - var i = r ? r + t : t; - if (!this._events[i]) return this; - if (!e) return a(this, i), this; - var p = this._events[i]; - if (p.fn) p.fn !== e || n && !p.once || o && p.context !== o || a(this, i); - else { - for(var c = 0, u = [], f = p.length; c < f; c++)(p[c].fn !== e || n && !p[c].once || o && p[c].context !== o) && u.push(p[c]); - u.length ? this._events[i] = 1 === u.length ? u[0] : u : a(this, i); - } - return this; - }, p.prototype.removeAllListeners = function(t) { - var e; - return t ? (e = r ? r + t : t, this._events[e] && a(this, e)) : (this._events = new o, this._eventsCount = 0), this; - }, p.prototype.off = p.prototype.removeListener, p.prototype.addListener = p.prototype.on, p.prefixed = r, p.EventEmitter = p, t.exports = p; - }, - 648: (t)=>{ - "use strict"; - var e = Array.prototype.slice, r = Object.prototype.toString; - t.exports = function(t) { - var o = this; - if ("function" != typeof o || "[object Function]" !== r.call(o)) throw TypeError("Function.prototype.bind called on incompatible " + o); - for(var n, i = e.call(arguments, 1), a = Math.max(0, o.length - i.length), p = [], c = 0; c < a; c++)p.push("$" + c); - if (n = Function("binder", "return function (" + p.join(",") + "){ return binder.apply(this,arguments); }")(function() { - if (this instanceof n) { - var r = o.apply(this, i.concat(e.call(arguments))); - return Object(r) === r ? r : this; + if (function(t) { + if (!i || !t || "object" != typeof t) return !1; + try { + i.call(t); + try { + u.call(t); + } catch (e) { + return !0; } - return o.apply(t, i.concat(e.call(arguments))); - }), o.prototype) { - var u = function() {}; - u.prototype = o.prototype, n.prototype = new u, u.prototype = null; - } - return n; - }; - }, - 612: (t, e, r)=>{ - "use strict"; - var o = r(648); - t.exports = Function.prototype.bind || o; - }, - 210: (t, e, r)=>{ - "use strict"; - var o, n = SyntaxError, i = Function, a = TypeError, p = function(t) { + return t instanceof Map; + } catch (r) {} + return !1; + }(e)) { + var J = []; + return a.call(e, function(t, r) { + J.push(O(r, e, !0) + " => " + O(t, e)); + }), D("Map", i.call(e), J, v); + } + if (function(t) { + if (!u || !t || "object" != typeof t) return !1; try { - return i('"use strict"; return (' + t + ").constructor;")(); - } catch (e) {} - }, c = Object.getOwnPropertyDescriptor; - if (c) try { - c({}, ""); - } catch (u) { - c = null; + u.call(t); + try { + i.call(t); + } catch (e) { + return !0; + } + return t instanceof Set; + } catch (r) {} + return !1; + }(e)) { + var H = []; + return f.call(e, function(t) { + H.push(O(t, e)); + }), D("Set", u.call(e), H, v); } - var f = function() { - throw new a; - }, y = c ? function() { + if (function(t) { + if (!y || !t || "object" != typeof t) return !1; try { - return f; - } catch (e) { + y.call(t, y); try { - return c(arguments, "callee").get; - } catch (t) { - return f; + l.call(t, l); + } catch (e) { + return !0; } - } - }() : f, l = r(405)(), s = Object.getPrototypeOf || function(t) { - return t.__proto__; - }, d = {}, b = "undefined" == typeof Uint8Array ? o : s(Uint8Array), g = { - "%AggregateError%": "undefined" == typeof AggregateError ? o : AggregateError, - "%Array%": Array, - "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? o : ArrayBuffer, - "%ArrayIteratorPrototype%": l ? s([][Symbol.iterator]()) : o, - "%AsyncFromSyncIteratorPrototype%": o, - "%AsyncFunction%": d, - "%AsyncGenerator%": d, - "%AsyncGeneratorFunction%": d, - "%AsyncIteratorPrototype%": d, - "%Atomics%": "undefined" == typeof Atomics ? o : Atomics, - "%BigInt%": "undefined" == typeof BigInt ? o : BigInt, - "%Boolean%": Boolean, - "%DataView%": "undefined" == typeof DataView ? o : DataView, - "%Date%": Date, - "%decodeURI%": decodeURI, - "%decodeURIComponent%": decodeURIComponent, - "%encodeURI%": encodeURI, - "%encodeURIComponent%": encodeURIComponent, - "%Error%": Error, - "%eval%": eval, - "%EvalError%": EvalError, - "%Float32Array%": "undefined" == typeof Float32Array ? o : Float32Array, - "%Float64Array%": "undefined" == typeof Float64Array ? o : Float64Array, - "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? o : FinalizationRegistry, - "%Function%": i, - "%GeneratorFunction%": d, - "%Int8Array%": "undefined" == typeof Int8Array ? o : Int8Array, - "%Int16Array%": "undefined" == typeof Int16Array ? o : Int16Array, - "%Int32Array%": "undefined" == typeof Int32Array ? o : Int32Array, - "%isFinite%": isFinite, - "%isNaN%": isNaN, - "%IteratorPrototype%": l ? s(s([][Symbol.iterator]())) : o, - "%JSON%": "object" == typeof JSON ? JSON : o, - "%Map%": "undefined" == typeof Map ? o : Map, - "%MapIteratorPrototype%": "undefined" != typeof Map && l ? s((new Map)[Symbol.iterator]()) : o, - "%Math%": Math, - "%Number%": Number, - "%Object%": Object, - "%parseFloat%": parseFloat, - "%parseInt%": parseInt, - "%Promise%": "undefined" == typeof Promise ? o : Promise, - "%Proxy%": "undefined" == typeof Proxy ? o : Proxy, - "%RangeError%": RangeError, - "%ReferenceError%": ReferenceError, - "%Reflect%": "undefined" == typeof Reflect ? o : Reflect, - "%RegExp%": RegExp, - "%Set%": "undefined" == typeof Set ? o : Set, - "%SetIteratorPrototype%": "undefined" != typeof Set && l ? s((new Set)[Symbol.iterator]()) : o, - "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? o : SharedArrayBuffer, - "%String%": String, - "%StringIteratorPrototype%": l ? s(""[Symbol.iterator]()) : o, - "%Symbol%": l ? Symbol : o, - "%SyntaxError%": n, - "%ThrowTypeError%": y, - "%TypedArray%": b, - "%TypeError%": a, - "%Uint8Array%": "undefined" == typeof Uint8Array ? o : Uint8Array, - "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? o : Uint8ClampedArray, - "%Uint16Array%": "undefined" == typeof Uint16Array ? o : Uint16Array, - "%Uint32Array%": "undefined" == typeof Uint32Array ? o : Uint32Array, - "%URIError%": URIError, - "%WeakMap%": "undefined" == typeof WeakMap ? o : WeakMap, - "%WeakRef%": "undefined" == typeof WeakRef ? o : WeakRef, - "%WeakSet%": "undefined" == typeof WeakSet ? o : WeakSet - }, h = function t(e) { - var r; - if ("%AsyncFunction%" === e) r = p("async function () {}"); - else if ("%GeneratorFunction%" === e) r = p("function* () {}"); - else if ("%AsyncGeneratorFunction%" === e) r = p("async function* () {}"); - else if ("%AsyncGenerator%" === e) { - var o = t("%AsyncGeneratorFunction%"); - o && (r = o.prototype); - } else if ("%AsyncIteratorPrototype%" === e) { - var n = t("%AsyncGenerator%"); - n && (r = s(n.prototype)); - } - return g[e] = r, r; - }, m = { - "%ArrayBufferPrototype%": [ - "ArrayBuffer", - "prototype" - ], - "%ArrayPrototype%": [ - "Array", - "prototype" - ], - "%ArrayProto_entries%": [ - "Array", - "prototype", - "entries" - ], - "%ArrayProto_forEach%": [ - "Array", - "prototype", - "forEach" - ], - "%ArrayProto_keys%": [ - "Array", - "prototype", - "keys" - ], - "%ArrayProto_values%": [ - "Array", - "prototype", - "values" - ], - "%AsyncFunctionPrototype%": [ - "AsyncFunction", - "prototype" - ], - "%AsyncGenerator%": [ - "AsyncGeneratorFunction", - "prototype" - ], - "%AsyncGeneratorPrototype%": [ - "AsyncGeneratorFunction", - "prototype", - "prototype" - ], - "%BooleanPrototype%": [ - "Boolean", - "prototype" - ], - "%DataViewPrototype%": [ - "DataView", - "prototype" - ], - "%DatePrototype%": [ - "Date", - "prototype" - ], - "%ErrorPrototype%": [ - "Error", - "prototype" - ], - "%EvalErrorPrototype%": [ - "EvalError", - "prototype" - ], - "%Float32ArrayPrototype%": [ - "Float32Array", - "prototype" - ], - "%Float64ArrayPrototype%": [ - "Float64Array", - "prototype" - ], - "%FunctionPrototype%": [ - "Function", - "prototype" - ], - "%Generator%": [ - "GeneratorFunction", - "prototype" - ], - "%GeneratorPrototype%": [ - "GeneratorFunction", - "prototype", - "prototype" - ], - "%Int8ArrayPrototype%": [ - "Int8Array", - "prototype" - ], - "%Int16ArrayPrototype%": [ - "Int16Array", - "prototype" - ], - "%Int32ArrayPrototype%": [ - "Int32Array", - "prototype" - ], - "%JSONParse%": [ - "JSON", - "parse" - ], - "%JSONStringify%": [ - "JSON", - "stringify" - ], - "%MapPrototype%": [ - "Map", - "prototype" - ], - "%NumberPrototype%": [ - "Number", - "prototype" - ], - "%ObjectPrototype%": [ - "Object", - "prototype" - ], - "%ObjProto_toString%": [ - "Object", - "prototype", - "toString" - ], - "%ObjProto_valueOf%": [ - "Object", - "prototype", - "valueOf" - ], - "%PromisePrototype%": [ - "Promise", - "prototype" - ], - "%PromiseProto_then%": [ - "Promise", - "prototype", - "then" - ], - "%Promise_all%": [ - "Promise", - "all" - ], - "%Promise_reject%": [ - "Promise", - "reject" - ], - "%Promise_resolve%": [ - "Promise", - "resolve" - ], - "%RangeErrorPrototype%": [ - "RangeError", - "prototype" - ], - "%ReferenceErrorPrototype%": [ - "ReferenceError", - "prototype" - ], - "%RegExpPrototype%": [ - "RegExp", - "prototype" - ], - "%SetPrototype%": [ - "Set", - "prototype" - ], - "%SharedArrayBufferPrototype%": [ - "SharedArrayBuffer", - "prototype" - ], - "%StringPrototype%": [ - "String", - "prototype" - ], - "%SymbolPrototype%": [ - "Symbol", - "prototype" - ], - "%SyntaxErrorPrototype%": [ - "SyntaxError", - "prototype" - ], - "%TypedArrayPrototype%": [ - "TypedArray", - "prototype" - ], - "%TypeErrorPrototype%": [ - "TypeError", - "prototype" - ], - "%Uint8ArrayPrototype%": [ - "Uint8Array", - "prototype" - ], - "%Uint8ClampedArrayPrototype%": [ - "Uint8ClampedArray", - "prototype" - ], - "%Uint16ArrayPrototype%": [ - "Uint16Array", - "prototype" - ], - "%Uint32ArrayPrototype%": [ - "Uint32Array", - "prototype" - ], - "%URIErrorPrototype%": [ - "URIError", - "prototype" - ], - "%WeakMapPrototype%": [ - "WeakMap", - "prototype" - ], - "%WeakSetPrototype%": [ - "WeakSet", - "prototype" - ] - }, v = r(612), S = r(642), A = v.call(Function.call, Array.prototype.concat), O = v.call(Function.apply, Array.prototype.splice), j = v.call(Function.call, String.prototype.replace), P = v.call(Function.call, String.prototype.slice), x = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, w = /\\(\\)?/g, E = function(t) { - var e = P(t, 0, 1), r = P(t, -1); - if ("%" === e && "%" !== r) throw new n("invalid intrinsic syntax, expected closing `%`"); - if ("%" === r && "%" !== e) throw new n("invalid intrinsic syntax, expected opening `%`"); - var o = []; - return j(t, x, function(t, e, r, n) { - o[o.length] = r ? j(n, w, "$1") : e || t; - }), o; - }, F = function(t, e) { - var r, o = t; - if (S(m, o) && (o = "%" + (r = m[o])[0] + "%"), S(g, o)) { - var i = g[o]; - if (i === d && (i = h(o)), void 0 === i && !e) throw new a("intrinsic " + t + " exists, but is not available. Please file an issue!"); - return { - alias: r, - name: o, - value: i - }; - } - throw new n("intrinsic " + t + " does not exist!"); - }; - t.exports = function(t, e) { - if ("string" != typeof t || 0 === t.length) throw new a("intrinsic name must be a non-empty string"); - if (arguments.length > 1 && "boolean" != typeof e) throw new a('"allowMissing" argument must be a boolean'); - var r = E(t), o = r.length > 0 ? r[0] : "", i = F("%" + o + "%", e), p = i.name, u = i.value, f = !1, y = i.alias; - y && (o = y[0], O(r, A([ - 0, - 1 - ], y))); - for(var l = 1, s = !0; l < r.length; l += 1){ - var d = r[l], b = P(d, 0, 1), h = P(d, -1); - if (('"' === b || "'" === b || "`" === b || '"' === h || "'" === h || "`" === h) && b !== h) throw new n("property names with quotes must have matching quotes"); - if ("constructor" !== d && s || (f = !0), S(g, p = "%" + (o += "." + d) + "%")) u = g[p]; - else if (null != u) { - if (!(d in u)) { - if (!e) throw new a("base intrinsic for " + t + " exists, but the property is not available."); - return; - } - if (c && l + 1 >= r.length) { - var m = c(u, d); - u = (s = !!m) && "get" in m && !("originalValue" in m.get) ? m.get : u[d]; - } else s = S(u, d), u = u[d]; - s && !f && (g[p] = u); + return t instanceof WeakMap; + } catch (r) {} + return !1; + }(e)) return B("WeakMap"); + if (function(t) { + if (!l || !t || "object" != typeof t) return !1; + try { + l.call(t, l); + try { + y.call(t, y); + } catch (e) { + return !0; } - } - return u; - }; - }, - 405: (t, e, r)=>{ - "use strict"; - var o = "undefined" != typeof Symbol && Symbol, n = r(419); - t.exports = function() { - return "function" == typeof o && "function" == typeof Symbol && "symbol" == typeof o("foo") && "symbol" == typeof Symbol("bar") && n(); - }; - }, - 419: (t)=>{ - "use strict"; - t.exports = function() { - if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; - if ("symbol" == typeof Symbol.iterator) return !0; - var t = {}, e = Symbol("test"), r = Object(e); - if ("string" == typeof e || "[object Symbol]" !== Object.prototype.toString.call(e) || "[object Symbol]" !== Object.prototype.toString.call(r)) return !1; - for(e in t[e] = 42, t)return !1; - if ("function" == typeof Object.keys && 0 !== Object.keys(t).length || "function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(t).length) return !1; - var o = Object.getOwnPropertySymbols(t); - if (1 !== o.length || o[0] !== e || !Object.prototype.propertyIsEnumerable.call(t, e)) return !1; - if ("function" == typeof Object.getOwnPropertyDescriptor) { - var n = Object.getOwnPropertyDescriptor(t, e); - if (42 !== n.value || !0 !== n.enumerable) return !1; - } - return !0; - }; - }, - 642: (t, e, r)=>{ - "use strict"; - var o = r(612); - t.exports = o.call(Function.call, Object.prototype.hasOwnProperty); - }, - 631: (t, e, r)=>{ - var o = "function" == typeof Map && Map.prototype, n = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = o && n && "function" == typeof n.get ? n.get : null, a = o && Map.prototype.forEach, p = "function" == typeof Set && Set.prototype, c = Object.getOwnPropertyDescriptor && p ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, u = p && c && "function" == typeof c.get ? c.get : null, f = p && Set.prototype.forEach, y = "function" == typeof WeakMap && WeakMap.prototype ? WeakMap.prototype.has : null, l = "function" == typeof WeakSet && WeakSet.prototype ? WeakSet.prototype.has : null, s = "function" == typeof WeakRef && WeakRef.prototype ? WeakRef.prototype.deref : null, d = Boolean.prototype.valueOf, b = Object.prototype.toString, g = Function.prototype.toString, h = String.prototype.match, m = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, v = Object.getOwnPropertySymbols, S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol.prototype.toString : null, A = "function" == typeof Symbol && "object" == typeof Symbol.iterator, O = Object.prototype.propertyIsEnumerable, j = ("function" == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { - return t.__proto__; - } : null), P = r(794).custom, x = P && I(P) ? P : null, w = "function" == typeof Symbol && void 0 !== Symbol.toStringTag ? Symbol.toStringTag : null; - function E(t, e, r) { - var o = "double" === (r.quoteStyle || e) ? '"' : "'"; - return o + t + o; - } - function F(t) { - return !("[object Array]" !== R(t) || w && "object" == typeof t && w in t); - } - function I(t) { - if (A) return t && "object" == typeof t && t instanceof Symbol; - if ("symbol" == typeof t) return !0; - if (!t || "object" != typeof t || !S) return !1; + return t instanceof WeakSet; + } catch (r) {} + return !1; + }(e)) return B("WeakSet"); + if (function(t) { + if (!s || !t || "object" != typeof t) return !1; + try { + return s.call(t), !0; + } catch (e) {} + return !1; + }(e)) return B("WeakRef"); + if (!("[object Number]" !== R(e) || w && "object" == typeof e && w in e)) return N(O(Number(e))); + if (function(t) { + if (!t || "object" != typeof t || !m) return !1; try { - return S.call(t), !0; + return m.call(t), !0; } catch (e) {} return !1; + }(e)) return N(O(m.call(e))); + if (!("[object Boolean]" !== R(e) || w && "object" == typeof e && w in e)) return N(d.call(e)); + if (!("[object String]" !== R(e) || w && "object" == typeof e && w in e)) return N(O(String(e))); + if (("[object Date]" !== R(e) || w && "object" == typeof e && w in e) && ("[object RegExp]" !== R(e) || w && "object" == typeof e && w in e)) { + var q = C(e, O), Q = j ? j(e) === Object.prototype : e instanceof Object || e.constructor === Object, Z = e instanceof Object ? "" : "null prototype", K = !Q && w && Object(e) === e && w in e ? R(e).slice(8, -1) : Z ? "Object" : "", X = (Q || "function" != typeof e.constructor ? "" : e.constructor.name ? e.constructor.name + " " : "") + (K || Z ? "[" + [].concat(K || [], Z || []).join(": ") + "] " : ""); + return 0 === q.length ? X + "{}" : v ? X + "{" + T(q, v) + "}" : X + "{ " + q.join(", ") + " }"; } - t.exports = function t(e, r, o, n) { - var p = r || {}; - if (_(p, "quoteStyle") && "single" !== p.quoteStyle && "double" !== p.quoteStyle) throw TypeError('option "quoteStyle" must be "single" or "double"'); - if (_(p, "maxStringLength") && ("number" == typeof p.maxStringLength ? p.maxStringLength < 0 && p.maxStringLength !== 1 / 0 : null !== p.maxStringLength)) throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - var c = !_(p, "customInspect") || p.customInspect; - if ("boolean" != typeof c && "symbol" !== c) throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); - if (_(p, "indent") && null !== p.indent && "\t" !== p.indent && !(parseInt(p.indent, 10) === p.indent && p.indent > 0)) throw TypeError('options "indent" must be "\\t", an integer > 0, or `null`'); - if (void 0 === e) return "undefined"; - if (null === e) return "null"; - if ("boolean" == typeof e) return e ? "true" : "false"; - if ("string" == typeof e) return function t(e, r) { - if (e.length > r.maxStringLength) { - var o = e.length - r.maxStringLength; - return t(e.slice(0, r.maxStringLength), r) + "... " + o + " more character" + (o > 1 ? "s" : ""); - } - return E(e.replace(/(['\\])/g, "\\$1").replace(/[\x00-\x1f]/g, U), "single", r); - }(e, p); - if ("number" == typeof e) return 0 === e ? 1 / 0 / e > 0 ? "0" : "-0" : String(e); - if ("bigint" == typeof e) return String(e) + "n"; - var b = void 0 === p.depth ? 5 : p.depth; - if (void 0 === o && (o = 0), o >= b && b > 0 && "object" == typeof e) return F(e) ? "[Array]" : "[Object]"; - var v = function(t, e) { - var r; - if ("\t" === t.indent) r = "\t"; - else { - if (!("number" == typeof t.indent && t.indent > 0)) return null; - r = Array(t.indent + 1).join(" "); - } - return { - base: r, - prev: Array(e + 1).join(r) - }; - }(p, o); - if (void 0 === n) n = []; - else if (M(n, e) >= 0) return "[Circular]"; - function O(e, r, i) { - if (r && (n = n.slice()).push(r), i) { - var a = { - depth: p.depth - }; - return _(p, "quoteStyle") && (a.quoteStyle = p.quoteStyle), t(e, a, o + 1, n); - } - return t(e, p, o + 1, n); - } - if ("function" == typeof e) { - var P = function(t) { - if (t.name) return t.name; - var e = h.call(g.call(t), /^function\s*([\w$]+)/); - return e ? e[1] : null; - }(e), k = C(e, O); - return "[Function" + (P ? ": " + P : " (anonymous)") + "]" + (k.length > 0 ? " { " + k.join(", ") + " }" : ""); - } - if (I(e)) { - var W = A ? String(e).replace(/^(Symbol\(.*\))_[^)]*$/, "$1") : S.call(e); - return "object" != typeof e || A ? W : N(W); - } - if (e && "object" == typeof e && ("undefined" != typeof HTMLElement && e instanceof HTMLElement || "string" == typeof e.nodeName && "function" == typeof e.getAttribute)) { - for(var G = "<" + String(e.nodeName).toLowerCase(), z = e.attributes || [], L = 0; L < z.length; L++)G += " " + z[L].name + "=" + E(String(z[L].value).replace(/"/g, """), "double", p); - return G += ">", e.childNodes && e.childNodes.length && (G += "..."), G + ""; - } - if (F(e)) { - if (0 === e.length) return "[]"; - var V = C(e, O); - return v && !function(t) { - for(var e = 0; e < t.length; e++)if (M(t[e], "\n") >= 0) return !1; - return !0; - }(V) ? "[" + T(V, v) + "]" : "[ " + V.join(", ") + " ]"; - } - if (!("[object Error]" !== R(e) || w && "object" == typeof e && w in e)) { - var $ = C(e, O); - return 0 === $.length ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + $.join(", ") + " }"; - } - if ("object" == typeof e && c) { - if (x && "function" == typeof e[x]) return e[x](); - if ("symbol" !== c && "function" == typeof e.inspect) return e.inspect(); + return String(e); + }; + var k = Object.prototype.hasOwnProperty || function(t) { + return t in this; + }; + function _(t, e) { + return k.call(t, e); + } + function R(t) { + return b.call(t); + } + function M(t, e) { + if (t.indexOf) return t.indexOf(e); + for(var r = 0, o = t.length; r < o; r++)if (t[r] === e) return r; + return -1; + } + function U(t) { + var e = t.charCodeAt(0), r = { + 8: "b", + 9: "t", + 10: "n", + 12: "f", + 13: "r" + }[e]; + return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + e.toString(16).toUpperCase(); + } + function N(t) { + return "Object(" + t + ")"; + } + function B(t) { + return t + " { ? }"; + } + function D(t, e, r, o) { + return t + " (" + e + ") {" + (o ? T(r, o) : r.join(", ")) + "}"; + } + function T(t, e) { + if (0 === t.length) return ""; + var r = "\n" + e.prev + e.base; + return r + t.join("," + r) + "\n" + e.prev; + } + function C(t, e) { + var r = F(t), o = []; + if (r) { + o.length = t.length; + for(var n = 0; n < t.length; n++)o[n] = _(t, n) ? e(t[n], t) : ""; + } + var i, a = "function" == typeof v ? v(t) : []; + if (A) { + i = {}; + for(var p = 0; p < a.length; p++)i["$" + a[p]] = a[p]; + } + for(var c in t)_(t, c) && (r && String(Number(c)) === c && c < t.length || A && i["$" + c] instanceof Symbol || (/[^\w$]/.test(c) ? o.push(e(c, t) + ": " + e(t[c], t)) : o.push(c + ": " + e(t[c], t)))); + if ("function" == typeof v) for(var u = 0; u < a.length; u++)O.call(t, a[u]) && o.push("[" + e(a[u]) + "]: " + e(t[a[u]], t)); + return o; + } + }, + 794: (t, e, r)=>{ + t.exports = r(669).inspect; + }, + 798: (t)=>{ + "use strict"; + var e = String.prototype.replace, r = /%20/g, o = "RFC3986"; + t.exports = { + default: o, + formatters: { + RFC1738: function(t) { + return e.call(t, r, "+"); + }, + RFC3986: function(t) { + return String(t); } - if (function(t) { - if (!i || !t || "object" != typeof t) return !1; - try { - i.call(t); - try { - u.call(t); - } catch (e) { - return !0; - } - return t instanceof Map; - } catch (r) {} - return !1; - }(e)) { - var J = []; - return a.call(e, function(t, r) { - J.push(O(r, e, !0) + " => " + O(t, e)); - }), D("Map", i.call(e), J, v); + }, + RFC1738: "RFC1738", + RFC3986: o + }; + }, + 129: (t, e, r)=>{ + "use strict"; + var o = r(261), n = r(235), i = r(798); + t.exports = { + formats: i, + parse: n, + stringify: o + }; + }, + 235: (t, e, r)=>{ + "use strict"; + var o = r(769), n = Object.prototype.hasOwnProperty, i = Array.isArray, a = { + allowDots: !1, + allowPrototypes: !1, + allowSparse: !1, + arrayLimit: 20, + charset: "utf-8", + charsetSentinel: !1, + comma: !1, + decoder: o.decode, + delimiter: "&", + depth: 5, + ignoreQueryPrefix: !1, + interpretNumericEntities: !1, + parameterLimit: 1e3, + parseArrays: !0, + plainObjects: !1, + strictNullHandling: !1 + }, p = function(t, e) { + return t && "string" == typeof t && e.comma && t.indexOf(",") > -1 ? t.split(",") : t; + }, c = function(t, e, r, o) { + if (t) { + var i = r.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, a = /(\[[^[\]]*])/g, c = r.depth > 0 && /(\[[^[\]]*])/.exec(i), u = c ? i.slice(0, c.index) : i, f = []; + if (u) { + if (!r.plainObjects && n.call(Object.prototype, u) && !r.allowPrototypes) return; + f.push(u); } - if (function(t) { - if (!u || !t || "object" != typeof t) return !1; - try { - u.call(t); - try { - i.call(t); - } catch (e) { - return !0; - } - return t instanceof Set; - } catch (r) {} - return !1; - }(e)) { - var H = []; - return f.call(e, function(t) { - H.push(O(t, e)); - }), D("Set", u.call(e), H, v); + for(var y = 0; r.depth > 0 && null !== (c = a.exec(i)) && y < r.depth;){ + if (y += 1, !r.plainObjects && n.call(Object.prototype, c[1].slice(1, -1)) && !r.allowPrototypes) return; + f.push(c[1]); } - if (function(t) { - if (!y || !t || "object" != typeof t) return !1; - try { - y.call(t, y); - try { - l.call(t, l); - } catch (e) { - return !0; - } - return t instanceof WeakMap; - } catch (r) {} - return !1; - }(e)) return B("WeakMap"); - if (function(t) { - if (!l || !t || "object" != typeof t) return !1; - try { - l.call(t, l); - try { - y.call(t, y); - } catch (e) { - return !0; + return c && f.push("[" + i.slice(c.index) + "]"), function(t, e, r, o) { + for(var n = o ? e : p(e, r), i = t.length - 1; i >= 0; --i){ + var a, c = t[i]; + if ("[]" === c && r.parseArrays) a = [].concat(n); + else { + a = r.plainObjects ? Object.create(null) : {}; + var u = "[" === c.charAt(0) && "]" === c.charAt(c.length - 1) ? c.slice(1, -1) : c, f = parseInt(u, 10); + r.parseArrays || "" !== u ? !isNaN(f) && c !== u && String(f) === u && f >= 0 && r.parseArrays && f <= r.arrayLimit ? (a = [])[f] = n : a[u] = n : a = { + 0: n + }; } - return t instanceof WeakSet; - } catch (r) {} - return !1; - }(e)) return B("WeakSet"); - if (function(t) { - if (!s || !t || "object" != typeof t) return !1; - try { - return s.call(t), !0; - } catch (e) {} - return !1; - }(e)) return B("WeakRef"); - if (!("[object Number]" !== R(e) || w && "object" == typeof e && w in e)) return N(O(Number(e))); - if (function(t) { - if (!t || "object" != typeof t || !m) return !1; - try { - return m.call(t), !0; - } catch (e) {} - return !1; - }(e)) return N(O(m.call(e))); - if (!("[object Boolean]" !== R(e) || w && "object" == typeof e && w in e)) return N(d.call(e)); - if (!("[object String]" !== R(e) || w && "object" == typeof e && w in e)) return N(O(String(e))); - if (("[object Date]" !== R(e) || w && "object" == typeof e && w in e) && ("[object RegExp]" !== R(e) || w && "object" == typeof e && w in e)) { - var q = C(e, O), Q = j ? j(e) === Object.prototype : e instanceof Object || e.constructor === Object, Z = e instanceof Object ? "" : "null prototype", K = !Q && w && Object(e) === e && w in e ? R(e).slice(8, -1) : Z ? "Object" : "", X = (Q || "function" != typeof e.constructor ? "" : e.constructor.name ? e.constructor.name + " " : "") + (K || Z ? "[" + [].concat(K || [], Z || []).join(": ") + "] " : ""); - return 0 === q.length ? X + "{}" : v ? X + "{" + T(q, v) + "}" : X + "{ " + q.join(", ") + " }"; - } - return String(e); - }; - var k = Object.prototype.hasOwnProperty || function(t) { - return t in this; - }; - function _(t, e) { - return k.call(t, e); - } - function R(t) { - return b.call(t); - } - function M(t, e) { - if (t.indexOf) return t.indexOf(e); - for(var r = 0, o = t.length; r < o; r++)if (t[r] === e) return r; - return -1; - } - function U(t) { - var e = t.charCodeAt(0), r = { - 8: "b", - 9: "t", - 10: "n", - 12: "f", - 13: "r" - }[e]; - return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + e.toString(16).toUpperCase(); + n = a; + } + return n; + }(f, e, r, o); } - function N(t) { - return "Object(" + t + ")"; + }; + t.exports = function(t, e) { + var r = function(t) { + if (!t) return a; + if (null !== t.decoder && void 0 !== t.decoder && "function" != typeof t.decoder) throw TypeError("Decoder has to be a function."); + if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + var e = void 0 === t.charset ? a.charset : t.charset; + return { + allowDots: void 0 === t.allowDots ? a.allowDots : !!t.allowDots, + allowPrototypes: "boolean" == typeof t.allowPrototypes ? t.allowPrototypes : a.allowPrototypes, + allowSparse: "boolean" == typeof t.allowSparse ? t.allowSparse : a.allowSparse, + arrayLimit: "number" == typeof t.arrayLimit ? t.arrayLimit : a.arrayLimit, + charset: e, + charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : a.charsetSentinel, + comma: "boolean" == typeof t.comma ? t.comma : a.comma, + decoder: "function" == typeof t.decoder ? t.decoder : a.decoder, + delimiter: "string" == typeof t.delimiter || o.isRegExp(t.delimiter) ? t.delimiter : a.delimiter, + depth: "number" == typeof t.depth || !1 === t.depth ? +t.depth : a.depth, + ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, + interpretNumericEntities: "boolean" == typeof t.interpretNumericEntities ? t.interpretNumericEntities : a.interpretNumericEntities, + parameterLimit: "number" == typeof t.parameterLimit ? t.parameterLimit : a.parameterLimit, + parseArrays: !1 !== t.parseArrays, + plainObjects: "boolean" == typeof t.plainObjects ? t.plainObjects : a.plainObjects, + strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : a.strictNullHandling + }; + }(e); + if ("" === t || null == t) return r.plainObjects ? Object.create(null) : {}; + for(var u = "string" == typeof t ? function(t, e) { + var r, c = {}, u = e.ignoreQueryPrefix ? t.replace(/^\?/, "") : t, f = e.parameterLimit === 1 / 0 ? void 0 : e.parameterLimit, y = u.split(e.delimiter, f), l = -1, s = e.charset; + if (e.charsetSentinel) for(r = 0; r < y.length; ++r)0 === y[r].indexOf("utf8=") && ("utf8=%E2%9C%93" === y[r] ? s = "utf-8" : "utf8=%26%2310003%3B" === y[r] && (s = "iso-8859-1"), l = r, r = y.length); + for(r = 0; r < y.length; ++r)if (r !== l) { + var d, b, g = y[r], h = g.indexOf("]="), m = -1 === h ? g.indexOf("=") : h + 1; + -1 === m ? (d = e.decoder(g, a.decoder, s, "key"), b = e.strictNullHandling ? null : "") : (d = e.decoder(g.slice(0, m), a.decoder, s, "key"), b = o.maybeMap(p(g.slice(m + 1), e), function(t) { + return e.decoder(t, a.decoder, s, "value"); + })), b && e.interpretNumericEntities && "iso-8859-1" === s && (b = b.replace(/&#(\d+);/g, function(t, e) { + return String.fromCharCode(parseInt(e, 10)); + })), g.indexOf("[]=") > -1 && (b = i(b) ? [ + b + ] : b), n.call(c, d) ? c[d] = o.combine(c[d], b) : c[d] = b; + } + return c; + }(t, r) : t, f = r.plainObjects ? Object.create(null) : {}, y = Object.keys(u), l = 0; l < y.length; ++l){ + var s = y[l], d = c(s, u[s], r, "string" == typeof t); + f = o.merge(f, d, r); } - function B(t) { - return t + " { ? }"; + return !0 === r.allowSparse ? f : o.compact(f); + }; + }, + 261: (t, e, r)=>{ + "use strict"; + var o = r(478), n = r(769), i = r(798), a = Object.prototype.hasOwnProperty, p = { + brackets: function(t) { + return t + "[]"; + }, + comma: "comma", + indices: function(t, e) { + return t + "[" + e + "]"; + }, + repeat: function(t) { + return t; } - function D(t, e, r, o) { - return t + " (" + e + ") {" + (o ? T(r, o) : r.join(", ")) + "}"; + }, c = Array.isArray, u = Array.prototype.push, f = function(t, e) { + u.apply(t, c(e) ? e : [ + e + ]); + }, y = Date.prototype.toISOString, l = i.default, s = { + addQueryPrefix: !1, + allowDots: !1, + charset: "utf-8", + charsetSentinel: !1, + delimiter: "&", + encode: !0, + encoder: n.encode, + encodeValuesOnly: !1, + format: l, + formatter: i.formatters[l], + indices: !1, + serializeDate: function(t) { + return y.call(t); + }, + skipNulls: !1, + strictNullHandling: !1 + }, d = function t(e, r, i, a, p, u, y, l, d, b, g, h, m, v, S) { + var A, O = e; + if (S.has(e)) throw RangeError("Cyclic object value"); + if ("function" == typeof y ? O = y(r, O) : O instanceof Date ? O = b(O) : "comma" === i && c(O) && (O = n.maybeMap(O, function(t) { + return t instanceof Date ? b(t) : t; + })), null === O) { + if (a) return u && !m ? u(r, s.encoder, v, "key", g) : r; + O = ""; } - function T(t, e) { - if (0 === t.length) return ""; - var r = "\n" + e.prev + e.base; - return r + t.join("," + r) + "\n" + e.prev; + if ("string" == typeof (A = O) || "number" == typeof A || "boolean" == typeof A || "symbol" == typeof A || "bigint" == typeof A || n.isBuffer(O)) return u ? [ + h(m ? r : u(r, s.encoder, v, "key", g)) + "=" + h(u(O, s.encoder, v, "value", g)) + ] : [ + h(r) + "=" + h(String(O)) + ]; + var j, P = []; + if (void 0 === O) return P; + if ("comma" === i && c(O)) j = [ + { + value: O.length > 0 ? O.join(",") || null : void 0 + } + ]; + else if (c(y)) j = y; + else { + var x = Object.keys(O); + j = l ? x.sort(l) : x; } - function C(t, e) { - var r = F(t), o = []; - if (r) { - o.length = t.length; - for(var n = 0; n < t.length; n++)o[n] = _(t, n) ? e(t[n], t) : ""; + for(var w = 0; w < j.length; ++w){ + var E = j[w], F = "object" == typeof E && void 0 !== E.value ? E.value : O[E]; + if (!p || null !== F) { + var I = c(O) ? "function" == typeof i ? i(r, E) : r : r + (d ? "." + E : "[" + E + "]"); + S.set(e, !0), f(P, t(F, I, i, a, p, u, y, l, d, b, g, h, m, v, o())); } - var i, a = "function" == typeof v ? v(t) : []; - if (A) { - i = {}; - for(var p = 0; p < a.length; p++)i["$" + a[p]] = a[p]; + } + return P; + }; + t.exports = function(t, e) { + var r, n = t, u = function(t) { + if (!t) return s; + if (null !== t.encoder && void 0 !== t.encoder && "function" != typeof t.encoder) throw TypeError("Encoder has to be a function."); + var e = t.charset || s.charset; + if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + var r = i.default; + if (void 0 !== t.format) { + if (!a.call(i.formatters, t.format)) throw TypeError("Unknown format option provided."); + r = t.format; } - for(var c in t)_(t, c) && (r && String(Number(c)) === c && c < t.length || A && i["$" + c] instanceof Symbol || (/[^\w$]/.test(c) ? o.push(e(c, t) + ": " + e(t[c], t)) : o.push(c + ": " + e(t[c], t)))); - if ("function" == typeof v) for(var u = 0; u < a.length; u++)O.call(t, a[u]) && o.push("[" + e(a[u]) + "]: " + e(t[a[u]], t)); - return o; + var o = i.formatters[r], n = s.filter; + return ("function" == typeof t.filter || c(t.filter)) && (n = t.filter), { + addQueryPrefix: "boolean" == typeof t.addQueryPrefix ? t.addQueryPrefix : s.addQueryPrefix, + allowDots: void 0 === t.allowDots ? s.allowDots : !!t.allowDots, + charset: e, + charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : s.charsetSentinel, + delimiter: void 0 === t.delimiter ? s.delimiter : t.delimiter, + encode: "boolean" == typeof t.encode ? t.encode : s.encode, + encoder: "function" == typeof t.encoder ? t.encoder : s.encoder, + encodeValuesOnly: "boolean" == typeof t.encodeValuesOnly ? t.encodeValuesOnly : s.encodeValuesOnly, + filter: n, + format: r, + formatter: o, + serializeDate: "function" == typeof t.serializeDate ? t.serializeDate : s.serializeDate, + skipNulls: "boolean" == typeof t.skipNulls ? t.skipNulls : s.skipNulls, + sort: "function" == typeof t.sort ? t.sort : null, + strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : s.strictNullHandling + }; + }(e); + "function" == typeof u.filter ? n = (0, u.filter)("", n) : c(u.filter) && (r = u.filter); + var y, l = []; + if ("object" != typeof n || null === n) return ""; + y = e && e.arrayFormat in p ? e.arrayFormat : e && "indices" in e ? e.indices ? "indices" : "repeat" : "indices"; + var b = p[y]; + r || (r = Object.keys(n)), u.sort && r.sort(u.sort); + for(var g = o(), h = 0; h < r.length; ++h){ + var m = r[h]; + u.skipNulls && null === n[m] || f(l, d(n[m], m, b, u.strictNullHandling, u.skipNulls, u.encode ? u.encoder : null, u.filter, u.sort, u.allowDots, u.serializeDate, u.format, u.formatter, u.encodeValuesOnly, u.charset, g)); } - }, - 794: (t, e, r)=>{ - t.exports = r(669).inspect; - }, - 798: (t)=>{ - "use strict"; - var e = String.prototype.replace, r = /%20/g, o = "RFC3986"; - t.exports = { - default: o, - formatters: { - RFC1738: function(t) { - return e.call(t, r, "+"); - }, - RFC3986: function(t) { - return String(t); - } - }, - RFC1738: "RFC1738", - RFC3986: o - }; - }, - 129: (t, e, r)=>{ - "use strict"; - var o = r(261), n = r(235), i = r(798); - t.exports = { - formats: i, - parse: n, - stringify: o - }; - }, - 235: (t, e, r)=>{ - "use strict"; - var o = r(769), n = Object.prototype.hasOwnProperty, i = Array.isArray, a = { - allowDots: !1, - allowPrototypes: !1, - allowSparse: !1, - arrayLimit: 20, - charset: "utf-8", - charsetSentinel: !1, - comma: !1, - decoder: o.decode, - delimiter: "&", - depth: 5, - ignoreQueryPrefix: !1, - interpretNumericEntities: !1, - parameterLimit: 1e3, - parseArrays: !0, - plainObjects: !1, - strictNullHandling: !1 - }, p = function(t, e) { - return t && "string" == typeof t && e.comma && t.indexOf(",") > -1 ? t.split(",") : t; - }, c = function(t, e, r, o) { - if (t) { - var i = r.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, a = /(\[[^[\]]*])/g, c = r.depth > 0 && /(\[[^[\]]*])/.exec(i), u = c ? i.slice(0, c.index) : i, f = []; - if (u) { - if (!r.plainObjects && n.call(Object.prototype, u) && !r.allowPrototypes) return; - f.push(u); - } - for(var y = 0; r.depth > 0 && null !== (c = a.exec(i)) && y < r.depth;){ - if (y += 1, !r.plainObjects && n.call(Object.prototype, c[1].slice(1, -1)) && !r.allowPrototypes) return; - f.push(c[1]); + var v = l.join(u.delimiter), S = !0 === u.addQueryPrefix ? "?" : ""; + return u.charsetSentinel && ("iso-8859-1" === u.charset ? S += "utf8=%26%2310003%3B&" : S += "utf8=%E2%9C%93&"), v.length > 0 ? S + v : ""; + }; + }, + 769: (t, e, r)=>{ + "use strict"; + var o = r(798), n = Object.prototype.hasOwnProperty, i = Array.isArray, a = function() { + for(var t = [], e = 0; e < 256; ++e)t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()); + return t; + }(), p = function(t, e) { + for(var r = e && e.plainObjects ? Object.create(null) : {}, o = 0; o < t.length; ++o)void 0 !== t[o] && (r[o] = t[o]); + return r; + }; + t.exports = { + arrayToObject: p, + assign: function(t, e) { + return Object.keys(e).reduce(function(t, r) { + return t[r] = e[r], t; + }, t); + }, + combine: function(t, e) { + return [].concat(t, e); + }, + compact: function(t) { + for(var e = [ + { + obj: { + o: t + }, + prop: "o" } - return c && f.push("[" + i.slice(c.index) + "]"), function(t, e, r, o) { - for(var n = o ? e : p(e, r), i = t.length - 1; i >= 0; --i){ - var a, c = t[i]; - if ("[]" === c && r.parseArrays) a = [].concat(n); - else { - a = r.plainObjects ? Object.create(null) : {}; - var u = "[" === c.charAt(0) && "]" === c.charAt(c.length - 1) ? c.slice(1, -1) : c, f = parseInt(u, 10); - r.parseArrays || "" !== u ? !isNaN(f) && c !== u && String(f) === u && f >= 0 && r.parseArrays && f <= r.arrayLimit ? (a = [])[f] = n : a[u] = n : a = { - 0: n - }; - } - n = a; - } - return n; - }(f, e, r, o); + ], r = [], o = 0; o < e.length; ++o)for(var n = e[o], a = n.obj[n.prop], p = Object.keys(a), c = 0; c < p.length; ++c){ + var u = p[c], f = a[u]; + "object" == typeof f && null !== f && -1 === r.indexOf(f) && (e.push({ + obj: a, + prop: u + }), r.push(f)); } - }; - t.exports = function(t, e) { - var r = function(t) { - if (!t) return a; - if (null !== t.decoder && void 0 !== t.decoder && "function" != typeof t.decoder) throw TypeError("Decoder has to be a function."); - if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); - var e = void 0 === t.charset ? a.charset : t.charset; - return { - allowDots: void 0 === t.allowDots ? a.allowDots : !!t.allowDots, - allowPrototypes: "boolean" == typeof t.allowPrototypes ? t.allowPrototypes : a.allowPrototypes, - allowSparse: "boolean" == typeof t.allowSparse ? t.allowSparse : a.allowSparse, - arrayLimit: "number" == typeof t.arrayLimit ? t.arrayLimit : a.arrayLimit, - charset: e, - charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : a.charsetSentinel, - comma: "boolean" == typeof t.comma ? t.comma : a.comma, - decoder: "function" == typeof t.decoder ? t.decoder : a.decoder, - delimiter: "string" == typeof t.delimiter || o.isRegExp(t.delimiter) ? t.delimiter : a.delimiter, - depth: "number" == typeof t.depth || !1 === t.depth ? +t.depth : a.depth, - ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, - interpretNumericEntities: "boolean" == typeof t.interpretNumericEntities ? t.interpretNumericEntities : a.interpretNumericEntities, - parameterLimit: "number" == typeof t.parameterLimit ? t.parameterLimit : a.parameterLimit, - parseArrays: !1 !== t.parseArrays, - plainObjects: "boolean" == typeof t.plainObjects ? t.plainObjects : a.plainObjects, - strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : a.strictNullHandling - }; - }(e); - if ("" === t || null == t) return r.plainObjects ? Object.create(null) : {}; - for(var u = "string" == typeof t ? function(t, e) { - var r, c = {}, u = e.ignoreQueryPrefix ? t.replace(/^\?/, "") : t, f = e.parameterLimit === 1 / 0 ? void 0 : e.parameterLimit, y = u.split(e.delimiter, f), l = -1, s = e.charset; - if (e.charsetSentinel) for(r = 0; r < y.length; ++r)0 === y[r].indexOf("utf8=") && ("utf8=%E2%9C%93" === y[r] ? s = "utf-8" : "utf8=%26%2310003%3B" === y[r] && (s = "iso-8859-1"), l = r, r = y.length); - for(r = 0; r < y.length; ++r)if (r !== l) { - var d, b, g = y[r], h = g.indexOf("]="), m = -1 === h ? g.indexOf("=") : h + 1; - -1 === m ? (d = e.decoder(g, a.decoder, s, "key"), b = e.strictNullHandling ? null : "") : (d = e.decoder(g.slice(0, m), a.decoder, s, "key"), b = o.maybeMap(p(g.slice(m + 1), e), function(t) { - return e.decoder(t, a.decoder, s, "value"); - })), b && e.interpretNumericEntities && "iso-8859-1" === s && (b = b.replace(/&#(\d+);/g, function(t, e) { - return String.fromCharCode(parseInt(e, 10)); - })), g.indexOf("[]=") > -1 && (b = i(b) ? [ - b - ] : b), n.call(c, d) ? c[d] = o.combine(c[d], b) : c[d] = b; + return function(t) { + for(; t.length > 1;){ + var e = t.pop(), r = e.obj[e.prop]; + if (i(r)) { + for(var o = [], n = 0; n < r.length; ++n)void 0 !== r[n] && o.push(r[n]); + e.obj[e.prop] = o; + } } - return c; - }(t, r) : t, f = r.plainObjects ? Object.create(null) : {}, y = Object.keys(u), l = 0; l < y.length; ++l){ - var s = y[l], d = c(s, u[s], r, "string" == typeof t); - f = o.merge(f, d, r); - } - return !0 === r.allowSparse ? f : o.compact(f); - }; - }, - 261: (t, e, r)=>{ - "use strict"; - var o = r(478), n = r(769), i = r(798), a = Object.prototype.hasOwnProperty, p = { - brackets: function(t) { - return t + "[]"; - }, - comma: "comma", - indices: function(t, e) { - return t + "[" + e + "]"; - }, - repeat: function(t) { - return t; - } - }, c = Array.isArray, u = Array.prototype.push, f = function(t, e) { - u.apply(t, c(e) ? e : [ - e - ]); - }, y = Date.prototype.toISOString, l = i.default, s = { - addQueryPrefix: !1, - allowDots: !1, - charset: "utf-8", - charsetSentinel: !1, - delimiter: "&", - encode: !0, - encoder: n.encode, - encodeValuesOnly: !1, - format: l, - formatter: i.formatters[l], - indices: !1, - serializeDate: function(t) { - return y.call(t); - }, - skipNulls: !1, - strictNullHandling: !1 - }, d = function t(e, r, i, a, p, u, y, l, d, b, g, h, m, v, S) { - var A, O = e; - if (S.has(e)) throw RangeError("Cyclic object value"); - if ("function" == typeof y ? O = y(r, O) : O instanceof Date ? O = b(O) : "comma" === i && c(O) && (O = n.maybeMap(O, function(t) { - return t instanceof Date ? b(t) : t; - })), null === O) { - if (a) return u && !m ? u(r, s.encoder, v, "key", g) : r; - O = ""; + }(e), t; + }, + decode: function(t, e, r) { + var o = t.replace(/\+/g, " "); + if ("iso-8859-1" === r) return o.replace(/%[0-9a-f]{2}/gi, unescape); + try { + return decodeURIComponent(o); + } catch (n) { + return o; } - if ("string" == typeof (A = O) || "number" == typeof A || "boolean" == typeof A || "symbol" == typeof A || "bigint" == typeof A || n.isBuffer(O)) return u ? [ - h(m ? r : u(r, s.encoder, v, "key", g)) + "=" + h(u(O, s.encoder, v, "value", g)) - ] : [ - h(r) + "=" + h(String(O)) - ]; - var j, P = []; - if (void 0 === O) return P; - if ("comma" === i && c(O)) j = [ - { - value: O.length > 0 ? O.join(",") || null : void 0 - } - ]; - else if (c(y)) j = y; - else { - var x = Object.keys(O); - j = l ? x.sort(l) : x; + }, + encode: function(t, e, r, n, i) { + if (0 === t.length) return t; + var p = t; + if ("symbol" == typeof t ? p = Symbol.prototype.toString.call(t) : "string" != typeof t && (p = String(t)), "iso-8859-1" === r) return escape(p).replace(/%u[0-9a-f]{4}/gi, function(t) { + return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; + }); + for(var c = "", u = 0; u < p.length; ++u){ + var f = p.charCodeAt(u); + 45 === f || 46 === f || 95 === f || 126 === f || f >= 48 && f <= 57 || f >= 65 && f <= 90 || f >= 97 && f <= 122 || i === o.RFC1738 && (40 === f || 41 === f) ? c += p.charAt(u) : f < 128 ? c += a[f] : f < 2048 ? c += a[192 | f >> 6] + a[128 | 63 & f] : f < 55296 || f >= 57344 ? c += a[224 | f >> 12] + a[128 | f >> 6 & 63] + a[128 | 63 & f] : (u += 1, c += a[240 | (f = 65536 + ((1023 & f) << 10 | 1023 & p.charCodeAt(u))) >> 18] + a[128 | f >> 12 & 63] + a[128 | f >> 6 & 63] + a[128 | 63 & f]); } - for(var w = 0; w < j.length; ++w){ - var E = j[w], F = "object" == typeof E && void 0 !== E.value ? E.value : O[E]; - if (!p || null !== F) { - var I = c(O) ? "function" == typeof i ? i(r, E) : r : r + (d ? "." + E : "[" + E + "]"); - S.set(e, !0), f(P, t(F, I, i, a, p, u, y, l, d, b, g, h, m, v, o())); - } + return c; + }, + isBuffer: function(t) { + return !(!t || "object" != typeof t || !(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t))); + }, + isRegExp: function(t) { + return "[object RegExp]" === Object.prototype.toString.call(t); + }, + maybeMap: function(t, e) { + if (i(t)) { + for(var r = [], o = 0; o < t.length; o += 1)r.push(e(t[o])); + return r; } - return P; - }; - t.exports = function(t, e) { - var r, n = t, u = function(t) { - if (!t) return s; - if (null !== t.encoder && void 0 !== t.encoder && "function" != typeof t.encoder) throw TypeError("Encoder has to be a function."); - var e = t.charset || s.charset; - if (void 0 !== t.charset && "utf-8" !== t.charset && "iso-8859-1" !== t.charset) throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); - var r = i.default; - if (void 0 !== t.format) { - if (!a.call(i.formatters, t.format)) throw TypeError("Unknown format option provided."); - r = t.format; + return e(t); + }, + merge: function t(e, r, o) { + if (!r) return e; + if ("object" != typeof r) { + if (i(e)) e.push(r); + else { + if (!e || "object" != typeof e) return [ + e, + r + ]; + (o && (o.plainObjects || o.allowPrototypes) || !n.call(Object.prototype, r)) && (e[r] = !0); } - var o = i.formatters[r], n = s.filter; - return ("function" == typeof t.filter || c(t.filter)) && (n = t.filter), { - addQueryPrefix: "boolean" == typeof t.addQueryPrefix ? t.addQueryPrefix : s.addQueryPrefix, - allowDots: void 0 === t.allowDots ? s.allowDots : !!t.allowDots, - charset: e, - charsetSentinel: "boolean" == typeof t.charsetSentinel ? t.charsetSentinel : s.charsetSentinel, - delimiter: void 0 === t.delimiter ? s.delimiter : t.delimiter, - encode: "boolean" == typeof t.encode ? t.encode : s.encode, - encoder: "function" == typeof t.encoder ? t.encoder : s.encoder, - encodeValuesOnly: "boolean" == typeof t.encodeValuesOnly ? t.encodeValuesOnly : s.encodeValuesOnly, - filter: n, - format: r, - formatter: o, - serializeDate: "function" == typeof t.serializeDate ? t.serializeDate : s.serializeDate, - skipNulls: "boolean" == typeof t.skipNulls ? t.skipNulls : s.skipNulls, - sort: "function" == typeof t.sort ? t.sort : null, - strictNullHandling: "boolean" == typeof t.strictNullHandling ? t.strictNullHandling : s.strictNullHandling - }; - }(e); - "function" == typeof u.filter ? n = (0, u.filter)("", n) : c(u.filter) && (r = u.filter); - var y, l = []; - if ("object" != typeof n || null === n) return ""; - y = e && e.arrayFormat in p ? e.arrayFormat : e && "indices" in e ? e.indices ? "indices" : "repeat" : "indices"; - var b = p[y]; - r || (r = Object.keys(n)), u.sort && r.sort(u.sort); - for(var g = o(), h = 0; h < r.length; ++h){ - var m = r[h]; - u.skipNulls && null === n[m] || f(l, d(n[m], m, b, u.strictNullHandling, u.skipNulls, u.encode ? u.encoder : null, u.filter, u.sort, u.allowDots, u.serializeDate, u.format, u.formatter, u.encodeValuesOnly, u.charset, g)); + return e; } - var v = l.join(u.delimiter), S = !0 === u.addQueryPrefix ? "?" : ""; - return u.charsetSentinel && ("iso-8859-1" === u.charset ? S += "utf8=%26%2310003%3B&" : S += "utf8=%E2%9C%93&"), v.length > 0 ? S + v : ""; - }; - }, - 769: (t, e, r)=>{ - "use strict"; - var o = r(798), n = Object.prototype.hasOwnProperty, i = Array.isArray, a = function() { - for(var t = [], e = 0; e < 256; ++e)t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()); - return t; - }(), p = function(t, e) { - for(var r = e && e.plainObjects ? Object.create(null) : {}, o = 0; o < t.length; ++o)void 0 !== t[o] && (r[o] = t[o]); - return r; - }; - t.exports = { - arrayToObject: p, - assign: function(t, e) { - return Object.keys(e).reduce(function(t, r) { - return t[r] = e[r], t; - }, t); - }, - combine: function(t, e) { - return [].concat(t, e); + if (!e || "object" != typeof e) return [ + e + ].concat(r); + var a = e; + return i(e) && !i(r) && (a = p(e, o)), i(e) && i(r) ? (r.forEach(function(r, i) { + if (n.call(e, i)) { + var a = e[i]; + a && "object" == typeof a && r && "object" == typeof r ? e[i] = t(a, r, o) : e.push(r); + } else e[i] = r; + }), e) : Object.keys(r).reduce(function(e, i) { + var a = r[i]; + return n.call(e, i) ? e[i] = t(e[i], a, o) : e[i] = a, e; + }, a); + } + }; + }, + 478: (t, e, r)=>{ + "use strict"; + var o = r(210), n = r(924), i = r(631), a = o("%TypeError%"), p = o("%WeakMap%", !0), c = o("%Map%", !0), u = n("WeakMap.prototype.get", !0), f = n("WeakMap.prototype.set", !0), y = n("WeakMap.prototype.has", !0), l = n("Map.prototype.get", !0), s = n("Map.prototype.set", !0), d = n("Map.prototype.has", !0), b = function(t, e) { + for(var r, o = t; null !== (r = o.next); o = r)if (r.key === e) return o.next = r.next, r.next = t.next, t.next = r, r; + }; + t.exports = function() { + var t, e, r, o = { + assert: function(t) { + if (!o.has(t)) throw new a("Side channel does not contain " + i(t)); }, - compact: function(t) { - for(var e = [ - { - obj: { - o: t - }, - prop: "o" - } - ], r = [], o = 0; o < e.length; ++o)for(var n = e[o], a = n.obj[n.prop], p = Object.keys(a), c = 0; c < p.length; ++c){ - var u = p[c], f = a[u]; - "object" == typeof f && null !== f && -1 === r.indexOf(f) && (e.push({ - obj: a, - prop: u - }), r.push(f)); + get: function(o) { + if (p && o && ("object" == typeof o || "function" == typeof o)) { + if (t) return u(t, o); + } else if (c) { + if (e) return l(e, o); + } else if (r) { + var n; + return (n = b(r, o)) && n.value; } - return function(t) { - for(; t.length > 1;){ - var e = t.pop(), r = e.obj[e.prop]; - if (i(r)) { - for(var o = [], n = 0; n < r.length; ++n)void 0 !== r[n] && o.push(r[n]); - e.obj[e.prop] = o; - } - } - }(e), t; }, - decode: function(t, e, r) { - var o = t.replace(/\+/g, " "); - if ("iso-8859-1" === r) return o.replace(/%[0-9a-f]{2}/gi, unescape); - try { - return decodeURIComponent(o); - } catch (n) { - return o; - } + has: function(o) { + if (p && o && ("object" == typeof o || "function" == typeof o)) { + if (t) return y(t, o); + } else if (c) { + if (e) return d(e, o); + } else if (r) return !!b(r, o); + return !1; }, - encode: function(t, e, r, n, i) { - if (0 === t.length) return t; - var p = t; - if ("symbol" == typeof t ? p = Symbol.prototype.toString.call(t) : "string" != typeof t && (p = String(t)), "iso-8859-1" === r) return escape(p).replace(/%u[0-9a-f]{4}/gi, function(t) { - return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; + set: function(o, n) { + var i, a; + p && o && ("object" == typeof o || "function" == typeof o) ? (t || (t = new p), f(t, o, n)) : c ? (e || (e = new c), s(e, o, n)) : (r || (r = { + key: {}, + next: null + }), (a = b(i = r, o)) ? a.value = n : i.next = { + key: o, + next: i.next, + value: n }); - for(var c = "", u = 0; u < p.length; ++u){ - var f = p.charCodeAt(u); - 45 === f || 46 === f || 95 === f || 126 === f || f >= 48 && f <= 57 || f >= 65 && f <= 90 || f >= 97 && f <= 122 || i === o.RFC1738 && (40 === f || 41 === f) ? c += p.charAt(u) : f < 128 ? c += a[f] : f < 2048 ? c += a[192 | f >> 6] + a[128 | 63 & f] : f < 55296 || f >= 57344 ? c += a[224 | f >> 12] + a[128 | f >> 6 & 63] + a[128 | 63 & f] : (u += 1, c += a[240 | (f = 65536 + ((1023 & f) << 10 | 1023 & p.charCodeAt(u))) >> 18] + a[128 | f >> 12 & 63] + a[128 | f >> 6 & 63] + a[128 | 63 & f]); - } - return c; - }, - isBuffer: function(t) { - return !(!t || "object" != typeof t || !(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t))); - }, - isRegExp: function(t) { - return "[object RegExp]" === Object.prototype.toString.call(t); - }, - maybeMap: function(t, e) { - if (i(t)) { - for(var r = [], o = 0; o < t.length; o += 1)r.push(e(t[o])); - return r; - } - return e(t); - }, - merge: function t(e, r, o) { - if (!r) return e; - if ("object" != typeof r) { - if (i(e)) e.push(r); - else { - if (!e || "object" != typeof e) return [ - e, - r - ]; - (o && (o.plainObjects || o.allowPrototypes) || !n.call(Object.prototype, r)) && (e[r] = !0); - } - return e; - } - if (!e || "object" != typeof e) return [ - e - ].concat(r); - var a = e; - return i(e) && !i(r) && (a = p(e, o)), i(e) && i(r) ? (r.forEach(function(r, i) { - if (n.call(e, i)) { - var a = e[i]; - a && "object" == typeof a && r && "object" == typeof r ? e[i] = t(a, r, o) : e.push(r); - } else e[i] = r; - }), e) : Object.keys(r).reduce(function(e, i) { - var a = r[i]; - return n.call(e, i) ? e[i] = t(e[i], a, o) : e[i] = a, e; - }, a); } }; - }, - 478: (t, e, r)=>{ - "use strict"; - var o = r(210), n = r(924), i = r(631), a = o("%TypeError%"), p = o("%WeakMap%", !0), c = o("%Map%", !0), u = n("WeakMap.prototype.get", !0), f = n("WeakMap.prototype.set", !0), y = n("WeakMap.prototype.has", !0), l = n("Map.prototype.get", !0), s = n("Map.prototype.set", !0), d = n("Map.prototype.has", !0), b = function(t, e) { - for(var r, o = t; null !== (r = o.next); o = r)if (r.key === e) return o.next = r.next, r.next = t.next, t.next = r, r; - }; - t.exports = function() { - var t, e, r, o = { - assert: function(t) { - if (!o.has(t)) throw new a("Side channel does not contain " + i(t)); - }, - get: function(o) { - if (p && o && ("object" == typeof o || "function" == typeof o)) { - if (t) return u(t, o); - } else if (c) { - if (e) return l(e, o); - } else if (r) { - var n; - return (n = b(r, o)) && n.value; - } - }, - has: function(o) { - if (p && o && ("object" == typeof o || "function" == typeof o)) { - if (t) return y(t, o); - } else if (c) { - if (e) return d(e, o); - } else if (r) return !!b(r, o); - return !1; - }, - set: function(o, n) { - var i, a; - p && o && ("object" == typeof o || "function" == typeof o) ? (t || (t = new p), f(t, o, n)) : c ? (e || (e = new c), s(e, o, n)) : (r || (r = { - key: {}, - next: null - }), (a = b(i = r, o)) ? a.value = n : i.next = { - key: o, - next: i.next, - value: n - }); - } - }; - return o; - }; - }, - 669: (t)=>{ - "use strict"; - t.exports = r(9720); - } - }, e = {}; - function o(r) { - var n = e[r]; - if (void 0 !== n) return n.exports; - var i = e[r] = { - exports: {} + return o; }; - return t[r](i, i.exports, o), i.exports; + }, + 669: (t)=>{ + "use strict"; + t.exports = r(9720); } - o.n = (t)=>{ - var e = t && t.__esModule ? ()=>t.default : ()=>t; - return o.d(e, { - a: e - }), e; - }, o.d = (t, e)=>{ - for(var r in e)o.o(e, r) && !o.o(t, r) && Object.defineProperty(t, r, { - enumerable: !0, - get: e[r] - }); - }, o.o = (t, e)=>Object.prototype.hasOwnProperty.call(t, e), o.r = (t)=>{ - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { - value: "Module" - }), Object.defineProperty(t, "__esModule", { - value: !0 - }); + }, e = {}; + function o(r) { + var n = e[r]; + if (void 0 !== n) return n.exports; + var i = e[r] = { + exports: {} }; - var n = {}; - return (()=>{ - "use strict"; - o.r(n), o.d(n, { - default: ()=>d - }); - var t = o(575), e = o.n(t), r = o(205), i = o.n(r), a = o(585), p = o.n(a), c = o(754), u = o.n(c), f = o(729), y = o.n(f), l = o(129), s = o.n(l); - const d = new (function(t) { - i()(n, t); - var r, o = (r = function() { - if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0; - } catch (t) { - return !1; - } - }(), function() { - var t, e = u()(n); - if (r) { - var o = u()(this).constructor; - t = Reflect.construct(e, arguments, o); - } else t = e.apply(this, arguments); - return p()(this, t); - }); - function n() { - var t; - return e()(this, n), (t = o.call(this)).ready = !1, console.log(s()), t; + return t[r](i, i.exports, o), i.exports; + } + o.n = (t)=>{ + var e = t && t.__esModule ? ()=>t.default : ()=>t; + return o.d(e, { + a: e + }), e; + }, o.d = (t, e)=>{ + for(var r in e)o.o(e, r) && !o.o(t, r) && Object.defineProperty(t, r, { + enumerable: !0, + get: e[r] + }); + }, o.o = (t, e)=>Object.prototype.hasOwnProperty.call(t, e), o.r = (t)=>{ + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(t, "__esModule", { + value: !0 + }); + }; + var n = {}; + return (()=>{ + "use strict"; + o.r(n), o.d(n, { + default: ()=>d + }); + var t = o(575), e = o.n(t), r = o(205), i = o.n(r), a = o(585), p = o.n(a), c = o(754), u = o.n(c), f = o(729), y = o.n(f), l = o(129), s = o.n(l); + const d = new (function(t) { + i()(n, t); + var r, o = (r = function() { + if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham) return !1; + if ("function" == typeof Proxy) return !0; + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0; + } catch (t) { + return !1; } - return n; - }(y())); - })(), n; - })(); - }(); + }(), function() { + var t, e = u()(n); + if (r) { + var o = u()(this).constructor; + t = Reflect.construct(e, arguments, o); + } else t = e.apply(this, arguments); + return p()(this, t); + }); + function n() { + var t; + return e()(this, n), (t = o.call(this)).ready = !1, console.log(s()), t; + } + return n; + }(y())); + })(), n; + })(); }, 9720: function(t, e, r) { var o = r(1876).Buffer, n = r(3454); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js index 9916d5b214ae..64870f347c45 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js @@ -6310,7 +6310,7 @@ }, 5546: function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; - var adapter, process = __webpack_require__(3454), utils = __webpack_require__(4867), normalizeHeaderName = __webpack_require__(6016), AxiosError = __webpack_require__(723), transitionalDefaults = __webpack_require__(7874), toFormData = __webpack_require__(7675), DEFAULT_CONTENT_TYPE = { + var process = __webpack_require__(3454), utils = __webpack_require__(4867), normalizeHeaderName = __webpack_require__(6016), AxiosError = __webpack_require__(723), transitionalDefaults = __webpack_require__(7874), toFormData = __webpack_require__(7675), DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' }; function setContentTypeIfUnset(headers, value) { @@ -6326,7 +6326,10 @@ } var defaults = { transitional: transitionalDefaults, - adapter: ('undefined' != typeof XMLHttpRequest ? adapter = __webpack_require__(5448) : void 0 !== process && '[object process]' === Object.prototype.toString.call(process) && (adapter = __webpack_require__(5448)), adapter), + adapter: function() { + var adapter; + return 'undefined' != typeof XMLHttpRequest ? adapter = __webpack_require__(5448) : void 0 !== process && '[object process]' === Object.prototype.toString.call(process) && (adapter = __webpack_require__(5448)), adapter; + }(), transformRequest: [ function(data, headers) { if (normalizeHeaderName(headers, 'Accept'), normalizeHeaderName(headers, 'Content-Type'), utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) return data; @@ -6445,25 +6448,29 @@ 4372: function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(4867); - module.exports = utils.isStandardBrowserEnv() ? { - write: function(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)), utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()), utils.isString(path) && cookie.push('path=' + path), utils.isString(domain) && cookie.push('domain=' + domain), !0 === secure && cookie.push('secure'), document.cookie = cookie.join('; '); - }, - read: function(name) { - var match = document.cookie.match(RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return match ? decodeURIComponent(match[3]) : null; - }, - remove: function(name) { - this.write(name, '', Date.now() - 86400000); - } - } : { - write: function() {}, - read: function() { - return null; - }, - remove: function() {} - }; + module.exports = utils.isStandardBrowserEnv() ? function() { + return { + write: function(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)), utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()), utils.isString(path) && cookie.push('path=' + path), utils.isString(domain) && cookie.push('domain=' + domain), !0 === secure && cookie.push('secure'), document.cookie = cookie.join('; '); + }, + read: function(name) { + var match = document.cookie.match(RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return match ? decodeURIComponent(match[3]) : null; + }, + remove: function(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + }() : function() { + return { + write: function() {}, + read: function() { + return null; + }, + remove: function() {} + }; + }(); }, 1793: function(module) { "use strict"; @@ -6501,8 +6508,10 @@ return parsed.protocol === originURL.protocol && parsed.host === originURL.host; }; }() : function() { - return !0; - }; + return function() { + return !0; + }; + }(); }, 6016: function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -6639,10 +6648,12 @@ }, 4867: function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; - var cache, TypedArray, bind = __webpack_require__(1849), toString1 = Object.prototype.toString, kindOf = (cache = Object.create(null), function(thing) { - var str = toString1.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); - }); + var bind = __webpack_require__(1849), toString1 = Object.prototype.toString, kindOf = function(cache) { + return function(thing) { + var str = toString1.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); + }; + }(Object.create(null)); function kindOfTest(type) { return type = type.toLowerCase(), function(thing) { return kindOf(thing) === type; @@ -6741,9 +6752,11 @@ for(var arr = Array(i); i-- > 0;)arr[i] = thing[i]; return arr; } - var isTypedArray = (TypedArray = 'undefined' != typeof Uint8Array && Object.getPrototypeOf(Uint8Array), function(thing) { - return TypedArray && thing instanceof TypedArray; - }); + var isTypedArray = function(TypedArray) { + return function(thing) { + return TypedArray && thing instanceof TypedArray; + }; + }('undefined' != typeof Uint8Array && Object.getPrototypeOf(Uint8Array)); module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, @@ -6838,7 +6851,7 @@ 1e13 ], SQRT_BASE = 1e7, MAX = 1E9; function clone(configObject) { - var pow2_53, random53bitInt, basePrefix, dotAfter, dotBefore, isInfinityOrNaN, whitespaceOrPlus, div, convertBase, parseNumeric, P = BigNumber.prototype = { + var div, convertBase, parseNumeric, P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null @@ -7046,33 +7059,36 @@ return maxOrMin(arguments, P.lt); }, BigNumber.minimum = BigNumber.min = function() { return maxOrMin(arguments, P.gt); - }, BigNumber.random = (pow2_53 = 0x20000000000000, random53bitInt = 0x20000000000000 * Math.random() & 0x1fffff ? function() { - return mathfloor(Math.random() * pow2_53); - } : function() { - return (0x40000000 * Math.random() | 0) * 0x800000 + (0x800000 * Math.random() | 0); - }, function(dp) { - var a, b, e, k, v, i = 0, c = [], rand = new BigNumber(ONE); - if (null == dp ? dp = DECIMAL_PLACES : intCheck(dp, 0, MAX), k = mathceil(dp / LOG_BASE), CRYPTO) { - if (crypto.getRandomValues) { - for(a = crypto.getRandomValues(new Uint32Array(k *= 2)); i < k;)(v = 0x20000 * a[i] + (a[i + 1] >>> 11)) >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), a[i] = b[0], a[i + 1] = b[1]) : (c.push(v % 1e14), i += 2); - i = k / 2; - } else if (crypto.randomBytes) { - for(a = crypto.randomBytes(k *= 7); i < k;)(v = (31 & a[i]) * 0x1000000000000 + 0x10000000000 * a[i + 1] + 0x100000000 * a[i + 2] + 0x1000000 * a[i + 3] + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]) >= 9e15 ? crypto.randomBytes(7).copy(a, i) : (c.push(v % 1e14), i += 7); - i = k / 7; - } else throw CRYPTO = !1, Error(bignumberError + 'crypto unavailable'); - } - if (!CRYPTO) for(; i < k;)(v = random53bitInt()) < 9e15 && (c[i++] = v % 1e14); - for(k = c[--i], dp %= LOG_BASE, k && dp && (v = POWS_TEN[LOG_BASE - dp], c[i] = mathfloor(k / v) * v); 0 === c[i]; c.pop(), i--); - if (i < 0) c = [ - e = 0 - ]; - else { - for(e = -1; 0 === c[0]; c.splice(0, 1), e -= LOG_BASE); - for(i = 1, v = c[0]; v >= 10; v /= 10, i++); - i < LOG_BASE && (e -= LOG_BASE - i); - } - return rand.e = e, rand.c = c, rand; - }), BigNumber.sum = function() { + }, BigNumber.random = function() { + var pow2_53 = 0x20000000000000, random53bitInt = 0x20000000000000 * Math.random() & 0x1fffff ? function() { + return mathfloor(Math.random() * pow2_53); + } : function() { + return (0x40000000 * Math.random() | 0) * 0x800000 + (0x800000 * Math.random() | 0); + }; + return function(dp) { + var a, b, e, k, v, i = 0, c = [], rand = new BigNumber(ONE); + if (null == dp ? dp = DECIMAL_PLACES : intCheck(dp, 0, MAX), k = mathceil(dp / LOG_BASE), CRYPTO) { + if (crypto.getRandomValues) { + for(a = crypto.getRandomValues(new Uint32Array(k *= 2)); i < k;)(v = 0x20000 * a[i] + (a[i + 1] >>> 11)) >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), a[i] = b[0], a[i + 1] = b[1]) : (c.push(v % 1e14), i += 2); + i = k / 2; + } else if (crypto.randomBytes) { + for(a = crypto.randomBytes(k *= 7); i < k;)(v = (31 & a[i]) * 0x1000000000000 + 0x10000000000 * a[i + 1] + 0x100000000 * a[i + 2] + 0x1000000 * a[i + 3] + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]) >= 9e15 ? crypto.randomBytes(7).copy(a, i) : (c.push(v % 1e14), i += 7); + i = k / 7; + } else throw CRYPTO = !1, Error(bignumberError + 'crypto unavailable'); + } + if (!CRYPTO) for(; i < k;)(v = random53bitInt()) < 9e15 && (c[i++] = v % 1e14); + for(k = c[--i], dp %= LOG_BASE, k && dp && (v = POWS_TEN[LOG_BASE - dp], c[i] = mathfloor(k / v) * v); 0 === c[i]; c.pop(), i--); + if (i < 0) c = [ + e = 0 + ]; + else { + for(e = -1; 0 === c[0]; c.splice(0, 1), e -= LOG_BASE); + for(i = 1, v = c[0]; v >= 10; v /= 10, i++); + i < LOG_BASE && (e -= LOG_BASE - i); + } + return rand.e = e, rand.c = c, rand; + }; + }(), BigNumber.sum = function() { for(var i = 1, args = arguments, sum = new BigNumber(args[0]); i < args.length;)sum = sum.plus(args[i++]); return sum; }, convertBase = function() { @@ -7154,18 +7170,21 @@ } else q.e = e, q.r = +more; return q; }; - }(), basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g, parseNumeric = function(x, str, isNum, b) { - var base, s = isNum ? str : str.replace(whitespaceOrPlus, ''); - if (isInfinityOrNaN.test(s)) x.s = isNaN(s) ? null : s < 0 ? -1 : 1; - else { - if (!isNum && (s = s.replace(basePrefix, function(m, p1, p2) { - return base = 'x' == (p2 = p2.toLowerCase()) ? 16 : 'b' == p2 ? 2 : 8, b && b != base ? m : p1; - }), b && (base = b, s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1')), str != s)) return new BigNumber(s, base); - if (BigNumber.DEBUG) throw Error(bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); - x.s = null; - } - x.c = x.e = null; - }, P.absoluteValue = P.abs = function() { + }(), parseNumeric = function() { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + return function(x, str, isNum, b) { + var base, s = isNum ? str : str.replace(whitespaceOrPlus, ''); + if (isInfinityOrNaN.test(s)) x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + else { + if (!isNum && (s = s.replace(basePrefix, function(m, p1, p2) { + return base = 'x' == (p2 = p2.toLowerCase()) ? 16 : 'b' == p2 ? 2 : 8, b && b != base ? m : p1; + }), b && (base = b, s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1')), str != s)) return new BigNumber(s, base); + if (BigNumber.DEBUG) throw Error(bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); + x.s = null; + } + x.c = x.e = null; + }; + }(), P.absoluteValue = P.abs = function() { var x = new BigNumber(this); return x.s < 0 && (x.s = 1), x; }, P.comparedTo = function(y, b) { @@ -11737,8 +11756,9 @@ }; }, 3346: function(module, __unused_webpack_exports, __webpack_require__) { - var global, factory; - global = 0, factory = function() { + !function(global, factory) { + module.exports = factory(); + }(0, function() { 'use strict'; var toStringFunction = Function.prototype.toString, create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf, _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable, SYMBOL_PROPERTIES = 'function' == typeof getOwnPropertySymbols, WEAK_MAP = 'function' == typeof WeakMap, createCache = function() { if (WEAK_MAP) return function() { @@ -11829,7 +11849,7 @@ realm: options ? options.realm : void 0 }); }, copy; - }, module.exports = factory(); + }); }, 4029: function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -15451,7 +15471,10 @@ module.exports = isKeyable; }, 5346: function(module, __unused_webpack_exports, __webpack_require__) { - var uid, coreJsData = __webpack_require__(4429), maskSrcKey = (uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '')) ? 'Symbol(src)_1.' + uid : ''; + var coreJsData = __webpack_require__(4429), maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -19357,7 +19380,7 @@ return unzipRaw; } }), module = __webpack_require__.hmd(module); - var u16, u32, process = __webpack_require__(3454); + var process = __webpack_require__(3454); function readBlobAsArrayBuffer(blob) { return blob.arrayBuffer ? blob.arrayBuffer() : new Promise((resolve, reject)=>{ const reader = new FileReader(); @@ -19532,187 +19555,190 @@ function _get17(dt, pos) { return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (7 & pos); } - const U = (u16 = Uint16Array, u32 = Uint32Array, { - next_code: new u16(16), - bl_count: new u16(16), - ordr: [ - 16, - 17, - 18, - 0, - 8, - 7, - 9, - 6, - 10, - 5, - 11, - 4, - 12, - 3, - 13, - 2, - 14, - 1, - 15 - ], - of0: [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 13, - 15, - 17, - 19, - 23, - 27, - 31, - 35, - 43, - 51, - 59, - 67, - 83, - 99, - 115, - 131, - 163, - 195, - 227, - 258, - 999, - 999, - 999 - ], - exb: [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 3, - 3, - 3, - 3, - 4, - 4, - 4, - 4, - 5, - 5, - 5, - 5, - 0, - 0, - 0, - 0 - ], - ldef: new u16(32), - df0: [ - 1, - 2, - 3, - 4, - 5, - 7, - 9, - 13, - 17, - 25, - 33, - 49, - 65, - 97, - 129, - 193, - 257, - 385, - 513, - 769, - 1025, - 1537, - 2049, - 3073, - 4097, - 6145, - 8193, - 12289, - 16385, - 24577, - 65535, - 65535 - ], - dxb: [ - 0, - 0, - 0, - 0, - 1, - 1, - 2, - 2, - 3, - 3, - 4, - 4, - 5, - 5, - 6, - 6, - 7, - 7, - 8, - 8, - 9, - 9, - 10, - 10, - 11, - 11, - 12, - 12, - 13, - 13, - 0, - 0 - ], - ddef: new u32(32), - flmap: new u16(512), - fltree: [], - fdmap: new u16(32), - fdtree: [], - lmap: new u16(32768), - ltree: [], - ttree: [], - dmap: new u16(32768), - dtree: [], - imap: new u16(512), - itree: [], - rev15: new u16(32768), - lhst: new u32(286), - dhst: new u32(30), - ihst: new u32(19), - lits: new u32(15000), - strt: new u16(65536), - prev: new u16(32768) - }); + const U = function() { + var u16 = Uint16Array, u32 = Uint32Array; + return { + next_code: new u16(16), + bl_count: new u16(16), + ordr: [ + 16, + 17, + 18, + 0, + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15 + ], + of0: [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 999, + 999, + 999 + ], + exb: [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 4, + 4, + 4, + 4, + 5, + 5, + 5, + 5, + 0, + 0, + 0, + 0 + ], + ldef: new u16(32), + df0: [ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 65535, + 65535 + ], + dxb: [ + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 2, + 3, + 3, + 4, + 4, + 5, + 5, + 6, + 6, + 7, + 7, + 8, + 8, + 9, + 9, + 10, + 10, + 11, + 11, + 12, + 12, + 13, + 13, + 0, + 0 + ], + ddef: new u32(32), + flmap: new u16(512), + fltree: [], + fdmap: new u16(32), + fdtree: [], + lmap: new u16(32768), + ltree: [], + ttree: [], + dmap: new u16(32768), + dtree: [], + imap: new u16(512), + itree: [], + rev15: new u16(32768), + lhst: new u32(286), + dhst: new u32(30), + ihst: new u32(19), + lits: new u32(15000), + strt: new u16(65536), + prev: new u16(32768) + }; + }(); !function() { for(var len = 32768, i = 0; i < len; i++){ var x = i; @@ -21475,10 +21501,12 @@ }, 7312: function(__unused_webpack_module, exports) { "use strict"; - var SmartWeaveTags, SmartWeaveTags1; + var SmartWeaveTags; Object.defineProperty(exports, "__esModule", { value: !0 - }), exports.SmartWeaveTags = void 0, (SmartWeaveTags1 = SmartWeaveTags = exports.SmartWeaveTags || (exports.SmartWeaveTags = {})).APP_NAME = "App-Name", SmartWeaveTags1.APP_VERSION = "App-Version", SmartWeaveTags1.CONTRACT_TX_ID = "Contract", SmartWeaveTags1.INPUT = "Input", SmartWeaveTags1.CONTENT_TYPE = "Content-Type", SmartWeaveTags1.CONTRACT_SRC_TX_ID = "Contract-Src", SmartWeaveTags1.SDK = "SDK", SmartWeaveTags1.MIN_FEE = "Min-Fee", SmartWeaveTags1.INIT_STATE = "Init-State", SmartWeaveTags1.INIT_STATE_TX = "Init-State-TX", SmartWeaveTags1.INTERACT_WRITE = "Interact-Write", SmartWeaveTags1.WASM_LANG = "Wasm-Lang", SmartWeaveTags1.WASM_LANG_VERSION = "Wasm-Lang-Version", SmartWeaveTags1.WASM_META = "Wasm-Meta", SmartWeaveTags1.REQUEST_VRF = "Request-Vrf"; + }), exports.SmartWeaveTags = void 0, function(SmartWeaveTags) { + SmartWeaveTags.APP_NAME = "App-Name", SmartWeaveTags.APP_VERSION = "App-Version", SmartWeaveTags.CONTRACT_TX_ID = "Contract", SmartWeaveTags.INPUT = "Input", SmartWeaveTags.CONTENT_TYPE = "Content-Type", SmartWeaveTags.CONTRACT_SRC_TX_ID = "Contract-Src", SmartWeaveTags.SDK = "SDK", SmartWeaveTags.MIN_FEE = "Min-Fee", SmartWeaveTags.INIT_STATE = "Init-State", SmartWeaveTags.INIT_STATE_TX = "Init-State-TX", SmartWeaveTags.INTERACT_WRITE = "Interact-Write", SmartWeaveTags.WASM_LANG = "Wasm-Lang", SmartWeaveTags.WASM_LANG_VERSION = "Wasm-Lang-Version", SmartWeaveTags.WASM_META = "Wasm-Meta", SmartWeaveTags.REQUEST_VRF = "Request-Vrf"; + }(SmartWeaveTags = exports.SmartWeaveTags || (exports.SmartWeaveTags = {})); }, 2009: function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -22416,14 +22444,16 @@ }, 1533: function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; - var SourceType, SourceType1; + var SourceType; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.WarpGatewayInteractionsLoader = exports.SourceType = void 0; const Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913); __webpack_require__(9180); const utils_1 = __webpack_require__(5082); - (SourceType1 = SourceType = exports.SourceType || (exports.SourceType = {})).ARWEAVE = "arweave", SourceType1.WARP_SEQUENCER = "redstone-sequencer"; + !function(SourceType) { + SourceType.ARWEAVE = "arweave", SourceType.WARP_SEQUENCER = "redstone-sequencer"; + }(SourceType = exports.SourceType || (exports.SourceType = {})); class WarpGatewayInteractionsLoader { constructor(baseUrl, confirmationStatus = null, source = null){ this.baseUrl = baseUrl, this.confirmationStatus = confirmationStatus, this.source = source, this.logger = LoggerFactory_1.LoggerFactory.INST.create('WarpGatewayInteractionsLoader'), this.baseUrl = (0, utils_1.stripTrailingSlash)(baseUrl), Object.assign(this, confirmationStatus), this.source = source; @@ -23595,7 +23625,9 @@ var SmartWeaveErrorType; Object.defineProperty(exports, "__esModule", { value: !0 - }), exports.SmartWeaveError = exports.SmartWeaveErrorType = void 0, (SmartWeaveErrorType = exports.SmartWeaveErrorType || (exports.SmartWeaveErrorType = {})).CONTRACT_NOT_FOUND = "CONTRACT_NOT_FOUND"; + }), exports.SmartWeaveError = exports.SmartWeaveErrorType = void 0, function(SmartWeaveErrorType) { + SmartWeaveErrorType.CONTRACT_NOT_FOUND = "CONTRACT_NOT_FOUND"; + }(SmartWeaveErrorType = exports.SmartWeaveErrorType || (exports.SmartWeaveErrorType = {})); class SmartWeaveError extends Error { constructor(type, optional = {}){ optional.message ? super(optional.message) : super(), this.type = type, this.otherInfo = optional; diff --git a/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js b/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js index 9a816716a437..3e917c6e5723 100644 --- a/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js +++ b/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js @@ -449,7 +449,7 @@ return array ? hex : "#" + hex.join(""); } }), Array.alias("extend", "append"); -var fireEvent, $pick = function() { +var $pick = function() { return Array.from(arguments).pick(); }; String.implement({ @@ -743,7 +743,7 @@ var $try = Function.attempt; indexOf: "keyOf", contains: "hasValue" }), function() { - var XMLHTTP, MSXML2, MSXML, document1 = this.document, window1 = document1.window = this, ua = navigator.userAgent.toLowerCase(), platform = navigator.platform.toLowerCase(), UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [ + var document1 = this.document, window1 = document1.window = this, ua = navigator.userAgent.toLowerCase(), platform = navigator.platform.toLowerCase(), UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [ null, "unknown", 0 @@ -764,19 +764,22 @@ var $try = Function.attempt; }, Plugins: {} }; - Browser1[Browser1.name] = !0, Browser1[Browser1.name + parseInt(Browser1.version, 10)] = !0, Browser1.Platform[Browser1.Platform.name] = !0, Browser1.Request = (XMLHTTP = function() { - return new XMLHttpRequest(); - }, MSXML2 = function() { - return new ActiveXObject("MSXML2.XMLHTTP"); - }, MSXML = function() { - return new ActiveXObject("Microsoft.XMLHTTP"); - }, Function.attempt(function() { - return XMLHTTP(), XMLHTTP; - }, function() { - return MSXML2(), MSXML2; - }, function() { - return MSXML(), MSXML; - })), Browser1.Features.xhr = !!Browser1.Request; + Browser1[Browser1.name] = !0, Browser1[Browser1.name + parseInt(Browser1.version, 10)] = !0, Browser1.Platform[Browser1.Platform.name] = !0, Browser1.Request = function() { + var XMLHTTP = function() { + return new XMLHttpRequest(); + }, MSXML2 = function() { + return new ActiveXObject("MSXML2.XMLHTTP"); + }, MSXML = function() { + return new ActiveXObject("Microsoft.XMLHTTP"); + }; + return Function.attempt(function() { + return XMLHTTP(), XMLHTTP; + }, function() { + return MSXML2(), MSXML2; + }, function() { + return MSXML(), MSXML; + }); + }(), Browser1.Features.xhr = !!Browser1.Request; var version = (Function.attempt(function() { return navigator.plugins["Shockwave Flash"].description; }, function() { @@ -1683,9 +1686,11 @@ var Element = function(tag, props) { } return document.newElement(tag, props); }; -Browser.Element && (Element.prototype = Browser.Element.prototype, Element.prototype._fireEvent = (fireEvent = Element.prototype.fireEvent, function(type, event) { - return fireEvent.call(this, type, event); -})), new Type("Element", Element).mirror(function(name) { +Browser.Element && (Element.prototype = Browser.Element.prototype, Element.prototype._fireEvent = function(fireEvent) { + return function(type, event) { + return fireEvent.call(this, type, event); + }; +}(Element.prototype.fireEvent)), new Type("Element", Element).mirror(function(name) { if (!Array.prototype[name]) { var obj = {}; obj[name] = function() { @@ -1797,29 +1802,32 @@ Elements.prototype = { getWindow: function() { return this.window; }, - id: ((types = { - string: function(id, nocash, doc) { - return (id = Slick.find(doc, "#" + id.replace(/(\W)/g, "\\$1"))) ? types.element(id, nocash) : null; - }, - element: function(el, nocash) { - if (Slick.uidOf(el), !nocash && !el.$family && !/^(?:object|embed)$/i.test(el.tagName)) { - var fireEvent = el.fireEvent; - el._fireEvent = function(type, event) { - return fireEvent(type, event); - }, Object.append(el, Element.Prototype); + id: function() { + var types = { + string: function(id, nocash, doc) { + return (id = Slick.find(doc, "#" + id.replace(/(\W)/g, "\\$1"))) ? types.element(id, nocash) : null; + }, + element: function(el, nocash) { + if (Slick.uidOf(el), !nocash && !el.$family && !/^(?:object|embed)$/i.test(el.tagName)) { + var fireEvent = el.fireEvent; + el._fireEvent = function(type, event) { + return fireEvent(type, event); + }, Object.append(el, Element.Prototype); + } + return el; + }, + object: function(obj, nocash, doc) { + return obj.toElement ? types.element(obj.toElement(doc), nocash) : null; } - return el; - }, - object: function(obj, nocash, doc) { - return obj.toElement ? types.element(obj.toElement(doc), nocash) : null; - } - }).textnode = types.whitespace = types.window = types.document = function(zero) { - return zero; - }, function(el, nocash, doc) { - if (el && el.$family && el.uniqueNumber) return el; - var type = typeOf(el); - return types[type] ? types[type](el, nocash, doc || document) : null; - }) + }; + return types.textnode = types.whitespace = types.window = types.document = function(zero) { + return zero; + }, function(el, nocash, doc) { + if (el && el.$family && el.uniqueNumber) return el; + var type = typeOf(el); + return types[type] ? types[type](el, nocash, doc || document) : null; + }; + }() }), null == window.$ && Window.implement("$", function(el, nc) { return document.id(el, nc, this.document); }), Window.implement({ @@ -1840,7 +1848,7 @@ Elements.prototype = { return document.id(Slick.find(this, expression)); } }); - var types, div, set, translations, contains = { + var contains = { contains: function(element) { return Slick.contains(this, element); } @@ -2024,7 +2032,9 @@ Elements.prototype = { var value = node.value; node.type = type, node.value = value; }), input = null; - var pollutesGetAttribute = ((div = document.createElement("div")).random = "attribute", "attribute" == div.getAttribute("random")); + var pollutesGetAttribute = function(div) { + return div.random = "attribute", "attribute" == div.getAttribute("random"); + }(document.createElement("div")); Element.implement({ setProperty: function(name, value) { var setter = propertySetters[name.toLowerCase()]; @@ -2222,52 +2232,55 @@ Elements.prototype = { this.innerHTML = ""; } }; - var div1 = document.createElement("div"); - div1.innerHTML = ""; - var supportsHTML5Elements = 1 == div1.childNodes.length; + var div = document.createElement("div"); + div.innerHTML = ""; + var supportsHTML5Elements = 1 == div.childNodes.length; if (!supportsHTML5Elements) for(var tags = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "), fragment = document.createDocumentFragment(), l = tags.length; l--;)fragment.createElement(tags[l]); - div1 = null; + div = null; var supportsTableInnerHTML = Function.attempt(function() { return document.createElement("table").innerHTML = "", !0; }), tr = document.createElement("tr"), html = ""; tr.innerHTML = html; var supportsTRInnerHTML = tr.innerHTML == html; - tr = null, (!supportsTableInnerHTML || !supportsTRInnerHTML || !supportsHTML5Elements) && (Element.Properties.html.set = (set = Element.Properties.html.set, (translations = { - table: [ - 1, - "", - "
" - ], - select: [ - 1, - "" - ], - tbody: [ - 2, - "", - "
" - ], - tr: [ - 3, - "", - "
" - ] - }).thead = translations.tfoot = translations.tbody, function(html) { - var wrap = translations[this.get("tag")]; - if (wrap || supportsHTML5Elements || (wrap = [ - 0, - "", - "" - ]), !wrap) return set.call(this, html); - var level = wrap[0], wrapper = document.createElement("div"), target = wrapper; - for(supportsHTML5Elements || fragment.appendChild(wrapper), wrapper.innerHTML = [ - wrap[1], - html, - wrap[2] - ].flatten().join(""); level--;)target = target.firstChild; - this.empty().adopt(target.childNodes), supportsHTML5Elements || fragment.removeChild(wrapper), wrapper = null; - })); + tr = null, supportsTableInnerHTML && supportsTRInnerHTML && supportsHTML5Elements || (Element.Properties.html.set = function(set) { + var translations = { + table: [ + 1, + "", + "
" + ], + select: [ + 1, + "" + ], + tbody: [ + 2, + "", + "
" + ], + tr: [ + 3, + "", + "
" + ] + }; + return translations.thead = translations.tfoot = translations.tbody, function(html) { + var wrap = translations[this.get("tag")]; + if (wrap || supportsHTML5Elements || (wrap = [ + 0, + "", + "" + ]), !wrap) return set.call(this, html); + var level = wrap[0], wrapper = document.createElement("div"), target = wrapper; + for(supportsHTML5Elements || fragment.appendChild(wrapper), wrapper.innerHTML = [ + wrap[1], + html, + wrap[2] + ].flatten().join(""); level--;)target = target.firstChild; + this.empty().adopt(target.childNodes), supportsHTML5Elements || fragment.removeChild(wrapper), wrapper = null; + }; + }(Element.Properties.html.set)); var testForm = document.createElement("form"); testForm.innerHTML = "", "s" != testForm.firstChild.value && (Element.Properties.value = { set: function(value) {