diff --git a/.prettierignore b/.prettierignore index f82fa5a645d..49eaa40c06b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -28,6 +28,7 @@ crates/swc_webpack_ast/tests/ # Generated by testing system output/ output.js +output.*.js output.full.js output.mjs index.g.js diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2011/actual/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2011/actual/output.mangleOnly.js new file mode 100644 index 00000000000..b38f076c20d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2011/actual/output.mangleOnly.js @@ -0,0 +1,55 @@ +function a(a, b) { + if (!(a instanceof b)) { + throw new TypeError("Cannot call a class as a function"); + } +} +function b(d, c) { + for(var b = 0; b < c.length; b++){ + var a = c[b]; + a.enumerable = a.enumerable || false; + a.configurable = true; + if ("value" in a) a.writable = true; + Object.defineProperty(d, a.key, a); + } +} +function c(a, c, d) { + if (c) b(a.prototype, c); + if (d) b(a, d); + return a; +} +function d(a, b, c) { + if (b in a) { + Object.defineProperty(a, b, { + value: c, + enumerable: true, + configurable: true, + writable: true + }); + } else { + a[b] = c; + } + return a; +} +var e = function b() { + "use strict"; + a(this, b); +}; +module.exports = (function() { + var b = (function() { + "use strict"; + function b() { + a(this, b); + } + c(b, [ + { + key: "it", + value: function a() { + this.bb = new b.MyA(); + } + }, + ]); + return b; + })(); + d(b, "MyA", e); + return b; +})(); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2011/reduced/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2011/reduced/output.mangleOnly.js new file mode 100644 index 00000000000..d0292cd5813 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2011/reduced/output.mangleOnly.js @@ -0,0 +1,8 @@ +class a { +} +module.exports = class b { + static MyA = a; + it() { + this.bb = new b.MyA(); + } +}; diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2028/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2028/output.mangleOnly.js new file mode 100644 index 00000000000..5349e0833b9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2028/output.mangleOnly.js @@ -0,0 +1,10 @@ +function b(a) { + return a != null; +} +function a(a, c) { + if (a == null || b(a)) { + return true; + } + return false; +} +module.exports = a; diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2044/full/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2044/full/output.mangleOnly.js new file mode 100644 index 00000000000..08cd587d13d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2044/full/output.mangleOnly.js @@ -0,0 +1,83 @@ +function a(a) { + return a(); +} +const b = (a)=>true; +const c = {}; +const d = {}; +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(a) { + a.exports = { + findConfig: function d(e) { + var b = function(b) { + if (2) { + throw new Error(""); + } else if (c) { + throw new Error(""); + } else if (1) { + throw new Error(""); + } else if (true) { + return a.exports.findConfig(null); + } else if (true) { + return a.exports.findConfig(null); + } + }; + return b; + } + }; +}); +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(b, c) { + function a(a) { + return a && a.__esModule ? a : { + default: a + }; + } + a(); + var d = a(); +}); +a(function(b, a) { + a.default = null; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; +}); +var e = a(function(b, a) { + a.default = void 0; + function c(a) { + return a && a.__esModule ? a : { + default: a + }; + } + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + a.default = String; +}); +a(function(b, a) { + a.default = void 0; + var c = null; + a.default = String; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-1/output.mangleOnly.js new file mode 100644 index 00000000000..08cd587d13d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-1/output.mangleOnly.js @@ -0,0 +1,83 @@ +function a(a) { + return a(); +} +const b = (a)=>true; +const c = {}; +const d = {}; +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(a) { + a.exports = { + findConfig: function d(e) { + var b = function(b) { + if (2) { + throw new Error(""); + } else if (c) { + throw new Error(""); + } else if (1) { + throw new Error(""); + } else if (true) { + return a.exports.findConfig(null); + } else if (true) { + return a.exports.findConfig(null); + } + }; + return b; + } + }; +}); +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(b, c) { + function a(a) { + return a && a.__esModule ? a : { + default: a + }; + } + a(); + var d = a(); +}); +a(function(b, a) { + a.default = null; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; +}); +var e = a(function(b, a) { + a.default = void 0; + function c(a) { + return a && a.__esModule ? a : { + default: a + }; + } + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + a.default = String; +}); +a(function(b, a) { + a.default = void 0; + var c = null; + a.default = String; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-10/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-10/output.mangleOnly.js new file mode 100644 index 00000000000..08cd587d13d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2044/pass-10/output.mangleOnly.js @@ -0,0 +1,83 @@ +function a(a) { + return a(); +} +const b = (a)=>true; +const c = {}; +const d = {}; +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(a) { + a.exports = { + findConfig: function d(e) { + var b = function(b) { + if (2) { + throw new Error(""); + } else if (c) { + throw new Error(""); + } else if (1) { + throw new Error(""); + } else if (true) { + return a.exports.findConfig(null); + } else if (true) { + return a.exports.findConfig(null); + } + }; + return b; + } + }; +}); +a(function(b, a) { + Object.defineProperty(a, "__esModule", { + value: true + }); +}); +a(function(b, c) { + function a(a) { + return a && a.__esModule ? a : { + default: a + }; + } + a(); + var d = a(); +}); +a(function(b, a) { + a.default = null; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; +}); +var e = a(function(b, a) { + a.default = void 0; + function c(a) { + return a && a.__esModule ? a : { + default: a + }; + } + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + b.exports = a.default; +}); +a(function(b, a) { + a.default = void 0; + a.default = String; +}); +a(function(b, a) { + a.default = void 0; + var c = null; + a.default = String; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); +a(function(b, a) { + a.__esModule = true; +}); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2072/1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2072/1/output.mangleOnly.js new file mode 100644 index 00000000000..a83d7cdf556 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2072/1/output.mangleOnly.js @@ -0,0 +1,14 @@ +function a(a, b) { + if (b.val === a.val) { + return 0; + } + if (typeof a.val === "object" && typeof b.val === "object") { + if (a.key === undefined || b.key === undefined) { + return 1; + } + if (a.key === b.key) { + return 0; + } + } + return 1; +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2078/1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2078/1/output.mangleOnly.js new file mode 100644 index 00000000000..55a5a6aa217 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2078/1/output.mangleOnly.js @@ -0,0 +1,9 @@ +let a = [ + 1 +]; +let b; +while(a.length > 0){ + b = a.sort(); + a = []; + b.forEach((a)=>console.log(a)); +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2214/1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2214/1/output.mangleOnly.js new file mode 100644 index 00000000000..7b82434b9a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2214/1/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a, b) { + if (a) { + if (b) return; + foo(); + } + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.mangleOnly.js new file mode 100644 index 00000000000..70da60f169e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.mangleOnly.js @@ -0,0 +1,26028 @@ +(function() { + var a = { + 87062: function(c, a, b) { + "use strict"; + b.d(a, { + Z: function() { + return d; + } + }); + function d() { + d = Object.assign || function(d) { + for(var a = 1; a < arguments.length; a++){ + var b = arguments[a]; + for(var c in b){ + if (Object.prototype.hasOwnProperty.call(b, c)) { + d[c] = b[c]; + } + } + } + return d; + }; + return d.apply(this, arguments); + } + }, + 48861: function(c, a, b) { + "use strict"; + b.d(a, { + Z: function() { + return e; + } + }); + function d(a, b) { + d = Object.setPrototypeOf || function c(a, b) { + a.__proto__ = b; + return a; + }; + return d(a, b); + } + function e(a, b) { + a.prototype = Object.create(b.prototype); + a.prototype.constructor = a; + d(a, b); + } + }, + 21617: function(c, a, b) { + "use strict"; + b.d(a, { + Z: function() { + return d; + } + }); + function d(c, f) { + if (c == null) return {}; + var d = {}; + var e = Object.keys(c); + var a, b; + for(b = 0; b < e.length; b++){ + a = e[b]; + if (f.indexOf(a) >= 0) continue; + d[a] = c[a]; + } + return d; + } + }, + 53721: function() {}, + 89704: function(a) { + a.exports = { + container: "Guide--container--ZhpDRAI", + title: "Guide--title--1rpLn7Z", + description: "Guide--description--3uBeCDX", + action: "Guide--action--cCCW-z5" + }; + }, + 6867: function(e, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var f = b(37712); + var g = function(a, b) { + return "".concat(a.toString(), "\n\nThis is located at:").concat(b); + }; + var h = { + display: "flex", + flexDirection: "column", + alignItems: "center", + margin: "100px 0", + color: "#ed3131" + }; + var c = function(a) { + var b = a.componentStack, c = a.error; + return (0, f).jsxs("div", { + style: h, + title: g(c, b), + children: [ + (0, f).jsxs("svg", { + viewBox: "0 0 1024 1024", + version: "1.1", + xmlns: "http://www.w3.org/2000/svg", + "p-id": "843", + width: "60", + height: "60", + children: [ + (0, f).jsx("path", { + d: "M1024 512C1024 229.23 794.77 0 512 0S0 229.23 0 512s229.23 512 512 512c117.41 0 228.826-39.669 318.768-111.313 10.79-8.595 12.569-24.308 3.975-35.097-8.594-10.789-24.308-12.568-35.097-3.974C718.47 938.277 618.002 974.049 512 974.049 256.818 974.049 49.951 767.182 49.951 512S256.818 49.951 512 49.951 974.049 256.818 974.049 512c0 87.493-24.334 171.337-69.578 243.96-7.294 11.708-3.716 27.112 7.992 34.405 11.707 7.294 27.11 3.716 34.405-7.991C997.014 701.88 1024 608.898 1024 512z", + "p-id": "844", + fill: "#cdcdcd" + }), + (0, f).jsx("path", { + d: "M337.17 499.512c34.485 0 62.44-27.955 62.44-62.439s-27.955-62.439-62.44-62.439c-34.483 0-62.438 27.955-62.438 62.44 0 34.483 27.955 62.438 62.439 62.438z m374.635 0c34.484 0 62.439-27.955 62.439-62.439s-27.955-62.439-62.44-62.439c-34.483 0-62.438 27.955-62.438 62.44 0 34.483 27.955 62.438 62.439 62.438zM352.788 704.785c43.377-34.702 100.364-55.425 171.7-55.425 71.336 0 128.322 20.723 171.7 55.425 26.513 21.21 42.695 42.786 50.444 58.284 6.168 12.337 1.168 27.34-11.17 33.508-12.337 6.169-27.34 1.168-33.508-11.17-0.918-1.834-3.462-6.024-7.788-11.793-7.564-10.084-17.239-20.269-29.183-29.824-34.671-27.737-80.71-44.478-140.495-44.478-59.786 0-105.824 16.74-140.496 44.478-11.944 9.555-21.619 19.74-29.182 29.824-4.327 5.769-6.87 9.959-7.788 11.794-6.169 12.337-21.171 17.338-33.509 11.17-12.337-6.17-17.338-21.172-11.169-33.509 7.75-15.498 23.931-37.074 50.444-58.284z", + "p-id": "845", + fill: "#cdcdcd" + }), + ] + }), + (0, f).jsx("h3", { + children: "Oops! Something went wrong." + }), + ] + }); + }; + var d = c; + a.default = d; + }, + 11179: function(h, b, a) { + "use strict"; + Object.defineProperty(b, "__esModule", { + value: true + }); + b.default = void 0; + var d = a(547); + var i = a(37712); + var e = a(59301); + var f = d.interopRequireDefault(a(6867)); + var c = (function(b) { + "use strict"; + d.inherits(a, b); + function a(c) { + d.classCallCheck(this, a); + var b; + b = d.possibleConstructorReturn(this, d.getPrototypeOf(a).call(this, c)); + b.state = { + error: null, + info: { + componentStack: "" + } + }; + return b; + } + d.createClass(a, [ + { + key: "componentDidCatch", + value: function e(a, b) { + var d = this.props, c = d.onError; + if (typeof c === "function") { + try { + c.call(this, a, b.componentStack); + } catch (f) {} + } + this.setState({ + error: a, + info: b + }); + } + }, + { + key: "render", + value: function g() { + var a = this.props, f = a.children, b = a.Fallback; + var c = this.state, d = c.error, e = c.info; + if (d !== null && typeof b === "function") { + return (0, i).jsx(b, { + componentStack: e && e.componentStack, + error: d + }); + } + return f || null; + } + }, + ]); + return a; + })(e.Component); + c.defaultProps = { + Fallback: f.default + }; + var g = c; + b.default = g; + }, + 36660: function(d, a) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.setAppConfig = a.getAppConfig = void 0; + var e; + function b(a) { + e = a; + } + function c() { + return e; + } + a.setAppConfig = b; + a.getAppConfig = c; + }, + 42792: function(f, b, a) { + "use strict"; + Object.defineProperty(b, "__esModule", { + value: true + }); + b.default = void 0; + var c = a(547); + var g = c.interopRequireDefault(a(66902)); + var h = c.interopRequireDefault(a(2526)); + var i = c.interopRequireDefault(a(8900)); + function d(a) { + a.loadModule(g.default); + a.loadModule(h.default); + a.loadModule(i.default); + } + var e = d; + b.default = e; + }, + 98565: function(f, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(547); + var g = c.interopRequireDefault(b(53380)); + function d(a) { + (0, g).default({ + appConfig: a + }); + } + var e = d; + a.default = e; + }, + 8000: function(i, b, a) { + "use strict"; + var j = a(97671); + Object.defineProperty(b, "__esModule", { + value: true + }); + b.runApp = p; + b.default = void 0; + var c = a(547); + var e = a(59301); + var d = a(60953); + var k = c.interopRequireDefault(a(61929)); + a(53721); + var l = c.interopRequireDefault(a(98565)); + var f = c.interopRequireDefault(a(42792)); + var m = a(36660); + var n = c.interopRequireDefault(a(11179)); + var o = { + icestarkType: "normal" + }; + var g = (0, d).createBaseApp({ + loadRuntimeModules: f.default, + createElement: e.createElement, + runtimeAPI: { + createHistory: d.createHistory, + getSearchParams: d.getSearchParams + } + }); + function p(a) { + (0, m).setAppConfig(a); + (0, l).default(a); + if (j.env.__IS_SERVER__) return; + d.initHistory && (0, d).initHistory(a); + (0, k).default({ + appConfig: a, + buildConfig: o, + ErrorBoundary: n.default, + appLifecycle: { + createBaseApp: g, + initAppLifeCycles: d.initAppLifeCycles, + emitLifeCycles: d.emitLifeCycles + } + }); + } + var h = { + createBaseApp: g, + initAppLifeCycles: d.initAppLifeCycles + }; + b.default = h; + }, + 66902: function(d, a) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var b = function(b) { + var c = b.addProvider, a = b.appConfig; + if (a.app && a.app.addProvider) { + c(a.app.addProvider); + } + }; + var c = b; + a.default = c; + }, + 45440: function(g, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.Provider = a.withAuth = a.useAuth = void 0; + var h = b(547); + var i = b(37712); + var c = b(59301); + var j = (0, c).createContext(null); + var d = function(a) { + var b = a.value, e = b === void 0 ? {} : b, f = a.children; + var d = (0, c).useState(e), g = d[0], l = d[1]; + var k = function(a) { + var b = a === void 0 ? {} : a; + l(h.objectSpread({}, g, b)); + }; + return (0, i).jsx(j.Provider, { + value: [ + g, + k + ], + children: f + }); + }; + var e = function() { + var a = (0, c).useContext(j); + return a; + }; + function f(b) { + var a = function(c) { + var a = e(), d = a[0], f = a[1]; + var g = b; + return (0, i).jsx(g, h.objectSpread({}, c, { + auth: d, + setAuth: f + })); + }; + return a; + } + a.useAuth = e; + a.withAuth = f; + a.Provider = d; + }, + 8900: function(d, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var e = b(547); + var f = b(37712); + var g = b(45440); + var h = function(a) { + return function(c) { + var b = c.pageConfig, h = b === void 0 ? {} : b; + var d = function(d) { + var g = d.auth, k = d.setAuth, i = e.objectWithoutProperties(d, [ + "auth", + "setAuth", + ]); + var b = h.auth; + if (b && !Array.isArray(b)) { + throw new Error("pageConfig.auth must be an array"); + } + var j = Array.isArray(b) && b.length ? Object.keys(g).filter(function(a) { + return b.includes(a) ? g[a] : false; + }).length : true; + if (!j) { + if (a.NoAuthFallback) { + if (typeof a.NoAuthFallback === "function") { + return (0, f).jsx(a.NoAuthFallback, {}); + } + return a.NoAuthFallback; + } + return null; + } + return (0, f).jsx(c, e.objectSpread({}, i)); + }; + return (0, g).withAuth(d); + }; + }; + var c = function(a) { + var b = a.context, c = a.appConfig, d = a.addProvider, e = a.wrapperPageComponent; + var i = b && b.initialData ? b.initialData : {}; + var l = i.auth || {}; + var j = c.auth || {}; + var k = function(a) { + var b = a.children; + return (0, f).jsx(g.Provider, { + value: l, + children: b + }); + }; + d(k); + e(h(j)); + }; + a.default = c; + }, + 1481: function(g, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(56128); + var d = {}; + var h = { + default: c.axios.create(d) + }; + function e(a) { + if (a) { + if (h[a]) { + return h; + } + h[a] = c.axios.create(d); + } + return h; + } + var f = e; + a.default = f; + }, + 53380: function(f, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(547); + var g = c.interopRequireDefault(b(1481)); + var d = function(d) { + var b = d.appConfig; + if (b.request) { + var c = b.request, a = c === void 0 ? {} : c; + if (Object.prototype.toString.call(a) === "[object Array]") { + a.forEach(function(a) { + var b = a.instanceName ? a.instanceName : "default"; + if (b) { + var c = (0, g).default(b)[b]; + h(a, c); + } + }); + } else { + var e = (0, g).default().default; + h(a, e); + } + } + }; + function h(b, d) { + var e = b.interceptors, a = e === void 0 ? {} : e, f = c.objectWithoutProperties(b, [ + "interceptors" + ]); + Object.keys(f).forEach(function(a) { + d.defaults[a] = f[a]; + }); + if (a.request) { + d.interceptors.request.use(a.request.onConfig || function(a) { + return a; + }, a.request.onError || function(a) { + return Promise.reject(a); + }); + } + if (a.response) { + d.interceptors.response.use(a.response.onConfig || function(a) { + return a; + }, a.response.onError || function(a) { + return Promise.reject(a); + }); + } + } + var e = d; + a.default = e; + }, + 2526: function(f, b, a) { + "use strict"; + var g = a(97671); + Object.defineProperty(b, "__esModule", { + value: true + }); + b.default = void 0; + var c = a(547); + var h = a(37712); + var i = c.interopRequireDefault(a(11179)); + var j = c.interopRequireDefault(a(72791)); + var k = a(37447); + var l = c.interopRequireWildcard(a(14710)); + var d = function(a) { + var r = a.setRenderApp, f = a.appConfig, m = a.modifyRoutes, b = a.wrapperPageComponent, s = a.modifyRoutesComponent, d = a.buildConfig, t = a.context, y = a.applyRuntimeAPI; + var n = f.router, o = n === void 0 ? {} : n, p = f.app, e = p === void 0 ? {} : p; + var z = e.ErrorBoundaryFallback, A = e.onErrorBoundaryHandler; + var q = e.parseSearchParams, B = q === void 0 ? true : q; + var u = function(b) { + var a = function(a) { + var d = B && y("getSearchParams"); + return (0, h).jsx(b, c.objectSpread({}, Object.assign({}, a, { + searchParams: d + }))); + }; + return a; + }; + b(u); + m(function() { + return (0, l).default(o.routes || j.default, ""); + }); + s(function() { + return k.Routes; + }); + var v = function(b) { + var a = b.pageConfig, e = a === void 0 ? {} : a; + var d = function(a) { + if (e.errorBoundary) { + return (0, h).jsx(i.default, { + Fallback: z, + onError: A, + children: (0, h).jsx(b, c.objectSpread({}, a)) + }); + } + return (0, h).jsx(b, c.objectSpread({}, a)); + }; + return d; + }; + var w = g.env.__IS_SERVER__ ? (0, l).wrapperPageWithSSR(t) : (0, l).wrapperPageWithCSR(); + b(w); + b(v); + if (o.modifyRoutes) { + m(o.modifyRoutes); + } + var C = d && d.router && d.router.lazy; + var x = function(b, d, a) { + var e = a === void 0 ? {} : a; + return function() { + var a = c.objectSpread({}, o, { + lazy: C + }, e); + if (!a.history) { + a.history = y("createHistory", { + type: o.type, + basename: o.basename + }); + } + if (g.env.__IS_SERVER__) { + var f = t.initialContext, i = f === void 0 ? {} : f; + a = Object.assign({}, a, { + location: i.location, + context: i + }); + } + var j = a.fallback, l = c.objectWithoutProperties(a, [ + "fallback" + ]); + return (0, h).jsx(k.IceRouter, c.objectSpread({}, l, { + children: d ? (0, h).jsx(d, { + routes: (0, k).parseRoutes(b, j), + fallback: j + }) : null + })); + }; + }; + r(x); + }; + var e = d; + b.default = e; + }, + 37447: function(d, b, a) { + "use strict"; + var e = a(97671); + Object.defineProperty(b, "__esModule", { + value: true + }); + b.parseRoutes = m; + b.IceRouter = n; + b.Routes = o; + var c = a(547); + var f = a(37712); + var g = a(59301); + var h = a(63747); + var i = c.interopRequireDefault(a(9347)); + function j(a, b) { + return (b || []).reduce(function(a, c) { + var b = c(a); + if (a.pageConfig) { + b.pageConfig = a.pageConfig; + } + if (a.getInitialProps) { + b.getInitialProps = a.getInitialProps; + } + return b; + }, a); + } + function k(b, a) { + if (!a) return; + [ + "pageConfig", + "getInitialProps" + ].forEach(function(c) { + if (Object.prototype.hasOwnProperty.call(a, c)) { + b[c] = a[c]; + } + }); + } + function l(a, d, e, f) { + var b = a || {}, h = b.__LAZY__, l = b.dynamicImport, m = b.__LOADABLE__; + if (m) { + return (0, i).default(l, { + resolveComponent: function(b) { + var a = b.default; + k(a, e); + return j(a, d); + }, + fallback: f + }); + } else if (h) { + return (0, g).lazy(function() { + return l().then(function(a) { + if (d && d.length) { + var b = a.default; + k(b, e); + return c.objectSpread({}, a, { + default: j(b, d) + }); + } + return a; + }); + }); + } else { + k(a, e); + return j(a, d); + } + } + function m(a, b) { + return a.map(function(a) { + var d = a.children, h = a.component, i = a.routeWrappers, e = a.wrappers, j = c.objectWithoutProperties(a, [ + "children", + "component", + "routeWrappers", + "wrappers", + ]); + var f = d ? [] : i; + if (e && e.length) { + f = f.concat(e); + } + var g = c.objectSpread({}, j); + if (h) { + g.component = l(h, f, a, b); + } + if (d) { + g.children = m(d, b); + } + return g; + }); + } + function n(a) { + var e = a.type, g = a.children, d = c.objectWithoutProperties(a, [ + "type", + "children", + ]); + var b = g; + if (!b && a.routes) { + var i = m(a.routes, a.fallback); + b = (0, f).jsx(o, { + routes: i, + fallback: a.fallback + }); + } + return e === "static" ? (0, f).jsx(h.StaticRouter, c.objectSpread({}, d, { + children: b + })) : (0, f).jsx(h.Router, c.objectSpread({}, d, { + children: b + })); + } + function o(a) { + var b = a.routes, d = a.fallback; + return (0, f).jsx(h.Switch, { + children: b.map(function(a, i) { + var j = a.children; + if (!j) { + if (a.redirect) { + var l = a.redirect, b = c.objectWithoutProperties(a, [ + "redirect" + ]); + return (0, f).jsx(h.Redirect, c.objectSpread({ + from: a.path, + to: l + }, b), i); + } else { + var m = a.component, b = c.objectWithoutProperties(a, [ + "component" + ]); + if (m) { + var k = e.env.__IS_SERVER__ || window.__ICE_SSR_ENABLED__ ? function(a) { + return (0, f).jsx(m, c.objectSpread({}, a)); + } : function(a) { + return (0, f).jsx(g.Suspense, { + fallback: d || (0, f).jsx("div", { + children: "loading" + }), + children: (0, f).jsx(m, c.objectSpread({}, a)) + }); + }; + return (0, f).jsx(h.Route, c.objectSpread({}, b, { + render: k + }), i); + } else { + console.error("[Router] component is required when config routes"); + return null; + } + } + } else { + var n = a.component, j = a.children, b = c.objectWithoutProperties(a, [ + "component", + "children" + ]); + var p = (0, f).jsx(o, { + routes: j, + fallback: d + }); + var k = function(a) { + return n ? (0, f).jsx(n, c.objectSpread({}, a, { + children: p + })) : p; + }; + return (0, f).jsx(h.Route, c.objectSpread({}, b, { + render: k + }), i); + } + }) + }); + } + }, + 14710: function(d, b, a) { + "use strict"; + Object.defineProperty(b, "__esModule", { + value: true + }); + b.default = j; + b.wrapperPageWithSSR = k; + b.wrapperPageWithCSR = l; + var c = a(547); + var e = c.interopRequireDefault(a(10405)); + var f = a(37712); + var g = a(59301); + var h = c.interopRequireWildcard(a(20386)); + var i = c.interopRequireDefault(a(65719)); + function j(a, b) { + return a.map(function(a) { + if (a.path) { + var d = (0, i).default(b || "", a.path); + a.path = d === "/" ? "/" : d.replace(/\/$/, ""); + } + if (a.children) { + a.children = j(a.children, a.path); + } else if (a.component) { + var c = a.component; + c.pageConfig = Object.assign({}, c.pageConfig, { + componentName: c.name + }); + } + return a; + }); + } + function k(a) { + var d = c.objectSpread({}, a.pageInitialProps); + var b = function(b) { + var a = function(a) { + return (0, f).jsx(b, c.objectSpread({}, Object.assign({}, a, d))); + }; + return a; + }; + return b; + } + function l() { + var a = function(b) { + var d = b.pageConfig; + var a = d || {}, j = a.title, k = a.scrollToTop; + var i = function(d) { + var a = (0, g).useState(window.__ICE_PAGE_PROPS__), i = a[0], l = a[1]; + (0, g).useEffect(function() { + if (j) { + document.title = j; + } + if (k) { + window.scrollTo(0, 0); + } + if (window.__ICE_PAGE_PROPS__) { + window.__ICE_PAGE_PROPS__ = null; + } else if (b.getInitialProps) { + c.asyncToGenerator(e.default.mark(function a() { + var c, d, f, g, i, j, k, m, n, o; + return e.default.wrap(function e(a) { + while(1)switch((a.prev = a.next)){ + case 0: + (c = window.location), (d = c.href), (f = c.origin), (g = c.pathname), (i = c.search); + j = d.replace(f, ""); + k = h.parse(i); + m = window.__ICE_SSR_ERROR__; + n = { + pathname: g, + path: j, + query: k, + ssrError: m + }; + a.next = 7; + return b.getInitialProps(n); + case 7: + o = a.sent; + l(o); + case 9: + case "end": + return a.stop(); + } + }, a); + }))(); + } + }, []); + return (0, f).jsx(b, c.objectSpread({}, Object.assign({}, d, i))); + }; + return i; + }; + return a; + } + }, + 65719: function(d, a) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + function b() { + for(var c = arguments.length, b = new Array(c), a = 0; a < c; a++){ + b[a] = arguments[a]; + } + if (b.length === 0) { + return ""; + } + var d = []; + var e = b.filter(function(a) { + return a !== ""; + }); + e.forEach(function(b, c) { + if (typeof b !== "string") { + throw new Error("Path must be a string. Received ".concat(b)); + } + var a = b; + if (c > 0) { + a = a.replace(/^[/]+/, ""); + } + if (c < e.length - 1) { + a = a.replace(/[/]+$/, ""); + } else { + a = a.replace(/[/]+$/, "/"); + } + d.push(a); + }); + return d.join("/"); + } + var c = b; + a.default = c; + }, + 56905: function(f, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(547); + var g = b(37712); + var h = c.interopRequireDefault(b(89704)); + var d = function() { + return (0, g).jsxs("div", { + className: h.default.container, + children: [ + (0, g).jsx("h2", { + className: h.default.title, + children: "Welcome to icejs!" + }), + (0, g).jsx("p", { + className: h.default.description, + children: "This is a awesome project, enjoy it!" + }), + (0, g).jsxs("div", { + className: h.default.action, + children: [ + (0, g).jsx("a", { + href: "https://ice.work/docs/guide/about", + target: "_blank", + rel: "noopener noreferrer", + style: { + marginRight: 20 + }, + children: "使用文档" + }), + (0, g).jsx("a", { + href: "https://github.com/ice-lab/icejs", + target: "_blank", + rel: "noopener noreferrer", + children: "GitHub" + }), + ] + }), + ] + }); + }; + var e = d; + a.default = e; + }, + 43361: function(f, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(547); + var g = b(37712); + var h = c.interopRequireDefault(b(56905)); + var d = function() { + console.log(1); + return (0, g).jsx(h.default, {}); + }; + var e = d; + a.default = e; + }, + 72791: function(g, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.default = void 0; + var c = b(547); + var d = c.interopRequireDefault(b(43361)); + var e = [ + { + path: "/", + component: d.default + }, + ]; + var f = e; + a.default = f; + }, + 56128: function(g, b, a) { + "use strict"; + a.r(b); + a.d(b, { + axios: function() { + return h(); + }, + axiosUtils: function() { + return j; + } + }); + var c = a(73035); + var h = a.n(c); + function d(a) { + return toString.call(a) === "[object Array]"; + } + function i(a) { + if (toString.call(a) !== "[object Object]") { + return false; + } + var b = Object.getPrototypeOf(a); + return b === null || b === Object.prototype; + } + function e(a, e) { + if (a === null || typeof a === "undefined") { + return; + } + if (typeof a !== "object") { + a = [ + a + ]; + } + if (d(a)) { + for(var b = 0, f = a.length; b < f; b++){ + e.call(null, a[b], b, a); + } + } else { + for(var c in a){ + if (Object.prototype.hasOwnProperty.call(a, c)) { + e.call(null, a[c], c, a); + } + } + } + } + function f() { + var b = []; + for(var a = 0; a < arguments.length; a++){ + b[a] = arguments[a]; + } + var g = {}; + function h(a, b) { + if (i(g[b]) && i(a)) { + g[b] = f(g[b], a); + } else if (i(a)) { + g[b] = f({}, a); + } else if (d(a)) { + g[b] = a.slice(); + } else { + g[b] = a; + } + } + for(var c = 0, j = b.length; c < j; c++){ + e(b[c], h); + } + return g; + } + var j = { + forEach: e, + merge: f, + isArray: d + }; + }, + 9347: function(s, b, a) { + "use strict"; + a.r(b); + a.d(b, { + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: function() { + return K; + }, + default: function() { + return L; + }, + lazy: function() { + return r; + }, + loadableReady: function() { + return J; + } + }); + var g = a(59301); + var t = a(21617); + var u = a(87062); + function v(a) { + if (a === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return a; + } + var w = a(48861); + var x = a(99234); + var h = a(94266); + var y = a.n(h); + function i(b, c) { + if (b) return; + var a = new Error("loadable: " + c); + a.framesToPop = 1; + a.name = "Invariant Violation"; + throw a; + } + function z(a) { + console.warn("loadable: " + a); + } + var j = g.createContext(); + var A = "__LOADABLE_REQUIRED_CHUNKS__"; + function k(a) { + return "" + a + A; + } + var l = Object.freeze({ + __proto__: null, + getRequiredChunkKey: k, + invariant: i, + Context: j + }); + var B = { + initialChunks: {} + }; + var C = "PENDING"; + var D = "RESOLVED"; + var E = "REJECTED"; + function F(a) { + if (typeof a === "function") { + return { + requireAsync: a, + resolve: function a() { + return undefined; + }, + chunkName: function a() { + return undefined; + } + }; + } + return a; + } + var G = function c(a) { + var b = function b(c) { + return g.createElement(j.Consumer, null, function(b) { + return g.createElement(a, Object.assign({ + __chunkExtractor: b + }, c)); + }); + }; + if (a.displayName) { + b.displayName = a.displayName + "WithChunkExtractor"; + } + return b; + }; + var H = function b(a) { + return a; + }; + function c(a) { + var b = a.defaultResolveComponent, e = b === void 0 ? H : b, f = a.render, h = a.onLoad; + function c(c, b) { + if (b === void 0) { + b = {}; + } + var j = F(c); + var k = {}; + function l(a) { + if (b.cacheKey) { + return b.cacheKey(a); + } + if (j.resolve) { + return j.resolve(a); + } + return "static"; + } + function m(c, d, f) { + var a = b.resolveComponent ? b.resolveComponent(c, d) : e(c); + if (b.resolveComponent && !(0, x.isValidElementType)(a)) { + throw new Error("resolveComponent returned something that is not a React component!"); + } + y()(f, a, { + preload: true + }); + return a; + } + var d = (function(e) { + (0, w.Z)(d, e); + d.getDerivedStateFromProps = function d(c, a) { + var b = l(c); + return (0, u.Z)({}, a, { + cacheKey: b, + loading: a.loading || a.cacheKey !== b + }); + }; + function d(a) { + var c; + c = e.call(this, a) || this; + c.state = { + result: null, + error: null, + loading: true, + cacheKey: l(a) + }; + i(!a.__chunkExtractor || j.requireSync, "SSR requires `@loadable/babel-plugin`, please install it"); + if (a.__chunkExtractor) { + if (b.ssr === false) { + return v(c); + } + j.requireAsync(a)["catch"](function() { + return null; + }); + c.loadSync(); + a.__chunkExtractor.addChunk(j.chunkName(a)); + return v(c); + } + if (b.ssr !== false && ((j.isReady && j.isReady(a)) || (j.chunkName && B.initialChunks[j.chunkName(a)]))) { + c.loadSync(); + } + return c; + } + var c = d.prototype; + c.componentDidMount = function b() { + this.mounted = true; + var a = this.getCache(); + if (a && a.status === E) { + this.setCache(); + } + if (this.state.loading) { + this.loadAsync(); + } + }; + c.componentDidUpdate = function b(c, a) { + if (a.cacheKey !== this.state.cacheKey) { + this.loadAsync(); + } + }; + c.componentWillUnmount = function a() { + this.mounted = false; + }; + c.safeSetState = function c(a, b) { + if (this.mounted) { + this.setState(a, b); + } + }; + c.getCacheKey = function a() { + return l(this.props); + }; + c.getCache = function a() { + return k[this.getCacheKey()]; + }; + c.setCache = function b(a) { + if (a === void 0) { + a = undefined; + } + k[this.getCacheKey()] = a; + }; + c.triggerOnLoad = function a() { + var b = this; + if (h) { + setTimeout(function() { + h(b.state.result, b.props); + }); + } + }; + c.loadSync = function e() { + if (!this.state.loading) return; + try { + var c = j.requireSync(this.props); + var d = m(c, this.props, a); + this.state.result = d; + this.state.loading = false; + } catch (b) { + console.error("loadable-components: failed to synchronously load component, which expected to be available", { + fileName: j.resolve(this.props), + chunkName: j.chunkName(this.props), + error: b ? b.message : b + }); + this.state.error = b; + } + }; + c.loadAsync = function c() { + var d = this; + var b = this.resolveAsync(); + b.then(function(b) { + var c = m(b, d.props, { + Loadable: a + }); + d.safeSetState({ + result: c, + loading: false + }, function() { + return d.triggerOnLoad(); + }); + })["catch"](function(a) { + return d.safeSetState({ + error: a, + loading: false + }); + }); + return b; + }; + c.resolveAsync = function d() { + var e = this; + var b = this.props, f = b.__chunkExtractor, g = b.forwardedRef, c = (0, t.Z)(b, [ + "__chunkExtractor", + "forwardedRef" + ]); + var a = this.getCache(); + if (!a) { + a = j.requireAsync(c); + a.status = C; + this.setCache(a); + a.then(function() { + a.status = D; + }, function(b) { + console.error("loadable-components: failed to asynchronously load component", { + fileName: j.resolve(e.props), + chunkName: j.chunkName(e.props), + error: b ? b.message : b + }); + a.status = E; + }); + } + return a; + }; + c.render = function m() { + var a = this.props, g = a.forwardedRef, h = a.fallback, n = a.__chunkExtractor, i = (0, t.Z)(a, [ + "forwardedRef", + "fallback", + "__chunkExtractor", + ]); + var c = this.state, d = c.error, j = c.loading, k = c.result; + if (b.suspense) { + var l = this.getCache() || this.loadAsync(); + if (l.status === C) { + throw this.loadAsync(); + } + } + if (d) { + throw d; + } + var e = h || b.fallback || null; + if (j) { + return e; + } + return f({ + fallback: e, + result: k, + options: b, + props: (0, u.Z)({}, i, { + ref: g + }) + }); + }; + return d; + })(g.Component); + var n = G(d); + var a = g.forwardRef(function(a, b) { + return g.createElement(n, Object.assign({ + forwardedRef: b + }, a)); + }); + a.displayName = "Loadable"; + a.preload = function(a) { + j.requireAsync(a); + }; + a.load = function(a) { + return j.requireAsync(a); + }; + return a; + } + function d(a, b) { + return c(a, (0, u.Z)({}, b, { + suspense: true + })); + } + return { + loadable: c, + lazy: d + }; + } + function m(a) { + return a.__esModule ? a["default"] : a["default"] || a; + } + var d = c({ + defaultResolveComponent: m, + render: function d(a) { + var b = a.result, c = a.props; + return g.createElement(b, c); + } + }), n = d.loadable, o = d.lazy; + var e = c({ + onLoad: function c(b, a) { + if (b && a.forwardedRef) { + if (typeof a.forwardedRef === "function") { + a.forwardedRef(b); + } else { + a.forwardedRef.current = b; + } + } + }, + render: function d(a) { + var c = a.result, b = a.props; + if (b.children) { + return b.children(c); + } + return null; + } + }), p = e.loadable, q = e.lazy; + var I = typeof window !== "undefined"; + function J(a, b) { + if (a === void 0) { + a = function a() {}; + } + var c = b === void 0 ? {} : b, d = c.namespace, j = d === void 0 ? "" : d, e = c.chunkLoadingGlobal, n = e === void 0 ? "__LOADABLE_LOADED_CHUNKS__" : e; + if (!I) { + z("`loadableReady()` must be called in browser only"); + a(); + return Promise.resolve(); + } + var f = null; + if (I) { + var g = k(j); + var h = document.getElementById(g); + if (h) { + f = JSON.parse(h.textContent); + var i = document.getElementById(g + "_ext"); + if (i) { + var l = JSON.parse(i.textContent), m = l.namedChunks; + m.forEach(function(a) { + B.initialChunks[a] = true; + }); + } else { + throw new Error("loadable-component: @loadable/server does not match @loadable/component"); + } + } + } + if (!f) { + z("`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side"); + a(); + return Promise.resolve(); + } + var o = false; + return new Promise(function(c) { + window[n] = window[n] || []; + var a = window[n]; + var d = a.push.bind(a); + function b() { + if (f.every(function(b) { + return a.some(function(a) { + var c = a[0]; + return c.indexOf(b) > -1; + }); + })) { + if (!o) { + o = true; + c(); + } + } + } + a.push = function() { + d.apply(void 0, arguments); + b(); + }; + b(); + }).then(a); + } + var f = n; + f.lib = p; + var r = o; + r.lib = q; + var K = l; + var L = f; + }, + 547: function(d, b, c) { + "use strict"; + c.r(b); + c.d(b, { + _instanceof: function() { + return as; + }, + _throw: function() { + return aO; + }, + applyDecoratedDescriptor: function() { + return e; + }, + arrayWithHoles: function() { + return f; + }, + arrayWithoutHoles: function() { + return g; + }, + assertThisInitialized: function() { + return h; + }, + asyncGenerator: function() { + return a; + }, + asyncGeneratorDelegate: function() { + return j; + }, + asyncIterator: function() { + return k; + }, + asyncToGenerator: function() { + return m; + }, + awaitAsyncGenerator: function() { + return n; + }, + awaitValue: function() { + return i; + }, + classCallCheck: function() { + return o; + }, + classNameTDZError: function() { + return p; + }, + classPrivateFieldGet: function() { + return q; + }, + classPrivateFieldLooseBase: function() { + return r; + }, + classPrivateFieldSet: function() { + return s; + }, + classPrivateMethodGet: function() { + return t; + }, + classPrivateMethodSet: function() { + return u; + }, + classStaticPrivateFieldSpecGet: function() { + return v; + }, + classStaticPrivateFieldSpecSet: function() { + return w; + }, + construct: function() { + return z; + }, + createClass: function() { + return B; + }, + decorate: function() { + return I; + }, + defaults: function() { + return ac; + }, + defineEnumerableProperties: function() { + return ad; + }, + defineProperty: function() { + return ae; + }, + extends: function() { + return ag; + }, + get: function() { + return al; + }, + getPrototypeOf: function() { + return ai; + }, + inherits: function() { + return ao; + }, + inheritsLoose: function() { + return ap; + }, + initializerDefineProperty: function() { + return aq; + }, + initializerWarningHelper: function() { + return ar; + }, + interopRequireDefault: function() { + return at; + }, + interopRequireWildcard: function() { + return au; + }, + isNativeFunction: function() { + return av; + }, + iterableToArray: function() { + return C; + }, + iterableToArrayLimit: function() { + return aw; + }, + iterableToArrayLimitLoose: function() { + return ax; + }, + jsx: function() { + return az; + }, + newArrowCheck: function() { + return aA; + }, + nonIterableRest: function() { + return D; + }, + nonIterableSpread: function() { + return aB; + }, + objectSpread: function() { + return aC; + }, + objectWithoutProperties: function() { + return aE; + }, + objectWithoutPropertiesLoose: function() { + return aD; + }, + possibleConstructorReturn: function() { + return aF; + }, + readOnlyError: function() { + return aG; + }, + set: function() { + return aI; + }, + setPrototypeOf: function() { + return an; + }, + skipFirstGeneratorNext: function() { + return aJ; + }, + slicedToArray: function() { + return aK; + }, + slicedToArrayLoose: function() { + return aL; + }, + superPropBase: function() { + return aj; + }, + taggedTemplateLiteral: function() { + return aM; + }, + taggedTemplateLiteralLoose: function() { + return aN; + }, + toArray: function() { + return E; + }, + toConsumableArray: function() { + return aP; + }, + toPrimitive: function() { + return G; + }, + toPropertyKey: function() { + return H; + }, + typeOf: function() { + return F; + }, + wrapAsyncGenerator: function() { + return aQ; + }, + wrapNativeSuper: function() { + return aS; + } + }); + function e(c, d, e, f, b) { + var a = {}; + Object["ke" + "ys"](f).forEach(function(b) { + a[b] = f[b]; + }); + a.enumerable = !!a.enumerable; + a.configurable = !!a.configurable; + if ("value" in a || a.initializer) { + a.writable = true; + } + a = e.slice().reverse().reduce(function(a, b) { + return b ? b(c, d, a) || a : a; + }, a); + if (b && a.initializer !== void 0) { + a.value = a.initializer ? a.initializer.call(b) : void 0; + a.initializer = undefined; + } + if (a.initializer === void 0) { + Object["define" + "Property"](c, d, a); + a = null; + } + return a; + } + function f(a) { + if (Array.isArray(a)) return a; + } + function g(a) { + if (Array.isArray(a)) { + for(var b = 0, c = new Array(a.length); b < a.length; b++){ + c[b] = a[b]; + } + return c; + } + } + function h(a) { + if (a === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return a; + } + function i(a) { + this.wrapped = a; + } + function a(a) { + var c, d; + function b(a, b) { + return new Promise(function(g, h) { + var f = { + key: a, + arg: b, + resolve: g, + reject: h, + next: null + }; + if (d) { + d = d.next = f; + } else { + c = d = f; + e(a, b); + } + }); + } + function e(c, d) { + try { + var g = a[c](d); + var b = g.value; + var h = b instanceof i; + Promise.resolve(h ? b.wrapped : b).then(function(a) { + if (h) { + e("next", a); + return; + } + f(g.done ? "return" : "normal", a); + }, function(a) { + e("throw", a); + }); + } catch (j) { + f("throw", j); + } + } + function f(b, a) { + switch(b){ + case "return": + c.resolve({ + value: a, + done: true + }); + break; + case "throw": + c.reject(a); + break; + default: + c.resolve({ + value: a, + done: false + }); + break; + } + c = c.next; + if (c) { + e(c.key, c.arg); + } else { + d = null; + } + } + this._invoke = b; + if (typeof a.return !== "function") { + this.return = undefined; + } + } + if (typeof Symbol === "function" && Symbol.asyncIterator) { + a.prototype[Symbol.asyncIterator] = function() { + return this; + }; + } + a.prototype.next = function(a) { + return this._invoke("next", a); + }; + a.prototype.throw = function(a) { + return this._invoke("throw", a); + }; + a.prototype.return = function(a) { + return this._invoke("return", a); + }; + function j(b, c) { + var a = {}, d = false; + function e(e, a) { + d = true; + a = new Promise(function(c) { + c(b[e](a)); + }); + return { + done: false, + value: c(a) + }; + } + if (typeof Symbol === "function" && Symbol.iterator) { + a[Symbol.iterator] = function() { + return this; + }; + } + a.next = function(a) { + if (d) { + d = false; + return a; + } + return e("next", a); + }; + if (typeof b.throw === "function") { + a.throw = function(a) { + if (d) { + d = false; + throw a; + } + return e("throw", a); + }; + } + if (typeof b.return === "function") { + a.return = function(a) { + return e("return", a); + }; + } + return a; + } + function k(b) { + var a; + if (typeof Symbol === "function") { + if (Symbol.asyncIterator) { + a = b[Symbol.asyncIterator]; + if (a != null) return a.call(b); + } + if (Symbol.iterator) { + a = b[Symbol.iterator]; + if (a != null) return a.call(b); + } + } + throw new TypeError("Object is not async iterable"); + } + function l(c, d, e, f, g, h, i) { + try { + var a = c[h](i); + var b = a.value; + } catch (j) { + e(j); + return; + } + if (a.done) { + d(b); + } else { + Promise.resolve(b).then(f, g); + } + } + function m(a) { + return function() { + var b = this, c = arguments; + return new Promise(function(e, f) { + var g = a.apply(b, c); + function d(a) { + l(g, e, f, d, h, "next", a); + } + function h(a) { + l(g, e, f, d, h, "throw", a); + } + d(undefined); + }); + }; + } + function n(a) { + return new i(a); + } + function o(a, b) { + if (!(a instanceof b)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function p(a) { + throw new Error('Class "' + a + '" cannot be referenced in computed property keys.'); + } + function q(a, b) { + if (!b.has(a)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return b.get(a).value; + } + function r(a, b) { + if (!Object.prototype.hasOwnProperty.call(a, b)) { + throw new TypeError("attempted to use private field on non-instance"); + } + return a; + } + function s(a, b, c) { + if (!b.has(a)) { + throw new TypeError("attempted to set private field on non-instance"); + } + var d = b.get(a); + if (!d.writable) { + throw new TypeError("attempted to set read only private field"); + } + d.value = c; + return c; + } + function t(a, b, c) { + if (!b.has(a)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return c; + } + function u() { + throw new TypeError("attempted to reassign private method"); + } + function v(a, b, c) { + if (a !== b) { + throw new TypeError("Private static access of wrong provenance"); + } + return c.value; + } + function w(c, d, a, b) { + if (c !== d) { + throw new TypeError("Private static access of wrong provenance"); + } + if (!a.writable) { + throw new TypeError("attempted to set read only private field"); + } + a.value = b; + return b; + } + function x() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function() {})); + return true; + } catch (a) { + return false; + } + } + function y(a, b, c) { + if (x()) { + y = Reflect.construct; + } else { + y = function g(d, e, b) { + var a = [ + null + ]; + a.push.apply(a, e); + var f = Function.bind.apply(d, a); + var c = new f(); + if (b) _setPrototypeOf(c, b.prototype); + return c; + }; + } + return y.apply(null, arguments); + } + function z(a, b, c) { + return y.apply(null, arguments); + } + function A(d, c) { + for(var b = 0; b < c.length; b++){ + var a = c[b]; + a.enumerable = a.enumerable || false; + a.configurable = true; + if ("value" in a) a.writable = true; + Object.defineProperty(d, a.key, a); + } + } + function B(a, b, c) { + if (b) A(a.prototype, b); + if (c) A(a, c); + return a; + } + function C(a) { + if (Symbol.iterator in Object(a) || Object.prototype.toString.call(a) === "[object Arguments]") return Array.from(a); + } + function D() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + function E(a) { + return (f(a) || C(a) || D()); + } + function F(a) { + return a && a.constructor === Symbol ? "symbol" : typeof a; + } + function G(a, b) { + if (F(a) !== "object" || a === null) return a; + var c = a[Symbol.toPrimitive]; + if (c !== undefined) { + var d = c.call(a, b || "default"); + if (F(d) !== "object") return d; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (b === "string" ? String : Number)(a); + } + function H(b) { + var a = G(b, "string"); + return F(a) === "symbol" ? a : String(a); + } + function I(c, d, e) { + var a = d(function c(a) { + P(a, b.elements); + }, e); + var b = R(L(a.d.map(J)), c); + O(a.F, b.elements); + return ab(a.F, b.finishers); + } + function J(a) { + var c = H(a.key); + var b; + if (a.kind === "method") { + b = { + value: a.value, + writable: true, + configurable: true, + enumerable: false + }; + Object.defineProperty(a.value, "name", { + value: _typeof(c) === "symbol" ? "" : c, + configurable: true + }); + } else if (a.kind === "get") { + b = { + get: a.value, + configurable: true, + enumerable: false + }; + } else if (a.kind === "set") { + b = { + set: a.value, + configurable: true, + enumerable: false + }; + } else if (a.kind === "field") { + b = { + configurable: true, + writable: true, + enumerable: true + }; + } + var d = { + kind: a.kind === "field" ? "field" : "method", + key: c, + placement: a.static ? "static" : a.kind === "field" ? "own" : "prototype", + descriptor: b + }; + if (a.decorators) d.decorators = a.decorators; + if (a.kind === "field") d.initializer = a.value; + return d; + } + function K(a, b) { + if (a.descriptor.get !== undefined) { + b.descriptor.get = a.descriptor.get; + } else { + b.descriptor.set = a.descriptor.set; + } + } + function L(e) { + var c = []; + var f = function c(b) { + return (b.kind === "method" && b.key === a.key && b.placement === a.placement); + }; + for(var d = 0; d < e.length; d++){ + var a = e[d]; + var b; + if (a.kind === "method" && (b = c.find(f))) { + if (N(a.descriptor) || N(b.descriptor)) { + if (M(a) || M(b)) { + throw new ReferenceError("Duplicated methods (" + a.key + ") can't be decorated."); + } + b.descriptor = a.descriptor; + } else { + if (M(a)) { + if (M(b)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + a.key + ")."); + } + b.decorators = a.decorators; + } + K(a, b); + } + } else { + c.push(a); + } + } + return c; + } + function M(a) { + return a.decorators && a.decorators.length; + } + function N(a) { + return (a !== undefined && !(a.value === undefined && a.writable === undefined)); + } + function O(a, b) { + var c = a.prototype; + [ + "method", + "field" + ].forEach(function(d) { + b.forEach(function(b) { + var e = b.placement; + if (b.kind === d && (e === "static" || e === "prototype")) { + var f = e === "static" ? a : c; + Q(f, b); + } + }); + }); + } + function P(a, b) { + [ + "method", + "field" + ].forEach(function(c) { + b.forEach(function(b) { + if (b.kind === c && b.placement === "own") { + Q(a, b); + } + }); + }); + } + function Q(c, b) { + var a = b.descriptor; + if (b.kind === "field") { + var d = b.initializer; + a = { + enumerable: a.enumerable, + writable: a.writable, + configurable: a.configurable, + value: d === void 0 ? void 0 : d.call(c) + }; + } + Object.defineProperty(c, b.key, a); + } + function R(c, d) { + var e = []; + var a = []; + var f = { + static: [], + prototype: [], + own: [] + }; + c.forEach(function(a) { + S(a, f); + }); + c.forEach(function(b) { + if (!M(b)) return e.push(b); + var c = T(b, f); + e.push(c.element); + e.push.apply(e, c.extras); + a.push.apply(a, c.finishers); + }); + if (!d) { + return { + elements: e, + finishers: a + }; + } + var b = U(e, d); + a.push.apply(a, b.finishers); + b.finishers = a; + return b; + } + function S(a, c, d) { + var b = c[a.placement]; + if (!d && b.indexOf(a.key) !== -1) { + throw new TypeError("Duplicated element (" + a.key + ")"); + } + b.push(a.key); + } + function T(a, d) { + var e = []; + var h = []; + for(var i = a.decorators, f = i.length - 1; f >= 0; f--){ + var j = d[a.placement]; + j.splice(j.indexOf(a.key), 1); + var k = V(a); + var b = Y((0, i[f])(k) || k); + a = b.element; + S(a, d); + if (b.finisher) { + h.push(b.finisher); + } + var c = b.extras; + if (c) { + for(var g = 0; g < c.length; g++){ + S(c[g], d); + } + e.push.apply(e, c); + } + } + return { + element: a, + finishers: h, + extras: e + }; + } + function U(a, f) { + var g = []; + for(var e = f.length - 1; e >= 0; e--){ + var h = Z(a); + var c = $((0, f[e])(h) || h); + if (c.finisher !== undefined) { + g.push(c.finisher); + } + if (c.elements !== undefined) { + a = c.elements; + for(var b = 0; b < a.length - 1; b++){ + for(var d = b + 1; d < a.length; d++){ + if (a[b].key === a[d].key && a[b].placement === a[d].placement) { + throw new TypeError("Duplicated element (" + a[b].key + ")"); + } + } + } + } + } + return { + elements: a, + finishers: g + }; + } + function V(a) { + var b = { + kind: a.kind, + key: a.key, + placement: a.placement, + descriptor: a.descriptor + }; + var c = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(b, Symbol.toStringTag, c); + if (a.kind === "field") b.initializer = a.initializer; + return b; + } + function W(a) { + if (a === undefined) return; + return E(a).map(function(a) { + var b = X(a); + _(a, "finisher", "An element descriptor"); + _(a, "extras", "An element descriptor"); + return b; + }); + } + function X(a) { + var b = String(a.kind); + if (b !== "method" && b !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + b + '"'); + } + var f = H(a.key); + var c = String(a.placement); + if (c !== "static" && c !== "prototype" && c !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + c + '"'); + } + var d = a.descriptor; + _(a, "elements", "An element descriptor"); + var e = { + kind: b, + key: f, + placement: c, + descriptor: Object.assign({}, d) + }; + if (b !== "field") { + _(a, "initializer", "A method descriptor"); + } else { + _(d, "get", "The property descriptor of a field descriptor"); + _(d, "set", "The property descriptor of a field descriptor"); + _(d, "value", "The property descriptor of a field descriptor"); + e.initializer = a.initializer; + } + return e; + } + function Y(a) { + var b = X(a); + var c = aa(a, "finisher"); + var d = W(a.extras); + return { + element: b, + finisher: c, + extras: d + }; + } + function Z(b) { + var a = { + kind: "class", + elements: b.map(V) + }; + var c = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(a, Symbol.toStringTag, c); + return a; + } + function $(a) { + var b = String(a.kind); + if (b !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + b + '"'); + } + _(a, "key", "A class descriptor"); + _(a, "placement", "A class descriptor"); + _(a, "descriptor", "A class descriptor"); + _(a, "initializer", "A class descriptor"); + _(a, "extras", "A class descriptor"); + var c = aa(a, "finisher"); + var d = W(a.elements); + return { + elements: d, + finisher: c + }; + } + function _(b, a, c) { + if (b[a] !== undefined) { + throw new TypeError(c + " can't have a ." + a + " property."); + } + } + function aa(c, b) { + var a = c[b]; + if (a !== undefined && typeof a !== "function") { + throw new TypeError("Expected '" + b + "' to be a function"); + } + return a; + } + function ab(a, d) { + for(var b = 0; b < d.length; b++){ + var c = (0, d[b])(a); + if (c !== undefined) { + if (typeof c !== "function") { + throw new TypeError("Finishers must return a constructor."); + } + a = c; + } + } + return a; + } + function ac(a, e) { + var f = Object.getOwnPropertyNames(e); + for(var b = 0; b < f.length; b++){ + var c = f[b]; + var d = Object.getOwnPropertyDescriptor(e, c); + if (d && d.configurable && a[c] === undefined) { + Object.defineProperty(a, c, d); + } + } + return a; + } + function ad(c, b) { + for(var e in b){ + var a = b[e]; + a.configurable = a.enumerable = true; + if ("value" in a) a.writable = true; + Object.defineProperty(c, e, a); + } + if (Object.getOwnPropertySymbols) { + var f = Object.getOwnPropertySymbols(b); + for(var d = 0; d < f.length; d++){ + var g = f[d]; + var a = b[g]; + a.configurable = a.enumerable = true; + if ("value" in a) a.writable = true; + Object.defineProperty(c, g, a); + } + } + return c; + } + function ae(a, b, c) { + if (b in a) { + Object.defineProperty(a, b, { + value: c, + enumerable: true, + configurable: true, + writable: true + }); + } else { + a[b] = c; + } + return a; + } + function af() { + af = Object.assign || function(d) { + for(var a = 1; a < arguments.length; a++){ + var b = arguments[a]; + for(var c in b){ + if (Object.prototype.hasOwnProperty.call(b, c)) { + d[c] = b[c]; + } + } + } + return d; + }; + return af.apply(this, arguments); + } + function ag() { + return af.apply(this, arguments); + } + function ah(a) { + ah = Object.setPrototypeOf ? Object.getPrototypeOf : function b(a) { + return a.__proto__ || Object.getPrototypeOf(a); + }; + return ah(a); + } + function ai(a) { + return ah(a); + } + function aj(a, b) { + while(!Object.prototype.hasOwnProperty.call(a, b)){ + a = ai(a); + if (a === null) break; + } + return a; + } + function ak(a, b, c) { + if (typeof Reflect !== "undefined" && Reflect.get) { + ak = Reflect.get; + } else { + ak = function f(b, c, e) { + var d = aj(b, c); + if (!d) return; + var a = Object.getOwnPropertyDescriptor(d, c); + if (a.get) { + return a.get.call(e || b); + } + return a.value; + }; + } + return ak(a, b, c); + } + function al(a, b, c) { + return ak(a, b, c); + } + function am(a, b) { + am = Object.setPrototypeOf || function c(a, b) { + a.__proto__ = b; + return a; + }; + return am(a, b); + } + function an(a, b) { + return am(a, b); + } + function ao(b, a) { + if (typeof a !== "function" && a !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + b.prototype = Object.create(a && a.prototype, { + constructor: { + value: b, + writable: true, + configurable: true + } + }); + if (a) an(b, a); + } + function ap(a, b) { + a.prototype = Object.create(b.prototype); + a.prototype.constructor = a; + a.__proto__ = b; + } + function aq(b, c, a, d) { + if (!a) return; + Object.defineProperty(b, c, { + enumerable: a.enumerable, + configurable: a.configurable, + writable: a.writable, + value: a.initializer ? a.initializer.call(d) : void 0 + }); + } + function ar(a, b) { + throw new Error("Decorating class property failed. Please ensure that " + "proposal-class-properties is enabled and set to use loose mode. " + "To use proposal-class-properties in spec mode with decorators, wait for " + "the next major version of decorators in stage 2."); + } + function as(b, a) { + if (a != null && typeof Symbol !== "undefined" && a[Symbol.hasInstance]) { + return a[Symbol.hasInstance](b); + } else { + return b instanceof a; + } + } + function at(a) { + return a && a.__esModule ? a : { + default: a + }; + } + function au(a) { + if (a && a.__esModule) { + return a; + } else { + var c = {}; + if (a != null) { + for(var b in a){ + if (Object.prototype.hasOwnProperty.call(a, b)) { + var d = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(a, b) : {}; + if (d.get || d.set) { + Object.defineProperty(c, b, d); + } else { + c[b] = a[b]; + } + } + } + } + c.default = a; + return c; + } + } + function av(a) { + return (Function.toString.call(a).indexOf("[native code]") !== -1); + } + function aw(h, d) { + var a = []; + var b = true; + var e = false; + var f = undefined; + try { + for(var c = h[Symbol.iterator](), g; !(b = (g = c.next()).done); b = true){ + a.push(g.value); + if (d && a.length === d) break; + } + } catch (i) { + e = true; + f = i; + } finally{ + try { + if (!b && c["return"] != null) c["return"](); + } finally{ + if (e) throw f; + } + } + return a; + } + function ax(d, b) { + var a = []; + for(var e = d[Symbol.iterator](), c; !(c = e.next()).done;){ + a.push(c.value); + if (b && a.length === b) break; + } + return a; + } + var ay; + function az(e, a, g, i) { + if (!ay) { + ay = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7; + } + var c = e && e.defaultProps; + var b = arguments.length - 3; + if (!a && b !== 0) { + a = { + children: void 0 + }; + } + if (a && c) { + for(var f in c){ + if (a[f] === void 0) { + a[f] = c[f]; + } + } + } else if (!a) { + a = c || {}; + } + if (b === 1) { + a.children = i; + } else if (b > 1) { + var h = new Array(b); + for(var d = 0; d < b; d++){ + h[d] = arguments[d + 3]; + } + a.children = h; + } + return { + $$typeof: ay, + type: e, + key: g === undefined ? null : "" + g, + ref: null, + props: a, + _owner: null + }; + } + function aA(a, b) { + if (a !== b) { + throw new TypeError("Cannot instantiate an arrow function"); + } + } + function aB() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + function aC(d) { + for(var a = 1; a < arguments.length; a++){ + var c = arguments[a] != null ? arguments[a] : {}; + var b = Object.keys(c); + if (typeof Object.getOwnPropertySymbols === "function") { + b = b.concat(Object.getOwnPropertySymbols(c).filter(function(a) { + return Object.getOwnPropertyDescriptor(c, a).enumerable; + })); + } + b.forEach(function(a) { + ae(d, a, c[a]); + }); + } + return d; + } + function aD(c, f) { + if (c == null) return {}; + var d = {}; + var e = Object.keys(c); + var a, b; + for(b = 0; b < e.length; b++){ + a = e[b]; + if (f.indexOf(a) >= 0) continue; + d[a] = c[a]; + } + return d; + } + function aE(a, d) { + if (a == null) return {}; + var e = aD(a, d); + var b, c; + if (Object.getOwnPropertySymbols) { + var f = Object.getOwnPropertySymbols(a); + for(c = 0; c < f.length; c++){ + b = f[c]; + if (d.indexOf(b) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(a, b)) continue; + e[b] = a[b]; + } + } + return e; + } + function aF(b, a) { + if (a && (F(a) === "object" || typeof a === "function")) { + return a; + } + return h(b); + } + function aG(a) { + throw new Error('"' + a + '" is read-only'); + } + function aH(a, b, c, d) { + if (typeof Reflect !== "undefined" && Reflect.set) { + aH = Reflect.set; + } else { + aH = function g(f, b, d, c) { + var e = aj(f, b); + var a; + if (e) { + a = Object.getOwnPropertyDescriptor(e, b); + if (a.set) { + a.set.call(c, d); + return true; + } else if (!a.writable) { + return false; + } + } + a = Object.getOwnPropertyDescriptor(c, b); + if (a) { + if (!a.writable) { + return false; + } + a.value = d; + Object.defineProperty(c, b, a); + } else { + ae(c, b, d); + } + return true; + }; + } + return aH(a, b, c, d); + } + function aI(a, c, b, d, e) { + var f = aH(a, c, b, d || a); + if (!f && e) { + throw new Error("failed to set property"); + } + return b; + } + function aJ(a) { + return function() { + var b = a.apply(this, arguments); + b.next(); + return b; + }; + } + function aK(a, b) { + return (f(a) || C(a, b) || D()); + } + function aL(a, b) { + return (f(a) || ax(a, b) || D()); + } + function aM(b, a) { + if (!a) { + a = b.slice(0); + } + return Object.freeze(Object.defineProperties(b, { + raw: { + value: Object.freeze(a) + } + })); + } + function aN(a, b) { + if (!b) { + b = a.slice(0); + } + a.raw = b; + return a; + } + function aO(a) { + throw a; + } + function aP(a) { + return (g(a) || C(a) || aB()); + } + function aQ(b) { + return function() { + return new a(b.apply(this, arguments)); + }; + } + function aR(a) { + var b = typeof Map === "function" ? new Map() : undefined; + aR = function d(a) { + if (a === null || !av(a)) return a; + if (typeof a !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + if (typeof b !== "undefined") { + if (b.has(a)) return b.get(a); + b.set(a, c); + } + function c() { + return z(a, arguments, ai(this).constructor); + } + c.prototype = Object.create(a.prototype, { + constructor: { + value: c, + enumerable: false, + writable: true, + configurable: true + } + }); + return an(c, a); + }; + return aR(a); + } + function aS(a) { + return aR(a); + } + }, + 76332: function(n, b, a) { + "use strict"; + a.r(b); + a.d(b, { + isWeb: function() { + return f; + }, + isNode: function() { + return g; + }, + isWeex: function() { + return d; + }, + isKraken: function() { + return h; + }, + isMiniApp: function() { + return i; + }, + isByteDanceMicroApp: function() { + return e; + }, + isBaiduSmartProgram: function() { + return j; + }, + isKuaiShouMiniProgram: function() { + return k; + }, + isWeChatMiniProgram: function() { + return l; + }, + isQuickApp: function() { + return m; + } + }); + var c = a(97671); + var f = typeof window !== "undefined" && "onload" in window; + var g = typeof c !== "undefined" && !!(c.versions && c.versions.node); + var d = typeof WXEnvironment !== "undefined" && WXEnvironment.platform !== "Web"; + var h = typeof __kraken__ !== "undefined"; + var i = typeof my !== "undefined" && my !== null && typeof my.alert !== "undefined"; + var e = typeof tt !== "undefined" && tt !== null && typeof tt.showToast !== "undefined"; + var j = typeof swan !== "undefined" && swan !== null && typeof swan.showToast !== "undefined"; + var k = typeof ks !== "undefined" && ks !== null && typeof ks.showToast !== "undefined"; + var l = !e && typeof wx !== "undefined" && wx !== null && (typeof wx.request !== "undefined" || typeof wx.miniProgram !== "undefined"); + var m = typeof a.g !== "undefined" && a.g !== null && typeof a.g.callNative !== "undefined" && !d; + b["default"] = { + isWeb: f, + isNode: g, + isWeex: d, + isKraken: h, + isMiniApp: i, + isByteDanceMicroApp: e, + isBaiduSmartProgram: j, + isKuaiShouMiniProgram: k, + isWeChatMiniProgram: l, + isQuickApp: m + }; + }, + 73035: function(a, c, b) { + a.exports = b(11864); + }, + 15930: function(b, c, a) { + "use strict"; + var d = a(99677); + var e = a(45653); + var f = a(54230); + var g = a(25690); + var h = a(35274); + var i = a(52029); + var j = a(31527); + var k = a(75704); + b.exports = function a(b) { + return new Promise(function s(t, u) { + var c = b.data; + var l = b.headers; + var m = b.responseType; + if (d.isFormData(c)) { + delete l["Content-Type"]; + } + var a = new XMLHttpRequest(); + if (b.auth) { + var p = b.auth.username || ""; + var q = b.auth.password ? unescape(encodeURIComponent(b.auth.password)) : ""; + l.Authorization = "Basic " + btoa(p + ":" + q); + } + var n = h(b.baseURL, b.url); + a.open(b.method.toUpperCase(), g(n, b.params, b.paramsSerializer), true); + a.timeout = b.timeout; + function r() { + if (!a) { + return; + } + var c = "getAllResponseHeaders" in a ? i(a.getAllResponseHeaders()) : null; + var d = !m || m === "text" || m === "json" ? a.responseText : a.response; + var f = { + data: d, + status: a.status, + statusText: a.statusText, + headers: c, + config: b, + request: a + }; + e(t, u, f); + a = null; + } + if ("onloadend" in a) { + a.onloadend = r; + } else { + a.onreadystatechange = function b() { + if (!a || a.readyState !== 4) { + return; + } + if (a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0)) { + return; + } + setTimeout(r); + }; + } + a.onabort = function c() { + if (!a) { + return; + } + u(k("Request aborted", b, "ECONNABORTED", a)); + a = null; + }; + a.onerror = function c() { + u(k("Network Error", b, null, a)); + a = null; + }; + a.ontimeout = function d() { + var c = "timeout of " + b.timeout + "ms exceeded"; + if (b.timeoutErrorMessage) { + c = b.timeoutErrorMessage; + } + u(k(c, b, b.transitional && b.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", a)); + a = null; + }; + if (d.isStandardBrowserEnv()) { + var o = (b.withCredentials || j(n)) && b.xsrfCookieName ? f.read(b.xsrfCookieName) : undefined; + if (o) { + l[b.xsrfHeaderName] = o; + } + } + if ("setRequestHeader" in a) { + d.forEach(l, function e(d, b) { + if (typeof c === "undefined" && b.toLowerCase() === "content-type") { + delete l[b]; + } else { + a.setRequestHeader(b, d); + } + }); + } + if (!d.isUndefined(b.withCredentials)) { + a.withCredentials = !!b.withCredentials; + } + if (m && m !== "json") { + a.responseType = b.responseType; + } + if (typeof b.onDownloadProgress === "function") { + a.addEventListener("progress", b.onDownloadProgress); + } + if (typeof b.onUploadProgress === "function" && a.upload) { + a.upload.addEventListener("progress", b.onUploadProgress); + } + if (b.cancelToken) { + b.cancelToken.promise.then(function c(b) { + if (!a) { + return; + } + a.abort(); + u(b); + a = null; + }); + } + if (!c) { + c = null; + } + a.send(c); + }); + }; + }, + 11864: function(c, g, a) { + "use strict"; + var h = a(99677); + var i = a(81470); + var d = a(250); + var j = a(10882); + var e = a(52275); + function f(c) { + var a = new d(c); + var b = i(d.prototype.request, a); + h.extend(b, d.prototype, a); + h.extend(b, a); + return b; + } + var b = f(e); + b.Axios = d; + b.create = function c(a) { + return f(j(b.defaults, a)); + }; + b.Cancel = a(69651); + b.CancelToken = a(88149); + b.isCancel = a(37606); + b.all = function b(a) { + return Promise.all(a); + }; + b.spread = a(4161); + b.isAxiosError = a(29808); + c.exports = b; + c.exports.default = b; + }, + 69651: function(b) { + "use strict"; + function a(a) { + this.message = a; + } + a.prototype.toString = function a() { + return "Cancel" + (this.message ? ": " + this.message : ""); + }; + a.prototype.__CANCEL__ = true; + b.exports = a; + }, + 88149: function(b, d, c) { + "use strict"; + var e = c(69651); + function a(a) { + if (typeof a !== "function") { + throw new TypeError("executor must be a function."); + } + var b; + this.promise = new Promise(function c(a) { + b = a; + }); + var c = this; + a(function d(a) { + if (c.reason) { + return; + } + c.reason = new e(a); + b(c.reason); + }); + } + a.prototype.throwIfRequested = function a() { + if (this.reason) { + throw this.reason; + } + }; + a.source = function d() { + var b; + var c = new a(function c(a) { + b = a; + }); + return { + token: c, + cancel: b + }; + }; + b.exports = a; + }, + 37606: function(a) { + "use strict"; + a.exports = function b(a) { + return !!(a && a.__CANCEL__); + }; + }, + 250: function(d, f, a) { + "use strict"; + var c = a(99677); + var g = a(25690); + var h = a(29256); + var i = a(41388); + var j = a(10882); + var e = a(69847); + var k = e.validators; + function b(a) { + this.defaults = a; + this.interceptors = { + request: new h(), + response: new h() + }; + } + b.prototype.request = function q(a) { + if (typeof a === "string") { + a = arguments[1] || {}; + a.url = arguments[0]; + } else { + a = a || {}; + } + a = j(this.defaults, a); + if (a.method) { + a.method = a.method.toLowerCase(); + } else if (this.defaults.method) { + a.method = this.defaults.method.toLowerCase(); + } else { + a.method = "get"; + } + var h = a.transitional; + if (h !== undefined) { + e.assertOptions(h, { + silentJSONParsing: k.transitional(k.boolean, "1.0.0"), + forcedJSONParsing: k.transitional(k.boolean, "1.0.0"), + clarifyTimeoutError: k.transitional(k.boolean, "1.0.0") + }, false); + } + var d = []; + var l = true; + this.interceptors.request.forEach(function c(b) { + if (typeof b.runWhen === "function" && b.runWhen(a) === false) { + return; + } + l = l && b.synchronous; + d.unshift(b.fulfilled, b.rejected); + }); + var f = []; + this.interceptors.response.forEach(function b(a) { + f.push(a.fulfilled, a.rejected); + }); + var b; + if (!l) { + var c = [ + i, + undefined + ]; + Array.prototype.unshift.apply(c, d); + c = c.concat(f); + b = Promise.resolve(a); + while(c.length){ + b = b.then(c.shift(), c.shift()); + } + return b; + } + var g = a; + while(d.length){ + var m = d.shift(); + var n = d.shift(); + try { + g = m(g); + } catch (o) { + n(o); + break; + } + } + try { + b = i(g); + } catch (p) { + return Promise.reject(p); + } + while(f.length){ + b = b.then(f.shift(), f.shift()); + } + return b; + }; + b.prototype.getUri = function b(a) { + a = j(this.defaults, a); + return g(a.url, a.params, a.paramsSerializer).replace(/^\?/, ""); + }; + c.forEach([ + "delete", + "get", + "head", + "options" + ], function c(a) { + b.prototype[a] = function(c, b) { + return this.request(j(b || {}, { + method: a, + url: c, + data: (b || {}).data + })); + }; + }); + c.forEach([ + "post", + "put", + "patch" + ], function c(a) { + b.prototype[a] = function(b, c, d) { + return this.request(j(d || {}, { + method: a, + url: b, + data: c + })); + }; + }); + d.exports = b; + }, + 29256: function(b, d, c) { + "use strict"; + var e = c(99677); + function a() { + this.handlers = []; + } + a.prototype.use = function d(b, c, a) { + this.handlers.push({ + fulfilled: b, + rejected: c, + synchronous: a ? a.synchronous : false, + runWhen: a ? a.runWhen : null + }); + return this.handlers.length - 1; + }; + a.prototype.eject = function b(a) { + if (this.handlers[a]) { + this.handlers[a] = null; + } + }; + a.prototype.forEach = function a(b) { + e.forEach(this.handlers, function c(a) { + if (a !== null) { + b(a); + } + }); + }; + b.exports = a; + }, + 35274: function(b, c, a) { + "use strict"; + var d = a(11511); + var e = a(50739); + b.exports = function c(b, a) { + if (b && !d(a)) { + return e(b, a); + } + return a; + }; + }, + 75704: function(a, c, b) { + "use strict"; + var d = b(16488); + a.exports = function h(a, b, c, e, f) { + var g = new Error(a); + return d(g, b, c, e, f); + }; + }, + 41388: function(b, c, a) { + "use strict"; + var d = a(99677); + var e = a(18210); + var f = a(37606); + var g = a(52275); + function h(a) { + if (a.cancelToken) { + a.cancelToken.throwIfRequested(); + } + } + b.exports = function c(a) { + h(a); + a.headers = a.headers || {}; + a.data = e.call(a, a.data, a.headers, a.transformRequest); + a.headers = d.merge(a.headers.common || {}, a.headers[a.method] || {}, a.headers); + d.forEach([ + "delete", + "get", + "head", + "post", + "put", + "patch", + "common" + ], function c(b) { + delete a.headers[b]; + }); + var b = a.adapter || g.adapter; + return b(a).then(function c(b) { + h(a); + b.data = e.call(a, b.data, b.headers, a.transformResponse); + return b; + }, function c(b) { + if (!f(b)) { + h(a); + if (b && b.response) { + b.response.data = e.call(a, b.response.data, b.response.headers, a.transformResponse); + } + } + return Promise.reject(b); + }); + }; + }, + 16488: function(a) { + "use strict"; + a.exports = function f(a, c, b, d, e) { + a.config = c; + if (b) { + a.code = b; + } + a.request = d; + a.response = e; + a.isAxiosError = true; + a.toJSON = function a() { + return { + message: this.message, + name: this.name, + description: this.description, + number: this.number, + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + config: this.config, + code: this.code + }; + }; + return a; + }; + }, + 10882: function(a, c, b) { + "use strict"; + var d = b(99677); + a.exports = function k(h, a) { + a = a || {}; + var i = {}; + var b = [ + "url", + "method", + "data" + ]; + var c = [ + "headers", + "auth", + "proxy", + "params", + ]; + var e = [ + "baseURL", + "transformRequest", + "transformResponse", + "paramsSerializer", + "timeout", + "timeoutMessage", + "withCredentials", + "adapter", + "responseType", + "xsrfCookieName", + "xsrfHeaderName", + "onUploadProgress", + "onDownloadProgress", + "decompress", + "maxContentLength", + "maxBodyLength", + "maxRedirects", + "transport", + "httpAgent", + "httpsAgent", + "cancelToken", + "socketPath", + "responseEncoding", + ]; + var f = [ + "validateStatus" + ]; + function l(b, a) { + if (d.isPlainObject(b) && d.isPlainObject(a)) { + return d.merge(b, a); + } else if (d.isPlainObject(a)) { + return d.merge({}, a); + } else if (d.isArray(a)) { + return a.slice(); + } + return a; + } + function g(b) { + if (!d.isUndefined(a[b])) { + i[b] = l(h[b], a[b]); + } else if (!d.isUndefined(h[b])) { + i[b] = l(undefined, h[b]); + } + } + d.forEach(b, function c(b) { + if (!d.isUndefined(a[b])) { + i[b] = l(undefined, a[b]); + } + }); + d.forEach(c, g); + d.forEach(e, function c(b) { + if (!d.isUndefined(a[b])) { + i[b] = l(undefined, a[b]); + } else if (!d.isUndefined(h[b])) { + i[b] = l(undefined, h[b]); + } + }); + d.forEach(f, function c(b) { + if (b in a) { + i[b] = l(h[b], a[b]); + } else if (b in h) { + i[b] = l(undefined, h[b]); + } + }); + var m = b.concat(c).concat(e).concat(f); + var j = Object.keys(h).concat(Object.keys(a)).filter(function b(a) { + return m.indexOf(a) === -1; + }); + d.forEach(j, g); + return i; + }; + }, + 45653: function(a, c, b) { + "use strict"; + var d = b(75704); + a.exports = function f(c, e, a) { + var b = a.config.validateStatus; + if (!a.status || !b || b(a.status)) { + c(a); + } else { + e(d("Request failed with status code " + a.status, a.config, null, a.request, a)); + } + }; + }, + 18210: function(b, c, a) { + "use strict"; + var d = a(99677); + var e = a(52275); + b.exports = function c(a, f, b) { + var g = this || e; + d.forEach(b, function c(b) { + a = b.call(g, a, f); + }); + return a; + }; + }, + 52275: function(d, f, a) { + "use strict"; + var g = a(97671); + var b = a(99677); + var h = a(43907); + var i = a(16488); + var j = { + "Content-Type": "application/x-www-form-urlencoded" + }; + function k(a, c) { + if (!b.isUndefined(a) && b.isUndefined(a["Content-Type"])) { + a["Content-Type"] = c; + } + } + function e() { + var b; + if (typeof XMLHttpRequest !== "undefined") { + b = a(15930); + } else if (typeof g !== "undefined" && Object.prototype.toString.call(g) === "[object process]") { + b = a(15930); + } + return b; + } + function l(a, d, e) { + if (b.isString(a)) { + try { + (d || JSON.parse)(a); + return b.trim(a); + } catch (c) { + if (c.name !== "SyntaxError") { + throw c; + } + } + } + return (e || JSON.stringify)(a); + } + var c = { + transitional: { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false + }, + adapter: e(), + transformRequest: [ + function d(a, c) { + h(c, "Accept"); + h(c, "Content-Type"); + if (b.isFormData(a) || b.isArrayBuffer(a) || b.isBuffer(a) || b.isStream(a) || b.isFile(a) || b.isBlob(a)) { + return a; + } + if (b.isArrayBufferView(a)) { + return a.buffer; + } + if (b.isURLSearchParams(a)) { + k(c, "application/x-www-form-urlencoded;charset=utf-8"); + return a.toString(); + } + if (b.isObject(a) || (c && c["Content-Type"] === "application/json")) { + k(c, "application/json"); + return l(a); + } + return a; + }, + ], + transformResponse: [ + function h(a) { + var c = this.transitional; + var f = c && c.silentJSONParsing; + var g = c && c.forcedJSONParsing; + var e = !f && this.responseType === "json"; + if (e || (g && b.isString(a) && a.length)) { + try { + return JSON.parse(a); + } catch (d) { + if (e) { + if (d.name === "SyntaxError") { + throw i(d, this, "E_JSON_PARSE"); + } + throw d; + } + } + } + return a; + }, + ], + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + validateStatus: function b(a) { + return a >= 200 && a < 300; + } + }; + c.headers = { + common: { + Accept: "application/json, text/plain, */*" + } + }; + b.forEach([ + "delete", + "get", + "head" + ], function b(a) { + c.headers[a] = {}; + }); + b.forEach([ + "post", + "put", + "patch" + ], function d(a) { + c.headers[a] = b.merge(j); + }); + d.exports = c; + }, + 81470: function(a) { + "use strict"; + a.exports = function a(b, c) { + return function e() { + var d = new Array(arguments.length); + for(var a = 0; a < d.length; a++){ + d[a] = arguments[a]; + } + return b.apply(c, d); + }; + }; + }, + 25690: function(a, c, b) { + "use strict"; + var d = b(99677); + function e(a) { + return encodeURIComponent(a).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); + } + a.exports = function i(a, b, f) { + if (!b) { + return a; + } + var c; + if (f) { + c = f(b); + } else if (d.isURLSearchParams(b)) { + c = b.toString(); + } else { + var h = []; + d.forEach(b, function c(a, b) { + if (a === null || typeof a === "undefined") { + return; + } + if (d.isArray(a)) { + b = b + "[]"; + } else { + a = [ + a + ]; + } + d.forEach(a, function c(a) { + if (d.isDate(a)) { + a = a.toISOString(); + } else if (d.isObject(a)) { + a = JSON.stringify(a); + } + h.push(e(b) + "=" + e(a)); + }); + }); + c = h.join("&"); + } + if (c) { + var g = a.indexOf("#"); + if (g !== -1) { + a = a.slice(0, g); + } + a += (a.indexOf("?") === -1 ? "?" : "&") + c; + } + return a; + }; + }, + 50739: function(a) { + "use strict"; + a.exports = function c(a, b) { + return b ? a.replace(/\/+$/, "") + "/" + b.replace(/^\/+/, "") : a; + }; + }, + 54230: function(a, d, b) { + "use strict"; + var c = b(99677); + a.exports = c.isStandardBrowserEnv() ? (function a() { + return { + write: function i(f, g, b, d, e, h) { + var a = []; + a.push(f + "=" + encodeURIComponent(g)); + if (c.isNumber(b)) { + a.push("expires=" + new Date(b).toGMTString()); + } + if (c.isString(d)) { + a.push("path=" + d); + } + if (c.isString(e)) { + a.push("domain=" + e); + } + if (h === true) { + a.push("secure"); + } + document.cookie = a.join("; "); + }, + read: function c(b) { + var a = document.cookie.match(new RegExp("(^|;\\s*)(" + b + ")=([^;]*)")); + return a ? decodeURIComponent(a[3]) : null; + }, + remove: function b(a) { + this.write(a, "", Date.now() - 86400000); + } + }; + })() : (function a() { + return { + write: function a() {}, + read: function a() { + return null; + }, + remove: function a() {} + }; + })(); + }, + 11511: function(a) { + "use strict"; + a.exports = function b(a) { + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(a); + }; + }, + 29808: function(a) { + "use strict"; + a.exports = function b(a) { + return (typeof a === "object" && a.isAxiosError === true); + }; + }, + 31527: function(a, d, b) { + "use strict"; + var c = b(99677); + a.exports = c.isStandardBrowserEnv() ? (function d() { + var e = /(msie|trident)/i.test(navigator.userAgent); + var f = document.createElement("a"); + var a; + function b(b) { + var a = b; + if (e) { + f.setAttribute("href", a); + a = f.href; + } + f.setAttribute("href", a); + return { + href: f.href, + protocol: f.protocol ? f.protocol.replace(/:$/, "") : "", + host: f.host, + search: f.search ? f.search.replace(/^\?/, "") : "", + hash: f.hash ? f.hash.replace(/^#/, "") : "", + hostname: f.hostname, + port: f.port, + pathname: f.pathname.charAt(0) === "/" ? f.pathname : "/" + f.pathname + }; + } + a = b(window.location.href); + return function f(d) { + var e = c.isString(d) ? b(d) : d; + return (e.protocol === a.protocol && e.host === a.host); + }; + })() : (function a() { + return function a() { + return true; + }; + })(); + }, + 43907: function(a, c, b) { + "use strict"; + var d = b(99677); + a.exports = function b(a, c) { + d.forEach(a, function e(d, b) { + if (b !== c && b.toUpperCase() === c.toUpperCase()) { + a[c] = d; + delete a[b]; + } + }); + }; + }, + 52029: function(a, c, b) { + "use strict"; + var d = b(99677); + var e = [ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent", + ]; + a.exports = function c(a) { + var b = {}; + var f; + var g; + var h; + if (!a) { + return b; + } + d.forEach(a.split("\n"), function c(a) { + h = a.indexOf(":"); + f = d.trim(a.substr(0, h)).toLowerCase(); + g = d.trim(a.substr(h + 1)); + if (f) { + if (b[f] && e.indexOf(f) >= 0) { + return; + } + if (f === "set-cookie") { + b[f] = (b[f] ? b[f] : []).concat([ + g + ]); + } else { + b[f] = b[f] ? b[f] + ", " + g : g; + } + } + }); + return b; + }; + }, + 4161: function(a) { + "use strict"; + a.exports = function a(b) { + return function c(a) { + return b.apply(null, a); + }; + }; + }, + 69847: function(b, g, c) { + "use strict"; + var d = c(84228); + var a = {}; + [ + "object", + "boolean", + "number", + "function", + "string", + "symbol", + ].forEach(function(b, c) { + a[b] = function d(a) { + return (typeof a === b || "a" + (c < 1 ? "n " : " ") + b); + }; + }); + var h = {}; + var i = d.version.split("."); + function e(e, b) { + var c = b ? b.split(".") : i; + var d = e.split("."); + for(var a = 0; a < 3; a++){ + if (c[a] > d[a]) { + return true; + } else if (c[a] < d[a]) { + return false; + } + } + return false; + } + a.transitional = function b(c, a, f) { + var g = a && e(a); + function i(a, b) { + return ("[Axios v" + d.version + "] Transitional option '" + a + "'" + b + (f ? ". " + f : "")); + } + return function(d, b, e) { + if (c === false) { + throw new Error(i(b, " has been removed in " + a)); + } + if (g && !h[b]) { + h[b] = true; + console.warn(i(b, " has been deprecated since v" + a + " and will be removed in the near future")); + } + return c ? c(d, b, e) : true; + }; + }; + function f(b, h, i) { + if (typeof b !== "object") { + throw new TypeError("options must be an object"); + } + var c = Object.keys(b); + var d = c.length; + while(d-- > 0){ + var a = c[d]; + var e = h[a]; + if (e) { + var f = b[a]; + var g = f === undefined || e(f, a, b); + if (g !== true) { + throw new TypeError("option " + a + " must be " + g); + } + continue; + } + if (i !== true) { + throw Error("Unknown option " + a); + } + } + } + b.exports = { + isOlderVersion: e, + assertOptions: f, + validators: a + }; + }, + 99677: function(a, y, b) { + "use strict"; + var z = b(81470); + var A = Object.prototype.toString; + function c(a) { + return A.call(a) === "[object Array]"; + } + function d(a) { + return typeof a === "undefined"; + } + function e(a) { + return (a !== null && !d(a) && a.constructor !== null && !d(a.constructor) && typeof a.constructor.isBuffer === "function" && a.constructor.isBuffer(a)); + } + function f(a) { + return A.call(a) === "[object ArrayBuffer]"; + } + function g(a) { + return (typeof FormData !== "undefined" && a instanceof FormData); + } + function h(a) { + var b; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + b = ArrayBuffer.isView(a); + } else { + b = a && a.buffer && a.buffer instanceof ArrayBuffer; + } + return b; + } + function i(a) { + return typeof a === "string"; + } + function j(a) { + return typeof a === "number"; + } + function k(a) { + return a !== null && typeof a === "object"; + } + function l(a) { + if (A.call(a) !== "[object Object]") { + return false; + } + var b = Object.getPrototypeOf(a); + return b === null || b === Object.prototype; + } + function m(a) { + return A.call(a) === "[object Date]"; + } + function n(a) { + return A.call(a) === "[object File]"; + } + function o(a) { + return A.call(a) === "[object Blob]"; + } + function p(a) { + return A.call(a) === "[object Function]"; + } + function q(a) { + return k(a) && p(a.pipe); + } + function r(a) { + return (typeof URLSearchParams !== "undefined" && a instanceof URLSearchParams); + } + function s(a) { + return a.trim ? a.trim() : a.replace(/^\s+|\s+$/g, ""); + } + function t() { + if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) { + return false; + } + return (typeof window !== "undefined" && typeof document !== "undefined"); + } + function u(a, e) { + if (a === null || typeof a === "undefined") { + return; + } + if (typeof a !== "object") { + a = [ + a + ]; + } + if (c(a)) { + for(var b = 0, f = a.length; b < f; b++){ + e.call(null, a[b], b, a); + } + } else { + for(var d in a){ + if (Object.prototype.hasOwnProperty.call(a, d)) { + e.call(null, a[d], d, a); + } + } + } + } + function v() { + var b = {}; + function d(a, d) { + if (l(b[d]) && l(a)) { + b[d] = v(b[d], a); + } else if (l(a)) { + b[d] = v({}, a); + } else if (c(a)) { + b[d] = a.slice(); + } else { + b[d] = a; + } + } + for(var a = 0, e = arguments.length; a < e; a++){ + u(arguments[a], d); + } + return b; + } + function w(a, b, c) { + u(b, function e(b, d) { + if (c && typeof b === "function") { + a[d] = z(b, c); + } else { + a[d] = b; + } + }); + return a; + } + function x(a) { + if (a.charCodeAt(0) === 0xfeff) { + a = a.slice(1); + } + return a; + } + a.exports = { + isArray: c, + isArrayBuffer: f, + isBuffer: e, + isFormData: g, + isArrayBufferView: h, + isString: i, + isNumber: j, + isObject: k, + isPlainObject: l, + isUndefined: d, + isDate: m, + isFile: n, + isBlob: o, + isFunction: p, + isStream: q, + isURLSearchParams: r, + isStandardBrowserEnv: t, + forEach: u, + merge: v, + extend: w, + trim: s, + stripBOM: x + }; + }, + 84228: function(a) { + "use strict"; + a.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"__npminstall_done":true,"_from":"axios@0.21.4","_resolved":"https://registry.npm.alibaba-inc.com/axios/download/axios-0.21.4.tgz"}'); + }, + 74618: function(b, c, a) { + var d = a(67106); + var e = a(36725); + b.exports = function(a) { + if (d(a)) return a; + throw TypeError(e(a) + " is not a function"); + }; + }, + 36381: function(b, c, a) { + var d = a(17026); + var e = a(36725); + b.exports = function(a) { + if (d(a)) return a; + throw TypeError(e(a) + " is not a constructor"); + }; + }, + 47111: function(a, c, b) { + var d = b(67106); + a.exports = function(a) { + if (typeof a === "object" || d(a)) return a; + throw TypeError("Can't set " + String(a) + " as a prototype"); + }; + }, + 23140: function(d, h, a) { + var e = a(81019); + var f = a(18255); + var g = a(94770); + var b = e("unscopables"); + var c = Array.prototype; + if (c[b] == undefined) { + g.f(c, b, { + configurable: true, + value: f(null) + }); + } + d.exports = function(a) { + c[b][a] = true; + }; + }, + 88770: function(a, c, b) { + "use strict"; + var d = b(88668).charAt; + a.exports = function(b, a, c) { + return a + (c ? d(b, a).length : 1); + }; + }, + 51819: function(a) { + a.exports = function(a, c, b) { + if (a instanceof c) return a; + throw TypeError("Incorrect " + (b ? b + " " : "") + "invocation"); + }; + }, + 83941: function(a, c, b) { + var d = b(39817); + a.exports = function(a) { + if (d(a)) return a; + throw TypeError(String(a) + " is not an object"); + }; + }, + 88692: function(a) { + a.exports = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined"; + }, + 4351: function(w, L, a) { + "use strict"; + var x = a(88692); + var y = a(87122); + var c = a(19514); + var z = a(67106); + var M = a(39817); + var A = a(1521); + var B = a(85983); + var N = a(36725); + var l = a(48181); + var O = a(78109); + var C = a(94770).f; + var m = a(39311); + var i = a(59057); + var D = a(81019); + var o = a(67045); + var j = c.Int8Array; + var p = j && j.prototype; + var q = c.Uint8ClampedArray; + var r = q && q.prototype; + var g = j && m(j); + var d = p && m(p); + var s = Object.prototype; + var P = s.isPrototypeOf; + var t = D("toStringTag"); + var u = o("TYPED_ARRAY_TAG"); + var n = o("TYPED_ARRAY_CONSTRUCTOR"); + var f = x && !!i && B(c.opera) !== "Opera"; + var v = false; + var b, e, h; + var k = { + Int8Array: 1, + Uint8Array: 1, + Uint8ClampedArray: 1, + Int16Array: 2, + Uint16Array: 2, + Int32Array: 4, + Uint32Array: 4, + Float32Array: 4, + Float64Array: 8 + }; + var E = { + BigInt64Array: 8, + BigUint64Array: 8 + }; + var F = function c(b) { + if (!M(b)) return false; + var a = B(b); + return (a === "DataView" || A(k, a) || A(E, a)); + }; + var G = function(a) { + if (!M(a)) return false; + var b = B(a); + return (A(k, b) || A(E, b)); + }; + var H = function(a) { + if (G(a)) return a; + throw TypeError("Target is not a typed array"); + }; + var I = function(a) { + if (z(a) && (!i || P.call(g, a))) return a; + throw TypeError(N(a) + " is not a typed array constructor"); + }; + var J = function(a, g, b) { + if (!y) return; + if (b) for(var h in k){ + var e = c[h]; + if (e && A(e.prototype, a)) try { + delete e.prototype[a]; + } catch (i) {} + } + if (!d[a] || b) { + O(d, a, b ? g : (f && p[a]) || g); + } + }; + var K = function(b, h, d) { + var e, a; + if (!y) return; + if (i) { + if (d) for(e in k){ + a = c[e]; + if (a && A(a, b)) try { + delete a[b]; + } catch (j) {} + } + if (!g[b] || d) { + try { + return O(g, b, d ? h : (f && g[b]) || h); + } catch (l) {} + } else return; + } + for(e in k){ + a = c[e]; + if (a && (!a[b] || d)) { + O(a, b, h); + } + } + }; + for(b in k){ + e = c[b]; + h = e && e.prototype; + if (h) l(h, n, e); + else f = false; + } + for(b in E){ + e = c[b]; + h = e && e.prototype; + if (h) l(h, n, e); + } + if (!f || !z(g) || g === Function.prototype) { + g = function a() { + throw TypeError("Incorrect invocation"); + }; + if (f) for(b in k){ + if (c[b]) i(c[b], g); + } + } + if (!f || !d || d === s) { + d = g.prototype; + if (f) for(b in k){ + if (c[b]) i(c[b].prototype, d); + } + } + if (f && m(r) !== d) { + i(r, d); + } + if (y && !A(d, t)) { + v = true; + C(d, t, { + get: function() { + return M(this) ? this[u] : undefined; + } + }); + for(b in k)if (c[b]) { + l(c[b], u, b); + } + } + w.exports = { + NATIVE_ARRAY_BUFFER_VIEWS: f, + TYPED_ARRAY_CONSTRUCTOR: n, + TYPED_ARRAY_TAG: v && u, + aTypedArray: H, + aTypedArrayConstructor: I, + exportTypedArrayMethod: J, + exportTypedArrayStaticMethod: K, + isView: F, + isTypedArray: G, + TypedArray: g, + TypedArrayPrototype: d + }; + }, + 44757: function(x, G, a) { + "use strict"; + var j = a(19514); + var y = a(87122); + var z = a(88692); + var m = a(25160); + var n = a(48181); + var o = a(59855); + var k = a(60232); + var H = a(51819); + var I = a(86361); + var J = a(31998); + var K = a(42026); + var p = a(43571); + var A = a(39311); + var q = a(59057); + var B = a(13463).f; + var L = a(94770).f; + var M = a(50270); + var r = a(77875); + var s = a(44670); + var C = m.PROPER; + var D = m.CONFIGURABLE; + var N = s.get; + var O = s.set; + var e = "ArrayBuffer"; + var t = "DataView"; + var f = "prototype"; + var P = "Wrong length"; + var Q = "Wrong index"; + var d = j[e]; + var b = d; + var c = j[t]; + var g = c && c[f]; + var u = Object.prototype; + var R = j.RangeError; + var S = p.pack; + var T = p.unpack; + var U = function(a) { + return [ + a & 0xff + ]; + }; + var V = function(a) { + return [ + a & 0xff, + (a >> 8) & 0xff + ]; + }; + var W = function(a) { + return [ + a & 0xff, + (a >> 8) & 0xff, + (a >> 16) & 0xff, + (a >> 24) & 0xff, + ]; + }; + var X = function(a) { + return ((a[3] << 24) | (a[2] << 16) | (a[1] << 8) | a[0]); + }; + var Y = function(a) { + return S(a, 23, 4); + }; + var Z = function(a) { + return S(a, 52, 8); + }; + var h = function(a, b) { + L(a[f], b, { + get: function() { + return N(this)[b]; + } + }); + }; + var $ = function(f, b, g, h) { + var c = K(g); + var a = N(f); + if (c + b > a.byteLength) throw R(Q); + var i = N(a.buffer).bytes; + var d = c + a.byteOffset; + var e = i.slice(d, d + b); + return h ? e : e.reverse(); + }; + var _ = function(e, b, f, g, h, i) { + var d = K(f); + var c = N(e); + if (d + b > c.byteLength) throw R(Q); + var j = N(c.buffer).bytes; + var k = d + c.byteOffset; + var l = g(+h); + for(var a = 0; a < b; a++)j[k + a] = l[i ? a : b - a - 1]; + }; + if (!z) { + b = function d(c) { + H(this, b, e); + var a = K(c); + O(this, { + bytes: M.call(new Array(a), 0), + byteLength: a + }); + if (!y) this.byteLength = a; + }; + c = function h(e, g, a) { + H(this, c, t); + H(e, b, t); + var f = N(e).byteLength; + var d = I(g); + if (d < 0 || d > f) throw R("Wrong offset"); + a = a === undefined ? f - d : J(a); + if (d + a > f) throw R(P); + O(this, { + buffer: e, + byteLength: a, + byteOffset: d + }); + if (!y) { + this.buffer = e; + this.byteLength = a; + this.byteOffset = d; + } + }; + if (y) { + h(b, "byteLength"); + h(c, "buffer"); + h(c, "byteLength"); + h(c, "byteOffset"); + } + o(c[f], { + getInt8: function b(a) { + return ($(this, 1, a)[0] << 24) >> 24; + }, + getUint8: function b(a) { + return $(this, 1, a)[0]; + }, + getInt16: function c(b) { + var a = $(this, 2, b, arguments.length > 1 ? arguments[1] : undefined); + return (((a[1] << 8) | a[0]) << 16) >> 16; + }, + getUint16: function c(b) { + var a = $(this, 2, b, arguments.length > 1 ? arguments[1] : undefined); + return (a[1] << 8) | a[0]; + }, + getInt32: function b(a) { + return X($(this, 4, a, arguments.length > 1 ? arguments[1] : undefined)); + }, + getUint32: function b(a) { + return (X($(this, 4, a, arguments.length > 1 ? arguments[1] : undefined)) >>> 0); + }, + getFloat32: function b(a) { + return T($(this, 4, a, arguments.length > 1 ? arguments[1] : undefined), 23); + }, + getFloat64: function b(a) { + return T($(this, 8, a, arguments.length > 1 ? arguments[1] : undefined), 52); + }, + setInt8: function c(a, b) { + _(this, 1, a, U, b); + }, + setUint8: function c(a, b) { + _(this, 1, a, U, b); + }, + setInt16: function c(a, b) { + _(this, 2, a, V, b, arguments.length > 2 ? arguments[2] : undefined); + }, + setUint16: function c(a, b) { + _(this, 2, a, V, b, arguments.length > 2 ? arguments[2] : undefined); + }, + setInt32: function c(a, b) { + _(this, 4, a, W, b, arguments.length > 2 ? arguments[2] : undefined); + }, + setUint32: function c(a, b) { + _(this, 4, a, W, b, arguments.length > 2 ? arguments[2] : undefined); + }, + setFloat32: function c(a, b) { + _(this, 4, a, Y, b, arguments.length > 2 ? arguments[2] : undefined); + }, + setFloat64: function c(a, b) { + _(this, 8, a, Z, b, arguments.length > 2 ? arguments[2] : undefined); + } + }); + } else { + var E = C && d.name !== e; + if (!k(function() { + d(1); + }) || !k(function() { + new d(-1); + }) || k(function() { + new d(); + new d(1.5); + new d(NaN); + return (E && !D); + })) { + b = function c(a) { + H(this, b); + return new d(K(a)); + }; + var F = (b[f] = d[f]); + for(var v = B(d), w = 0, l; v.length > w;){ + if (!((l = v[w++]) in b)) { + n(b, l, d[l]); + } + } + F.constructor = b; + } else if (E && D) { + n(d, "name", e); + } + if (q && A(g) !== u) { + q(g, u); + } + var i = new c(new b(2)); + var aa = g.setInt8; + i.setInt8(0, 2147483648); + i.setInt8(1, 2147483649); + if (i.getInt8(0) || !i.getInt8(1)) o(g, { + setInt8: function c(a, b) { + aa.call(this, a, (b << 24) >> 24); + }, + setUint8: function c(a, b) { + aa.call(this, a, (b << 24) >> 24); + } + }, { + unsafe: true + }); + } + r(b, e); + r(c, t); + x.exports = { + ArrayBuffer: b, + DataView: c + }; + }, + 8077: function(b, c, a) { + "use strict"; + var d = a(89343); + var e = a(62965); + var f = a(31998); + var g = Math.min; + b.exports = [].copyWithin || function n(l, m) { + var c = d(this); + var h = f(c.length); + var a = e(l, h); + var b = e(m, h); + var k = arguments.length > 2 ? arguments[2] : undefined; + var i = g((k === undefined ? h : e(k, h)) - b, h - a); + var j = 1; + if (b < a && a < b + i) { + j = -1; + b += i - 1; + a += i - 1; + } + while(i-- > 0){ + if (b in c) c[a] = c[b]; + else delete c[a]; + a += j; + b += j; + } + return c; + }; + }, + 50270: function(b, c, a) { + "use strict"; + var d = a(89343); + var e = a(62965); + var f = a(31998); + b.exports = function k(i) { + var a = d(this); + var b = f(a.length); + var c = arguments.length; + var g = e(c > 1 ? arguments[1] : undefined, b); + var h = c > 2 ? arguments[2] : undefined; + var j = h === undefined ? b : e(h, b); + while(j > g)a[g++] = i; + return a; + }; + }, + 85811: function(b, e, a) { + "use strict"; + var f = a(48499).forEach; + var c = a(12707); + var d = c("forEach"); + b.exports = !d ? function b(a) { + return f(this, a, arguments.length > 1 ? arguments[1] : undefined); + } : [].forEach; + }, + 21016: function(a) { + a.exports = function(e, b) { + var a = 0; + var c = b.length; + var d = new e(c); + while(c > a)d[a] = b[a++]; + return d; + }; + }, + 83581: function(b, c, a) { + "use strict"; + var d = a(59561); + var e = a(89343); + var f = a(85699); + var g = a(58011); + var h = a(17026); + var i = a(31998); + var j = a(47267); + var k = a(11661); + var l = a(99422); + b.exports = function x(w) { + var c = e(w); + var t = h(this); + var u = arguments.length; + var m = u > 1 ? arguments[1] : undefined; + var q = m !== undefined; + if (q) m = d(m, u > 2 ? arguments[2] : undefined, 2); + var r = l(c); + var a = 0; + var n, b, s, o, v, p; + if (r && !(this == Array && g(r))) { + o = k(c, r); + v = o.next; + b = t ? new this() : []; + for(; !(s = v.call(o)).done; a++){ + p = q ? f(o, m, [ + s.value, + a + ], true) : s.value; + j(b, a, p); + } + } else { + n = i(c.length); + b = t ? new this(n) : Array(n); + for(; n > a; a++){ + p = q ? m(c[a], a) : c[a]; + j(b, a, p); + } + } + b.length = a; + return b; + }; + }, + 44517: function(c, d, a) { + var e = a(74981); + var f = a(31998); + var g = a(62965); + var b = function(a) { + return function(j, d, k) { + var c = e(j); + var h = f(c.length); + var b = g(k, h); + var i; + if (a && d != d) while(h > b){ + i = c[b++]; + if (i != i) return true; + } + else for(; h > b; b++){ + if ((a || b in c) && c[b] === d) return a || b || 0; + } + return !a && -1; + }; + }; + c.exports = { + includes: b(true), + indexOf: b(false) + }; + }, + 48499: function(c, d, b) { + var e = b(59561); + var f = b(51478); + var g = b(89343); + var h = b(31998); + var i = b(96582); + var j = [].push; + var a = function(a) { + var c = a == 1; + var d = a == 2; + var k = a == 3; + var l = a == 4; + var b = a == 6; + var m = a == 7; + var n = a == 5 || b; + return function(r, x, y, z) { + var u = g(r); + var s = f(u); + var A = e(x, y, 3); + var v = h(s.length); + var o = 0; + var w = z || i; + var q = c ? w(r, v) : d || m ? w(r, 0) : undefined; + var p, t; + for(; v > o; o++)if (n || o in s) { + p = s[o]; + t = A(p, o, u); + if (a) { + if (c) q[o] = t; + else if (t) switch(a){ + case 3: + return true; + case 5: + return p; + case 6: + return o; + case 2: + j.call(q, p); + } + else switch(a){ + case 4: + return false; + case 7: + j.call(q, p); + } + } + } + return b ? -1 : k || l ? l : q; + }; + }; + c.exports = { + forEach: a(0), + map: a(1), + filter: a(2), + some: a(3), + every: a(4), + find: a(5), + findIndex: a(6), + filterReject: a(7) + }; + }, + 74514: function(c, h, a) { + "use strict"; + var i = a(74981); + var j = a(86361); + var k = a(31998); + var d = a(12707); + var l = Math.min; + var b = [].lastIndexOf; + var e = !!b && 1 / [ + 1 + ].lastIndexOf(1, -0) < 0; + var f = d("lastIndexOf"); + var g = e || !f; + c.exports = g ? function g(f) { + if (e) return b.apply(this, arguments) || 0; + var c = i(this); + var d = k(c.length); + var a = d - 1; + if (arguments.length > 1) a = l(a, j(arguments[1])); + if (a < 0) a = d + a; + for(; a >= 0; a--)if (a in c && c[a] === f) return a || 0; + return -1; + } : b; + }, + 28855: function(b, d, a) { + var e = a(60232); + var c = a(81019); + var f = a(50661); + var g = c("species"); + b.exports = function(a) { + return (f >= 51 || !e(function() { + var b = []; + var c = (b.constructor = {}); + c[g] = function() { + return { + foo: 1 + }; + }; + return b[a](Boolean).foo !== 1; + })); + }; + }, + 12707: function(a, c, b) { + "use strict"; + var d = b(60232); + a.exports = function(a, c) { + var b = [][a]; + return (!!b && d(function() { + b.call(null, c || function() { + throw 1; + }, 1); + })); + }; + }, + 70591: function(c, d, a) { + var e = a(74618); + var f = a(89343); + var g = a(51478); + var h = a(31998); + var b = function(a) { + return function(m, l, n, c) { + e(l); + var i = f(m); + var d = g(i); + var j = h(i.length); + var b = a ? j - 1 : 0; + var k = a ? -1 : 1; + if (n < 2) while(true){ + if (b in d) { + c = d[b]; + b += k; + break; + } + b += k; + if (a ? b < 0 : j <= b) { + throw TypeError("Reduce of empty array with no initial value"); + } + } + for(; a ? b >= 0 : j > b; b += k)if (b in d) { + c = l(c, d[b], b, i); + } + return c; + }; + }; + c.exports = { + left: b(false), + right: b(true) + }; + }, + 1978: function(a) { + var c = Math.floor; + var b = function(a, f) { + var g = a.length; + var h = c(g / 2); + return g < 8 ? d(a, f) : e(b(a.slice(0, h), f), b(a.slice(h), f), f); + }; + var d = function(a, e) { + var f = a.length; + var c = 1; + var d, b; + while(c < f){ + b = c; + d = a[c]; + while(b && e(a[b - 1], d) > 0){ + a[b] = a[--b]; + } + if (b !== c++) a[b] = d; + } + return a; + }; + var e = function(c, d, h) { + var e = c.length; + var g = d.length; + var a = 0; + var b = 0; + var f = []; + while(a < e || b < g){ + if (a < e && b < g) { + f.push(h(c[a], d[b]) <= 0 ? c[a++] : d[b++]); + } else { + f.push(a < e ? c[a++] : d[b++]); + } + } + return f; + }; + a.exports = b; + }, + 51590: function(b, d, a) { + var e = a(63079); + var f = a(17026); + var g = a(39817); + var c = a(81019); + var h = c("species"); + b.exports = function(b) { + var a; + if (e(b)) { + a = b.constructor; + if (f(a) && (a === Array || e(a.prototype))) a = undefined; + else if (g(a)) { + a = a[h]; + if (a === null) a = undefined; + } + } + return a === undefined ? Array : a; + }; + }, + 96582: function(a, c, b) { + var d = b(51590); + a.exports = function(b, a) { + return new (d(b))(a === 0 ? 0 : a); + }; + }, + 85699: function(b, c, a) { + var d = a(83941); + var e = a(65570); + b.exports = function(c, b, a, f) { + try { + return f ? b(d(a)[0], a[1]) : b(a); + } catch (g) { + e(c, "throw", g); + } + }; + }, + 34124: function(b, f, c) { + var d = c(81019); + var e = d("iterator"); + var g = false; + try { + var h = 0; + var a = { + next: function() { + return { + done: !!h++ + }; + }, + return: function() { + g = true; + } + }; + a[e] = function() { + return this; + }; + Array.from(a, function() { + throw 2; + }); + } catch (i) {} + b.exports = function(b, c) { + if (!c && !g) return false; + var d = false; + try { + var a = {}; + a[e] = function() { + return { + next: function() { + return { + done: (d = true) + }; + } + }; + }; + b(a); + } catch (f) {} + return d; + }; + }, + 82020: function(a) { + var b = {}.toString; + a.exports = function(a) { + return b.call(a).slice(8, -1); + }; + }, + 85983: function(c, f, a) { + var d = a(42716); + var g = a(67106); + var b = a(82020); + var e = a(81019); + var h = e("toStringTag"); + var i = b((function() { + return arguments; + })()) == "Arguments"; + var j = function(a, b) { + try { + return a[b]; + } catch (c) {} + }; + c.exports = d ? b : function(c) { + var a, d, e; + return c === undefined ? "Undefined" : c === null ? "Null" : typeof (d = j((a = Object(c)), h)) == "string" ? d : i ? b(a) : (e = b(a)) == "Object" && g(a.callee) ? "Arguments" : e; + }; + }, + 67318: function(c, d, a) { + "use strict"; + var e = a(94770).f; + var f = a(18255); + var g = a(59855); + var h = a(59561); + var i = a(51819); + var j = a(7261); + var k = a(7166); + var l = a(53988); + var m = a(87122); + var n = a(19322).fastKey; + var b = a(44670); + var o = b.set; + var p = b.getterFor; + c.exports = { + getConstructor: function(b, c, d, k) { + var a = b(function(b, e) { + i(b, a, c); + o(b, { + type: c, + index: f(null), + first: undefined, + last: undefined, + size: 0 + }); + if (!m) b.size = 0; + if (e != undefined) j(e, b[k], { + that: b, + AS_ENTRIES: d + }); + }); + var l = p(c); + var q = function(c, d, g) { + var a = l(c); + var b = r(c, d); + var e, f; + if (b) { + b.value = g; + } else { + a.last = b = { + index: (f = n(d, true)), + key: d, + value: g, + previous: (e = a.last), + next: undefined, + removed: false + }; + if (!a.first) a.first = b; + if (e) e.next = b; + if (m) a.size++; + else c.size++; + if (f !== "F") a.index[f] = b; + } + return c; + }; + var r = function(e, b) { + var c = l(e); + var d = n(b); + var a; + if (d !== "F") return c.index[d]; + for(a = c.first; a; a = a.next){ + if (a.key == b) return a; + } + }; + g(a.prototype, { + clear: function e() { + var c = this; + var b = l(c); + var d = b.index; + var a = b.first; + while(a){ + a.removed = true; + if (a.previous) a.previous = a.previous.next = undefined; + delete d[a.index]; + a = a.next; + } + b.first = b.last = undefined; + if (m) b.size = 0; + else c.size = 0; + }, + delete: function(f) { + var e = this; + var b = l(e); + var a = r(e, f); + if (a) { + var c = a.next; + var d = a.previous; + delete b.index[a.index]; + a.removed = true; + if (d) d.next = c; + if (c) c.previous = d; + if (b.first == a) b.first = c; + if (b.last == a) b.last = d; + if (m) b.size--; + else e.size--; + } + return !!a; + }, + forEach: function e(b) { + var c = l(this); + var d = h(b, arguments.length > 1 ? arguments[1] : undefined, 3); + var a; + while((a = a ? a.next : c.first)){ + d(a.value, a.key, this); + while(a && a.removed)a = a.previous; + } + }, + has: function b(a) { + return !!r(this, a); + } + }); + g(a.prototype, d ? { + get: function c(b) { + var a = r(this, b); + return a && a.value; + }, + set: function c(a, b) { + return q(this, a === 0 ? 0 : a, b); + } + } : { + add: function b(a) { + return q(this, (a = a === 0 ? 0 : a), a); + } + }); + if (m) e(a.prototype, "size", { + get: function() { + return l(this).size; + } + }); + return a; + }, + setStrong: function(c, a, b) { + var d = a + " Iterator"; + var e = p(a); + var f = p(d); + k(c, a, function(a, b) { + o(this, { + type: d, + target: a, + state: e(a), + kind: b, + last: undefined + }); + }, function() { + var b = f(this); + var c = b.kind; + var a = b.last; + while(a && a.removed)a = a.previous; + if (!b.target || !(b.last = a = a ? a.next : b.state.first)) { + b.target = undefined; + return { + value: undefined, + done: true + }; + } + if (c == "keys") return { + value: a.key, + done: false + }; + if (c == "values") return { + value: a.value, + done: false + }; + return { + value: [ + a.key, + a.value + ], + done: false + }; + }, b ? "entries" : "values", !b, true); + l(a); + } + }; + }, + 85653: function(d, f, a) { + "use strict"; + var g = a(59855); + var h = a(19322).getWeakData; + var i = a(83941); + var j = a(39817); + var k = a(51819); + var l = a(7261); + var b = a(48499); + var m = a(1521); + var c = a(44670); + var n = c.set; + var o = c.getterFor; + var p = b.find; + var q = b.findIndex; + var r = 0; + var s = function(a) { + return (a.frozen || (a.frozen = new e())); + }; + var e = function() { + this.entries = []; + }; + var t = function(a, b) { + return p(a.entries, function(a) { + return a[0] === b; + }); + }; + e.prototype = { + get: function(b) { + var a = t(this, b); + if (a) return a[1]; + }, + has: function(a) { + return !!t(this, a); + }, + set: function(a, b) { + var c = t(this, a); + if (c) c[1] = b; + else this.entries.push([ + a, + b + ]); + }, + delete: function(b) { + var a = q(this.entries, function(a) { + return a[0] === b; + }); + if (~a) this.entries.splice(a, 1); + return !!~a; + } + }; + d.exports = { + getConstructor: function(b, c, d, e) { + var a = b(function(b, f) { + k(b, a, c); + n(b, { + type: c, + id: r++, + frozen: undefined + }); + if (f != undefined) l(f, b[e], { + that: b, + AS_ENTRIES: d + }); + }); + var f = o(c); + var p = function(a, b, c) { + var d = f(a); + var e = h(i(b), true); + if (e === true) s(d).set(b, c); + else e[d.id] = c; + return a; + }; + g(a.prototype, { + delete: function(b) { + var c = f(this); + if (!j(b)) return false; + var a = h(b); + if (a === true) return s(c)["delete"](b); + return (a && m(a, c.id) && delete a[c.id]); + }, + has: function d(a) { + var c = f(this); + if (!j(a)) return false; + var b = h(a); + if (b === true) return s(c).has(a); + return b && m(b, c.id); + } + }); + g(a.prototype, d ? { + get: function d(a) { + var c = f(this); + if (j(a)) { + var b = h(a); + if (b === true) return s(c).get(a); + return b ? b[c.id] : undefined; + } + }, + set: function c(a, b) { + return p(this, a, b); + } + } : { + add: function b(a) { + return p(this, a, true); + } + }); + return a; + } + }; + }, + 6807: function(b, c, a) { + "use strict"; + var d = a(35437); + var e = a(19514); + var f = a(23736); + var g = a(78109); + var h = a(19322); + var i = a(7261); + var j = a(51819); + var k = a(67106); + var l = a(39817); + var m = a(60232); + var n = a(34124); + var o = a(77875); + var p = a(45564); + b.exports = function(b, v, w) { + var s = b.indexOf("Map") !== -1; + var c = b.indexOf("Weak") !== -1; + var u = s ? "set" : "add"; + var q = e[b]; + var r = q && q.prototype; + var a = q; + var x = {}; + var t = function(a) { + var b = r[a]; + g(r, a, a == "add" ? function c(a) { + b.call(this, a === 0 ? 0 : a); + return this; + } : a == "delete" ? function(a) { + return c && !l(a) ? false : b.call(this, a === 0 ? 0 : a); + } : a == "get" ? function d(a) { + return c && !l(a) ? undefined : b.call(this, a === 0 ? 0 : a); + } : a == "has" ? function d(a) { + return c && !l(a) ? false : b.call(this, a === 0 ? 0 : a); + } : function d(a, c) { + b.call(this, a === 0 ? 0 : a, c); + return this; + }); + }; + var A = f(b, !k(q) || !(c || (r.forEach && !m(function() { + new q().entries().next(); + })))); + if (A) { + a = w.getConstructor(v, b, s, u); + h.enable(); + } else if (f(b, true)) { + var y = new a(); + var B = y[u](c ? {} : -0, 1) != y; + var C = m(function() { + y.has(1); + }); + var D = n(function(a) { + new q(a); + }); + var z = !c && m(function() { + var b = new q(); + var a = 5; + while(a--)b[u](a, a); + return !b.has(-0); + }); + if (!D) { + a = v(function(d, e) { + j(d, a, b); + var c = p(new q(), d, a); + if (e != undefined) i(e, c[u], { + that: c, + AS_ENTRIES: s + }); + return c; + }); + a.prototype = r; + r.constructor = a; + } + if (C || z) { + t("delete"); + t("has"); + s && t("get"); + } + if (z || B) t(u); + if (c && r.clear) delete r.clear; + } + x[b] = a; + d({ + global: true, + forced: a != q + }, x); + o(a, b); + if (!c) w.setStrong(a, b, s); + return a; + }; + }, + 18295: function(b, c, a) { + var d = a(1521); + var e = a(688); + var f = a(24722); + var g = a(94770); + b.exports = function(c, h) { + var i = e(h); + var j = g.f; + var k = f.f; + for(var a = 0; a < i.length; a++){ + var b = i[a]; + if (!d(c, b)) j(c, b, k(h, b)); + } + }; + }, + 26234: function(a, d, b) { + var c = b(81019); + var e = c("match"); + a.exports = function(b) { + var a = /./; + try { + "/./"[b](a); + } catch (c) { + try { + a[e] = false; + return "/./"[b](a); + } catch (d) {} + } + return false; + }; + }, + 81577: function(a, d, b) { + var c = b(60232); + a.exports = !c(function() { + function a() {} + a.prototype.constructor = null; + return Object.getPrototypeOf(new a()) !== a.prototype; + }); + }, + 89293: function(b, c, a) { + var d = a(79602); + var e = a(72729); + var f = /"/g; + b.exports = function(g, a, b, h) { + var i = e(d(g)); + var c = "<" + a; + if (b !== "") c += " " + b + '="' + e(h).replace(f, """) + '"'; + return c + ">" + i + ""; + }; + }, + 10536: function(b, c, a) { + "use strict"; + var d = a(65400).IteratorPrototype; + var e = a(18255); + var f = a(93608); + var g = a(77875); + var h = a(25463); + var i = function() { + return this; + }; + b.exports = function(a, c, j) { + var b = c + " Iterator"; + a.prototype = e(d, { + next: f(1, j) + }); + g(a, b, false, true); + h[b] = i; + return a; + }; + }, + 48181: function(b, d, a) { + var c = a(87122); + var e = a(94770); + var f = a(93608); + b.exports = c ? function(a, b, c) { + return e.f(a, b, f(1, c)); + } : function(a, b, c) { + a[b] = c; + return a; + }; + }, + 93608: function(a) { + a.exports = function(a, b) { + return { + enumerable: !(a & 1), + configurable: !(a & 2), + writable: !(a & 4), + value: b + }; + }; + }, + 47267: function(b, c, a) { + "use strict"; + var d = a(10482); + var e = a(94770); + var f = a(93608); + b.exports = function(a, g, c) { + var b = d(g); + if (b in a) e.f(a, b, f(0, c)); + else a[b] = c; + }; + }, + 50748: function(d, f, a) { + "use strict"; + var b = a(60232); + var g = a(19795).start; + var h = Math.abs; + var c = Date.prototype; + var i = c.getTime; + var e = c.toISOString; + d.exports = b(function() { + return (e.call(new Date(-5e13 - 1)) != "0385-07-25T07:06:39.999Z"); + }) || !b(function() { + e.call(new Date(NaN)); + }) ? function e() { + if (!isFinite(i.call(this))) throw RangeError("Invalid time value"); + var a = this; + var b = a.getUTCFullYear(); + var d = a.getUTCMilliseconds(); + var c = b < 0 ? "-" : b > 9999 ? "+" : ""; + return (c + g(h(b), c ? 6 : 4, 0) + "-" + g(a.getUTCMonth() + 1, 2, 0) + "-" + g(a.getUTCDate(), 2, 0) + "T" + g(a.getUTCHours(), 2, 0) + ":" + g(a.getUTCMinutes(), 2, 0) + ":" + g(a.getUTCSeconds(), 2, 0) + "." + g(d, 3, 0) + "Z"); + } : e; + }, + 6672: function(b, c, a) { + "use strict"; + var d = a(83941); + var e = a(68023); + b.exports = function(a) { + d(this); + if (a === "string" || a === "default") a = "string"; + else if (a !== "number") throw TypeError("Incorrect hint"); + return e(this, a); + }; + }, + 7166: function(d, f, a) { + "use strict"; + var g = a(35437); + var h = a(80627); + var b = a(25160); + var i = a(67106); + var j = a(10536); + var k = a(39311); + var l = a(59057); + var m = a(77875); + var n = a(48181); + var o = a(78109); + var e = a(81019); + var p = a(25463); + var c = a(65400); + var q = b.PROPER; + var r = b.CONFIGURABLE; + var s = c.IteratorPrototype; + var t = c.BUGGY_SAFARI_ITERATORS; + var u = e("iterator"); + var v = "keys"; + var w = "values"; + var x = "entries"; + var y = function() { + return this; + }; + d.exports = function(D, d, H, I, c, J, E) { + j(H, d, I); + var A = function(b) { + if (b === c && f) return f; + if (!t && b in a) return a[b]; + switch(b){ + case v: + return function a() { + return new H(this, b); + }; + case w: + return function a() { + return new H(this, b); + }; + case x: + return function a() { + return new H(this, b); + }; + } + return function() { + return new H(this); + }; + }; + var F = d + " Iterator"; + var C = false; + var a = D.prototype; + var e = a[u] || a["@@iterator"] || (c && a[c]); + var f = (!t && e) || A(c); + var G = d == "Array" ? a.entries || e : e; + var b, z, B; + if (G) { + b = k(G.call(new D())); + if (b !== Object.prototype && b.next) { + if (!h && k(b) !== s) { + if (l) { + l(b, s); + } else if (!i(b[u])) { + o(b, u, y); + } + } + m(b, F, true, true); + if (h) p[F] = y; + } + } + if (q && c == w && e && e.name !== w) { + if (!h && r) { + n(a, "name", w); + } else { + C = true; + f = function a() { + return e.call(this); + }; + } + } + if (c) { + z = { + values: A(w), + keys: J ? f : A(v), + entries: A(x) + }; + if (E) for(B in z){ + if (t || C || !(B in a)) { + o(a, B, z[B]); + } + } + else g({ + target: d, + proto: true, + forced: t || C + }, z); + } + if ((!h || E) && a[u] !== f) { + o(a, u, f, { + name: c + }); + } + p[d] = f; + return z; + }; + }, + 71309: function(b, c, a) { + var d = a(79574); + var e = a(1521); + var f = a(52301); + var g = a(94770).f; + b.exports = function(a) { + var b = d.Symbol || (d.Symbol = {}); + if (!e(b, a)) g(b, a, { + value: f.f(a) + }); + }; + }, + 87122: function(a, d, b) { + var c = b(60232); + a.exports = !c(function() { + return (Object.defineProperty({}, 1, { + get: function() { + return 7; + } + })[1] != 7); + }); + }, + 28554: function(d, f, a) { + var e = a(19514); + var b = a(39817); + var c = e.document; + var g = b(c) && b(c.createElement); + d.exports = function(a) { + return g ? c.createElement(a) : {}; + }; + }, + 69379: function(a) { + a.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; + }, + 13724: function(c, f, d) { + var e = d(28554); + var a = e("span").classList; + var b = a && a.constructor && a.constructor.prototype; + c.exports = b === Object.prototype ? undefined : b; + }, + 15546: function(b, e, c) { + var d = c(59116); + var a = d.match(/firefox\/(\d+)/i); + b.exports = !!a && +a[1]; + }, + 23573: function(a) { + a.exports = typeof window == "object"; + }, + 13497: function(a, d, b) { + var c = b(59116); + a.exports = /MSIE|Trident/.test(c); + }, + 67798: function(b, e, a) { + var c = a(59116); + var d = a(19514); + b.exports = /ipad|iphone|ipod/i.test(c) && d.Pebble !== undefined; + }, + 80125: function(a, d, b) { + var c = b(59116); + a.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(c); + }, + 96590: function(b, e, a) { + var c = a(82020); + var d = a(19514); + b.exports = c(d.process) == "process"; + }, + 5853: function(a, d, b) { + var c = b(59116); + a.exports = /web0s(?!.*chrome)/i.test(c); + }, + 59116: function(a, d, b) { + var c = b(44990); + a.exports = c("navigator", "userAgent") || ""; + }, + 50661: function(j, k, d) { + var e = d(19514); + var c = d(59116); + var f = e.process; + var g = e.Deno; + var h = (f && f.versions) || (g && g.version); + var i = h && h.v8; + var a, b; + if (i) { + a = i.split("."); + b = a[0] < 4 ? 1 : a[0] + a[1]; + } else if (c) { + a = c.match(/Edge\/(\d+)/); + if (!a || a[1] >= 74) { + a = c.match(/Chrome\/(\d+)/); + if (a) b = a[1]; + } + } + j.exports = b && +b; + }, + 34884: function(b, e, c) { + var d = c(59116); + var a = d.match(/AppleWebKit\/(\d+)\./); + b.exports = !!a && +a[1]; + }, + 91080: function(a) { + a.exports = [ + "constructor", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "toLocaleString", + "toString", + "valueOf", + ]; + }, + 35437: function(b, c, a) { + var d = a(19514); + var e = a(24722).f; + var f = a(48181); + var g = a(78109); + var h = a(65933); + var i = a(18295); + var j = a(23736); + b.exports = function(a, o) { + var m = a.target; + var p = a.global; + var q = a.stat; + var r, b, c, k, l, n; + if (p) { + b = d; + } else if (q) { + b = d[m] || h(m, {}); + } else { + b = (d[m] || {}).prototype; + } + if (b) for(c in o){ + l = o[c]; + if (a.noTargetGet) { + n = e(b, c); + k = n && n.value; + } else k = b[c]; + r = j(p ? c : m + (q ? "." : "#") + c, a.forced); + if (!r && k !== undefined) { + if (typeof l === typeof k) continue; + i(l, k); + } + if (a.sham || (k && k.sham)) { + f(l, "sham", true); + } + g(b, c, l, a); + } + }; + }, + 60232: function(a) { + a.exports = function(a) { + try { + return !!a(); + } catch (b) { + return true; + } + }; + }, + 29045: function(b, d, a) { + "use strict"; + a(7457); + var e = a(78109); + var f = a(72384); + var g = a(60232); + var c = a(81019); + var h = a(48181); + var i = c("species"); + var j = RegExp.prototype; + b.exports = function(b, l, m, n) { + var a = c(b); + var d = !g(function() { + var c = {}; + c[a] = function() { + return 7; + }; + return ""[b](c) != 7; + }); + var o = d && !g(function() { + var d = false; + var c = /a/; + if (b === "split") { + c = {}; + c.constructor = {}; + c.constructor[i] = function() { + return c; + }; + c.flags = ""; + c[a] = /./[a]; + } + c.exec = function() { + d = true; + return null; + }; + c[a](""); + return !d; + }); + if (!d || !o || m) { + var p = /./[a]; + var k = l(a, ""[b], function(g, a, b, c, h) { + var e = a.exec; + if (e === f || e === j.exec) { + if (d && !h) { + return { + done: true, + value: p.call(a, b, c) + }; + } + return { + done: true, + value: g.call(b, a, c) + }; + } + return { + done: false + }; + }); + e(String.prototype, b, k[0]); + e(j, a, k[1]); + } + if (n) h(j[a], "sham", true); + }; + }, + 31289: function(b, d, a) { + "use strict"; + var e = a(63079); + var f = a(31998); + var g = a(59561); + var c = function(i, j, h, n, o, k, l, p) { + var a = o; + var b = 0; + var m = l ? g(l, p, 3) : false; + var d; + while(b < n){ + if (b in h) { + d = m ? m(h[b], b, j) : h[b]; + if (k > 0 && e(d)) { + a = c(i, j, d, f(d.length), a, k - 1) - 1; + } else { + if (a >= 0x1fffffffffffff) throw TypeError("Exceed the acceptable array length"); + i[a] = d; + } + a++; + } + b++; + } + return a; + }; + b.exports = c; + }, + 85469: function(a, d, b) { + var c = b(60232); + a.exports = !c(function() { + return Object.isExtensible(Object.preventExtensions({})); + }); + }, + 59561: function(a, c, b) { + var d = b(74618); + a.exports = function(a, b, c) { + d(a); + if (b === undefined) return a; + switch(c){ + case 0: + return function() { + return a.call(b); + }; + case 1: + return function(c) { + return a.call(b, c); + }; + case 2: + return function(c, d) { + return a.call(b, c, d); + }; + case 3: + return function(c, d, e) { + return a.call(b, c, d, e); + }; + } + return function() { + return a.apply(b, arguments); + }; + }; + }, + 48644: function(b, c, a) { + "use strict"; + var d = a(74618); + var e = a(39817); + var f = [].slice; + var g = {}; + var h = function(d, a, e) { + if (!(a in g)) { + for(var c = [], b = 0; b < a; b++)c[b] = "a[" + b + "]"; + g[a] = Function("C,a", "return new C(" + c.join(",") + ")"); + } + return g[a](d, e); + }; + b.exports = Function.bind || function c(g) { + var a = d(this); + var i = f.call(arguments, 1); + var b = function d() { + var c = i.concat(f.call(arguments)); + return this instanceof b ? h(a, c.length, c) : a.apply(g, c); + }; + if (e(a.prototype)) b.prototype = a.prototype; + return b; + }; + }, + 25160: function(e, j, c) { + var a = c(87122); + var f = c(1521); + var d = Function.prototype; + var g = a && Object.getOwnPropertyDescriptor; + var b = f(d, "name"); + var h = b && function a() {}.name === "something"; + var i = b && (!a || (a && g(d, "name").configurable)); + e.exports = { + EXISTS: b, + PROPER: h, + CONFIGURABLE: i + }; + }, + 44990: function(b, c, a) { + var d = a(19514); + var e = a(67106); + var f = function(a) { + return e(a) ? a : undefined; + }; + b.exports = function(a, b) { + return arguments.length < 2 ? f(d[a]) : d[a] && d[a][b]; + }; + }, + 99422: function(b, d, a) { + var e = a(85983); + var f = a(84316); + var g = a(25463); + var c = a(81019); + var h = c("iterator"); + b.exports = function(a) { + if (a != undefined) return (f(a, h) || f(a, "@@iterator") || g[e(a)]); + }; + }, + 11661: function(b, c, a) { + var d = a(74618); + var e = a(83941); + var f = a(99422); + b.exports = function(a, c) { + var b = arguments.length < 2 ? f(a) : c; + if (d(b)) return e(b.call(a)); + throw TypeError(String(a) + " is not iterable"); + }; + }, + 84316: function(a, c, b) { + var d = b(74618); + a.exports = function(b, c) { + var a = b[c]; + return a == null ? undefined : d(a); + }; + }, + 33371: function(a, c, b) { + var d = b(89343); + var e = Math.floor; + var f = "".replace; + var g = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; + var h = /\$([$&'`]|\d{1,2})/g; + a.exports = function(c, l, i, j, a, k) { + var m = i + c.length; + var n = j.length; + var b = h; + if (a !== undefined) { + a = d(a); + b = g; + } + return f.call(k, b, function(h, b) { + var d; + switch(b.charAt(0)){ + case "$": + return "$"; + case "&": + return c; + case "`": + return l.slice(0, i); + case "'": + return l.slice(m); + case "<": + d = a[b.slice(1, -1)]; + break; + default: + var f = +b; + if (f === 0) return h; + if (f > n) { + var g = e(f / 10); + if (g === 0) return h; + if (g <= n) return j[g - 1] === undefined ? b.charAt(1) : j[g - 1] + b.charAt(1); + return h; + } + d = j[f - 1]; + } + return d === undefined ? "" : d; + }); + }; + }, + 19514: function(c, d, b) { + var a = function(a) { + return a && a.Math == Math && a; + }; + c.exports = a(typeof globalThis == "object" && globalThis) || a(typeof window == "object" && window) || a(typeof self == "object" && self) || a(typeof b.g == "object" && b.g) || (function() { + return this; + })() || Function("return this")(); + }, + 1521: function(a, c, b) { + var d = b(89343); + var e = {}.hasOwnProperty; + a.exports = Object.hasOwn || function c(a, b) { + return e.call(d(a), b); + }; + }, + 38276: function(a) { + a.exports = {}; + }, + 85033: function(a, c, b) { + var d = b(19514); + a.exports = function(b, c) { + var a = d.console; + if (a && a.error) { + arguments.length === 1 ? a.error(b) : a.error(b, c); + } + }; + }, + 40969: function(a, d, b) { + var c = b(44990); + a.exports = c("document", "documentElement"); + }, + 10002: function(b, e, a) { + var c = a(87122); + var d = a(60232); + var f = a(28554); + b.exports = !c && !d(function() { + return (Object.defineProperty(f("div"), "a", { + get: function() { + return 7; + } + }).a != 7); + }); + }, + 43571: function(a) { + var d = Math.abs; + var e = Math.pow; + var f = Math.floor; + var g = Math.log; + var h = Math.LN2; + var b = function(a, c, p) { + var l = new Array(p); + var m = p * 8 - c - 1; + var n = (1 << m) - 1; + var j = n >> 1; + var q = c === 23 ? e(2, -24) - e(2, -77) : 0; + var r = a < 0 || (a === 0 && 1 / a < 0) ? 1 : 0; + var o = 0; + var b, i, k; + a = d(a); + if (a != a || a === Infinity) { + i = a != a ? 1 : 0; + b = n; + } else { + b = f(g(a) / h); + if (a * (k = e(2, -b)) < 1) { + b--; + k *= 2; + } + if (b + j >= 1) { + a += q / k; + } else { + a += q * e(2, 1 - j); + } + if (a * k >= 2) { + b++; + k /= 2; + } + if (b + j >= n) { + i = 0; + b = n; + } else if (b + j >= 1) { + i = (a * k - 1) * e(2, c); + b = b + j; + } else { + i = a * e(2, j - 1) * e(2, c); + b = 0; + } + } + for(; c >= 8; l[o++] = i & 255, i /= 256, c -= 8); + b = (b << c) | i; + m += c; + for(; m > 0; l[o++] = b & 255, b /= 256, m -= 8); + l[--o] |= r * 128; + return l; + }; + var c = function(f, g) { + var i = f.length; + var j = i * 8 - g - 1; + var k = (1 << j) - 1; + var l = k >> 1; + var b = j - 7; + var d = i - 1; + var h = f[d--]; + var a = h & 127; + var c; + h >>= 7; + for(; b > 0; a = a * 256 + f[d], d--, b -= 8); + c = a & ((1 << -b) - 1); + a >>= -b; + b += g; + for(; b > 0; c = c * 256 + f[d], d--, b -= 8); + if (a === 0) { + a = 1 - l; + } else if (a === k) { + return c ? NaN : h ? -Infinity : Infinity; + } else { + c = c + e(2, g); + a = a - l; + } + return ((h ? -1 : 1) * c * e(2, a - g)); + }; + a.exports = { + pack: b, + unpack: c + }; + }, + 51478: function(b, d, a) { + var c = a(60232); + var e = a(82020); + var f = "".split; + b.exports = c(function() { + return !Object("z").propertyIsEnumerable(0); + }) ? function(a) { + return e(a) == "String" ? f.call(a, "") : Object(a); + } : Object; + }, + 45564: function(b, c, a) { + var d = a(67106); + var e = a(39817); + var f = a(59057); + b.exports = function(c, h, g) { + var a, b; + if (f && d((a = h.constructor)) && a !== g && e((b = a.prototype)) && b !== g.prototype) f(c, b); + return c; + }; + }, + 71975: function(c, e, b) { + var d = b(67106); + var a = b(88986); + var f = Function.toString; + if (!d(a.inspectSource)) { + a.inspectSource = function(a) { + return f.call(a); + }; + } + c.exports = a.inspectSource; + }, + 19322: function(b, j, a) { + var k = a(35437); + var c = a(38276); + var l = a(39817); + var m = a(1521); + var n = a(94770).f; + var o = a(13463); + var p = a(33954); + var d = a(67045); + var q = a(85469); + var r = false; + var e = d("meta"); + var s = 0; + var t = Object.isExtensible || function() { + return true; + }; + var u = function(a) { + n(a, e, { + value: { + objectID: "O" + s++, + weakData: {} + } + }); + }; + var f = function(a, b) { + if (!l(a)) return typeof a == "symbol" ? a : (typeof a == "string" ? "S" : "P") + a; + if (!m(a, e)) { + if (!t(a)) return "F"; + if (!b) return "E"; + u(a); + } + return a[e].objectID; + }; + var g = function(a, b) { + if (!m(a, e)) { + if (!t(a)) return true; + if (!b) return false; + u(a); + } + return a[e].weakData; + }; + var h = function(a) { + if (q && r && t(a) && !m(a, e)) u(a); + return a; + }; + var i = function() { + v.enable = function() {}; + r = true; + var b = o.f; + var c = [].splice; + var a = {}; + a[e] = 1; + if (b(a).length) { + o.f = function(f) { + var a = b(f); + for(var d = 0, g = a.length; d < g; d++){ + if (a[d] === e) { + c.call(a, d, 1); + break; + } + } + return a; + }; + k({ + target: "Object", + stat: true, + forced: true + }, { + getOwnPropertyNames: p.f + }); + } + }; + var v = (b.exports = { + enable: i, + fastKey: f, + getWeakData: g, + onFreeze: h + }); + c[e] = true; + }, + 44670: function(g, p, a) { + var h = a(83165); + var i = a(19514); + var q = a(39817); + var r = a(48181); + var s = a(1521); + var b = a(88986); + var j = a(16735); + var k = a(38276); + var t = "Object already initialized"; + var l = i.WeakMap; + var c, d, e; + var m = function(a) { + return e(a) ? d(a) : c(a, {}); + }; + var n = function(a) { + return function(b) { + var c; + if (!q(b) || (c = d(b)).type !== a) { + throw TypeError("Incompatible receiver, " + a + " required"); + } + return c; + }; + }; + if (h || b.state) { + var f = b.state || (b.state = new l()); + var u = f.get; + var v = f.has; + var w = f.set; + c = function(a, b) { + if (v.call(f, a)) throw new TypeError(t); + b.facade = a; + w.call(f, a, b); + return b; + }; + d = function(a) { + return u.call(f, a) || {}; + }; + e = function(a) { + return v.call(f, a); + }; + } else { + var o = j("state"); + k[o] = true; + c = function(a, b) { + if (s(a, o)) throw new TypeError(t); + b.facade = a; + r(a, o, b); + return b; + }; + d = function(a) { + return s(a, o) ? a[o] : {}; + }; + e = function(a) { + return s(a, o); + }; + } + g.exports = { + set: c, + get: d, + has: e, + enforce: m, + getterFor: n + }; + }, + 58011: function(b, d, a) { + var c = a(81019); + var e = a(25463); + var f = c("iterator"); + var g = Array.prototype; + b.exports = function(a) { + return (a !== undefined && (e.Array === a || g[f] === a)); + }; + }, + 63079: function(a, c, b) { + var d = b(82020); + a.exports = Array.isArray || function b(a) { + return d(a) == "Array"; + }; + }, + 67106: function(a) { + a.exports = function(a) { + return typeof a === "function"; + }; + }, + 17026: function(c, i, a) { + var d = a(60232); + var j = a(67106); + var k = a(85983); + var e = a(44990); + var l = a(71975); + var m = []; + var f = e("Reflect", "construct"); + var b = /^\s*(?:class|function)\b/; + var n = b.exec; + var o = !b.exec(function() {}); + var g = function(a) { + if (!j(a)) return false; + try { + f(Object, m, a); + return true; + } catch (b) { + return false; + } + }; + var h = function(a) { + if (!j(a)) return false; + switch(k(a)){ + case "AsyncFunction": + case "GeneratorFunction": + case "AsyncGeneratorFunction": + return false; + } + return (o || !!n.call(b, l(a))); + }; + c.exports = !f || d(function() { + var a; + return (g(g.call) || !g(Object) || !g(function() { + a = true; + }) || a); + }) ? h : g; + }, + 69518: function(a, c, b) { + var d = b(1521); + a.exports = function(a) { + return (a !== undefined && (d(a, "value") || d(a, "writable"))); + }; + }, + 23736: function(c, d, b) { + var e = b(60232); + var f = b(67106); + var g = /#|\.prototype\./; + var a = function(c, a) { + var b = i[h(c)]; + return b == k ? true : b == j ? false : f(a) ? e(a) : !!a; + }; + var h = (a.normalize = function(a) { + return String(a).replace(g, ".").toLowerCase(); + }); + var i = (a.data = {}); + var j = (a.NATIVE = "N"); + var k = (a.POLYFILL = "P"); + c.exports = a; + }, + 73156: function(a, c, b) { + var d = b(39817); + var e = Math.floor; + a.exports = function b(a) { + return !d(a) && isFinite(a) && e(a) === a; + }; + }, + 39817: function(a, c, b) { + var d = b(67106); + a.exports = function(a) { + return typeof a === "object" ? a !== null : d(a); + }; + }, + 80627: function(a) { + a.exports = false; + }, + 78202: function(b, d, a) { + var e = a(39817); + var f = a(82020); + var c = a(81019); + var g = c("match"); + b.exports = function(a) { + var b; + return (e(a) && ((b = a[g]) !== undefined ? !!b : f(a) == "RegExp")); + }; + }, + 17679: function(b, d, a) { + var e = a(67106); + var f = a(44990); + var c = a(93102); + b.exports = c ? function(a) { + return typeof a == "symbol"; + } : function(b) { + var a = f("Symbol"); + return (e(a) && Object(b) instanceof a); + }; + }, + 7261: function(b, c, a) { + var d = a(83941); + var e = a(58011); + var f = a(31998); + var g = a(59561); + var h = a(11661); + var i = a(99422); + var j = a(65570); + var k = function(a, b) { + this.stopped = a; + this.result = b; + }; + b.exports = function(c, s, b) { + var t = b && b.that; + var u = !!(b && b.AS_ENTRIES); + var v = !!(b && b.IS_ITERATOR); + var w = !!(b && b.INTERRUPTED); + var y = g(s, t, 1 + u + w); + var l, m, n, o, a, p, q; + var z = function(a) { + if (l) j(l, "normal", a); + return new k(true, a); + }; + var r = function(a) { + if (u) { + d(a); + return w ? y(a[0], a[1], z) : y(a[0], a[1]); + } + return w ? y(a, z) : y(a); + }; + if (v) { + l = c; + } else { + m = i(c); + if (!m) throw TypeError(String(c) + " is not iterable"); + if (e(m)) { + for(n = 0, o = f(c.length); o > n; n++){ + a = r(c[n]); + if (a && a instanceof k) return a; + } + return new k(false); + } + l = h(c, m); + } + p = l.next; + while(!(q = p.call(l)).done){ + try { + a = r(q.value); + } catch (x) { + j(l, "throw", x); + } + if (typeof a == "object" && a && a instanceof k) return a; + } + return new k(false); + }; + }, + 65570: function(b, c, a) { + var d = a(83941); + var e = a(84316); + b.exports = function(c, f, b) { + var a, g; + d(c); + try { + a = e(c, "return"); + if (!a) { + if (f === "throw") throw b; + return b; + } + a = a.call(c); + } catch (h) { + g = true; + a = h; + } + if (f === "throw") throw b; + if (g) throw a; + d(a); + return b; + }; + }, + 65400: function(h, p, b) { + "use strict"; + var i = b(60232); + var j = b(67106); + var k = b(18255); + var e = b(39311); + var l = b(78109); + var m = b(81019); + var n = b(80627); + var f = m("iterator"); + var g = false; + var a, c, d; + if ([].keys) { + d = [].keys(); + if (!("next" in d)) g = true; + else { + c = e(e(d)); + if (c !== Object.prototype) a = c; + } + } + var o = a == undefined || i(function() { + var b = {}; + return a[f].call(b) !== b; + }); + if (o) a = {}; + else if (n) a = k(a); + if (!j(a[f])) { + l(a, f, function() { + return this; + }); + } + h.exports = { + IteratorPrototype: a, + BUGGY_SAFARI_ITERATORS: g + }; + }, + 25463: function(a) { + a.exports = {}; + }, + 87482: function(b) { + var a = Math.expm1; + var c = Math.exp; + b.exports = !a || a(10) > 22025.465794806719 || a(10) < 22025.4657948067165168 || a(-2e-17) != -2e-17 ? function b(a) { + return (a = +a) == 0 ? a : a > -1e-6 && a < 1e-6 ? a + (a * a) / 2 : c(a) - 1; + } : a; + }, + 45404: function(b, e, c) { + var f = c(62381); + var g = Math.abs; + var a = Math.pow; + var h = a(2, -52); + var d = a(2, -23); + var i = a(2, 127) * (2 - d); + var j = a(2, -126); + var k = function(a) { + return a + 1 / h - 1 / h; + }; + b.exports = Math.fround || function m(l) { + var b = g(l); + var c = f(l); + var e, a; + if (b < j) return (c * k(b / j / d) * j * d); + e = (1 + d / h) * b; + a = e - (e - b); + if (a > i || a != a) return c * Infinity; + return c * a; + }; + }, + 41571: function(a) { + var b = Math.log; + a.exports = Math.log1p || function c(a) { + return (a = +a) > -1e-8 && a < 1e-8 ? a - (a * a) / 2 : b(1 + a); + }; + }, + 62381: function(a) { + a.exports = Math.sign || function b(a) { + return (a = +a) == 0 || a != a ? a : a < 0 ? -1 : 1; + }; + }, + 50277: function(m, t, a) { + var b = a(19514); + var n = a(24722).f; + var u = a(46660).set; + var o = a(80125); + var p = a(67798); + var q = a(5853); + var f = a(96590); + var g = b.MutationObserver || b.WebKitMutationObserver; + var h = b.document; + var v = b.process; + var c = b.Promise; + var i = n(b, "queueMicrotask"); + var j = i && i.value; + var k, w, x, d, r, l, e, s; + if (!j) { + k = function() { + var a, b; + if (f && (a = v.domain)) a.exit(); + while(w){ + b = w.fn; + w = w.next; + try { + b(); + } catch (c) { + if (w) d(); + else x = undefined; + throw c; + } + } + x = undefined; + if (a) a.enter(); + }; + if (!o && !f && !q && g && h) { + r = true; + l = h.createTextNode(""); + new g(k).observe(l, { + characterData: true + }); + d = function() { + l.data = r = !r; + }; + } else if (!p && c && c.resolve) { + e = c.resolve(undefined); + e.constructor = c; + s = e.then; + d = function() { + s.call(e, k); + }; + } else if (f) { + d = function() { + v.nextTick(k); + }; + } else { + d = function() { + u.call(b, k); + }; + } + } + m.exports = j || function(b) { + var a = { + fn: b, + next: undefined + }; + if (x) x.next = a; + if (!w) { + w = a; + d(); + } + x = a; + }; + }, + 91591: function(a, d, b) { + var c = b(19514); + a.exports = c.Promise; + }, + 11382: function(b, d, a) { + var e = a(50661); + var c = a(60232); + b.exports = !!Object.getOwnPropertySymbols && !c(function() { + var a = Symbol(); + return (!String(a) || !(Object(a) instanceof Symbol) || (!Symbol.sham && e && e < 41)); + }); + }, + 62902: function(b, e, a) { + var c = a(60232); + var d = a(81019); + var f = a(80627); + var g = d("iterator"); + b.exports = !c(function() { + var a = new URL("b?a=1&b=2&c=3", "http://a"); + var b = a.searchParams; + var c = ""; + a.pathname = "c%20d"; + b.forEach(function(a, d) { + b["delete"]("b"); + c += d + a; + }); + return ((f && !a.toJSON) || !b.sort || a.href !== "http://a/c%20d?a=1&c=3" || b.get("c") !== "3" || String(new URLSearchParams("?a=1")) !== "a=1" || !b[g] || new URL("https://a@b").username !== "a" || new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" || new URL("http://тест").host !== "xn--e1aybc" || new URL("http://a#б").hash !== "#%D0%B1" || c !== "a1c3" || new URL("http://x", undefined).host !== "x"); + }); + }, + 83165: function(c, g, a) { + var d = a(19514); + var e = a(67106); + var f = a(71975); + var b = d.WeakMap; + c.exports = e(b) && /native code/.test(f(b)); + }, + 11098: function(a, c, b) { + "use strict"; + var d = b(74618); + var e = function(a) { + var b, c; + this.promise = new a(function(a, d) { + if (b !== undefined || c !== undefined) throw TypeError("Bad Promise constructor"); + b = a; + c = d; + }); + this.resolve = d(b); + this.reject = d(c); + }; + a.exports.f = function(a) { + return new e(a); + }; + }, + 3974: function(a, c, b) { + var d = b(78202); + a.exports = function(a) { + if (d(a)) { + throw TypeError("The method doesn't accept regular expressions"); + } + return a; + }; + }, + 85471: function(a, d, b) { + var c = b(19514); + var e = c.isFinite; + a.exports = Number.isFinite || function b(a) { + return typeof a == "number" && e(a); + }; + }, + 45220: function(e, j, a) { + var b = a(19514); + var f = a(60232); + var k = a(72729); + var l = a(62034).trim; + var g = a(88443); + var c = b.parseFloat; + var d = b.Symbol; + var h = d && d.iterator; + var i = 1 / c(g + "-0") !== -Infinity || (h && !f(function() { + c(Object(h)); + })); + e.exports = i ? function e(d) { + var a = l(k(d)); + var b = c(a); + return b === 0 && a.charAt(0) == "-" ? -0 : b; + } : c; + }, + 33279: function(f, j, a) { + var c = a(19514); + var g = a(60232); + var k = a(72729); + var l = a(62034).trim; + var d = a(88443); + var b = c.parseInt; + var e = c.Symbol; + var h = e && e.iterator; + var m = /^[+-]?0[Xx]/; + var i = b(d + "08") !== 8 || b(d + "0x16") !== 22 || (h && !g(function() { + b(Object(h)); + })); + f.exports = i ? function e(c, d) { + var a = l(k(c)); + return b(a, d >>> 0 || (m.test(a) ? 16 : 10)); + } : b; + }, + 59038: function(c, e, a) { + "use strict"; + var f = a(87122); + var d = a(60232); + var g = a(25732); + var h = a(19724); + var i = a(44096); + var j = a(89343); + var k = a(51478); + var b = Object.assign; + var l = Object.defineProperty; + c.exports = !b || d(function() { + if (f && b({ + b: 1 + }, b(l({}, "a", { + enumerable: true, + get: function() { + l(this, "b", { + value: 3, + enumerable: false + }); + } + }), { + b: 2 + })).b !== 1) return true; + var a = {}; + var e = {}; + var c = Symbol(); + var d = "abcdefghijklmnopqrst"; + a[c] = 7; + d.split("").forEach(function(a) { + e[a] = a; + }); + return (b({}, a)[c] != 7 || g(b({}, e)).join("") != d); + }) ? function r(n, s) { + var c = j(n); + var o = arguments.length; + var d = 1; + var e = h.f; + var p = i.f; + while(o > d){ + var a = k(arguments[d++]); + var l = e ? g(a).concat(e(a)) : g(a); + var q = l.length; + var m = 0; + var b; + while(q > m){ + b = l[m++]; + if (!f || p.call(a, b)) c[b] = a[b]; + } + } + return c; + } : b; + }, + 18255: function(b, f, a) { + var g = a(83941); + var h = a(68381); + var i = a(91080); + var c = a(38276); + var j = a(40969); + var k = a(28554); + var d = a(16735); + var l = ">"; + var m = "<"; + var n = "prototype"; + var o = "script"; + var e = d("IE_PROTO"); + var p = function() {}; + var q = function(a) { + return m + o + l + a + m + "/" + o + l; + }; + var r = function(a) { + a.write(q("")); + a.close(); + var b = a.parentWindow.Object; + a = null; + return b; + }; + var s = function() { + var b = k("iframe"); + var c = "java" + o + ":"; + var a; + b.style.display = "none"; + j.appendChild(b); + b.src = String(c); + a = b.contentWindow.document; + a.open(); + a.write(q("document.F=Object")); + a.close(); + return a.F; + }; + var t; + var u = function() { + try { + t = new ActiveXObject("htmlfile"); + } catch (b) {} + u = typeof document != "undefined" ? document.domain && t ? r(t) : s() : r(t); + var a = i.length; + while(a--)delete u[n][i[a]]; + return u(); + }; + c[e] = true; + b.exports = Object.create || function d(b, c) { + var a; + if (b !== null) { + p[n] = g(b); + a = new p(); + p[n] = null; + a[e] = b; + } else a = u(); + return c === undefined ? a : h(a, c); + }; + }, + 68381: function(b, d, a) { + var c = a(87122); + var e = a(94770); + var f = a(83941); + var g = a(25732); + b.exports = c ? Object.defineProperties : function j(a, b) { + f(a); + var c = g(b); + var i = c.length; + var d = 0; + var h; + while(i > d)e.f(a, (h = c[d++]), b[h]); + return a; + }; + }, + 94770: function(e, b, a) { + var c = a(87122); + var f = a(10002); + var g = a(83941); + var h = a(10482); + var d = Object.defineProperty; + b.f = c ? d : function e(b, c, a) { + g(b); + c = h(c); + g(a); + if (f) try { + return d(b, c, a); + } catch (i) {} + if ("get" in a || "set" in a) throw TypeError("Accessors not supported"); + if ("value" in a) b[c] = a.value; + return b; + }; + }, + 24722: function(e, b, a) { + var c = a(87122); + var f = a(44096); + var g = a(93608); + var h = a(74981); + var i = a(10482); + var j = a(1521); + var k = a(10002); + var d = Object.getOwnPropertyDescriptor; + b.f = c ? d : function c(a, b) { + a = h(a); + b = i(b); + if (k) try { + return d(a, b); + } catch (e) {} + if (j(a, b)) return g(!f.f.call(a, b), a[b]); + }; + }, + 33954: function(b, c, a) { + var d = a(74981); + var e = a(13463).f; + var f = {}.toString; + var g = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + var h = function(a) { + try { + return e(a); + } catch (b) { + return g.slice(); + } + }; + b.exports.f = function b(a) { + return g && f.call(a) == "[object Window]" ? h(a) : e(d(a)); + }; + }, + 13463: function(d, b, a) { + var e = a(63268); + var c = a(91080); + var f = c.concat("length", "prototype"); + b.f = Object.getOwnPropertyNames || function b(a) { + return e(a, f); + }; + }, + 19724: function(b, a) { + a.f = Object.getOwnPropertySymbols; + }, + 39311: function(b, e, a) { + var f = a(1521); + var g = a(67106); + var h = a(89343); + var c = a(16735); + var d = a(81577); + var i = c("IE_PROTO"); + var j = Object.prototype; + b.exports = d ? Object.getPrototypeOf : function(c) { + var a = h(c); + if (f(a, i)) return a[i]; + var b = a.constructor; + if (g(b) && a instanceof b) { + return b.prototype; + } + return a instanceof Object ? j : null; + }; + }, + 63268: function(b, c, a) { + var d = a(1521); + var e = a(74981); + var f = a(44517).indexOf; + var g = a(38276); + b.exports = function(j, h) { + var c = e(j); + var i = 0; + var b = []; + var a; + for(a in c)!d(g, a) && d(c, a) && b.push(a); + while(h.length > i)if (d(c, (a = h[i++]))) { + ~f(b, a) || b.push(a); + } + return b; + }; + }, + 25732: function(b, c, a) { + var d = a(63268); + var e = a(91080); + b.exports = Object.keys || function b(a) { + return d(a, e); + }; + }, + 44096: function(e, b) { + "use strict"; + var a = {}.propertyIsEnumerable; + var c = Object.getOwnPropertyDescriptor; + var d = c && !a.call({ + 1: 2 + }, 1); + b.f = d ? function d(b) { + var a = c(this, b); + return !!a && a.enumerable; + } : a; + }, + 62115: function(b, e, a) { + "use strict"; + var c = a(80627); + var f = a(19514); + var d = a(60232); + var g = a(34884); + b.exports = c || !d(function() { + if (g && g < 535) return; + var a = Math.random(); + __defineSetter__.call(null, a, function() {}); + delete f[a]; + }); + }, + 59057: function(b, c, a) { + var d = a(83941); + var e = a(47111); + b.exports = Object.setPrototypeOf || ("__proto__" in {} ? (function() { + var c = false; + var a = {}; + var b; + try { + b = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set; + b.call(a, []); + c = a instanceof Array; + } catch (f) {} + return function g(a, f) { + d(a); + e(f); + if (c) b.call(a, f); + else a.__proto__ = f; + return a; + }; + })() : undefined); + }, + 7996: function(c, d, a) { + var e = a(87122); + var f = a(25732); + var g = a(74981); + var h = a(44096).f; + var b = function(a) { + return function(k) { + var c = g(k); + var d = f(c); + var l = d.length; + var i = 0; + var j = []; + var b; + while(l > i){ + b = d[i++]; + if (!e || h.call(c, b)) { + j.push(a ? [ + b, + c[b] + ] : c[b]); + } + } + return j; + }; + }; + c.exports = { + entries: b(true), + values: b(false) + }; + }, + 35253: function(b, d, a) { + "use strict"; + var c = a(42716); + var e = a(85983); + b.exports = c ? {}.toString : function a() { + return "[object " + e(this) + "]"; + }; + }, + 68023: function(b, c, a) { + var d = a(67106); + var e = a(39817); + b.exports = function(a, f) { + var b, c; + if (f === "string" && d((b = a.toString)) && !e((c = b.call(a)))) return c; + if (d((b = a.valueOf)) && !e((c = b.call(a)))) return c; + if (f !== "string" && d((b = a.toString)) && !e((c = b.call(a)))) return c; + throw TypeError("Can't convert object to primitive value"); + }; + }, + 688: function(b, d, a) { + var c = a(44990); + var e = a(13463); + var f = a(19724); + var g = a(83941); + b.exports = c("Reflect", "ownKeys") || function d(a) { + var b = e.f(g(a)); + var c = f.f; + return c ? b.concat(c(a)) : b; + }; + }, + 79574: function(a, d, b) { + var c = b(19514); + a.exports = c; + }, + 68275: function(a) { + a.exports = function(a) { + try { + return { + error: false, + value: a() + }; + } catch (b) { + return { + error: true, + value: b + }; + } + }; + }, + 56540: function(b, c, a) { + var d = a(83941); + var e = a(39817); + var f = a(11098); + b.exports = function(b, a) { + d(b); + if (e(a) && a.constructor === b) return a; + var c = f.f(b); + var g = c.resolve; + g(a); + return c.promise; + }; + }, + 59855: function(a, c, b) { + var d = b(78109); + a.exports = function(a, b, e) { + for(var c in b)d(a, c, b[c], e); + return a; + }; + }, + 78109: function(c, d, a) { + var e = a(19514); + var f = a(67106); + var g = a(1521); + var h = a(48181); + var i = a(65933); + var j = a(71975); + var b = a(44670); + var k = a(25160).CONFIGURABLE; + var l = b.get; + var m = b.enforce; + var n = String(String).split("String"); + (c.exports = function(j, c, a, b) { + var p = b ? !!b.unsafe : false; + var l = b ? !!b.enumerable : false; + var q = b ? !!b.noTargetGet : false; + var d = b && b.name !== undefined ? b.name : c; + var o; + if (f(a)) { + if (String(d).slice(0, 7) === "Symbol(") { + d = "[" + String(d).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"; + } + if (!g(a, "name") || (k && a.name !== d)) { + h(a, "name", d); + } + o = m(a); + if (!o.source) { + o.source = n.join(typeof d == "string" ? d : ""); + } + } + if (j === e) { + if (l) j[c] = a; + else i(c, a); + return; + } else if (!p) { + delete j[c]; + } else if (!q && j[c]) { + l = true; + } + if (l) j[c] = a; + else h(j, c, a); + })(Function.prototype, "toString", function a() { + return ((f(this) && l(this).source) || j(this)); + }); + }, + 21135: function(b, c, a) { + var d = a(83941); + var e = a(67106); + var f = a(82020); + var g = a(72384); + b.exports = function(a, c) { + var h = a.exec; + if (e(h)) { + var b = h.call(a, c); + if (b !== null) d(b); + return b; + } + if (f(a) === "RegExp") return g.call(a, c); + throw TypeError("RegExp#exec called on incompatible receiver"); + }; + }, + 72384: function(d, m, a) { + "use strict"; + var n = a(72729); + var o = a(40697); + var b = a(44725); + var e = a(61011); + var p = a(18255); + var q = a(44670).get; + var f = a(76740); + var g = a(23564); + var h = RegExp.prototype.exec; + var r = e("native-string-replace", String.prototype.replace); + var c = h; + var i = (function() { + var a = /a/; + var b = /b*/g; + h.call(a, "a"); + h.call(b, "a"); + return a.lastIndex !== 0 || b.lastIndex !== 0; + })(); + var j = b.UNSUPPORTED_Y || b.BROKEN_CARET; + var k = /()??/.exec("")[1] !== undefined; + var l = i || k || j || f || g; + if (l) { + c = function C(B) { + var a = this; + var x = q(a); + var e = n(B); + var f = x.raw; + var y, g, z, b, l, A, t; + if (f) { + f.lastIndex = a.lastIndex; + y = c.call(f, e); + a.lastIndex = f.lastIndex; + return y; + } + var u = x.groups; + var v = j && a.sticky; + var d = o.call(a); + var m = a.source; + var w = 0; + var s = e; + if (v) { + d = d.replace("y", ""); + if (d.indexOf("g") === -1) { + d += "g"; + } + s = e.slice(a.lastIndex); + if (a.lastIndex > 0 && (!a.multiline || (a.multiline && e.charAt(a.lastIndex - 1) !== "\n"))) { + m = "(?: " + m + ")"; + s = " " + s; + w++; + } + g = new RegExp("^(?:" + m + ")", d); + } + if (k) { + g = new RegExp("^" + m + "$(?!\\s)", d); + } + if (i) z = a.lastIndex; + b = h.call(v ? g : a, s); + if (v) { + if (b) { + b.input = b.input.slice(w); + b[0] = b[0].slice(w); + b.index = a.lastIndex; + a.lastIndex += b[0].length; + } else a.lastIndex = 0; + } else if (i && b) { + a.lastIndex = a.global ? b.index + b[0].length : z; + } + if (k && b && b.length > 1) { + r.call(b[0], g, function() { + for(l = 1; l < arguments.length - 2; l++){ + if (arguments[l] === undefined) b[l] = undefined; + } + }); + } + if (b && u) { + b.groups = A = p(null); + for(l = 0; l < u.length; l++){ + t = u[l]; + A[t[0]] = b[t[1]]; + } + } + return b; + }; + } + d.exports = c; + }, + 40697: function(a, c, b) { + "use strict"; + var d = b(83941); + a.exports = function() { + var b = d(this); + var a = ""; + if (b.global) a += "g"; + if (b.ignoreCase) a += "i"; + if (b.multiline) a += "m"; + if (b.dotAll) a += "s"; + if (b.unicode) a += "u"; + if (b.sticky) a += "y"; + return a; + }; + }, + 44725: function(e, a, b) { + var c = b(60232); + var d = b(19514); + var f = d.RegExp; + a.UNSUPPORTED_Y = c(function() { + var a = f("a", "y"); + a.lastIndex = 2; + return a.exec("abcd") != null; + }); + a.BROKEN_CARET = c(function() { + var a = f("^r", "gy"); + a.lastIndex = 2; + return a.exec("str") != null; + }); + }, + 76740: function(b, e, a) { + var c = a(60232); + var d = a(19514); + var f = d.RegExp; + b.exports = c(function() { + var a = f(".", "s"); + return !(a.dotAll && a.exec("\n") && a.flags === "s"); + }); + }, + 23564: function(b, e, a) { + var c = a(60232); + var d = a(19514); + var f = d.RegExp; + b.exports = c(function() { + var a = f("(?b)", "g"); + return (a.exec("b").groups.a !== "b" || "b".replace(a, "$c") !== "bc"); + }); + }, + 79602: function(a) { + a.exports = function(a) { + if (a == undefined) throw TypeError("Can't call method on " + a); + return a; + }; + }, + 79884: function(a) { + a.exports = Object.is || function c(a, b) { + return a === b ? a !== 0 || 1 / a === 1 / b : a != a && b != b; + }; + }, + 65933: function(a, c, b) { + var d = b(19514); + a.exports = function(b, a) { + try { + Object.defineProperty(d, b, { + value: a, + configurable: true, + writable: true + }); + } catch (c) { + d[b] = a; + } + return a; + }; + }, + 53988: function(b, d, a) { + "use strict"; + var e = a(44990); + var f = a(94770); + var c = a(81019); + var g = a(87122); + var h = c("species"); + b.exports = function(b) { + var a = e(b); + var c = f.f; + if (g && a && !a[h]) { + c(a, h, { + configurable: true, + get: function() { + return this; + } + }); + } + }; + }, + 77875: function(b, d, a) { + var e = a(94770).f; + var f = a(1521); + var c = a(81019); + var g = c("toStringTag"); + b.exports = function(a, b, c) { + if (a && !f((a = c ? a : a.prototype), g)) { + e(a, g, { + configurable: true, + value: b + }); + } + }; + }, + 16735: function(b, d, a) { + var c = a(61011); + var e = a(67045); + var f = c("keys"); + b.exports = function(a) { + return f[a] || (f[a] = e(a)); + }; + }, + 88986: function(c, g, a) { + var d = a(19514); + var e = a(65933); + var b = "__core-js_shared__"; + var f = d[b] || e(b, {}); + c.exports = f; + }, + 61011: function(b, d, a) { + var c = a(80627); + var e = a(88986); + (b.exports = function(a, b) { + return (e[a] || (e[a] = b !== undefined ? b : {})); + })("versions", []).push({ + version: "3.18.0", + mode: c ? "pure" : "global", + copyright: "© 2021 Denis Pushkarev (zloirock.ru)" + }); + }, + 94850: function(b, d, a) { + var e = a(83941); + var f = a(36381); + var c = a(81019); + var g = c("species"); + b.exports = function(c, d) { + var a = e(c).constructor; + var b; + return a === undefined || (b = e(a)[g]) == undefined ? d : f(b); + }; + }, + 49324: function(a, c, b) { + var d = b(60232); + a.exports = function(a) { + return d(function() { + var b = ""[a]('"'); + return (b !== b.toLowerCase() || b.split('"').length > 3); + }); + }; + }, + 88668: function(c, d, a) { + var e = a(86361); + var f = a(72729); + var g = a(79602); + var b = function(a) { + return function(j, k) { + var c = f(g(j)); + var b = e(k); + var i = c.length; + var d, h; + if (b < 0 || b >= i) return a ? "" : undefined; + d = c.charCodeAt(b); + return d < 0xd800 || d > 0xdbff || b + 1 === i || (h = c.charCodeAt(b + 1)) < 0xdc00 || h > 0xdfff ? a ? c.charAt(b) : d : a ? c.slice(b, b + 2) : ((d - 0xd800) << 10) + (h - 0xdc00) + 0x10000; + }; + }; + c.exports = { + codeAt: b(false), + charAt: b(true) + }; + }, + 67110: function(a, d, b) { + var c = b(59116); + a.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(c); + }, + 19795: function(c, d, a) { + var e = a(31998); + var f = a(72729); + var g = a(86974); + var h = a(79602); + var i = Math.ceil; + var b = function(a) { + return function(n, o, k) { + var c = f(h(n)); + var l = c.length; + var j = k === undefined ? " " : f(k); + var m = e(o); + var d, b; + if (m <= l || j == "") return c; + d = m - l; + b = g.call(j, i(d / j.length)); + if (b.length > d) b = b.slice(0, d); + return a ? c + b : b + c; + }; + }; + c.exports = { + start: b(false), + end: b(true) + }; + }, + 41075: function(a) { + "use strict"; + var d = 2147483647; + var b = 36; + var c = 1; + var e = 26; + var f = 38; + var g = 700; + var h = 72; + var i = 128; + var j = "-"; + var k = /[^\0-\u007E]/; + var l = /[.\u3002\uFF0E\uFF61]/g; + var m = "Overflow: input needs wider integers to process"; + var n = b - c; + var o = Math.floor; + var p = String.fromCharCode; + var q = function(d) { + var c = []; + var a = 0; + var e = d.length; + while(a < e){ + var b = d.charCodeAt(a++); + if (b >= 0xd800 && b <= 0xdbff && a < e) { + var f = d.charCodeAt(a++); + if ((f & 0xfc00) == 0xdc00) { + c.push(((b & 0x3ff) << 10) + (f & 0x3ff) + 0x10000); + } else { + c.push(b); + a--; + } + } else { + c.push(b); + } + } + return c; + }; + var r = function(a) { + return a + 22 + 75 * (a < 26); + }; + var s = function(a, d, h) { + var c = 0; + a = h ? o(a / g) : a >> 1; + a += o(a / d); + for(; a > (n * e) >> 1; c += b){ + a = o(a / n); + } + return o(c + ((n + 1) * a) / (a + f)); + }; + var t = function(g) { + var n = []; + g = q(g); + var D = g.length; + var k = i; + var l = 0; + var u = h; + var a, f; + for(a = 0; a < g.length; a++){ + f = g[a]; + if (f < 0x80) { + n.push(p(f)); + } + } + var z = n.length; + var v = z; + if (z) { + n.push(j); + } + while(v < D){ + var t = d; + for(a = 0; a < g.length; a++){ + f = g[a]; + if (f >= k && f < t) { + t = f; + } + } + var A = v + 1; + if (t - k > o((d - l) / A)) { + throw RangeError(m); + } + l += (t - k) * A; + k = t; + for(a = 0; a < g.length; a++){ + f = g[a]; + if (f < k && ++l > d) { + throw RangeError(m); + } + if (f == k) { + var w = l; + for(var x = b;; x += b){ + var y = x <= u ? c : x >= u + e ? e : x - u; + if (w < y) break; + var B = w - y; + var C = b - y; + n.push(p(r(y + (B % C)))); + w = o(B / C); + } + n.push(p(r(w))); + u = s(l, A, v == z); + l = 0; + ++v; + } + } + ++l; + ++k; + } + return n.join(""); + }; + a.exports = function(e) { + var c = []; + var d = e.toLowerCase().replace(l, "\u002E").split("."); + var a, b; + for(a = 0; a < d.length; a++){ + b = d[a]; + c.push(k.test(b) ? "xn--" + t(b) : b); + } + return c.join("."); + }; + }, + 86974: function(b, c, a) { + "use strict"; + var d = a(86361); + var e = a(72729); + var f = a(79602); + b.exports = function h(g) { + var b = e(f(this)); + var c = ""; + var a = d(g); + if (a < 0 || a == Infinity) throw RangeError("Wrong number of repetitions"); + for(; a > 0; (a >>>= 1) && (b += b))if (a & 1) c += b; + return c; + }; + }, + 10106: function(b, c, a) { + var d = a(25160).PROPER; + var e = a(60232); + var f = a(88443); + var g = "\u200B\u0085\u180E"; + b.exports = function(a) { + return e(function() { + return (!!f[a]() || g[a]() !== g || (d && f[a].name !== a)); + }); + }; + }, + 62034: function(d, f, b) { + var g = b(79602); + var h = b(72729); + var e = b(88443); + var a = "[" + e + "]"; + var i = RegExp("^" + a + a + "*"); + var j = RegExp(a + a + "*$"); + var c = function(a) { + return function(c) { + var b = h(g(c)); + if (a & 1) b = b.replace(i, ""); + if (a & 2) b = b.replace(j, ""); + return b; + }; + }; + d.exports = { + start: c(1), + end: c(2), + trim: c(3) + }; + }, + 46660: function(m, u, b) { + var a = b(19514); + var n = b(67106); + var o = b(60232); + var p = b(59561); + var v = b(40969); + var q = b(28554); + var r = b(80125); + var s = b(96590); + var d = a.setImmediate; + var e = a.clearImmediate; + var w = a.process; + var i = a.MessageChannel; + var j = a.Dispatch; + var x = 0; + var y = {}; + var t = "onreadystatechange"; + var f, c, g, h; + try { + f = a.location; + } catch (z) {} + var A = function(a) { + if (y.hasOwnProperty(a)) { + var b = y[a]; + delete y[a]; + b(); + } + }; + var B = function(a) { + return function() { + A(a); + }; + }; + var k = function(a) { + A(a.data); + }; + var l = function(b) { + a.postMessage(String(b), f.protocol + "//" + f.host); + }; + if (!d || !e) { + d = function e(f) { + var b = []; + var d = arguments.length; + var a = 1; + while(d > a)b.push(arguments[a++]); + y[++x] = function() { + (n(f) ? f : Function(f)).apply(undefined, b); + }; + c(x); + return x; + }; + e = function b(a) { + delete y[a]; + }; + if (s) { + c = function(a) { + w.nextTick(B(a)); + }; + } else if (j && j.now) { + c = function(a) { + j.now(B(a)); + }; + } else if (i && !r) { + g = new i(); + h = g.port2; + g.port1.onmessage = k; + c = p(h.postMessage, h, 1); + } else if (a.addEventListener && n(a.postMessage) && !a.importScripts && f && f.protocol !== "file:" && !o(l)) { + c = l; + a.addEventListener("message", k, false); + } else if (t in q("script")) { + c = function(a) { + v.appendChild(q("script"))[t] = function() { + v.removeChild(this); + A(a); + }; + }; + } else { + c = function(a) { + setTimeout(B(a), 0); + }; + } + } + m.exports = { + set: d, + clear: e + }; + }, + 44378: function(a) { + var b = (1.0).valueOf; + a.exports = function(a) { + return b.call(a); + }; + }, + 62965: function(a, c, b) { + var d = b(86361); + var e = Math.max; + var f = Math.min; + a.exports = function(c, b) { + var a = d(c); + return a < 0 ? e(a + b, 0) : f(a, b); + }; + }, + 42026: function(b, c, a) { + var d = a(86361); + var e = a(31998); + b.exports = function(a) { + if (a === undefined) return 0; + var b = d(a); + var c = e(b); + if (b !== c) throw RangeError("Wrong length or index"); + return c; + }; + }, + 74981: function(b, c, a) { + var d = a(51478); + var e = a(79602); + b.exports = function(a) { + return d(e(a)); + }; + }, + 86361: function(a) { + var b = Math.ceil; + var c = Math.floor; + a.exports = function(a) { + return isNaN((a = +a)) ? 0 : (a > 0 ? c : b)(a); + }; + }, + 31998: function(a, c, b) { + var d = b(86361); + var e = Math.min; + a.exports = function(a) { + return a > 0 ? e(d(a), 0x1fffffffffffff) : 0; + }; + }, + 89343: function(a, c, b) { + var d = b(79602); + a.exports = function(a) { + return Object(d(a)); + }; + }, + 11729: function(a, c, b) { + var d = b(13819); + a.exports = function(b, c) { + var a = d(b); + if (a % c) throw RangeError("Wrong offset"); + return a; + }; + }, + 13819: function(a, c, b) { + var d = b(86361); + a.exports = function(b) { + var a = d(b); + if (a < 0) throw RangeError("The argument can't be less than 0"); + return a; + }; + }, + 41851: function(b, d, a) { + var e = a(39817); + var f = a(17679); + var g = a(84316); + var h = a(68023); + var c = a(81019); + var i = c("toPrimitive"); + b.exports = function(a, b) { + if (!e(a) || f(a)) return a; + var d = g(a, i); + var c; + if (d) { + if (b === undefined) b = "default"; + c = d.call(a, b); + if (!e(c) || f(c)) return c; + throw TypeError("Can't convert object to primitive value"); + } + if (b === undefined) b = "number"; + return h(a, b); + }; + }, + 10482: function(b, c, a) { + var d = a(41851); + var e = a(17679); + b.exports = function(b) { + var a = d(b, "string"); + return e(a) ? a : String(a); + }; + }, + 42716: function(b, f, c) { + var d = c(81019); + var e = d("toStringTag"); + var a = {}; + a[e] = "z"; + b.exports = String(a) === "[object z]"; + }, + 72729: function(a, c, b) { + var d = b(85983); + a.exports = function(a) { + if (d(a) === "Symbol") throw TypeError("Cannot convert a Symbol value to a string"); + return String(a); + }; + }, + 36725: function(a) { + a.exports = function(a) { + try { + return String(a); + } catch (b) { + return "Object"; + } + }; + }, + 58158: function(e, p, a) { + "use strict"; + var m = a(35437); + var n = a(19514); + var o = a(87122); + var q = a(10158); + var b = a(4351); + var f = a(44757); + var r = a(51819); + var s = a(93608); + var t = a(48181); + var u = a(73156); + var v = a(31998); + var w = a(42026); + var x = a(11729); + var y = a(10482); + var z = a(1521); + var A = a(85983); + var B = a(39817); + var C = a(17679); + var D = a(18255); + var E = a(59057); + var F = a(13463).f; + var G = a(26471); + var H = a(48499).forEach; + var I = a(53988); + var g = a(94770); + var h = a(24722); + var i = a(44670); + var J = a(45564); + var K = i.get; + var L = i.set; + var M = g.f; + var N = h.f; + var O = Math.round; + var P = n.RangeError; + var Q = f.ArrayBuffer; + var R = f.DataView; + var j = b.NATIVE_ARRAY_BUFFER_VIEWS; + var S = b.TYPED_ARRAY_CONSTRUCTOR; + var T = b.TYPED_ARRAY_TAG; + var U = b.TypedArray; + var c = b.TypedArrayPrototype; + var V = b.aTypedArrayConstructor; + var W = b.isTypedArray; + var X = "BYTES_PER_ELEMENT"; + var Y = "Wrong length"; + var Z = function(e, b) { + var a = 0; + var c = b.length; + var d = new (V(e))(c); + while(c > a)d[a] = b[a++]; + return d; + }; + var d = function(a, b) { + M(a, b, { + get: function() { + return K(this)[b]; + } + }); + }; + var $ = function(a) { + var b; + return (a instanceof Q || (b = A(a)) == "ArrayBuffer" || b == "SharedArrayBuffer"); + }; + var _ = function(b, a) { + return (W(b) && !C(a) && a in b && u(+a) && a >= 0); + }; + var k = function c(b, a) { + a = y(a); + return _(b, a) ? s(2, b[a]) : N(b, a); + }; + var l = function d(c, b, a) { + b = y(b); + if (_(c, b) && B(a) && z(a, "value") && !z(a, "get") && !z(a, "set") && !a.configurable && (!z(a, "writable") || a.writable) && (!z(a, "enumerable") || a.enumerable)) { + c[b] = a.value; + return c; + } + return M(c, b, a); + }; + if (o) { + if (!j) { + h.f = k; + g.f = l; + d(c, "buffer"); + d(c, "byteOffset"); + d(c, "byteLength"); + d(c, "length"); + } + m({ + target: "Object", + stat: true, + forced: !j + }, { + getOwnPropertyDescriptor: k, + defineProperty: l + }); + e.exports = function(d, g, k) { + var h = d.match(/\d+$/)[0] / 8; + var e = d + (k ? "Clamped" : "") + "Array"; + var l = "get" + d; + var o = "set" + d; + var f = n[e]; + var a = f; + var b = a && a.prototype; + var i = {}; + var p = function(b, c) { + var a = K(b); + return a.view[l](c * h + a.byteOffset, true); + }; + var s = function(c, d, a) { + var b = K(c); + if (k) a = (a = O(a)) < 0 ? 0 : a > 0xff ? 0xff : a & 0xff; + b.view[o](d * h + b.byteOffset, a, true); + }; + var u = function(a, b) { + M(a, b, { + get: function() { + return p(this, b); + }, + set: function(a) { + return s(this, b, a); + }, + enumerable: true + }); + }; + if (!j) { + a = g(function(i, b, m, k) { + r(i, a, e); + var l = 0; + var f = 0; + var g, c, d; + if (!B(b)) { + d = w(b); + c = d * h; + g = new Q(c); + } else if ($(b)) { + g = b; + f = x(m, h); + var j = b.byteLength; + if (k === undefined) { + if (j % h) throw P(Y); + c = j - f; + if (c < 0) throw P(Y); + } else { + c = v(k) * h; + if (c + f > j) throw P(Y); + } + d = c / h; + } else if (W(b)) { + return Z(a, b); + } else { + return G.call(a, b); + } + L(i, { + buffer: g, + byteOffset: f, + byteLength: c, + length: d, + view: new R(g) + }); + while(l < d)u(i, l++); + }); + if (E) E(a, U); + b = a.prototype = D(c); + } else if (q) { + a = g(function(b, c, d, g) { + r(b, a, e); + return J((function() { + if (!B(c)) return new f(w(c)); + if ($(c)) return g !== undefined ? new f(c, x(d, h), g) : d !== undefined ? new f(c, x(d, h)) : new f(c); + if (W(c)) return Z(a, c); + return G.call(a, c); + })(), b, a); + }); + if (E) E(a, U); + H(F(f), function(b) { + if (!(b in a)) { + t(a, b, f[b]); + } + }); + a.prototype = b; + } + if (b.constructor !== a) { + t(b, "constructor", a); + } + t(b, S, a); + if (T) { + t(b, T, e); + } + i[e] = a; + m({ + global: true, + forced: a != f, + sham: !j + }, i); + if (!(X in a)) { + t(a, X, h); + } + if (!(X in b)) { + t(b, X, h); + } + I(e); + }; + } else e.exports = function() {}; + }, + 10158: function(d, g, a) { + var c = a(19514); + var b = a(60232); + var e = a(34124); + var f = a(4351).NATIVE_ARRAY_BUFFER_VIEWS; + var h = c.ArrayBuffer; + var i = c.Int8Array; + d.exports = !f || !b(function() { + i(1); + }) || !b(function() { + new i(-1); + }) || !e(function(a) { + new i(); + new i(null); + new i(1.5); + new i(a); + }, true) || b(function() { + return (new i(new h(2), 1, undefined).length !== 1); + }); + }, + 38671: function(b, c, a) { + var d = a(21016); + var e = a(50554); + b.exports = function(a, b) { + return d(e(a), b); + }; + }, + 26471: function(b, c, a) { + var d = a(36381); + var e = a(89343); + var f = a(31998); + var g = a(11661); + var h = a(99422); + var i = a(58011); + var j = a(59561); + var k = a(4351).aTypedArrayConstructor; + b.exports = function v(t) { + var u = d(this); + var a = e(t); + var p = arguments.length; + var c = p > 1 ? arguments[1] : undefined; + var q = c !== undefined; + var l = h(a); + var b, m, n, r, o, s; + if (l && !i(l)) { + o = g(a, l); + s = o.next; + a = []; + while(!(r = s.call(o)).done){ + a.push(r.value); + } + } + if (q && p > 2) { + c = j(c, arguments[2], 2); + } + m = f(a.length); + n = new (k(u))(m); + for(b = 0; m > b; b++){ + n[b] = q ? c(a[b], b) : a[b]; + } + return n; + }; + }, + 50554: function(c, d, a) { + var b = a(4351); + var e = a(94850); + var f = b.TYPED_ARRAY_CONSTRUCTOR; + var g = b.aTypedArrayConstructor; + c.exports = function(a) { + return g(e(a, a[f])); + }; + }, + 67045: function(a) { + var b = 0; + var c = Math.random(); + a.exports = function(a) { + return ("Symbol(" + String(a === undefined ? "" : a) + ")_" + (++b + c).toString(36)); + }; + }, + 93102: function(a, d, b) { + var c = b(11382); + a.exports = c && !Symbol.sham && typeof Symbol.iterator == "symbol"; + }, + 52301: function(d, a, b) { + var c = b(81019); + a.f = c; + }, + 81019: function(c, h, a) { + var d = a(19514); + var e = a(61011); + var i = a(1521); + var f = a(67045); + var j = a(11382); + var g = a(93102); + var k = e("wks"); + var b = d.Symbol; + var l = g ? b : (b && b.withoutSetter) || f; + c.exports = function(a) { + if (!i(k, a) || !(j || typeof k[a] == "string")) { + if (j && i(b, a)) { + k[a] = b[a]; + } else { + k[a] = l("Symbol." + a); + } + } + return k[a]; + }; + }, + 88443: function(a) { + a.exports = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002" + "\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; + }, + 23895: function(f, g, a) { + "use strict"; + var d = a(35437); + var h = a(39311); + var i = a(59057); + var e = a(18255); + var j = a(48181); + var b = a(93608); + var k = a(7261); + var l = a(72729); + var c = function f(e, b) { + var a = this; + if (!(a instanceof c)) return new c(e, b); + if (i) { + a = i(new Error(undefined), h(a)); + } + if (b !== undefined) j(a, "message", l(b)); + var d = []; + k(e, d.push, { + that: d + }); + j(a, "errors", d); + return a; + }; + c.prototype = e(Error.prototype, { + constructor: b(5, c), + message: b(5, ""), + name: b(5, "AggregateError") + }); + d({ + global: true + }, { + AggregateError: c + }); + }, + 39803: function(i, j, a) { + "use strict"; + var d = a(35437); + var e = a(19514); + var f = a(44757); + var g = a(53988); + var b = "ArrayBuffer"; + var c = f[b]; + var h = e[b]; + d({ + global: true, + forced: h !== c + }, { + ArrayBuffer: c + }); + g(b); + }, + 37351: function(e, f, a) { + var c = a(35437); + var b = a(4351); + var d = b.NATIVE_ARRAY_BUFFER_VIEWS; + c({ + target: "ArrayBuffer", + stat: true, + forced: !d + }, { + isView: b.isView + }); + }, + 96837: function(g, h, a) { + "use strict"; + var c = a(35437); + var d = a(60232); + var b = a(44757); + var i = a(83941); + var j = a(62965); + var k = a(31998); + var l = a(94850); + var e = b.ArrayBuffer; + var m = b.DataView; + var n = e.prototype.slice; + var f = d(function() { + return !new e(2).slice(1, undefined).byteLength; + }); + c({ + target: "ArrayBuffer", + proto: true, + unsafe: true, + forced: f + }, { + slice: function q(d, a) { + if (n !== undefined && a === undefined) { + return n.call(i(this), d); + } + var b = i(this).byteLength; + var c = j(d, b); + var f = j(a === undefined ? b : a, b); + var g = new (l(this, e))(k(f - c)); + var h = new m(this); + var o = new m(g); + var p = 0; + while(c < f){ + o.setUint8(p++, h.getUint8(c++)); + } + return g; + } + }); + }, + 82546: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89343); + var g = a(31998); + var h = a(86361); + var c = a(23140); + b({ + target: "Array", + proto: true + }, { + at: function i(e) { + var c = f(this); + var d = g(c.length); + var a = h(e); + var b = a >= 0 ? a : d + a; + return b < 0 || b >= d ? undefined : c[b]; + } + }); + c("at"); + }, + 72996: function(j, k, a) { + "use strict"; + var b = a(35437); + var c = a(60232); + var l = a(63079); + var m = a(39817); + var n = a(89343); + var o = a(31998); + var p = a(47267); + var q = a(96582); + var d = a(28855); + var e = a(81019); + var f = a(50661); + var r = e("isConcatSpreadable"); + var s = 0x1fffffffffffff; + var t = "Maximum allowed index exceeded"; + var g = f >= 51 || !c(function() { + var a = []; + a[r] = false; + return a.concat()[0] !== a; + }); + var h = d("concat"); + var u = function(a) { + if (!m(a)) return false; + var b = a[r]; + return b !== undefined ? !!b : l(a); + }; + var i = !g || !h; + b({ + target: "Array", + proto: true, + forced: i + }, { + concat: function i(j) { + var g = n(this); + var e = q(g, 0); + var a = 0; + var c, d, h, f, b; + for(c = -1, h = arguments.length; c < h; c++){ + b = c === -1 ? g : arguments[c]; + if (u(b)) { + f = o(b.length); + if (a + f > s) throw TypeError(t); + for(d = 0; d < f; d++, a++)if (d in b) p(e, a, b[d]); + } else { + if (a >= s) throw TypeError(t); + p(e, a++, b); + } + } + e.length = a; + return e; + } + }); + }, + 27668: function(e, f, a) { + var b = a(35437); + var c = a(8077); + var d = a(23140); + b({ + target: "Array", + proto: true + }, { + copyWithin: c + }); + d("copyWithin"); + }, + 62202: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(48499).every; + var c = a(12707); + var d = c("every"); + b({ + target: "Array", + proto: true, + forced: !d + }, { + every: function b(a) { + return g(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 80500: function(e, f, a) { + var b = a(35437); + var c = a(50270); + var d = a(23140); + b({ + target: "Array", + proto: true + }, { + fill: c + }); + d("fill"); + }, + 26648: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(48499).filter; + var c = a(28855); + var d = c("filter"); + b({ + target: "Array", + proto: true, + forced: !d + }, { + filter: function b(a) { + return g(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 75202: function(f, g, a) { + "use strict"; + var c = a(35437); + var h = a(48499).findIndex; + var d = a(23140); + var b = "findIndex"; + var e = true; + if (b in []) Array(1)[b](function() { + e = false; + }); + c({ + target: "Array", + proto: true, + forced: e + }, { + findIndex: function b(a) { + return h(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + d(b); + }, + 37742: function(f, g, a) { + "use strict"; + var c = a(35437); + var h = a(48499).find; + var d = a(23140); + var b = "find"; + var e = true; + if (b in []) Array(1)[b](function() { + e = false; + }); + c({ + target: "Array", + proto: true, + forced: e + }, { + find: function b(a) { + return h(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + d(b); + }, + 8887: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(31289); + var f = a(74618); + var g = a(89343); + var h = a(31998); + var i = a(96582); + b({ + target: "Array", + proto: true + }, { + flatMap: function j(c) { + var a = g(this); + var d = h(a.length); + var b; + f(c); + b = i(a, 0); + b.length = e(b, a, a, d, 0, 1, c, arguments.length > 1 ? arguments[1] : undefined); + return b; + } + }); + }, + 87334: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(31289); + var f = a(89343); + var g = a(31998); + var h = a(86361); + var i = a(96582); + b({ + target: "Array", + proto: true + }, { + flat: function j() { + var c = arguments.length ? arguments[0] : undefined; + var a = f(this); + var d = g(a.length); + var b = i(a, 0); + b.length = e(b, a, a, d, 0, c === undefined ? 1 : h(c)); + return b; + } + }); + }, + 10936: function(d, e, a) { + "use strict"; + var c = a(35437); + var b = a(85811); + c({ + target: "Array", + proto: true, + forced: [].forEach != b + }, { + forEach: b + }); + }, + 33362: function(f, g, a) { + var b = a(35437); + var c = a(83581); + var d = a(34124); + var e = !d(function(a) { + Array.from(a); + }); + b({ + target: "Array", + stat: true, + forced: e + }, { + from: c + }); + }, + 22928: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(44517).includes; + var c = a(23140); + b({ + target: "Array", + proto: true + }, { + includes: function b(a) { + return f(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + c("includes"); + }, + 66507: function(g, h, a) { + "use strict"; + var b = a(35437); + var i = a(44517).indexOf; + var c = a(12707); + var d = [].indexOf; + var e = !!d && 1 / [ + 1 + ].indexOf(1, -0) < 0; + var f = c("indexOf"); + b({ + target: "Array", + proto: true, + forced: e || !f + }, { + indexOf: function b(a) { + return e ? d.apply(this, arguments) || 0 : i(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 17287: function(d, e, a) { + var b = a(35437); + var c = a(63079); + b({ + target: "Array", + stat: true + }, { + isArray: c + }); + }, + 17384: function(e, h, a) { + "use strict"; + var i = a(74981); + var b = a(23140); + var c = a(25463); + var d = a(44670); + var f = a(7166); + var g = "Array Iterator"; + var j = d.set; + var k = d.getterFor(g); + e.exports = f(Array, "Array", function(a, b) { + j(this, { + type: g, + target: i(a), + index: 0, + kind: b + }); + }, function() { + var b = k(this); + var c = b.target; + var d = b.kind; + var a = b.index++; + if (!c || a >= c.length) { + b.target = undefined; + return { + value: undefined, + done: true + }; + } + if (d == "keys") return { + value: a, + done: false + }; + if (d == "values") return { + value: c[a], + done: false + }; + return { + value: [ + a, + c[a] + ], + done: false + }; + }, "values"); + c.Arguments = c.Array; + b("keys"); + b("values"); + b("entries"); + }, + 5607: function(g, h, a) { + "use strict"; + var b = a(35437); + var c = a(51478); + var i = a(74981); + var d = a(12707); + var j = [].join; + var e = c != Object; + var f = d("join", ","); + b({ + target: "Array", + proto: true, + forced: e || !f + }, { + join: function b(a) { + return j.call(i(this), a === undefined ? "," : a); + } + }); + }, + 3334: function(d, e, a) { + var c = a(35437); + var b = a(74514); + c({ + target: "Array", + proto: true, + forced: b !== [].lastIndexOf + }, { + lastIndexOf: b + }); + }, + 19994: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(48499).map; + var c = a(28855); + var d = c("map"); + b({ + target: "Array", + proto: true, + forced: !d + }, { + map: function b(a) { + return g(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 84279: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(60232); + var g = a(17026); + var h = a(47267); + var d = c(function() { + function a() {} + return !(Array.of.call(a) instanceof a); + }); + b({ + target: "Array", + stat: true, + forced: d + }, { + of: function d() { + var a = 0; + var b = arguments.length; + var c = new (g(this) ? this : Array)(b); + while(b > a)h(c, a, arguments[a++]); + c.length = b; + return c; + } + }); + }, + 54706: function(h, i, a) { + "use strict"; + var c = a(35437); + var j = a(70591).right; + var d = a(12707); + var b = a(50661); + var e = a(96590); + var f = d("reduceRight"); + var g = !e && b > 79 && b < 83; + c({ + target: "Array", + proto: true, + forced: !f || g + }, { + reduceRight: function b(a) { + return j(this, a, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 27849: function(h, i, a) { + "use strict"; + var c = a(35437); + var j = a(70591).left; + var d = a(12707); + var b = a(50661); + var e = a(96590); + var f = d("reduce"); + var g = !e && b > 79 && b < 83; + c({ + target: "Array", + proto: true, + forced: !f || g + }, { + reduce: function b(a) { + return j(this, a, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 165: function(d, e, a) { + "use strict"; + var c = a(35437); + var f = a(63079); + var g = [].reverse; + var b = [ + 1, + 2 + ]; + c({ + target: "Array", + proto: true, + forced: String(b) === String(b.reverse()) + }, { + reverse: function a() { + if (f(this)) this.length = this.length; + return g.call(this); + } + }); + }, + 33156: function(f, g, a) { + "use strict"; + var b = a(35437); + var h = a(63079); + var i = a(17026); + var j = a(39817); + var k = a(62965); + var l = a(31998); + var m = a(74981); + var n = a(47267); + var c = a(81019); + var d = a(28855); + var e = d("slice"); + var o = c("species"); + var p = [].slice; + var q = Math.max; + b({ + target: "Array", + proto: true, + forced: !e + }, { + slice: function t(s, r) { + var b = m(this); + var f = l(b.length); + var c = k(s, f); + var g = k(r === undefined ? f : r, f); + var a, d, e; + if (h(b)) { + a = b.constructor; + if (i(a) && (a === Array || h(a.prototype))) { + a = undefined; + } else if (j(a)) { + a = a[o]; + if (a === null) a = undefined; + } + if (a === Array || a === undefined) { + return p.call(b, c, g); + } + } + d = new (a === undefined ? Array : a)(q(g - c, 0)); + for(e = 0; c < g; c++, e++)if (c in b) n(d, e, b[c]); + d.length = e; + return d; + } + }); + }, + 7401: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(48499).some; + var c = a(12707); + var d = c("some"); + b({ + target: "Array", + proto: true, + forced: !d + }, { + some: function b(a) { + return g(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 52657: function(k, l, a) { + "use strict"; + var c = a(35437); + var m = a(74618); + var n = a(89343); + var o = a(31998); + var p = a(72729); + var b = a(60232); + var q = a(1978); + var d = a(12707); + var r = a(15546); + var s = a(13497); + var t = a(50661); + var u = a(34884); + var e = []; + var v = e.sort; + var f = b(function() { + e.sort(undefined); + }); + var g = b(function() { + e.sort(null); + }); + var h = d("sort"); + var i = !b(function() { + if (t) return t < 70; + if (r && r > 3) return; + if (s) return true; + if (u) return u < 603; + var d = ""; + var b, c, f, a; + for(b = 65; b < 76; b++){ + c = String.fromCharCode(b); + switch(b){ + case 66: + case 69: + case 70: + case 72: + f = 3; + break; + case 68: + case 71: + f = 4; + break; + default: + f = 2; + } + for(a = 0; a < 47; a++){ + e.push({ + k: c + a, + v: f + }); + } + } + e.sort(function(a, b) { + return b.v - a.v; + }); + for(a = 0; a < e.length; a++){ + c = e[a].k.charAt(0); + if (d.charAt(d.length - 1) !== c) d += c; + } + return d !== "DGBEFHACIJK"; + }); + var j = f || !g || !h || !i; + var w = function(a) { + return function(b, c) { + if (c === undefined) return -1; + if (b === undefined) return 1; + if (a !== undefined) return +a(b, c) || 0; + return p(b) > p(c) ? 1 : -1; + }; + }; + c({ + target: "Array", + proto: true, + forced: j + }, { + sort: function g(c) { + if (c !== undefined) m(c); + var b = n(this); + if (i) return c === undefined ? v.call(b) : v.call(b, c); + var d = []; + var e = o(b.length); + var f, a; + for(a = 0; a < e; a++){ + if (a in b) d.push(b[a]); + } + d = q(d, w(c)); + f = d.length; + a = 0; + while(a < f)b[a] = d[a++]; + while(a < e)delete b[a++]; + return b; + } + }); + }, + 3263: function(c, d, a) { + var b = a(53988); + b("Array"); + }, + 87641: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(62965); + var h = a(86361); + var i = a(31998); + var j = a(89343); + var k = a(96582); + var l = a(47267); + var c = a(28855); + var d = c("splice"); + var m = Math.max; + var n = Math.min; + var o = 0x1fffffffffffff; + var p = "Maximum allowed length exceeded"; + b({ + target: "Array", + proto: true, + forced: !d + }, { + splice: function w(u, v) { + var b = j(this); + var e = i(b.length); + var q = g(u, e); + var t = arguments.length; + var d, c, s, a, f, r; + if (t === 0) { + d = c = 0; + } else if (t === 1) { + d = 0; + c = e - q; + } else { + d = t - 2; + c = n(m(h(v), 0), e - q); + } + if (e + d - c > o) { + throw TypeError(p); + } + s = k(b, c); + for(a = 0; a < c; a++){ + f = q + a; + if (f in b) l(s, a, b[f]); + } + s.length = c; + if (d < c) { + for(a = q; a < e - c; a++){ + f = a + c; + r = a + d; + if (f in b) b[r] = b[f]; + else delete b[r]; + } + for(a = e; a > e - c + d; a--)delete b[a - 1]; + } else if (d > c) { + for(a = e - c; a > q; a--){ + f = a + c - 1; + r = a + d - 1; + if (f in b) b[r] = b[f]; + else delete b[r]; + } + } + for(a = 0; a < d; a++){ + b[a + q] = arguments[a + 2]; + } + b.length = e - c + d; + return s; + } + }); + }, + 67256: function(c, d, a) { + var b = a(23140); + b("flatMap"); + }, + 4251: function(c, d, a) { + var b = a(23140); + b("flat"); + }, + 92750: function(e, f, a) { + var b = a(35437); + var c = a(44757); + var d = a(88692); + b({ + global: true, + forced: !d + }, { + DataView: c.DataView + }); + }, + 18100: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(60232); + var d = c(function() { + return new Date(16e11).getYear() !== 120; + }); + var g = Date.prototype.getFullYear; + b({ + target: "Date", + proto: true, + forced: d + }, { + getYear: function a() { + return g.call(this) - 1900; + } + }); + }, + 68752: function(c, d, a) { + var b = a(35437); + b({ + target: "Date", + stat: true + }, { + now: function a() { + return new Date().getTime(); + } + }); + }, + 98203: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(86361); + var f = Date.prototype.getTime; + var g = Date.prototype.setFullYear; + b({ + target: "Date", + proto: true + }, { + setYear: function d(b) { + f.call(this); + var a = e(b); + var c = 0 <= a && a <= 99 ? a + 1900 : a; + return g.call(this, c); + } + }); + }, + 82487: function(c, d, a) { + var b = a(35437); + b({ + target: "Date", + proto: true + }, { + toGMTString: Date.prototype.toUTCString + }); + }, + 5303: function(d, e, a) { + var c = a(35437); + var b = a(50748); + c({ + target: "Date", + proto: true, + forced: Date.prototype.toISOString !== b + }, { + toISOString: b + }); + }, + 55739: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(60232); + var g = a(89343); + var h = a(41851); + var d = c(function() { + return (new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({ + toISOString: function() { + return 1; + } + }) !== 1); + }); + b({ + target: "Date", + proto: true, + forced: d + }, { + toJSON: function c(d) { + var a = g(this); + var b = h(a, "number"); + return typeof b == "number" && !isFinite(b) ? null : a.toISOString(); + } + }); + }, + 98914: function(g, h, a) { + var d = a(78109); + var e = a(6672); + var f = a(81019); + var b = f("toPrimitive"); + var c = Date.prototype; + if (!(b in c)) { + d(c, b, e); + } + }, + 11334: function(f, g, c) { + var d = c(78109); + var a = Date.prototype; + var e = "Invalid Date"; + var b = "toString"; + var h = a[b]; + var i = a.getTime; + if (String(new Date(NaN)) != e) { + d(a, b, function b() { + var a = i.call(this); + return a === a ? h.call(this) : e; + }); + } + }, + 34313: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(72729); + var f = /[\w*+\-./@]/; + var g = function(b, c) { + var a = b.toString(16); + while(a.length < c)a = "0" + a; + return a; + }; + b({ + global: true + }, { + escape: function k(i) { + var d = e(i); + var a = ""; + var j = d.length; + var h = 0; + var b, c; + while(h < j){ + b = d.charAt(h++); + if (f.test(b)) { + a += b; + } else { + c = b.charCodeAt(0); + if (c < 256) { + a += "%" + g(c, 2); + } else { + a += "%u" + g(c, 4).toUpperCase(); + } + } + } + return a; + } + }); + }, + 75542: function(d, e, a) { + var b = a(35437); + var c = a(48644); + b({ + target: "Function", + proto: true + }, { + bind: c + }); + }, + 23172: function(f, g, a) { + "use strict"; + var h = a(67106); + var i = a(39817); + var d = a(94770); + var j = a(39311); + var e = a(81019); + var b = e("hasInstance"); + var c = Function.prototype; + if (!(b in c)) { + d.f(c, b, { + value: function(a) { + if (!h(this) || !i(a)) return false; + if (!i(this.prototype)) return a instanceof this; + while((a = j(a)))if (this.prototype === a) return true; + return false; + } + }); + } + }, + 88922: function(g, h, a) { + var c = a(87122); + var d = a(25160).EXISTS; + var e = a(94770).f; + var b = Function.prototype; + var i = b.toString; + var j = /^\s*function ([^ (]*)/; + var f = "name"; + if (c && !d) { + e(b, f, { + configurable: true, + get: function() { + try { + return i.call(this).match(j)[1]; + } catch (a) { + return ""; + } + } + }); + } + }, + 39692: function(d, e, a) { + var b = a(35437); + var c = a(19514); + b({ + global: true + }, { + globalThis: c + }); + }, + 85291: function(g, h, a) { + var b = a(35437); + var c = a(44990); + var d = a(60232); + var e = c("JSON", "stringify"); + var i = /[\uD800-\uDFFF]/g; + var j = /^[\uD800-\uDBFF]$/; + var k = /^[\uDC00-\uDFFF]$/; + var l = function(a, b, c) { + var d = c.charAt(b - 1); + var e = c.charAt(b + 1); + if ((j.test(a) && !k.test(e)) || (k.test(a) && !j.test(d))) { + return "\\u" + a.charCodeAt(0).toString(16); + } + return a; + }; + var f = d(function() { + return (e("\uDF06\uD834") !== '"\\udf06\\ud834"' || e("\uDEAD") !== '"\\udead"'); + }); + if (e) { + b({ + target: "JSON", + stat: true, + forced: f + }, { + stringify: function b(c, d, f) { + var a = e.apply(null, arguments); + return typeof a == "string" ? a.replace(i, l) : a; + } + }); + } + }, + 4865: function(d, e, a) { + var b = a(19514); + var c = a(77875); + c(b.JSON, "JSON", true); + }, + 3767: function(b, e, a) { + "use strict"; + var c = a(6807); + var d = a(67318); + b.exports = c("Map", function(a) { + return function b() { + return a(this, arguments.length ? arguments[0] : undefined); + }; + }, d); + }, + 28499: function(e, f, b) { + var c = b(35437); + var g = b(41571); + var a = Math.acosh; + var h = Math.log; + var i = Math.sqrt; + var j = Math.LN2; + var d = !a || Math.floor(a(Number.MAX_VALUE)) != 710 || a(Infinity) != Infinity; + c({ + target: "Math", + stat: true, + forced: d + }, { + acosh: function b(a) { + return (a = +a) < 1 ? NaN : a > 94906265.62425156 ? h(a) + j : g(a - 1 + i(a - 1) * i(a + 1)); + } + }); + }, + 70233: function(e, f, b) { + var c = b(35437); + var a = Math.asinh; + var g = Math.log; + var h = Math.sqrt; + function d(a) { + return !isFinite((a = +a)) || a == 0 ? a : a < 0 ? -d(-a) : g(a + h(a * a + 1)); + } + c({ + target: "Math", + stat: true, + forced: !(a && 1 / a(0) > 0) + }, { + asinh: d + }); + }, + 5462: function(d, e, b) { + var c = b(35437); + var a = Math.atanh; + var f = Math.log; + c({ + target: "Math", + stat: true, + forced: !(a && 1 / a(-0) < 0) + }, { + atanh: function b(a) { + return (a = +a) == 0 ? a : f((1 + a) / (1 - a)) / 2; + } + }); + }, + 62918: function(c, d, a) { + var b = a(35437); + var e = a(62381); + var f = Math.abs; + var g = Math.pow; + b({ + target: "Math", + stat: true + }, { + cbrt: function b(a) { + return e((a = +a)) * g(f(a), 1 / 3); + } + }); + }, + 63730: function(c, d, a) { + var b = a(35437); + var e = Math.floor; + var f = Math.log; + var g = Math.LOG2E; + b({ + target: "Math", + stat: true + }, { + clz32: function b(a) { + return (a >>>= 0) ? 31 - e(f(a + 0.5) * g) : 32; + } + }); + }, + 50831: function(d, e, a) { + var c = a(35437); + var f = a(87482); + var b = Math.cosh; + var g = Math.abs; + var h = Math.E; + c({ + target: "Math", + stat: true, + forced: !b || b(710) === Infinity + }, { + cosh: function c(b) { + var a = f(g(b) - 1) + 1; + return (a + 1 / (a * h * h)) * (h / 2); + } + }); + }, + 47645: function(d, e, a) { + var c = a(35437); + var b = a(87482); + c({ + target: "Math", + stat: true, + forced: b != Math.expm1 + }, { + expm1: b + }); + }, + 17376: function(d, e, a) { + var b = a(35437); + var c = a(45404); + b({ + target: "Math", + stat: true + }, { + fround: c + }); + }, + 50241: function(e, f, b) { + var c = b(35437); + var a = Math.hypot; + var g = Math.abs; + var h = Math.sqrt; + var d = !!a && a(Infinity, NaN) !== Infinity; + c({ + target: "Math", + stat: true, + forced: d + }, { + hypot: function i(j, k) { + var d = 0; + var e = 0; + var f = arguments.length; + var b = 0; + var a, c; + while(e < f){ + a = g(arguments[e++]); + if (b < a) { + c = b / a; + d = d * c * c + 1; + b = a; + } else if (a > 0) { + c = a / b; + d += c * c; + } else d += a; + } + return b === Infinity ? Infinity : b * h(d); + } + }); + }, + 9054: function(e, f, a) { + var b = a(35437); + var c = a(60232); + var g = Math.imul; + var d = c(function() { + return g(0xffffffff, 5) != -5 || g.length != 2; + }); + b({ + target: "Math", + stat: true, + forced: d + }, { + imul: function h(f, g) { + var a = 0xffff; + var b = +f; + var c = +g; + var d = a & b; + var e = a & c; + return (0 | (d * e + ((((a & (b >>> 16)) * e + d * (a & (c >>> 16))) << 16) >>> 0))); + } + }); + }, + 48085: function(c, d, a) { + var b = a(35437); + var e = Math.log; + var f = Math.LOG10E; + b({ + target: "Math", + stat: true + }, { + log10: function b(a) { + return e(a) * f; + } + }); + }, + 98400: function(d, e, a) { + var b = a(35437); + var c = a(41571); + b({ + target: "Math", + stat: true + }, { + log1p: c + }); + }, + 56359: function(c, d, a) { + var b = a(35437); + var e = Math.log; + var f = Math.LN2; + b({ + target: "Math", + stat: true + }, { + log2: function b(a) { + return e(a) / f; + } + }); + }, + 26753: function(d, e, a) { + var b = a(35437); + var c = a(62381); + b({ + target: "Math", + stat: true + }, { + sign: c + }); + }, + 50457: function(e, f, a) { + var b = a(35437); + var c = a(60232); + var g = a(87482); + var h = Math.abs; + var i = Math.exp; + var j = Math.E; + var d = c(function() { + return Math.sinh(-2e-17) != -2e-17; + }); + b({ + target: "Math", + stat: true, + forced: d + }, { + sinh: function b(a) { + return h((a = +a)) < 1 ? (g(a) - g(-a)) / 2 : (i(a - 1) - i(-a - 1)) * (j / 2); + } + }); + }, + 7358: function(c, d, a) { + var b = a(35437); + var e = a(87482); + var f = Math.exp; + b({ + target: "Math", + stat: true + }, { + tanh: function d(a) { + var b = e((a = +a)); + var c = e(-a); + return b == Infinity ? 1 : c == Infinity ? -1 : (b - c) / (f(a) + f(-a)); + } + }); + }, + 64350: function(c, d, a) { + var b = a(77875); + b(Math, "Math", true); + }, + 80568: function(c, d, a) { + var b = a(35437); + var e = Math.ceil; + var f = Math.floor; + b({ + target: "Math", + stat: true + }, { + trunc: function b(a) { + return (a > 0 ? f : e)(a); + } + }); + }, + 6457: function(s, t, a) { + "use strict"; + var k = a(87122); + var h = a(19514); + var l = a(23736); + var m = a(78109); + var i = a(1521); + var n = a(82020); + var u = a(45564); + var v = a(17679); + var w = a(41851); + var x = a(60232); + var o = a(18255); + var p = a(13463).f; + var q = a(24722).f; + var r = a(94770).f; + var y = a(62034).trim; + var d = "Number"; + var b = h[d]; + var f = b.prototype; + var z = n(o(f)) == d; + var A = function(i) { + if (v(i)) throw TypeError("Cannot convert a Symbol value to a number"); + var a = w(i, "number"); + var b, e, f, g, c, j, d, h; + if (typeof a == "string" && a.length > 2) { + a = y(a); + b = a.charCodeAt(0); + if (b === 43 || b === 45) { + e = a.charCodeAt(2); + if (e === 88 || e === 120) return NaN; + } else if (b === 48) { + switch(a.charCodeAt(1)){ + case 66: + case 98: + f = 2; + g = 49; + break; + case 79: + case 111: + f = 8; + g = 55; + break; + default: + return +a; + } + c = a.slice(2); + j = c.length; + for(d = 0; d < j; d++){ + h = c.charCodeAt(d); + if (h < 48 || h > g) return NaN; + } + return parseInt(c, f); + } + } + return +a; + }; + if (l(d, !b(" 0o1") || !b("0b1") || b("+0x1"))) { + var c = function h(g) { + var e = arguments.length < 1 ? 0 : g; + var a = this; + return a instanceof c && (z ? x(function() { + f.valueOf.call(a); + }) : n(a) != d) ? u(new b(A(e)), a, c) : A(e); + }; + for(var j = k ? p(b) : ("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY," + "EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER," + "MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger," + "fromString,range").split(","), g = 0, e; j.length > g; g++){ + if (i(b, (e = j[g])) && !i(c, e)) { + r(c, e, q(b, e)); + } + } + c.prototype = f; + f.constructor = c; + m(h, d, c); + } + }, + 86051: function(c, d, a) { + var b = a(35437); + b({ + target: "Number", + stat: true + }, { + EPSILON: Math.pow(2, -52) + }); + }, + 36017: function(d, e, a) { + var b = a(35437); + var c = a(85471); + b({ + target: "Number", + stat: true + }, { + isFinite: c + }); + }, + 14519: function(d, e, a) { + var b = a(35437); + var c = a(73156); + b({ + target: "Number", + stat: true + }, { + isInteger: c + }); + }, + 44703: function(c, d, a) { + var b = a(35437); + b({ + target: "Number", + stat: true + }, { + isNaN: function b(a) { + return a != a; + } + }); + }, + 97512: function(c, d, a) { + var b = a(35437); + var e = a(73156); + var f = Math.abs; + b({ + target: "Number", + stat: true + }, { + isSafeInteger: function b(a) { + return (e(a) && f(a) <= 0x1fffffffffffff); + } + }); + }, + 52274: function(c, d, a) { + var b = a(35437); + b({ + target: "Number", + stat: true + }, { + MAX_SAFE_INTEGER: 0x1fffffffffffff + }); + }, + 33499: function(c, d, a) { + var b = a(35437); + b({ + target: "Number", + stat: true + }, { + MIN_SAFE_INTEGER: -0x1fffffffffffff + }); + }, + 44534: function(d, e, a) { + var c = a(35437); + var b = a(45220); + c({ + target: "Number", + stat: true, + forced: Number.parseFloat != b + }, { + parseFloat: b + }); + }, + 18382: function(d, e, a) { + var c = a(35437); + var b = a(33279); + c({ + target: "Number", + stat: true, + forced: Number.parseInt != b + }, { + parseInt: b + }); + }, + 30744: function(f, g, a) { + "use strict"; + var b = a(35437); + var h = a(86361); + var i = a(44378); + var j = a(86974); + var c = a(60232); + var d = (1.0).toFixed; + var k = Math.floor; + var l = function(a, b, c) { + return b === 0 ? c : b % 2 === 1 ? l(a, b - 1, c * a) : l(a * a, b / 2, c); + }; + var m = function(c) { + var b = 0; + var a = c; + while(a >= 4096){ + b += 12; + a /= 4096; + } + while(a >= 2){ + b += 1; + a /= 2; + } + return b; + }; + var n = function(c, d, e) { + var b = -1; + var a = e; + while(++b < 6){ + a += d * c[b]; + c[b] = a % 1e7; + a = k(a / 1e7); + } + }; + var o = function(c, d) { + var b = 6; + var a = 0; + while(--b >= 0){ + a += c[b]; + c[b] = k(a / d); + a = (a % d) * 1e7; + } + }; + var p = function(d) { + var b = 6; + var a = ""; + while(--b >= 0){ + if (a !== "" || b === 0 || d[b] !== 0) { + var c = String(d[b]); + a = a === "" ? c : a + j.call("0", 7 - c.length) + c; + } + } + return a; + }; + var e = (d && ((0.00008).toFixed(3) !== "0.000" || (0.9).toFixed(0) !== "1" || (1.255).toFixed(2) !== "1.25" || (1000000000000000128.0).toFixed(0) !== "1000000000000000128")) || !c(function() { + d.call({}); + }); + b({ + target: "Number", + proto: true, + forced: e + }, { + toFixed: function s(r) { + var a = i(this); + var d = h(r); + var b = [ + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var q = ""; + var c = "0"; + var e, k, f, g; + if (d < 0 || d > 20) throw RangeError("Incorrect fraction digits"); + if (a != a) return "NaN"; + if (a <= -1e21 || a >= 1e21) return String(a); + if (a < 0) { + q = "-"; + a = -a; + } + if (a > 1e-21) { + e = m(a * l(2, 69, 1)) - 69; + k = e < 0 ? a * l(2, -e, 1) : a / l(2, e, 1); + k *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + n(b, 0, k); + f = d; + while(f >= 7){ + n(b, 1e7, 0); + f -= 7; + } + n(b, l(10, f, 1), 0); + f = e - 1; + while(f >= 23){ + o(b, 1 << 23); + f -= 23; + } + o(b, 1 << f); + n(b, 1, 1); + o(b, 2); + c = p(b); + } else { + n(b, 0, k); + n(b, 1 << -e, 0); + c = p(b) + j.call("0", d); + } + } + if (d > 0) { + g = c.length; + c = q + (g <= d ? "0." + j.call("0", d - g) + c : c.slice(0, g - d) + "." + c.slice(g - d)); + } else { + c = q + c; + } + return c; + } + }); + }, + 35346: function(e, f, a) { + "use strict"; + var c = a(35437); + var b = a(60232); + var g = a(44378); + var h = (1.0).toPrecision; + var d = b(function() { + return h.call(1, undefined) !== "1"; + }) || !b(function() { + h.call({}); + }); + c({ + target: "Number", + proto: true, + forced: d + }, { + toPrecision: function b(a) { + return a === undefined ? h.call(g(this)) : h.call(g(this), a); + } + }); + }, + 18655: function(d, e, a) { + var c = a(35437); + var b = a(59038); + c({ + target: "Object", + stat: true, + forced: Object.assign !== b + }, { + assign: b + }); + }, + 38710: function(e, f, a) { + var b = a(35437); + var c = a(87122); + var d = a(18255); + b({ + target: "Object", + stat: true, + sham: !c + }, { + create: d + }); + }, + 15415: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(87122); + var d = a(62115); + var g = a(74618); + var h = a(89343); + var i = a(94770); + if (c) { + b({ + target: "Object", + proto: true, + forced: d + }, { + __defineGetter__: function c(a, b) { + i.f(h(this), a, { + get: g(b), + enumerable: true, + configurable: true + }); + } + }); + } + }, + 82823: function(e, f, a) { + var c = a(35437); + var b = a(87122); + var d = a(68381); + c({ + target: "Object", + stat: true, + forced: !b, + sham: !b + }, { + defineProperties: d + }); + }, + 91289: function(e, f, a) { + var c = a(35437); + var b = a(87122); + var d = a(94770); + c({ + target: "Object", + stat: true, + forced: !b, + sham: !b + }, { + defineProperty: d.f + }); + }, + 81691: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(87122); + var d = a(62115); + var g = a(74618); + var h = a(89343); + var i = a(94770); + if (c) { + b({ + target: "Object", + proto: true, + forced: d + }, { + __defineSetter__: function c(a, b) { + i.f(h(this), a, { + set: g(b), + enumerable: true, + configurable: true + }); + } + }); + } + }, + 55158: function(c, d, a) { + var b = a(35437); + var e = a(7996).entries; + b({ + target: "Object", + stat: true + }, { + entries: function b(a) { + return e(a); + } + }); + }, + 90596: function(f, g, a) { + var b = a(35437); + var c = a(85469); + var d = a(60232); + var h = a(39817); + var i = a(19322).onFreeze; + var j = Object.freeze; + var e = d(function() { + j(1); + }); + b({ + target: "Object", + stat: true, + forced: e, + sham: !c + }, { + freeze: function b(a) { + return j && h(a) ? j(i(a)) : a; + } + }); + }, + 51422: function(c, d, a) { + var b = a(35437); + var e = a(7261); + var f = a(47267); + b({ + target: "Object", + stat: true + }, { + fromEntries: function c(a) { + var b = {}; + e(a, function(a, c) { + f(b, a, c); + }, { + AS_ENTRIES: true + }); + return b; + } + }); + }, + 76377: function(g, h, a) { + var c = a(35437); + var d = a(60232); + var i = a(74981); + var j = a(24722).f; + var b = a(87122); + var e = d(function() { + j(1); + }); + var f = !b || e; + c({ + target: "Object", + stat: true, + forced: f, + sham: !b + }, { + getOwnPropertyDescriptor: function c(a, b) { + return j(i(a), b); + } + }); + }, + 78977: function(d, e, a) { + var b = a(35437); + var c = a(87122); + var f = a(688); + var g = a(74981); + var h = a(24722); + var i = a(47267); + b({ + target: "Object", + stat: true, + sham: !c + }, { + getOwnPropertyDescriptors: function m(k) { + var b = g(k); + var l = h.f; + var c = f(b); + var d = {}; + var e = 0; + var j, a; + while(c.length > e){ + a = l(b, (j = c[e++])); + if (a !== undefined) i(d, j, a); + } + return d; + } + }); + }, + 11319: function(f, g, a) { + var b = a(35437); + var c = a(60232); + var d = a(33954).f; + var e = c(function() { + return !Object.getOwnPropertyNames(1); + }); + b({ + target: "Object", + stat: true, + forced: e + }, { + getOwnPropertyNames: d + }); + }, + 94667: function(f, g, a) { + var b = a(35437); + var c = a(60232); + var h = a(89343); + var i = a(39311); + var d = a(81577); + var e = c(function() { + i(1); + }); + b({ + target: "Object", + stat: true, + forced: e, + sham: !d + }, { + getPrototypeOf: function b(a) { + return i(h(a)); + } + }); + }, + 20071: function(d, e, a) { + var b = a(35437); + var c = a(1521); + b({ + target: "Object", + stat: true + }, { + hasOwn: c + }); + }, + 24195: function(e, f, a) { + var b = a(35437); + var c = a(60232); + var g = a(39817); + var h = Object.isExtensible; + var d = c(function() { + h(1); + }); + b({ + target: "Object", + stat: true, + forced: d + }, { + isExtensible: function b(a) { + return g(a) ? h ? h(a) : true : false; + } + }); + }, + 92570: function(e, f, a) { + var b = a(35437); + var c = a(60232); + var g = a(39817); + var h = Object.isFrozen; + var d = c(function() { + h(1); + }); + b({ + target: "Object", + stat: true, + forced: d + }, { + isFrozen: function b(a) { + return g(a) ? h ? h(a) : false : true; + } + }); + }, + 67472: function(e, f, a) { + var b = a(35437); + var c = a(60232); + var g = a(39817); + var h = Object.isSealed; + var d = c(function() { + h(1); + }); + b({ + target: "Object", + stat: true, + forced: d + }, { + isSealed: function b(a) { + return g(a) ? h ? h(a) : false : true; + } + }); + }, + 27637: function(d, e, a) { + var b = a(35437); + var c = a(79884); + b({ + target: "Object", + stat: true + }, { + is: c + }); + }, + 4855: function(e, f, a) { + var b = a(35437); + var g = a(89343); + var h = a(25732); + var c = a(60232); + var d = c(function() { + h(1); + }); + b({ + target: "Object", + stat: true, + forced: d + }, { + keys: function b(a) { + return h(g(a)); + } + }); + }, + 65391: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(87122); + var d = a(62115); + var g = a(89343); + var h = a(10482); + var i = a(39311); + var j = a(24722).f; + if (c) { + b({ + target: "Object", + proto: true, + forced: d + }, { + __lookupGetter__: function e(c) { + var a = g(this); + var d = h(c); + var b; + do { + if ((b = j(a, d))) return b.get; + }while ((a = i(a))) + } + }); + } + }, + 40880: function(e, f, a) { + "use strict"; + var b = a(35437); + var c = a(87122); + var d = a(62115); + var g = a(89343); + var h = a(10482); + var i = a(39311); + var j = a(24722).f; + if (c) { + b({ + target: "Object", + proto: true, + forced: d + }, { + __lookupSetter__: function e(c) { + var a = g(this); + var d = h(c); + var b; + do { + if ((b = j(a, d))) return b.set; + }while ((a = i(a))) + } + }); + } + }, + 31209: function(f, g, a) { + var b = a(35437); + var h = a(39817); + var i = a(19322).onFreeze; + var c = a(85469); + var d = a(60232); + var j = Object.preventExtensions; + var e = d(function() { + j(1); + }); + b({ + target: "Object", + stat: true, + forced: e, + sham: !c + }, { + preventExtensions: function b(a) { + return j && h(a) ? j(i(a)) : a; + } + }); + }, + 55023: function(f, g, a) { + var b = a(35437); + var h = a(39817); + var i = a(19322).onFreeze; + var c = a(85469); + var d = a(60232); + var j = Object.seal; + var e = d(function() { + j(1); + }); + b({ + target: "Object", + stat: true, + forced: e, + sham: !c + }, { + seal: function b(a) { + return j && h(a) ? j(i(a)) : a; + } + }); + }, + 76890: function(d, e, a) { + var b = a(35437); + var c = a(59057); + b({ + target: "Object", + stat: true + }, { + setPrototypeOf: c + }); + }, + 53102: function(e, f, a) { + var b = a(42716); + var c = a(78109); + var d = a(35253); + if (!b) { + c(Object.prototype, "toString", d, { + unsafe: true + }); + } + }, + 6960: function(c, d, a) { + var b = a(35437); + var e = a(7996).values; + b({ + target: "Object", + stat: true + }, { + values: function b(a) { + return e(a); + } + }); + }, + 98966: function(d, e, a) { + var c = a(35437); + var b = a(45220); + c({ + global: true, + forced: parseFloat != b + }, { + parseFloat: b + }); + }, + 50862: function(d, e, a) { + var c = a(35437); + var b = a(33279); + c({ + global: true, + forced: parseInt != b + }, { + parseInt: b + }); + }, + 43267: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(74618); + var f = a(11098); + var g = a(68275); + var h = a(7261); + b({ + target: "Promise", + stat: true + }, { + allSettled: function i(j) { + var c = this; + var a = f.f(c); + var k = a.resolve; + var d = a.reject; + var b = g(function() { + var d = e(c.resolve); + var a = []; + var f = 0; + var b = 1; + h(j, function(e) { + var g = f++; + var h = false; + a.push(undefined); + b++; + d.call(c, e).then(function(c) { + if (h) return; + h = true; + a[g] = { + status: "fulfilled", + value: c + }; + --b || k(a); + }, function(c) { + if (h) return; + h = true; + a[g] = { + status: "rejected", + reason: c + }; + --b || k(a); + }); + }); + --b || k(a); + }); + if (b.error) d(b.value); + return a.promise; + } + }); + }, + 53441: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(74618); + var f = a(44990); + var g = a(11098); + var h = a(68275); + var i = a(7261); + var j = "No one promise resolved"; + b({ + target: "Promise", + stat: true + }, { + any: function k(l) { + var c = this; + var a = g.f(c); + var m = a.resolve; + var d = a.reject; + var b = h(function() { + var g = e(c.resolve); + var a = []; + var h = 0; + var b = 1; + var k = false; + i(l, function(e) { + var i = h++; + var l = false; + a.push(undefined); + b++; + g.call(c, e).then(function(a) { + if (l || k) return; + k = true; + m(a); + }, function(c) { + if (l || k) return; + l = true; + a[i] = c; + --b || d(new (f("AggregateError"))(a, j)); + }); + }); + --b || d(new (f("AggregateError"))(a, j)); + }); + if (b.error) d(b.value); + return a.promise; + } + }); + }, + 36585: function(k, l, a) { + "use strict"; + var d = a(35437); + var e = a(80627); + var b = a(91591); + var f = a(60232); + var g = a(44990); + var h = a(67106); + var m = a(94850); + var n = a(56540); + var i = a(78109); + var j = !!b && f(function() { + b.prototype["finally"].call({ + then: function() {} + }, function() {}); + }); + d({ + target: "Promise", + proto: true, + real: true, + forced: j + }, { + finally: function(a) { + var c = m(this, g("Promise")); + var b = h(a); + return this.then(b ? function(b) { + return n(c, a()).then(function() { + return b; + }); + } : a, b ? function(b) { + return n(c, a()).then(function() { + throw b; + }); + } : a); + } + }); + if (!e && h(b)) { + var c = g("Promise").prototype["finally"]; + if (b.prototype["finally"] !== c) { + i(b.prototype, "finally", c, { + unsafe: true + }); + } + } + }, + 74292: function(E, F, a) { + "use strict"; + var f = a(35437); + var k = a(80627); + var d = a(19514); + var s = a(44990); + var g = a(91591); + var l = a(78109); + var t = a(59855); + var m = a(59057); + var u = a(77875); + var v = a(53988); + var G = a(74618); + var n = a(67106); + var H = a(39817); + var I = a(51819); + var J = a(71975); + var K = a(7261); + var w = a(34124); + var L = a(94850); + var M = a(46660).set; + var N = a(50277); + var O = a(56540); + var P = a(85033); + var o = a(11098); + var Q = a(68275); + var j = a(44670); + var x = a(23736); + var y = a(81019); + var R = a(23573); + var S = a(96590); + var T = a(50661); + var U = y("species"); + var b = "Promise"; + var V = j.get; + var W = j.set; + var X = j.getterFor(b); + var c = g && g.prototype; + var h = g; + var i = c; + var Y = d.TypeError; + var p = d.document; + var Z = d.process; + var q = o.f; + var $ = q; + var _ = !!(p && p.createEvent && d.dispatchEvent); + var aa = n(d.PromiseRejectionEvent); + var ab = "unhandledrejection"; + var ac = "rejectionhandled"; + var ad = 0; + var ae = 1; + var af = 2; + var ag = 1; + var ah = 2; + var z = false; + var r, A, B, C; + var e = x(b, function() { + var a = J(h); + var b = a !== String(h); + if (!b && T === 66) return true; + if (k && !i["finally"]) return true; + if (T >= 51 && /native code/.test(a)) return false; + var c = new h(function(a) { + a(1); + }); + var d = function(a) { + a(function() {}, function() {}); + }; + var e = (c.constructor = {}); + e[U] = d; + z = c.then(function() {}) instanceof d; + if (!z) return true; + return (!b && R && !aa); + }); + var D = e || !w(function(a) { + h.all(a)["catch"](function() {}); + }); + var ai = function(a) { + var b; + return H(a) && n((b = a.then)) ? b : false; + }; + var aj = function(a, b) { + if (a.notified) return; + a.notified = true; + var c = a.reactions; + N(function() { + var h = a.value; + var j = a.state == ae; + var k = 0; + while(c.length > k){ + var d = c[k++]; + var i = j ? d.ok : d.fail; + var l = d.resolve; + var g = d.reject; + var e = d.domain; + var f, m, n; + try { + if (i) { + if (!j) { + if (a.rejection === ah) an(a); + a.rejection = ag; + } + if (i === true) f = h; + else { + if (e) e.enter(); + f = i(h); + if (e) { + e.exit(); + n = true; + } + } + if (f === d.promise) { + g(Y("Promise-chain cycle")); + } else if ((m = ai(f))) { + m.call(f, l, g); + } else l(f); + } else g(h); + } catch (o) { + if (e && !n) e.exit(); + g(o); + } + } + a.reactions = []; + a.notified = false; + if (b && !a.rejection) al(a); + }); + }; + var ak = function(b, e, c) { + var a, f; + if (_) { + a = p.createEvent("Event"); + a.promise = e; + a.reason = c; + a.initEvent(b, false, true); + d.dispatchEvent(a); + } else a = { + promise: e, + reason: c + }; + if (!aa && (f = d["on" + b])) f(a); + else if (b === ab) P("Unhandled promise rejection", c); + }; + var al = function(a) { + M.call(d, function() { + var d = a.facade; + var e = a.value; + var c = am(a); + var b; + if (c) { + b = Q(function() { + if (S) { + Z.emit("unhandledRejection", e, d); + } else ak(ab, d, e); + }); + a.rejection = S || am(a) ? ah : ag; + if (b.error) throw b.value; + } + }); + }; + var am = function(a) { + return a.rejection !== ag && !a.parent; + }; + var an = function(a) { + M.call(d, function() { + var b = a.facade; + if (S) { + Z.emit("rejectionHandled", b); + } else ak(ac, b, a.value); + }); + }; + var ao = function(a, b, c) { + return function(d) { + a(b, d, c); + }; + }; + var ap = function(a, c, b) { + if (a.done) return; + a.done = true; + if (b) a = b; + a.value = c; + a.state = af; + aj(a, true); + }; + var aq = function(a, b, c) { + if (a.done) return; + a.done = true; + if (c) a = c; + try { + if (a.facade === b) throw Y("Promise can't be resolved itself"); + var d = ai(b); + if (d) { + N(function() { + var c = { + done: false + }; + try { + d.call(b, ao(aq, c, a), ao(ap, c, a)); + } catch (e) { + ap(c, e, a); + } + }); + } else { + a.value = b; + a.state = ae; + aj(a, false); + } + } catch (e) { + ap({ + done: false + }, e, a); + } + }; + if (e) { + h = function e(c) { + I(this, h, b); + G(c); + r.call(this); + var a = V(this); + try { + c(ao(aq, a), ao(ap, a)); + } catch (d) { + ap(a, d); + } + }; + i = h.prototype; + r = function a(c) { + W(this, { + type: b, + done: false, + notified: false, + parent: false, + reactions: [], + rejection: false, + state: ad, + value: undefined + }); + }; + r.prototype = t(i, { + then: function e(c, d) { + var b = X(this); + var a = q(L(this, h)); + a.ok = n(c) ? c : true; + a.fail = n(d) && d; + a.domain = S ? Z.domain : undefined; + b.parent = true; + b.reactions.push(a); + if (b.state != ad) aj(b, false); + return a.promise; + }, + catch: function(a) { + return this.then(undefined, a); + } + }); + A = function() { + var a = new r(); + var b = V(a); + this.promise = a; + this.resolve = ao(aq, b); + this.reject = ao(ap, b); + }; + o.f = q = function(a) { + return a === h || a === B ? new A(a) : $(a); + }; + if (!k && n(g) && c !== Object.prototype) { + C = c.then; + if (!z) { + l(c, "then", function c(a, b) { + var d = this; + return new h(function(a, b) { + C.call(d, a, b); + }).then(a, b); + }, { + unsafe: true + }); + l(c, "catch", i["catch"], { + unsafe: true + }); + } + try { + delete c.constructor; + } catch (ar) {} + if (m) { + m(c, i); + } + } + } + f({ + global: true, + wrap: true, + forced: e + }, { + Promise: h + }); + u(h, b, false, true); + v(b); + B = s(b); + f({ + target: b, + stat: true, + forced: e + }, { + reject: function c(b) { + var a = q(this); + a.reject.call(undefined, b); + return a.promise; + } + }); + f({ + target: b, + stat: true, + forced: k || e + }, { + resolve: function b(a) { + return O(k && this === B ? h : this, a); + } + }); + f({ + target: b, + stat: true, + forced: D + }, { + all: function e(f) { + var c = this; + var a = q(c); + var g = a.resolve; + var d = a.reject; + var b = Q(function() { + var e = G(c.resolve); + var a = []; + var h = 0; + var b = 1; + K(f, function(f) { + var i = h++; + var j = false; + a.push(undefined); + b++; + e.call(c, f).then(function(c) { + if (j) return; + j = true; + a[i] = c; + --b || g(a); + }, d); + }); + --b || g(a); + }); + if (b.error) d(b.value); + return a.promise; + }, + race: function e(f) { + var c = this; + var a = q(c); + var d = a.reject; + var b = Q(function() { + var b = G(c.resolve); + K(f, function(e) { + b.call(c, e).then(a.resolve, d); + }); + }); + if (b.error) d(b.value); + return a.promise; + } + }); + }, + 40394: function(f, g, a) { + var b = a(35437); + var c = a(44990); + var h = a(74618); + var i = a(83941); + var d = a(60232); + var j = c("Reflect", "apply"); + var k = Function.apply; + var e = !d(function() { + j(function() {}); + }); + b({ + target: "Reflect", + stat: true, + forced: e + }, { + apply: function d(a, c, b) { + h(a); + i(b); + return j ? j(a, c, b) : k.call(a, c, b); + } + }); + }, + 51908: function(h, i, a) { + var d = a(35437); + var e = a(44990); + var j = a(36381); + var k = a(83941); + var l = a(39817); + var m = a(18255); + var n = a(48644); + var b = a(60232); + var o = e("Reflect", "construct"); + var f = b(function() { + function a() {} + return !(o(function() {}, [], a) instanceof a); + }); + var g = !b(function() { + o(function() {}); + }); + var c = f || g; + d({ + target: "Reflect", + stat: true, + forced: c, + sham: c + }, { + construct: function p(b, a) { + j(b); + k(a); + var c = arguments.length < 3 ? b : j(arguments[2]); + if (g && !f) return o(b, a, c); + if (b == c) { + switch(a.length){ + case 0: + return new b(); + case 1: + return new b(a[0]); + case 2: + return new b(a[0], a[1]); + case 3: + return new b(a[0], a[1], a[2]); + case 4: + return new b(a[0], a[1], a[2], a[3]); + } + var d = [ + null + ]; + d.push.apply(d, a); + return new (n.apply(b, d))(); + } + var e = c.prototype; + var h = m(l(e) ? e : Object.prototype); + var i = Function.apply.call(b, h, a); + return l(i) ? i : h; + } + }); + }, + 60211: function(f, g, a) { + var b = a(35437); + var c = a(87122); + var h = a(83941); + var i = a(10482); + var j = a(94770); + var d = a(60232); + var e = d(function() { + Reflect.defineProperty(j.f({}, 1, { + value: 1 + }), 1, { + value: 2 + }); + }); + b({ + target: "Reflect", + stat: true, + forced: e, + sham: !c + }, { + defineProperty: function e(a, c, b) { + h(a); + var d = i(c); + h(b); + try { + j.f(a, d, b); + return true; + } catch (f) { + return false; + } + } + }); + }, + 55007: function(c, d, a) { + var b = a(35437); + var e = a(83941); + var f = a(24722).f; + b({ + target: "Reflect", + stat: true + }, { + deleteProperty: function d(a, b) { + var c = f(e(a), b); + return c && !c.configurable ? false : delete a[b]; + } + }); + }, + 54370: function(d, e, a) { + var b = a(35437); + var c = a(87122); + var f = a(83941); + var g = a(24722); + b({ + target: "Reflect", + stat: true, + sham: !c + }, { + getOwnPropertyDescriptor: function c(a, b) { + return g.f(f(a), b); + } + }); + }, + 61849: function(d, e, a) { + var b = a(35437); + var f = a(83941); + var g = a(39311); + var c = a(81577); + b({ + target: "Reflect", + stat: true, + sham: !c + }, { + getPrototypeOf: function b(a) { + return g(f(a)); + } + }); + }, + 25898: function(d, e, a) { + var b = a(35437); + var f = a(39817); + var g = a(83941); + var h = a(69518); + var i = a(24722); + var j = a(39311); + function c(b, d) { + var e = arguments.length < 3 ? b : arguments[2]; + var a, k; + if (g(b) === e) return b[d]; + a = i.f(b, d); + if (a) return h(a) ? a.value : a.get === undefined ? undefined : a.get.call(e); + if (f((k = j(b)))) return c(k, d, e); + } + b({ + target: "Reflect", + stat: true + }, { + get: c + }); + }, + 29726: function(c, d, a) { + var b = a(35437); + b({ + target: "Reflect", + stat: true + }, { + has: function c(a, b) { + return b in a; + } + }); + }, + 17011: function(c, d, a) { + var b = a(35437); + var e = a(83941); + var f = Object.isExtensible; + b({ + target: "Reflect", + stat: true + }, { + isExtensible: function b(a) { + e(a); + return f ? f(a) : true; + } + }); + }, + 80346: function(d, e, a) { + var b = a(35437); + var c = a(688); + b({ + target: "Reflect", + stat: true + }, { + ownKeys: c + }); + }, + 36628: function(d, e, a) { + var b = a(35437); + var f = a(44990); + var g = a(83941); + var c = a(85469); + b({ + target: "Reflect", + stat: true, + sham: !c + }, { + preventExtensions: function c(a) { + g(a); + try { + var b = f("Object", "preventExtensions"); + if (b) b(a); + return true; + } catch (d) { + return false; + } + } + }); + }, + 41690: function(d, e, a) { + var b = a(35437); + var f = a(83941); + var g = a(47111); + var c = a(59057); + if (c) b({ + target: "Reflect", + stat: true + }, { + setPrototypeOf: function d(a, b) { + f(a); + g(b); + try { + c(a, b); + return true; + } catch (e) { + return false; + } + } + }); + }, + 84450: function(f, g, a) { + var b = a(35437); + var h = a(83941); + var i = a(39817); + var j = a(69518); + var c = a(60232); + var k = a(94770); + var l = a(24722); + var m = a(39311); + var n = a(93608); + function d(g, c, f) { + var a = arguments.length < 4 ? g : arguments[3]; + var e = l.f(h(g), c); + var b, p, o; + if (!e) { + if (i((p = m(g)))) { + return d(p, c, f, a); + } + e = n(0); + } + if (j(e)) { + if (e.writable === false || !i(a)) return false; + if ((b = l.f(a, c))) { + if (b.get || b.set || b.writable === false) return false; + b.value = f; + k.f(a, c, b); + } else k.f(a, c, n(0, f)); + } else { + o = e.set; + if (o === undefined) return false; + o.call(a, f); + } + return true; + } + var e = c(function() { + var a = function() {}; + var b = k.f(new a(), "a", { + configurable: true + }); + return (Reflect.set(a.prototype, "a", 1, b) !== false); + }); + b({ + target: "Reflect", + stat: true, + forced: e + }, { + set: d + }); + }, + 59581: function(e, f, a) { + var b = a(35437); + var c = a(19514); + var d = a(77875); + b({ + global: true + }, { + Reflect: {} + }); + d(c.Reflect, "Reflect", true); + }, + 24329: function(w, x, a) { + var i = a(87122); + var d = a(19514); + var j = a(23736); + var y = a(45564); + var z = a(48181); + var A = a(94770).f; + var k = a(13463).f; + var B = a(78202); + var C = a(72729); + var D = a(40697); + var l = a(44725); + var m = a(78109); + var n = a(60232); + var E = a(1521); + var F = a(44670).enforce; + var o = a(53988); + var p = a(81019); + var q = a(76740); + var r = a(23564); + var G = p("match"); + var b = d.RegExp; + var e = b.prototype; + var H = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/; + var f = /a/g; + var I = /a/g; + var s = new b(f) !== f; + var t = l.UNSUPPORTED_Y; + var u = i && (!s || t || q || r || n(function() { + I[G] = false; + return (b(f) != f || b(I) == I || b(f, "i") != "/a/i"); + })); + var J = function(d) { + var f = d.length; + var b = 0; + var c = ""; + var e = false; + var a; + for(; b <= f; b++){ + a = d.charAt(b); + if (a === "\\") { + c += a + d.charAt(++b); + continue; + } + if (!e && a === ".") { + c += "[\\s\\S]"; + } else { + if (a === "[") { + e = true; + } else if (a === "]") { + e = false; + } + c += a; + } + } + return c; + }; + var K = function(d) { + var k = d.length; + var b = 0; + var f = ""; + var h = []; + var i = {}; + var g = false; + var e = false; + var j = 0; + var c = ""; + var a; + for(; b <= k; b++){ + a = d.charAt(b); + if (a === "\\") { + a = a + d.charAt(++b); + } else if (a === "]") { + g = false; + } else if (!g) switch(true){ + case a === "[": + g = true; + break; + case a === "(": + if (H.test(d.slice(b + 1))) { + b += 2; + e = true; + } + f += a; + j++; + continue; + case a === ">" && e: + if (c === "" || E(i, c)) { + throw new SyntaxError("Invalid capture group name"); + } + i[c] = true; + h.push([ + c, + j + ]); + e = false; + c = ""; + continue; + } + if (e) c += a; + else f += a; + } + return [ + f, + h + ]; + }; + if (j("RegExp", u)) { + var c = function u(a, d) { + var n = this instanceof c; + var o = B(a); + var p = d === undefined; + var i = []; + var g = a; + var s, j, k, m, l, h; + if (!n && o && p && a.constructor === c) { + return a; + } + if (o || a instanceof c) { + a = a.source; + if (p) d = "flags" in g ? g.flags : D.call(g); + } + a = a === undefined ? "" : C(a); + d = d === undefined ? "" : C(d); + g = a; + if (q && "dotAll" in f) { + j = !!d && d.indexOf("s") > -1; + if (j) d = d.replace(/s/g, ""); + } + s = d; + if (t && "sticky" in f) { + k = !!d && d.indexOf("y") > -1; + if (k) d = d.replace(/y/g, ""); + } + if (r) { + m = K(a); + a = m[0]; + i = m[1]; + } + l = y(b(a, d), n ? this : e, c); + if (j || k || i.length) { + h = F(l); + if (j) { + h.dotAll = true; + h.raw = c(J(a), s); + } + if (k) h.sticky = true; + if (i.length) h.groups = i; + } + if (a !== g) try { + z(l, "source", g === "" ? "(?:)" : g); + } catch (v) {} + return l; + }; + var v = function(a) { + a in c || A(c, a, { + configurable: true, + get: function() { + return b[a]; + }, + set: function(c) { + b[a] = c; + } + }); + }; + for(var g = k(b), h = 0; g.length > h;){ + v(g[h++]); + } + e.constructor = c; + c.prototype = e; + m(d, "RegExp", c); + } + o("RegExp"); + }, + 39661: function(f, g, a) { + var b = a(87122); + var c = a(76740); + var d = a(94770).f; + var h = a(44670).get; + var e = RegExp.prototype; + if (b && c) { + d(e, "dotAll", { + configurable: true, + get: function() { + if (this === e) return undefined; + if (this instanceof RegExp) { + return !!h(this).dotAll; + } + throw TypeError("Incompatible receiver, RegExp required"); + } + }); + } + }, + 7457: function(d, e, a) { + "use strict"; + var c = a(35437); + var b = a(72384); + c({ + target: "RegExp", + proto: true, + forced: /./.exec !== b + }, { + exec: b + }); + }, + 94664: function(g, h, a) { + var b = a(87122); + var c = a(94770); + var d = a(40697); + var e = a(60232); + var f = b && e(function() { + return (Object.getOwnPropertyDescriptor(RegExp.prototype, "flags").get.call({ + dotAll: true, + sticky: true + }) !== "sy"); + }); + if (f) c.f(RegExp.prototype, "flags", { + configurable: true, + get: d + }); + }, + 13273: function(f, g, a) { + var b = a(87122); + var c = a(44725).UNSUPPORTED_Y; + var d = a(94770).f; + var h = a(44670).get; + var e = RegExp.prototype; + if (b && c) { + d(e, "sticky", { + configurable: true, + get: function() { + if (this === e) return undefined; + if (this instanceof RegExp) { + return !!h(this).sticky; + } + throw TypeError("Incompatible receiver, RegExp required"); + } + }); + } + }, + 14721: function(d, e, a) { + "use strict"; + a(7457); + var b = a(35437); + var f = a(67106); + var g = a(39817); + var c = (function() { + var b = false; + var a = /[ac]/; + a.exec = function() { + b = true; + return /./.exec.apply(this, arguments); + }; + return a.test("abc") === true && b; + })(); + var h = /./.test; + b({ + target: "RegExp", + proto: true, + forced: !c + }, { + test: function(b) { + var c = this.exec; + if (!f(c)) return h.call(this, b); + var a = c.call(this, b); + if (a !== null && !g(a)) { + throw new Error("RegExp exec method returned something other than an Object or null"); + } + return !!a; + } + }); + }, + 87047: function(j, k, a) { + "use strict"; + var c = a(25160).PROPER; + var d = a(78109); + var l = a(83941); + var m = a(72729); + var e = a(60232); + var n = a(40697); + var b = "toString"; + var f = RegExp.prototype; + var g = f[b]; + var h = e(function() { + return (g.call({ + source: "a", + flags: "b" + }) != "/a/b"); + }); + var i = c && g.name != b; + if (h || i) { + d(RegExp.prototype, b, function e() { + var a = l(this); + var c = m(a.source); + var b = a.flags; + var d = m(b === undefined && a instanceof RegExp && !("flags" in f) ? n.call(a) : b); + return "/" + c + "/" + d; + }, { + unsafe: true + }); + } + }, + 93120: function(b, e, a) { + "use strict"; + var c = a(6807); + var d = a(67318); + b.exports = c("Set", function(a) { + return function b() { + return a(this, arguments.length ? arguments[0] : undefined); + }; + }, d); + }, + 37544: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("anchor") + }, { + anchor: function b(a) { + return f(this, "a", "name", a); + } + }); + }, + 46188: function(e, f, a) { + "use strict"; + var b = a(35437); + var g = a(79602); + var h = a(86361); + var i = a(31998); + var j = a(72729); + var c = a(60232); + var d = c(function() { + return "𠮷".at(0) !== "\uD842"; + }); + b({ + target: "String", + proto: true, + forced: d + }, { + at: function f(e) { + var c = j(g(this)); + var d = i(c.length); + var a = h(e); + var b = a >= 0 ? a : d + a; + return b < 0 || b >= d ? undefined : c.charAt(b); + } + }); + }, + 3694: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("big") + }, { + big: function a() { + return f(this, "big", "", ""); + } + }); + }, + 41555: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("blink") + }, { + blink: function a() { + return f(this, "blink", "", ""); + } + }); + }, + 47411: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("bold") + }, { + bold: function a() { + return f(this, "b", "", ""); + } + }); + }, + 90279: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(88668).codeAt; + b({ + target: "String", + proto: true + }, { + codePointAt: function b(a) { + return e(this, a); + } + }); + }, + 8789: function(g, h, a) { + "use strict"; + var c = a(35437); + var i = a(24722).f; + var j = a(31998); + var k = a(72729); + var l = a(3974); + var m = a(79602); + var d = a(26234); + var e = a(80627); + var n = "".endsWith; + var o = Math.min; + var b = d("endsWith"); + var f = !e && !b && !!(function() { + var a = i(String.prototype, "endsWith"); + return a && !a.writable; + })(); + c({ + target: "String", + proto: true, + forced: !f && !b + }, { + endsWith: function g(d) { + var a = k(m(this)); + l(d); + var e = arguments.length > 1 ? arguments[1] : undefined; + var f = j(a.length); + var b = e === undefined ? f : o(j(e), f); + var c = k(d); + return n ? n.call(a, c, b) : a.slice(b - c.length, b) === c; + } + }); + }, + 90306: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("fixed") + }, { + fixed: function a() { + return f(this, "tt", "", ""); + } + }); + }, + 54096: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("fontcolor") + }, { + fontcolor: function b(a) { + return f(this, "font", "color", a); + } + }); + }, + 98236: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("fontsize") + }, { + fontsize: function b(a) { + return f(this, "font", "size", a); + } + }); + }, + 18826: function(e, f, a) { + var c = a(35437); + var g = a(62965); + var h = String.fromCharCode; + var b = String.fromCodePoint; + var d = !!b && b.length != 1; + c({ + target: "String", + stat: true, + forced: d + }, { + fromCodePoint: function e(f) { + var b = []; + var d = arguments.length; + var c = 0; + var a; + while(d > c){ + a = +arguments[c++]; + if (g(a, 0x10ffff) !== a) throw RangeError(a + " is not a valid code point"); + b.push(a < 0x10000 ? h(a) : h(((a -= 0x10000) >> 10) + 0xd800, (a % 0x400) + 0xdc00)); + } + return b.join(""); + } + }); + }, + 38802: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(3974); + var g = a(79602); + var h = a(72729); + var c = a(26234); + b({ + target: "String", + proto: true, + forced: !c("includes") + }, { + includes: function b(a) { + return !!~h(g(this)).indexOf(h(f(a)), arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 16510: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("italics") + }, { + italics: function a() { + return f(this, "i", "", ""); + } + }); + }, + 94616: function(e, f, a) { + "use strict"; + var g = a(88668).charAt; + var h = a(72729); + var b = a(44670); + var c = a(7166); + var d = "String Iterator"; + var i = b.set; + var j = b.getterFor(d); + c(String, "String", function(a) { + i(this, { + type: d, + string: h(a), + index: 0 + }); + }, function e() { + var a = j(this); + var c = a.string; + var d = a.index; + var b; + if (d >= c.length) return { + value: undefined, + done: true + }; + b = g(c, d); + a.index += b.length; + return { + value: b, + done: false + }; + }); + }, + 26153: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("link") + }, { + link: function b(a) { + return f(this, "a", "href", a); + } + }); + }, + 83338: function(p, q, a) { + "use strict"; + var f = a(35437); + var g = a(10536); + var r = a(79602); + var s = a(31998); + var t = a(72729); + var u = a(83941); + var v = a(82020); + var w = a(78202); + var x = a(40697); + var y = a(84316); + var h = a(78109); + var i = a(60232); + var j = a(81019); + var z = a(94850); + var A = a(88770); + var B = a(21135); + var b = a(44670); + var k = a(80627); + var c = j("matchAll"); + var d = "RegExp String"; + var l = d + " Iterator"; + var C = b.set; + var D = b.getterFor(l); + var e = RegExp.prototype; + var m = "".matchAll; + var n = !!m && !i(function() { + "a".matchAll(/./); + }); + var E = g(function e(a, b, c, d) { + C(this, { + type: l, + regexp: a, + string: b, + global: c, + unicode: d, + done: false + }); + }, d, function e() { + var a = D(this); + if (a.done) return { + value: undefined, + done: true + }; + var c = a.regexp; + var d = a.string; + var b = B(c, d); + if (b === null) return { + value: undefined, + done: (a.done = true) + }; + if (a.global) { + if (t(b[0]) === "") c.lastIndex = A(d, s(c.lastIndex), a.unicode); + return { + value: b, + done: false + }; + } + a.done = true; + return { + value: b, + done: false + }; + }); + var o = function(i) { + var a = u(this); + var j = t(i); + var d, b, c, f, g, h; + d = z(a, RegExp); + b = a.flags; + if (b === undefined && a instanceof RegExp && !("flags" in e)) { + b = x.call(a); + } + c = b === undefined ? "" : t(b); + f = new d(d === RegExp ? a.source : a, c); + g = !!~c.indexOf("g"); + h = !!~c.indexOf("u"); + f.lastIndex = s(a.lastIndex); + return new E(f, j, g, h); + }; + f({ + target: "String", + proto: true, + forced: n + }, { + matchAll: function i(a) { + var d = r(this); + var h, f, b, g; + if (a != null) { + if (w(a)) { + h = t(r("flags" in e ? a.flags : x.call(a))); + if (!~h.indexOf("g")) throw TypeError("`.matchAll` does not allow non-global regexes"); + } + if (n) return m.apply(d, arguments); + b = y(a, c); + if (b === undefined && k && v(a) == "RegExp") b = o; + if (b) return b.call(a, d); + } else if (n) return m.apply(d, arguments); + f = t(d); + g = new RegExp(a, "g"); + return k ? o.call(g, f) : g[c](f); + } + }); + k || c in e || h(e, c, o); + }, + 74240: function(c, d, a) { + "use strict"; + var b = a(29045); + var e = a(83941); + var f = a(31998); + var g = a(72729); + var h = a(79602); + var i = a(84316); + var j = a(88770); + var k = a(21135); + b("match", function(a, b, c) { + return [ + function e(b) { + var c = h(this); + var d = b == undefined ? undefined : i(b, a); + return d ? d.call(b, c) : new RegExp(b)[a](g(c)); + }, + function(o) { + var a = e(this); + var d = g(o); + var i = c(b, a, d); + if (i.done) return i.value; + if (!a.global) return k(a, d); + var p = a.unicode; + a.lastIndex = 0; + var l = []; + var h = 0; + var m; + while((m = k(a, d)) !== null){ + var n = g(m[0]); + l[h] = n; + if (n === "") a.lastIndex = j(d, f(a.lastIndex), p); + h++; + } + return h === 0 ? null : l; + }, + ]; + }); + }, + 3370: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(19795).end; + var c = a(67110); + b({ + target: "String", + proto: true, + forced: c + }, { + padEnd: function b(a) { + return f(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 20395: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(19795).start; + var c = a(67110); + b({ + target: "String", + proto: true, + forced: c + }, { + padStart: function b(a) { + return f(this, a, arguments.length > 1 ? arguments[1] : undefined); + } + }); + }, + 75109: function(d, e, a) { + var c = a(35437); + var f = a(74981); + var g = a(89343); + var h = a(31998); + var i = a(72729); + var b = Array.prototype; + var j = b.push; + var k = b.join; + c({ + target: "String", + stat: true + }, { + raw: function m(d) { + var c = f(g(d).raw); + var e = h(c.length); + var l = arguments.length; + var b = []; + var a = 0; + while(e > a){ + j.call(b, i(c[a++])); + if (a < l) j.call(b, i(arguments[a])); + } + return k.call(b, ""); + } + }); + }, + 97385: function(d, e, a) { + var b = a(35437); + var c = a(86974); + b({ + target: "String", + proto: true + }, { + repeat: c + }); + }, + 64714: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(79602); + var g = a(67106); + var h = a(78202); + var i = a(72729); + var j = a(84316); + var k = a(40697); + var l = a(33371); + var c = a(81019); + var m = a(80627); + var n = c("replace"); + var o = RegExp.prototype; + var p = Math.max; + var q = function(b, c, a) { + if (a > b.length) return -1; + if (c === "") return a; + return b.indexOf(c, a); + }; + b({ + target: "String", + proto: true + }, { + replaceAll: function B(a, d) { + var s = f(this); + var t, z, u, b, e, v, w, A, x; + var c = 0; + var r = 0; + var y = ""; + if (a != null) { + t = h(a); + if (t) { + z = i(f("flags" in o ? a.flags : k.call(a))); + if (!~z.indexOf("g")) throw TypeError("`.replaceAll` does not allow non-global regexes"); + } + u = j(a, n); + if (u) { + return u.call(a, s, d); + } else if (m && t) { + return i(s).replace(a, d); + } + } + b = i(s); + e = i(a); + v = g(d); + if (!v) d = i(d); + w = e.length; + A = p(1, w); + c = q(b, e, 0); + while(c !== -1){ + if (v) { + x = i(d(e, c, b)); + } else { + x = l(e, b, c, [], undefined, d); + } + y += b.slice(r, c) + x; + r = c + w; + c = q(b, e, c + A); + } + if (r < b.length) { + y += b.slice(r); + } + return y; + } + }); + }, + 54878: function(h, i, a) { + "use strict"; + var b = a(29045); + var c = a(60232); + var j = a(83941); + var k = a(67106); + var l = a(86361); + var m = a(31998); + var n = a(72729); + var o = a(79602); + var p = a(88770); + var q = a(84316); + var r = a(33371); + var s = a(21135); + var d = a(81019); + var t = d("replace"); + var u = Math.max; + var v = Math.min; + var w = function(a) { + return a === undefined ? a : String(a); + }; + var e = (function() { + return "a".replace(/./, "$0") === "$0"; + })(); + var f = (function() { + if (/./[t]) { + return /./[t]("a", "$0") === ""; + } + return false; + })(); + var g = !c(function() { + var a = /./; + a.exec = function() { + var a = []; + a.groups = { + a: "7" + }; + return a; + }; + return "".replace(a, "$") !== "7"; + }); + b("replace", function(a, b, c) { + var d = f ? "$" : "$0"; + return [ + function f(a, c) { + var d = o(this); + var e = a == undefined ? undefined : q(a, t); + return e ? e.call(a, d, c) : b.call(n(d), a, c); + }, + function(G, a) { + var g = j(this); + var f = n(G); + if (typeof a === "string" && a.indexOf(d) === -1 && a.indexOf("$<") === -1) { + var A = c(b, g, f, a); + if (A.done) return A.value; + } + var B = k(a); + if (!B) a = n(a); + var C = g.global; + if (C) { + var H = g.unicode; + g.lastIndex = 0; + } + var o = []; + while(true){ + var e = s(g, f); + if (e === null) break; + o.push(e); + if (!C) break; + var I = n(e[0]); + if (I === "") g.lastIndex = p(f, m(g.lastIndex), H); + } + var D = ""; + var i = 0; + for(var q = 0; q < o.length; q++){ + e = o[q]; + var t = n(e[0]); + var h = u(v(l(e.index), f.length), 0); + var x = []; + for(var y = 1; y < e.length; y++)x.push(w(e[y])); + var z = e.groups; + if (B) { + var E = [ + t + ].concat(x, h, f); + if (z !== undefined) E.push(z); + var F = n(a.apply(undefined, E)); + } else { + F = r(t, f, h, x, z, a); + } + if (h >= i) { + D += f.slice(i, h) + F; + i = h + t.length; + } + } + return (D + f.slice(i)); + }, + ]; + }, !g || !e || f); + }, + 49000: function(c, d, a) { + "use strict"; + var b = a(29045); + var e = a(83941); + var f = a(79602); + var g = a(79884); + var h = a(72729); + var i = a(84316); + var j = a(21135); + b("search", function(a, b, c) { + return [ + function e(b) { + var c = f(this); + var d = b == undefined ? undefined : i(b, a); + return d ? d.call(b, c) : new RegExp(b)[a](h(c)); + }, + function(l) { + var a = e(this); + var f = h(l); + var i = c(b, a, f); + if (i.done) return i.value; + var d = a.lastIndex; + if (!g(d, 0)) a.lastIndex = 0; + var k = j(a, f); + if (!g(a.lastIndex, d)) a.lastIndex = d; + return k === null ? -1 : k.index; + }, + ]; + }); + }, + 69093: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("small") + }, { + small: function a() { + return f(this, "small", "", ""); + } + }); + }, + 1752: function(g, h, a) { + "use strict"; + var b = a(29045); + var i = a(78202); + var j = a(83941); + var k = a(79602); + var l = a(94850); + var m = a(88770); + var n = a(31998); + var o = a(72729); + var p = a(84316); + var q = a(21135); + var r = a(72384); + var c = a(44725); + var d = a(60232); + var e = c.UNSUPPORTED_Y; + var s = [].push; + var t = Math.min; + var u = 0xffffffff; + var f = !d(function() { + var a = /(?:)/; + var c = a.exec; + a.exec = function() { + return c.apply(this, arguments); + }; + var b = "ab".split(a); + return (b.length !== 2 || b[0] !== "a" || b[1] !== "b"); + }); + b("split", function(c, b, d) { + var a; + if ("abbc".split(/(b)*/)[1] == "c" || "test".split(/(?:)/, -1).length != 4 || "ab".split(/(?:ab)*/).length != 2 || ".".split(/(.?)(.?)/).length != 4 || ".".split(/()()/).length > 1 || "".split(/.?/).length) { + a = function(a, l) { + var d = o(k(this)); + var f = l === undefined ? u : l >>> 0; + if (f === 0) return []; + if (a === undefined) return [ + d + ]; + if (!i(a)) { + return b.call(d, a, f); + } + var c = []; + var n = (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.unicode ? "u" : "") + (a.sticky ? "y" : ""); + var g = 0; + var h = new RegExp(a.source, n + "g"); + var e, j, m; + while((e = r.call(h, d))){ + j = h.lastIndex; + if (j > g) { + c.push(d.slice(g, e.index)); + if (e.length > 1 && e.index < d.length) s.apply(c, e.slice(1)); + m = e[0].length; + g = j; + if (c.length >= f) break; + } + if (h.lastIndex === e.index) h.lastIndex++; + } + if (g === d.length) { + if (m || !h.test("")) c.push(""); + } else c.push(d.slice(g)); + return c.length > f ? c.slice(0, f) : c; + }; + } else if ("0".split(undefined, 0).length) { + a = function(a, c) { + return a === undefined && c === 0 ? [] : b.call(this, a, c); + }; + } else a = b; + return [ + function g(b, d) { + var e = k(this); + var f = b == undefined ? undefined : p(b, c); + return f ? f.call(b, e, d) : a.call(o(e), b, d); + }, + function(y, p) { + var f = j(this); + var c = o(y); + var w = d(a, f, c, p, a !== b); + if (w.done) return w.value; + var z = l(f, RegExp); + var A = f.unicode; + var B = (f.ignoreCase ? "i" : "") + (f.multiline ? "m" : "") + (f.unicode ? "u" : "") + (e ? "g" : "y"); + var i = new z(e ? "^(?:" + f.source + ")" : f, B); + var r = p === undefined ? u : p >>> 0; + if (r === 0) return []; + if (c.length === 0) return q(i, c) === null ? [ + c + ] : []; + var k = 0; + var g = 0; + var h = []; + while(g < c.length){ + i.lastIndex = e ? 0 : g; + var s = q(i, e ? c.slice(g) : c); + var x; + if (s === null || (x = t(n(i.lastIndex + (e ? g : 0)), c.length)) === k) { + g = m(c, g, A); + } else { + h.push(c.slice(k, g)); + if (h.length === r) return h; + for(var v = 1; v <= s.length - 1; v++){ + h.push(s[v]); + if (h.length === r) return h; + } + g = k = x; + } + } + h.push(c.slice(k)); + return h; + }, + ]; + }, !f, e); + }, + 24467: function(g, h, a) { + "use strict"; + var c = a(35437); + var i = a(24722).f; + var j = a(31998); + var k = a(72729); + var l = a(3974); + var m = a(79602); + var d = a(26234); + var e = a(80627); + var n = "".startsWith; + var o = Math.min; + var b = d("startsWith"); + var f = !e && !b && !!(function() { + var a = i(String.prototype, "startsWith"); + return a && !a.writable; + })(); + c({ + target: "String", + proto: true, + forced: !f && !b + }, { + startsWith: function e(d) { + var a = k(m(this)); + l(d); + var b = j(o(arguments.length > 1 ? arguments[1] : undefined, a.length)); + var c = k(d); + return n ? n.call(a, c, b) : a.slice(b, b + c.length) === c; + } + }); + }, + 86561: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("strike") + }, { + strike: function a() { + return f(this, "strike", "", ""); + } + }); + }, + 73795: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("sub") + }, { + sub: function a() { + return f(this, "sub", "", ""); + } + }); + }, + 49033: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(79602); + var f = a(86361); + var g = a(72729); + var h = "".slice; + var i = Math.max; + var j = Math.min; + b({ + target: "String", + proto: true + }, { + substr: function n(m, k) { + var l = g(e(this)); + var c = l.length; + var a = f(m); + var b, d; + if (a === Infinity) a = 0; + if (a < 0) a = i(c + a, 0); + b = k === undefined ? c : f(k); + if (b <= 0 || b === Infinity) return ""; + d = j(a + b, c); + return a >= d ? "" : h.call(l, a, d); + } + }); + }, + 2403: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(89293); + var c = a(49324); + b({ + target: "String", + proto: true, + forced: c("sup") + }, { + sup: function a() { + return f(this, "sup", "", ""); + } + }); + }, + 72471: function(f, g, a) { + "use strict"; + var d = a(35437); + var h = a(62034).end; + var e = a(10106); + var b = e("trimEnd"); + var c = b ? function a() { + return h(this); + } : "".trimEnd; + d({ + target: "String", + proto: true, + name: "trimEnd", + forced: b + }, { + trimEnd: c, + trimRight: c + }); + }, + 22915: function(f, g, a) { + "use strict"; + var d = a(35437); + var h = a(62034).start; + var e = a(10106); + var b = e("trimStart"); + var c = b ? function a() { + return h(this); + } : "".trimStart; + d({ + target: "String", + proto: true, + name: "trimStart", + forced: b + }, { + trimStart: c, + trimLeft: c + }); + }, + 45305: function(d, e, a) { + "use strict"; + var b = a(35437); + var f = a(62034).trim; + var c = a(10106); + b({ + target: "String", + proto: true, + forced: c("trim") + }, { + trim: function a() { + return f(this); + } + }); + }, + 17402: function(c, d, a) { + var b = a(71309); + b("asyncIterator"); + }, + 52699: function(k, l, a) { + "use strict"; + var e = a(35437); + var f = a(87122); + var g = a(19514); + var m = a(1521); + var h = a(67106); + var n = a(39817); + var i = a(94770).f; + var j = a(18295); + var b = g.Symbol; + if (f && h(b) && (!("description" in b.prototype) || b().description !== undefined)) { + var o = {}; + var c = function e() { + var a = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]); + var d = this instanceof c ? new b(a) : a === undefined ? b() : b(a); + if (a === "") o[d] = true; + return d; + }; + j(c, b); + var d = (c.prototype = b.prototype); + d.constructor = c; + var p = d.toString; + var q = String(b("test")) == "Symbol(test)"; + var r = /^Symbol\((.*)\)[^)]+$/; + i(d, "description", { + configurable: true, + get: function d() { + var a = n(this) ? this.valueOf() : this; + var b = p.call(a); + if (m(o, a)) return ""; + var c = q ? b.slice(7, -1) : b.replace(r, "$1"); + return c === "" ? undefined : c; + } + }); + e({ + global: true, + forced: true + }, { + Symbol: c + }); + } + }, + 40095: function(c, d, a) { + var b = a(71309); + b("hasInstance"); + }, + 7739: function(c, d, a) { + var b = a(71309); + b("isConcatSpreadable"); + }, + 12775: function(c, d, a) { + var b = a(71309); + b("iterator"); + }, + 83823: function(Q, R, a) { + "use strict"; + var e = a(35437); + var l = a(19514); + var y = a(44990); + var z = a(80627); + var h = a(87122); + var d = a(11382); + var i = a(60232); + var S = a(1521); + var T = a(63079); + var U = a(67106); + var V = a(39817); + var W = a(17679); + var X = a(83941); + var Y = a(89343); + var Z = a(74981); + var $ = a(10482); + var _ = a(72729); + var aa = a(93608); + var ab = a(18255); + var A = a(25732); + var B = a(13463); + var m = a(33954); + var C = a(19724); + var n = a(24722); + var o = a(94770); + var p = a(44096); + var g = a(78109); + var f = a(61011); + var D = a(16735); + var E = a(38276); + var ac = a(67045); + var F = a(81019); + var G = a(52301); + var ad = a(71309); + var H = a(77875); + var q = a(44670); + var I = a(48499).forEach; + var J = D("hidden"); + var j = "Symbol"; + var c = "prototype"; + var r = F("toPrimitive"); + var ae = q.set; + var af = q.getterFor(j); + var K = Object[c]; + var b = l.Symbol; + var L = y("JSON", "stringify"); + var ag = n.f; + var s = o.f; + var ah = m.f; + var ai = p.f; + var aj = f("symbols"); + var ak = f("op-symbols"); + var al = f("string-to-symbol-registry"); + var am = f("symbol-to-string-registry"); + var M = f("wks"); + var k = l.QObject; + var an = !k || !k[c] || !k[c].findChild; + var ao = h && i(function() { + return (ab(s({}, "a", { + get: function() { + return s(this, "a", { + value: 7 + }).a; + } + })).a != 7); + }) ? function(c, a, d) { + var b = ag(K, a); + if (b) delete K[a]; + s(c, a, d); + if (b && c !== K) { + s(K, a, b); + } + } : s; + var ap = function(d, e) { + var a = (aj[d] = ab(b[c])); + ae(a, { + type: j, + tag: d, + description: e + }); + if (!h) a.description = e; + return a; + }; + var t = function e(a, d, b) { + if (a === K) t(ak, d, b); + X(a); + var c = $(d); + X(b); + if (S(aj, c)) { + if (!b.enumerable) { + if (!S(a, J)) s(a, J, aa(1, {})); + a[J][c] = true; + } else { + if (S(a, J) && a[J][c]) a[J][c] = false; + b = ab(b, { + enumerable: aa(0, false) + }); + } + return ao(a, c, b); + } + return s(a, c, b); + }; + var N = function e(a, c) { + X(a); + var b = Z(c); + var d = A(b).concat(x(b)); + I(d, function(c) { + if (!h || u.call(b, c)) t(a, c, b[c]); + }); + return a; + }; + var O = function c(a, b) { + return b === undefined ? ab(a) : N(ab(a), b); + }; + var u = function d(c) { + var a = $(c); + var b = ai.call(this, a); + if (this === K && S(aj, a) && !S(ak, a)) return false; + return b || !S(this, a) || !S(aj, a) || (S(this, J) && this[J][a]) ? b : true; + }; + var v = function f(d, e) { + var b = Z(d); + var a = $(e); + if (b === K && S(aj, a) && !S(ak, a)) return; + var c = ag(b, a); + if (c && S(aj, a) && !(S(b, J) && b[J][a])) { + c.enumerable = true; + } + return c; + }; + var w = function d(a) { + var b = ah(Z(a)); + var c = []; + I(b, function(a) { + if (!S(aj, a) && !S(E, a)) c.push(a); + }); + return c; + }; + var x = function e(a) { + var b = a === K; + var c = ah(b ? ak : Z(a)); + var d = []; + I(c, function(a) { + if (S(aj, a) && (!b || S(K, a))) { + d.push(aj[a]); + } + }); + return d; + }; + if (!d) { + b = function e() { + if (this instanceof b) throw TypeError("Symbol is not a constructor"); + var a = !arguments.length || arguments[0] === undefined ? undefined : _(arguments[0]); + var c = ac(a); + var d = function(a) { + if (this === K) d.call(ak, a); + if (S(this, J) && S(this[J], c)) this[J][c] = false; + ao(this, c, aa(1, a)); + }; + if (h && an) ao(K, c, { + configurable: true, + set: d + }); + return ap(c, a); + }; + g(b[c], "toString", function a() { + return af(this).tag; + }); + g(b, "withoutSetter", function(a) { + return ap(ac(a), a); + }); + p.f = u; + o.f = t; + n.f = v; + B.f = m.f = w; + C.f = x; + G.f = function(a) { + return ap(F(a), a); + }; + if (h) { + s(b[c], "description", { + configurable: true, + get: function a() { + return af(this).description; + } + }); + if (!z) { + g(K, "propertyIsEnumerable", u, { + unsafe: true + }); + } + } + } + e({ + global: true, + wrap: true, + forced: !d, + sham: !d + }, { + Symbol: b + }); + I(A(M), function(a) { + ad(a); + }); + e({ + target: j, + stat: true, + forced: !d + }, { + for: function(d) { + var a = _(d); + if (S(al, a)) return al[a]; + var c = b(a); + al[a] = c; + am[c] = a; + return c; + }, + keyFor: function b(a) { + if (!W(a)) throw TypeError(a + " is not a symbol"); + if (S(am, a)) return am[a]; + }, + useSetter: function() { + an = true; + }, + useSimple: function() { + an = false; + } + }); + e({ + target: "Object", + stat: true, + forced: !d, + sham: !h + }, { + create: O, + defineProperty: t, + defineProperties: N, + getOwnPropertyDescriptor: v + }); + e({ + target: "Object", + stat: true, + forced: !d + }, { + getOwnPropertyNames: w, + getOwnPropertySymbols: x + }); + e({ + target: "Object", + stat: true, + forced: i(function() { + C.f(1); + }) + }, { + getOwnPropertySymbols: function b(a) { + return C.f(Y(a)); + } + }); + if (L) { + var P = !d || i(function() { + var a = b(); + return (L([ + a + ]) != "[null]" || L({ + a: a + }) != "{}" || L(Object(a)) != "{}"); + }); + e({ + target: "JSON", + stat: true, + forced: P + }, { + stringify: function f(b, a, g) { + var c = [ + b + ]; + var d = 1; + var e; + while(arguments.length > d)c.push(arguments[d++]); + e = a; + if ((!V(a) && b === undefined) || W(b)) return; + if (!T(a)) a = function(b, a) { + if (U(e)) a = e.call(this, b, a); + if (!W(a)) return a; + }; + c[1] = a; + return L.apply(null, c); + } + }); + } + if (!b[c][r]) { + var aq = b[c].valueOf; + g(b[c], r, function() { + return aq.apply(this, arguments); + }); + } + H(b, j); + E[J] = true; + }, + 84495: function(c, d, a) { + var b = a(71309); + b("matchAll"); + }, + 42931: function(c, d, a) { + var b = a(71309); + b("match"); + }, + 90622: function(c, d, a) { + var b = a(71309); + b("replace"); + }, + 15128: function(c, d, a) { + var b = a(71309); + b("search"); + }, + 66775: function(c, d, a) { + var b = a(71309); + b("species"); + }, + 86053: function(c, d, a) { + var b = a(71309); + b("split"); + }, + 25974: function(c, d, a) { + var b = a(71309); + b("toPrimitive"); + }, + 81375: function(c, d, a) { + var b = a(71309); + b("toStringTag"); + }, + 4712: function(c, d, a) { + var b = a(71309); + b("unscopables"); + }, + 56598: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(31998); + var g = a(86361); + var h = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("at", function i(e) { + var c = h(this); + var d = f(c.length); + var a = g(e); + var b = a >= 0 ? a : d + a; + return b < 0 || b >= d ? undefined : c[b]; + }); + }, + 90898: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(8077); + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("copyWithin", function c(a, b) { + return f.call(g(this), a, b, arguments.length > 2 ? arguments[2] : undefined); + }); + }, + 29070: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).every; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("every", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 64217: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(50270); + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("fill", function a(b) { + return f.apply(g(this), arguments); + }); + }, + 13666: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).filter; + var g = a(38671); + var h = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("filter", function c(a) { + var b = f(h(this), a, arguments.length > 1 ? arguments[1] : undefined); + return g(this, b); + }); + }, + 69114: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).findIndex; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("findIndex", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 401: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).find; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("find", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 32893: function(c, d, a) { + var b = a(58158); + b("Float32", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 96184: function(c, d, a) { + var b = a(58158); + b("Float64", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 83912: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).forEach; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("forEach", function b(a) { + f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 24314: function(e, f, a) { + "use strict"; + var b = a(10158); + var c = a(4351).exportTypedArrayStaticMethod; + var d = a(26471); + c("from", d, b); + }, + 96663: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(44517).includes; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("includes", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 10915: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(44517).indexOf; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("indexOf", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 73435: function(c, d, a) { + var b = a(58158); + b("Int16", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 82406: function(c, d, a) { + var b = a(58158); + b("Int32", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 36507: function(c, d, a) { + var b = a(58158); + b("Int8", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 81786: function(m, n, a) { + "use strict"; + var k = a(19514); + var d = a(25160).PROPER; + var e = a(4351); + var c = a(17384); + var l = a(81019); + var f = l("iterator"); + var g = k.Uint8Array; + var o = c.values; + var p = c.keys; + var q = c.entries; + var r = e.aTypedArray; + var b = e.exportTypedArrayMethod; + var h = g && g.prototype[f]; + var i = !!h && h.name === "values"; + var j = function a() { + return o.call(r(this)); + }; + b("entries", function a() { + return q.call(r(this)); + }); + b("keys", function a() { + return p.call(r(this)); + }); + b("values", j, d && !i); + b(f, j, d && !i); + }, + 34257: function(d, e, b) { + "use strict"; + var a = b(4351); + var f = a.aTypedArray; + var c = a.exportTypedArrayMethod; + var g = [].join; + c("join", function a(b) { + return g.apply(f(this), arguments); + }); + }, + 66585: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(74514); + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("lastIndexOf", function a(b) { + return f.apply(g(this), arguments); + }); + }, + 23114: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).map; + var g = a(50554); + var h = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("map", function b(a) { + return f(h(this), a, arguments.length > 1 ? arguments[1] : undefined, function(a, b) { + return new (g(a))(b); + }); + }); + }, + 60222: function(e, f, a) { + "use strict"; + var b = a(4351); + var c = a(10158); + var g = b.aTypedArrayConstructor; + var d = b.exportTypedArrayStaticMethod; + d("of", function d() { + var a = 0; + var b = arguments.length; + var c = new (g(this))(b); + while(b > a)c[a] = arguments[a++]; + return c; + }, c); + }, + 85710: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(70591).right; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("reduceRight", function b(a) { + return f(g(this), a, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 23554: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(70591).left; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("reduce", function b(a) { + return f(g(this), a, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 47167: function(d, e, b) { + "use strict"; + var a = b(4351); + var f = a.aTypedArray; + var c = a.exportTypedArrayMethod; + var g = Math.floor; + c("reverse", function h() { + var a = this; + var b = f(a).length; + var e = g(b / 2); + var c = 0; + var d; + while(c < e){ + d = a[c]; + a[c++] = a[--b]; + a[b] = d; + } + return a; + }); + }, + 17945: function(f, g, a) { + "use strict"; + var b = a(4351); + var h = a(31998); + var i = a(11729); + var j = a(89343); + var c = a(60232); + var k = b.aTypedArray; + var d = b.exportTypedArrayMethod; + var e = c(function() { + new Int8Array(1).set({}); + }); + d("set", function g(e) { + k(this); + var b = i(arguments.length > 1 ? arguments[1] : undefined, 1); + var f = this.length; + var c = j(e); + var d = h(c.length); + var a = 0; + if (d + b > f) throw RangeError("Wrong length"); + while(a < d)this[b + a] = c[a++]; + }, e); + }, + 1987: function(f, g, a) { + "use strict"; + var b = a(4351); + var h = a(50554); + var c = a(60232); + var i = b.aTypedArray; + var d = b.exportTypedArrayMethod; + var j = [].slice; + var e = c(function() { + new Int8Array(1).slice(); + }); + d("slice", function k(e, f) { + var b = j.call(i(this), e, f); + var g = h(this); + var a = 0; + var c = b.length; + var d = new g(c); + while(c > a)d[a] = b[a++]; + return d; + }, e); + }, + 69691: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(48499).some; + var g = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("some", function b(a) { + return f(g(this), a, arguments.length > 1 ? arguments[1] : undefined); + }); + }, + 78294: function(j, k, a) { + "use strict"; + var b = a(4351); + var f = a(19514); + var c = a(60232); + var l = a(74618); + var m = a(31998); + var n = a(1978); + var o = a(15546); + var p = a(13497); + var q = a(50661); + var r = a(34884); + var s = b.aTypedArray; + var g = b.exportTypedArrayMethod; + var d = f.Uint16Array; + var e = d && d.prototype.sort; + var h = !!e && !c(function() { + var a = new d(2); + a.sort(null); + a.sort({}); + }); + var i = !!e && !c(function() { + if (q) return q < 74; + if (o) return o < 67; + if (p) return true; + if (r) return r < 602; + var b = new d(516); + var c = Array(516); + var a, e; + for(a = 0; a < 516; a++){ + e = a % 4; + b[a] = 515 - a; + c[a] = a - 2 * e + 3; + } + b.sort(function(a, b) { + return ((a / 4) | 0) - ((b / 4) | 0); + }); + for(a = 0; a < 516; a++){ + if (b[a] !== c[a]) return true; + } + }); + var t = function(a) { + return function(b, c) { + if (a !== undefined) return +a(b, c) || 0; + if (c !== c) return -1; + if (b !== b) return 1; + if (b === 0 && c === 0) return 1 / b > 0 && 1 / c < 0 ? 1 : -1; + return b > c; + }; + }; + g("sort", function g(c) { + var b = this; + if (c !== undefined) l(c); + if (i) return e.call(b, c); + s(b); + var d = m(b.length); + var f = Array(d); + var a; + for(a = 0; a < d; a++){ + f[a] = b[a]; + } + f = n(b, t(c)); + for(a = 0; a < d; a++){ + b[a] = f[a]; + } + return b; + }, !i || h); + }, + 42491: function(d, e, a) { + "use strict"; + var b = a(4351); + var f = a(31998); + var g = a(62965); + var h = a(50554); + var i = b.aTypedArray; + var c = b.exportTypedArrayMethod; + c("subarray", function k(e, c) { + var a = i(this); + var b = a.length; + var d = g(e, b); + var j = h(a); + return new j(a.buffer, a.byteOffset + d * a.BYTES_PER_ELEMENT, f((c === undefined ? b : g(c, b)) - d)); + }); + }, + 74412: function(h, i, a) { + "use strict"; + var d = a(19514); + var c = a(4351); + var b = a(60232); + var e = d.Int8Array; + var j = c.aTypedArray; + var f = c.exportTypedArrayMethod; + var k = [].toLocaleString; + var l = [].slice; + var m = !!e && b(function() { + k.call(new e(1)); + }); + var g = b(function() { + return ([ + 1, + 2 + ].toLocaleString() != new e([ + 1, + 2 + ]).toLocaleString()); + }) || !b(function() { + e.prototype.toLocaleString.call([ + 1, + 2 + ]); + }); + f("toLocaleString", function a() { + return k.apply(m ? l.call(j(this)) : j(this), arguments); + }, g); + }, + 37797: function(i, j, a) { + "use strict"; + var d = a(4351).exportTypedArrayMethod; + var e = a(60232); + var f = a(19514); + var c = f.Uint8Array; + var g = (c && c.prototype) || {}; + var b = [].toString; + var k = [].join; + if (e(function() { + b.call({}); + })) { + b = function a() { + return k.call(this); + }; + } + var h = g.toString != b; + d("toString", b, h); + }, + 20972: function(c, d, a) { + var b = a(58158); + b("Uint16", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 29049: function(c, d, a) { + var b = a(58158); + b("Uint32", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 97846: function(c, d, a) { + var b = a(58158); + b("Uint8", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }); + }, + 57395: function(c, d, a) { + var b = a(58158); + b("Uint8", function(a) { + return function e(b, c, d) { + return a(this, b, c, d); + }; + }, true); + }, + 68425: function(c, d, a) { + "use strict"; + var b = a(35437); + var e = a(72729); + var f = String.fromCharCode; + var g = /^[\da-f]{2}$/i; + var h = /^[\da-f]{4}$/i; + b({ + global: true + }, { + unescape: function l(j) { + var c = e(j); + var d = ""; + var k = c.length; + var a = 0; + var i, b; + while(a < k){ + i = c.charAt(a++); + if (i === "%") { + if (c.charAt(a) === "u") { + b = c.slice(a + 1, a + 5); + if (h.test(b)) { + d += f(parseInt(b, 16)); + a += 5; + continue; + } + } else { + b = c.slice(a, a + 2); + if (g.test(b)) { + d += f(parseInt(b, 16)); + a += 2; + continue; + } + } + } + d += i; + } + return d; + } + }); + }, + 74445: function(f, n, a) { + "use strict"; + var c = a(19514); + var g = a(59855); + var h = a(19322); + var i = a(6807); + var d = a(85653); + var o = a(39817); + var p = a(44670).enforce; + var j = a(83165); + var k = !c.ActiveXObject && "ActiveXObject" in c; + var q = Object.isExtensible; + var l; + var e = function(a) { + return function b() { + return a(this, arguments.length ? arguments[0] : undefined); + }; + }; + var m = (f.exports = i("WeakMap", e, d)); + if (j && k) { + l = d.getConstructor(e, "WeakMap", true); + h.enable(); + var b = m.prototype; + var r = b["delete"]; + var s = b.has; + var t = b.get; + var u = b.set; + g(b, { + delete: function(a) { + if (o(a) && !q(a)) { + var b = p(this); + if (!b.frozen) b.frozen = new l(); + return (r.call(this, a) || b.frozen["delete"](a)); + } + return r.call(this, a); + }, + has: function c(a) { + if (o(a) && !q(a)) { + var b = p(this); + if (!b.frozen) b.frozen = new l(); + return (s.call(this, a) || b.frozen.has(a)); + } + return s.call(this, a); + }, + get: function c(a) { + if (o(a) && !q(a)) { + var b = p(this); + if (!b.frozen) b.frozen = new l(); + return s.call(this, a) ? t.call(this, a) : b.frozen.get(a); + } + return t.call(this, a); + }, + set: function d(a, b) { + if (o(a) && !q(a)) { + var c = p(this); + if (!c.frozen) c.frozen = new l(); + s.call(this, a) ? u.call(this, a, b) : c.frozen.set(a, b); + } else u.call(this, a, b); + return this; + } + }); + } + }, + 65195: function(d, e, a) { + "use strict"; + var b = a(6807); + var c = a(85653); + b("WeakSet", function(a) { + return function b() { + return a(this, arguments.length ? arguments[0] : undefined); + }; + }, c); + }, + 74769: function(g, h, a) { + var b = a(19514); + var e = a(69379); + var f = a(13724); + var i = a(85811); + var j = a(48181); + var c = function(a) { + if (a && a.forEach !== i) try { + j(a, "forEach", i); + } catch (b) { + a.forEach = i; + } + }; + for(var d in e){ + c(b[d] && b[d].prototype); + } + c(f); + }, + 55715: function(i, j, a) { + var c = a(19514); + var f = a(69379); + var g = a(13724); + var h = a(17384); + var k = a(48181); + var d = a(81019); + var l = d("iterator"); + var m = d("toStringTag"); + var n = h.values; + var e = function(a, c) { + if (a) { + if (a[l] !== n) try { + k(a, l, n); + } catch (d) { + a[l] = n; + } + if (!a[m]) { + k(a, m, c); + } + if (f[c]) for(var b in h){ + if (a[b] !== h[b]) try { + k(a, b, h[b]); + } catch (e) { + a[b] = h[b]; + } + } + } + }; + for(var b in f){ + e(c[b] && c[b].prototype, b); + } + e(g, "DOMTokenList"); + }, + 44618: function(f, g, a) { + var d = a(35437); + var b = a(19514); + var c = a(46660); + var e = !b.setImmediate || !b.clearImmediate; + d({ + global: true, + bind: true, + enumerable: true, + forced: e + }, { + setImmediate: c.set, + clearImmediate: c.clear + }); + }, + 45939: function(d, e, a) { + var b = a(35437); + var c = a(19514); + var f = a(50277); + var g = a(96590); + var h = c.process; + b({ + global: true, + enumerable: true, + noTargetGet: true + }, { + queueMicrotask: function c(a) { + var b = g && h.domain; + f(b ? b.bind(a) : a); + } + }); + }, + 81552: function(g, h, a) { + var d = a(35437); + var b = a(19514); + var i = a(67106); + var e = a(59116); + var j = [].slice; + var f = /MSIE .\./.test(e); + var c = function(a) { + return function(c, d) { + var b = arguments.length > 2; + var e = b ? j.call(arguments, 2) : undefined; + return a(b ? function() { + (i(c) ? c : Function(c)).apply(this, e); + } : c, d); + }; + }; + d({ + global: true, + bind: true, + forced: f + }, { + setTimeout: c(b.setTimeout), + setInterval: c(b.setInterval) + }); + }, + 79085: function(n, x, a) { + "use strict"; + a(17384); + var d = a(35437); + var e = a(44990); + var k = a(62902); + var l = a(78109); + var o = a(59855); + var p = a(77875); + var q = a(10536); + var f = a(44670); + var y = a(51819); + var g = a(67106); + var z = a(1521); + var A = a(59561); + var B = a(85983); + var C = a(83941); + var D = a(39817); + var E = a(72729); + var F = a(18255); + var G = a(93608); + var H = a(11661); + var I = a(99422); + var r = a(81019); + var s = e("fetch"); + var h = e("Request"); + var m = h && h.prototype; + var t = e("Headers"); + var u = r("iterator"); + var i = "URLSearchParams"; + var v = i + "Iterator"; + var J = f.set; + var w = f.getterFor(i); + var K = f.getterFor(v); + var L = /\+/g; + var M = Array(4); + var N = function(a) { + return (M[a - 1] || (M[a - 1] = RegExp("((?:%[\\da-f]{2}){" + a + "})", "gi"))); + }; + var O = function(a) { + try { + return decodeURIComponent(a); + } catch (b) { + return a; + } + }; + var P = function(c) { + var a = c.replace(L, " "); + var b = 4; + try { + return decodeURIComponent(a); + } catch (d) { + while(b){ + a = a.replace(N(b--), O); + } + return a; + } + }; + var Q = /[!'()~]|%20/g; + var R = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+" + }; + var S = function(a) { + return R[a]; + }; + var T = function(a) { + return encodeURIComponent(a).replace(Q, S); + }; + var U = function(f, c) { + if (c) { + var d = c.split("&"); + var e = 0; + var a, b; + while(e < d.length){ + a = d[e++]; + if (a.length) { + b = a.split("="); + f.push({ + key: P(b.shift()), + value: P(b.join("=")) + }); + } + } + } + }; + var V = function(a) { + this.entries.length = 0; + U(this.entries, a); + }; + var W = function(a, b) { + if (a < b) throw TypeError("Not enough arguments"); + }; + var X = q(function c(a, b) { + J(this, { + type: v, + iterator: H(w(a).entries), + kind: b + }); + }, "Iterator", function e() { + var c = K(this); + var d = c.kind; + var a = c.iterator.next(); + var b = a.value; + if (!a.done) { + a.value = d === "keys" ? b.key : d === "values" ? b.value : [ + b.key, + b.value + ]; + } + return a; + }); + var b = function o() { + y(this, b, i); + var a = arguments.length > 0 ? arguments[0] : undefined; + var n = this; + var d = []; + var g, h, j, k, c, e, l, m, f; + J(n, { + type: i, + entries: d, + updateURL: function() {}, + updateSearchParams: V + }); + if (a !== undefined) { + if (D(a)) { + g = I(a); + if (g) { + h = H(a, g); + j = h.next; + while(!(k = j.call(h)).done){ + c = H(C(k.value)); + e = c.next; + if ((l = e.call(c)).done || (m = e.call(c)).done || !e.call(c).done) throw TypeError("Expected sequence with length 2"); + d.push({ + key: E(l.value), + value: E(m.value) + }); + } + } else for(f in a)if (z(a, f)) d.push({ + key: f, + value: E(a[f]) + }); + } else { + U(d, typeof a === "string" ? a.charAt(0) === "?" ? a.slice(1) : a : E(a)); + } + } + }; + var c = b.prototype; + o(c, { + append: function d(b, c) { + W(arguments.length, 2); + var a = w(this); + a.entries.push({ + key: E(b), + value: E(c) + }); + a.updateURL(); + }, + delete: function(d) { + W(arguments.length, 1); + var c = w(this); + var b = c.entries; + var e = E(d); + var a = 0; + while(a < b.length){ + if (b[a].key === e) b.splice(a, 1); + else a++; + } + c.updateURL(); + }, + get: function e(c) { + W(arguments.length, 1); + var b = w(this).entries; + var d = E(c); + var a = 0; + for(; a < b.length; a++){ + if (b[a].key === d) return b[a].value; + } + return null; + }, + getAll: function f(d) { + W(arguments.length, 1); + var b = w(this).entries; + var e = E(d); + var c = []; + var a = 0; + for(; a < b.length; a++){ + if (b[a].key === e) c.push(b[a].value); + } + return c; + }, + has: function e(c) { + W(arguments.length, 1); + var a = w(this).entries; + var d = E(c); + var b = 0; + while(b < a.length){ + if (a[b++].key === d) return true; + } + return false; + }, + set: function j(h, i) { + W(arguments.length, 1); + var e = w(this); + var a = e.entries; + var c = false; + var f = E(h); + var g = E(i); + var b = 0; + var d; + for(; b < a.length; b++){ + d = a[b]; + if (d.key === f) { + if (c) a.splice(b--, 1); + else { + c = true; + d.value = g; + } + } + } + if (!c) a.push({ + key: f, + value: g + }); + e.updateURL(); + }, + sort: function g() { + var e = w(this); + var c = e.entries; + var f = c.slice(); + var d, a, b; + c.length = 0; + for(b = 0; b < f.length; b++){ + d = f[b]; + for(a = 0; a < b; a++){ + if (c[a].key > d.key) { + c.splice(a, 0, d); + break; + } + } + if (a === b) c.push(d); + } + e.updateURL(); + }, + forEach: function f(d) { + var b = w(this).entries; + var e = A(d, arguments.length > 1 ? arguments[1] : undefined, 3); + var c = 0; + var a; + while(c < b.length){ + a = b[c++]; + e(a.value, a.key, this); + } + }, + keys: function a() { + return new X(this, "keys"); + }, + values: function a() { + return new X(this, "values"); + }, + entries: function a() { + return new X(this, "entries"); + } + }, { + enumerable: true + }); + l(c, u, c.entries, { + name: "entries" + }); + l(c, "toString", function e() { + var b = w(this).entries; + var c = []; + var d = 0; + var a; + while(d < b.length){ + a = b[d++]; + c.push(T(a.key) + "=" + T(a.value)); + } + return c.join("&"); + }, { + enumerable: true + }); + p(b, i); + d({ + global: true, + forced: !k + }, { + URLSearchParams: b + }); + if (!k && g(t)) { + var Y = function(a) { + if (D(a)) { + var c = a.body; + var b; + if (B(c) === i) { + b = a.headers ? new t(a.headers) : new t(); + if (!b.has("content-type")) { + b.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); + } + return F(a, { + body: G(0, String(c)), + headers: G(0, b) + }); + } + } + return a; + }; + if (g(s)) { + d({ + global: true, + enumerable: true, + forced: true + }, { + fetch: function b(a) { + return s(a, arguments.length > 1 ? Y(arguments[1]) : {}); + } + }); + } + if (g(h)) { + var j = function b(a) { + y(this, j, "Request"); + return new h(a, arguments.length > 1 ? Y(arguments[1]) : {}); + }; + m.constructor = j; + j.prototype = m; + d({ + global: true, + forced: true + }, { + Request: j + }); + } + } + n.exports = { + URLSearchParams: b, + getState: w + }; + }, + 8819: function(G, H, a) { + "use strict"; + a(94616); + var k = a(35437); + var h = a(87122); + var l = a(62902); + var m = a(19514); + var n = a(68381); + var d = a(78109); + var I = a(51819); + var J = a(1521); + var e = a(59038); + var K = a(83581); + var L = a(88668).codeAt; + var M = a(41075); + var N = a(72729); + var o = a(77875); + var i = a(79085); + var j = a(44670); + var f = m.URL; + var O = i.URLSearchParams; + var P = i.getState; + var Q = j.set; + var R = j.getterFor("URL"); + var S = Math.floor; + var T = Math.pow; + var U = "Invalid authority"; + var V = "Invalid scheme"; + var W = "Invalid host"; + var X = "Invalid port"; + var Y = /[A-Za-z]/; + var Z = /[\d+-.A-Za-z]/; + var $ = /\d/; + var _ = /^0x/i; + var aa = /^[0-7]+$/; + var ab = /^\d+$/; + var ac = /^[\dA-Fa-f]+$/; + var ad = /[\0\t\n\r #%/:<>?@[\\\]^|]/; + var ae = /[\0\t\n\r #/:<>?@[\\\]^|]/; + var af = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g; + var ag = /[\t\n\r]/g; + var ah; + var ai = function(c, a) { + var b, e, d; + if (a.charAt(0) == "[") { + if (a.charAt(a.length - 1) != "]") return W; + b = ak(a.slice(1, -1)); + if (!b) return W; + c.host = b; + } else if (!aq(c)) { + if (ae.test(a)) return W; + b = ""; + e = K(a); + for(d = 0; d < e.length; d++){ + b += ao(e[d], p); + } + c.host = b; + } else { + a = M(a); + if (ad.test(a)) return W; + b = aj(a); + if (b === null) return W; + c.host = b; + } + }; + var aj = function(h) { + var c = h.split("."); + var d, e, a, b, f, g, i; + if (c.length && c[c.length - 1] == "") { + c.pop(); + } + d = c.length; + if (d > 4) return h; + e = []; + for(a = 0; a < d; a++){ + b = c[a]; + if (b == "") return h; + f = 10; + if (b.length > 1 && b.charAt(0) == "0") { + f = _.test(b) ? 16 : 8; + b = b.slice(f == 8 ? 1 : 2); + } + if (b === "") { + g = 0; + } else { + if (!(f == 10 ? ab : f == 8 ? aa : ac).test(b)) return h; + g = parseInt(b, f); + } + e.push(g); + } + for(a = 0; a < d; a++){ + g = e[a]; + if (a == d - 1) { + if (g >= T(256, 5 - d)) return null; + } else if (g > 255) return null; + } + i = e.pop(); + for(a = 0; a < e.length; a++){ + i += e[a] * T(256, 3 - a); + } + return i; + }; + var ak = function(m) { + var c = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var a = 0; + var e = null; + var f = 0; + var i, h, g, d, k, j, l; + var b = function() { + return m.charAt(f); + }; + if (b() == ":") { + if (m.charAt(1) != ":") return; + f += 2; + a++; + e = a; + } + while(b()){ + if (a == 8) return; + if (b() == ":") { + if (e !== null) return; + f++; + a++; + e = a; + continue; + } + i = h = 0; + while(h < 4 && ac.test(b())){ + i = i * 16 + parseInt(b(), 16); + f++; + h++; + } + if (b() == ".") { + if (h == 0) return; + f -= h; + if (a > 6) return; + g = 0; + while(b()){ + d = null; + if (g > 0) { + if (b() == "." && g < 4) f++; + else return; + } + if (!$.test(b())) return; + while($.test(b())){ + k = parseInt(b(), 10); + if (d === null) d = k; + else if (d == 0) return; + else d = d * 10 + k; + if (d > 255) return; + f++; + } + c[a] = c[a] * 256 + d; + g++; + if (g == 2 || g == 4) a++; + } + if (g != 4) return; + break; + } else if (b() == ":") { + f++; + if (!b()) return; + } else if (b()) return; + c[a++] = i; + } + if (e !== null) { + j = a - e; + a = 7; + while(a != 0 && j > 0){ + l = c[a]; + c[a--] = c[e + j - 1]; + c[e + --j] = l; + } + } else if (a != 8) return; + return c; + }; + var al = function(f) { + var e = null; + var c = 1; + var b = null; + var a = 0; + var d = 0; + for(; d < 8; d++){ + if (f[d] !== 0) { + if (a > c) { + e = b; + c = a; + } + b = null; + a = 0; + } else { + if (b === null) b = d; + ++a; + } + } + if (a > c) { + e = b; + c = a; + } + return e; + }; + var am = function(b) { + var c, a, e, d; + if (typeof b == "number") { + c = []; + for(a = 0; a < 4; a++){ + c.unshift(b % 256); + b = S(b / 256); + } + return c.join("."); + } else if (typeof b == "object") { + c = ""; + e = al(b); + for(a = 0; a < 8; a++){ + if (d && b[a] === 0) continue; + if (d) d = false; + if (e === a) { + c += a ? ":" : "::"; + d = true; + } else { + c += b[a].toString(16); + if (a < 7) c += ":"; + } + } + return "[" + c + "]"; + } + return b; + }; + var p = {}; + var q = e({}, p, { + " ": 1, + '"': 1, + "<": 1, + ">": 1, + "`": 1 + }); + var r = e({}, q, { + "#": 1, + "?": 1, + "{": 1, + "}": 1 + }); + var an = e({}, r, { + "/": 1, + ":": 1, + ";": 1, + "=": 1, + "@": 1, + "[": 1, + "\\": 1, + "]": 1, + "^": 1, + "|": 1 + }); + var ao = function(a, c) { + var b = L(a, 0); + return b > 0x20 && b < 0x7f && !J(c, a) ? a : encodeURIComponent(a); + }; + var ap = { + ftp: 21, + file: null, + http: 80, + https: 443, + ws: 80, + wss: 443 + }; + var aq = function(a) { + return J(ap, a.scheme); + }; + var ar = function(a) { + return a.username != "" || a.password != ""; + }; + var as = function(a) { + return (!a.host || a.cannotBeABaseURL || a.scheme == "file"); + }; + var at = function(a, c) { + var b; + return (a.length == 2 && Y.test(a.charAt(0)) && ((b = a.charAt(1)) == ":" || (!c && b == "|"))); + }; + var au = function(a) { + var b; + return (a.length > 1 && at(a.slice(0, 2)) && (a.length == 2 || (b = a.charAt(2)) === "/" || b === "\\" || b === "?" || b === "#")); + }; + var av = function(b) { + var a = b.path; + var c = a.length; + if (c && (b.scheme != "file" || c != 1 || !at(a[0], true))) { + a.pop(); + } + }; + var aw = function(a) { + return a === "." || a.toLowerCase() === "%2e"; + }; + var ax = function(a) { + a = a.toLowerCase(); + return (a === ".." || a === "%2e." || a === ".%2e" || a === "%2e%2e"); + }; + var ay = {}; + var az = {}; + var aA = {}; + var aB = {}; + var aC = {}; + var aD = {}; + var aE = {}; + var aF = {}; + var aG = {}; + var aH = {}; + var aI = {}; + var aJ = {}; + var aK = {}; + var aL = {}; + var aM = {}; + var aN = {}; + var aO = {}; + var aP = {}; + var aQ = {}; + var aR = {}; + var aS = {}; + var aT = function(a, j, f, c) { + var d = f || ay; + var g = 0; + var e = ""; + var k = false; + var l = false; + var m = false; + var i, b, n, h; + if (!f) { + a.scheme = ""; + a.username = ""; + a.password = ""; + a.host = null; + a.port = null; + a.path = []; + a.query = null; + a.fragment = null; + a.cannotBeABaseURL = false; + j = j.replace(af, ""); + } + j = j.replace(ag, ""); + i = K(j); + while(g <= i.length){ + b = i[g]; + switch(d){ + case ay: + if (b && Y.test(b)) { + e += b.toLowerCase(); + d = az; + } else if (!f) { + d = aA; + continue; + } else return V; + break; + case az: + if (b && (Z.test(b) || b == "+" || b == "-" || b == ".")) { + e += b.toLowerCase(); + } else if (b == ":") { + if (f && (aq(a) != J(ap, e) || (e == "file" && (ar(a) || a.port !== null)) || (a.scheme == "file" && !a.host))) return; + a.scheme = e; + if (f) { + if (aq(a) && ap[a.scheme] == a.port) a.port = null; + return; + } + e = ""; + if (a.scheme == "file") { + d = aL; + } else if (aq(a) && c && c.scheme == a.scheme) { + d = aB; + } else if (aq(a)) { + d = aF; + } else if (i[g + 1] == "/") { + d = aC; + g++; + } else { + a.cannotBeABaseURL = true; + a.path.push(""); + d = aQ; + } + } else if (!f) { + e = ""; + d = aA; + g = 0; + continue; + } else return V; + break; + case aA: + if (!c || (c.cannotBeABaseURL && b != "#")) return V; + if (c.cannotBeABaseURL && b == "#") { + a.scheme = c.scheme; + a.path = c.path.slice(); + a.query = c.query; + a.fragment = ""; + a.cannotBeABaseURL = true; + d = aS; + break; + } + d = c.scheme == "file" ? aL : aD; + continue; + case aB: + if (b == "/" && i[g + 1] == "/") { + d = aG; + g++; + } else { + d = aD; + continue; + } + break; + case aC: + if (b == "/") { + d = aH; + break; + } else { + d = aP; + continue; + } + case aD: + a.scheme = c.scheme; + if (b == ah) { + a.username = c.username; + a.password = c.password; + a.host = c.host; + a.port = c.port; + a.path = c.path.slice(); + a.query = c.query; + } else if (b == "/" || (b == "\\" && aq(a))) { + d = aE; + } else if (b == "?") { + a.username = c.username; + a.password = c.password; + a.host = c.host; + a.port = c.port; + a.path = c.path.slice(); + a.query = ""; + d = aR; + } else if (b == "#") { + a.username = c.username; + a.password = c.password; + a.host = c.host; + a.port = c.port; + a.path = c.path.slice(); + a.query = c.query; + a.fragment = ""; + d = aS; + } else { + a.username = c.username; + a.password = c.password; + a.host = c.host; + a.port = c.port; + a.path = c.path.slice(); + a.path.pop(); + d = aP; + continue; + } + break; + case aE: + if (aq(a) && (b == "/" || b == "\\")) { + d = aG; + } else if (b == "/") { + d = aH; + } else { + a.username = c.username; + a.password = c.password; + a.host = c.host; + a.port = c.port; + d = aP; + continue; + } + break; + case aF: + d = aG; + if (b != "/" || e.charAt(g + 1) != "/") continue; + g++; + break; + case aG: + if (b != "/" && b != "\\") { + d = aH; + continue; + } + break; + case aH: + if (b == "@") { + if (k) e = "%40" + e; + k = true; + n = K(e); + for(var o = 0; o < n.length; o++){ + var t = n[o]; + if (t == ":" && !m) { + m = true; + continue; + } + var u = ao(t, an); + if (m) a.password += u; + else a.username += u; + } + e = ""; + } else if (b == ah || b == "/" || b == "?" || b == "#" || (b == "\\" && aq(a))) { + if (k && e == "") return U; + g -= K(e).length + 1; + e = ""; + d = aI; + } else e += b; + break; + case aI: + case aJ: + if (f && a.scheme == "file") { + d = aN; + continue; + } else if (b == ":" && !l) { + if (e == "") return W; + h = ai(a, e); + if (h) return h; + e = ""; + d = aK; + if (f == aJ) return; + } else if (b == ah || b == "/" || b == "?" || b == "#" || (b == "\\" && aq(a))) { + if (aq(a) && e == "") return W; + if (f && e == "" && (ar(a) || a.port !== null)) return; + h = ai(a, e); + if (h) return h; + e = ""; + d = aO; + if (f) return; + continue; + } else { + if (b == "[") l = true; + else if (b == "]") l = false; + e += b; + } + break; + case aK: + if ($.test(b)) { + e += b; + } else if (b == ah || b == "/" || b == "?" || b == "#" || (b == "\\" && aq(a)) || f) { + if (e != "") { + var s = parseInt(e, 10); + if (s > 0xffff) return X; + a.port = aq(a) && s === ap[a.scheme] ? null : s; + e = ""; + } + if (f) return; + d = aO; + continue; + } else return X; + break; + case aL: + a.scheme = "file"; + if (b == "/" || b == "\\") d = aM; + else if (c && c.scheme == "file") { + if (b == ah) { + a.host = c.host; + a.path = c.path.slice(); + a.query = c.query; + } else if (b == "?") { + a.host = c.host; + a.path = c.path.slice(); + a.query = ""; + d = aR; + } else if (b == "#") { + a.host = c.host; + a.path = c.path.slice(); + a.query = c.query; + a.fragment = ""; + d = aS; + } else { + if (!au(i.slice(g).join(""))) { + a.host = c.host; + a.path = c.path.slice(); + av(a); + } + d = aP; + continue; + } + } else { + d = aP; + continue; + } + break; + case aM: + if (b == "/" || b == "\\") { + d = aN; + break; + } + if (c && c.scheme == "file" && !au(i.slice(g).join(""))) { + if (at(c.path[0], true)) a.path.push(c.path[0]); + else a.host = c.host; + } + d = aP; + continue; + case aN: + if (b == ah || b == "/" || b == "\\" || b == "?" || b == "#") { + if (!f && at(e)) { + d = aP; + } else if (e == "") { + a.host = ""; + if (f) return; + d = aO; + } else { + h = ai(a, e); + if (h) return h; + if (a.host == "localhost") a.host = ""; + if (f) return; + e = ""; + d = aO; + } + continue; + } else e += b; + break; + case aO: + if (aq(a)) { + d = aP; + if (b != "/" && b != "\\") continue; + } else if (!f && b == "?") { + a.query = ""; + d = aR; + } else if (!f && b == "#") { + a.fragment = ""; + d = aS; + } else if (b != ah) { + d = aP; + if (b != "/") continue; + } + break; + case aP: + if (b == ah || b == "/" || (b == "\\" && aq(a)) || (!f && (b == "?" || b == "#"))) { + if (ax(e)) { + av(a); + if (b != "/" && !(b == "\\" && aq(a))) { + a.path.push(""); + } + } else if (aw(e)) { + if (b != "/" && !(b == "\\" && aq(a))) { + a.path.push(""); + } + } else { + if (a.scheme == "file" && !a.path.length && at(e)) { + if (a.host) a.host = ""; + e = e.charAt(0) + ":"; + } + a.path.push(e); + } + e = ""; + if (a.scheme == "file" && (b == ah || b == "?" || b == "#")) { + while(a.path.length > 1 && a.path[0] === ""){ + a.path.shift(); + } + } + if (b == "?") { + a.query = ""; + d = aR; + } else if (b == "#") { + a.fragment = ""; + d = aS; + } + } else { + e += ao(b, r); + } + break; + case aQ: + if (b == "?") { + a.query = ""; + d = aR; + } else if (b == "#") { + a.fragment = ""; + d = aS; + } else if (b != ah) { + a.path[0] += ao(b, p); + } + break; + case aR: + if (!f && b == "#") { + a.fragment = ""; + d = aS; + } else if (b != ah) { + if (b == "'" && aq(a)) a.query += "%27"; + else if (b == "#") a.query += "%23"; + else a.query += ao(b, p); + } + break; + case aS: + if (b != ah) a.fragment += ao(b, q); + break; + } + g++; + } + }; + var c = function l(i) { + var a = I(this, c, "URL"); + var d = arguments.length > 1 ? arguments[1] : undefined; + var j = N(i); + var e = Q(a, { + type: "URL" + }); + var f, b; + if (d !== undefined) { + if (d instanceof c) f = R(d); + else { + b = aT((f = {}), N(d)); + if (b) throw TypeError(b); + } + } + b = aT(e, j, null, f); + if (b) throw TypeError(b); + var k = (e.searchParams = new O()); + var g = P(k); + g.updateSearchParams(e.query); + g.updateURL = function() { + e.query = String(k) || null; + }; + if (!h) { + a.href = s.call(a); + a.origin = t.call(a); + a.protocol = u.call(a); + a.username = v.call(a); + a.password = w.call(a); + a.host = x.call(a); + a.hostname = y.call(a); + a.port = z.call(a); + a.pathname = A.call(a); + a.search = B.call(a); + a.searchParams = C.call(a); + a.hash = D.call(a); + } + }; + var g = c.prototype; + var s = function() { + var a = R(this); + var d = a.scheme; + var j = a.username; + var e = a.password; + var f = a.host; + var g = a.port; + var c = a.path; + var h = a.query; + var i = a.fragment; + var b = d + ":"; + if (f !== null) { + b += "//"; + if (ar(a)) { + b += j + (e ? ":" + e : "") + "@"; + } + b += am(f); + if (g !== null) b += ":" + g; + } else if (d == "file") b += "//"; + b += a.cannotBeABaseURL ? c[0] : c.length ? "/" + c.join("/") : ""; + if (h !== null) b += "?" + h; + if (i !== null) b += "#" + i; + return b; + }; + var t = function() { + var a = R(this); + var b = a.scheme; + var d = a.port; + if (b == "blob") try { + return new c(b.path[0]).origin; + } catch (e) { + return "null"; + } + if (b == "file" || !aq(a)) return "null"; + return (b + "://" + am(a.host) + (d !== null ? ":" + d : "")); + }; + var u = function() { + return R(this).scheme + ":"; + }; + var v = function() { + return R(this).username; + }; + var w = function() { + return R(this).password; + }; + var x = function() { + var b = R(this); + var a = b.host; + var c = b.port; + return a === null ? "" : c === null ? am(a) : am(a) + ":" + c; + }; + var y = function() { + var a = R(this).host; + return a === null ? "" : am(a); + }; + var z = function() { + var a = R(this).port; + return a === null ? "" : String(a); + }; + var A = function() { + var b = R(this); + var a = b.path; + return b.cannotBeABaseURL ? a[0] : a.length ? "/" + a.join("/") : ""; + }; + var B = function() { + var a = R(this).query; + return a ? "?" + a : ""; + }; + var C = function() { + return R(this).searchParams; + }; + var D = function() { + var a = R(this).fragment; + return a ? "#" + a : ""; + }; + var b = function(a, b) { + return { + get: a, + set: b, + configurable: true, + enumerable: true + }; + }; + if (h) { + n(g, { + href: b(s, function(c) { + var a = R(this); + var d = N(c); + var b = aT(a, d); + if (b) throw TypeError(b); + P(a.searchParams).updateSearchParams(a.query); + }), + origin: b(t), + protocol: b(u, function(a) { + var b = R(this); + aT(b, N(a) + ":", ay); + }), + username: b(v, function(d) { + var a = R(this); + var c = K(N(d)); + if (as(a)) return; + a.username = ""; + for(var b = 0; b < c.length; b++){ + a.username += ao(c[b], an); + } + }), + password: b(w, function(d) { + var a = R(this); + var c = K(N(d)); + if (as(a)) return; + a.password = ""; + for(var b = 0; b < c.length; b++){ + a.password += ao(c[b], an); + } + }), + host: b(x, function(b) { + var a = R(this); + if (a.cannotBeABaseURL) return; + aT(a, N(b), aI); + }), + hostname: b(y, function(b) { + var a = R(this); + if (a.cannotBeABaseURL) return; + aT(a, N(b), aJ); + }), + port: b(z, function(a) { + var b = R(this); + if (as(b)) return; + a = N(a); + if (a == "") b.port = null; + else aT(b, a, aK); + }), + pathname: b(A, function(b) { + var a = R(this); + if (a.cannotBeABaseURL) return; + a.path = []; + aT(a, N(b), aO); + }), + search: b(B, function(a) { + var b = R(this); + a = N(a); + if (a == "") { + b.query = null; + } else { + if ("?" == a.charAt(0)) a = a.slice(1); + b.query = ""; + aT(b, a, aR); + } + P(b.searchParams).updateSearchParams(b.query); + }), + searchParams: b(C), + hash: b(D, function(a) { + var b = R(this); + a = N(a); + if (a == "") { + b.fragment = null; + return; + } + if ("#" == a.charAt(0)) a = a.slice(1); + b.fragment = ""; + aT(b, a, aS); + }) + }); + } + d(g, "toJSON", function a() { + return s.call(this); + }, { + enumerable: true + }); + d(g, "toString", function a() { + return s.call(this); + }, { + enumerable: true + }); + if (f) { + var E = f.createObjectURL; + var F = f.revokeObjectURL; + if (E) d(c, "createObjectURL", function a(b) { + return E.apply(f, arguments); + }); + if (F) d(c, "revokeObjectURL", function a(b) { + return F.apply(f, arguments); + }); + } + o(c, "URL"); + k({ + global: true, + forced: !l, + sham: !h + }, { + URL: c + }); + }, + 54074: function(c, d, a) { + "use strict"; + var b = a(35437); + b({ + target: "URL", + proto: true, + enumerable: true + }, { + toJSON: function a() { + return URL.prototype.toString.call(this); + } + }); + }, + 55787: function(b, c, a) { + a(83823); + a(52699); + a(17402); + a(40095); + a(7739); + a(12775); + a(42931); + a(84495); + a(90622); + a(15128); + a(66775); + a(86053); + a(25974); + a(81375); + a(4712); + a(23895); + a(82546); + a(72996); + a(27668); + a(62202); + a(80500); + a(26648); + a(37742); + a(75202); + a(87334); + a(8887); + a(10936); + a(33362); + a(22928); + a(66507); + a(17287); + a(17384); + a(5607); + a(3334); + a(19994); + a(84279); + a(27849); + a(54706); + a(165); + a(33156); + a(7401); + a(52657); + a(3263); + a(87641); + a(4251); + a(67256); + a(39803); + a(37351); + a(96837); + a(92750); + a(18100); + a(68752); + a(98203); + a(82487); + a(5303); + a(55739); + a(98914); + a(11334); + a(34313); + a(75542); + a(23172); + a(88922); + a(39692); + a(85291); + a(4865); + a(3767); + a(28499); + a(70233); + a(5462); + a(62918); + a(63730); + a(50831); + a(47645); + a(17376); + a(50241); + a(9054); + a(48085); + a(98400); + a(56359); + a(26753); + a(50457); + a(7358); + a(64350); + a(80568); + a(6457); + a(86051); + a(36017); + a(14519); + a(44703); + a(97512); + a(52274); + a(33499); + a(44534); + a(18382); + a(30744); + a(35346); + a(18655); + a(38710); + a(15415); + a(82823); + a(91289); + a(81691); + a(55158); + a(90596); + a(51422); + a(76377); + a(78977); + a(11319); + a(94667); + a(20071); + a(27637); + a(24195); + a(92570); + a(67472); + a(4855); + a(65391); + a(40880); + a(31209); + a(55023); + a(76890); + a(53102); + a(6960); + a(98966); + a(50862); + a(74292); + a(43267); + a(53441); + a(36585); + a(40394); + a(51908); + a(60211); + a(55007); + a(25898); + a(54370); + a(61849); + a(29726); + a(17011); + a(80346); + a(36628); + a(84450); + a(41690); + a(59581); + a(24329); + a(39661); + a(7457); + a(94664); + a(13273); + a(14721); + a(87047); + a(93120); + a(46188); + a(90279); + a(8789); + a(18826); + a(38802); + a(94616); + a(74240); + a(83338); + a(3370); + a(20395); + a(75109); + a(97385); + a(54878); + a(64714); + a(49000); + a(1752); + a(24467); + a(49033); + a(45305); + a(72471); + a(22915); + a(37544); + a(3694); + a(41555); + a(47411); + a(90306); + a(54096); + a(98236); + a(16510); + a(26153); + a(69093); + a(86561); + a(73795); + a(2403); + a(32893); + a(96184); + a(36507); + a(73435); + a(82406); + a(97846); + a(57395); + a(20972); + a(29049); + a(56598); + a(90898); + a(29070); + a(64217); + a(13666); + a(401); + a(69114); + a(83912); + a(24314); + a(96663); + a(10915); + a(81786); + a(34257); + a(66585); + a(23114); + a(60222); + a(23554); + a(85710); + a(47167); + a(17945); + a(1987); + a(69691); + a(78294); + a(42491); + a(74412); + a(37797); + a(68425); + a(74445); + a(65195); + a(74769); + a(55715); + a(44618); + a(45939); + a(81552); + a(8819); + a(54074); + a(79085); + b.exports = a(79574); + }, + 60953: function(n, c, a) { + "use strict"; + a.r(c); + a.d(c, { + RuntimeModule: function() { + return $; + }, + addAppLifeCycle: function() { + return z; + }, + addNativeEventListener: function() { + return ac; + }, + collectAppLifeCycle: function() { + return X; + }, + createBaseApp: function() { + return aa; + }, + createHistory: function() { + return Q; + }, + createUsePageLifeCycle: function() { + return H; + }, + emitLifeCycles: function() { + return M; + }, + getHistory: function() { + return I; + }, + getSearchParams: function() { + return W; + }, + history: function() { + return K; + }, + initAppLifeCycles: function() { + return R; + }, + initHistory: function() { + return P; + }, + pathRedirect: function() { + return U; + }, + registerNativeEventListeners: function() { + return ab; + }, + removeNativeEventListener: function() { + return ad; + }, + setHistory: function() { + return J; + }, + withPageLifeCycle: function() { + return G; + } + }); + var b; + var f = "show"; + var g = "hide"; + var o = "launch"; + var p = "error"; + var q = "notfound"; + var r = "share"; + var s = "tabitemclick"; + var t = "unhandledrejection"; + var u = ((b = {}), (b[f] = "miniapp_pageshow"), (b[g] = "miniapp_pagehide"), b); + var v = { + app: { + rootId: "root" + }, + router: { + type: "hash" + } + }; + var w = function(a) { + return typeof a === "function"; + }; + var x = {}; + function y(c, e) { + var a = []; + for(var b = 2; b < arguments.length; b++){ + a[b - 2] = arguments[b]; + } + if (Object.prototype.hasOwnProperty.call(x, c)) { + var d = x[c]; + if (c === r) { + a[0].content = e ? d[0].call(e, a[1]) : d[0](a[1]); + } else { + d.forEach(function(b) { + e ? b.apply(e, a) : b.apply(void 0, a); + }); + } + } + } + function z(a, b) { + if (w(b)) { + x[a] = x[a] || []; + x[a].push(b); + } + } + var h = { + pathname: "/", + visibilityState: true + }; + var d = { + prev: null, + current: h + }; + Object.defineProperty(d, "current", { + get: function() { + return h; + }, + set: function(a) { + Object.assign(h, a); + } + }); + var A = d; + var B = (undefined && undefined.__extends) || (function() { + var a = function(b, c) { + a = Object.setPrototypeOf || ({ + __proto__: [] + } instanceof Array && function(a, b) { + a.__proto__ = b; + }) || function(c, a) { + for(var b in a)if (Object.prototype.hasOwnProperty.call(a, b)) c[b] = a[b]; + }; + return a(b, c); + }; + return function(c, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + a(c, b); + function d() { + this.constructor = c; + } + c.prototype = b === null ? Object.create(b) : ((d.prototype = b.prototype), new d()); + }; + })(); + var C = {}; + function D(c, d) { + var a; + var b = A.current.pathname; + if (!C[b]) { + C[b] = ((a = {}), (a[f] = []), (a[g] = []), a); + } + C[b][c].push(d); + } + function E(c, a) { + var e; + var f = []; + for(var b = 2; b < arguments.length; b++){ + f[b - 2] = arguments[b]; + } + if (C[a] && C[a][c]) { + for(var d = 0, g = C[a][c].length; d < g; d++){ + (e = C[a][c])[d].apply(e, f); + } + } + } + function F(a) { + return function(b, c) { + a(function() { + if (b === f) { + c(); + } + var a = A.current.pathname; + D(b, c); + return function() { + if (C[a]) { + var d = C[a][b].indexOf(c); + if (d > -1) { + C[a][b].splice(d, 1); + } + } + }; + }, []); + }; + } + function G(a) { + var b = (function(b) { + B(a, b); + function a(c, d) { + var a = b.call(this, c, d) || this; + if (a.onShow) { + a.onShow(); + D(f, a.onShow.bind(a)); + } + if (a.onHide) { + D(g, a.onHide.bind(a)); + } + a.pathname = A.current.pathname; + return a; + } + a.prototype.componentWillUnmount = function() { + var a; + (a = b.prototype.componentWillUnmount) === null || a === void 0 ? void 0 : a.call(this); + C[this.pathname] = null; + }; + return a; + })(a); + b.displayName = "withPageLifeCycle(" + (a.displayName || a.name) + ")"; + return b; + } + function H(a) { + var d = a.useEffect; + var b = function(a) { + F(d)(f, a); + }; + var c = function(a) { + F(d)(g, a); + }; + return { + usePageShow: b, + usePageHide: c + }; + } + var i = { + history: null + }; + function I() { + return i.history; + } + function J(a) { + i.history = a; + } + var K = i.history; + var L = (undefined && undefined.__assign) || function() { + L = Object.assign || function(d) { + for(var a, b = 1, e = arguments.length; b < e; b++){ + a = arguments[b]; + for(var c in a)if (Object.prototype.hasOwnProperty.call(a, c)) d[c] = a[c]; + } + return d; + }; + return L.apply(this, arguments); + }; + function j() { + var a = I(); + var b = a && a.location ? a.location.pathname : typeof window !== "undefined" && window.location.pathname; + A.current = { + pathname: b, + visibilityState: true + }; + y(o); + y(f); + if (a && a.listen) { + a.listen(function(a) { + if (a.pathname !== A.current.pathname) { + A.prev = L({}, A.current); + A.current = { + pathname: a.pathname, + visibilityState: true + }; + A.prev.visibiltyState = false; + E(g, A.prev.pathname); + E(f, A.current.pathname); + } + }); + } + } + var M = j; + var N = a(91520); + var k = function(a) { + return function(b, c) { + if (c === void 0) { + c = null; + } + if (!b.router) { + b.router = v.router; + } + var d = b.router; + var e = d.type, g = e === void 0 ? v.router.type : e, h = d.basename, i = d.history; + var j = c ? c.location : null; + var f = a({ + type: g, + basename: h, + location: j, + customHistory: i + }); + b.router.history = f; + J(f); + }; + }; + var O = a(97671); + var e = function(b) { + var c = b.type, d = b.basename, e = b.location; + var a; + if (O.env.__IS_SERVER__) { + a = (0, N.createMemoryHistory)(); + a.location = e; + } + if (c === "hash") { + a = (0, N.createHashHistory)({ + basename: d + }); + } else if (c === "browser") { + a = (0, N.createBrowserHistory)({ + basename: d + }); + } else { + a = (0, N.createMemoryHistory)(); + } + return a; + }; + var P = k(e); + var Q = e; + function l() { + if (typeof document !== "undefined" && typeof window !== "undefined") { + document.addEventListener("visibilitychange", function() { + var a = I(); + var b = a ? a.location.pathname : A.current.pathname; + if (b === A.current.pathname) { + A.current.visibilityState = !A.current.visibilityState; + if (A.current.visibilityState) { + y(f); + E(f, A.current.pathname); + } else { + E(g, A.current.pathname); + y(g); + } + } + }); + window.addEventListener("error", function(a) { + y(p, null, a.error); + }); + } + } + var R = l; + var S = a(6470); + var T = /[?&]_path=([^&#]+)/i; + function U(c, e) { + var b = ""; + var a = null; + if (S.isWeb && T.test(window.location.search)) { + a = window.location.search.match(T); + } + if (S.isWeex && T.test(window.location.href)) { + a = window.location.href.match(T); + } + if (!a && T.test(c.location.search)) { + a = c.location.search.match(T); + } + var f = false; + b = a ? a[1] : ""; + for(var d = 0, g = e.length; d < g; d++){ + if (b === e[d].path) { + f = true; + break; + } + } + if (b && !f) { + console.warn("Warning: url query `_path` should be an exist path in app.json, see: https://rax.js.org/docs/guide/routes "); + return false; + } + if (b) { + c.replace(b + c.location.search); + } + } + var V = a(20386); + function W(a) { + if (a === void 0) { + a = I(); + } + if (!a && typeof window !== "undefined" && window.history) { + a = window.history; + } + if (a && a.location && a.location.search) { + return V.parse(a.location.search); + } + return {}; + } + function X(b) { + var a = b.app, c = a.onLaunch, d = a.onShow, e = a.onError, h = a.onHide, i = a.onTabItemClick; + z(o, c); + z(f, d); + z(p, e); + z(g, h); + z(s, i); + } + var Y = (undefined && undefined.__assign) || function() { + Y = Object.assign || function(d) { + for(var a, b = 1, e = arguments.length; b < e; b++){ + a = arguments[b]; + for(var c in a)if (Object.prototype.hasOwnProperty.call(a, c)) d[c] = a[c]; + } + return d; + }; + return Y.apply(this, arguments); + }; + var Z = (undefined && undefined.__rest) || function(b, e) { + var d = {}; + for(var a in b)if (Object.prototype.hasOwnProperty.call(b, a) && e.indexOf(a) < 0) d[a] = b[a]; + if (b != null && typeof Object.getOwnPropertySymbols === "function") for(var c = 0, a = Object.getOwnPropertySymbols(b); c < a.length; c++){ + if (e.indexOf(a[c]) < 0 && Object.prototype.propertyIsEnumerable.call(b, a[c])) d[a[c]] = b[a[c]]; + } + return d; + }; + var m = (function() { + function a(a, b, c, d) { + var e = this; + this.registerRuntimeAPI = function(a, b) { + if (e.apiRegistration[a]) { + console.warn("api " + a + " had already been registered"); + } else { + e.apiRegistration[a] = b; + } + }; + this.applyRuntimeAPI = function(b) { + var c; + var d = []; + for(var a = 1; a < arguments.length; a++){ + d[a - 1] = arguments[a]; + } + if (!e.apiRegistration[b]) { + console.warn("unknown api " + b); + } else { + return (c = e.apiRegistration)[b].apply(c, d); + } + }; + this.setRenderApp = function(a) { + e.renderApp = a; + }; + this.wrapperRouterRender = function(a) { + e.renderApp = a(e.renderApp); + }; + this.addProvider = function(a) { + e.AppProvider.push(a); + }; + this.addDOMRender = function(a) { + e.modifyDOMRender = a; + }; + this.modifyRoutes = function(a) { + e.modifyRoutesRegistration.push(a); + }; + this.modifyRoutesComponent = function(a) { + e.routesComponent = a(e.routesComponent); + }; + this.wrapperPageComponent = function(a) { + e.wrapperPageRegistration.push(a); + }; + this.wrapperRoutes = function(a) { + return a.map(function(a) { + if (a.children) { + a.children = e.wrapperRoutes(a.children); + } else if (a.component) { + a.routeWrappers = e.wrapperPageRegistration; + } + return a; + }); + }; + this.getAppComponent = function() { + if (e.modifyRoutesRegistration.length > 0) { + var a = e.wrapperRoutes(e.modifyRoutesRegistration.reduce(function(a, b) { + return b(a); + }, [])); + return e.renderApp(a, e.routesComponent); + } + return e.renderApp(e.wrapperPageRegistration.reduce(function(a, b) { + return b(a); + }, e.appConfig.renderComponent)); + }; + this.AppProvider = []; + this.appConfig = a; + this.buildConfig = b; + this.context = c; + this.staticConfig = d; + this.modifyDOMRender = null; + this.apiRegistration = {}; + this.renderApp = function(a) { + return a; + }; + this.routesComponent = false; + this.modifyRoutesRegistration = []; + this.wrapperPageRegistration = []; + } + a.prototype.loadModule = function(a) { + var c = !this.appConfig.renderComponent; + var b = { + addProvider: this.addProvider, + addDOMRender: this.addDOMRender, + applyRuntimeAPI: this.applyRuntimeAPI, + wrapperPageComponent: this.wrapperPageComponent, + appConfig: this.appConfig, + buildConfig: this.buildConfig, + context: this.context, + setRenderApp: this.setRenderApp, + staticConfig: this.staticConfig + }; + if (c) { + b = Y(Y({}, b), { + modifyRoutes: this.modifyRoutes, + wrapperRouterRender: this.wrapperRouterRender, + modifyRoutesComponent: this.modifyRoutesComponent + }); + } + var d = a.default || a; + if (a) d(b); + }; + a.prototype.composeAppProvider = function() { + var a = this; + if (!this.AppProvider.length) return null; + return this.AppProvider.reduce(function(b, c) { + return function(d) { + var e = d.children, f = Z(d, [ + "children" + ]); + var g = c ? a.context.createElement(c, Y({}, f), e) : e; + return a.context.createElement(b, Y({}, f), g); + }; + }); + }; + return a; + })(); + var $ = m; + function _(a, b) { + Object.keys(a).forEach(function(c) { + if (typeof b[c] === "object" && b[c] !== null) { + b[c] = _(a[c], b[c]); + } else if (!Object.prototype.hasOwnProperty.call(b, c)) { + b[c] = a[c]; + } + }); + return b; + } + var aa = function(a) { + var d = a.loadRuntimeModules, e = a.createElement, b = a.runtimeAPI, f = b === void 0 ? {} : b; + var c = function(a, g, b, h) { + a = _(v, a); + b.createElement = e; + var c = new $(a, g, b, h); + Object.keys(f).forEach(function(a) { + c.registerRuntimeAPI(a, f[a]); + }); + d(c); + X(a); + return { + runtime: c, + appConfig: a + }; + }; + return c; + }; + function ab(a, b) {} + function ac(a, b) { + document.addEventListener(a, b); + } + function ad(a, b) { + document.removeEventListener(a, b); + } + }, + 74677: function(b) { + "use strict"; + var a = "%[a-f0-9]{2}"; + var c = new RegExp(a, "gi"); + var d = new RegExp("(" + a + ")+", "gi"); + function e(a, b) { + try { + return decodeURIComponent(a.join("")); + } catch (f) {} + if (a.length === 1) { + return a; + } + b = b || 1; + var c = a.slice(0, b); + var d = a.slice(b); + return Array.prototype.concat.call([], e(c), e(d)); + } + function f(a) { + try { + return decodeURIComponent(a); + } catch (f) { + var b = a.match(c); + for(var d = 1; d < b.length; d++){ + a = e(b, d).join(""); + b = a.match(c); + } + return a; + } + } + function g(b) { + var c = { + "%FE%FF": "\uFFFD\uFFFD", + "%FF%FE": "\uFFFD\uFFFD" + }; + var a = d.exec(b); + while(a){ + try { + c[a[0]] = decodeURIComponent(a[0]); + } catch (j) { + var g = f(a[0]); + if (g !== a[0]) { + c[a[0]] = g; + } + } + a = d.exec(b); + } + c["%C2"] = "\uFFFD"; + var h = Object.keys(c); + for(var e = 0; e < h.length; e++){ + var i = h[e]; + b = b.replace(new RegExp(i, "g"), c[i]); + } + return b; + } + b.exports = function(a) { + if (typeof a !== "string") { + throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof a + "`"); + } + try { + a = a.replace(/\+/g, " "); + return decodeURIComponent(a); + } catch (b) { + return g(a); + } + }; + }, + 47560: function(a) { + "use strict"; + a.exports = function(b, c) { + var e = {}; + var f = Object.keys(b); + var h = Array.isArray(c); + for(var d = 0; d < f.length; d++){ + var a = f[d]; + var g = b[a]; + if (h ? c.indexOf(a) !== -1 : c(a, g, b)) { + e[a] = g; + } + } + return e; + }; + }, + 91520: function(g, c, a) { + "use strict"; + a.r(c); + a.d(c, { + createBrowserHistory: function() { + return F; + }, + createHashHistory: function() { + return M; + }, + createLocation: function() { + return t; + }, + createMemoryHistory: function() { + return O; + }, + createPath: function() { + return s; + }, + locationsAreEqual: function() { + return u; + }, + parsePath: function() { + return r; + } + }); + var h = a(87062); + function i(a) { + return a.charAt(0) === "/"; + } + function j(a, d) { + for(var b = d, c = b + 1, e = a.length; c < e; b += 1, c += 1){ + a[b] = a[c]; + } + a.pop(); + } + function d(b, c) { + if (c === undefined) c = ""; + var f = (b && b.split("/")) || []; + var a = (c && c.split("/")) || []; + var n = b && i(b); + var o = c && i(c); + var l = n || o; + if (b && i(b)) { + a = f; + } else if (f.length) { + a.pop(); + a = a.concat(f); + } + if (!a.length) return "/"; + var g; + if (a.length) { + var h = a[a.length - 1]; + g = h === "." || h === ".." || h === ""; + } else { + g = false; + } + var e = 0; + for(var d = a.length; d >= 0; d--){ + var m = a[d]; + if (m === ".") { + j(a, d); + } else if (m === "..") { + j(a, d); + e++; + } else if (e) { + j(a, d); + e--; + } + } + if (!l) for(; e--; e)a.unshift(".."); + if (l && a[0] !== "" && (!a[0] || !i(a[0]))) a.unshift(""); + var k = a.join("/"); + if (g && k.substr(-1) !== "/") k += "/"; + return k; + } + var k = d; + function l(a) { + return a.valueOf ? a.valueOf() : Object.prototype.valueOf.call(a); + } + function e(a, b) { + if (a === b) return true; + if (a == null || b == null) return false; + if (Array.isArray(a)) { + return (Array.isArray(b) && a.length === b.length && a.every(function(a, c) { + return e(a, b[c]); + })); + } + if (typeof a === "object" || typeof b === "object") { + var c = l(a); + var d = l(b); + if (c !== a || d !== b) return e(c, d); + return Object.keys(Object.assign({}, a, b)).every(function(c) { + return e(a[c], b[c]); + }); + } + return false; + } + var m = e; + var n = a(87832); + function b(a) { + return a.charAt(0) === "/" ? a : "/" + a; + } + function f(a) { + return a.charAt(0) === "/" ? a.substr(1) : a; + } + function o(a, b) { + return (a.toLowerCase().indexOf(b.toLowerCase()) === 0 && "/?#".indexOf(a.charAt(b.length)) !== -1); + } + function p(a, b) { + return o(a, b) ? a.substr(b.length) : a; + } + function q(a) { + return a.charAt(a.length - 1) === "/" ? a.slice(0, -1) : a; + } + function r(f) { + var a = f || "/"; + var b = ""; + var c = ""; + var d = a.indexOf("#"); + if (d !== -1) { + c = a.substr(d); + a = a.substr(0, d); + } + var e = a.indexOf("?"); + if (e !== -1) { + b = a.substr(e); + a = a.substr(0, e); + } + return { + pathname: a, + search: b === "?" ? "" : b, + hash: c === "#" ? "" : c + }; + } + function s(c) { + var e = c.pathname, a = c.search, b = c.hash; + var d = e || "/"; + if (a && a !== "?") d += a.charAt(0) === "?" ? a : "?" + a; + if (b && b !== "#") d += b.charAt(0) === "#" ? b : "#" + b; + return d; + } + function t(b, c, e, d) { + var a; + if (typeof b === "string") { + a = r(b); + a.state = c; + } else { + a = (0, h.Z)({}, b); + if (a.pathname === undefined) a.pathname = ""; + if (a.search) { + if (a.search.charAt(0) !== "?") a.search = "?" + a.search; + } else { + a.search = ""; + } + if (a.hash) { + if (a.hash.charAt(0) !== "#") a.hash = "#" + a.hash; + } else { + a.hash = ""; + } + if (c !== undefined && a.state === undefined) a.state = c; + } + try { + a.pathname = decodeURI(a.pathname); + } catch (f) { + if (f instanceof URIError) { + throw new URIError('Pathname "' + a.pathname + '" could not be decoded. ' + "This is likely caused by an invalid percent-encoding."); + } else { + throw f; + } + } + if (e) a.key = e; + if (d) { + if (!a.pathname) { + a.pathname = d.pathname; + } else if (a.pathname.charAt(0) !== "/") { + a.pathname = k(a.pathname, d.pathname); + } + } else { + if (!a.pathname) { + a.pathname = "/"; + } + } + return a; + } + function u(a, b) { + return (a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && m(a.state, b.state)); + } + function v() { + var e = null; + function a(a) { + false ? 0 : void 0; + e = a; + return function() { + if (e === a) e = null; + }; + } + function b(d, f, c, a) { + if (e != null) { + var b = typeof e === "function" ? e(d, f) : e; + if (typeof b === "string") { + if (typeof c === "function") { + c(b, a); + } else { + false ? 0 : void 0; + a(true); + } + } else { + a(b !== false); + } + } else { + a(true); + } + } + var f = []; + function c(b) { + var c = true; + function a() { + if (c) b.apply(void 0, arguments); + } + f.push(a); + return function() { + c = false; + f = f.filter(function(b) { + return b !== a; + }); + }; + } + function d() { + for(var b = arguments.length, c = new Array(b), a = 0; a < b; a++){ + c[a] = arguments[a]; + } + f.forEach(function(a) { + return a.apply(void 0, c); + }); + } + return { + setPrompt: a, + confirmTransitionTo: b, + appendListener: c, + notifyListeners: d + }; + } + var w = !!(typeof window !== "undefined" && window.document && window.document.createElement); + function x(a, b) { + b(window.confirm(a)); + } + function y() { + var a = window.navigator.userAgent; + if ((a.indexOf("Android 2.") !== -1 || a.indexOf("Android 4.0") !== -1) && a.indexOf("Mobile Safari") !== -1 && a.indexOf("Chrome") === -1 && a.indexOf("Windows Phone") === -1) return false; + return window.history && "pushState" in window.history; + } + function z() { + return window.navigator.userAgent.indexOf("Trident") === -1; + } + function A() { + return window.navigator.userAgent.indexOf("Firefox") === -1; + } + function B(a) { + return (a.state === undefined && navigator.userAgent.indexOf("CriOS") === -1); + } + var C = "popstate"; + var D = "hashchange"; + function E() { + try { + return window.history.state || {}; + } catch (a) { + return {}; + } + } + function F(a) { + if (a === void 0) { + a = {}; + } + !w ? false ? 0 : (0, n.default)(false) : void 0; + var i = window.history; + var H = y(); + var I = !z(); + var c = a, d = c.forceRefresh, J = d === void 0 ? false : d, e = c.getUserConfirmation, K = e === void 0 ? x : e, f = c.keyLength, L = f === void 0 ? 6 : f; + var M = a.basename ? q(b(a.basename)) : ""; + function j(d) { + var c = d || {}, e = c.key, f = c.state; + var a = window.location, g = a.pathname, h = a.search, i = a.hash; + var b = g + h + i; + false ? 0 : void 0; + if (M) b = p(b, M); + return t(b, f, e); + } + function N() { + return Math.random().toString(36).substr(2, L); + } + var O = v(); + function P(a) { + (0, h.Z)(G, a); + G.length = i.length; + O.notifyListeners(G.location, G.action); + } + function Q(a) { + if (B(a)) return; + T(j(a.state)); + } + function R() { + T(j(E())); + } + var S = false; + function T(a) { + if (S) { + S = false; + P(); + } else { + var b = "POP"; + O.confirmTransitionTo(a, b, K, function(c) { + if (c) { + P({ + action: b, + location: a + }); + } else { + U(a); + } + }); + } + } + function U(d) { + var e = G.location; + var a = V.indexOf(e.key); + if (a === -1) a = 0; + var b = V.indexOf(d.key); + if (b === -1) b = 0; + var c = a - b; + if (c) { + S = true; + o(c); + } + } + var g = j(E()); + var V = [ + g.key + ]; + function k(a) { + return M + s(a); + } + function l(a, b) { + false ? 0 : void 0; + var c = "PUSH"; + var d = t(a, b, N(), G.location); + O.confirmTransitionTo(d, c, K, function(e) { + if (!e) return; + var a = k(d); + var f = d.key, g = d.state; + if (H) { + i.pushState({ + key: f, + state: g + }, null, a); + if (J) { + window.location.href = a; + } else { + var h = V.indexOf(G.location.key); + var b = V.slice(0, h + 1); + b.push(d.key); + V = b; + P({ + action: c, + location: d + }); + } + } else { + false ? 0 : void 0; + window.location.href = a; + } + }); + } + function m(a, b) { + false ? 0 : void 0; + var c = "REPLACE"; + var d = t(a, b, N(), G.location); + O.confirmTransitionTo(d, c, K, function(e) { + if (!e) return; + var a = k(d); + var f = d.key, g = d.state; + if (H) { + i.replaceState({ + key: f, + state: g + }, null, a); + if (J) { + window.location.replace(a); + } else { + var b = V.indexOf(G.location.key); + if (b !== -1) V[b] = d.key; + P({ + action: c, + location: d + }); + } + } else { + false ? 0 : void 0; + window.location.replace(a); + } + }); + } + function o(a) { + i.go(a); + } + function r() { + o(-1); + } + function u() { + o(1); + } + var W = 0; + function X(a) { + W += a; + if (W === 1 && a === 1) { + window.addEventListener(C, Q); + if (I) window.addEventListener(D, R); + } else if (W === 0) { + window.removeEventListener(C, Q); + if (I) window.removeEventListener(D, R); + } + } + var Y = false; + function A(a) { + if (a === void 0) { + a = false; + } + var b = O.setPrompt(a); + if (!Y) { + X(1); + Y = true; + } + return function() { + if (Y) { + Y = false; + X(-1); + } + return b(); + }; + } + function F(a) { + var b = O.appendListener(a); + X(1); + return function() { + X(-1); + b(); + }; + } + var G = { + length: i.length, + action: "POP", + location: g, + createHref: k, + push: l, + replace: m, + go: o, + goBack: r, + goForward: u, + block: A, + listen: F + }; + return G; + } + var G = "hashchange"; + var H = { + hashbang: { + encodePath: function b(a) { + return a.charAt(0) === "!" ? a : "!/" + f(a); + }, + decodePath: function b(a) { + return a.charAt(0) === "!" ? a.substr(1) : a; + } + }, + noslash: { + encodePath: f, + decodePath: b + }, + slash: { + encodePath: b, + decodePath: b + } + }; + function I(a) { + var b = a.indexOf("#"); + return b === -1 ? a : a.slice(0, b); + } + function J() { + var a = window.location.href; + var b = a.indexOf("#"); + return b === -1 ? "" : a.substring(b + 1); + } + function K(a) { + window.location.hash = a; + } + function L(a) { + window.location.replace(I(window.location.href) + "#" + a); + } + function M(a) { + if (a === void 0) { + a = {}; + } + !w ? false ? 0 : (0, n.default)(false) : void 0; + var k = window.history; + var M = A(); + var c = a, d = c.getUserConfirmation, N = d === void 0 ? x : d, e = c.hashType, l = e === void 0 ? "slash" : e; + var O = a.basename ? q(b(a.basename)) : ""; + var f = H[l], m = f.encodePath, P = f.decodePath; + function o() { + var a = P(J()); + false ? 0 : void 0; + if (O) a = p(a, O); + return t(a); + } + var Q = v(); + function R(a) { + (0, h.Z)(F, a); + F.length = k.length; + Q.notifyListeners(F.location, F.action); + } + var S = false; + var T = null; + function U(a, b) { + return (a.pathname === b.pathname && a.search === b.search && a.hash === b.hash); + } + function V() { + var b = J(); + var c = m(b); + if (b !== c) { + L(c); + } else { + var a = o(); + var d = F.location; + if (!S && U(d, a)) return; + if (T === s(a)) return; + T = null; + W(a); + } + } + function W(a) { + if (S) { + S = false; + R(); + } else { + var b = "POP"; + Q.confirmTransitionTo(a, b, N, function(c) { + if (c) { + R({ + action: b, + location: a + }); + } else { + X(a); + } + }); + } + } + function X(d) { + var e = F.location; + var a = Y.lastIndexOf(s(e)); + if (a === -1) a = 0; + var b = Y.lastIndexOf(s(d)); + if (b === -1) b = 0; + var c = a - b; + if (c) { + S = true; + z(c); + } + } + var g = J(); + var i = m(g); + if (g !== i) L(i); + var j = o(); + var Y = [ + s(j) + ]; + function r(c) { + var a = document.querySelector("base"); + var b = ""; + if (a && a.getAttribute("href")) { + b = I(window.location.href); + } + return (b + "#" + m(O + s(c))); + } + function u(a, d) { + false ? 0 : void 0; + var b = "PUSH"; + var c = t(a, undefined, undefined, F.location); + Q.confirmTransitionTo(c, b, N, function(f) { + if (!f) return; + var a = s(c); + var d = m(O + a); + var g = J() !== d; + if (g) { + T = a; + K(d); + var h = Y.lastIndexOf(s(F.location)); + var e = Y.slice(0, h + 1); + e.push(a); + Y = e; + R({ + action: b, + location: c + }); + } else { + false ? 0 : void 0; + R(); + } + }); + } + function y(a, d) { + false ? 0 : void 0; + var b = "REPLACE"; + var c = t(a, undefined, undefined, F.location); + Q.confirmTransitionTo(c, b, N, function(f) { + if (!f) return; + var a = s(c); + var d = m(O + a); + var g = J() !== d; + if (g) { + T = a; + L(d); + } + var e = Y.indexOf(s(F.location)); + if (e !== -1) Y[e] = a; + R({ + action: b, + location: c + }); + }); + } + function z(a) { + false ? 0 : void 0; + k.go(a); + } + function B() { + z(-1); + } + function C() { + z(1); + } + var Z = 0; + function $(a) { + Z += a; + if (Z === 1 && a === 1) { + window.addEventListener(G, V); + } else if (Z === 0) { + window.removeEventListener(G, V); + } + } + var _ = false; + function D(a) { + if (a === void 0) { + a = false; + } + var b = Q.setPrompt(a); + if (!_) { + $(1); + _ = true; + } + return function() { + if (_) { + _ = false; + $(-1); + } + return b(); + }; + } + function E(a) { + var b = Q.appendListener(a); + $(1); + return function() { + $(-1); + b(); + }; + } + var F = { + length: k.length, + action: "POP", + location: j, + createHref: r, + push: u, + replace: y, + go: z, + goBack: B, + goForward: C, + block: D, + listen: E + }; + return F; + } + function N(a, b, c) { + return Math.min(Math.max(a, b), c); + } + function O(b) { + if (b === void 0) { + b = {}; + } + var a = b, x = a.getUserConfirmation, d = a.initialEntries, e = d === void 0 ? [ + "/" + ] : d, f = a.initialIndex, j = f === void 0 ? 0 : f, g = a.keyLength, y = g === void 0 ? 6 : g; + var z = v(); + function A(a) { + (0, h.Z)(w, a); + w.length = w.entries.length; + z.notifyListeners(w.location, w.action); + } + function B() { + return Math.random().toString(36).substr(2, y); + } + var i = N(j, 0, e.length - 1); + var c = e.map(function(a) { + return typeof a === "string" ? t(a, undefined, B()) : t(a, undefined, a.key || B()); + }); + var k = s; + function l(a, b) { + false ? 0 : void 0; + var c = "PUSH"; + var d = t(a, b, B(), w.location); + z.confirmTransitionTo(d, c, x, function(e) { + if (!e) return; + var f = w.index; + var b = f + 1; + var a = w.entries.slice(0); + if (a.length > b) { + a.splice(b, a.length - b, d); + } else { + a.push(d); + } + A({ + action: c, + location: d, + index: b, + entries: a + }); + }); + } + function m(a, b) { + false ? 0 : void 0; + var c = "REPLACE"; + var d = t(a, b, B(), w.location); + z.confirmTransitionTo(d, c, x, function(a) { + if (!a) return; + w.entries[w.index] = d; + A({ + action: c, + location: d + }); + }); + } + function n(a) { + var b = N(w.index + a, 0, w.entries.length - 1); + var c = "POP"; + var d = w.entries[b]; + z.confirmTransitionTo(d, c, x, function(a) { + if (a) { + A({ + action: c, + location: d, + index: b + }); + } else { + A(); + } + }); + } + function o() { + n(-1); + } + function p() { + n(1); + } + function q(b) { + var a = w.index + b; + return a >= 0 && a < w.entries.length; + } + function r(a) { + if (a === void 0) { + a = false; + } + return z.setPrompt(a); + } + function u(a) { + return z.appendListener(a); + } + var w = { + length: c.length, + action: "POP", + location: c[i], + index: i, + entries: c, + createHref: k, + push: l, + replace: m, + go: n, + goBack: o, + goForward: p, + canGo: q, + block: r, + listen: u + }; + return w; + } + }, + 94266: function(c, h, d) { + "use strict"; + var a = d(99234); + var i = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true + }; + var j = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true + }; + var e = { + $$typeof: true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true + }; + var f = { + $$typeof: true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true + }; + var b = {}; + b[a.ForwardRef] = e; + b[a.Memo] = f; + function k(c) { + if (a.isMemo(c)) { + return f; + } + return b[c["$$typeof"]] || i; + } + var l = Object.defineProperty; + var m = Object.getOwnPropertyNames; + var n = Object.getOwnPropertySymbols; + var o = Object.getOwnPropertyDescriptor; + var p = Object.getPrototypeOf; + var q = Object.prototype; + function g(c, a, e) { + if (typeof a !== "string") { + if (q) { + var f = p(a); + if (f && f !== q) { + g(c, f, e); + } + } + var d = m(a); + if (n) { + d = d.concat(n(a)); + } + var i = k(c); + var r = k(a); + for(var h = 0; h < d.length; ++h){ + var b = d[h]; + if (!j[b] && !(e && e[b]) && !(r && r[b]) && !(i && i[b])) { + var s = o(a, b); + try { + l(c, b, s); + } catch (t) {} + } + } + } + return c; + } + c.exports = g; + }, + 85762: function(a) { + a.exports = Array.isArray || function(a) { + return (Object.prototype.toString.call(a) == "[object Array]"); + }; + }, + 84126: function(a) { + "use strict"; + var c = Object.getOwnPropertySymbols; + var d = Object.prototype.hasOwnProperty; + var e = Object.prototype.propertyIsEnumerable; + function f(a) { + if (a === null || a === undefined) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(a); + } + function b() { + try { + if (!Object.assign) { + return false; + } + var b = new String("abc"); + b[5] = "de"; + if (Object.getOwnPropertyNames(b)[0] === "5") { + return false; + } + var c = {}; + for(var a = 0; a < 10; a++){ + c["_" + String.fromCharCode(a)] = a; + } + var d = Object.getOwnPropertyNames(c).map(function(a) { + return c[a]; + }); + if (d.join("") !== "0123456789") { + return false; + } + var e = {}; + "abcdefghijklmnopqrst".split("").forEach(function(a) { + e[a] = a; + }); + if (Object.keys(Object.assign({}, e)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (f) { + return false; + } + } + a.exports = b() ? Object.assign : function(k, l) { + var a; + var h = f(k); + var b; + for(var i = 1; i < arguments.length; i++){ + a = Object(arguments[i]); + for(var j in a){ + if (d.call(a, j)) { + h[j] = a[j]; + } + } + if (c) { + b = c(a); + for(var g = 0; g < b.length; g++){ + if (e.call(a, b[g])) { + h[b[g]] = a[b[g]]; + } + } + } + } + return h; + }; + }, + 85971: function(a, c, b) { + var d = b(85762); + a.exports = s; + a.exports.parse = f; + a.exports.compile = g; + a.exports.tokensToFunction = j; + a.exports.tokensToRegExp = r; + var e = new RegExp([ + "(\\\\.)", + "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))", + ].join("|"), "g"); + function f(c, i) { + var f = []; + var r = 0; + var d = 0; + var b = ""; + var s = (i && i.delimiter) || "/"; + var a; + while((a = e.exec(c)) != null){ + var t = a[0]; + var j = a[1]; + var m = a.index; + b += c.slice(d, m); + d = m + t.length; + if (j) { + b += j[1]; + continue; + } + var n = c[d]; + var h = a[2]; + var u = a[3]; + var v = a[4]; + var w = a[5]; + var g = a[6]; + var o = a[7]; + if (b) { + f.push(b); + b = ""; + } + var x = h != null && n != null && n !== h; + var y = g === "+" || g === "*"; + var z = g === "?" || g === "*"; + var p = a[2] || s; + var q = v || w; + f.push({ + name: u || r++, + prefix: h || "", + delimiter: p, + optional: z, + repeat: y, + partial: x, + asterisk: !!o, + pattern: q ? l(q) : o ? ".*" : "[^" + k(p) + "]+?" + }); + } + if (d < c.length) { + b += c.substr(d); + } + if (b) { + f.push(b); + } + return f; + } + function g(b, a) { + return j(f(b, a), a); + } + function h(a) { + return encodeURI(a).replace(/[\/?#]/g, function(a) { + return "%" + a.charCodeAt(0).toString(16).toUpperCase(); + }); + } + function i(a) { + return encodeURI(a).replace(/[?#]/g, function(a) { + return "%" + a.charCodeAt(0).toString(16).toUpperCase(); + }); + } + function j(b, c) { + var e = new Array(b.length); + for(var a = 0; a < b.length; a++){ + if (typeof b[a] === "object") { + e[a] = new RegExp("^(?:" + b[a].pattern + ")$", n(c)); + } + } + return function(m, n) { + var g = ""; + var o = m || {}; + var p = n || {}; + var l = p.pretty ? h : encodeURIComponent; + for(var j = 0; j < b.length; j++){ + var a = b[j]; + if (typeof a === "string") { + g += a; + continue; + } + var c = o[a.name]; + var f; + if (c == null) { + if (a.optional) { + if (a.partial) { + g += a.prefix; + } + continue; + } else { + throw new TypeError('Expected "' + a.name + '" to be defined'); + } + } + if (d(c)) { + if (!a.repeat) { + throw new TypeError('Expected "' + a.name + '" to not repeat, but received `' + JSON.stringify(c) + "`"); + } + if (c.length === 0) { + if (a.optional) { + continue; + } else { + throw new TypeError('Expected "' + a.name + '" to not be empty'); + } + } + for(var k = 0; k < c.length; k++){ + f = l(c[k]); + if (!e[j].test(f)) { + throw new TypeError('Expected all "' + a.name + '" to match "' + a.pattern + '", but received `' + JSON.stringify(f) + "`"); + } + g += (k === 0 ? a.prefix : a.delimiter) + f; + } + continue; + } + f = a.asterisk ? i(c) : l(c); + if (!e[j].test(f)) { + throw new TypeError('Expected "' + a.name + '" to match "' + a.pattern + '", but received "' + f + '"'); + } + g += a.prefix + f; + } + return g; + }; + } + function k(a) { + return a.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1"); + } + function l(a) { + return a.replace(/([=!:$\/()])/g, "\\$1"); + } + function m(a, b) { + a.keys = b; + return a; + } + function n(a) { + return a && a.sensitive ? "" : "i"; + } + function o(b, c) { + var d = b.source.match(/\((?!\?)/g); + if (d) { + for(var a = 0; a < d.length; a++){ + c.push({ + name: a, + prefix: null, + delimiter: null, + optional: false, + repeat: false, + partial: false, + asterisk: false, + pattern: null + }); + } + } + return m(b, c); + } + function p(b, c, d) { + var e = []; + for(var a = 0; a < b.length; a++){ + e.push(s(b[a], c, d).source); + } + var f = new RegExp("(?:" + e.join("|") + ")", n(d)); + return m(f, c); + } + function q(b, c, a) { + return r(f(b, a), c, a); + } + function r(j, f, c) { + if (!d(f)) { + c = (f || c); + f = []; + } + c = c || {}; + var l = c.strict; + var p = c.end !== false; + var a = ""; + for(var i = 0; i < j.length; i++){ + var e = j[i]; + if (typeof e === "string") { + a += k(e); + } else { + var h = k(e.prefix); + var b = "(?:" + e.pattern + ")"; + f.push(e); + if (e.repeat) { + b += "(?:" + h + b + ")*"; + } + if (e.optional) { + if (!e.partial) { + b = "(?:" + h + "(" + b + "))?"; + } else { + b = h + "(" + b + ")?"; + } + } else { + b = h + "(" + b + ")"; + } + a += b; + } + } + var g = k(c.delimiter || "/"); + var o = a.slice(-g.length) === g; + if (!l) { + a = (o ? a.slice(0, -g.length) : a) + "(?:" + g + "(?=$))?"; + } + if (p) { + a += "$"; + } else { + a += l && o ? "" : "(?=" + g + "|$)"; + } + return m(new RegExp("^" + a, n(c)), f); + } + function s(c, a, b) { + if (!d(a)) { + b = (a || b); + a = []; + } + b = b || {}; + if (c instanceof RegExp) { + return o(c, (a)); + } + if (d(c)) { + return p((c), (a), b); + } + return q((c), (a), b); + } + }, + 97671: function(c) { + var a = (c.exports = {}); + var e; + var f; + function g() { + throw new Error("setTimeout has not been defined"); + } + function h() { + throw new Error("clearTimeout has not been defined"); + } + (function() { + try { + if (typeof setTimeout === "function") { + e = setTimeout; + } else { + e = g; + } + } catch (a) { + e = g; + } + try { + if (typeof clearTimeout === "function") { + f = clearTimeout; + } else { + f = h; + } + } catch (b) { + f = h; + } + })(); + function i(a) { + if (e === setTimeout) { + return setTimeout(a, 0); + } + if ((e === g || !e) && setTimeout) { + e = setTimeout; + return setTimeout(a, 0); + } + try { + return e(a, 0); + } catch (b) { + try { + return e.call(null, a, 0); + } catch (c) { + return e.call(this, a, 0); + } + } + } + function j(a) { + if (f === clearTimeout) { + return clearTimeout(a); + } + if ((f === h || !f) && clearTimeout) { + f = clearTimeout; + return clearTimeout(a); + } + try { + return f(a); + } catch (b) { + try { + return f.call(null, a); + } catch (c) { + return f.call(this, a); + } + } + } + var k = []; + var l = false; + var m; + var n = -1; + function o() { + if (!l || !m) { + return; + } + l = false; + if (m.length) { + k = m.concat(k); + } else { + n = -1; + } + if (k.length) { + p(); + } + } + function p() { + if (l) { + return; + } + var b = i(o); + l = true; + var a = k.length; + while(a){ + m = k; + k = []; + while(++n < a){ + if (m) { + m[n].run(); + } + } + n = -1; + a = k.length; + } + m = null; + l = false; + j(b); + } + a.nextTick = function(c) { + var b = new Array(arguments.length - 1); + if (arguments.length > 1) { + for(var a = 1; a < arguments.length; a++){ + b[a - 1] = arguments[a]; + } + } + k.push(new d(c, b)); + if (k.length === 1 && !l) { + i(p); + } + }; + function d(a, b) { + this.fun = a; + this.array = b; + } + d.prototype.run = function() { + this.fun.apply(null, this.array); + }; + a.title = "browser"; + a.browser = true; + a.env = {}; + a.argv = []; + a.version = ""; + a.versions = {}; + function b() {} + a.on = b; + a.addListener = b; + a.once = b; + a.off = b; + a.removeListener = b; + a.removeAllListeners = b; + a.emit = b; + a.prependListener = b; + a.prependOnceListener = b; + a.listeners = function(a) { + return []; + }; + a.binding = function(a) { + throw new Error("process.binding is not supported"); + }; + a.cwd = function() { + return "/"; + }; + a.chdir = function(a) { + throw new Error("process.chdir is not supported"); + }; + a.umask = function() { + return 0; + }; + }, + 46985: function(a, e, b) { + "use strict"; + var f = b(16514); + function c() {} + function d() {} + d.resetWarningCache = c; + a.exports = function() { + function a(c, d, e, g, h, b) { + if (b === f) { + return; + } + var a = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. " + "Use PropTypes.checkPropTypes() to call them. " + "Read more at http://fb.me/use-check-prop-types"); + a.name = "Invariant Violation"; + throw a; + } + a.isRequired = a; + function b() { + return a; + } + var e = { + array: a, + bool: a, + func: a, + number: a, + object: a, + string: a, + symbol: a, + any: a, + arrayOf: b, + element: a, + elementType: a, + instanceOf: b, + node: a, + objectOf: b, + oneOf: b, + oneOfType: b, + shape: b, + exact: b, + checkPropTypes: d, + resetWarningCache: c + }; + e.PropTypes = e; + return e; + }; + }, + 68712: function(a, c, b) { + if (false) { + var d, e; + } else { + a.exports = b(46985)(); + } + }, + 16514: function(a) { + "use strict"; + var b = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + a.exports = b; + }, + 20386: function(e, a, b) { + "use strict"; + const f = b(76487); + const g = b(74677); + const h = b(97044); + const i = b(47560); + const j = (a)=>a === null || a === undefined; + function k(a) { + switch(a.arrayFormat){ + case "index": + return (b)=>(d, c)=>{ + const e = d.length; + if (c === undefined || (a.skipNull && c === null) || (a.skipEmptyString && c === "")) { + return d; + } + if (c === null) { + return [ + ...d, + [ + n(b, a), + "[", + e, + "]", + ].join(""), + ]; + } + return [ + ...d, + [ + n(b, a), + "[", + n(e, a), + "]=", + n(c, a), + ].join(""), + ]; + }; + case "bracket": + return (b)=>(d, c)=>{ + if (c === undefined || (a.skipNull && c === null) || (a.skipEmptyString && c === "")) { + return d; + } + if (c === null) { + return [ + ...d, + [ + n(b, a), + "[]" + ].join(""), + ]; + } + return [ + ...d, + [ + n(b, a), + "[]=", + n(c, a), + ].join(""), + ]; + }; + case "comma": + case "separator": + return (b)=>(d, c)=>{ + if (c === null || c === undefined || c.length === 0) { + return d; + } + if (d.length === 0) { + return [ + [ + n(b, a), + "=", + n(c, a), + ].join(""), + ]; + } + return [ + [ + d, + n(c, a) + ].join(a.arrayFormatSeparator), + ]; + }; + default: + return (b)=>(d, c)=>{ + if (c === undefined || (a.skipNull && c === null) || (a.skipEmptyString && c === "")) { + return d; + } + if (c === null) { + return [ + ...d, + n(b, a) + ]; + } + return [ + ...d, + [ + n(b, a), + "=", + n(c, a), + ].join(""), + ]; + }; + } + } + function l(a) { + let b; + switch(a.arrayFormat){ + case "index": + return (a, d, c)=>{ + b = /\[(\d*)\]$/.exec(a); + a = a.replace(/\[\d*\]$/, ""); + if (!b) { + c[a] = d; + return; + } + if (c[a] === undefined) { + c[a] = {}; + } + c[a][b[1]] = d; + }; + case "bracket": + return (a, d, c)=>{ + b = /(\[\])$/.exec(a); + a = a.replace(/\[\]$/, ""); + if (!b) { + c[a] = d; + return; + } + if (c[a] === undefined) { + c[a] = [ + d + ]; + return; + } + c[a] = [].concat(c[a], d); + }; + case "comma": + case "separator": + return (e, b, f)=>{ + const c = typeof b === "string" && b.includes(a.arrayFormatSeparator); + const d = typeof b === "string" && !c && o(b, a).includes(a.arrayFormatSeparator); + b = d ? o(b, a) : b; + const g = c || d ? b.split(a.arrayFormatSeparator).map((b)=>o(b, a)) : b === null ? b : o(b, a); + f[e] = g; + }; + default: + return (a, c, b)=>{ + if (b[a] === undefined) { + b[a] = c; + return; + } + b[a] = [].concat(b[a], c); + }; + } + } + function m(a) { + if (typeof a !== "string" || a.length !== 1) { + throw new TypeError("arrayFormatSeparator must be single character string"); + } + } + function n(a, b) { + if (b.encode) { + return b.strict ? f(a) : encodeURIComponent(a); + } + return a; + } + function o(a, b) { + if (b.decode) { + return g(a); + } + return a; + } + function p(a) { + if (Array.isArray(a)) { + return a.sort(); + } + if (typeof a === "object") { + return p(Object.keys(a)).sort((a, b)=>Number(a) - Number(b)).map((b)=>a[b]); + } + return a; + } + function q(a) { + const b = a.indexOf("#"); + if (b !== -1) { + a = a.slice(0, b); + } + return a; + } + function r(a) { + let b = ""; + const c = a.indexOf("#"); + if (c !== -1) { + b = a.slice(c); + } + return b; + } + function c(a) { + a = q(a); + const b = a.indexOf("?"); + if (b === -1) { + return ""; + } + return a.slice(b + 1); + } + function s(a, b) { + if (b.parseNumbers && !Number.isNaN(Number(a)) && typeof a === "string" && a.trim() !== "") { + a = Number(a); + } else if (b.parseBooleans && a !== null && (a.toLowerCase() === "true" || a.toLowerCase() === "false")) { + a = a.toLowerCase() === "true"; + } + return a; + } + function d(d, a) { + a = Object.assign({ + decode: true, + sort: true, + arrayFormat: "none", + arrayFormatSeparator: ",", + parseNumbers: false, + parseBooleans: false + }, a); + m(a.arrayFormatSeparator); + const j = l(a); + const b = Object.create(null); + if (typeof d !== "string") { + return b; + } + d = d.trim().replace(/^[?#&]/, ""); + if (!d) { + return b; + } + for (const f of d.split("&")){ + if (f === "") { + continue; + } + let [k, e] = h(a.decode ? f.replace(/\+/g, " ") : f, "="); + e = e === undefined ? null : [ + "comma", + "separator" + ].includes(a.arrayFormat) ? e : o(e, a); + j(o(k, a), e, b); + } + for (const g of Object.keys(b)){ + const c = b[g]; + if (typeof c === "object" && c !== null) { + for (const i of Object.keys(c)){ + c[i] = s(c[i], a); + } + } else { + b[g] = s(c, a); + } + } + if (a.sort === false) { + return b; + } + return (a.sort === true ? Object.keys(b).sort() : Object.keys(b).sort(a.sort)).reduce((c, d)=>{ + const a = b[d]; + if (Boolean(a) && typeof a === "object" && !Array.isArray(a)) { + c[d] = p(a); + } else { + c[d] = a; + } + return c; + }, Object.create(null)); + } + a.extract = c; + a.parse = d; + a.stringify = (b, a)=>{ + if (!b) { + return ""; + } + a = Object.assign({ + encode: true, + strict: true, + arrayFormat: "none", + arrayFormatSeparator: "," + }, a); + m(a.arrayFormatSeparator); + const f = (c)=>(a.skipNull && j(b[c])) || (a.skipEmptyString && b[c] === ""); + const g = k(a); + const d = {}; + for (const c of Object.keys(b)){ + if (!f(c)) { + d[c] = b[c]; + } + } + const e = Object.keys(d); + if (a.sort !== false) { + e.sort(a.sort); + } + return e.map((d)=>{ + const c = b[d]; + if (c === undefined) { + return ""; + } + if (c === null) { + return n(d, a); + } + if (Array.isArray(c)) { + return c.reduce(g(d), []).join("&"); + } + return (n(d, a) + "=" + n(c, a)); + }).filter((a)=>a.length > 0).join("&"); + }; + a.parseUrl = (b, a)=>{ + a = Object.assign({ + decode: true + }, a); + const [f, e] = h(b, "#"); + return Object.assign({ + url: f.split("?")[0] || "", + query: d(c(b), a) + }, a && a.parseFragmentIdentifier && e ? { + fragmentIdentifier: o(e, a) + } : {}); + }; + a.stringifyUrl = (b, c)=>{ + c = Object.assign({ + encode: true, + strict: true + }, c); + const f = q(b.url).split("?")[0] || ""; + const g = a.extract(b.url); + const h = a.parse(g, { + sort: false + }); + const i = Object.assign(h, b.query); + let d = a.stringify(i, c); + if (d) { + d = `?${d}`; + } + let e = r(b.url); + if (b.fragmentIdentifier) { + e = `#${n(b.fragmentIdentifier, c)}`; + } + return `${f}${d}${e}`; + }; + a.pick = (c, d, b)=>{ + b = Object.assign({ + parseFragmentIdentifier: true + }, b); + const { url: e , query: f , fragmentIdentifier: g } = a.parseUrl(c, b); + return a.stringifyUrl({ + url: e, + query: i(f, d), + fragmentIdentifier: g + }, b); + }; + a.exclude = (b, c, d)=>{ + const e = Array.isArray(c) ? (a)=>!c.includes(a) : (a, b)=>!c(a, b); + return a.pick(b, e, d); + }; + }, + 61929: function(d, a, b) { + "use strict"; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.setInitialData = a.getInitialData = void 0; + var c = b(43368); + Object.defineProperty(a, "getInitialData", { + enumerable: true, + get: function() { + return c.getInitialData; + } + }); + Object.defineProperty(a, "setInitialData", { + enumerable: true, + get: function() { + return c.setInitialData; + } + }); + a.default = c.reactAppRenderer; + }, + 43368: function(g, a, b) { + "use strict"; + var h = b(97671); + var i = (this && this.__assign) || function() { + i = Object.assign || function(d) { + for(var a, b = 1, e = arguments.length; b < e; b++){ + a = arguments[b]; + for(var c in a)if (Object.prototype.hasOwnProperty.call(a, c)) d[c] = a[c]; + } + return d; + }; + return i.apply(this, arguments); + }; + var j = (this && this.__awaiter) || function(b, c, a, d) { + function e(b) { + return b instanceof a ? b : new a(function(a) { + a(b); + }); + } + return new (a || (a = Promise))(function(f, g) { + function h(b) { + try { + a(d.next(b)); + } catch (c) { + g(c); + } + } + function i(b) { + try { + a(d["throw"](b)); + } catch (c) { + g(c); + } + } + function a(a) { + a.done ? f(a.value) : e(a.value).then(h, i); + } + a((d = d.apply(b, c || [])).next()); + }); + }; + var k = (this && this.__generator) || function(b, c) { + var d = { + label: 0, + sent: function() { + if (g[0] & 1) throw g[1]; + return g[1]; + }, + trys: [], + ops: [] + }, e, f, g, a; + return ((a = { + next: h(0), + throw: h(1), + return: h(2) + }), typeof Symbol === "function" && (a[Symbol.iterator] = function() { + return this; + }), a); + function h(a) { + return function(b) { + return i([ + a, + b + ]); + }; + } + function i(a) { + if (e) throw new TypeError("Generator is already executing."); + while(d)try { + if (((e = 1), f && (g = a[0] & 2 ? f["return"] : a[0] ? f["throw"] || ((g = f["return"]) && g.call(f), 0) : f.next) && !(g = g.call(f, a[1])).done)) return g; + if (((f = 0), g)) a = [ + a[0] & 2, + g.value + ]; + switch(a[0]){ + case 0: + case 1: + g = a; + break; + case 4: + d.label++; + return { + value: a[1], + done: false + }; + case 5: + d.label++; + f = a[1]; + a = [ + 0 + ]; + continue; + case 7: + a = d.ops.pop(); + d.trys.pop(); + continue; + default: + if (!((g = d.trys), (g = g.length > 0 && g[g.length - 1])) && (a[0] === 6 || a[0] === 2)) { + d = 0; + continue; + } + if (a[0] === 3 && (!g || (a[1] > g[0] && a[1] < g[3]))) { + d.label = a[1]; + break; + } + if (a[0] === 6 && d.label < g[1]) { + d.label = g[1]; + g = a; + break; + } + if (g && d.label < g[2]) { + d.label = g[2]; + d.ops.push(a); + break; + } + if (g[2]) d.ops.pop(); + d.trys.pop(); + continue; + } + a = c.call(b, d); + } catch (h) { + a = [ + 6, + h + ]; + f = 0; + } finally{ + e = g = 0; + } + if (a[0] & 5) throw a[1]; + return { + value: a[0] ? a[1] : void 0, + done: true + }; + } + }; + Object.defineProperty(a, "__esModule", { + value: true + }); + a.reactAppRenderer = a.getRenderApp = a.getInitialData = a.setInitialData = void 0; + var l = b(59301); + var m = b(4676); + var n = b(20386); + var o = b(9347); + var p; + function c(a) { + p = a; + } + a.setInitialData = c; + function d() { + return p; + } + a.getInitialData = d; + function e(a, e) { + var c, d; + var n = e.ErrorBoundary, f = e.appConfig, j = f === void 0 ? { + app: {} + } : f; + var g = (c = a === null || a === void 0 ? void 0 : a.composeAppProvider) === null || c === void 0 ? void 0 : c.call(a); + var k = (d = a === null || a === void 0 ? void 0 : a.getAppComponent) === null || d === void 0 ? void 0 : d.call(a); + var h = l.createElement(k, null); + if (g) { + h = l.createElement(g, null, h); + } + var b = j.app, o = b.ErrorBoundaryFallback, p = b.onErrorBoundaryHandler, q = b.errorBoundary, i = b.strict, r = i === void 0 ? false : i; + function m() { + if (q) { + h = l.createElement(n, { + Fallback: o, + onError: p + }, h); + } + if (r) { + h = l.createElement(l.StrictMode, null, h); + } + return h; + } + return m; + } + a.getRenderApp = e; + function f(a) { + var b; + return j(this, void 0, void 0, function() { + var d, e, f, g, h, j, l, m, o, p, r, s, t, u, v, w, x, y, z, A, B; + return k(this, function(k) { + switch(k.label){ + case 0: + (d = a.appConfig), (e = a.buildConfig), (f = e === void 0 ? {} : e), (g = a.appLifecycle); + (h = g.createBaseApp), (j = g.emitLifeCycles), (l = g.initAppLifeCycles); + m = {}; + if (!window.__ICE_APP_DATA__) return [ + 3, + 1 + ]; + m.initialData = window.__ICE_APP_DATA__; + m.pageInitialProps = window.__ICE_PAGE_PROPS__; + return [ + 3, + 3 + ]; + case 1: + if (!((b = d === null || d === void 0 ? void 0 : d.app) === null || b === void 0 ? void 0 : b.getInitialData)) return [ + 3, + 3 + ]; + (o = window.location), (p = o.href), (r = o.origin), (s = o.pathname), (t = o.search); + u = p.replace(r, ""); + v = n.parse(t); + w = window.__ICE_SSR_ERROR__; + x = { + pathname: s, + path: u, + query: v, + ssrError: w + }; + y = m; + return [ + 4, + d.app.getInitialData(x), + ]; + case 2: + y.initialData = k.sent(); + k.label = 3; + case 3: + (z = h(d, f, m)), (A = z.runtime), (B = z.appConfig); + l(); + c(m.initialData); + j(); + return [ + 2, + q(A, i(i({}, a), { + appConfig: B + })), + ]; + } + }); + }); + } + a.reactAppRenderer = f; + function q(a, c) { + var b; + var d = c.appConfig, j = d === void 0 ? {} : d; + var f = j.app, k = f.rootId, n = f.mountNode; + var g = e(a, c); + var i = r(n, k); + if (a === null || a === void 0 ? void 0 : a.modifyDOMRender) { + return (b = a === null || a === void 0 ? void 0 : a.modifyDOMRender) === null || b === void 0 ? void 0 : b.call(a, { + App: g, + appMountNode: i + }); + } + if (window.__ICE_SSR_ENABLED__ && h.env.SSR) { + (0, o.loadableReady)(function() { + m.hydrate(l.createElement(g, null), i); + }); + } else { + m.render(l.createElement(g, null), i); + } + } + function r(a, b) { + return (a || document.getElementById(b) || document.getElementById("ice-container")); + } + }, + 23675: function(bg, f, x) { + "use strict"; + var y = x(59301), d = x(84126), b = x(43014); + function W(b) { + for(var c = "https://reactjs.org/docs/error-decoder.html?invariant=" + b, a = 1; a < arguments.length; a++)c += "&args[]=" + encodeURIComponent(arguments[a]); + return ("Minified React error #" + b + "; visit " + c + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."); + } + if (!y) throw Error(W(227)); + var bh = new Set(), bi = {}; + function k(a, b) { + q(a, b); + q(a + "Capture", b); + } + function q(a, b) { + bi[a] = b; + for(a = 0; a < b.length; a++)bh.add(b[a]); + } + var g = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), bj = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, bk = Object.prototype.hasOwnProperty, bl = {}, bm = {}; + function bn(a) { + if (bk.call(bm, a)) return !0; + if (bk.call(bl, a)) return !1; + if (bj.test(a)) return (bm[a] = !0); + bl[a] = !0; + return !1; + } + function bo(a, c, b, d) { + if (null !== b && 0 === b.type) return !1; + switch(typeof c){ + case "function": + case "symbol": + return !0; + case "boolean": + if (d) return !1; + if (null !== b) return !b.acceptsBooleans; + a = a.toLowerCase().slice(0, 5); + return "data-" !== a && "aria-" !== a; + default: + return !1; + } + } + function bp(d, a, b, c) { + if (null === a || "undefined" === typeof a || bo(d, a, b, c)) return !0; + if (c) return !1; + if (null !== b) switch(b.type){ + case 3: + return !a; + case 4: + return !1 === a; + case 5: + return isNaN(a); + case 6: + return isNaN(a) || 1 > a; + } + return !1; + } + function X(b, a, c, d, e, f, g) { + this.acceptsBooleans = 2 === a || 3 === a || 4 === a; + this.attributeName = d; + this.attributeNamespace = e; + this.mustUseProperty = c; + this.propertyName = b; + this.type = a; + this.sanitizeURL = f; + this.removeEmptyString = g; + } + var Y = {}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a) { + Y[a] = new X(a, 0, !1, a, null, !1, !1); + }); + [ + [ + "acceptCharset", + "accept-charset" + ], + [ + "className", + "class" + ], + [ + "htmlFor", + "for" + ], + [ + "httpEquiv", + "http-equiv" + ], + ].forEach(function(a) { + var b = a[0]; + Y[b] = new X(b, 1, !1, a[1], null, !1, !1); + }); + [ + "contentEditable", + "draggable", + "spellCheck", + "value" + ].forEach(function(a) { + Y[a] = new X(a, 2, !1, a.toLowerCase(), null, !1, !1); + }); + [ + "autoReverse", + "externalResourcesRequired", + "focusable", + "preserveAlpha", + ].forEach(function(a) { + Y[a] = new X(a, 2, !1, a, null, !1, !1); + }); + "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a) { + Y[a] = new X(a, 3, !1, a.toLowerCase(), null, !1, !1); + }); + [ + "checked", + "multiple", + "muted", + "selected" + ].forEach(function(a) { + Y[a] = new X(a, 3, !0, a, null, !1, !1); + }); + [ + "capture", + "download" + ].forEach(function(a) { + Y[a] = new X(a, 4, !1, a, null, !1, !1); + }); + [ + "cols", + "rows", + "size", + "span" + ].forEach(function(a) { + Y[a] = new X(a, 6, !1, a, null, !1, !1); + }); + [ + "rowSpan", + "start" + ].forEach(function(a) { + Y[a] = new X(a, 5, !1, a.toLowerCase(), null, !1, !1); + }); + var bq = /[\-:]([a-z])/g; + function br(a) { + return a[1].toUpperCase(); + } + "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a) { + var b = a.replace(bq, br); + Y[b] = new X(b, 1, !1, a, null, !1, !1); + }); + "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a) { + var b = a.replace(bq, br); + Y[b] = new X(b, 1, !1, a, "http://www.w3.org/1999/xlink", !1, !1); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + ].forEach(function(a) { + var b = a.replace(bq, br); + Y[b] = new X(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace", !1, !1); + }); + [ + "tabIndex", + "crossOrigin" + ].forEach(function(a) { + Y[a] = new X(a, 1, !1, a.toLowerCase(), null, !1, !1); + }); + Y.xlinkHref = new X("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1); + [ + "src", + "href", + "action", + "formAction" + ].forEach(function(a) { + Y[a] = new X(a, 1, !1, a.toLowerCase(), null, !0, !0); + }); + function bs(d, a, c, e) { + var b = Y.hasOwnProperty(a) ? Y[a] : null; + var f = null !== b ? 0 === b.type : e ? !1 : !(2 < a.length) || ("o" !== a[0] && "O" !== a[0]) || ("n" !== a[1] && "N" !== a[1]) ? !1 : !0; + f || (bp(a, c, b, e) && (c = null), e || null === b ? bn(a) && (null === c ? d.removeAttribute(a) : d.setAttribute(a, "" + c)) : b.mustUseProperty ? (d[b.propertyName] = null === c ? (3 === b.type ? !1 : "") : c) : ((a = b.attributeName), (e = b.attributeNamespace), null === c ? d.removeAttribute(a) : ((b = b.type), (c = 3 === b || (4 === b && !0 === c) ? "" : "" + c), e ? d.setAttributeNS(e, a, c) : d.setAttribute(a, c)))); + } + var i = y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, Z = 60103, $ = 60106, _ = 60107, aa = 60108, ab = 60114, ac = 60109, ad = 60110, ae = 60112, af = 60113, ag = 60120, ah = 60115, ai = 60116, aj = 60121, ak = 60128, al = 60129, am = 60130, an = 60131; + if ("function" === typeof Symbol && Symbol.for) { + var a = Symbol.for; + Z = a("react.element"); + $ = a("react.portal"); + _ = a("react.fragment"); + aa = a("react.strict_mode"); + ab = a("react.profiler"); + ac = a("react.provider"); + ad = a("react.context"); + ae = a("react.forward_ref"); + af = a("react.suspense"); + ag = a("react.suspense_list"); + ah = a("react.memo"); + ai = a("react.lazy"); + aj = a("react.block"); + a("react.scope"); + ak = a("react.opaque.id"); + al = a("react.debug_trace_mode"); + am = a("react.offscreen"); + an = a("react.legacy_hidden"); + } + var bt = "function" === typeof Symbol && Symbol.iterator; + function bu(a) { + if (null === a || "object" !== typeof a) return null; + a = (bt && a[bt]) || a["@@iterator"]; + return "function" === typeof a ? a : null; + } + var bv; + function bw(b) { + if (void 0 === bv) try { + throw Error(); + } catch (c) { + var a = c.stack.trim().match(/\n( *(at )?)/); + bv = (a && a[1]) || ""; + } + return "\n" + bv + b; + } + var bx = !1; + function by(c, d) { + if (!c || bx) return ""; + bx = !0; + var i = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + if (d) if (((d = function() { + throw Error(); + }), Object.defineProperty(d.prototype, "props", { + set: function() { + throw Error(); + } + }), "object" === typeof Reflect && Reflect.construct)) { + try { + Reflect.construct(d, []); + } catch (j) { + var f = j; + } + Reflect.construct(c, [], d); + } else { + try { + d.call(); + } catch (k) { + f = k; + } + c.call(d.prototype); + } + else { + try { + throw Error(); + } catch (l) { + f = l; + } + c(); + } + } catch (h) { + if (h && f && "string" === typeof h.stack) { + for(var e = h.stack.split("\n"), g = f.stack.split("\n"), b = e.length - 1, a = g.length - 1; 1 <= b && 0 <= a && e[b] !== g[a];)a--; + for(; 1 <= b && 0 <= a; b--, a--)if (e[b] !== g[a]) { + if (1 !== b || 1 !== a) { + do if ((b--, a--, 0 > a || e[b] !== g[a])) return ("\n" + e[b].replace(" at new ", " at ")); + while (1 <= b && 0 <= a) + } + break; + } + } + } finally{ + (bx = !1), (Error.prepareStackTrace = i); + } + return (c = c ? c.displayName || c.name : "") ? bw(c) : ""; + } + function bz(a) { + switch(a.tag){ + case 5: + return bw(a.type); + case 16: + return bw("Lazy"); + case 13: + return bw("Suspense"); + case 19: + return bw("SuspenseList"); + case 0: + case 2: + case 15: + return (a = by(a.type, !1)), a; + case 11: + return (a = by(a.type.render, !1)), a; + case 22: + return (a = by(a.type._render, !1)), a; + case 1: + return (a = by(a.type, !0)), a; + default: + return ""; + } + } + function bA(a) { + if (null == a) return null; + if ("function" === typeof a) return a.displayName || a.name || null; + if ("string" === typeof a) return a; + switch(a){ + case _: + return "Fragment"; + case $: + return "Portal"; + case ab: + return "Profiler"; + case aa: + return "StrictMode"; + case af: + return "Suspense"; + case ag: + return "SuspenseList"; + } + if ("object" === typeof a) switch(a.$$typeof){ + case ad: + return (a.displayName || "Context") + ".Consumer"; + case ac: + return ((a._context.displayName || "Context") + ".Provider"); + case ae: + var b = a.render; + b = b.displayName || b.name || ""; + return (a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef")); + case ah: + return bA(a.type); + case aj: + return bA(a._render); + case ai: + b = a._payload; + a = a._init; + try { + return bA(a(b)); + } catch (c) {} + } + return null; + } + function bB(a) { + switch(typeof a){ + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return a; + default: + return ""; + } + } + function bC(a) { + var b = a.type; + return ((a = a.nodeName) && "input" === a.toLowerCase() && ("checkbox" === b || "radio" === b)); + } + function bD(a) { + var c = bC(a) ? "checked" : "value", b = Object.getOwnPropertyDescriptor(a.constructor.prototype, c), d = "" + a[c]; + if (!a.hasOwnProperty(c) && "undefined" !== typeof b && "function" === typeof b.get && "function" === typeof b.set) { + var e = b.get, f = b.set; + Object.defineProperty(a, c, { + configurable: !0, + get: function() { + return e.call(this); + }, + set: function(a) { + d = "" + a; + f.call(this, a); + } + }); + Object.defineProperty(a, c, { + enumerable: b.enumerable + }); + return { + getValue: function() { + return d; + }, + setValue: function(a) { + d = "" + a; + }, + stopTracking: function() { + a._valueTracker = null; + delete a[c]; + } + }; + } + } + function bE(a) { + a._valueTracker || (a._valueTracker = bD(a)); + } + function bF(a) { + if (!a) return !1; + var b = a._valueTracker; + if (!b) return !0; + var d = b.getValue(); + var c = ""; + a && (c = bC(a) ? (a.checked ? "true" : "false") : a.value); + a = c; + return a !== d ? (b.setValue(a), !0) : !1; + } + function bG(a) { + a = a || ("undefined" !== typeof document ? document : void 0); + if ("undefined" === typeof a) return null; + try { + return a.activeElement || a.body; + } catch (b) { + return a.body; + } + } + function bH(c, a) { + var b = a.checked; + return d({}, a, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: null != b ? b : c._wrapperState.initialChecked + }); + } + function bI(c, a) { + var b = null == a.defaultValue ? "" : a.defaultValue, d = null != a.checked ? a.checked : a.defaultChecked; + b = bB(null != a.value ? a.value : b); + c._wrapperState = { + initialChecked: d, + initialValue: b, + controlled: "checkbox" === a.type || "radio" === a.type ? null != a.checked : null != a.value + }; + } + function bJ(b, a) { + a = a.checked; + null != a && bs(b, "checked", a, !1); + } + function bK(b, a) { + bJ(b, a); + var c = bB(a.value), d = a.type; + if (null != c) if ("number" === d) { + if ((0 === c && "" === b.value) || b.value != c) b.value = "" + c; + } else b.value !== "" + c && (b.value = "" + c); + else if ("submit" === d || "reset" === d) { + b.removeAttribute("value"); + return; + } + a.hasOwnProperty("value") ? bM(b, a.type, c) : a.hasOwnProperty("defaultValue") && bM(b, a.type, bB(a.defaultValue)); + null == a.checked && null != a.defaultChecked && (b.defaultChecked = !!a.defaultChecked); + } + function bL(a, b, c) { + if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) { + var d = b.type; + if (!(("submit" !== d && "reset" !== d) || (void 0 !== b.value && null !== b.value))) return; + b = "" + a._wrapperState.initialValue; + c || b === a.value || (a.value = b); + a.defaultValue = b; + } + c = a.name; + "" !== c && (a.name = ""); + a.defaultChecked = !!a._wrapperState.initialChecked; + "" !== c && (a.name = c); + } + function bM(a, c, b) { + if ("number" !== c || bG(a.ownerDocument) !== a) null == b ? (a.defaultValue = "" + a._wrapperState.initialValue) : a.defaultValue !== "" + b && (a.defaultValue = "" + b); + } + function bN(a) { + var b = ""; + y.Children.forEach(a, function(a) { + null != a && (b += a); + }); + return b; + } + function bO(b, a) { + b = d({ + children: void 0 + }, a); + if ((a = bN(a.children))) b.children = a; + return b; + } + function bP(b, d, c, e) { + b = b.options; + if (d) { + d = {}; + for(var a = 0; a < c.length; a++)d["$" + c[a]] = !0; + for(c = 0; c < b.length; c++)(a = d.hasOwnProperty("$" + b[c].value)), b[c].selected !== a && (b[c].selected = a), a && e && (b[c].defaultSelected = !0); + } else { + c = "" + bB(c); + d = null; + for(a = 0; a < b.length; a++){ + if (b[a].value === c) { + b[a].selected = !0; + e && (b[a].defaultSelected = !0); + return; + } + null !== d || b[a].disabled || (d = b[a]); + } + null !== d && (d.selected = !0); + } + } + function bQ(b, a) { + if (null != a.dangerouslySetInnerHTML) throw Error(W(91)); + return d({}, a, { + value: void 0, + defaultValue: void 0, + children: "" + b._wrapperState.initialValue + }); + } + function bR(c, b) { + var a = b.value; + if (null == a) { + a = b.children; + b = b.defaultValue; + if (null != a) { + if (null != b) throw Error(W(92)); + if (Array.isArray(a)) { + if (!(1 >= a.length)) throw Error(W(93)); + a = a[0]; + } + b = a; + } + null == b && (b = ""); + a = b; + } + c._wrapperState = { + initialValue: bB(a) + }; + } + function bS(b, c) { + var a = bB(c.value), d = bB(c.defaultValue); + null != a && ((a = "" + a), a !== b.value && (b.value = a), null == c.defaultValue && b.defaultValue !== a && (b.defaultValue = a)); + null != d && (b.defaultValue = "" + d); + } + function bT(b) { + var a = b.textContent; + a === b._wrapperState.initialValue && "" !== a && null !== a && (b.value = a); + } + var bU = { + html: "http://www.w3.org/1999/xhtml", + mathml: "http://www.w3.org/1998/Math/MathML", + svg: "http://www.w3.org/2000/svg" + }; + function bV(a) { + switch(a){ + case "svg": + return "http://www.w3.org/2000/svg"; + case "math": + return "http://www.w3.org/1998/Math/MathML"; + default: + return "http://www.w3.org/1999/xhtml"; + } + } + function bW(a, b) { + return null == a || "http://www.w3.org/1999/xhtml" === a ? bV(b) : "http://www.w3.org/2000/svg" === a && "foreignObject" === b ? "http://www.w3.org/1999/xhtml" : a; + } + var bX, bY = (function(a) { + return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(b, c, d, e) { + MSApp.execUnsafeLocalFunction(function() { + return a(b, c, d, e); + }); + } : a; + })(function(a, b) { + if (a.namespaceURI !== bU.svg || "innerHTML" in a) a.innerHTML = b; + else { + bX = bX || document.createElement("div"); + bX.innerHTML = "" + b.valueOf().toString() + ""; + for(b = bX.firstChild; a.firstChild;)a.removeChild(a.firstChild); + for(; b.firstChild;)a.appendChild(b.firstChild); + } + }); + function bZ(b, c) { + if (c) { + var a = b.firstChild; + if (a && a === b.lastChild && 3 === a.nodeType) { + a.nodeValue = c; + return; + } + } + b.textContent = c; + } + var ao = { + animationIterationCount: !0, + borderImageOutset: !0, + borderImageSlice: !0, + borderImageWidth: !0, + boxFlex: !0, + boxFlexGroup: !0, + boxOrdinalGroup: !0, + columnCount: !0, + columns: !0, + flex: !0, + flexGrow: !0, + flexPositive: !0, + flexShrink: !0, + flexNegative: !0, + flexOrder: !0, + gridArea: !0, + gridRow: !0, + gridRowEnd: !0, + gridRowSpan: !0, + gridRowStart: !0, + gridColumn: !0, + gridColumnEnd: !0, + gridColumnSpan: !0, + gridColumnStart: !0, + fontWeight: !0, + lineClamp: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + tabSize: !0, + widows: !0, + zIndex: !0, + zoom: !0, + fillOpacity: !0, + floodOpacity: !0, + stopOpacity: !0, + strokeDasharray: !0, + strokeDashoffset: !0, + strokeMiterlimit: !0, + strokeOpacity: !0, + strokeWidth: !0 + }, b$ = [ + "Webkit", + "ms", + "Moz", + "O" + ]; + Object.keys(ao).forEach(function(a) { + b$.forEach(function(b) { + b = b + a.charAt(0).toUpperCase() + a.substring(1); + ao[b] = ao[a]; + }); + }); + function b_(b, a, c) { + return null == a || "boolean" === typeof a || "" === a ? "" : c || "number" !== typeof a || 0 === a || (ao.hasOwnProperty(b) && ao[b]) ? ("" + a).trim() : a + "px"; + } + function b0(b, c) { + b = b.style; + for(var a in c)if (c.hasOwnProperty(a)) { + var d = 0 === a.indexOf("--"), e = b_(a, c[a], d); + "float" === a && (a = "cssFloat"); + d ? b.setProperty(a, e) : (b[a] = e); + } + } + var b1 = d({ + menuitem: !0 + }, { + area: !0, + base: !0, + br: !0, + col: !0, + embed: !0, + hr: !0, + img: !0, + input: !0, + keygen: !0, + link: !0, + meta: !0, + param: !0, + source: !0, + track: !0, + wbr: !0 + }); + function b2(b, a) { + if (a) { + if (b1[b] && (null != a.children || null != a.dangerouslySetInnerHTML)) throw Error(W(137, b)); + if (null != a.dangerouslySetInnerHTML) { + if (null != a.children) throw Error(W(60)); + if (!("object" === typeof a.dangerouslySetInnerHTML && "__html" in a.dangerouslySetInnerHTML)) throw Error(W(61)); + } + if (null != a.style && "object" !== typeof a.style) throw Error(W(62)); + } + } + function b3(a, b) { + if (-1 === a.indexOf("-")) return "string" === typeof b.is; + switch(a){ + case "annotation-xml": + case "color-profile": + case "font-face": + case "font-face-src": + case "font-face-uri": + case "font-face-format": + case "font-face-name": + case "missing-glyph": + return !1; + default: + return !0; + } + } + function b4(a) { + a = a.target || a.srcElement || window; + a.correspondingUseElement && (a = a.correspondingUseElement); + return 3 === a.nodeType ? a.parentNode : a; + } + var ap = null, b5 = null, b6 = null; + function b7(a) { + if ((a = aX(a))) { + if ("function" !== typeof ap) throw Error(W(280)); + var b = a.stateNode; + b && ((b = aZ(b)), ap(a.stateNode, a.type, b)); + } + } + function aq(a) { + b5 ? (b6 ? b6.push(a) : (b6 = [ + a + ])) : (b5 = a); + } + function ar() { + if (b5) { + var a = b5, b = b6; + b6 = b5 = null; + b7(a); + if (b) for(a = 0; a < b.length; a++)b7(b[a]); + } + } + function F(a, b) { + return a(b); + } + function as(a, b, c, d, e) { + return a(b, c, d, e); + } + function at() {} + var au = F, b8 = !1, b9 = !1; + function ca() { + if (null !== b5 || null !== b6) at(), ar(); + } + function cb(a, b, c) { + if (b9) return a(b, c); + b9 = !0; + try { + return au(a, b, c); + } finally{ + (b9 = !1), ca(); + } + } + function cc(a, d) { + var b = a.stateNode; + if (null === b) return null; + var c = aZ(b); + if (null === c) return null; + b = c[d]; + a: switch(d){ + case "onClick": + case "onClickCapture": + case "onDoubleClick": + case "onDoubleClickCapture": + case "onMouseDown": + case "onMouseDownCapture": + case "onMouseMove": + case "onMouseMoveCapture": + case "onMouseUp": + case "onMouseUpCapture": + case "onMouseEnter": + (c = !c.disabled) || ((a = a.type), (c = !("button" === a || "input" === a || "select" === a || "textarea" === a))); + a = !c; + break a; + default: + a = !1; + } + if (a) return null; + if (b && "function" !== typeof b) throw Error(W(231, d, typeof b)); + return b; + } + var av = !1; + if (g) try { + var m = {}; + Object.defineProperty(m, "passive", { + get: function() { + av = !0; + } + }); + window.addEventListener("test", m, m); + window.removeEventListener("test", m, m); + } catch (cd) { + av = !1; + } + function ce(e, a, b, f, g, h, i, j, k) { + var c = Array.prototype.slice.call(arguments, 3); + try { + a.apply(b, c); + } catch (d) { + this.onError(d); + } + } + var cf = !1, cg = null, ch = !1, ci = null, cj = { + onError: function(a) { + cf = !0; + cg = a; + } + }; + function ck(a, b, c, d, e, f, g, h, i) { + cf = !1; + cg = null; + ce.apply(cj, arguments); + } + function cl(b, c, d, e, f, g, h, i, j) { + ck.apply(this, arguments); + if (cf) { + if (cf) { + var a = cg; + cf = !1; + cg = null; + } else throw Error(W(198)); + ch || ((ch = !0), (ci = a)); + } + } + function cm(b) { + var a = b, c = b; + if (b.alternate) for(; a.return;)a = a.return; + else { + b = a; + do (a = b), 0 !== (a.flags & 1026) && (c = a.return), (b = a.return); + while (b) + } + return 3 === a.tag ? c : null; + } + function cn(a) { + if (13 === a.tag) { + var b = a.memoizedState; + null === b && ((a = a.alternate), null !== a && (b = a.memoizedState)); + if (null !== b) return b.dehydrated; + } + return null; + } + function co(a) { + if (cm(a) !== a) throw Error(W(188)); + } + function cp(f) { + var g = f.alternate; + if (!g) { + g = cm(f); + if (null === g) throw Error(W(188)); + return g !== f ? null : f; + } + for(var a = f, c = g;;){ + var d = a.return; + if (null === d) break; + var b = d.alternate; + if (null === b) { + c = d.return; + if (null !== c) { + a = c; + continue; + } + break; + } + if (d.child === b.child) { + for(b = d.child; b;){ + if (b === a) return co(d), f; + if (b === c) return co(d), g; + b = b.sibling; + } + throw Error(W(188)); + } + if (a.return !== c.return) (a = d), (c = b); + else { + for(var h = !1, e = d.child; e;){ + if (e === a) { + h = !0; + a = d; + c = b; + break; + } + if (e === c) { + h = !0; + c = d; + a = b; + break; + } + e = e.sibling; + } + if (!h) { + for(e = b.child; e;){ + if (e === a) { + h = !0; + a = b; + c = d; + break; + } + if (e === c) { + h = !0; + c = b; + a = d; + break; + } + e = e.sibling; + } + if (!h) throw Error(W(189)); + } + } + if (a.alternate !== c) throw Error(W(190)); + } + if (3 !== a.tag) throw Error(W(188)); + return a.stateNode.current === a ? f : g; + } + function cq(b) { + b = cp(b); + if (!b) return null; + for(var a = b;;){ + if (5 === a.tag || 6 === a.tag) return a; + if (a.child) (a.child.return = a), (a = a.child); + else { + if (a === b) break; + for(; !a.sibling;){ + if (!a.return || a.return === b) return null; + a = a.return; + } + a.sibling.return = a.return; + a = a.sibling; + } + } + return null; + } + function cr(b, a) { + for(var c = b.alternate; null !== a;){ + if (a === b || a === c) return !0; + a = a.return; + } + return !1; + } + var aw, ax, ay, az, cs = !1, ct = [], cu = null, cv = null, cw = null, cx = new Map(), cy = new Map(), cz = [], cA = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); + function cB(a, b, c, d, e) { + return { + blockedOn: a, + domEventName: b, + eventSystemFlags: c | 16, + nativeEvent: e, + targetContainers: [ + d + ] + }; + } + function cC(b, a) { + switch(b){ + case "focusin": + case "focusout": + cu = null; + break; + case "dragenter": + case "dragleave": + cv = null; + break; + case "mouseover": + case "mouseout": + cw = null; + break; + case "pointerover": + case "pointerout": + cx.delete(a.pointerId); + break; + case "gotpointercapture": + case "lostpointercapture": + cy.delete(a.pointerId); + } + } + function cD(b, a, f, d, c, e) { + if (null === b || b.nativeEvent !== e) return ((b = cB(a, f, d, c, e)), null !== a && ((a = aX(a)), null !== a && ax(a)), b); + b.eventSystemFlags |= d; + a = b.targetContainers; + null !== c && -1 === a.indexOf(c) && a.push(c); + return b; + } + function cE(c, b, d, e, a) { + switch(b){ + case "focusin": + return (cu = cD(cu, c, b, d, e, a)), !0; + case "dragenter": + return (cv = cD(cv, c, b, d, e, a)), !0; + case "mouseover": + return (cw = cD(cw, c, b, d, e, a)), !0; + case "pointerover": + var f = a.pointerId; + cx.set(f, cD(cx.get(f) || null, c, b, d, e, a)); + return !0; + case "gotpointercapture": + return ((f = a.pointerId), cy.set(f, cD(cy.get(f) || null, c, b, d, e, a)), !0); + } + return !1; + } + function cF(d) { + var a = aW(d.target); + if (null !== a) { + var c = cm(a); + if (null !== c) if (((a = c.tag), 13 === a)) { + if (((a = cn(c)), null !== a)) { + d.blockedOn = a; + az(d.lanePriority, function() { + b.unstable_runWithPriority(d.priority, function() { + ay(c); + }); + }); + return; + } + } else if (3 === a && c.stateNode.hydrate) { + d.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null; + return; + } + } + d.blockedOn = null; + } + function cG(a) { + if (null !== a.blockedOn) return !1; + for(var b = a.targetContainers; 0 < b.length;){ + var c = c5(a.domEventName, a.eventSystemFlags, b[0], a.nativeEvent); + if (null !== c) return ((b = aX(c)), null !== b && ax(b), (a.blockedOn = c), !1); + b.shift(); + } + return !0; + } + function cH(a, b, c) { + cG(a) && c.delete(b); + } + function cI() { + for(cs = !1; 0 < ct.length;){ + var a = ct[0]; + if (null !== a.blockedOn) { + a = aX(a.blockedOn); + null !== a && aw(a); + break; + } + for(var b = a.targetContainers; 0 < b.length;){ + var c = c5(a.domEventName, a.eventSystemFlags, b[0], a.nativeEvent); + if (null !== c) { + a.blockedOn = c; + break; + } + b.shift(); + } + null === a.blockedOn && ct.shift(); + } + null !== cu && cG(cu) && (cu = null); + null !== cv && cG(cv) && (cv = null); + null !== cw && cG(cw) && (cw = null); + cx.forEach(cH); + cy.forEach(cH); + } + function cJ(a, c) { + a.blockedOn === c && ((a.blockedOn = null), cs || ((cs = !0), b.unstable_scheduleCallback(b.unstable_NormalPriority, cI))); + } + function cK(b) { + function d(a) { + return cJ(a, b); + } + if (0 < ct.length) { + cJ(ct[0], b); + for(var a = 1; a < ct.length; a++){ + var c = ct[a]; + c.blockedOn === b && (c.blockedOn = null); + } + } + null !== cu && cJ(cu, b); + null !== cv && cJ(cv, b); + null !== cw && cJ(cw, b); + cx.forEach(d); + cy.forEach(d); + for(a = 0; a < cz.length; a++)(c = cz[a]), c.blockedOn === b && (c.blockedOn = null); + for(; 0 < cz.length && ((a = cz[0]), null === a.blockedOn);)cF(a), null === a.blockedOn && cz.shift(); + } + function r(b, c) { + var a = {}; + a[b.toLowerCase()] = c.toLowerCase(); + a["Webkit" + b] = "webkit" + c; + a["Moz" + b] = "moz" + c; + return a; + } + var s = { + animationend: r("Animation", "AnimationEnd"), + animationiteration: r("Animation", "AnimationIteration"), + animationstart: r("Animation", "AnimationStart"), + transitionend: r("Transition", "TransitionEnd") + }, cL = {}, aA = {}; + g && ((aA = document.createElement("div").style), "AnimationEvent" in window || (delete s.animationend.animation, delete s.animationiteration.animation, delete s.animationstart.animation), "TransitionEvent" in window || delete s.transitionend.transition); + function t(a) { + if (cL[a]) return cL[a]; + if (!s[a]) return a; + var c = s[a], b; + for(b in c)if (c.hasOwnProperty(b) && b in aA) return (cL[a] = c[b]); + return a; + } + var aB = t("animationend"), aC = t("animationiteration"), aD = t("animationstart"), aE = t("transitionend"), cM = new Map(), aF = new Map(), aG = [ + "abort", + "abort", + aB, + "animationEnd", + aC, + "animationIteration", + aD, + "animationStart", + "canplay", + "canPlay", + "canplaythrough", + "canPlayThrough", + "durationchange", + "durationChange", + "emptied", + "emptied", + "encrypted", + "encrypted", + "ended", + "ended", + "error", + "error", + "gotpointercapture", + "gotPointerCapture", + "load", + "load", + "loadeddata", + "loadedData", + "loadedmetadata", + "loadedMetadata", + "loadstart", + "loadStart", + "lostpointercapture", + "lostPointerCapture", + "playing", + "playing", + "progress", + "progress", + "seeking", + "seeking", + "stalled", + "stalled", + "suspend", + "suspend", + "timeupdate", + "timeUpdate", + aE, + "transitionEnd", + "waiting", + "waiting", + ]; + function z(c, e) { + for(var b = 0; b < c.length; b += 2){ + var d = c[b], a = c[b + 1]; + a = "on" + (a[0].toUpperCase() + a.slice(1)); + aF.set(d, e); + cM.set(d, a); + k(a, [ + d + ]); + } + } + var aH = b.unstable_now; + aH(); + var cN = 8; + function cO(b) { + if (0 !== (1 & b)) return (cN = 15), 1; + if (0 !== (2 & b)) return (cN = 14), 2; + if (0 !== (4 & b)) return (cN = 13), 4; + var a = 24 & b; + if (0 !== a) return (cN = 12), a; + if (0 !== (b & 32)) return (cN = 11), 32; + a = 192 & b; + if (0 !== a) return (cN = 10), a; + if (0 !== (b & 256)) return (cN = 9), 256; + a = 3584 & b; + if (0 !== a) return (cN = 8), a; + if (0 !== (b & 4096)) return (cN = 7), 4096; + a = 4186112 & b; + if (0 !== a) return (cN = 6), a; + a = 62914560 & b; + if (0 !== a) return (cN = 5), a; + if (b & 67108864) return (cN = 4), 67108864; + if (0 !== (b & 134217728)) return (cN = 3), 134217728; + a = 805306368 & b; + if (0 !== a) return (cN = 2), a; + if (0 !== (1073741824 & b)) return (cN = 1), 1073741824; + cN = 8; + return b; + } + function cP(a) { + switch(a){ + case 99: + return 15; + case 98: + return 10; + case 97: + case 96: + return 8; + case 95: + return 2; + default: + return 0; + } + } + function cQ(a) { + switch(a){ + case 15: + case 14: + return 99; + case 13: + case 12: + case 11: + case 10: + return 98; + case 9: + case 8: + case 7: + case 6: + case 4: + case 5: + return 97; + case 3: + case 2: + case 1: + return 95; + case 0: + return 90; + default: + throw Error(W(358, a)); + } + } + function cR(e, b) { + var f = e.pendingLanes; + if (0 === f) return (cN = 0); + var a = 0, c = 0, d = e.expiredLanes, h = e.suspendedLanes, g = e.pingedLanes; + if (0 !== d) (a = d), (c = cN = 15); + else if (((d = f & 134217727), 0 !== d)) { + var i = d & ~h; + 0 !== i ? ((a = cO(i)), (c = cN)) : ((g &= d), 0 !== g && ((a = cO(g)), (c = cN))); + } else (d = f & ~h), 0 !== d ? ((a = cO(d)), (c = cN)) : 0 !== g && ((a = cO(g)), (c = cN)); + if (0 === a) return 0; + a = 31 - cX(a); + a = f & (((0 > a ? 0 : 1 << a) << 1) - 1); + if (0 !== b && b !== a && 0 === (b & h)) { + cO(b); + if (c <= cN) return b; + cN = c; + } + b = e.entangledLanes; + if (0 !== b) for(e = e.entanglements, b &= a; 0 < b;)(f = 31 - cX(b)), (c = 1 << f), (a |= e[f]), (b &= ~c); + return a; + } + function cS(a) { + a = a.pendingLanes & -1073741825; + return 0 !== a ? a : a & 1073741824 ? 1073741824 : 0; + } + function cT(a, b) { + switch(a){ + case 15: + return 1; + case 14: + return 2; + case 12: + return (a = cU(24 & ~b)), 0 === a ? cT(10, b) : a; + case 10: + return (a = cU(192 & ~b)), 0 === a ? cT(8, b) : a; + case 8: + return ((a = cU(3584 & ~b)), 0 === a && ((a = cU(4186112 & ~b)), 0 === a && (a = 512)), a); + case 2: + return ((b = cU(805306368 & ~b)), 0 === b && (b = 268435456), b); + } + throw Error(W(358, a)); + } + function cU(a) { + return a & -a; + } + function cV(c) { + for(var a = [], b = 0; 31 > b; b++)a.push(c); + return a; + } + function cW(a, b, d) { + a.pendingLanes |= b; + var c = b - 1; + a.suspendedLanes &= c; + a.pingedLanes &= c; + a = a.eventTimes; + b = 31 - cX(b); + a[b] = d; + } + var cX = Math.clz32 ? Math.clz32 : c$, cY = Math.log, cZ = Math.LN2; + function c$(a) { + return 0 === a ? 32 : (31 - ((cY(a) / cZ) | 0)) | 0; + } + var c_ = b.unstable_UserBlockingPriority, c0 = b.unstable_runWithPriority, c1 = !0; + function c2(a, b, c, d) { + b8 || at(); + var e = c4, f = b8; + b8 = !0; + try { + as(e, a, b, c, d); + } finally{ + (b8 = f) || ca(); + } + } + function c3(a, b, c, d) { + c0(c_, c4.bind(null, a, b, c, d)); + } + function c4(a, c, d, b) { + if (c1) { + var e; + if ((e = 0 === (c & 4)) && 0 < ct.length && -1 < cA.indexOf(a)) (a = cB(null, a, c, d, b)), ct.push(a); + else { + var f = c5(a, c, d, b); + if (null === f) e && cC(a, b); + else { + if (e) { + if (-1 < cA.indexOf(a)) { + a = cB(f, a, c, d, b); + ct.push(a); + return; + } + if (cE(f, a, c, d, b)) return; + cC(a, b); + } + eg(a, c, b, null, d); + } + } + } + } + function c5(e, f, g, c) { + var a = b4(c); + a = aW(a); + if (null !== a) { + var b = cm(a); + if (null === b) a = null; + else { + var d = b.tag; + if (13 === d) { + a = cn(b); + if (null !== a) return a; + a = null; + } else if (3 === d) { + if (b.stateNode.hydrate) return 3 === b.tag ? b.stateNode.containerInfo : null; + a = null; + } else b !== a && (a = null); + } + } + eg(e, f, c, a, g); + return null; + } + var c6 = null, c7 = null, c8 = null; + function c9() { + if (c8) return c8; + var a, d = c7, e = d.length, b, c = "value" in c6 ? c6.value : c6.textContent, f = c.length; + for(a = 0; a < e && d[a] === c[a]; a++); + var g = e - a; + for(b = 1; b <= g && d[e - b] === c[f - b]; b++); + return (c8 = c.slice(a, 1 < b ? 1 - b : void 0)); + } + function da(a) { + var b = a.keyCode; + "charCode" in a ? ((a = a.charCode), 0 === a && 13 === b && (a = 13)) : (a = b); + 10 === a && (a = 13); + return 32 <= a || 13 === a ? a : 0; + } + function db() { + return !0; + } + function dc() { + return !1; + } + function e(b) { + function a(c, e, f, a, g) { + this._reactName = c; + this._targetInst = f; + this.type = e; + this.nativeEvent = a; + this.target = g; + this.currentTarget = null; + for(var d in b)b.hasOwnProperty(d) && ((c = b[d]), (this[d] = c ? c(a) : a[d])); + this.isDefaultPrevented = (null != a.defaultPrevented ? a.defaultPrevented : !1 === a.returnValue) ? db : dc; + this.isPropagationStopped = dc; + return this; + } + d(a.prototype, { + preventDefault: function() { + this.defaultPrevented = !0; + var a = this.nativeEvent; + a && (a.preventDefault ? a.preventDefault() : "unknown" !== typeof a.returnValue && (a.returnValue = !1), (this.isDefaultPrevented = db)); + }, + stopPropagation: function() { + var a = this.nativeEvent; + a && (a.stopPropagation ? a.stopPropagation() : "unknown" !== typeof a.cancelBubble && (a.cancelBubble = !0), (this.isPropagationStopped = db)); + }, + persist: function() {}, + isPersistent: db + }); + return a; + } + var l = { + eventPhase: 0, + bubbles: 0, + cancelable: 0, + timeStamp: function(a) { + return a.timeStamp || Date.now(); + }, + defaultPrevented: 0, + isTrusted: 0 + }, dd = e(l), n = d({}, l, { + view: 0, + detail: 0 + }), de = e(n), df, dg, dh, u = d({}, n, { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + pageX: 0, + pageY: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + getModifierState: G, + button: 0, + buttons: 0, + relatedTarget: function(a) { + return void 0 === a.relatedTarget ? a.fromElement === a.srcElement ? a.toElement : a.fromElement : a.relatedTarget; + }, + movementX: function(a) { + if ("movementX" in a) return a.movementX; + a !== dh && (dh && "mousemove" === a.type ? ((df = a.screenX - dh.screenX), (dg = a.screenY - dh.screenY)) : (dg = df = 0), (dh = a)); + return df; + }, + movementY: function(a) { + return "movementY" in a ? a.movementY : dg; + } + }), di = e(u), aI = d({}, u, { + dataTransfer: 0 + }), dj = e(aI), aJ = d({}, n, { + relatedTarget: 0 + }), dk = e(aJ), aK = d({}, l, { + animationName: 0, + elapsedTime: 0, + pseudoElement: 0 + }), dl = e(aK), aL = d({}, l, { + clipboardData: function(a) { + return "clipboardData" in a ? a.clipboardData : window.clipboardData; + } + }), dm = e(aL), aM = d({}, l, { + data: 0 + }), dn = e(aM), dp = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified" + }, dq = { + 8: "Backspace", + 9: "Tab", + 12: "Clear", + 13: "Enter", + 16: "Shift", + 17: "Control", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Escape", + 32: " ", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "ArrowLeft", + 38: "ArrowUp", + 39: "ArrowRight", + 40: "ArrowDown", + 45: "Insert", + 46: "Delete", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "NumLock", + 145: "ScrollLock", + 224: "Meta" + }, dr = { + Alt: "altKey", + Control: "ctrlKey", + Meta: "metaKey", + Shift: "shiftKey" + }; + function ds(a) { + var b = this.nativeEvent; + return b.getModifierState ? b.getModifierState(a) : (a = dr[a]) ? !!b[a] : !1; + } + function G() { + return ds; + } + var aN = d({}, n, { + key: function(a) { + if (a.key) { + var b = dp[a.key] || a.key; + if ("Unidentified" !== b) return b; + } + return "keypress" === a.type ? ((a = da(a)), 13 === a ? "Enter" : String.fromCharCode(a)) : "keydown" === a.type || "keyup" === a.type ? dq[a.keyCode] || "Unidentified" : ""; + }, + code: 0, + location: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + repeat: 0, + locale: 0, + getModifierState: G, + charCode: function(a) { + return "keypress" === a.type ? da(a) : 0; + }, + keyCode: function(a) { + return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; + }, + which: function(a) { + return "keypress" === a.type ? da(a) : "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; + } + }), dt = e(aN), aO = d({}, u, { + pointerId: 0, + width: 0, + height: 0, + pressure: 0, + tangentialPressure: 0, + tiltX: 0, + tiltY: 0, + twist: 0, + pointerType: 0, + isPrimary: 0 + }), du = e(aO), aP = d({}, n, { + touches: 0, + targetTouches: 0, + changedTouches: 0, + altKey: 0, + metaKey: 0, + ctrlKey: 0, + shiftKey: 0, + getModifierState: G + }), dv = e(aP), aQ = d({}, l, { + propertyName: 0, + elapsedTime: 0, + pseudoElement: 0 + }), dw = e(aQ), aR = d({}, u, { + deltaX: function(a) { + return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0; + }, + deltaY: function(a) { + return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ? -a.wheelDelta : 0; + }, + deltaZ: 0, + deltaMode: 0 + }), dx = e(aR), dy = [ + 9, + 13, + 27, + 32 + ], aS = g && "CompositionEvent" in window, o = null; + g && "documentMode" in document && (o = document.documentMode); + var dz = g && "TextEvent" in window && !o, dA = g && (!aS || (o && 8 < o && 11 >= o)), dB = String.fromCharCode(32), dC = !1; + function dD(b, a) { + switch(b){ + case "keyup": + return -1 !== dy.indexOf(a.keyCode); + case "keydown": + return 229 !== a.keyCode; + case "keypress": + case "mousedown": + case "focusout": + return !0; + default: + return !1; + } + } + function dE(a) { + a = a.detail; + return "object" === typeof a && "data" in a ? a.data : null; + } + var dF = !1; + function dG(a, b) { + switch(a){ + case "compositionend": + return dE(b); + case "keypress": + if (32 !== b.which) return null; + dC = !0; + return dB; + case "textInput": + return (a = b.data), a === dB && dC ? null : a; + default: + return null; + } + } + function dH(b, a) { + if (dF) return "compositionend" === b || (!aS && dD(b, a)) ? ((b = c9()), (c8 = c7 = c6 = null), (dF = !1), b) : null; + switch(b){ + case "paste": + return null; + case "keypress": + if (!(a.ctrlKey || a.altKey || a.metaKey) || (a.ctrlKey && a.altKey)) { + if (a.char && 1 < a.char.length) return a.char; + if (a.which) return String.fromCharCode(a.which); + } + return null; + case "compositionend": + return dA && "ko" !== a.locale ? null : a.data; + default: + return null; + } + } + var dI = { + color: !0, + date: !0, + datetime: !0, + "datetime-local": !0, + email: !0, + month: !0, + number: !0, + password: !0, + range: !0, + search: !0, + tel: !0, + text: !0, + time: !0, + url: !0, + week: !0 + }; + function dJ(a) { + var b = a && a.nodeName && a.nodeName.toLowerCase(); + return "input" === b ? !!dI[a.type] : "textarea" === b ? !0 : !1; + } + function dK(d, a, b, c) { + aq(c); + a = ei(a, "onChange"); + 0 < a.length && ((b = new dd("onChange", "change", null, b, c)), d.push({ + event: b, + listeners: a + })); + } + var dL = null, dM = null; + function dN(a) { + ea(a, 0); + } + function dO(a) { + var b = aY(a); + if (bF(b)) return a; + } + function dP(a, b) { + if ("change" === a) return b; + } + var aT = !1; + if (g) { + var A; + if (g) { + var B = "oninput" in document; + if (!B) { + var H = document.createElement("div"); + H.setAttribute("oninput", "return;"); + B = "function" === typeof H.oninput; + } + A = B; + } else A = !1; + aT = A && (!document.documentMode || 9 < document.documentMode); + } + function dQ() { + dL && (dL.detachEvent("onpropertychange", dR), (dM = dL = null)); + } + function dR(a) { + if ("value" === a.propertyName && dO(dM)) { + var b = []; + dK(b, dM, a, b4(a)); + a = dN; + if (b8) a(b); + else { + b8 = !0; + try { + F(a, b); + } finally{ + (b8 = !1), ca(); + } + } + } + } + function dS(a, b, c) { + "focusin" === a ? (dQ(), (dL = b), (dM = c), dL.attachEvent("onpropertychange", dR)) : "focusout" === a && dQ(); + } + function dT(a) { + if ("selectionchange" === a || "keyup" === a || "keydown" === a) return dO(dM); + } + function dU(a, b) { + if ("click" === a) return dO(b); + } + function dV(a, b) { + if ("input" === a || "change" === a) return dO(b); + } + function aU(a, b) { + return ((a === b && (0 !== a || 1 / a === 1 / b)) || (a !== a && b !== b)); + } + var dW = "function" === typeof Object.is ? Object.is : aU, dX = Object.prototype.hasOwnProperty; + function dY(c, b) { + if (dW(c, b)) return !0; + if ("object" !== typeof c || null === c || "object" !== typeof b || null === b) return !1; + var d = Object.keys(c), a = Object.keys(b); + if (d.length !== a.length) return !1; + for(a = 0; a < d.length; a++)if (!dX.call(b, d[a]) || !dW(c[d[a]], b[d[a]])) return !1; + return !0; + } + function dZ(a) { + for(; a && a.firstChild;)a = a.firstChild; + return a; + } + function d$(b, c) { + var a = dZ(b); + b = 0; + for(var d; a;){ + if (3 === a.nodeType) { + d = b + a.textContent.length; + if (b <= c && d >= c) return { + node: a, + offset: c - b + }; + b = d; + } + a: { + for(; a;){ + if (a.nextSibling) { + a = a.nextSibling; + break a; + } + a = a.parentNode; + } + a = void 0; + } + a = dZ(a); + } + } + function d_(a, b) { + return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? d_(a, b.parentNode) : "contains" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1; + } + function d0() { + for(var b = window, a = bG(); a instanceof b.HTMLIFrameElement;){ + try { + var c = "string" === typeof a.contentWindow.location.href; + } catch (d) { + c = !1; + } + if (c) b = a.contentWindow; + else break; + a = bG(b.document); + } + return a; + } + function d1(a) { + var b = a && a.nodeName && a.nodeName.toLowerCase(); + return (b && (("input" === b && ("text" === a.type || "search" === a.type || "tel" === a.type || "url" === a.type || "password" === a.type)) || "textarea" === b || "true" === a.contentEditable)); + } + var d2 = g && "documentMode" in document && 11 >= document.documentMode, d3 = null, d4 = null, d5 = null, d6 = !1; + function d7(d, c, b) { + var a = b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument; + d6 || null == d3 || d3 !== bG(a) || ((a = d3), "selectionStart" in a && d1(a) ? (a = { + start: a.selectionStart, + end: a.selectionEnd + }) : ((a = ((a.ownerDocument && a.ownerDocument.defaultView) || window).getSelection()), (a = { + anchorNode: a.anchorNode, + anchorOffset: a.anchorOffset, + focusNode: a.focusNode, + focusOffset: a.focusOffset + })), (d5 && dY(d5, a)) || ((d5 = a), (a = ei(d4, "onSelect")), 0 < a.length && ((c = new dd("onSelect", "select", null, c, b)), d.push({ + event: c, + listeners: a + }), (c.target = d3)))); + } + z("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "), 0); + z("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "), 1); + z(aG, 2); + for(var I = "change selectionchange textInput compositionstart compositionend compositionupdate".split(" "), C = 0; C < I.length; C++)aF.set(I[C], 0); + q("onMouseEnter", [ + "mouseout", + "mouseover" + ]); + q("onMouseLeave", [ + "mouseout", + "mouseover" + ]); + q("onPointerEnter", [ + "pointerout", + "pointerover" + ]); + q("onPointerLeave", [ + "pointerout", + "pointerover" + ]); + k("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); + k("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); + k("onBeforeInput", [ + "compositionend", + "keypress", + "textInput", + "paste", + ]); + k("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); + k("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); + k("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); + var aV = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), d8 = new Set("cancel close invalid load scroll toggle".split(" ").concat(aV)); + function d9(a, b, c) { + var d = a.type || "unknown-event"; + a.currentTarget = c; + cl(d, b, void 0, a); + a.currentTarget = null; + } + function ea(e, h) { + h = 0 !== (h & 4); + for(var i = 0; i < e.length; i++){ + var b = e[i], f = b.event; + b = b.listeners; + a: { + var g = void 0; + if (h) for(var c = b.length - 1; 0 <= c; c--){ + var a = b[c], d = a.instance, j = a.currentTarget; + a = a.listener; + if (d !== g && f.isPropagationStopped()) break a; + d9(f, a, j); + g = d; + } + else for(c = 0; c < b.length; c++){ + a = b[c]; + d = a.instance; + j = a.currentTarget; + a = a.listener; + if (d !== g && f.isPropagationStopped()) break a; + d9(f, a, j); + g = d; + } + } + } + if (ch) throw ((e = ci), (ch = !1), (ci = null), e); + } + function eb(a, b) { + var c = eB(b), d = a + "__bubble"; + c.has(d) || (ef(b, a, 2, !1), c.add(d)); + } + var ec = "_reactListening" + Math.random().toString(36).slice(2); + function ed(a) { + a[ec] || ((a[ec] = !0), bh.forEach(function(b) { + d8.has(b) || ee(b, !1, a, null); + ee(b, !0, a, null); + })); + } + function ee(a, b, d, f) { + var e = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 0, c = d; + "selectionchange" === a && 9 !== d.nodeType && (c = d.ownerDocument); + if (null !== f && !b && d8.has(a)) { + if ("scroll" !== a) return; + e |= 2; + c = f; + } + var g = eB(c), h = a + "__" + (b ? "capture" : "bubble"); + g.has(h) || (b && (e |= 4), ef(c, a, e, b), g.add(h)); + } + function ef(d, b, c, e) { + var a = aF.get(b); + switch(void 0 === a ? 2 : a){ + case 0: + a = c2; + break; + case 1: + a = c3; + break; + default: + a = c4; + } + c = a.bind(null, b, c, d); + a = void 0; + !av || ("touchstart" !== b && "touchmove" !== b && "wheel" !== b) || (a = !0); + e ? void 0 !== a ? d.addEventListener(b, c, { + capture: !0, + passive: a + }) : d.addEventListener(b, c, !0) : void 0 !== a ? d.addEventListener(b, c, { + passive: a + }) : d.addEventListener(b, c, !1); + } + function eg(h, f, i, b, e) { + var g = b; + if (0 === (f & 1) && 0 === (f & 2) && null !== b) a: for(;;){ + if (null === b) return; + var a = b.tag; + if (3 === a || 4 === a) { + var d = b.stateNode.containerInfo; + if (d === e || (8 === d.nodeType && d.parentNode === e)) break; + if (4 === a) for(a = b.return; null !== a;){ + var c = a.tag; + if (3 === c || 4 === c) if (((c = a.stateNode.containerInfo), c === e || (8 === c.nodeType && c.parentNode === e))) return; + a = a.return; + } + for(; null !== d;){ + a = aW(d); + if (null === a) return; + c = a.tag; + if (5 === c || 6 === c) { + b = g = a; + continue a; + } + d = d.parentNode; + } + } + b = b.return; + } + cb(function() { + var k = g, e = b4(i), q = []; + a: { + var a = cM.get(h); + if (void 0 !== a) { + var b = dd, d = h; + switch(h){ + case "keypress": + if (0 === da(i)) break a; + case "keydown": + case "keyup": + b = dt; + break; + case "focusin": + d = "focus"; + b = dk; + break; + case "focusout": + d = "blur"; + b = dk; + break; + case "beforeblur": + case "afterblur": + b = dk; + break; + case "click": + if (2 === i.button) break a; + case "auxclick": + case "dblclick": + case "mousedown": + case "mousemove": + case "mouseup": + case "mouseout": + case "mouseover": + case "contextmenu": + b = di; + break; + case "drag": + case "dragend": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "dragstart": + case "drop": + b = dj; + break; + case "touchcancel": + case "touchend": + case "touchmove": + case "touchstart": + b = dv; + break; + case aB: + case aC: + case aD: + b = dl; + break; + case aE: + b = dw; + break; + case "scroll": + b = de; + break; + case "wheel": + b = dx; + break; + case "copy": + case "cut": + case "paste": + b = dm; + break; + case "gotpointercapture": + case "lostpointercapture": + case "pointercancel": + case "pointerdown": + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerup": + b = du; + } + var c = 0 !== (f & 4), r = !c && "scroll" === h, n = c ? (null !== a ? a + "Capture" : null) : a; + c = []; + for(var l = k, j; null !== l;){ + j = l; + var m = j.stateNode; + 5 === j.tag && null !== m && ((j = m), null !== n && ((m = cc(l, n)), null != m && c.push(eh(l, m, j)))); + if (r) break; + l = l.return; + } + 0 < c.length && ((a = new b(a, d, null, i, e)), q.push({ + event: a, + listeners: c + })); + } + } + if (0 === (f & 7)) { + a: { + a = "mouseover" === h || "pointerover" === h; + b = "mouseout" === h || "pointerout" === h; + if (a && 0 === (f & 16) && (d = i.relatedTarget || i.fromElement) && (aW(d) || d[ez])) break a; + if (b || a) { + a = e.window === e ? e : (a = e.ownerDocument) ? a.defaultView || a.parentWindow : window; + if (b) { + if (((d = i.relatedTarget || i.toElement), (b = k), (d = d ? aW(d) : null), null !== d && ((r = cm(d)), d !== r || (5 !== d.tag && 6 !== d.tag)))) d = null; + } else (b = null), (d = k); + if (b !== d) { + c = di; + m = "onMouseLeave"; + n = "onMouseEnter"; + l = "mouse"; + if ("pointerout" === h || "pointerover" === h) (c = du), (m = "onPointerLeave"), (n = "onPointerEnter"), (l = "pointer"); + r = null == b ? a : aY(b); + j = null == d ? a : aY(d); + a = new c(m, l + "leave", b, i, e); + a.target = r; + a.relatedTarget = j; + m = null; + aW(e) === k && ((c = new c(n, l + "enter", d, i, e)), (c.target = j), (c.relatedTarget = r), (m = c)); + r = m; + if (b && d) b: { + c = b; + n = d; + l = 0; + for(j = c; j; j = ej(j))l++; + j = 0; + for(m = n; m; m = ej(m))j++; + for(; 0 < l - j;)(c = ej(c)), l--; + for(; 0 < j - l;)(n = ej(n)), j--; + for(; l--;){ + if (c === n || (null !== n && c === n.alternate)) break b; + c = ej(c); + n = ej(n); + } + c = null; + } + else c = null; + null !== b && ek(q, a, b, c, !1); + null !== d && null !== r && ek(q, r, d, c, !0); + } + } + } + a: { + a = k ? aY(k) : window; + b = a.nodeName && a.nodeName.toLowerCase(); + if ("select" === b || ("input" === b && "file" === a.type)) var t = dP; + else if (dJ(a)) if (aT) t = dV; + else { + t = dT; + var p = dS; + } + else (b = a.nodeName) && "input" === b.toLowerCase() && ("checkbox" === a.type || "radio" === a.type) && (t = dU); + if (t && (t = t(h, k))) { + dK(q, t, i, e); + break a; + } + p && p(h, a, k); + "focusout" === h && (p = a._wrapperState) && p.controlled && "number" === a.type && bM(a, "number", a.value); + } + p = k ? aY(k) : window; + switch(h){ + case "focusin": + if (dJ(p) || "true" === p.contentEditable) (d3 = p), (d4 = k), (d5 = null); + break; + case "focusout": + d5 = d4 = d3 = null; + break; + case "mousedown": + d6 = !0; + break; + case "contextmenu": + case "mouseup": + case "dragend": + d6 = !1; + d7(q, i, e); + break; + case "selectionchange": + if (d2) break; + case "keydown": + case "keyup": + d7(q, i, e); + } + var s; + if (aS) b: { + switch(h){ + case "compositionstart": + var o = "onCompositionStart"; + break b; + case "compositionend": + o = "onCompositionEnd"; + break b; + case "compositionupdate": + o = "onCompositionUpdate"; + break b; + } + o = void 0; + } + else dF ? dD(h, i) && (o = "onCompositionEnd") : "keydown" === h && 229 === i.keyCode && (o = "onCompositionStart"); + o && (dA && "ko" !== i.locale && (dF || "onCompositionStart" !== o ? "onCompositionEnd" === o && dF && (s = c9()) : ((c6 = e), (c7 = "value" in c6 ? c6.value : c6.textContent), (dF = !0))), (p = ei(k, o)), 0 < p.length && ((o = new dn(o, h, null, i, e)), q.push({ + event: o, + listeners: p + }), s ? (o.data = s) : ((s = dE(i)), null !== s && (o.data = s)))); + if ((s = dz ? dG(h, i) : dH(h, i))) (k = ei(k, "onBeforeInput")), 0 < k.length && ((e = new dn("onBeforeInput", "beforeinput", null, i, e)), q.push({ + event: e, + listeners: k + }), (e.data = s)); + } + ea(q, f); + }); + } + function eh(a, b, c) { + return { + instance: a, + listener: b, + currentTarget: c + }; + } + function ei(a, e) { + for(var f = e + "Capture", d = []; null !== a;){ + var c = a, b = c.stateNode; + 5 === c.tag && null !== b && ((c = b), (b = cc(a, f)), null != b && d.unshift(eh(a, b, c)), (b = cc(a, e)), null != b && d.push(eh(a, b, c))); + a = a.return; + } + return d; + } + function ej(a) { + if (null === a) return null; + do a = a.return; + while (a && 5 !== a.tag) + return a ? a : null; + } + function ek(j, e, a, f, g) { + for(var h = e._reactName, d = []; null !== a && a !== f;){ + var c = a, b = c.alternate, i = c.stateNode; + if (null !== b && b === f) break; + 5 === c.tag && null !== i && ((c = i), g ? ((b = cc(a, h)), null != b && d.unshift(eh(a, b, c))) : g || ((b = cc(a, h)), null != b && d.push(eh(a, b, c)))); + a = a.return; + } + 0 !== d.length && j.push({ + event: e, + listeners: d + }); + } + function el() {} + var em = null, en = null; + function eo(a, b) { + switch(a){ + case "button": + case "input": + case "select": + case "textarea": + return !!b.autoFocus; + } + return !1; + } + function ep(b, a) { + return ("textarea" === b || "option" === b || "noscript" === b || "string" === typeof a.children || "number" === typeof a.children || ("object" === typeof a.dangerouslySetInnerHTML && null !== a.dangerouslySetInnerHTML && null != a.dangerouslySetInnerHTML.__html)); + } + var eq = "function" === typeof setTimeout ? setTimeout : void 0, er = "function" === typeof clearTimeout ? clearTimeout : void 0; + function es(a) { + 1 === a.nodeType ? (a.textContent = "") : 9 === a.nodeType && ((a = a.body), null != a && (a.textContent = "")); + } + function et(a) { + for(; null != a; a = a.nextSibling){ + var b = a.nodeType; + if (1 === b || 3 === b) break; + } + return a; + } + function eu(a) { + a = a.previousSibling; + for(var c = 0; a;){ + if (8 === a.nodeType) { + var b = a.data; + if ("$" === b || "$!" === b || "$?" === b) { + if (0 === c) return a; + c--; + } else "/$" === b && c++; + } + a = a.previousSibling; + } + return null; + } + var ev = 0; + function ew(a) { + return { + $$typeof: ak, + toString: a, + valueOf: a + }; + } + var v = Math.random().toString(36).slice(2), ex = "__reactFiber$" + v, ey = "__reactProps$" + v, ez = "__reactContainer$" + v, eA = "__reactEvents$" + v; + function aW(a) { + var c = a[ex]; + if (c) return c; + for(var b = a.parentNode; b;){ + if ((c = b[ez] || b[ex])) { + b = c.alternate; + if (null !== c.child || (null !== b && null !== b.child)) for(a = eu(a); null !== a;){ + if ((b = a[ex])) return b; + a = eu(a); + } + return c; + } + a = b; + b = a.parentNode; + } + return null; + } + function aX(a) { + a = a[ex] || a[ez]; + return !a || (5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag) ? null : a; + } + function aY(a) { + if (5 === a.tag || 6 === a.tag) return a.stateNode; + throw Error(W(33)); + } + function aZ(a) { + return a[ey] || null; + } + function eB(b) { + var a = b[eA]; + void 0 === a && (a = b[eA] = new Set()); + return a; + } + var eC = [], eD = -1; + function h(a) { + return { + current: a + }; + } + function eE(a) { + 0 > eD || ((a.current = eC[eD]), (eC[eD] = null), eD--); + } + function eF(a, b) { + eD++; + eC[eD] = a.current; + a.current = b; + } + var J = {}, eG = h(J), eH = h(!1), eI = J; + function eJ(a, c) { + var f = a.type.contextTypes; + if (!f) return J; + var b = a.stateNode; + if (b && b.__reactInternalMemoizedUnmaskedChildContext === c) return b.__reactInternalMemoizedMaskedChildContext; + var d = {}, e; + for(e in f)d[e] = c[e]; + b && ((a = a.stateNode), (a.__reactInternalMemoizedUnmaskedChildContext = c), (a.__reactInternalMemoizedMaskedChildContext = d)); + return d; + } + function eK(a) { + a = a.childContextTypes; + return null !== a && void 0 !== a; + } + function eL() { + eE(eH); + eE(eG); + } + function eM(c, a, b) { + if (eG.current !== J) throw Error(W(168)); + eF(eG, a); + eF(eH, b); + } + function eN(b, c, e) { + var a = b.stateNode; + b = c.childContextTypes; + if ("function" !== typeof a.getChildContext) return e; + a = a.getChildContext(); + for(var f in a)if (!(f in b)) throw Error(W(108, bA(c) || "Unknown", f)); + return d({}, e, a); + } + function eO(a) { + a = ((a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext) || J; + eI = eG.current; + eF(eG, a); + eF(eH, eH.current); + return !0; + } + function eP(a, d, b) { + var c = a.stateNode; + if (!c) throw Error(W(169)); + b ? ((a = eN(a, d, eI)), (c.__reactInternalMemoizedMergedChildContext = a), eE(eH), eE(eG), eF(eG, a)) : eE(eH); + eF(eH, b); + } + var a$ = null, a_ = null, eQ = b.unstable_runWithPriority, eR = b.unstable_scheduleCallback, eS = b.unstable_cancelCallback, eT = b.unstable_shouldYield, K = b.unstable_requestPaint, L = b.unstable_now, eU = b.unstable_getCurrentPriorityLevel, eV = b.unstable_ImmediatePriority, eW = b.unstable_UserBlockingPriority, eX = b.unstable_NormalPriority, eY = b.unstable_LowPriority, eZ = b.unstable_IdlePriority, e$ = {}, e_ = void 0 !== K ? K : function() {}, e0 = null, e1 = null, e2 = !1, a0 = L(), e3 = 1e4 > a0 ? L : function() { + return L() - a0; + }; + function e4() { + switch(eU()){ + case eV: + return 99; + case eW: + return 98; + case eX: + return 97; + case eY: + return 96; + case eZ: + return 95; + default: + throw Error(W(332)); + } + } + function e5(a) { + switch(a){ + case 99: + return eV; + case 98: + return eW; + case 97: + return eX; + case 96: + return eY; + case 95: + return eZ; + default: + throw Error(W(332)); + } + } + function e6(a, b) { + a = e5(a); + return eQ(a, b); + } + function e7(a, b, c) { + a = e5(a); + return eR(a, b, c); + } + function e8() { + if (null !== e1) { + var a = e1; + e1 = null; + eS(a); + } + e9(); + } + function e9() { + if (!e2 && null !== e0) { + e2 = !0; + var a = 0; + try { + var c = e0; + e6(99, function() { + for(; a < c.length; a++){ + var b = c[a]; + do b = b(!0); + while (null !== b) + } + }); + e0 = null; + } catch (b) { + throw ((null !== e0 && (e0 = e0.slice(a + 1)), eR(eV, e8), b)); + } finally{ + e2 = !1; + } + } + } + var fa = i.ReactCurrentBatchConfig; + function fb(a, b) { + if (a && a.defaultProps) { + b = d({}, b); + a = a.defaultProps; + for(var c in a)void 0 === b[c] && (b[c] = a[c]); + return b; + } + return b; + } + var fc = h(null), fd = null, fe = null, ff = null; + function fg() { + ff = fe = fd = null; + } + function fh(a) { + var b = fc.current; + eE(fc); + a.type._context._currentValue = b; + } + function fi(b, a) { + for(; null !== b;){ + var c = b.alternate; + if ((b.childLanes & a) === a) if (null === c || (c.childLanes & a) === a) break; + else c.childLanes |= a; + else (b.childLanes |= a), null !== c && (c.childLanes |= a); + b = b.return; + } + } + function fj(a, b) { + fd = a; + ff = fe = null; + a = a.dependencies; + null !== a && null !== a.firstContext && (0 !== (a.lanes & b) && (gn = !0), (a.firstContext = null)); + } + function j(b, a) { + if (ff !== b && !1 !== a && 0 !== a) { + if ("number" !== typeof a || 1073741823 === a) (ff = b), (a = 1073741823); + a = { + context: b, + observedBits: a, + next: null + }; + if (null === fe) { + if (null === fd) throw Error(W(308)); + fe = a; + fd.dependencies = { + lanes: 0, + firstContext: a, + responders: null + }; + } else fe = fe.next = a; + } + return b._currentValue; + } + var fk = !1; + function fl(a) { + a.updateQueue = { + baseState: a.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { + pending: null + }, + effects: null + }; + } + function fm(a, b) { + a = a.updateQueue; + b.updateQueue === a && (b.updateQueue = { + baseState: a.baseState, + firstBaseUpdate: a.firstBaseUpdate, + lastBaseUpdate: a.lastBaseUpdate, + shared: a.shared, + effects: a.effects + }); + } + function fn(a, b) { + return { + eventTime: a, + lane: b, + tag: 0, + payload: null, + callback: null, + next: null + }; + } + function fo(a, b) { + a = a.updateQueue; + if (null !== a) { + a = a.shared; + var c = a.pending; + null === c ? (b.next = b) : ((b.next = c.next), (c.next = b)); + a.pending = b; + } + } + function fp(d, e) { + var a = d.updateQueue, c = d.alternate; + if (null !== c && ((c = c.updateQueue), a === c)) { + var f = null, b = null; + a = a.firstBaseUpdate; + if (null !== a) { + do { + var g = { + eventTime: a.eventTime, + lane: a.lane, + tag: a.tag, + payload: a.payload, + callback: a.callback, + next: null + }; + null === b ? (f = b = g) : (b = b.next = g); + a = a.next; + }while (null !== a) + null === b ? (f = b = e) : (b = b.next = e); + } else f = b = e; + a = { + baseState: c.baseState, + firstBaseUpdate: f, + lastBaseUpdate: b, + shared: c.shared, + effects: c.effects + }; + d.updateQueue = a; + return; + } + d = a.lastBaseUpdate; + null === d ? (a.firstBaseUpdate = e) : (d.next = e); + a.lastBaseUpdate = e; + } + function fq(l, n, o, p) { + var e = l.updateQueue; + fk = !1; + var b = e.firstBaseUpdate, h = e.lastBaseUpdate, a = e.shared.pending; + if (null !== a) { + e.shared.pending = null; + var i = a, k = i.next; + i.next = null; + null === h ? (b = k) : (h.next = k); + h = i; + var c = l.alternate; + if (null !== c) { + c = c.updateQueue; + var f = c.lastBaseUpdate; + f !== h && (null === f ? (c.firstBaseUpdate = k) : (f.next = k), (c.lastBaseUpdate = i)); + } + } + if (null !== b) { + f = e.baseState; + h = 0; + c = k = i = null; + do { + a = b.lane; + var j = b.eventTime; + if ((p & a) === a) { + null !== c && (c = c.next = { + eventTime: j, + lane: 0, + tag: b.tag, + payload: b.payload, + callback: b.callback, + next: null + }); + a: { + var g = l, m = b; + a = n; + j = o; + switch(m.tag){ + case 1: + g = m.payload; + if ("function" === typeof g) { + f = g.call(j, f, a); + break a; + } + f = g; + break a; + case 3: + g.flags = (g.flags & -4097) | 64; + case 0: + g = m.payload; + a = "function" === typeof g ? g.call(j, f, a) : g; + if (null === a || void 0 === a) break a; + f = d({}, f, a); + break a; + case 2: + fk = !0; + } + } + null !== b.callback && ((l.flags |= 32), (a = e.effects), null === a ? (e.effects = [ + b + ]) : a.push(b)); + } else (j = { + eventTime: j, + lane: a, + tag: b.tag, + payload: b.payload, + callback: b.callback, + next: null + }), null === c ? ((k = c = j), (i = f)) : (c = c.next = j), (h |= a); + b = b.next; + if (null === b) if (((a = e.shared.pending), null === a)) break; + else (b = a.next), (a.next = null), (e.lastBaseUpdate = a), (e.shared.pending = null); + }while (1) + null === c && (i = f); + e.baseState = i; + e.firstBaseUpdate = k; + e.lastBaseUpdate = c; + he |= h; + l.lanes = h; + l.memoizedState = f; + } + } + function fr(b, a, e) { + b = a.effects; + a.effects = null; + if (null !== b) for(a = 0; a < b.length; a++){ + var c = b[a], d = c.callback; + if (null !== d) { + c.callback = null; + c = e; + if ("function" !== typeof d) throw Error(W(191, d)); + d.call(c); + } + } + } + var fs = new y.Component().refs; + function ft(b, c, a, e) { + c = b.memoizedState; + a = a(e, c); + a = null === a || void 0 === a ? c : d({}, c, a); + b.memoizedState = a; + 0 === b.lanes && (b.updateQueue.baseState = a); + } + var fu = { + isMounted: function(a) { + return (a = a._reactInternals) ? cm(a) === a : !1; + }, + enqueueSetState: function(a, f, b) { + a = a._reactInternals; + var d = hC(), e = hD(a), c = fn(d, e); + c.payload = f; + void 0 !== b && null !== b && (c.callback = b); + fo(a, c); + hE(a, e, d); + }, + enqueueReplaceState: function(a, f, c) { + a = a._reactInternals; + var d = hC(), e = hD(a), b = fn(d, e); + b.tag = 1; + b.payload = f; + void 0 !== c && null !== c && (b.callback = c); + fo(a, b); + hE(a, e, d); + }, + enqueueForceUpdate: function(a, b) { + a = a._reactInternals; + var d = hC(), e = hD(a), c = fn(d, e); + c.tag = 2; + void 0 !== b && null !== b && (c.callback = b); + fo(a, c); + hE(a, e, d); + } + }; + function fv(a, b, e, c, f, d, g) { + a = a.stateNode; + return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(c, d, g) : b.prototype && b.prototype.isPureReactComponent ? !dY(e, c) || !dY(f, d) : !0; + } + function fw(b, a, f) { + var d = !1, e = J; + var c = a.contextType; + "object" === typeof c && null !== c ? (c = j(c)) : ((e = eK(a) ? eI : eG.current), (d = a.contextTypes), (c = (d = null !== d && void 0 !== d) ? eJ(b, e) : J)); + a = new a(f, c); + b.memoizedState = null !== a.state && void 0 !== a.state ? a.state : null; + a.updater = fu; + b.stateNode = a; + a._reactInternals = b; + d && ((b = b.stateNode), (b.__reactInternalMemoizedUnmaskedChildContext = e), (b.__reactInternalMemoizedMaskedChildContext = c)); + return a; + } + function fx(b, a, c, d) { + b = a.state; + "function" === typeof a.componentWillReceiveProps && a.componentWillReceiveProps(c, d); + "function" === typeof a.UNSAFE_componentWillReceiveProps && a.UNSAFE_componentWillReceiveProps(c, d); + a.state !== b && fu.enqueueReplaceState(a, a.state, null); + } + function fy(b, d, e, f) { + var a = b.stateNode; + a.props = e; + a.state = b.memoizedState; + a.refs = fs; + fl(b); + var c = d.contextType; + "object" === typeof c && null !== c ? (a.context = j(c)) : ((c = eK(d) ? eI : eG.current), (a.context = eJ(b, c))); + fq(b, e, a, f); + a.state = b.memoizedState; + c = d.getDerivedStateFromProps; + "function" === typeof c && (ft(b, d, c, e), (a.state = b.memoizedState)); + "function" === typeof d.getDerivedStateFromProps || "function" === typeof a.getSnapshotBeforeUpdate || ("function" !== typeof a.UNSAFE_componentWillMount && "function" !== typeof a.componentWillMount) || ((d = a.state), "function" === typeof a.componentWillMount && a.componentWillMount(), "function" === typeof a.UNSAFE_componentWillMount && a.UNSAFE_componentWillMount(), d !== a.state && fu.enqueueReplaceState(a, a.state, null), fq(b, e, a, f), (a.state = b.memoizedState)); + "function" === typeof a.componentDidMount && (b.flags |= 4); + } + var fz = Array.isArray; + function fA(a, b, c) { + a = c.ref; + if (null !== a && "function" !== typeof a && "object" !== typeof a) { + if (c._owner) { + c = c._owner; + if (c) { + if (1 !== c.tag) throw Error(W(309)); + var e = c.stateNode; + } + if (!e) throw Error(W(147, a)); + var d = "" + a; + if (null !== b && null !== b.ref && "function" === typeof b.ref && b.ref._stringRef === d) return b.ref; + b = function(b) { + var a = e.refs; + a === fs && (a = e.refs = {}); + null === b ? delete a[d] : (a[d] = b); + }; + b._stringRef = d; + return b; + } + if ("string" !== typeof a) throw Error(W(284)); + if (!c._owner) throw Error(W(290, a)); + } + return a; + } + function fB(b, a) { + if ("textarea" !== b.type) throw Error(W(31, "[object Object]" === Object.prototype.toString.call(a) ? "object with keys {" + Object.keys(a).join(", ") + "}" : a)); + } + function M(a) { + function b(c, b) { + if (a) { + var d = c.lastEffect; + null !== d ? ((d.nextEffect = b), (c.lastEffect = b)) : (c.firstEffect = c.lastEffect = b); + b.nextEffect = null; + b.flags = 8; + } + } + function c(d, c) { + if (!a) return null; + for(; null !== c;)b(d, c), (c = c.sibling); + return null; + } + function d(b, a) { + for(b = new Map(); null !== a;)null !== a.key ? b.set(a.key, a) : b.set(a.index, a), (a = a.sibling); + return b; + } + function e(a, b) { + a = h8(a, b); + a.index = 0; + a.sibling = null; + return a; + } + function f(c, d, b) { + c.index = b; + if (!a) return d; + b = c.alternate; + if (null !== b) return (b = b.index), b < d ? ((c.flags = 2), d) : b; + c.flags = 2; + return d; + } + function g(b) { + a && null === b.alternate && (b.flags = 2); + return b; + } + function h(b, a, c, d) { + if (null === a || 6 !== a.tag) return (a = ic(c, b.mode, d)), (a.return = b), a; + a = e(a, c); + a.return = b; + return a; + } + function i(c, d, b, a) { + if (null !== d && d.elementType === b.type) return ((a = e(d, b.props)), (a.ref = fA(c, d, b)), (a.return = c), a); + a = h9(b.type, b.key, b.props, null, c.mode, a); + a.ref = fA(c, d, b); + a.return = c; + return a; + } + function j(c, a, b, d) { + if (null === a || 4 !== a.tag || a.stateNode.containerInfo !== b.containerInfo || a.stateNode.implementation !== b.implementation) return (a = id(b, c.mode, d)), (a.return = c), a; + a = e(a, b.children || []); + a.return = c; + return a; + } + function k(b, a, c, d, f) { + if (null === a || 7 !== a.tag) return (a = ia(c, b.mode, d, f)), (a.return = b), a; + a = e(a, c); + a.return = b; + return a; + } + function l(b, a, c) { + if ("string" === typeof a || "number" === typeof a) return (a = ic("" + a, b.mode, c)), (a.return = b), a; + if ("object" === typeof a && null !== a) { + switch(a.$$typeof){ + case Z: + return ((c = h9(a.type, a.key, a.props, null, b.mode, c)), (c.ref = fA(b, null, a)), (c.return = b), c); + case $: + return ((a = id(a, b.mode, c)), (a.return = b), a); + } + if (fz(a) || bu(a)) return ((a = ia(a, b.mode, c, null)), (a.return = b), a); + fB(b, a); + } + return null; + } + function m(c, b, a, d) { + var e = null !== b ? b.key : null; + if ("string" === typeof a || "number" === typeof a) return null !== e ? null : h(c, b, "" + a, d); + if ("object" === typeof a && null !== a) { + switch(a.$$typeof){ + case Z: + return a.key === e ? a.type === _ ? k(c, b, a.props.children, d, e) : i(c, b, a, d) : null; + case $: + return a.key === e ? j(c, b, a, d) : null; + } + if (fz(a) || bu(a)) return null !== e ? null : k(c, b, a, d, null); + fB(c, a); + } + return null; + } + function n(b, c, e, a, d) { + if ("string" === typeof a || "number" === typeof a) return (b = b.get(e) || null), h(c, b, "" + a, d); + if ("object" === typeof a && null !== a) { + switch(a.$$typeof){ + case Z: + return ((b = b.get(null === a.key ? e : a.key) || null), a.type === _ ? k(c, b, a.props.children, d, a.key) : i(c, b, a, d)); + case $: + return ((b = b.get(null === a.key ? e : a.key) || null), j(c, b, a, d)); + } + if (fz(a) || bu(a)) return (b = b.get(e) || null), k(c, b, a, d, null); + fB(c, a); + } + return null; + } + function o(o, j, k, r) { + for(var p = null, i = null, e = j, g = (j = 0), h = null; null !== e && g < k.length; g++){ + e.index > g ? ((h = e), (e = null)) : (h = e.sibling); + var q = m(o, e, k[g], r); + if (null === q) { + null === e && (e = h); + break; + } + a && e && null === q.alternate && b(o, e); + j = f(q, j, g); + null === i ? (p = q) : (i.sibling = q); + i = q; + e = h; + } + if (g === k.length) return c(o, e), p; + if (null === e) { + for(; g < k.length; g++)(e = l(o, k[g], r)), null !== e && ((j = f(e, j, g)), null === i ? (p = e) : (i.sibling = e), (i = e)); + return p; + } + for(e = d(o, e); g < k.length; g++)(h = n(e, o, g, k[g], r)), null !== h && (a && null !== h.alternate && e.delete(null === h.key ? g : h.key), (j = f(h, j, g)), null === i ? (p = h) : (i.sibling = h), (i = h)); + a && e.forEach(function(a) { + return b(o, a); + }); + return p; + } + function p(p, k, o, s) { + var h = bu(o); + if ("function" !== typeof h) throw Error(W(150)); + o = h.call(o); + if (null == o) throw Error(W(151)); + for(var i = (h = null), g = k, j = (k = 0), r = null, e = o.next(); null !== g && !e.done; j++, e = o.next()){ + g.index > j ? ((r = g), (g = null)) : (r = g.sibling); + var q = m(p, g, e.value, s); + if (null === q) { + null === g && (g = r); + break; + } + a && g && null === q.alternate && b(p, g); + k = f(q, k, j); + null === i ? (h = q) : (i.sibling = q); + i = q; + g = r; + } + if (e.done) return c(p, g), h; + if (null === g) { + for(; !e.done; j++, e = o.next())(e = l(p, e.value, s)), null !== e && ((k = f(e, k, j)), null === i ? (h = e) : (i.sibling = e), (i = e)); + return h; + } + for(g = d(p, g); !e.done; j++, e = o.next())(e = n(g, p, j, e.value, s)), null !== e && (a && null !== e.alternate && g.delete(null === e.key ? j : e.key), (k = f(e, k, j)), null === i ? (h = e) : (i.sibling = e), (i = e)); + a && g.forEach(function(a) { + return b(p, a); + }); + return h; + } + return function(d, a, f, i) { + var h = "object" === typeof f && null !== f && f.type === _ && null === f.key; + h && (f = f.props.children); + var j = "object" === typeof f && null !== f; + if (j) switch(f.$$typeof){ + case Z: + a: { + j = f.key; + for(h = a; null !== h;){ + if (h.key === j) { + switch(h.tag){ + case 7: + if (f.type === _) { + c(d, h.sibling); + a = e(h, f.props.children); + a.return = d; + d = a; + break a; + } + break; + default: + if (h.elementType === f.type) { + c(d, h.sibling); + a = e(h, f.props); + a.ref = fA(d, h, f); + a.return = d; + d = a; + break a; + } + } + c(d, h); + break; + } else b(d, h); + h = h.sibling; + } + f.type === _ ? ((a = ia(f.props.children, d.mode, i, f.key)), (a.return = d), (d = a)) : ((i = h9(f.type, f.key, f.props, null, d.mode, i)), (i.ref = fA(d, a, f)), (i.return = d), (d = i)); + } + return g(d); + case $: + a: { + for(h = f.key; null !== a;){ + if (a.key === h) if (4 === a.tag && a.stateNode.containerInfo === f.containerInfo && a.stateNode.implementation === f.implementation) { + c(d, a.sibling); + a = e(a, f.children || []); + a.return = d; + d = a; + break a; + } else { + c(d, a); + break; + } + else b(d, a); + a = a.sibling; + } + a = id(f, d.mode, i); + a.return = d; + d = a; + } + return g(d); + } + if ("string" === typeof f || "number" === typeof f) return ((f = "" + f), null !== a && 6 === a.tag ? (c(d, a.sibling), (a = e(a, f)), (a.return = d), (d = a)) : (c(d, a), (a = ic(f, d.mode, i)), (a.return = d), (d = a)), g(d)); + if (fz(f)) return o(d, a, f, i); + if (bu(f)) return p(d, a, f, i); + j && fB(d, f); + if ("undefined" === typeof f && !h) switch(d.tag){ + case 1: + case 22: + case 0: + case 11: + case 15: + throw Error(W(152, bA(d.type) || "Component")); + } + return c(d, a); + }; + } + var fC = M(!0), fD = M(!1), D = {}, fE = h(D), fF = h(D), fG = h(D); + function fH(a) { + if (a === D) throw Error(W(174)); + return a; + } + function fI(b, a) { + eF(fG, a); + eF(fF, b); + eF(fE, D); + b = a.nodeType; + switch(b){ + case 9: + case 11: + a = (a = a.documentElement) ? a.namespaceURI : bW(null, ""); + break; + default: + (b = 8 === b ? a.parentNode : a), (a = b.namespaceURI || null), (b = b.tagName), (a = bW(a, b)); + } + eE(fE); + eF(fE, a); + } + function fJ() { + eE(fE); + eE(fF); + eE(fG); + } + function fK(a) { + fH(fG.current); + var b = fH(fE.current); + var c = bW(b, a.type); + b !== c && (eF(fF, a), eF(fE, c)); + } + function fL(a) { + fF.current === a && (eE(fE), eE(fF)); + } + var fM = h(0); + function fN(c) { + for(var a = c; null !== a;){ + if (13 === a.tag) { + var b = a.memoizedState; + if (null !== b && ((b = b.dehydrated), null === b || "$?" === b.data || "$!" === b.data)) return a; + } else if (19 === a.tag && void 0 !== a.memoizedProps.revealOrder) { + if (0 !== (a.flags & 64)) return a; + } else if (null !== a.child) { + a.child.return = a; + a = a.child; + continue; + } + if (a === c) break; + for(; null === a.sibling;){ + if (null === a.return || a.return === c) return null; + a = a.return; + } + a.sibling.return = a.return; + a = a.sibling; + } + return null; + } + var fO = null, fP = null, fQ = !1; + function fR(b, c) { + var a = h5(5, null, null, 0); + a.elementType = "DELETED"; + a.type = "DELETED"; + a.stateNode = c; + a.return = b; + a.flags = 8; + null !== b.lastEffect ? ((b.lastEffect.nextEffect = a), (b.lastEffect = a)) : (b.firstEffect = b.lastEffect = a); + } + function fS(b, a) { + switch(b.tag){ + case 5: + var c = b.type; + a = 1 !== a.nodeType || c.toLowerCase() !== a.nodeName.toLowerCase() ? null : a; + return null !== a ? ((b.stateNode = a), !0) : !1; + case 6: + return ((a = "" === b.pendingProps || 3 !== a.nodeType ? null : a), null !== a ? ((b.stateNode = a), !0) : !1); + case 13: + return !1; + default: + return !1; + } + } + function fT(a) { + if (fQ) { + var b = fP; + if (b) { + var c = b; + if (!fS(a, b)) { + b = et(c.nextSibling); + if (!b || !fS(a, b)) { + a.flags = (a.flags & -1025) | 2; + fQ = !1; + fO = a; + return; + } + fR(fO, c); + } + fO = a; + fP = et(b.firstChild); + } else (a.flags = (a.flags & -1025) | 2), (fQ = !1), (fO = a); + } + } + function fU(a) { + for(a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;)a = a.return; + fO = a; + } + function fV(a) { + if (a !== fO) return !1; + if (!fQ) return fU(a), (fQ = !0), !1; + var b = a.type; + if (5 !== a.tag || ("head" !== b && "body" !== b && !ep(b, a.memoizedProps))) for(b = fP; b;)fR(a, b), (b = et(b.nextSibling)); + fU(a); + if (13 === a.tag) { + a = a.memoizedState; + a = null !== a ? a.dehydrated : null; + if (!a) throw Error(W(317)); + a: { + a = a.nextSibling; + for(b = 0; a;){ + if (8 === a.nodeType) { + var c = a.data; + if ("/$" === c) { + if (0 === b) { + fP = et(a.nextSibling); + break a; + } + b--; + } else ("$" !== c && "$!" !== c && "$?" !== c) || b++; + } + a = a.nextSibling; + } + fP = null; + } + } else fP = fO ? et(a.stateNode.nextSibling) : null; + return !0; + } + function fW() { + fP = fO = null; + fQ = !1; + } + var fX = []; + function fY() { + for(var a = 0; a < fX.length; a++)fX[a]._workInProgressVersionPrimary = null; + fX.length = 0; + } + var fZ = i.ReactCurrentDispatcher, f$ = i.ReactCurrentBatchConfig, f_ = 0, f0 = null, f1 = null, f2 = null, f3 = !1, f4 = !1; + function c() { + throw Error(W(321)); + } + function f5(c, b) { + if (null === b) return !1; + for(var a = 0; a < b.length && a < c.length; a++)if (!dW(c[a], b[a])) return !1; + return !0; + } + function f6(b, a, d, e, f, c) { + f_ = c; + f0 = a; + a.memoizedState = null; + a.updateQueue = null; + a.lanes = 0; + fZ.current = null === b || null === b.memoizedState ? gj : gk; + b = d(e, f); + if (f4) { + c = 0; + do { + f4 = !1; + if (!(25 > c)) throw Error(W(301)); + c += 1; + f2 = f1 = null; + a.updateQueue = null; + fZ.current = gl; + b = d(e, f); + }while (f4) + } + fZ.current = gi; + a = null !== f1 && null !== f1.next; + f_ = 0; + f2 = f1 = f0 = null; + f3 = !1; + if (a) throw Error(W(300)); + return b; + } + function f7() { + var a = { + memoizedState: null, + baseState: null, + baseQueue: null, + queue: null, + next: null + }; + null === f2 ? (f0.memoizedState = f2 = a) : (f2 = f2.next = a); + return f2; + } + function f8() { + if (null === f1) { + var a = f0.alternate; + a = null !== a ? a.memoizedState : null; + } else a = f1.next; + var b = null === f2 ? f0.memoizedState : f2.next; + if (null !== b) (f2 = b), (f1 = a); + else { + if (null === a) throw Error(W(310)); + f1 = a; + a = { + memoizedState: f1.memoizedState, + baseState: f1.baseState, + baseQueue: f1.baseQueue, + queue: f1.queue, + next: null + }; + null === f2 ? (f0.memoizedState = f2 = a) : (f2 = f2.next = a); + } + return f2; + } + function f9(b, a) { + return "function" === typeof a ? a(b) : a; + } + function a1(j) { + var f = f8(), g = f.queue; + if (null === g) throw Error(W(311)); + g.lastRenderedReducer = j; + var b = f1, d = b.baseQueue, e = g.pending; + if (null !== e) { + if (null !== d) { + var i = d.next; + d.next = e.next; + e.next = i; + } + b.baseQueue = d = e; + g.pending = null; + } + if (null !== d) { + d = d.next; + b = b.baseState; + var c = (i = e = null), a = d; + do { + var h = a.lane; + if ((f_ & h) === h) null !== c && (c = c.next = { + lane: 0, + action: a.action, + eagerReducer: a.eagerReducer, + eagerState: a.eagerState, + next: null + }), (b = a.eagerReducer === j ? a.eagerState : j(b, a.action)); + else { + var k = { + lane: h, + action: a.action, + eagerReducer: a.eagerReducer, + eagerState: a.eagerState, + next: null + }; + null === c ? ((i = c = k), (e = b)) : (c = c.next = k); + f0.lanes |= h; + he |= h; + } + a = a.next; + }while (null !== a && a !== d) + null === c ? (e = b) : (c.next = i); + dW(b, f.memoizedState) || (gn = !0); + f.memoizedState = b; + f.baseState = e; + f.baseQueue = c; + g.lastRenderedState = b; + } + return [ + f.memoizedState, + g.dispatch + ]; + } + function a2(f) { + var b = f8(), c = b.queue; + if (null === c) throw Error(W(311)); + c.lastRenderedReducer = f; + var g = c.dispatch, d = c.pending, a = b.memoizedState; + if (null !== d) { + c.pending = null; + var e = (d = d.next); + do (a = f(a, e.action)), (e = e.next); + while (e !== d) + dW(a, b.memoizedState) || (gn = !0); + b.memoizedState = a; + null === b.baseQueue && (b.baseState = a); + c.lastRenderedState = a; + } + return [ + a, + g + ]; + } + function ga(a, b, e) { + var c = b._getVersion; + c = c(b._source); + var d = b._workInProgressVersionPrimary; + if (null !== d) a = d === c; + else if (((a = a.mutableReadLanes), (a = (f_ & a) === a))) (b._workInProgressVersionPrimary = c), fX.push(b); + if (a) return e(b._source); + fX.push(b); + throw Error(W(350)); + } + function gb(c, a, g, e) { + var i = g6; + if (null === i) throw Error(W(349)); + var k = a._getVersion, o = k(a._source), h = fZ.current, b = h.useState(function() { + return ga(i, a, g); + }), l = b[1], f = b[0]; + b = f2; + var d = c.memoizedState, j = d.refs, m = j.getSnapshot, n = d.source; + d = d.subscribe; + var p = f0; + c.memoizedState = { + refs: j, + source: a, + subscribe: e + }; + h.useEffect(function() { + j.getSnapshot = g; + j.setSnapshot = l; + var b = k(a._source); + if (!dW(o, b)) { + b = g(a._source); + dW(f, b) || (l(b), (b = hD(p)), (i.mutableReadLanes |= b & i.pendingLanes)); + b = i.mutableReadLanes; + i.entangledLanes |= b; + for(var e = i.entanglements, c = b; 0 < c;){ + var d = 31 - cX(c), h = 1 << d; + e[d] |= b; + c &= ~h; + } + } + }, [ + g, + a, + e + ]); + h.useEffect(function() { + return e(a._source, function() { + var c = j.getSnapshot, b = j.setSnapshot; + try { + b(c(a._source)); + var d = hD(p); + i.mutableReadLanes |= d & i.pendingLanes; + } catch (e) { + b(function() { + throw e; + }); + } + }); + }, [ + a, + e + ]); + (dW(m, g) && dW(n, a) && dW(d, e)) || ((c = { + pending: null, + dispatch: null, + lastRenderedReducer: f9, + lastRenderedState: f + }), (c.dispatch = l = gh.bind(null, f0, c)), (b.queue = c), (b.baseQueue = null), (f = ga(i, a, g)), (b.memoizedState = b.baseState = f)); + return f; + } + function N(a, b, c) { + var d = f8(); + return gb(d, a, b, c); + } + function a3(a) { + var b = f7(); + "function" === typeof a && (a = a()); + b.memoizedState = b.baseState = a; + a = b.queue = { + pending: null, + dispatch: null, + lastRenderedReducer: f9, + lastRenderedState: a + }; + a = a.dispatch = gh.bind(null, f0, a); + return [ + b.memoizedState, + a + ]; + } + function gc(a, b, c, d) { + a = { + tag: a, + create: b, + destroy: c, + deps: d, + next: null + }; + b = f0.updateQueue; + null === b ? ((b = { + lastEffect: null + }), (f0.updateQueue = b), (b.lastEffect = a.next = a)) : ((c = b.lastEffect), null === c ? (b.lastEffect = a.next = a) : ((d = c.next), (c.next = a), (a.next = d), (b.lastEffect = a))); + return a; + } + function a4(a) { + var b = f7(); + a = { + current: a + }; + return (b.memoizedState = a); + } + function O() { + return f8().memoizedState; + } + function gd(b, c, d, a) { + var e = f7(); + f0.flags |= b; + e.memoizedState = gc(1 | c, d, void 0, void 0 === a ? null : a); + } + function ge(f, c, d, a) { + var g = f8(); + a = void 0 === a ? null : a; + var b = void 0; + if (null !== f1) { + var e = f1.memoizedState; + b = e.destroy; + if (null !== a && f5(a, e.deps)) { + gc(c, d, b, a); + return; + } + } + f0.flags |= f; + g.memoizedState = gc(1 | c, d, b, a); + } + function a5(a, b) { + return gd(516, 4, a, b); + } + function P(a, b) { + return ge(516, 4, a, b); + } + function Q(a, b) { + return ge(4, 2, a, b); + } + function gf(a, b) { + if ("function" === typeof b) return ((a = a()), b(a), function() { + b(null); + }); + if (null !== b && void 0 !== b) return ((a = a()), (b.current = a), function() { + b.current = null; + }); + } + function R(b, c, a) { + a = null !== a && void 0 !== a ? a.concat([ + b + ]) : null; + return ge(4, 2, gf.bind(null, c, b), a); + } + function E() {} + function S(c, a) { + var d = f8(); + a = void 0 === a ? null : a; + var b = d.memoizedState; + if (null !== b && null !== a && f5(a, b[1])) return b[0]; + d.memoizedState = [ + c, + a + ]; + return c; + } + function T(b, a) { + var d = f8(); + a = void 0 === a ? null : a; + var c = d.memoizedState; + if (null !== c && null !== a && f5(a, c[1])) return c[0]; + b = b(); + d.memoizedState = [ + b, + a + ]; + return b; + } + function gg(b, c) { + var a = e4(); + e6(98 > a ? 98 : a, function() { + b(!0); + }); + e6(97 < a ? 97 : a, function() { + var a = f$.transition; + f$.transition = 1; + try { + b(!1), c(); + } finally{ + f$.transition = a; + } + }); + } + function gh(c, d, e) { + var i = hC(), f = hD(c), b = { + lane: f, + action: e, + eagerReducer: null, + eagerState: null, + next: null + }, a = d.pending; + null === a ? (b.next = b) : ((b.next = a.next), (a.next = b)); + d.pending = b; + a = c.alternate; + if (c === f0 || (null !== a && a === f0)) f4 = f3 = !0; + else { + if (0 === c.lanes && (null === a || 0 === a.lanes) && ((a = d.lastRenderedReducer), null !== a)) try { + var g = d.lastRenderedState, h = a(g, e); + b.eagerReducer = a; + b.eagerState = h; + if (dW(h, g)) return; + } catch (j) {} finally{} + hE(c, f, i); + } + } + var gi = { + readContext: j, + useCallback: c, + useContext: c, + useEffect: c, + useImperativeHandle: c, + useLayoutEffect: c, + useMemo: c, + useReducer: c, + useRef: c, + useState: c, + useDebugValue: c, + useDeferredValue: c, + useTransition: c, + useMutableSource: c, + useOpaqueIdentifier: c, + unstable_isNewReconciler: !1 + }, gj = { + readContext: j, + useCallback: function(a, b) { + f7().memoizedState = [ + a, + void 0 === b ? null : b + ]; + return a; + }, + useContext: j, + useEffect: a5, + useImperativeHandle: function(b, c, a) { + a = null !== a && void 0 !== a ? a.concat([ + b + ]) : null; + return gd(4, 2, gf.bind(null, c, b), a); + }, + useLayoutEffect: function(a, b) { + return gd(4, 2, a, b); + }, + useMemo: function(a, b) { + var c = f7(); + b = void 0 === b ? null : b; + a = a(); + c.memoizedState = [ + a, + b + ]; + return a; + }, + useReducer: function(a, b, d) { + var c = f7(); + b = void 0 !== d ? d(b) : b; + c.memoizedState = c.baseState = b; + a = c.queue = { + pending: null, + dispatch: null, + lastRenderedReducer: a, + lastRenderedState: b + }; + a = a.dispatch = gh.bind(null, f0, a); + return [ + c.memoizedState, + a + ]; + }, + useRef: a4, + useState: a3, + useDebugValue: E, + useDeferredValue: function(a) { + var b = a3(a), c = b[0], d = b[1]; + a5(function() { + var b = f$.transition; + f$.transition = 1; + try { + d(a); + } finally{ + f$.transition = b; + } + }, [ + a + ]); + return c; + }, + useTransition: function() { + var a = a3(!1), b = a[0]; + a = gg.bind(null, a[1]); + a4(a); + return [ + a, + b + ]; + }, + useMutableSource: function(a, b, c) { + var d = f7(); + d.memoizedState = { + refs: { + getSnapshot: b, + setSnapshot: null + }, + source: a, + subscribe: c + }; + return gb(d, a, b, c); + }, + useOpaqueIdentifier: function() { + if (fQ) { + var b = !1, a = ew(function() { + b || ((b = !0), c("r:" + (ev++).toString(36))); + throw Error(W(355)); + }), c = a3(a)[1]; + 0 === (f0.mode & 2) && ((f0.flags |= 516), gc(5, function() { + c("r:" + (ev++).toString(36)); + }, void 0, null)); + return a; + } + a = "r:" + (ev++).toString(36); + a3(a); + return a; + }, + unstable_isNewReconciler: !1 + }, gk = { + readContext: j, + useCallback: S, + useContext: j, + useEffect: P, + useImperativeHandle: R, + useLayoutEffect: Q, + useMemo: T, + useReducer: a1, + useRef: O, + useState: function() { + return a1(f9); + }, + useDebugValue: E, + useDeferredValue: function(b) { + var a = a1(f9), c = a[0], d = a[1]; + P(function() { + var a = f$.transition; + f$.transition = 1; + try { + d(b); + } finally{ + f$.transition = a; + } + }, [ + b + ]); + return c; + }, + useTransition: function() { + var a = a1(f9)[0]; + return [ + O().current, + a + ]; + }, + useMutableSource: N, + useOpaqueIdentifier: function() { + return a1(f9)[0]; + }, + unstable_isNewReconciler: !1 + }, gl = { + readContext: j, + useCallback: S, + useContext: j, + useEffect: P, + useImperativeHandle: R, + useLayoutEffect: Q, + useMemo: T, + useReducer: a2, + useRef: O, + useState: function() { + return a2(f9); + }, + useDebugValue: E, + useDeferredValue: function(b) { + var a = a2(f9), c = a[0], d = a[1]; + P(function() { + var a = f$.transition; + f$.transition = 1; + try { + d(b); + } finally{ + f$.transition = a; + } + }, [ + b + ]); + return c; + }, + useTransition: function() { + var a = a2(f9)[0]; + return [ + O().current, + a + ]; + }, + useMutableSource: N, + useOpaqueIdentifier: function() { + return a2(f9)[0]; + }, + unstable_isNewReconciler: !1 + }, gm = i.ReactCurrentOwner, gn = !1; + function go(b, a, c, d) { + a.child = null === b ? fD(a, null, c, d) : fC(a, b.child, c, d); + } + function gp(b, a, d, e, c) { + d = d.render; + var f = a.ref; + fj(a, c); + e = f6(b, a, d, e, f, c); + if (null !== b && !gn) return ((a.updateQueue = b.updateQueue), (a.flags &= -517), (b.lanes &= ~c), gG(b, a, c)); + a.flags |= 1; + go(b, a, e, c); + return a.child; + } + function gq(b, a, c, e, f, g) { + if (null === b) { + var d = c.type; + if ("function" === typeof d && !h6(d) && void 0 === d.defaultProps && null === c.compare && void 0 === c.defaultProps) return (a.tag = 15), (a.type = d), gr(b, a, d, e, f, g); + b = h9(c.type, null, e, a, a.mode, g); + b.ref = a.ref; + b.return = a; + return (a.child = b); + } + d = b.child; + if (0 === (f & g) && ((f = d.memoizedProps), (c = c.compare), (c = null !== c ? c : dY), c(f, e) && b.ref === a.ref)) return gG(b, a, g); + a.flags |= 1; + b = h8(d, e); + b.ref = a.ref; + b.return = a; + return (a.child = b); + } + function gr(a, b, e, d, f, c) { + if (null !== a && dY(a.memoizedProps, d) && a.ref === b.ref) if (((gn = !1), 0 !== (c & f))) 0 !== (a.flags & 16384) && (gn = !0); + else return (b.lanes = a.lanes), gG(a, b, c); + return gu(a, b, e, d, c); + } + function gs(c, a, b) { + var d = a.pendingProps, f = d.children, e = null !== c ? c.memoizedState : null; + if ("hidden" === d.mode || "unstable-defer-without-hiding" === d.mode) if (0 === (a.mode & 4)) (a.memoizedState = { + baseLanes: 0 + }), hM(a, b); + else if (0 !== (b & 1073741824)) (a.memoizedState = { + baseLanes: 0 + }), hM(a, null !== e ? e.baseLanes : b); + else return ((c = null !== e ? e.baseLanes | b : b), (a.lanes = a.childLanes = 1073741824), (a.memoizedState = { + baseLanes: c + }), hM(a, c), null); + else null !== e ? ((d = e.baseLanes | b), (a.memoizedState = null)) : (d = b), hM(a, d); + go(c, a, f, b); + return a.child; + } + function gt(a, b) { + var c = b.ref; + if ((null === a && null !== c) || (null !== a && a.ref !== c)) b.flags |= 128; + } + function gu(b, a, d, f, c) { + var e = eK(d) ? eI : eG.current; + e = eJ(a, e); + fj(a, c); + d = f6(b, a, d, f, e, c); + if (null !== b && !gn) return ((a.updateQueue = b.updateQueue), (a.flags &= -517), (b.lanes &= ~c), gG(b, a, c)); + a.flags |= 1; + go(b, a, d, c); + return a.child; + } + function gv(h, a, g, c, l) { + if (eK(g)) { + var p = !0; + eO(a); + } else p = !1; + fj(a, l); + if (null === a.stateNode) null !== h && ((h.alternate = null), (a.alternate = null), (a.flags |= 2)), fw(a, g, c), fy(a, g, c, l), (c = !0); + else if (null === h) { + var b = a.stateNode, f = a.memoizedProps; + b.props = f; + var d = b.context, e = g.contextType; + "object" === typeof e && null !== e ? (e = j(e)) : ((e = eK(g) ? eI : eG.current), (e = eJ(a, e))); + var m = g.getDerivedStateFromProps, n = "function" === typeof m || "function" === typeof b.getSnapshotBeforeUpdate; + n || ("function" !== typeof b.UNSAFE_componentWillReceiveProps && "function" !== typeof b.componentWillReceiveProps) || ((f !== c || d !== e) && fx(a, b, c, e)); + fk = !1; + var i = a.memoizedState; + b.state = i; + fq(a, c, b, l); + d = a.memoizedState; + f !== c || i !== d || eH.current || fk ? ("function" === typeof m && (ft(a, g, m, c), (d = a.memoizedState)), (f = fk || fv(a, g, f, c, i, d, e)) ? (n || ("function" !== typeof b.UNSAFE_componentWillMount && "function" !== typeof b.componentWillMount) || ("function" === typeof b.componentWillMount && b.componentWillMount(), "function" === typeof b.UNSAFE_componentWillMount && b.UNSAFE_componentWillMount()), "function" === typeof b.componentDidMount && (a.flags |= 4)) : ("function" === typeof b.componentDidMount && (a.flags |= 4), (a.memoizedProps = c), (a.memoizedState = d)), (b.props = c), (b.state = d), (b.context = e), (c = f)) : ("function" === typeof b.componentDidMount && (a.flags |= 4), (c = !1)); + } else { + b = a.stateNode; + fm(h, a); + f = a.memoizedProps; + e = a.type === a.elementType ? f : fb(a.type, f); + b.props = e; + n = a.pendingProps; + i = b.context; + d = g.contextType; + "object" === typeof d && null !== d ? (d = j(d)) : ((d = eK(g) ? eI : eG.current), (d = eJ(a, d))); + var o = g.getDerivedStateFromProps; + (m = "function" === typeof o || "function" === typeof b.getSnapshotBeforeUpdate) || ("function" !== typeof b.UNSAFE_componentWillReceiveProps && "function" !== typeof b.componentWillReceiveProps) || ((f !== n || i !== d) && fx(a, b, c, d)); + fk = !1; + i = a.memoizedState; + b.state = i; + fq(a, c, b, l); + var k = a.memoizedState; + f !== n || i !== k || eH.current || fk ? ("function" === typeof o && (ft(a, g, o, c), (k = a.memoizedState)), (e = fk || fv(a, g, e, c, i, k, d)) ? (m || ("function" !== typeof b.UNSAFE_componentWillUpdate && "function" !== typeof b.componentWillUpdate) || ("function" === typeof b.componentWillUpdate && b.componentWillUpdate(c, k, d), "function" === typeof b.UNSAFE_componentWillUpdate && b.UNSAFE_componentWillUpdate(c, k, d)), "function" === typeof b.componentDidUpdate && (a.flags |= 4), "function" === typeof b.getSnapshotBeforeUpdate && (a.flags |= 256)) : ("function" !== typeof b.componentDidUpdate || (f === h.memoizedProps && i === h.memoizedState) || (a.flags |= 4), "function" !== typeof b.getSnapshotBeforeUpdate || (f === h.memoizedProps && i === h.memoizedState) || (a.flags |= 256), (a.memoizedProps = c), (a.memoizedState = k)), (b.props = c), (b.state = k), (b.context = d), (c = e)) : ("function" !== typeof b.componentDidUpdate || (f === h.memoizedProps && i === h.memoizedState) || (a.flags |= 4), "function" !== typeof b.getSnapshotBeforeUpdate || (f === h.memoizedProps && i === h.memoizedState) || (a.flags |= 256), (c = !1)); + } + return gw(h, a, g, c, p, l); + } + function gw(b, a, e, c, g, d) { + gt(b, a); + var f = 0 !== (a.flags & 64); + if (!c && !f) return g && eP(a, e, !1), gG(b, a, d); + c = a.stateNode; + gm.current = a; + var h = f && "function" !== typeof e.getDerivedStateFromError ? null : c.render(); + a.flags |= 1; + null !== b && f ? ((a.child = fC(a, b.child, null, d)), (a.child = fC(a, null, h, d))) : go(b, a, h, d); + a.memoizedState = c.state; + g && eP(a, e, !0); + return a.child; + } + function gx(b) { + var a = b.stateNode; + a.pendingContext ? eM(b, a.pendingContext, a.pendingContext !== a.context) : a.context && eM(b, a.context, !1); + fI(b, a.containerInfo); + } + var gy = { + dehydrated: null, + retryLane: 0 + }; + function gz(b, a, c) { + var d = a.pendingProps, e = fM.current, f = !1, g; + (g = 0 !== (a.flags & 64)) || (g = null !== b && null === b.memoizedState ? !1 : 0 !== (e & 2)); + g ? ((f = !0), (a.flags &= -65)) : (null !== b && null === b.memoizedState) || void 0 === d.fallback || !0 === d.unstable_avoidThisFallback || (e |= 1); + eF(fM, e & 1); + if (null === b) { + void 0 !== d.fallback && fT(a); + b = d.children; + e = d.fallback; + if (f) return ((b = gA(a, b, e, c)), (a.child.memoizedState = { + baseLanes: c + }), (a.memoizedState = gy), b); + if ("number" === typeof d.unstable_expectedLoadTime) return ((b = gA(a, b, e, c)), (a.child.memoizedState = { + baseLanes: c + }), (a.memoizedState = gy), (a.lanes = 33554432), b); + c = ib({ + mode: "visible", + children: b + }, a.mode, c, null); + c.return = a; + return (a.child = c); + } + if (null !== b.memoizedState) { + if (f) return ((d = gC(b, a, d.children, d.fallback, c)), (f = a.child), (e = b.child.memoizedState), (f.memoizedState = null === e ? { + baseLanes: c + } : { + baseLanes: e.baseLanes | c + }), (f.childLanes = b.childLanes & ~c), (a.memoizedState = gy), d); + c = gB(b, a, d.children, c); + a.memoizedState = null; + return c; + } + if (f) return ((d = gC(b, a, d.children, d.fallback, c)), (f = a.child), (e = b.child.memoizedState), (f.memoizedState = null === e ? { + baseLanes: c + } : { + baseLanes: e.baseLanes | c + }), (f.childLanes = b.childLanes & ~c), (a.memoizedState = gy), d); + c = gB(b, a, d.children, c); + a.memoizedState = null; + return c; + } + function gA(b, d, c, f) { + var e = b.mode, a = b.child; + d = { + mode: "hidden", + children: d + }; + 0 === (e & 2) && null !== a ? ((a.childLanes = 0), (a.pendingProps = d)) : (a = ib(d, e, 0, null)); + c = ia(c, e, f, null); + a.return = b; + c.return = b; + a.sibling = c; + b.child = a; + return c; + } + function gB(a, c, b, e) { + var d = a.child; + a = d.sibling; + b = h8(d, { + mode: "visible", + children: b + }); + 0 === (c.mode & 2) && (b.lanes = e); + b.return = c; + b.sibling = null; + null !== a && ((a.nextEffect = null), (a.flags = 8), (c.firstEffect = c.lastEffect = a)); + return (c.child = b); + } + function gC(e, a, b, c, h) { + var f = a.mode, d = e.child; + e = d.sibling; + var g = { + mode: "hidden", + children: b + }; + 0 === (f & 2) && a.child !== d ? ((b = a.child), (b.childLanes = 0), (b.pendingProps = g), (d = b.lastEffect), null !== d ? ((a.firstEffect = b.firstEffect), (a.lastEffect = d), (d.nextEffect = null)) : (a.firstEffect = a.lastEffect = null)) : (b = h8(d, g)); + null !== e ? (c = h8(e, c)) : ((c = ia(c, f, h, null)), (c.flags |= 2)); + c.return = a; + b.return = a; + b.sibling = c; + a.child = b; + return c; + } + function gD(a, b) { + a.lanes |= b; + var c = a.alternate; + null !== c && (c.lanes |= b); + fi(a.return, b); + } + function gE(b, c, d, e, f, g) { + var a = b.memoizedState; + null === a ? (b.memoizedState = { + isBackwards: c, + rendering: null, + renderingStartTime: 0, + last: e, + tail: d, + tailMode: f, + lastEffect: g + }) : ((a.isBackwards = c), (a.rendering = null), (a.renderingStartTime = 0), (a.last = e), (a.tail = d), (a.tailMode = f), (a.lastEffect = g)); + } + function gF(a, b, c) { + var e = b.pendingProps, d = e.revealOrder, f = e.tail; + go(a, b, e.children, c); + e = fM.current; + if (0 !== (e & 2)) (e = (e & 1) | 2), (b.flags |= 64); + else { + if (null !== a && 0 !== (a.flags & 64)) a: for(a = b.child; null !== a;){ + if (13 === a.tag) null !== a.memoizedState && gD(a, c); + else if (19 === a.tag) gD(a, c); + else if (null !== a.child) { + a.child.return = a; + a = a.child; + continue; + } + if (a === b) break a; + for(; null === a.sibling;){ + if (null === a.return || a.return === b) break a; + a = a.return; + } + a.sibling.return = a.return; + a = a.sibling; + } + e &= 1; + } + eF(fM, e); + if (0 === (b.mode & 2)) b.memoizedState = null; + else switch(d){ + case "forwards": + c = b.child; + for(d = null; null !== c;)(a = c.alternate), null !== a && null === fN(a) && (d = c), (c = c.sibling); + c = d; + null === c ? ((d = b.child), (b.child = null)) : ((d = c.sibling), (c.sibling = null)); + gE(b, !1, d, c, f, b.lastEffect); + break; + case "backwards": + c = null; + d = b.child; + for(b.child = null; null !== d;){ + a = d.alternate; + if (null !== a && null === fN(a)) { + b.child = d; + break; + } + a = d.sibling; + d.sibling = c; + c = d; + d = a; + } + gE(b, !0, c, null, f, b.lastEffect); + break; + case "together": + gE(b, !1, null, null, void 0, b.lastEffect); + break; + default: + b.memoizedState = null; + } + return b.child; + } + function gG(a, b, c) { + null !== a && (b.dependencies = a.dependencies); + he |= b.lanes; + if (0 !== (c & b.childLanes)) { + if (null !== a && b.child !== a.child) throw Error(W(153)); + if (null !== b.child) { + a = b.child; + c = h8(a, a.pendingProps); + b.child = c; + for(c.return = b; null !== a.sibling;)(a = a.sibling), (c = c.sibling = h8(a, a.pendingProps)), (c.return = b); + c.sibling = null; + } + return b.child; + } + return null; + } + var a6, a7, a8, a9; + a6 = function(c, b) { + for(var a = b.child; null !== a;){ + if (5 === a.tag || 6 === a.tag) c.appendChild(a.stateNode); + else if (4 !== a.tag && null !== a.child) { + a.child.return = a; + a = a.child; + continue; + } + if (a === b) break; + for(; null === a.sibling;){ + if (null === a.return || a.return === b) return; + a = a.return; + } + a.sibling.return = a.return; + a = a.sibling; + } + }; + a7 = function() {}; + a8 = function(i, j, c, f) { + var e = i.memoizedProps; + if (e !== f) { + i = j.stateNode; + fH(fE.current); + var b = null; + switch(c){ + case "input": + e = bH(i, e); + f = bH(i, f); + b = []; + break; + case "option": + e = bO(i, e); + f = bO(i, f); + b = []; + break; + case "select": + e = d({}, e, { + value: void 0 + }); + f = d({}, f, { + value: void 0 + }); + b = []; + break; + case "textarea": + e = bQ(i, e); + f = bQ(i, f); + b = []; + break; + default: + "function" !== typeof e.onClick && "function" === typeof f.onClick && (i.onclick = el); + } + b2(c, f); + var h; + c = null; + for(k in e)if (!f.hasOwnProperty(k) && e.hasOwnProperty(k) && null != e[k]) if ("style" === k) { + var g = e[k]; + for(h in g)g.hasOwnProperty(h) && (c || (c = {}), (c[h] = "")); + } else "dangerouslySetInnerHTML" !== k && "children" !== k && "suppressContentEditableWarning" !== k && "suppressHydrationWarning" !== k && "autoFocus" !== k && (bi.hasOwnProperty(k) ? b || (b = []) : (b = b || []).push(k, null)); + for(k in f){ + var a = f[k]; + g = null != e ? e[k] : void 0; + if (f.hasOwnProperty(k) && a !== g && (null != a || null != g)) if ("style" === k) if (g) { + for(h in g)!g.hasOwnProperty(h) || (a && a.hasOwnProperty(h)) || (c || (c = {}), (c[h] = "")); + for(h in a)a.hasOwnProperty(h) && g[h] !== a[h] && (c || (c = {}), (c[h] = a[h])); + } else c || (b || (b = []), b.push(k, c)), (c = a); + else "dangerouslySetInnerHTML" === k ? ((a = a ? a.__html : void 0), (g = g ? g.__html : void 0), null != a && g !== a && (b = b || []).push(k, a)) : "children" === k ? ("string" !== typeof a && "number" !== typeof a) || (b = b || []).push(k, "" + a) : "suppressContentEditableWarning" !== k && "suppressHydrationWarning" !== k && (bi.hasOwnProperty(k) ? (null != a && "onScroll" === k && eb("scroll", i), b || g === a || (b = [])) : "object" === typeof a && null !== a && a.$$typeof === ak ? a.toString() : (b = b || []).push(k, a)); + } + c && (b = b || []).push("style", c); + var k = b; + if ((j.updateQueue = k)) j.flags |= 4; + } + }; + a9 = function(d, a, b, c) { + b !== c && (a.flags |= 4); + }; + function gH(b, c) { + if (!fQ) switch(b.tailMode){ + case "hidden": + c = b.tail; + for(var a = null; null !== c;)null !== c.alternate && (a = c), (c = c.sibling); + null === a ? (b.tail = null) : (a.sibling = null); + break; + case "collapsed": + a = b.tail; + for(var d = null; null !== a;)null !== a.alternate && (d = a), (a = a.sibling); + null === d ? c || null === b.tail ? (b.tail = null) : (b.tail.sibling = null) : (d.sibling = null); + } + } + function gI(b, c, f) { + var a = c.pendingProps; + switch(c.tag){ + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return null; + case 1: + return eK(c.type) && eL(), null; + case 3: + fJ(); + eE(eH); + eE(eG); + fY(); + a = c.stateNode; + a.pendingContext && ((a.context = a.pendingContext), (a.pendingContext = null)); + if (null === b || null === b.child) fV(c) ? (c.flags |= 4) : a.hydrate || (c.flags |= 256); + a7(c); + return null; + case 5: + fL(c); + var h = fH(fG.current); + f = c.type; + if (null !== b && null != c.stateNode) a8(b, c, f, a, h), b.ref !== c.ref && (c.flags |= 128); + else { + if (!a) { + if (null === c.stateNode) throw Error(W(166)); + return null; + } + b = fH(fE.current); + if (fV(c)) { + a = c.stateNode; + f = c.type; + var e = c.memoizedProps; + a[ex] = c; + a[ey] = e; + switch(f){ + case "dialog": + eb("cancel", a); + eb("close", a); + break; + case "iframe": + case "object": + case "embed": + eb("load", a); + break; + case "video": + case "audio": + for(b = 0; b < aV.length; b++)eb(aV[b], a); + break; + case "source": + eb("error", a); + break; + case "img": + case "image": + case "link": + eb("error", a); + eb("load", a); + break; + case "details": + eb("toggle", a); + break; + case "input": + bI(a, e); + eb("invalid", a); + break; + case "select": + a._wrapperState = { + wasMultiple: !!e.multiple + }; + eb("invalid", a); + break; + case "textarea": + bR(a, e), eb("invalid", a); + } + b2(f, e); + b = null; + for(var g in e)e.hasOwnProperty(g) && ((h = e[g]), "children" === g ? "string" === typeof h ? a.textContent !== h && (b = [ + "children", + h + ]) : "number" === typeof h && a.textContent !== "" + h && (b = [ + "children", + "" + h + ]) : bi.hasOwnProperty(g) && null != h && "onScroll" === g && eb("scroll", a)); + switch(f){ + case "input": + bE(a); + bL(a, e, !0); + break; + case "textarea": + bE(a); + bT(a); + break; + case "select": + case "option": + break; + default: + "function" === typeof e.onClick && (a.onclick = el); + } + a = b; + c.updateQueue = a; + null !== a && (c.flags |= 4); + } else { + g = 9 === h.nodeType ? h : h.ownerDocument; + b === bU.html && (b = bV(f)); + b === bU.html ? "script" === f ? ((b = g.createElement("div")), (b.innerHTML = ""); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_2989/inline_script_on/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_2989/inline_script_on/output.mangleOnly.js new file mode 100644 index 00000000000..c6e09095ca7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_2989/inline_script_on/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(""); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_368/collapse/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_368/collapse/output.mangleOnly.js new file mode 100644 index 00000000000..a94eae5de11 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_368/collapse/output.mangleOnly.js @@ -0,0 +1,29 @@ +function a() { + var a; + a = typeof b === "function" ? b() : b; + return a !== undefined && c(); +} +function e(a) { + var e; + a = c(); + e = typeof a === "function" ? a() : a; + return "stirng" == typeof e && d(); +} +function f(e) { + var a; + a = b(a / 2); + if (a < 0) { + a++; + ++e; + return e / 2; + } +} +function g(e) { + var a; + a = b(a / 2); + if (a < 0) { + a++; + e++; + return e / 2; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash/output.mangleOnly.js new file mode 100644 index 00000000000..97967372c70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + var a = function() { + var a = 3; + var b = 1 + 2 * a; + console.log(a); + console.log(b); + }; + var b = a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash_2/output.mangleOnly.js new file mode 100644 index 00000000000..526b4e36d19 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_417/test_unexpected_crash_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + var a = function() { + var a = 3; + var b = 1 + a[0]; + console.log(a); + console.log(b); + }; + var b = a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_427/no_wrap_func_args/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_427/no_wrap_func_args/output.mangleOnly.js new file mode 100644 index 00000000000..fa02f0498a1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_427/no_wrap_func_args/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(function() { + return "test"; +}, ()=>null); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_427/wrap_func_args/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_427/wrap_func_args/output.mangleOnly.js new file mode 100644 index 00000000000..fa02f0498a1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_427/wrap_func_args/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(function() { + return "test"; +}, ()=>null); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_1/output.mangleOnly.js new file mode 100644 index 00000000000..87a9ff77303 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a) { + for(var b = 0, c = a.qoo();; b++){} +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_2/output.mangleOnly.js new file mode 100644 index 00000000000..b3b879b44aa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_44/issue_44_valid_ast_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a) { + if (foo) for(var b = 0, c = a.qoo();; b++){} +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_59/keep_continue/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_59/keep_continue/output.mangleOnly.js new file mode 100644 index 00000000000..738d755ae4f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_59/keep_continue/output.mangleOnly.js @@ -0,0 +1,10 @@ +while(a){ + if (b) { + switch(true){ + case c(): + d(); + } + continue; + } + f(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens/output.mangleOnly.js new file mode 100644 index 00000000000..0117d5b04eb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens/output.mangleOnly.js @@ -0,0 +1,2 @@ +Infinity.toString(); +NaN.toString(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..f3949e337d1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_must_have_parens_evaluate/output.mangleOnly.js @@ -0,0 +1,2 @@ +(123456789 / 0).toString(); +(+"foo").toString(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined/output.mangleOnly.js new file mode 100644 index 00000000000..f07a43ca620 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a, b; +a.toString(); +NaN.toString(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..c0a5a70e444 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined_evaluate/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a, b; +(123456789 / 0).toString(); +(+"foo").toString(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_1/output.mangleOnly.js new file mode 100644 index 00000000000..66c6daf7828 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a; +console.log(null, undefined, Infinity, NaN, Infinity * undefined, Infinity.toString(), NaN.toString(), (Infinity * undefined).toString()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_2/output.mangleOnly.js new file mode 100644 index 00000000000..344b9ee99ca --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_off_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(null.toString(), undefined.toString()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_1/output.mangleOnly.js new file mode 100644 index 00000000000..66c6daf7828 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a; +console.log(null, undefined, Infinity, NaN, Infinity * undefined, Infinity.toString(), NaN.toString(), (Infinity * undefined).toString()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_2/output.mangleOnly.js new file mode 100644 index 00000000000..344b9ee99ca --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/beautify_on_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(null.toString(), undefined.toString()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1724/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1724/output.mangleOnly.js new file mode 100644 index 00000000000..7db31bd5aa9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1724/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = 0; +++a % Infinity | Infinity ? a++ : 0; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1725/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1725/output.mangleOnly.js new file mode 100644 index 00000000000..6d7d341fd09 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_597/issue_1725/output.mangleOnly.js @@ -0,0 +1 @@ +([].length === 0) % Infinity ? console.log("PASS") : console.log("FAIL"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_611/issue_611/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_611/issue_611/output.mangleOnly.js new file mode 100644 index 00000000000..4bcca325a3f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_611/issue_611/output.mangleOnly.js @@ -0,0 +1,7 @@ +define(function() { + function a() {} + if (a()) { + a(); + return void 0; + } +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_637/wrongly_optimized/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_637/wrongly_optimized/output.mangleOnly.js new file mode 100644 index 00000000000..ed0db1cec7d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_637/wrongly_optimized/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + foo(); +} +if (a() || true) { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/cond_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/cond_5/output.mangleOnly.js new file mode 100644 index 00000000000..fdbd62a215a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/cond_5/output.mangleOnly.js @@ -0,0 +1,14 @@ +if (some_condition()) { + if (some_other_condition()) { + do_something(); + } else { + alternate(); + } +} else { + alternate(); +} +if (some_condition()) { + if (some_other_condition()) { + do_something(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/conditional/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/conditional/output.mangleOnly.js new file mode 100644 index 00000000000..dd33a487c17 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/conditional/output.mangleOnly.js @@ -0,0 +1,8 @@ +pure(1 | a() ? 2 & b() : 7 ^ c()); +pure(1 | a() ? 2 & b() : 5); +pure(1 | a() ? 4 : 7 ^ c()); +pure(1 | a() ? 4 : 5); +pure(3 ? 2 & b() : 7 ^ c()); +pure(3 ? 2 & b() : 5); +pure(3 ? 4 : 7 ^ c()); +pure(3 ? 4 : 5); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/dead_code_const_annotation_regex/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/dead_code_const_annotation_regex/output.mangleOnly.js new file mode 100644 index 00000000000..6f8b3e9c656 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/dead_code_const_annotation_regex/output.mangleOnly.js @@ -0,0 +1,5 @@ +var b; +var a = false; +if (a) { + console.log("reachable"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_console_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_console_2/output.mangleOnly.js new file mode 100644 index 00000000000..6aec7315d5f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_console_2/output.mangleOnly.js @@ -0,0 +1,2 @@ +console.log("foo"); +console.log.apply(console, arguments); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_value/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_value/output.mangleOnly.js new file mode 100644 index 00000000000..79cb39580d3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/drop_value/output.mangleOnly.js @@ -0,0 +1,7 @@ +1, [ + 2, + foo() +], 3, { + a: 1, + b: bar() +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/iife/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/iife/output.mangleOnly.js new file mode 100644 index 00000000000..2b279d38b52 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/iife/output.mangleOnly.js @@ -0,0 +1,8 @@ +x = 42; +(function a() {})(); +!(function a() {})(); +~(function a() {})(); ++(function a() {})(); +-(function a() {})(); +void (function a() {})(); +typeof (function a() {})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_nested/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_nested/output.mangleOnly.js new file mode 100644 index 00000000000..c328a6b7c52 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_nested/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()()()()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_true/output.mangleOnly.js new file mode 100644 index 00000000000..a39567de33d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/issue_1254_negate_iife_true/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/limit_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/limit_1/output.mangleOnly.js new file mode 100644 index 00000000000..e541426e053 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/limit_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +a; +b; +c; +d; +e; +f; +g; +h; +i; +j; +k; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_1/output.mangleOnly.js new file mode 100644 index 00000000000..af6c1b4de02 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + stuff(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3/output.mangleOnly.js new file mode 100644 index 00000000000..8147a91b99e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3_off/output.mangleOnly.js new file mode 100644 index 00000000000..8147a91b99e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_3_off/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_4/output.mangleOnly.js new file mode 100644 index 00000000000..cfd609cfd07 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5/output.mangleOnly.js new file mode 100644 index 00000000000..473b6f10e7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5/output.mangleOnly.js @@ -0,0 +1,10 @@ +if ((function() { + return t; +})()) { + foo(true); +} else { + bar(false); +} +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5_off/output.mangleOnly.js new file mode 100644 index 00000000000..473b6f10e7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/negate_iife_5_off/output.mangleOnly.js @@ -0,0 +1,10 @@ +if ((function() { + return t; +})()) { + foo(true); +} else { + bar(false); +} +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_640/wrongly_optimized/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/wrongly_optimized/output.mangleOnly.js new file mode 100644 index 00000000000..ed0db1cec7d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_640/wrongly_optimized/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + foo(); +} +if (a() || true) { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_747/dont_reuse_prop/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_747/dont_reuse_prop/output.mangleOnly.js new file mode 100644 index 00000000000..5500aecc0fe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_747/dont_reuse_prop/output.mangleOnly.js @@ -0,0 +1,5 @@ +"aaaaaaaaaabbbbb"; +var a = {}; +a.a = 123; +a.asd = 256; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_747/unmangleable_props_should_always_be_reserved/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_747/unmangleable_props_should_always_be_reserved/output.mangleOnly.js new file mode 100644 index 00000000000..fb1518e3b48 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_747/unmangleable_props_should_always_be_reserved/output.mangleOnly.js @@ -0,0 +1,5 @@ +"aaaaaaaaaabbbbb"; +var a = {}; +a.asd = 256; +a.a = 123; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_1/output.mangleOnly.js new file mode 100644 index 00000000000..f6a6c364472 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_1/output.mangleOnly.js @@ -0,0 +1 @@ +var a = !a || !b || !c || !d || !e || !f; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_2/output.mangleOnly.js new file mode 100644 index 00000000000..3b80f5e3717 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_751/negate_booleans_2/output.mangleOnly.js @@ -0,0 +1 @@ +var a = !x && (!z || c) && (!k || d) && the_stuff(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_782/dont_remove_this_binding_sequence/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_782/dont_remove_this_binding_sequence/output.mangleOnly.js new file mode 100644 index 00000000000..c1d80f21059 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_782/dont_remove_this_binding_sequence/output.mangleOnly.js @@ -0,0 +1,3 @@ +(0, eval)(); +(0, logThis)(); +(0, _decorators.logThis)(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_782/remove_redundant_sequence_items/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_782/remove_redundant_sequence_items/output.mangleOnly.js new file mode 100644 index 00000000000..56571a89274 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_782/remove_redundant_sequence_items/output.mangleOnly.js @@ -0,0 +1,3 @@ +(0, 1, eval)(); +(0, 1, logThis)(); +(0, 1, _decorators.logThis)(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_892/dont_mangle_arguments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_892/dont_mangle_arguments/output.mangleOnly.js new file mode 100644 index 00000000000..f4d8e024358 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_892/dont_mangle_arguments/output.mangleOnly.js @@ -0,0 +1,4 @@ +(function() { + var arguments = arguments, a = 9; + console.log(a, arguments); +})(5, 6, 7); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_913/keep_var_for_in/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_913/keep_var_for_in/output.mangleOnly.js new file mode 100644 index 00000000000..dcfe1b443d3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_913/keep_var_for_in/output.mangleOnly.js @@ -0,0 +1,4 @@ +(function(a) { + var b = 5; + for(var c in a)return b; +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_926/template_strings/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_926/template_strings/output.mangleOnly.js new file mode 100644 index 00000000000..68347d49a9a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_926/template_strings/output.mangleOnly.js @@ -0,0 +1 @@ +foo(`${contents}`, `${text}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_collapse_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_collapse_vars/output.mangleOnly.js new file mode 100644 index 00000000000..b0bd7d26fe0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_collapse_vars/output.mangleOnly.js @@ -0,0 +1,6 @@ +var c = a; +c(); +var d = a.b; +d(); +var e = eval; +e(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_conditionals/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_conditionals/output.mangleOnly.js new file mode 100644 index 00000000000..bc40537af2d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_conditionals/output.mangleOnly.js @@ -0,0 +1,16 @@ +(1 && a)(); +(0 || a)(); +(0 || (1 && a))(); +(1 ? a : 0)(); +(1 && a.b)(); +(0 || a.b)(); +(0 || (1 && a.b))(); +(1 ? a.b : 0)(); +(1 && a[b])(); +(0 || a[b])(); +(0 || (1 && a[b]))(); +(1 ? a[b] : 0)(); +(1 && eval)(); +(0 || eval)(); +(0 || (1 && eval))(); +(1 ? eval : 0)(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_sequences/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_sequences/output.mangleOnly.js new file mode 100644 index 00000000000..f63c5202147 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_sequences/output.mangleOnly.js @@ -0,0 +1,14 @@ +console.log(typeof (function() { + return eval("this"); +})()); +console.log(typeof (function() { + "use strict"; + return eval("this"); +})()); +console.log(typeof (function() { + return (0, eval)("this"); +})()); +console.log(typeof (function() { + "use strict"; + return (0, eval)("this"); +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..3d38ad332b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_973/this_binding_side_effects/output.mangleOnly.js @@ -0,0 +1,11 @@ +(function(foo) { + (0, foo)(); + (0, foo.bar)(); + (0, eval)("console.log(foo);"); +})(); +(function(foo) { + var eval = console; + (0, foo)(); + (0, foo.bar)(); + (0, eval)("console.log(foo);"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js new file mode 100644 index 00000000000..70952dab2a0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js @@ -0,0 +1,23 @@ +function f1() { + var e = 7; + var s = "abcdef"; + var i = 2; + var eval = console.log.bind(console); + var x = s.charAt(i++); + var y = s.charAt(i++); + var z = s.charAt(i++); + eval(x, y, z, e); +} +function p1() { + var a = foo(), b = bar(), eval = baz(); + return a + b + eval; +} +function p2() { + var a = foo(), b = bar(), eval = baz; + return a + b + eval(); +} +(function f2(eval) { + var a = 2; + console.log(a - 5); + eval("console.log(a);"); +})(eval); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js new file mode 100644 index 00000000000..3b939f3eff8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js @@ -0,0 +1,9 @@ +function f1(a, eval, c, d, e) { + return a("c") + eval; +} +function f2(a, b, c, d, e) { + return a + eval("c"); +} +function f3(a, eval, c, d, e) { + return a + eval("c"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js new file mode 100644 index 00000000000..3b939f3eff8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js @@ -0,0 +1,9 @@ +function f1(a, eval, c, d, e) { + return a("c") + eval; +} +function f2(a, b, c, d, e) { + return a + eval("c"); +} +function f3(a, eval, c, d, e) { + return a + eval("c"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_reported/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_reported/output.mangleOnly.js new file mode 100644 index 00000000000..7f2797ad2b4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_reported/output.mangleOnly.js @@ -0,0 +1,10 @@ +function c() { + if (a == 1 || b == 2) { + foo(); + } +} +function d() { + if (!(a == 1 || b == 2)) {} else { + foo(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_test_negated_is_best/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_test_negated_is_best/output.mangleOnly.js new file mode 100644 index 00000000000..840e5f6b044 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_979/issue979_test_negated_is_best/output.mangleOnly.js @@ -0,0 +1,27 @@ +function c() { + if ((a == 1) | (b == 2)) { + foo(); + } +} +function d() { + if (!((a == 1) | (b == 2))) {} else { + foo(); + } +} +function e() { + if (a == 1 && b == 2) { + foo(); + } +} +function f() { + if (!(a == 1 && b == 2)) {} else { + foo(); + } +} +function g() { + if (a == 1 || b == 2) { + foo(); + } else { + return bar(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_1/output.mangleOnly.js new file mode 100644 index 00000000000..9711f3f717b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_1/output.mangleOnly.js @@ -0,0 +1,20 @@ +function a(a) { + var b = function(b) { + var a = b.data; + return a && a.a != a.b; + }; + while(b(a)){ + a = a.data; + } + return a; +} +var b = { + a: 1, + b: 2, + data: { + a: "hello" + } +}; +console.log(a(b).a, a({ + a: "world" +}).a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_2/output.mangleOnly.js new file mode 100644 index 00000000000..9711f3f717b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_2/output.mangleOnly.js @@ -0,0 +1,20 @@ +function a(a) { + var b = function(b) { + var a = b.data; + return a && a.a != a.b; + }; + while(b(a)){ + a = a.data; + } + return a; +} +var b = { + a: 1, + b: 2, + data: { + a: "hello" + } +}; +console.log(a(b).a, a({ + a: "world" +}).a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_3/output.mangleOnly.js new file mode 100644 index 00000000000..6c20007db70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_3/output.mangleOnly.js @@ -0,0 +1,4 @@ +for(var a = (b)=>{ + var a = +b; + return console.log(a + a) && 0; +}; a(1);); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_4/output.mangleOnly.js new file mode 100644 index 00000000000..823c059564e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_4/output.mangleOnly.js @@ -0,0 +1,4 @@ +for(var a = 1, b = (b)=>{ + var a = +b; + return console.log(a + a) && 0; +}; a--; b(2)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_5/output.mangleOnly.js new file mode 100644 index 00000000000..e90e1d836f0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/issue_t120_5/output.mangleOnly.js @@ -0,0 +1,4 @@ +for(var a = 1, b = (b)=>{ + var a = +b; + return console.log(a + a) && 0; +}; a--;)b(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/pr_152_regression/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/pr_152_regression/output.mangleOnly.js new file mode 100644 index 00000000000..a41b04909d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t120/pr_152_regression/output.mangleOnly.js @@ -0,0 +1,14 @@ +(function(a, b) { + a.CryptoJS = b(); +})(this, function() { + var a = a || (function(b) { + var a = {}; + a.demo = function(a) { + return b.ceil(a); + }; + return a; + })(Math); + return a; +}); +var a = this.CryptoJS.demo(1.3); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_arg_colliding_with_arg_value_inner_scope/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_arg_colliding_with_arg_value_inner_scope/output.mangleOnly.js new file mode 100644 index 00000000000..cb75beaf0a0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_arg_colliding_with_arg_value_inner_scope/output.mangleOnly.js @@ -0,0 +1,19 @@ +var b = [ + "a" +]; +function c(a) { + return b.indexOf(a); +} +function d(a) { + return c(a); +} +function e(a) { + return c(a); +} +function f(a) { + return b[a]; +} +function a(a) { + return f(e(a)); +} +console.log(a("a")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_var_colliding_with_arg_value_inner_scope/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_var_colliding_with_arg_value_inner_scope/output.mangleOnly.js new file mode 100644 index 00000000000..54f4876ab02 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t292/no_flatten_with_var_colliding_with_arg_value_inner_scope/output.mangleOnly.js @@ -0,0 +1,21 @@ +var b = [ + "a" +]; +function c(a) { + return b.indexOf(a); +} +function d(a) { + return c(a); +} +function e(a) { + return c(a); +} +function f(c) { + var a = c * 2; + console.log(a); + return b[a]; +} +function a(a) { + return f(e(a)); +} +console.log(a("a")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50/output.mangleOnly.js new file mode 100644 index 00000000000..4483c76b0d3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50/output.mangleOnly.js @@ -0,0 +1,5005 @@ +(function() { + var a = [ + 4, + [ + { + a: -1, + b: 5 + } + ] + ]; + var c = [ + 4, + [ + { + a: -2, + b: 5 + } + ] + ]; + var d = [ + 4, + [ + { + a: -3, + b: 5 + } + ] + ]; + var e = [ + 4, + [ + { + a: -4, + b: 5 + } + ] + ]; + var f = [ + 4, + [ + { + a: -5, + b: 5 + } + ] + ]; + var g = [ + 4, + [ + { + a: -6, + b: 5 + } + ] + ]; + var h = [ + 4, + [ + { + a: -7, + b: 5 + } + ] + ]; + var i = [ + 4, + [ + { + a: -8, + b: 5 + } + ] + ]; + var j = [ + 4, + [ + { + a: -9, + b: 5 + } + ] + ]; + var b = [ + 4, + [ + { + a: -10, + b: 5 + } + ] + ]; + var k = [ + 4, + [ + { + a: -11, + b: 5 + } + ] + ]; + var l = [ + 4, + [ + { + a: -12, + b: 5 + } + ] + ]; + var m = [ + 4, + [ + { + a: -13, + b: 5 + } + ] + ]; + var n = [ + 4, + [ + { + a: -14, + b: 5 + } + ] + ]; + var o = [ + 4, + [ + { + a: -15, + b: 5 + } + ] + ]; + var p = [ + 4, + [ + { + a: -16, + b: 5 + } + ] + ]; + var q = [ + 4, + [ + { + a: -17, + b: 5 + } + ] + ]; + var r = [ + 4, + [ + { + a: -18, + b: 5 + } + ] + ]; + var s = [ + 4, + [ + { + a: -19, + b: 5 + } + ] + ]; + var t = [ + 4, + [ + { + a: -20, + b: 5 + } + ] + ]; + var u = [ + 4, + [ + { + a: -21, + b: 5 + } + ] + ]; + var v = [ + 4, + [ + { + a: -22, + b: 5 + } + ] + ]; + var w = [ + 4, + [ + { + a: -23, + b: 5 + } + ] + ]; + var x = [ + 4, + [ + { + a: -24, + b: 5 + } + ] + ]; + var y = [ + 4, + [ + { + a: -25, + b: 5 + } + ] + ]; + var z = [ + 4, + [ + { + a: -26, + b: 5 + } + ] + ]; + var A = [ + 4, + [ + { + a: -27, + b: 5 + } + ] + ]; + var B = [ + 4, + [ + { + a: -28, + b: 5 + } + ] + ]; + var C = [ + 4, + [ + { + a: -29, + b: 5 + } + ] + ]; + var D = [ + 4, + [ + { + a: -30, + b: 5 + } + ] + ]; + var E = [ + 4, + [ + { + a: -31, + b: 5 + } + ] + ]; + var F = [ + 4, + [ + { + a: -32, + b: 5 + } + ] + ]; + var G = [ + 4, + [ + { + a: -33, + b: 5 + } + ] + ]; + var H = [ + 4, + [ + { + a: -34, + b: 5 + } + ] + ]; + var I = [ + 4, + [ + { + a: -35, + b: 5 + } + ] + ]; + var J = [ + 4, + [ + { + a: -36, + b: 5 + } + ] + ]; + var K = [ + 4, + [ + { + a: -37, + b: 5 + } + ] + ]; + var L = [ + 4, + [ + { + a: -38, + b: 5 + } + ] + ]; + var M = [ + 4, + [ + { + a: -39, + b: 5 + } + ] + ]; + var N = [ + 4, + [ + { + a: -40, + b: 5 + } + ] + ]; + var O = [ + 4, + [ + { + a: -41, + b: 5 + } + ] + ]; + var P = [ + 4, + [ + { + a: -42, + b: 5 + } + ] + ]; + var Q = [ + 4, + [ + { + a: -43, + b: 5 + } + ] + ]; + var R = [ + 4, + [ + { + a: -44, + b: 5 + } + ] + ]; + var S = [ + 4, + [ + { + a: -45, + b: 5 + } + ] + ]; + var T = [ + 4, + [ + { + a: -46, + b: 5 + } + ] + ]; + var U = [ + 4, + [ + { + a: -47, + b: 5 + } + ] + ]; + var V = [ + 4, + [ + { + a: -48, + b: 5 + } + ] + ]; + var W = [ + 4, + [ + { + a: -49, + b: 5 + } + ] + ]; + var X = [ + 4, + [ + { + a: -50, + b: 5 + } + ] + ]; + var Y = [ + 4, + [ + { + a: -51, + b: 5 + } + ] + ]; + var Z = [ + 4, + [ + { + a: -52, + b: 5 + } + ] + ]; + var $ = [ + 4, + [ + { + a: -53, + b: 5 + } + ] + ]; + var _ = [ + 4, + [ + { + a: -54, + b: 5 + } + ] + ]; + var aa = [ + 4, + [ + { + a: -55, + b: 5 + } + ] + ]; + var ab = [ + 4, + [ + { + a: -56, + b: 5 + } + ] + ]; + var ac = [ + 4, + [ + { + a: -57, + b: 5 + } + ] + ]; + var ad = [ + 4, + [ + { + a: -58, + b: 5 + } + ] + ]; + var ae = [ + 4, + [ + { + a: -59, + b: 5 + } + ] + ]; + var af = [ + 4, + [ + { + a: -60, + b: 5 + } + ] + ]; + var ag = [ + 4, + [ + { + a: -61, + b: 5 + } + ] + ]; + var ah = [ + 4, + [ + { + a: -62, + b: 5 + } + ] + ]; + var ai = [ + 4, + [ + { + a: -63, + b: 5 + } + ] + ]; + var aj = [ + 4, + [ + { + a: -64, + b: 5 + } + ] + ]; + var ak = [ + 4, + [ + { + a: -65, + b: 5 + } + ] + ]; + var al = [ + 4, + [ + { + a: -66, + b: 5 + } + ] + ]; + var am = [ + 4, + [ + { + a: -67, + b: 5 + } + ] + ]; + var an = [ + 4, + [ + { + a: -68, + b: 5 + } + ] + ]; + var ao = [ + 4, + [ + { + a: -69, + b: 5 + } + ] + ]; + var ap = [ + 4, + [ + { + a: -70, + b: 5 + } + ] + ]; + var aq = [ + 4, + [ + { + a: -71, + b: 5 + } + ] + ]; + var ar = [ + 4, + [ + { + a: -72, + b: 5 + } + ] + ]; + var as = [ + 4, + [ + { + a: -73, + b: 5 + } + ] + ]; + var at = [ + 4, + [ + { + a: -74, + b: 5 + } + ] + ]; + var au = [ + 4, + [ + { + a: -75, + b: 5 + } + ] + ]; + var av = [ + 4, + [ + { + a: -76, + b: 5 + } + ] + ]; + var aw = [ + 4, + [ + { + a: -77, + b: 5 + } + ] + ]; + var ax = [ + 4, + [ + { + a: -78, + b: 5 + } + ] + ]; + var ay = [ + 4, + [ + { + a: -79, + b: 5 + } + ] + ]; + var az = [ + 4, + [ + { + a: -80, + b: 5 + } + ] + ]; + var aA = [ + 4, + [ + { + a: -81, + b: 5 + } + ] + ]; + var aB = [ + 4, + [ + { + a: -82, + b: 5 + } + ] + ]; + var aC = [ + 4, + [ + { + a: -83, + b: 5 + } + ] + ]; + var aD = [ + 4, + [ + { + a: -84, + b: 5 + } + ] + ]; + var aE = [ + 4, + [ + { + a: -85, + b: 5 + } + ] + ]; + var aF = [ + 4, + [ + { + a: -86, + b: 5 + } + ] + ]; + var aG = [ + 4, + [ + { + a: -87, + b: 5 + } + ] + ]; + var aH = [ + 4, + [ + { + a: -88, + b: 5 + } + ] + ]; + var aI = [ + 4, + [ + { + a: -89, + b: 5 + } + ] + ]; + var aJ = [ + 4, + [ + { + a: -90, + b: 5 + } + ] + ]; + var aK = [ + 4, + [ + { + a: -91, + b: 5 + } + ] + ]; + var aL = [ + 4, + [ + { + a: -92, + b: 5 + } + ] + ]; + var aM = [ + 4, + [ + { + a: -93, + b: 5 + } + ] + ]; + var aN = [ + 4, + [ + { + a: -94, + b: 5 + } + ] + ]; + var aO = [ + 4, + [ + { + a: -95, + b: 5 + } + ] + ]; + var aP = [ + 4, + [ + { + a: -96, + b: 5 + } + ] + ]; + var aQ = [ + 4, + [ + { + a: -97, + b: 5 + } + ] + ]; + var aR = [ + 4, + [ + { + a: -98, + b: 5 + } + ] + ]; + var aS = [ + 4, + [ + { + a: -99, + b: 5 + } + ] + ]; + var aT = [ + 4, + [ + { + a: -100, + b: 5 + } + ] + ]; + var aU = [ + 4, + [ + { + a: -101, + b: 5 + } + ] + ]; + var aV = [ + 4, + [ + { + a: -102, + b: 5 + } + ] + ]; + var aW = [ + 4, + [ + { + a: -103, + b: 5 + } + ] + ]; + var aX = [ + 4, + [ + { + a: -104, + b: 5 + } + ] + ]; + var aY = [ + 4, + [ + { + a: -105, + b: 5 + } + ] + ]; + var aZ = [ + 4, + [ + { + a: -106, + b: 5 + } + ] + ]; + var a$ = [ + 4, + [ + { + a: -107, + b: 5 + } + ] + ]; + var a_ = [ + 4, + [ + { + a: -108, + b: 5 + } + ] + ]; + var a0 = [ + 4, + [ + { + a: -109, + b: 5 + } + ] + ]; + var a1 = [ + 4, + [ + { + a: -110, + b: 5 + } + ] + ]; + var a2 = [ + 4, + [ + { + a: -111, + b: 5 + } + ] + ]; + var a3 = [ + 4, + [ + { + a: -112, + b: 5 + } + ] + ]; + var a4 = [ + 4, + [ + { + a: -113, + b: 5 + } + ] + ]; + var a5 = [ + 4, + [ + { + a: -114, + b: 5 + } + ] + ]; + var a6 = [ + 4, + [ + { + a: -115, + b: 5 + } + ] + ]; + var a7 = [ + 4, + [ + { + a: -116, + b: 5 + } + ] + ]; + var a8 = [ + 4, + [ + { + a: -117, + b: 5 + } + ] + ]; + var a9 = [ + 4, + [ + { + a: -118, + b: 5 + } + ] + ]; + var ba = [ + 4, + [ + { + a: -119, + b: 5 + } + ] + ]; + var bb = [ + 4, + [ + { + a: -120, + b: 5 + } + ] + ]; + var bc = [ + 4, + [ + { + a: -121, + b: 5 + } + ] + ]; + var bd = [ + 4, + [ + { + a: -122, + b: 5 + } + ] + ]; + var be = [ + 4, + [ + { + a: -123, + b: 5 + } + ] + ]; + var bf = [ + 4, + [ + { + a: -124, + b: 5 + } + ] + ]; + var bg = [ + 4, + [ + { + a: -125, + b: 5 + } + ] + ]; + var bh = [ + 4, + [ + { + a: -126, + b: 5 + } + ] + ]; + var bi = [ + 4, + [ + { + a: -127, + b: 5 + } + ] + ]; + var bj = [ + 4, + [ + { + a: -128, + b: 5 + } + ] + ]; + var bk = [ + 4, + [ + { + a: -129, + b: 5 + } + ] + ]; + var bl = [ + 4, + [ + { + a: -130, + b: 5 + } + ] + ]; + var bm = [ + 4, + [ + { + a: -131, + b: 5 + } + ] + ]; + var bn = [ + 4, + [ + { + a: -132, + b: 5 + } + ] + ]; + var bo = [ + 4, + [ + { + a: -133, + b: 5 + } + ] + ]; + var bp = [ + 4, + [ + { + a: -134, + b: 5 + } + ] + ]; + var bq = [ + 4, + [ + { + a: -135, + b: 5 + } + ] + ]; + var br = [ + 4, + [ + { + a: -136, + b: 5 + } + ] + ]; + var bs = [ + 4, + [ + { + a: -137, + b: 5 + } + ] + ]; + var bt = [ + 4, + [ + { + a: -138, + b: 5 + } + ] + ]; + var bu = [ + 4, + [ + { + a: -139, + b: 5 + } + ] + ]; + var bv = [ + 4, + [ + { + a: -140, + b: 5 + } + ] + ]; + var bw = [ + 4, + [ + { + a: -141, + b: 5 + } + ] + ]; + var bx = [ + 4, + [ + { + a: -142, + b: 5 + } + ] + ]; + var by = [ + 4, + [ + { + a: -143, + b: 5 + } + ] + ]; + var bz = [ + 4, + [ + { + a: -144, + b: 5 + } + ] + ]; + var bA = [ + 4, + [ + { + a: -145, + b: 5 + } + ] + ]; + var bB = [ + 4, + [ + { + a: -146, + b: 5 + } + ] + ]; + var bC = [ + 4, + [ + { + a: -147, + b: 5 + } + ] + ]; + var bD = [ + 4, + [ + { + a: -148, + b: 5 + } + ] + ]; + var bE = [ + 4, + [ + { + a: -149, + b: 5 + } + ] + ]; + var bF = [ + 4, + [ + { + a: -150, + b: 5 + } + ] + ]; + var bG = [ + 4, + [ + { + a: -151, + b: 5 + } + ] + ]; + var bH = [ + 4, + [ + { + a: -152, + b: 5 + } + ] + ]; + var bI = [ + 4, + [ + { + a: -153, + b: 5 + } + ] + ]; + var bJ = [ + 4, + [ + { + a: -154, + b: 5 + } + ] + ]; + var bK = [ + 4, + [ + { + a: -155, + b: 5 + } + ] + ]; + var bL = [ + 4, + [ + { + a: -156, + b: 5 + } + ] + ]; + var bM = [ + 4, + [ + { + a: -157, + b: 5 + } + ] + ]; + var bN = [ + 4, + [ + { + a: -158, + b: 5 + } + ] + ]; + var bO = [ + 4, + [ + { + a: -159, + b: 5 + } + ] + ]; + var bP = [ + 4, + [ + { + a: -160, + b: 5 + } + ] + ]; + var bQ = [ + 4, + [ + { + a: -161, + b: 5 + } + ] + ]; + var bR = [ + 4, + [ + { + a: -162, + b: 5 + } + ] + ]; + var bS = [ + 4, + [ + { + a: -163, + b: 5 + } + ] + ]; + var bT = [ + 4, + [ + { + a: -164, + b: 5 + } + ] + ]; + var bU = [ + 4, + [ + { + a: -165, + b: 5 + } + ] + ]; + var bV = [ + 4, + [ + { + a: -166, + b: 5 + } + ] + ]; + var bW = [ + 4, + [ + { + a: -167, + b: 5 + } + ] + ]; + var bX = [ + 4, + [ + { + a: -168, + b: 5 + } + ] + ]; + var bY = [ + 4, + [ + { + a: -169, + b: 5 + } + ] + ]; + var bZ = [ + 4, + [ + { + a: -170, + b: 5 + } + ] + ]; + var b$ = [ + 4, + [ + { + a: -171, + b: 5 + } + ] + ]; + var b_ = [ + 4, + [ + { + a: -172, + b: 5 + } + ] + ]; + var b0 = [ + 4, + [ + { + a: -173, + b: 5 + } + ] + ]; + var b1 = [ + 4, + [ + { + a: -174, + b: 5 + } + ] + ]; + var b2 = [ + 4, + [ + { + a: -175, + b: 5 + } + ] + ]; + var b3 = [ + 4, + [ + { + a: -176, + b: 5 + } + ] + ]; + var b4 = [ + 4, + [ + { + a: -177, + b: 5 + } + ] + ]; + var b5 = [ + 4, + [ + { + a: -178, + b: 5 + } + ] + ]; + var b6 = [ + 4, + [ + { + a: -179, + b: 5 + } + ] + ]; + var b7 = [ + 4, + [ + { + a: -180, + b: 5 + } + ] + ]; + var b8 = [ + 4, + [ + { + a: -181, + b: 5 + } + ] + ]; + var b9 = [ + 4, + [ + { + a: -182, + b: 5 + } + ] + ]; + var ca = [ + 4, + [ + { + a: -183, + b: 5 + } + ] + ]; + var cb = [ + 4, + [ + { + a: -184, + b: 5 + } + ] + ]; + var cc = [ + 4, + [ + { + a: -185, + b: 5 + } + ] + ]; + var cd = [ + 4, + [ + { + a: -186, + b: 5 + } + ] + ]; + var ce = [ + 4, + [ + { + a: -187, + b: 5 + } + ] + ]; + var cf = [ + 4, + [ + { + a: -188, + b: 5 + } + ] + ]; + var cg = [ + 4, + [ + { + a: -189, + b: 5 + } + ] + ]; + var ch = [ + 4, + [ + { + a: -190, + b: 5 + } + ] + ]; + var ci = [ + 4, + [ + { + a: -191, + b: 5 + } + ] + ]; + var cj = [ + 4, + [ + { + a: -192, + b: 5 + } + ] + ]; + var ck = [ + 4, + [ + { + a: -193, + b: 5 + } + ] + ]; + var cl = [ + 4, + [ + { + a: -194, + b: 5 + } + ] + ]; + var cm = [ + 4, + [ + { + a: -195, + b: 5 + } + ] + ]; + var cn = [ + 4, + [ + { + a: -196, + b: 5 + } + ] + ]; + var co = [ + 4, + [ + { + a: -197, + b: 5 + } + ] + ]; + var cp = [ + 4, + [ + { + a: -198, + b: 5 + } + ] + ]; + var cq = [ + 4, + [ + { + a: -199, + b: 5 + } + ] + ]; + var cr = [ + 4, + [ + { + a: -200, + b: 5 + } + ] + ]; + var cs = [ + 4, + [ + { + a: -201, + b: 5 + } + ] + ]; + var ct = [ + 4, + [ + { + a: -202, + b: 5 + } + ] + ]; + var cu = [ + 4, + [ + { + a: -203, + b: 5 + } + ] + ]; + var cv = [ + 4, + [ + { + a: -204, + b: 5 + } + ] + ]; + var cw = [ + 4, + [ + { + a: -205, + b: 5 + } + ] + ]; + var cx = [ + 4, + [ + { + a: -206, + b: 5 + } + ] + ]; + var cy = [ + 4, + [ + { + a: -207, + b: 5 + } + ] + ]; + var cz = [ + 4, + [ + { + a: -208, + b: 5 + } + ] + ]; + var cA = [ + 4, + [ + { + a: -209, + b: 5 + } + ] + ]; + var cB = [ + 4, + [ + { + a: -210, + b: 5 + } + ] + ]; + var cC = [ + 4, + [ + { + a: -211, + b: 5 + } + ] + ]; + var cD = [ + 4, + [ + { + a: -212, + b: 5 + } + ] + ]; + var cE = [ + 4, + [ + { + a: -213, + b: 5 + } + ] + ]; + var cF = [ + 4, + [ + { + a: -214, + b: 5 + } + ] + ]; + var cG = [ + 4, + [ + { + a: -215, + b: 5 + } + ] + ]; + var cH = [ + 4, + [ + { + a: -216, + b: 5 + } + ] + ]; + var cI = [ + 4, + [ + { + a: -217, + b: 5 + } + ] + ]; + var cJ = [ + 4, + [ + { + a: -218, + b: 5 + } + ] + ]; + var cK = [ + 4, + [ + { + a: -219, + b: 5 + } + ] + ]; + var cL = [ + 4, + [ + { + a: -220, + b: 5 + } + ] + ]; + var cM = [ + 4, + [ + { + a: -221, + b: 5 + } + ] + ]; + var cN = [ + 4, + [ + { + a: -222, + b: 5 + } + ] + ]; + var cO = [ + 4, + [ + { + a: -223, + b: 5 + } + ] + ]; + var cP = [ + 4, + [ + { + a: -224, + b: 5 + } + ] + ]; + var cQ = [ + 4, + [ + { + a: -225, + b: 5 + } + ] + ]; + var cR = [ + 4, + [ + { + a: -226, + b: 5 + } + ] + ]; + var cS = [ + 4, + [ + { + a: -227, + b: 5 + } + ] + ]; + var cT = [ + 4, + [ + { + a: -228, + b: 5 + } + ] + ]; + var cU = [ + 4, + [ + { + a: -229, + b: 5 + } + ] + ]; + var cV = [ + 4, + [ + { + a: -230, + b: 5 + } + ] + ]; + var cW = [ + 4, + [ + { + a: -231, + b: 5 + } + ] + ]; + var cX = [ + 4, + [ + { + a: -232, + b: 5 + } + ] + ]; + var cY = [ + 4, + [ + { + a: -233, + b: 5 + } + ] + ]; + var cZ = [ + 4, + [ + { + a: -234, + b: 5 + } + ] + ]; + var c$ = [ + 4, + [ + { + a: -235, + b: 5 + } + ] + ]; + var c_ = [ + 4, + [ + { + a: -236, + b: 5 + } + ] + ]; + var c0 = [ + 4, + [ + { + a: -237, + b: 5 + } + ] + ]; + var c1 = [ + 4, + [ + { + a: -238, + b: 5 + } + ] + ]; + var c2 = [ + 4, + [ + { + a: -239, + b: 5 + } + ] + ]; + var c3 = [ + 4, + [ + { + a: -240, + b: 5 + } + ] + ]; + var c4 = [ + 4, + [ + { + a: -241, + b: 5 + } + ] + ]; + var c5 = [ + 4, + [ + { + a: -242, + b: 5 + } + ] + ]; + var c6 = [ + 4, + [ + { + a: -243, + b: 5 + } + ] + ]; + var c7 = [ + 4, + [ + { + a: -244, + b: 5 + } + ] + ]; + var c8 = [ + 4, + [ + { + a: -245, + b: 5 + } + ] + ]; + var c9 = [ + 4, + [ + { + a: -246, + b: 5 + } + ] + ]; + var da = [ + 4, + [ + { + a: -247, + b: 5 + } + ] + ]; + var db = [ + 4, + [ + { + a: -248, + b: 5 + } + ] + ]; + var dc = [ + 4, + [ + { + a: -249, + b: 5 + } + ] + ]; + var dd = [ + 4, + [ + { + a: -250, + b: 5 + } + ] + ]; + var de = [ + 4, + [ + { + a: -251, + b: 5 + } + ] + ]; + var df = [ + 4, + [ + { + a: -252, + b: 5 + } + ] + ]; + var dg = [ + 4, + [ + { + a: -253, + b: 5 + } + ] + ]; + var dh = [ + 4, + [ + { + a: -254, + b: 5 + } + ] + ]; + var di = [ + 4, + [ + { + a: -255, + b: 5 + } + ] + ]; + var dj = [ + 4, + [ + { + a: -256, + b: 5 + } + ] + ]; + var dk = [ + 4, + [ + { + a: -257, + b: 5 + } + ] + ]; + var dl = [ + 4, + [ + { + a: -258, + b: 5 + } + ] + ]; + var dm = [ + 4, + [ + { + a: -259, + b: 5 + } + ] + ]; + var dn = [ + 4, + [ + { + a: -260, + b: 5 + } + ] + ]; + var dp = [ + 4, + [ + { + a: -261, + b: 5 + } + ] + ]; + var dq = [ + 4, + [ + { + a: -262, + b: 5 + } + ] + ]; + var dr = [ + 4, + [ + { + a: -263, + b: 5 + } + ] + ]; + var ds = [ + 4, + [ + { + a: -264, + b: 5 + } + ] + ]; + var dt = [ + 4, + [ + { + a: -265, + b: 5 + } + ] + ]; + var du = [ + 4, + [ + { + a: -266, + b: 5 + } + ] + ]; + var dv = [ + 4, + [ + { + a: -267, + b: 5 + } + ] + ]; + var dw = [ + 4, + [ + { + a: -268, + b: 5 + } + ] + ]; + var dx = [ + 4, + [ + { + a: -269, + b: 5 + } + ] + ]; + var dy = [ + 4, + [ + { + a: -270, + b: 5 + } + ] + ]; + var dz = [ + 4, + [ + { + a: -271, + b: 5 + } + ] + ]; + var dA = [ + 4, + [ + { + a: -272, + b: 5 + } + ] + ]; + var dB = [ + 4, + [ + { + a: -273, + b: 5 + } + ] + ]; + var dC = [ + 4, + [ + { + a: -274, + b: 5 + } + ] + ]; + var dD = [ + 4, + [ + { + a: -275, + b: 5 + } + ] + ]; + var dE = [ + 4, + [ + { + a: -276, + b: 5 + } + ] + ]; + var dF = [ + 4, + [ + { + a: -277, + b: 5 + } + ] + ]; + var dG = [ + 4, + [ + { + a: -278, + b: 5 + } + ] + ]; + var dH = [ + 4, + [ + { + a: -279, + b: 5 + } + ] + ]; + var dI = [ + 4, + [ + { + a: -280, + b: 5 + } + ] + ]; + var dJ = [ + 4, + [ + { + a: -281, + b: 5 + } + ] + ]; + var dK = [ + 4, + [ + { + a: -282, + b: 5 + } + ] + ]; + var dL = [ + 4, + [ + { + a: -283, + b: 5 + } + ] + ]; + var dM = [ + 4, + [ + { + a: -284, + b: 5 + } + ] + ]; + var dN = [ + 4, + [ + { + a: -285, + b: 5 + } + ] + ]; + var dO = [ + 4, + [ + { + a: -286, + b: 5 + } + ] + ]; + var dP = [ + 4, + [ + { + a: -287, + b: 5 + } + ] + ]; + var dQ = [ + 4, + [ + { + a: -288, + b: 5 + } + ] + ]; + var dR = [ + 4, + [ + { + a: -289, + b: 5 + } + ] + ]; + var dS = [ + 4, + [ + { + a: -290, + b: 5 + } + ] + ]; + var dT = [ + 4, + [ + { + a: -291, + b: 5 + } + ] + ]; + var dU = [ + 4, + [ + { + a: -292, + b: 5 + } + ] + ]; + var dV = [ + 4, + [ + { + a: -293, + b: 5 + } + ] + ]; + var dW = [ + 4, + [ + { + a: -294, + b: 5 + } + ] + ]; + var dX = [ + 4, + [ + { + a: -295, + b: 5 + } + ] + ]; + var dY = [ + 4, + [ + { + a: -296, + b: 5 + } + ] + ]; + var dZ = [ + 4, + [ + { + a: -297, + b: 5 + } + ] + ]; + var d$ = [ + 4, + [ + { + a: -298, + b: 5 + } + ] + ]; + var d_ = [ + 4, + [ + { + a: -299, + b: 5 + } + ] + ]; + var d0 = [ + 4, + [ + { + a: -300, + b: 5 + } + ] + ]; + var d1 = [ + 4, + [ + { + a: -301, + b: 5 + } + ] + ]; + var d2 = [ + 4, + [ + { + a: -302, + b: 5 + } + ] + ]; + var d3 = [ + 4, + [ + { + a: -303, + b: 5 + } + ] + ]; + var d4 = [ + 4, + [ + { + a: -304, + b: 5 + } + ] + ]; + var d5 = [ + 4, + [ + { + a: -305, + b: 5 + } + ] + ]; + var d6 = [ + 4, + [ + { + a: -306, + b: 5 + } + ] + ]; + var d7 = [ + 4, + [ + { + a: -307, + b: 5 + } + ] + ]; + var d8 = [ + 4, + [ + { + a: -308, + b: 5 + } + ] + ]; + var d9 = [ + 4, + [ + { + a: -309, + b: 5 + } + ] + ]; + var ea = [ + 4, + [ + { + a: -310, + b: 5 + } + ] + ]; + var eb = [ + 4, + [ + { + a: -311, + b: 5 + } + ] + ]; + var ec = [ + 4, + [ + { + a: -312, + b: 5 + } + ] + ]; + var ed = [ + 4, + [ + { + a: -313, + b: 5 + } + ] + ]; + var ee = [ + 4, + [ + { + a: -314, + b: 5 + } + ] + ]; + var ef = [ + 4, + [ + { + a: -315, + b: 5 + } + ] + ]; + var eg = [ + 4, + [ + { + a: -316, + b: 5 + } + ] + ]; + var eh = [ + 4, + [ + { + a: -317, + b: 5 + } + ] + ]; + var ei = [ + 4, + [ + { + a: -318, + b: 5 + } + ] + ]; + var ej = [ + 4, + [ + { + a: -319, + b: 5 + } + ] + ]; + var ek = [ + 4, + [ + { + a: -320, + b: 5 + } + ] + ]; + var el = [ + 4, + [ + { + a: -321, + b: 5 + } + ] + ]; + var em = [ + 4, + [ + { + a: -322, + b: 5 + } + ] + ]; + var en = [ + 4, + [ + { + a: -323, + b: 5 + } + ] + ]; + var eo = [ + 4, + [ + { + a: -324, + b: 5 + } + ] + ]; + var ep = [ + 4, + [ + { + a: -325, + b: 5 + } + ] + ]; + var eq = [ + 4, + [ + { + a: -326, + b: 5 + } + ] + ]; + var er = [ + 4, + [ + { + a: -327, + b: 5 + } + ] + ]; + var es = [ + 4, + [ + { + a: -328, + b: 5 + } + ] + ]; + var et = [ + 4, + [ + { + a: -329, + b: 5 + } + ] + ]; + var eu = [ + 4, + [ + { + a: -330, + b: 5 + } + ] + ]; + var ev = [ + 4, + [ + { + a: -331, + b: 5 + } + ] + ]; + var ew = [ + 4, + [ + { + a: -332, + b: 5 + } + ] + ]; + var ex = [ + 4, + [ + { + a: -333, + b: 5 + } + ] + ]; + var ey = [ + 4, + [ + { + a: -334, + b: 5 + } + ] + ]; + var ez = [ + 4, + [ + { + a: -335, + b: 5 + } + ] + ]; + var eA = [ + 4, + [ + { + a: -336, + b: 5 + } + ] + ]; + var eB = [ + 4, + [ + { + a: -337, + b: 5 + } + ] + ]; + var eC = [ + 4, + [ + { + a: -338, + b: 5 + } + ] + ]; + var eD = [ + 4, + [ + { + a: -339, + b: 5 + } + ] + ]; + var eE = [ + 4, + [ + { + a: -340, + b: 5 + } + ] + ]; + var eF = [ + 4, + [ + { + a: -341, + b: 5 + } + ] + ]; + var eG = [ + 4, + [ + { + a: -342, + b: 5 + } + ] + ]; + var eH = [ + 4, + [ + { + a: -343, + b: 5 + } + ] + ]; + var eI = [ + 4, + [ + { + a: -344, + b: 5 + } + ] + ]; + var eJ = [ + 4, + [ + { + a: -345, + b: 5 + } + ] + ]; + var eK = [ + 4, + [ + { + a: -346, + b: 5 + } + ] + ]; + var eL = [ + 4, + [ + { + a: -347, + b: 5 + } + ] + ]; + var eM = [ + 4, + [ + { + a: -348, + b: 5 + } + ] + ]; + var eN = [ + 4, + [ + { + a: -349, + b: 5 + } + ] + ]; + var eO = [ + 4, + [ + { + a: -350, + b: 5 + } + ] + ]; + var eP = [ + 4, + [ + { + a: -351, + b: 5 + } + ] + ]; + var eQ = [ + 4, + [ + { + a: -352, + b: 5 + } + ] + ]; + var eR = [ + 4, + [ + { + a: -353, + b: 5 + } + ] + ]; + var eS = [ + 4, + [ + { + a: -354, + b: 5 + } + ] + ]; + var eT = [ + 4, + [ + { + a: -355, + b: 5 + } + ] + ]; + var eU = [ + 4, + [ + { + a: -356, + b: 5 + } + ] + ]; + var eV = [ + 4, + [ + { + a: -357, + b: 5 + } + ] + ]; + var eW = [ + 4, + [ + { + a: -358, + b: 5 + } + ] + ]; + var eX = [ + 4, + [ + { + a: -359, + b: 5 + } + ] + ]; + var eY = [ + 4, + [ + { + a: -360, + b: 5 + } + ] + ]; + var eZ = [ + 4, + [ + { + a: -361, + b: 5 + } + ] + ]; + var e$ = [ + 4, + [ + { + a: -362, + b: 5 + } + ] + ]; + var e_ = [ + 4, + [ + { + a: -363, + b: 5 + } + ] + ]; + var e0 = [ + 4, + [ + { + a: -364, + b: 5 + } + ] + ]; + var e1 = [ + 4, + [ + { + a: -365, + b: 5 + } + ] + ]; + var e2 = [ + 4, + [ + { + a: -366, + b: 5 + } + ] + ]; + var e3 = [ + 4, + [ + { + a: -367, + b: 5 + } + ] + ]; + var e4 = [ + 4, + [ + { + a: -368, + b: 5 + } + ] + ]; + var e5 = [ + 4, + [ + { + a: -369, + b: 5 + } + ] + ]; + var e6 = [ + 4, + [ + { + a: -370, + b: 5 + } + ] + ]; + var e7 = [ + 4, + [ + { + a: -371, + b: 5 + } + ] + ]; + var e8 = [ + 4, + [ + { + a: -372, + b: 5 + } + ] + ]; + var e9 = [ + 4, + [ + { + a: -373, + b: 5 + } + ] + ]; + var fa = [ + 4, + [ + { + a: -374, + b: 5 + } + ] + ]; + var fb = [ + 4, + [ + { + a: -375, + b: 5 + } + ] + ]; + var fc = [ + 4, + [ + { + a: -376, + b: 5 + } + ] + ]; + var fd = [ + 4, + [ + { + a: -377, + b: 5 + } + ] + ]; + var fe = [ + 4, + [ + { + a: -378, + b: 5 + } + ] + ]; + var ff = [ + 4, + [ + { + a: -379, + b: 5 + } + ] + ]; + var fg = [ + 4, + [ + { + a: -380, + b: 5 + } + ] + ]; + var fh = [ + 4, + [ + { + a: -381, + b: 5 + } + ] + ]; + var fi = [ + 4, + [ + { + a: -382, + b: 5 + } + ] + ]; + var fj = [ + 4, + [ + { + a: -383, + b: 5 + } + ] + ]; + var fk = [ + 4, + [ + { + a: -384, + b: 5 + } + ] + ]; + var fl = [ + 4, + [ + { + a: -385, + b: 5 + } + ] + ]; + var fm = [ + 4, + [ + { + a: -386, + b: 5 + } + ] + ]; + var fn = [ + 4, + [ + { + a: -387, + b: 5 + } + ] + ]; + var fo = [ + 4, + [ + { + a: -388, + b: 5 + } + ] + ]; + var fp = [ + 4, + [ + { + a: -389, + b: 5 + } + ] + ]; + var fq = [ + 4, + [ + { + a: -390, + b: 5 + } + ] + ]; + var fr = [ + 4, + [ + { + a: -391, + b: 5 + } + ] + ]; + var fs = [ + 4, + [ + { + a: -392, + b: 5 + } + ] + ]; + var ft = [ + 4, + [ + { + a: -393, + b: 5 + } + ] + ]; + var fu = [ + 4, + [ + { + a: -394, + b: 5 + } + ] + ]; + var fv = [ + 4, + [ + { + a: -395, + b: 5 + } + ] + ]; + var fw = [ + 4, + [ + { + a: -396, + b: 5 + } + ] + ]; + var fx = [ + 4, + [ + { + a: -397, + b: 5 + } + ] + ]; + var fy = [ + 4, + [ + { + a: -398, + b: 5 + } + ] + ]; + var fz = [ + 4, + [ + { + a: -399, + b: 5 + } + ] + ]; + var fA = [ + 4, + [ + { + a: -400, + b: 5 + } + ] + ]; + var fB = [ + 4, + [ + { + a: -401, + b: 5 + } + ] + ]; + var fC = [ + 4, + [ + { + a: -402, + b: 5 + } + ] + ]; + var fD = [ + 4, + [ + { + a: -403, + b: 5 + } + ] + ]; + var fE = [ + 4, + [ + { + a: -404, + b: 5 + } + ] + ]; + var fF = [ + 4, + [ + { + a: -405, + b: 5 + } + ] + ]; + var fG = [ + 4, + [ + { + a: -406, + b: 5 + } + ] + ]; + var fH = [ + 4, + [ + { + a: -407, + b: 5 + } + ] + ]; + var fI = [ + 4, + [ + { + a: -408, + b: 5 + } + ] + ]; + var fJ = [ + 4, + [ + { + a: -409, + b: 5 + } + ] + ]; + var fK = [ + 4, + [ + { + a: -410, + b: 5 + } + ] + ]; + var fL = [ + 4, + [ + { + a: -411, + b: 5 + } + ] + ]; + var fM = [ + 4, + [ + { + a: -412, + b: 5 + } + ] + ]; + var fN = [ + 4, + [ + { + a: -413, + b: 5 + } + ] + ]; + var fO = [ + 4, + [ + { + a: -414, + b: 5 + } + ] + ]; + var fP = [ + 4, + [ + { + a: -415, + b: 5 + } + ] + ]; + var fQ = [ + 4, + [ + { + a: -416, + b: 5 + } + ] + ]; + var fR = [ + 4, + [ + { + a: -417, + b: 5 + } + ] + ]; + var fS = [ + 4, + [ + { + a: -418, + b: 5 + } + ] + ]; + var fT = [ + 4, + [ + { + a: -419, + b: 5 + } + ] + ]; + var fU = [ + 4, + [ + { + a: -420, + b: 5 + } + ] + ]; + var fV = [ + 4, + [ + { + a: -421, + b: 5 + } + ] + ]; + var fW = [ + 4, + [ + { + a: -422, + b: 5 + } + ] + ]; + var fX = [ + 4, + [ + { + a: -423, + b: 5 + } + ] + ]; + var fY = [ + 4, + [ + { + a: -424, + b: 5 + } + ] + ]; + var fZ = [ + 4, + [ + { + a: -425, + b: 5 + } + ] + ]; + var f$ = [ + 4, + [ + { + a: -426, + b: 5 + } + ] + ]; + var f_ = [ + 4, + [ + { + a: -427, + b: 5 + } + ] + ]; + var f0 = [ + 4, + [ + { + a: -428, + b: 5 + } + ] + ]; + var f1 = [ + 4, + [ + { + a: -429, + b: 5 + } + ] + ]; + var f2 = [ + 4, + [ + { + a: -430, + b: 5 + } + ] + ]; + var f3 = [ + 4, + [ + { + a: -431, + b: 5 + } + ] + ]; + var f4 = [ + 4, + [ + { + a: -432, + b: 5 + } + ] + ]; + var f5 = [ + 4, + [ + { + a: -433, + b: 5 + } + ] + ]; + var f6 = [ + 4, + [ + { + a: -434, + b: 5 + } + ] + ]; + var f7 = [ + 4, + [ + { + a: -435, + b: 5 + } + ] + ]; + var f8 = [ + 4, + [ + { + a: -436, + b: 5 + } + ] + ]; + var f9 = [ + 4, + [ + { + a: -437, + b: 5 + } + ] + ]; + var ga = [ + 4, + [ + { + a: -438, + b: 5 + } + ] + ]; + var gb = [ + 4, + [ + { + a: -439, + b: 5 + } + ] + ]; + var gc = [ + 4, + [ + { + a: -440, + b: 5 + } + ] + ]; + var gd = [ + 4, + [ + { + a: -441, + b: 5 + } + ] + ]; + var ge = [ + 4, + [ + { + a: -442, + b: 5 + } + ] + ]; + var gf = [ + 4, + [ + { + a: -443, + b: 5 + } + ] + ]; + var gg = [ + 4, + [ + { + a: -444, + b: 5 + } + ] + ]; + var gh = [ + 4, + [ + { + a: -445, + b: 5 + } + ] + ]; + var gi = [ + 4, + [ + { + a: -446, + b: 5 + } + ] + ]; + var gj = [ + 4, + [ + { + a: -447, + b: 5 + } + ] + ]; + var gk = [ + 4, + [ + { + a: -448, + b: 5 + } + ] + ]; + var gl = [ + 4, + [ + { + a: -449, + b: 5 + } + ] + ]; + var gm = [ + 4, + [ + { + a: -450, + b: 5 + } + ] + ]; + var gn = [ + 4, + [ + { + a: -451, + b: 5 + } + ] + ]; + var go = [ + 4, + [ + { + a: -452, + b: 5 + } + ] + ]; + var gp = [ + 4, + [ + { + a: -453, + b: 5 + } + ] + ]; + var gq = [ + 4, + [ + { + a: -454, + b: 5 + } + ] + ]; + var gr = [ + 4, + [ + { + a: -455, + b: 5 + } + ] + ]; + var gs = [ + 4, + [ + { + a: -456, + b: 5 + } + ] + ]; + var gt = [ + 4, + [ + { + a: -457, + b: 5 + } + ] + ]; + var gu = [ + 4, + [ + { + a: -458, + b: 5 + } + ] + ]; + var gv = [ + 4, + [ + { + a: -459, + b: 5 + } + ] + ]; + var gw = [ + 4, + [ + { + a: -460, + b: 5 + } + ] + ]; + var gx = [ + 4, + [ + { + a: -461, + b: 5 + } + ] + ]; + var gy = [ + 4, + [ + { + a: -462, + b: 5 + } + ] + ]; + var gz = [ + 4, + [ + { + a: -463, + b: 5 + } + ] + ]; + var gA = [ + 4, + [ + { + a: -464, + b: 5 + } + ] + ]; + var gB = [ + 4, + [ + { + a: -465, + b: 5 + } + ] + ]; + var gC = [ + 4, + [ + { + a: -466, + b: 5 + } + ] + ]; + var gD = [ + 4, + [ + { + a: -467, + b: 5 + } + ] + ]; + var gE = [ + 4, + [ + { + a: -468, + b: 5 + } + ] + ]; + var gF = [ + 4, + [ + { + a: -469, + b: 5 + } + ] + ]; + var gG = [ + 4, + [ + { + a: -470, + b: 5 + } + ] + ]; + var gH = [ + 4, + [ + { + a: -471, + b: 5 + } + ] + ]; + var gI = [ + 4, + [ + { + a: -472, + b: 5 + } + ] + ]; + var gJ = [ + 4, + [ + { + a: -473, + b: 5 + } + ] + ]; + var gK = [ + 4, + [ + { + a: -474, + b: 5 + } + ] + ]; + var gL = [ + 4, + [ + { + a: -475, + b: 5 + } + ] + ]; + var gM = [ + 4, + [ + { + a: -476, + b: 5 + } + ] + ]; + var gN = [ + 4, + [ + { + a: -477, + b: 5 + } + ] + ]; + var gO = [ + 4, + [ + { + a: -478, + b: 5 + } + ] + ]; + var gP = [ + 4, + [ + { + a: -479, + b: 5 + } + ] + ]; + var gQ = [ + 4, + [ + { + a: -480, + b: 5 + } + ] + ]; + var gR = [ + 4, + [ + { + a: -481, + b: 5 + } + ] + ]; + var gS = [ + 4, + [ + { + a: -482, + b: 5 + } + ] + ]; + var gT = [ + 4, + [ + { + a: -483, + b: 5 + } + ] + ]; + var gU = [ + 4, + [ + { + a: -484, + b: 5 + } + ] + ]; + var gV = [ + 4, + [ + { + a: -485, + b: 5 + } + ] + ]; + var gW = [ + 4, + [ + { + a: -486, + b: 5 + } + ] + ]; + var gX = [ + 4, + [ + { + a: -487, + b: 5 + } + ] + ]; + var gY = [ + 4, + [ + { + a: -488, + b: 5 + } + ] + ]; + var gZ = [ + 4, + [ + { + a: -489, + b: 5 + } + ] + ]; + var g$ = [ + 4, + [ + { + a: -490, + b: 5 + } + ] + ]; + var g_ = [ + 4, + [ + { + a: -491, + b: 5 + } + ] + ]; + var g0 = [ + 4, + [ + { + a: -492, + b: 5 + } + ] + ]; + var g1 = [ + 4, + [ + { + a: -493, + b: 5 + } + ] + ]; + var g2 = [ + 4, + [ + { + a: -494, + b: 5 + } + ] + ]; + var g3 = [ + 4, + [ + { + a: -495, + b: 5 + } + ] + ]; + var g4 = [ + 4, + [ + { + a: -496, + b: 5 + } + ] + ]; + var g5 = [ + 4, + [ + { + a: -497, + b: 5 + } + ] + ]; + var g6 = [ + 4, + [ + { + a: -498, + b: 5 + } + ] + ]; + var g7 = [ + 4, + [ + { + a: -499, + b: 5 + } + ] + ]; + var g8 = [ + 4, + [ + { + a: -500, + b: 5 + } + ] + ]; + var g9 = { + p1: a, + p2: c, + p3: d, + p4: e, + p5: f, + p6: g, + p7: h, + p8: i, + p9: j, + p10: b, + p11: k, + p12: l, + p13: m, + p14: n, + p15: o, + p16: p, + p17: q, + p18: r, + p19: s, + p20: t, + p21: u, + p22: v, + p23: w, + p24: x, + p25: y, + p26: z, + p27: A, + p28: B, + p29: C, + p30: D, + p31: E, + p32: F, + p33: G, + p34: H, + p35: I, + p36: J, + p37: K, + p38: L, + p39: M, + p40: N, + p41: O, + p42: P, + p43: Q, + p44: R, + p45: S, + p46: T, + p47: U, + p48: V, + p49: W, + p50: X, + p51: Y, + p52: Z, + p53: $, + p54: _, + p55: aa, + p56: ab, + p57: ac, + p58: ad, + p59: ae, + p60: af, + p61: ag, + p62: ah, + p63: ai, + p64: aj, + p65: ak, + p66: al, + p67: am, + p68: an, + p69: ao, + p70: ap, + p71: aq, + p72: ar, + p73: as, + p74: at, + p75: au, + p76: av, + p77: aw, + p78: ax, + p79: ay, + p80: az, + p81: aA, + p82: aB, + p83: aC, + p84: aD, + p85: aE, + p86: aF, + p87: aG, + p88: aH, + p89: aI, + p90: aJ, + p91: aK, + p92: aL, + p93: aM, + p94: aN, + p95: aO, + p96: aP, + p97: aQ, + p98: aR, + p99: aS, + p100: aT, + p101: aU, + p102: aV, + p103: aW, + p104: aX, + p105: aY, + p106: aZ, + p107: a$, + p108: a_, + p109: a0, + p110: a1, + p111: a2, + p112: a3, + p113: a4, + p114: a5, + p115: a6, + p116: a7, + p117: a8, + p118: a9, + p119: ba, + p120: bb, + p121: bc, + p122: bd, + p123: be, + p124: bf, + p125: bg, + p126: bh, + p127: bi, + p128: bj, + p129: bk, + p130: bl, + p131: bm, + p132: bn, + p133: bo, + p134: bp, + p135: bq, + p136: br, + p137: bs, + p138: bt, + p139: bu, + p140: bv, + p141: bw, + p142: bx, + p143: by, + p144: bz, + p145: bA, + p146: bB, + p147: bC, + p148: bD, + p149: bE, + p150: bF, + p151: bG, + p152: bH, + p153: bI, + p154: bJ, + p155: bK, + p156: bL, + p157: bM, + p158: bN, + p159: bO, + p160: bP, + p161: bQ, + p162: bR, + p163: bS, + p164: bT, + p165: bU, + p166: bV, + p167: bW, + p168: bX, + p169: bY, + p170: bZ, + p171: b$, + p172: b_, + p173: b0, + p174: b1, + p175: b2, + p176: b3, + p177: b4, + p178: b5, + p179: b6, + p180: b7, + p181: b8, + p182: b9, + p183: ca, + p184: cb, + p185: cc, + p186: cd, + p187: ce, + p188: cf, + p189: cg, + p190: ch, + p191: ci, + p192: cj, + p193: ck, + p194: cl, + p195: cm, + p196: cn, + p197: co, + p198: cp, + p199: cq, + p200: cr, + p201: cs, + p202: ct, + p203: cu, + p204: cv, + p205: cw, + p206: cx, + p207: cy, + p208: cz, + p209: cA, + p210: cB, + p211: cC, + p212: cD, + p213: cE, + p214: cF, + p215: cG, + p216: cH, + p217: cI, + p218: cJ, + p219: cK, + p220: cL, + p221: cM, + p222: cN, + p223: cO, + p224: cP, + p225: cQ, + p226: cR, + p227: cS, + p228: cT, + p229: cU, + p230: cV, + p231: cW, + p232: cX, + p233: cY, + p234: cZ, + p235: c$, + p236: c_, + p237: c0, + p238: c1, + p239: c2, + p240: c3, + p241: c4, + p242: c5, + p243: c6, + p244: c7, + p245: c8, + p246: c9, + p247: da, + p248: db, + p249: dc, + p250: dd, + p251: de, + p252: df, + p253: dg, + p254: dh, + p255: di, + p256: dj, + p257: dk, + p258: dl, + p259: dm, + p260: dn, + p261: dp, + p262: dq, + p263: dr, + p264: ds, + p265: dt, + p266: du, + p267: dv, + p268: dw, + p269: dx, + p270: dy, + p271: dz, + p272: dA, + p273: dB, + p274: dC, + p275: dD, + p276: dE, + p277: dF, + p278: dG, + p279: dH, + p280: dI, + p281: dJ, + p282: dK, + p283: dL, + p284: dM, + p285: dN, + p286: dO, + p287: dP, + p288: dQ, + p289: dR, + p290: dS, + p291: dT, + p292: dU, + p293: dV, + p294: dW, + p295: dX, + p296: dY, + p297: dZ, + p298: d$, + p299: d_, + p300: d0, + p301: d1, + p302: d2, + p303: d3, + p304: d4, + p305: d5, + p306: d6, + p307: d7, + p308: d8, + p309: d9, + p310: ea, + p311: eb, + p312: ec, + p313: ed, + p314: ee, + p315: ef, + p316: eg, + p317: eh, + p318: ei, + p319: ej, + p320: ek, + p321: el, + p322: em, + p323: en, + p324: eo, + p325: ep, + p326: eq, + p327: er, + p328: es, + p329: et, + p330: eu, + p331: ev, + p332: ew, + p333: ex, + p334: ey, + p335: ez, + p336: eA, + p337: eB, + p338: eC, + p339: eD, + p340: eE, + p341: eF, + p342: eG, + p343: eH, + p344: eI, + p345: eJ, + p346: eK, + p347: eL, + p348: eM, + p349: eN, + p350: eO, + p351: eP, + p352: eQ, + p353: eR, + p354: eS, + p355: eT, + p356: eU, + p357: eV, + p358: eW, + p359: eX, + p360: eY, + p361: eZ, + p362: e$, + p363: e_, + p364: e0, + p365: e1, + p366: e2, + p367: e3, + p368: e4, + p369: e5, + p370: e6, + p371: e7, + p372: e8, + p373: e9, + p374: fa, + p375: fb, + p376: fc, + p377: fd, + p378: fe, + p379: ff, + p380: fg, + p381: fh, + p382: fi, + p383: fj, + p384: fk, + p385: fl, + p386: fm, + p387: fn, + p388: fo, + p389: fp, + p390: fq, + p391: fr, + p392: fs, + p393: ft, + p394: fu, + p395: fv, + p396: fw, + p397: fx, + p398: fy, + p399: fz, + p400: fA, + p401: fB, + p402: fC, + p403: fD, + p404: fE, + p405: fF, + p406: fG, + p407: fH, + p408: fI, + p409: fJ, + p410: fK, + p411: fL, + p412: fM, + p413: fN, + p414: fO, + p415: fP, + p416: fQ, + p417: fR, + p418: fS, + p419: fT, + p420: fU, + p421: fV, + p422: fW, + p423: fX, + p424: fY, + p425: fZ, + p426: f$, + p427: f_, + p428: f0, + p429: f1, + p430: f2, + p431: f3, + p432: f4, + p433: f5, + p434: f6, + p435: f7, + p436: f8, + p437: f9, + p438: ga, + p439: gb, + p440: gc, + p441: gd, + p442: ge, + p443: gf, + p444: gg, + p445: gh, + p446: gi, + p447: gj, + p448: gk, + p449: gl, + p450: gm, + p451: gn, + p452: go, + p453: gp, + p454: gq, + p455: gr, + p456: gs, + p457: gt, + p458: gu, + p459: gv, + p460: gw, + p461: gx, + p462: gy, + p463: gz, + p464: gA, + p465: gB, + p466: gC, + p467: gD, + p468: gE, + p469: gF, + p470: gG, + p471: gH, + p472: gI, + p473: gJ, + p474: gK, + p475: gL, + p476: gM, + p477: gN, + p478: gO, + p479: gP, + p480: gQ, + p481: gR, + p482: gS, + p483: gT, + p484: gU, + p485: gV, + p486: gW, + p487: gX, + p488: gY, + p489: gZ, + p490: g$, + p491: g_, + p492: g0, + p493: g1, + p494: g2, + p495: g3, + p496: g4, + p497: g5, + p498: g6, + p499: g7, + p500: g8 + }; + console.log(a[1][0].a, b[1][0].a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_const/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_const/output.mangleOnly.js new file mode 100644 index 00000000000..d17e3096013 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_const/output.mangleOnly.js @@ -0,0 +1,205 @@ +(function() { + const a = [ + 4, + [ + { + a: -1, + b: 5 + } + ] + ]; + const c = [ + 4, + [ + { + a: -2, + b: 5 + } + ] + ]; + const d = [ + 4, + [ + { + a: -3, + b: 5 + } + ] + ]; + const e = [ + 4, + [ + { + a: -4, + b: 5 + } + ] + ]; + const f = [ + 4, + [ + { + a: -5, + b: 5 + } + ] + ]; + const g = [ + 4, + [ + { + a: -6, + b: 5 + } + ] + ]; + const h = [ + 4, + [ + { + a: -7, + b: 5 + } + ] + ]; + const i = [ + 4, + [ + { + a: -8, + b: 5 + } + ] + ]; + const j = [ + 4, + [ + { + a: -9, + b: 5 + } + ] + ]; + const b = [ + 4, + [ + { + a: -10, + b: 5 + } + ] + ]; + const k = [ + 4, + [ + { + a: -11, + b: 5 + } + ] + ]; + const l = [ + 4, + [ + { + a: -12, + b: 5 + } + ] + ]; + const m = [ + 4, + [ + { + a: -13, + b: 5 + } + ] + ]; + const n = [ + 4, + [ + { + a: -14, + b: 5 + } + ] + ]; + const o = [ + 4, + [ + { + a: -15, + b: 5 + } + ] + ]; + const p = [ + 4, + [ + { + a: -16, + b: 5 + } + ] + ]; + const q = [ + 4, + [ + { + a: -17, + b: 5 + } + ] + ]; + const r = [ + 4, + [ + { + a: -18, + b: 5 + } + ] + ]; + const s = [ + 4, + [ + { + a: -19, + b: 5 + } + ] + ]; + const t = [ + 4, + [ + { + a: -20, + b: 5 + } + ] + ]; + const u = { + p1: a, + p2: c, + p3: d, + p4: e, + p5: f, + p6: g, + p7: h, + p8: i, + p9: j, + p10: b, + p11: k, + p12: l, + p13: m, + p14: n, + p15: o, + p16: p, + p17: q, + p18: r, + p19: s, + p20: t + }; + console.log(a[1][0].a, b[1][0].a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_let/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_let/output.mangleOnly.js new file mode 100644 index 00000000000..11493ba8320 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_t50/issue_t50_let/output.mangleOnly.js @@ -0,0 +1,205 @@ +(function() { + let a = [ + 4, + [ + { + a: -1, + b: 5 + } + ] + ]; + let c = [ + 4, + [ + { + a: -2, + b: 5 + } + ] + ]; + let d = [ + 4, + [ + { + a: -3, + b: 5 + } + ] + ]; + let e = [ + 4, + [ + { + a: -4, + b: 5 + } + ] + ]; + let f = [ + 4, + [ + { + a: -5, + b: 5 + } + ] + ]; + let g = [ + 4, + [ + { + a: -6, + b: 5 + } + ] + ]; + let h = [ + 4, + [ + { + a: -7, + b: 5 + } + ] + ]; + let i = [ + 4, + [ + { + a: -8, + b: 5 + } + ] + ]; + let j = [ + 4, + [ + { + a: -9, + b: 5 + } + ] + ]; + let b = [ + 4, + [ + { + a: -10, + b: 5 + } + ] + ]; + let k = [ + 4, + [ + { + a: -11, + b: 5 + } + ] + ]; + let l = [ + 4, + [ + { + a: -12, + b: 5 + } + ] + ]; + let m = [ + 4, + [ + { + a: -13, + b: 5 + } + ] + ]; + let n = [ + 4, + [ + { + a: -14, + b: 5 + } + ] + ]; + let o = [ + 4, + [ + { + a: -15, + b: 5 + } + ] + ]; + let p = [ + 4, + [ + { + a: -16, + b: 5 + } + ] + ]; + let q = [ + 4, + [ + { + a: -17, + b: 5 + } + ] + ]; + let r = [ + 4, + [ + { + a: -18, + b: 5 + } + ] + ]; + let s = [ + 4, + [ + { + a: -19, + b: 5 + } + ] + ]; + let t = [ + 4, + [ + { + a: -20, + b: 5 + } + ] + ]; + let u = { + p1: a, + p2: c, + p3: d, + p4: e, + p5: f, + p6: g, + p7: h, + p8: i, + p9: j, + p10: b, + p11: k, + p12: l, + p13: m, + p14: n, + p15: o, + p16: p, + p17: q, + p18: r, + p19: s, + p20: t + }; + console.log(a[1][0].a, b[1][0].a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_mixed/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_mixed/output.mangleOnly.js new file mode 100644 index 00000000000..40d09a017c6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_mixed/output.mangleOnly.js @@ -0,0 +1,4 @@ +var b = ""; +for(let a = 0; a < netmaskBits; ++a){ + b += "1"; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_vars/output.mangleOnly.js new file mode 100644 index 00000000000..a70c35a3d92 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/issue_1079_with_vars/output.mangleOnly.js @@ -0,0 +1,4 @@ +var b = ""; +for(var a = 0; a < netmaskBits; ++a){ + b += "1"; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/join_vars/only_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/only_vars/output.mangleOnly.js new file mode 100644 index 00000000000..5ff1f4171d9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/join_vars/only_vars/output.mangleOnly.js @@ -0,0 +1,4 @@ +let b = ""; +for(let a = 0; a < netmaskBits; ++a){ + b += "1"; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_classnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_classnames/output.mangleOnly.js new file mode 100644 index 00000000000..95aed6cc452 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_classnames/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + class a { + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_fnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_fnames/output.mangleOnly.js new file mode 100644 index 00000000000..f64c39e2277 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/drop_fnames/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + function a() { + return "foobar"; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_classnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_classnames/output.mangleOnly.js new file mode 100644 index 00000000000..95aed6cc452 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_classnames/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + class a { + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames/output.mangleOnly.js new file mode 100644 index 00000000000..f64c39e2277 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + function a() { + return "foobar"; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames_and_avoid_collisions/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames_and_avoid_collisions/output.mangleOnly.js new file mode 100644 index 00000000000..c3273676808 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_fnames_and_avoid_collisions/output.mangleOnly.js @@ -0,0 +1,9 @@ +global.t = "ttttttttttttttttttttt"; +(function a() { + var b = "PASS"; + return ()=>{ + console.log(b); + var a = function() {}; + return a; + }; +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_classnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_classnames/output.mangleOnly.js new file mode 100644 index 00000000000..9d70ee84680 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_classnames/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + class a { + } + class b { + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames/output.mangleOnly.js new file mode 100644 index 00000000000..dcc17227a64 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + function a() {} + function b() {} +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames_reduce/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames_reduce/output.mangleOnly.js new file mode 100644 index 00000000000..eb3adbafd30 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_some_fnames_reduce/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + var a = []; + function d() {} + a.map(d); + function e() {} + a.map(e); + var b = ()=>{}; + a.map(b); + a.map(b); + var c = function() {}; + a.map(c); + a.map(c); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_var_fnames/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_var_fnames/output.mangleOnly.js new file mode 100644 index 00000000000..bd5d6fe7f07 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_names/keep_var_fnames/output.mangleOnly.js @@ -0,0 +1,4 @@ +const a = function() { + return "barfoo"; +}; +const b = ()=>"foobar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/keep_quoted_strict/keep_quoted_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/keep_quoted_strict/keep_quoted_strict/output.mangleOnly.js new file mode 100644 index 00000000000..870fcaea343 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/keep_quoted_strict/keep_quoted_strict/output.mangleOnly.js @@ -0,0 +1,30 @@ +var a = { + propa: 1, + get propb () { + return 2; + }, + propc: 3, + get propd () { + return 4; + } +}; +var b = { + propa: 5, + get propb () { + return 6; + }, + propc: 7, + get propd () { + return 8; + } +}; +var c = {}; +Object.defineProperty(c, "propa", { + value: 9 +}); +Object.defineProperty(c, "propc", { + value: 10 +}); +console.log(a.propa, a.propb, a.propc, a["propc"], a.propd, a["propd"]); +console.log(b["propa"], b["propb"], b.propc, b["propc"], b.propd, b["propd"]); +console.log(c.propa, c["propc"]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_1/output.mangleOnly.js new file mode 100644 index 00000000000..2e8e30d74e9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +out: { + if (foo) break out; + console.log("bar"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_10/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_10/output.mangleOnly.js new file mode 100644 index 00000000000..5eaa7eebba7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_10/output.mangleOnly.js @@ -0,0 +1,7 @@ +out: while(foo){ + x(); + y(); + break out; + z(); + k(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_2/output.mangleOnly.js new file mode 100644 index 00000000000..2867055ce32 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +out: { + if (foo) print("stuff"); + else break out; + console.log("here"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_3/output.mangleOnly.js new file mode 100644 index 00000000000..933b9fb01e8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_3/output.mangleOnly.js @@ -0,0 +1,4 @@ +for(var a = 0; a < 5; ++a){ + if (a < 3) continue; + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_4/output.mangleOnly.js new file mode 100644 index 00000000000..13eb39a40ad --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_4/output.mangleOnly.js @@ -0,0 +1,4 @@ +out: for(var a = 0; a < 5; ++a){ + if (a < 3) continue out; + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_5/output.mangleOnly.js new file mode 100644 index 00000000000..eb9c418d4b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_5/output.mangleOnly.js @@ -0,0 +1,8 @@ +while(foo){ + if (bar) break; + console.log("foo"); +} +out: while(foo){ + if (bar) break out; + console.log("foo"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_6/output.mangleOnly.js new file mode 100644 index 00000000000..ac772d04bcf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_6/output.mangleOnly.js @@ -0,0 +1 @@ +out: break out; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_7/output.mangleOnly.js new file mode 100644 index 00000000000..f0479963a0e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_7/output.mangleOnly.js @@ -0,0 +1,5 @@ +while(foo){ + x(); + y(); + continue; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_8/output.mangleOnly.js new file mode 100644 index 00000000000..e6f25cab0fc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_8/output.mangleOnly.js @@ -0,0 +1,5 @@ +while(foo){ + x(); + y(); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_9/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_9/output.mangleOnly.js new file mode 100644 index 00000000000..f7b28a388f8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/labels/labels_9/output.mangleOnly.js @@ -0,0 +1,7 @@ +out: while(foo){ + x(); + y(); + continue out; + z(); + k(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part/output.mangleOnly.js new file mode 100644 index 00000000000..4c093050df5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = "PASS"; +var b = null; +var c = { + prop: null +}; +b &&= console.log((a = "FAIL")); +c.prop &&= console.log((a = "FAIL")); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part_reused/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part_reused/output.mangleOnly.js new file mode 100644 index 00000000000..dae2fa8cecc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assign_in_conditional_part_reused/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = "PASS"; +var b = null; +var c = { + prop: null +}; +b &&= console.log((a = "FAIL")); +c.prop &&= console.log((a = "FAIL")); +console.log(a, b, c.prop); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assignment_in_left_part_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assignment_in_left_part_2/output.mangleOnly.js new file mode 100644 index 00000000000..eb5aa292833 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/assignment_in_left_part_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = "FAIL"; +var b = { + PASS: false +}; +b[(a = id("PASS"))] ||= "PASS"; +console.log(a, b.PASS); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/logical_assignment_not_always_happens/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/logical_assignment_not_always_happens/output.mangleOnly.js new file mode 100644 index 00000000000..30f9c1ac1a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/logical_assignment_not_always_happens/output.mangleOnly.js @@ -0,0 +1,4 @@ +let a = "PASS"; +let b; +b &&= a = "FAIL"; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment/output.mangleOnly.js new file mode 100644 index 00000000000..9a0b83040a0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = null; +var b = null; +var c = "FAIL"; +a ||= "PASS"; +b ??= "PASS"; +c &&= "PASS"; +console.log(a, b, c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment_inv/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment_inv/output.mangleOnly.js new file mode 100644 index 00000000000..f2473ba59a2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/logical_assignment/prematurely_evaluate_assignment_inv/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "PASS"; +var b = "PASS"; +var c = "FAIL"; +a ||= "FAIL"; +b ??= "FAIL"; +c &&= "PASS"; +console.log(a, b, c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/dead_code_condition/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/dead_code_condition/output.mangleOnly.js new file mode 100644 index 00000000000..158344ac6f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/dead_code_condition/output.mangleOnly.js @@ -0,0 +1,6 @@ +for(var a = 0, b = 5; ((a += 1), 3) - 3 && b > 0; b--){ + var c = (function() { + b--; + })(a++); +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/do_switch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/do_switch/output.mangleOnly.js new file mode 100644 index 00000000000..057a87f5409 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/do_switch/output.mangleOnly.js @@ -0,0 +1,6 @@ +do { + switch(a){ + case b: + continue; + } +}while (false) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_1/output.mangleOnly.js new file mode 100644 index 00000000000..a2d2f7fea98 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_1/output.mangleOnly.js @@ -0,0 +1 @@ +for(;;)if (foo()) break; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_2/output.mangleOnly.js new file mode 100644 index 00000000000..c482fe1473d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_2/output.mangleOnly.js @@ -0,0 +1 @@ +for(; bar();)if (foo()) break; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_3/output.mangleOnly.js new file mode 100644 index 00000000000..21fc44579a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_3/output.mangleOnly.js @@ -0,0 +1,5 @@ +for(; bar();){ + if (foo()) break; + stuff1(); + stuff2(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_4/output.mangleOnly.js new file mode 100644 index 00000000000..a6d60386446 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_break_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +for(; bar();){ + x(); + y(); + if (foo()) break; + z(); + k(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_1/output.mangleOnly.js new file mode 100644 index 00000000000..76834ff4bf0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +for(;;)if (foo()) bar(); +else break; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_2/output.mangleOnly.js new file mode 100644 index 00000000000..cc753a9173a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +for(; bar();){ + if (foo()) baz(); + else break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_3/output.mangleOnly.js new file mode 100644 index 00000000000..f90c7263e44 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +for(; bar();){ + if (foo()) baz(); + else break; + stuff1(); + stuff2(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_4/output.mangleOnly.js new file mode 100644 index 00000000000..25b2f8bb618 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/drop_if_else_break_4/output.mangleOnly.js @@ -0,0 +1,8 @@ +for(; bar();){ + x(); + y(); + if (foo()) baz(); + else break; + z(); + k(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..4aec6decf59 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/evaluate/output.mangleOnly.js @@ -0,0 +1,12 @@ +while(true){ + a(); +} +while(false){ + b(); +} +do { + c(); +}while (true) +do { + d(); +}while (false) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_1/output.mangleOnly.js new file mode 100644 index 00000000000..5eaca9aea2d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_1/output.mangleOnly.js @@ -0,0 +1 @@ +for(("foo" in {}); 0;); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_2/output.mangleOnly.js new file mode 100644 index 00000000000..97230846562 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/in_parenthesis_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +for(function() { + ("foo" in {}); +}; 0;); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/init_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/init_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..88d7efe0d87 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/init_side_effects/output.mangleOnly.js @@ -0,0 +1,2 @@ +for((function() {})(), i = 0; i < 5; i++)console.log(i); +for((function() {})(); i < 10; i++)console.log(i); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1532/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1532/output.mangleOnly.js new file mode 100644 index 00000000000..5d9b1efa29e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1532/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a(a, b) { + do { + if (a) break; + foo(); + }while (false) +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1648/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1648/output.mangleOnly.js new file mode 100644 index 00000000000..8737137eea5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_1648/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + x(); + var a = 1; + while(1); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186/output.mangleOnly.js new file mode 100644 index 00000000000..81067415089 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 3; +if (foo()) do { + do { + alert(a); + }while (--a) +}while (a) +else bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify/output.mangleOnly.js new file mode 100644 index 00000000000..81067415089 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 3; +if (foo()) do { + do { + alert(a); + }while (--a) +}while (a) +else bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces/output.mangleOnly.js new file mode 100644 index 00000000000..8d3a283ecec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..8d3a283ecec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_braces_ie8/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..3840ffff780 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_beautify_ie8/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces/output.mangleOnly.js new file mode 100644 index 00000000000..8d3a283ecec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..8d3a283ecec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_braces_ie8/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else { + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..3840ffff780 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_186_ie8/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 3; +if (foo()) { + do { + do { + alert(a); + }while (--a) + }while (a) +} else bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_1/output.mangleOnly.js new file mode 100644 index 00000000000..38342375691 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_1/output.mangleOnly.js @@ -0,0 +1,8 @@ +for(;;)break; +for(a();;)break; +for(; b();)break; +for(c(); d();)break; +for(;; e())break; +for(f();; g())break; +for(; h(); i())break; +for(j(); k(); l())break; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_2/output.mangleOnly.js new file mode 100644 index 00000000000..d3a117d5d45 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +L1: while(x()){ + break L1; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_3/output.mangleOnly.js new file mode 100644 index 00000000000..90ea768ef34 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +L1: for(var a = 0; a < 3; a++){ + L2: for(var b = 0; b < 2; b++){ + break L1; + } +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_4/output.mangleOnly.js new file mode 100644 index 00000000000..7ab542039e9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +L1: for(var a = 0; a < 3; a++){ + L2: for(var b = 0; b < 2; b++){ + break L2; + } +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_5/output.mangleOnly.js new file mode 100644 index 00000000000..148587aa6c9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_5/output.mangleOnly.js @@ -0,0 +1,7 @@ +L1: for(var a = 0; a < 3; a++){ + break L1; + L2: for(var b = 0; b < 2; b++){ + break L2; + } +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_6/output.mangleOnly.js new file mode 100644 index 00000000000..ad8f67db657 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_6/output.mangleOnly.js @@ -0,0 +1,3 @@ +const b = 9, a = 0; +for(const c = 1; c < 3; ++a)break; +console.log(b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_7/output.mangleOnly.js new file mode 100644 index 00000000000..d6596c15af4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_7/output.mangleOnly.js @@ -0,0 +1,3 @@ +let b = 9, a = 0; +for(const c = 1; c < 3; ++a)break; +console.log(b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_8/output.mangleOnly.js new file mode 100644 index 00000000000..c2fbf377be5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2740_8/output.mangleOnly.js @@ -0,0 +1,3 @@ +var b = 9, a = 0; +for(const c = 1; c < 3; ++a)break; +console.log(b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2904/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2904/output.mangleOnly.js new file mode 100644 index 00000000000..05f29e4f626 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/issue_2904/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 1; +do { + console.log(a); +}while (--a) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope/output.mangleOnly.js new file mode 100644 index 00000000000..1b9f434933c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 2; +const b = 5; +while(a--)console.log(a); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope_2/output.mangleOnly.js new file mode 100644 index 00000000000..58b67006ab8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/keep_collapse_const_in_own_block_scope_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +const b = 5; +var a = 2; +while(a--)console.log(a); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_with_semicolon/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_with_semicolon/output.mangleOnly.js new file mode 100644 index 00000000000..efab958cc51 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_with_semicolon/output.mangleOnly.js @@ -0,0 +1,4 @@ +do { + x(); +}while (false) +y(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_without_semicolon/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_without_semicolon/output.mangleOnly.js new file mode 100644 index 00000000000..efab958cc51 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/parse_do_while_without_semicolon/output.mangleOnly.js @@ -0,0 +1,4 @@ +do { + x(); +}while (false) +y(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/loops/while_becomes_for/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/loops/while_becomes_for/output.mangleOnly.js new file mode 100644 index 00000000000..6a9a9917ae0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/loops/while_becomes_for/output.mangleOnly.js @@ -0,0 +1 @@ +while(foo())bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/just_enough/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/just_enough/output.mangleOnly.js new file mode 100644 index 00000000000..5b359b2ec70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/just_enough/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a) { + return { + c: 42, + d: a(), + e: "foo" + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/too_short/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/too_short/output.mangleOnly.js new file mode 100644 index 00000000000..5b359b2ec70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/max_line_len/too_short/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a) { + return { + c: 42, + d: a(), + e: "foo" + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_false/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_false/output.mangleOnly.js new file mode 100644 index 00000000000..a39567de33d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_false/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_nested/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_nested/output.mangleOnly.js new file mode 100644 index 00000000000..c328a6b7c52 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_nested/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()()()()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_true/output.mangleOnly.js new file mode 100644 index 00000000000..a39567de33d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1254_negate_iife_true/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288/output.mangleOnly.js new file mode 100644 index 00000000000..a0040673369 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288/output.mangleOnly.js @@ -0,0 +1,13 @@ +if (w) ; +else { + (function a() {})(); +} +if (!x) { + (function() { + x = {}; + })(); +} +if (y) (function() {})(); +else (function(a) { + return a; +})(0); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..a0040673369 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/issue_1288_side_effects/output.mangleOnly.js @@ -0,0 +1,13 @@ +if (w) ; +else { + (function a() {})(); +} +if (!x) { + (function() { + x = {}; + })(); +} +if (y) (function() {})(); +else (function(a) { + return a; +})(0); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1/output.mangleOnly.js new file mode 100644 index 00000000000..af6c1b4de02 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + stuff(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1_off/output.mangleOnly.js new file mode 100644 index 00000000000..af6c1b4de02 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_1_off/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + stuff(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2/output.mangleOnly.js new file mode 100644 index 00000000000..883c407464e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return {}; +})().x = 10; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..883c407464e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_2_side_effects/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return {}; +})().x = 10; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3/output.mangleOnly.js new file mode 100644 index 00000000000..8147a91b99e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..fa66b0387ff --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_evaluate/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return true; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off/output.mangleOnly.js new file mode 100644 index 00000000000..8147a91b99e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..fa66b0387ff --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_off_evaluate/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return true; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..8147a91b99e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_3_side_effects/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_4/output.mangleOnly.js new file mode 100644 index 00000000000..cfd609cfd07 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +(function() { + return t; +})() ? console.log(true) : console.log(false); +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5/output.mangleOnly.js new file mode 100644 index 00000000000..473b6f10e7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5/output.mangleOnly.js @@ -0,0 +1,10 @@ +if ((function() { + return t; +})()) { + foo(true); +} else { + bar(false); +} +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5_off/output.mangleOnly.js new file mode 100644 index 00000000000..473b6f10e7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_5_off/output.mangleOnly.js @@ -0,0 +1,10 @@ +if ((function() { + return t; +})()) { + foo(true); +} else { + bar(false); +} +(function() { + console.log("something"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_issue_1073/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_issue_1073/output.mangleOnly.js new file mode 100644 index 00000000000..98d31023cd5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_issue_1073/output.mangleOnly.js @@ -0,0 +1,6 @@ +new ((function(a) { + return function b() { + this.x = a; + console.log(this); + }; +})(7))(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested/output.mangleOnly.js new file mode 100644 index 00000000000..89beabaed9c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(a) { + this.f = a; +} +new a(function() { + (function(a) { + (function(a) { + console.log(a); + })(a); + })(7); +}).f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested_off/output.mangleOnly.js new file mode 100644 index 00000000000..89beabaed9c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/negate_iife_nested_off/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(a) { + this.f = a; +} +new a(function() { + (function(a) { + (function(a) { + console.log(a); + })(a); + })(7); +}).f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/sequence_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/sequence_off/output.mangleOnly.js new file mode 100644 index 00000000000..3828408ad86 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/negate_iife/sequence_off/output.mangleOnly.js @@ -0,0 +1,16 @@ +function a() { + (function() { + return t; + })() ? console.log(true) : console.log(false); + (function() { + console.log("something"); + })(); +} +function b() { + (function() { + console.log("something"); + })(); + (function() { + return t; + })() ? console.log(true) : console.log(false); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/call_with_unary_arguments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/call_with_unary_arguments/output.mangleOnly.js new file mode 100644 index 00000000000..77d0b7dcf6e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/call_with_unary_arguments/output.mangleOnly.js @@ -0,0 +1,6 @@ +x(); +x(-1); +x(-1, -2); +x(void 1, +2, -3, ~4, !5, --a, ++b, c--, d++, typeof e, delete f); +(-1)(); +(-1)(-2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_1/output.mangleOnly.js new file mode 100644 index 00000000000..8ce47b72a74 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(new (Math.random().constructor)() instanceof Number); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_2/output.mangleOnly.js new file mode 100644 index 00000000000..fab1edaa6cb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/dot_parenthesis_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(typeof new function() { + Math.random(); +}.constructor()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_constructor_with_unary_arguments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_constructor_with_unary_arguments/output.mangleOnly.js new file mode 100644 index 00000000000..162f621bfa4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_constructor_with_unary_arguments/output.mangleOnly.js @@ -0,0 +1,7 @@ +new x(); +new x(-1); +new x(-1, -2); +new x(void 1, +2, -3, ~4, !5, --a, ++b, c--, d++, typeof e, delete f); +new (-1)(); +new (-1)(); +new (-1)(-2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_statement/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statement/output.mangleOnly.js new file mode 100644 index 00000000000..ef08fa89f56 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statement/output.mangleOnly.js @@ -0,0 +1,7 @@ +new x(1); +new x(1)(2); +new x(1)(2)(3); +new new x(1)(); +new new x(1)(2); +new new x(1)(2); +new new x(1)()(2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_2/output.mangleOnly.js new file mode 100644 index 00000000000..90dad7eb9ba --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +new x(); +new new x()(); +new new new x()()(); +new true(); +new 0(); +new (!0)(); +new (bar = function(a) { + this.foo = a; +})(123); +new (bar = function(a) { + this.foo = a; +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_3/output.mangleOnly.js new file mode 100644 index 00000000000..6fac4b50bef --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_statements_3/output.mangleOnly.js @@ -0,0 +1,12 @@ +new (function(a) { + this.foo = a; +})(1); +new (function(a) { + this.foo = a; +})(); +new (function b(a) { + this.foo = a; +})(1); +new (function b(a) { + this.foo = a; +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_assignement_expression/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_assignement_expression/output.mangleOnly.js new file mode 100644 index 00000000000..284804a265a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_assignement_expression/output.mangleOnly.js @@ -0,0 +1,14 @@ +var a; +new x((a = 5 * 2), (b = [ + 1, + 2, + 3 +]), (c = { + a: "a", + b: "b", + cd: "c" + "d" +})); +new y(([a, b] = [ + 3, + 4 +])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_many_parameters/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_many_parameters/output.mangleOnly.js new file mode 100644 index 00000000000..d9f265f41a3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_many_parameters/output.mangleOnly.js @@ -0,0 +1,2 @@ +new foo.bar("baz"); +new x(/123/, 456); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_rewritten_true_value/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_rewritten_true_value/output.mangleOnly.js new file mode 100644 index 00000000000..60682cd2dde --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_rewritten_true_value/output.mangleOnly.js @@ -0,0 +1 @@ +new true(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_unary_prefix/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_unary_prefix/output.mangleOnly.js new file mode 100644 index 00000000000..6f40025e18c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/new/new_with_unary_prefix/output.mangleOnly.js @@ -0,0 +1 @@ +var a = (+new Date()).toString(32); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/node_version/eval_let_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/node_version/eval_let_6/output.mangleOnly.js new file mode 100644 index 00000000000..3f81f1b8b01 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/node_version/eval_let_6/output.mangleOnly.js @@ -0,0 +1,2 @@ +eval("let a;"); +console.log(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing/output.mangleOnly.js new file mode 100644 index 00000000000..d3110af66f6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing/output.mangleOnly.js @@ -0,0 +1,2 @@ +const a = id("something"); +leak(a == null ? bar : a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing_2/output.mangleOnly.js new file mode 100644 index 00000000000..9d81c522660 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/conditional_to_nullish_coalescing_2/output.mangleOnly.js @@ -0,0 +1,10 @@ +const a = id("something"); +console.log("negative cases"); +a === null || a === null ? bar : a; +a === undefined || a === undefined ? bar : a; +a === null || a === undefined ? a : bar; +some_global === null || some_global === undefined ? bar : some_global; +console.log("positive cases"); +a === null || a === void 0 ? bar : a; +a === null || a === undefined ? bar : a; +a === undefined || a === null ? bar : a; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_boolean_context/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_boolean_context/output.mangleOnly.js new file mode 100644 index 00000000000..978be363d6b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_boolean_context/output.mangleOnly.js @@ -0,0 +1,9 @@ +if (null ?? unknown) { + pass(); +} +if (unknown ?? false) { + pass(); +} +if (4 + 4 ?? unknown) { + pass(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_mandatory_parens/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_mandatory_parens/output.mangleOnly.js new file mode 100644 index 00000000000..f69662679ce --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_mandatory_parens/output.mangleOnly.js @@ -0,0 +1,2 @@ +(x ?? y) || z; +x || (y ?? z); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_parens/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_parens/output.mangleOnly.js new file mode 100644 index 00000000000..851e0186409 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/nullish_coalescing_parens/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((false || null) ?? "PASS"); +console.log(null ?? (true && "PASS")); +console.log((null ?? 0) || "PASS"); +console.log(null || (null ?? "PASS")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/nullish/simplify_nullish_coalescing/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/nullish/simplify_nullish_coalescing/output.mangleOnly.js new file mode 100644 index 00000000000..b55b9995150 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/nullish/simplify_nullish_coalescing/output.mangleOnly.js @@ -0,0 +1,5 @@ +const a = id("one"); +const b = null; +const c = "two"; +console.log(b ?? a); +console.log(c ?? a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/comparisons/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/comparisons/output.mangleOnly.js new file mode 100644 index 00000000000..cc1ec359f2b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/comparisons/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(~x === 42, x % n === 42); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/compress_numbers/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/compress_numbers/output.mangleOnly.js new file mode 100644 index 00000000000..91a789bd324 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/compress_numbers/output.mangleOnly.js @@ -0,0 +1,6 @@ +const a = 1e3; +const b = 1e12; +const c = 1e-8; +const d = 0xe8d4a51001; +const e = 100000000001; +const f = 100.23002; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_1/output.mangleOnly.js new file mode 100644 index 00000000000..32bf90bd6c7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(x + 1 + 2, x * 1 * 2, +x + 1 + 2, 1 + x + 2 + 3, 1 | x | 2 | 3, 1 + x-- + 2 + 3, 1 + (x * y + 2) + 3, 1 + (2 + x + 3), 1 + (2 + ~x + 3), -y + (2 + ~x + 3), 1 & (2 & x & 3), 1 + (2 + (x |= 0) + 3)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_2/output.mangleOnly.js new file mode 100644 index 00000000000..6e89b26df79 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(x + 1 + 2, x * 1 * 2, +x + 1 + 2, 1 + x + 2 + 3, 1 | x | 2 | 3, 1 + x-- + 2 + 3, 1 + (x * y + 2) + 3, 1 + (2 + x + 3), 1 & (2 & x & 3), 1 + (2 + (x |= 0) + 3)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_3/output.mangleOnly.js new file mode 100644 index 00000000000..4a4c51384dd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_3/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(1 + Number(x) + 2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_4/output.mangleOnly.js new file mode 100644 index 00000000000..d310ce426c1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/evaluate_4/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(1 + +a, +a + 1, 1 + -a, -a + 1, +a + +b, +a + -b, -a + +b, -a + -b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/hex_numbers_in_parentheses_for_prototype_functions/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/hex_numbers_in_parentheses_for_prototype_functions/output.mangleOnly.js new file mode 100644 index 00000000000..da0cfc7ce10 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/hex_numbers_in_parentheses_for_prototype_functions/output.mangleOnly.js @@ -0,0 +1,10 @@ +-2; +(-2).toFixed(0); +2; +(2).toFixed(0); +0.2; +(0.2).toFixed(0); +2e-8; +(2e-8).toFixed(0); +0xde0b6b3a7640080; +(0xde0b6b3a7640080).toFixed(0); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/issue_1710/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/issue_1710/output.mangleOnly.js new file mode 100644 index 00000000000..8bd64706a0b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/issue_1710/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = {}; +console.log((a += 1) + -a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers/output.mangleOnly.js new file mode 100644 index 00000000000..279229904d0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers/output.mangleOnly.js @@ -0,0 +1,6 @@ +const a = 1000000000000; +const b = 0.00000001; +const c = 1000000000001; +const d = 100000000001; +const e = 100.23002; +const f = 1_000_000_000_000; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers_in_properties_as_is/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers_in_properties_as_is/output.mangleOnly.js new file mode 100644 index 00000000000..ad2e395c137 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/keep_numbers_in_properties_as_is/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = { + 1000000: 80000000000 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/no_number_function_transform_without_unsafe_math/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/no_number_function_transform_without_unsafe_math/output.mangleOnly.js new file mode 100644 index 00000000000..5ee085300a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/no_number_function_transform_without_unsafe_math/output.mangleOnly.js @@ -0,0 +1 @@ +Number(1234); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/number_function_transform_with_unsafe_math/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/number_function_transform_with_unsafe_math/output.mangleOnly.js new file mode 100644 index 00000000000..5ee085300a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/number_function_transform_with_unsafe_math/output.mangleOnly.js @@ -0,0 +1 @@ +Number(1234); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/numeric_separators/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/numeric_separators/output.mangleOnly.js new file mode 100644 index 00000000000..cbf5b9f6289 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/numeric_separators/output.mangleOnly.js @@ -0,0 +1,8 @@ +const a = 1e3; +const b = 1e6; +const c = 85; +const d = 342391; +const e = 3735928559; +const f = 1000.0001; +const g = _1000; +const h = -_1000; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/numbers/unary_binary_parenthesis/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/numbers/unary_binary_parenthesis/output.mangleOnly.js new file mode 100644 index 00000000000..dba1ac68614 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/numbers/unary_binary_parenthesis/output.mangleOnly.js @@ -0,0 +1,18 @@ +var a = [ + 0, + 1, + NaN, + Infinity, + null, + undefined, + true, + false, + "", + "foo", + /foo/ +]; +a.forEach(function(b) { + a.forEach(function(a) { + console.log(+(b * a), +(b / a), +(b % a), -(b * a), -(b / a), -(b % a)); + }); +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/allow_assignments_to_property_values/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/allow_assignments_to_property_values/output.mangleOnly.js new file mode 100644 index 00000000000..87e5197fa88 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/allow_assignments_to_property_values/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = ({ 123: a = 123 } = { + foo: "456" +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names/output.mangleOnly.js new file mode 100644 index 00000000000..b6163c351a4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names/output.mangleOnly.js @@ -0,0 +1,3 @@ +obj({ + ["x" + "x"]: 6 +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_1/output.mangleOnly.js new file mode 100644 index 00000000000..d3cf1b480ec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +obj({ + [1 + 1]: 2, + ["x" + "x"]: 6 +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_2/output.mangleOnly.js new file mode 100644 index 00000000000..e05f9a77247 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_evaluated_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = something(); +var b = { + [a] () { + return "blah"; + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..88bddf8a1a0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/computed_property_names_side_effects/output.mangleOnly.js @@ -0,0 +1,3 @@ +const a = { + [console.log("PASS")]: 42 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_generators/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_generators/output.mangleOnly.js new file mode 100644 index 00000000000..097de27469d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_generators/output.mangleOnly.js @@ -0,0 +1,11 @@ +x = { + *foo (a, b) { + return x; + } +}; +y = { + *foo ([{ a: a }]) { + yield a; + }, + bar () {} +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_method_to_prop_arrow/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_method_to_prop_arrow/output.mangleOnly.js new file mode 100644 index 00000000000..a04280a5c89 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_method_to_prop_arrow/output.mangleOnly.js @@ -0,0 +1,17 @@ +console.log({ + a: ()=>1 +}.a()); +console.log({ + a: ()=>2 +}.a()); +console.log({ + a () { + return 3; + } +}.a()); +console.log({ + a () { + return this.b; + }, + b: 4 +}.a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods/output.mangleOnly.js new file mode 100644 index 00000000000..484a78fa02b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods/output.mangleOnly.js @@ -0,0 +1,11 @@ +x = { + foo (a, b) { + return x; + } +}; +y = { + foo ([{ a: a }]) { + return a; + }, + bar () {} +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_keyword_names/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_keyword_names/output.mangleOnly.js new file mode 100644 index 00000000000..5f23d580013 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_keyword_names/output.mangleOnly.js @@ -0,0 +1,4 @@ +x = { + catch () {}, + throw () {} +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_mangle_props/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_mangle_props/output.mangleOnly.js new file mode 100644 index 00000000000..1b41a6c5fe6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_and_mangle_props/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + obj = { + _foo () { + return 1; + } + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property/output.mangleOnly.js new file mode 100644 index 00000000000..8a04d1f6083 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = { + [Symbol.iterator] () { + return {}; + }, + [1 + 2] () { + return 3; + }, + ["1" + "4"] () { + return 14; + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property2/output.mangleOnly.js new file mode 100644 index 00000000000..b71f8c4ab6e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_computed_property2/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = { + [[ + 1 + ]] () { + return "success"; + } +}; +doSomething(a[[ + 1 +]]()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_various_property_names/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_various_property_names/output.mangleOnly.js new file mode 100644 index 00000000000..08fbb357dc5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/concise_methods_with_various_property_names/output.mangleOnly.js @@ -0,0 +1,18 @@ +var a = "bar"; +var b = { + bar () { + return this.get; + }, + 5 () { + return "five"; + }, + 3925 () { + return "f five five"; + }, + five () { + return 5; + }, + 10 (a) { + this._ten = a; + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/convert_computed_props_to_regular_ones/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/convert_computed_props_to_regular_ones/output.mangleOnly.js new file mode 100644 index 00000000000..e3ff06f3873 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/convert_computed_props_to_regular_ones/output.mangleOnly.js @@ -0,0 +1,17 @@ +var a = { + ["hi"]: 0, + ["A" + 1]: 1, + [/B/]: 2, + [100 + 23]: 3, + [1 + 0.5]: 4, + [Math.PI]: 5, + [undefined]: 6, + [true]: 7, + [false]: 8, + [null]: 9, + [Infinity]: 10, + [NaN]: 11 +}; +for(var b in a){ + console.log(b, a[b]); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/dont_join_repeat_object_keys/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/dont_join_repeat_object_keys/output.mangleOnly.js new file mode 100644 index 00000000000..4b35584ea53 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/dont_join_repeat_object_keys/output.mangleOnly.js @@ -0,0 +1,4 @@ +const a = { + foo: 1 +}; +a.foo = 2; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter/output.mangleOnly.js new file mode 100644 index 00000000000..0763de96cc5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter/output.mangleOnly.js @@ -0,0 +1,45 @@ +var a = "bar"; +var b = { + get: a, + set: "foo", + get bar () { + return this.get; + }, + get 5 () { + return "five"; + }, + get 3925 () { + return "f five five"; + }, + get five () { + return 5; + }, + set one (value){ + this._one = value; + }, + set 9 (value){ + this._nine = value; + }, + set 10 (value){ + this._ten = value; + }, + set eleven (value){ + this._eleven = value; + } +}; +var c = { + get () { + return "gift"; + }, + set: function(a) { + return "Storing code " + a; + } +}; +var d = { + ["get"]: "foo", + ["set"]: "bar" +}; +var e = { + get: "foo", + set: "bar" +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_mangler/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_mangler/output.mangleOnly.js new file mode 100644 index 00000000000..850b72c00f0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_mangler/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a(a, b) { + return { + get: a, + set: b, + get g () {}, + set s (n){}, + c, + a: 1, + m () {} + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_with_computed_value/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_with_computed_value/output.mangleOnly.js new file mode 100644 index 00000000000..92b6d45c6c2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/getter_setter_with_computed_value/output.mangleOnly.js @@ -0,0 +1,18 @@ +class b { + get ["a"]() { + return "A"; + } + set ["a"](b) { + do_something(a); + } +} +var c = { + get [a.b] () { + return 42; + } +}; +class d extends Array { + get [Symbol.species]() { + return Array; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_206/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_206/output.mangleOnly.js new file mode 100644 index 00000000000..e4d4c931970 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_206/output.mangleOnly.js @@ -0,0 +1,3 @@ +throw { + ["__proto__"]: 1 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_1/output.mangleOnly.js new file mode 100644 index 00000000000..71c02d8c17d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_1/output.mangleOnly.js @@ -0,0 +1,14 @@ +var a = { + ["x" + ""]: 1, + ["method" + ""] () { + this.s = "PASS"; + }, + get ["g" + ""] () { + return this.x; + }, + set ["s" + ""] (value){ + this.x = value; + } +}; +a.method(); +console.log(a.g); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_2/output.mangleOnly.js new file mode 100644 index 00000000000..74e7a5306b7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_2/output.mangleOnly.js @@ -0,0 +1,16 @@ +var a = new (class { + constructor(){ + this.x = 2; + } + ["method" + ""]() { + this.s = "PASS"; + } + get ["g" + ""]() { + return this.x; + } + set ["s" + ""](a) { + this.x = a; + } +})(); +a.method(); +console.log(a.g); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_3/output.mangleOnly.js new file mode 100644 index 00000000000..14cd1ceff1f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_3/output.mangleOnly.js @@ -0,0 +1,14 @@ +var a = { + [1 + 0]: 1, + [2 + 0] () { + this[4] = "PASS"; + }, + get [3 + 0] () { + return this[1]; + }, + set [4 + 0] (value){ + this[1] = value; + } +}; +a[2](); +console.log(a[3]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_4/output.mangleOnly.js new file mode 100644 index 00000000000..feb0b517331 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_4/output.mangleOnly.js @@ -0,0 +1,16 @@ +var a = new (class { + constructor(){ + this[1] = 2; + } + [2 + 0]() { + this[4] = "PASS"; + } + get [3 + 0]() { + return this[1]; + } + set [4 + 0](a) { + this[1] = a; + } +})(); +a[2](); +console.log(a[3]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_5/output.mangleOnly.js new file mode 100644 index 00000000000..7a363f1207f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/issue_2554_5/output.mangleOnly.js @@ -0,0 +1,8 @@ +new (class { + ["constructor"]() { + console.log("FAIL"); + } + constructor(){ + console.log("PASS"); + } +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/methods_and_getters_with_keep_quoted_props_enabled/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/methods_and_getters_with_keep_quoted_props_enabled/output.mangleOnly.js new file mode 100644 index 00000000000..4e95e54a0ec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/methods_and_getters_with_keep_quoted_props_enabled/output.mangleOnly.js @@ -0,0 +1,16 @@ +var a = { + a () {}, + b () {}, + get c () { + return "c"; + }, + get d () { + return "d"; + }, + set e (a){ + doSomething(a); + }, + set f (a){ + doSomething(b); + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_to_concise_method/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_to_concise_method/output.mangleOnly.js new file mode 100644 index 00000000000..badd59a8051 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_to_concise_method/output.mangleOnly.js @@ -0,0 +1,5 @@ +({ + run: ()=>{ + console.log("PASS"); + } +}.run()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_nested_this/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_nested_this/output.mangleOnly.js new file mode 100644 index 00000000000..fa962efb8d0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_nested_this/output.mangleOnly.js @@ -0,0 +1,26 @@ +function c(b) { + console.log(b === this ? "global" : b === a ? "foo" : b); +} +var a = { + func_func_this: function() { + (function() { + c(this); + })(); + }, + func_arrow_this: function() { + (()=>{ + c(this); + })(); + }, + arrow_func_this: ()=>{ + (function() { + c(this); + })(); + }, + arrow_arrow_this: ()=>{ + (()=>{ + c(this); + })(); + } +}; +for(var b in a)a[b](); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_this/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_this/output.mangleOnly.js new file mode 100644 index 00000000000..c4e38f56e0a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrow_with_this/output.mangleOnly.js @@ -0,0 +1,18 @@ +function c(b) { + console.log(b === this ? "global" : b === a ? "foo" : b); +} +var a = { + func_no_this: function() { + c(); + }, + func_with_this: function() { + c(this); + }, + arrow_no_this: ()=>{ + c(); + }, + arrow_with_this: ()=>{ + c(this); + } +}; +for(var b in a)a[b](); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrows_to_concise_method_various/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrows_to_concise_method_various/output.mangleOnly.js new file mode 100644 index 00000000000..ac10167c63a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_arrows_to_concise_method_various/output.mangleOnly.js @@ -0,0 +1,23 @@ +({ + null: (a, b)=>{ + a(b); + }, + 123: (a, b)=>{ + a(b); + }, + "A B": (a, b)=>{ + a(b); + }, + p1: (a, b)=>{ + a(b); + }, + p3: async (a, b)=>{ + await a(b); + }, + [c1]: (a, b)=>{ + a(b); + }, + [c3]: async (a, b)=>{ + await a(b); + } +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_async_concise_method/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_async_concise_method/output.mangleOnly.js new file mode 100644 index 00000000000..222fd972a3a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_async_concise_method/output.mangleOnly.js @@ -0,0 +1,5 @@ +({ + run: async function() { + console.log("PASS"); + } +}.run()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method/output.mangleOnly.js new file mode 100644 index 00000000000..8a27edf71c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method/output.mangleOnly.js @@ -0,0 +1,8 @@ +({ + emit: function a() { + console.log("PASS"); + }, + run: function() { + this.emit(); + } +}.run()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method_various/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method_various/output.mangleOnly.js new file mode 100644 index 00000000000..7838b4cdc35 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/prop_func_to_concise_method_various/output.mangleOnly.js @@ -0,0 +1,29 @@ +({ + null: function(a, b) { + a(b); + }, + 123: function(a, b) { + a(b); + }, + "A B": function(a, b) { + a(b); + }, + p1: function(a, b) { + a(b); + }, + p2: function*(a, b) { + yield a(b); + }, + p3: async function(a, b) { + await a(b); + }, + [c1]: function(a, b) { + a(b); + }, + [c2]: function*(a, b) { + yield a(b); + }, + [c3]: async function(a, b) { + await a(b); + } +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_operator_value/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_operator_value/output.mangleOnly.js new file mode 100644 index 00000000000..ac77ddffa82 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_operator_value/output.mangleOnly.js @@ -0,0 +1,30 @@ +var a = { + "*": 1, + get "*" () { + return 2; + }, + *"*" () { + return 3; + }, + "%": 1, + get "%" () { + return 2; + }, + *"%" () { + return 3; + } +}; +class b { + get "*"() { + return 1; + } + *"*"() { + return 2; + } + get "%"() { + return 1; + } + *"%"() { + return 2; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable/output.mangleOnly.js new file mode 100644 index 00000000000..894ae39ecef --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable/output.mangleOnly.js @@ -0,0 +1,23 @@ +var a = { + "\0": "foo", + get "\0" () { + return "bar"; + }, + set "\0" (foo){ + save(foo); + }, + *"\0" () { + return "foobar"; + } +}; +class b { + get "\0"() { + return "bar"; + } + set "\0"(a) { + save(a); + } + *"\0"() { + return "foobar"; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only/output.mangleOnly.js new file mode 100644 index 00000000000..449816dcc8a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only/output.mangleOnly.js @@ -0,0 +1,23 @@ +var a = { + "\0\x01": "foo", + get "\0\x01" () { + return "bar"; + }, + set "\0\x01" (foo){ + save(foo); + }, + *"\0\x01" () { + return "foobar"; + } +}; +class b { + get "\0\x01"() { + return "bar"; + } + set "\0\x01"(a) { + save(a); + } + *"\0\x01"() { + return "foobar"; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only_static/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only_static/output.mangleOnly.js new file mode 100644 index 00000000000..5c83ba98e7d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/property_with_unprintable_ascii_only_static/output.mangleOnly.js @@ -0,0 +1,8 @@ +class a { + static get "\x02\x03"() { + return "bar"; + } + static set "\x04\x05"(a) { + save(a); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/shorthand_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/shorthand_properties/output.mangleOnly.js new file mode 100644 index 00000000000..efc49345f8a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/shorthand_properties/output.mangleOnly.js @@ -0,0 +1,7 @@ +(function() { + var a = 1; + const b = { + prop: a + }; + return b; +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/use_shorthand_opportunity/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/use_shorthand_opportunity/output.mangleOnly.js new file mode 100644 index 00000000000..7560ccba759 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/use_shorthand_opportunity/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 123; +var b = { + foo: a +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/object/variable_as_computed_property/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/object/variable_as_computed_property/output.mangleOnly.js new file mode 100644 index 00000000000..a2e5a6675cd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/object/variable_as_computed_property/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(a) { + return { + [a]: {} + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_destructuring_async_word_with_default/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_destructuring_async_word_with_default/output.mangleOnly.js new file mode 100644 index 00000000000..800276caa13 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_destructuring_async_word_with_default/output.mangleOnly.js @@ -0,0 +1 @@ +console.log((({ async: a = "PASS" })=>a)({})); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_duplicated_parameters_in_non_strict_without_spread_or_default_assignment/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_duplicated_parameters_in_non_strict_without_spread_or_default_assignment/output.mangleOnly.js new file mode 100644 index 00000000000..ac921ec45ae --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/accept_duplicated_parameters_in_non_strict_without_spread_or_default_assignment/output.mangleOnly.js @@ -0,0 +1,2 @@ +function a(a, a) {} +function b({ c: a , c: a }) {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_functions/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_functions/output.mangleOnly.js new file mode 100644 index 00000000000..7819beada34 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_functions/output.mangleOnly.js @@ -0,0 +1,8 @@ +(a)=>b; +(a, e)=>c; +()=>b; +(a)=>(a)=>c; +(a)=>(a)=>c; +()=>(a, e)=>d; +(a)=>b; +(a)=>"lel"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_return/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_return/output.mangleOnly.js new file mode 100644 index 00000000000..2eab683fe7a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/arrow_return/output.mangleOnly.js @@ -0,0 +1,9 @@ +()=>{}; +()=>{}; +(a)=>1; +(a)=>-b; +(a)=>{ + return c; + var c; +}; +(a, c)=>a - c; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_arguments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_arguments/output.mangleOnly.js new file mode 100644 index 00000000000..75d909502cd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_arguments/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(a = 6) {} +function a(a = 6 + 5) {} +function a({ foo: a } = {}, [b] = [ + 1 +]) {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_values_in_destructurings/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_values_in_destructurings/output.mangleOnly.js new file mode 100644 index 00000000000..de4c0a244eb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/default_values_in_destructurings/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a({ a: a = 4 , b: b }) {} +function a([a, b = 12]) {} +var { x: a = 6 , y: b } = a; +var [a, b = 6] = a; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_1/output.mangleOnly.js new file mode 100644 index 00000000000..8df2db2058d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_1/output.mangleOnly.js @@ -0,0 +1,21 @@ +(function(a) {}); +(function([a]) {}); +(function([a, d]) {}); +(function([[a]]) {}); +(function([[a, d]]) {}); +(function([a, [d]]) {}); +(function([[a], d]) {}); +(function({ a: a }) {}); +(function({ a: a , b: d }) {}); +(function([{ a: a }]) {}); +(function([{ a: a , b: d }]) {}); +(function([a, { b: d }]) {}); +(function([{ b: a }, d]) {}); +([a])=>{}; +([a, d])=>{}; +({ a: a })=>{}; +({ a: a , b: d , c: e , d: f , e: g })=>{}; +([a])=>b; +([a, d])=>c; +({ a: a })=>b; +({ a: a , b: d })=>c; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_2/output.mangleOnly.js new file mode 100644 index 00000000000..c4147c645c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_2/output.mangleOnly.js @@ -0,0 +1,18 @@ +(function([]) {}); +(function({}) {}); +(function([]) {}); +(function([a, { b: b }]) {}); +(function([...a]) {}); +(function({ x: a }) {}); +class a { + *method({ [thrower()]: a } = {}) {} +} +(function(a, b, c, d, [{ e: [...e] , }, ]) {})(1, 2, 3, 4, [ + { + e: [ + 1, + 2, + 3 + ] + } +]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_3/output.mangleOnly.js new file mode 100644 index 00000000000..dc0560d22b8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/destructuring_arguments_3/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a({ x: { y: { z: {} = 42 } , } , }) {} +const { a: b = function() {} , b: c = (0, function() {}) } = {}; +let { c: d = function() {} , d: e = (0, function() {}) } = {}; +var { e: f = function() {} , f: g = (0, function() {}) } = {}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_arrow_functions_and_hoist/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_arrow_functions_and_hoist/output.mangleOnly.js new file mode 100644 index 00000000000..32f1a322821 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_arrow_functions_and_hoist/output.mangleOnly.js @@ -0,0 +1 @@ +(a)=>b; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_assign_arrow_functions/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_assign_arrow_functions/output.mangleOnly.js new file mode 100644 index 00000000000..167cc50f09c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/parameters/regression_assign_arrow_functions/output.mangleOnly.js @@ -0,0 +1,2 @@ +oninstall = (a)=>false; +oninstall = ()=>false; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_1/output.mangleOnly.js new file mode 100644 index 00000000000..ce97a0ff9fa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log({ + a: "FAIL", + get a () { + return "PASS"; + } +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_2/output.mangleOnly.js new file mode 100644 index 00000000000..b22da04e9ef --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +console.log({ + get a () { + return "PASS"; + }, + set a (v){}, + a: "FAIL" +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_boolean/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_boolean/output.mangleOnly.js new file mode 100644 index 00000000000..a99830a18d1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_boolean/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get true () { + return b; + }, + set false (c){ + b = c; + } +}; +console.log(a.true, (a.false = 2), a.true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_get_set/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_get_set/output.mangleOnly.js new file mode 100644 index 00000000000..b4c92908a80 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_get_set/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get set () { + return b; + }, + set get (c){ + b = c; + } +}; +console.log(a.set, (a.get = 2), a.set); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_null_undefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_null_undefined/output.mangleOnly.js new file mode 100644 index 00000000000..96c79c14dac --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_null_undefined/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get null () { + return b; + }, + set undefined (c){ + b = c; + } +}; +console.log(a.null, (a.undefined = 2), a.null); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_number/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_number/output.mangleOnly.js new file mode 100644 index 00000000000..52f8a8a2c2a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_number/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get 42 () { + return b; + }, + set 42 (c){ + b = c; + } +}; +console.log(a[42], (a[42] = 2), a[42]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_string/output.mangleOnly.js new file mode 100644 index 00000000000..0deb3d2f049 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_string/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get "a-b" () { + return b; + }, + set "a-b" (c){ + b = c; + } +}; +console.log(a["a-b"], (a["a-b"] = 2), a["a-b"]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_this/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_this/output.mangleOnly.js new file mode 100644 index 00000000000..1031880c3cc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/accessor_this/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1; +var a = { + get this () { + return b; + }, + set this (c){ + b = c; + } +}; +console.log(a.this, (a.this = 2), a.this); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/array_hole/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/array_hole/output.mangleOnly.js new file mode 100644 index 00000000000..98a5ae517c8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/array_hole/output.mangleOnly.js @@ -0,0 +1,16 @@ +console.log([ + 1, + 2, + , + 3 +][1], [ + 1, + 2, + , + 3 +][2], [ + 1, + 2, + , + 3 +][3]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/computed_property/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/computed_property/output.mangleOnly.js new file mode 100644 index 00000000000..7817a694f9d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/computed_property/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log({ + a: "bar", + [console.log("foo")]: 42 +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_pure/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_pure/output.mangleOnly.js new file mode 100644 index 00000000000..7f57aa7c0be --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_pure/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + /abc/.index = 1; + this._aircraft = []; +} +(function() {}.prototype.destroy = x()); +(class { +}.prototype.destroy = y()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_strict/output.mangleOnly.js new file mode 100644 index 00000000000..7f57aa7c0be --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/const_prop_assign_strict/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + /abc/.index = 1; + this._aircraft = []; +} +(function() {}.prototype.destroy = x()); +(class { +}.prototype.destroy = y()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_1/output.mangleOnly.js new file mode 100644 index 00000000000..ce8e892e012 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_1/output.mangleOnly.js @@ -0,0 +1,19 @@ +"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; +"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; +const b = Symbol("foo"); +const a = { + [b]: "bar", + baz: 1, + qux: 2, + [3 + 4]: "seven", + 0: "zero", + 1: "one", + null: "Null", + undefined: "Undefined", + Infinity: "infinity", + NaN: "nan", + void: "Void" +}; +console.log(a[b], a["baz"], a.qux, a[7], a[0], a[1 + 0], a[null], a[undefined], a[1 / 0], a[NaN], a.void); +console.log(a.null, a.undefined, a.Infinity, a.NaN); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_2/output.mangleOnly.js new file mode 100644 index 00000000000..d615ae60c3b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/dont_mangle_computed_property_2/output.mangleOnly.js @@ -0,0 +1,16 @@ +const b = Symbol("foo"); +const a = { + [b]: "bar", + baz: 1, + qux: 2, + [3 + 4]: "seven", + 0: "zero", + 1: "one", + null: "Null", + undefined: "Undefined", + Infinity: "infinity", + NaN: "nan", + void: "Void" +}; +console.log(a[b], a["baz"], a.qux, a[7], a[0], a[1 + 0], a[null], a[undefined], a[1 / 0], a[NaN], a.void); +console.log(a.null, a.undefined, a.Infinity, a.NaN); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties/output.mangleOnly.js new file mode 100644 index 00000000000..5dd1a18ea88 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties/output.mangleOnly.js @@ -0,0 +1,6 @@ +a["foo"] = "bar"; +a["if"] = "if"; +a["*"] = "asterisk"; +a["ຳ"] = "unicode"; +a[""] = "whitespace"; +a["1_1"] = "foo"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties_es5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties_es5/output.mangleOnly.js new file mode 100644 index 00000000000..587b52795ab --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/dot_properties_es5/output.mangleOnly.js @@ -0,0 +1,5 @@ +a["foo"] = "bar"; +a["if"] = "if"; +a["*"] = "asterisk"; +a["ຳ"] = "unicode"; +a[""] = "whitespace"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_array_length/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_array_length/output.mangleOnly.js new file mode 100644 index 00000000000..a5930db869d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_array_length/output.mangleOnly.js @@ -0,0 +1,20 @@ +a = [ + 1, + 2, + 3 +].length; +a = [ + 1, + 2, + 3 +].join()["len" + "gth"]; +a = [ + 1, + 2, + b +].length; +a = [ + 1, + 2, + 3 +].join(b).length; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_string_length/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_string_length/output.mangleOnly.js new file mode 100644 index 00000000000..7b79693d37b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/evaluate_string_length/output.mangleOnly.js @@ -0,0 +1,4 @@ +a = "foo".length; +a = ("foo" + "bar")["len" + "gth"]; +a = b.length; +a = ("foo" + b).length; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_chars_as_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_chars_as_properties/output.mangleOnly.js new file mode 100644 index 00000000000..b9123ff2e87 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_chars_as_properties/output.mangleOnly.js @@ -0,0 +1,258 @@ +var a = { + "\0": 0, + "\x01": 1, + "\x02": 2, + "\x03": 3, + "\x04": 4, + "\x05": 5, + "\x06": 6, + "\x07": 7, + "\b": 8, + "\t": 9, + "\n": 10, + "\v": 11, + "\f": 12, + "\r": 13, + "\x0e": 14, + "\x0f": 15, + "\x10": 16, + "\x11": 17, + "\x12": 18, + "\x13": 19, + "\x14": 20, + "\x15": 21, + "\x16": 22, + "\x17": 23, + "\x18": 24, + "\x19": 25, + "\x1a": 26, + "\x1b": 27, + "\x1c": 28, + "\x1d": 29, + "\x1e": 30, + "\x1f": 31, + " ": 32, + "!": 33, + '"': 34, + "#": 35, + $: 36, + "%": 37, + "&": 38, + "'": 39, + "(": 40, + ")": 41, + "*": 42, + "+": 43, + ",": 44, + "-": 45, + ".": 46, + "/": 47, + 0: 48, + 1: 49, + 2: 50, + 3: 51, + 4: 52, + 5: 53, + 6: 54, + 7: 55, + 8: 56, + 9: 57, + ":": 58, + ";": 59, + "<": 60, + "=": 61, + ">": 62, + "?": 63, + "@": 64, + A: 65, + B: 66, + C: 67, + D: 68, + E: 69, + F: 70, + G: 71, + H: 72, + I: 73, + J: 74, + K: 75, + L: 76, + M: 77, + N: 78, + O: 79, + P: 80, + Q: 81, + R: 82, + S: 83, + T: 84, + U: 85, + V: 86, + W: 87, + X: 88, + Y: 89, + Z: 90, + "[": 91, + "\\": 92, + "]": 93, + "^": 94, + _: 95, + "`": 96, + a: 97, + b: 98, + c: 99, + d: 100, + e: 101, + f: 102, + g: 103, + h: 104, + i: 105, + j: 106, + k: 107, + l: 108, + m: 109, + n: 110, + o: 111, + p: 112, + q: 113, + r: 114, + s: 115, + t: 116, + u: 117, + v: 118, + w: 119, + x: 120, + y: 121, + z: 122, + "{": 123, + "|": 124, + "}": 125, + "~": 126, + "\x7f": 127, + "\x80": 128, + "\x81": 129, + "\x82": 130, + "\x83": 131, + "\x84": 132, + "\x85": 133, + "\x86": 134, + "\x87": 135, + "\x88": 136, + "\x89": 137, + "\x8a": 138, + "\x8b": 139, + "\x8c": 140, + "\x8d": 141, + "\x8e": 142, + "\x8f": 143, + "\x90": 144, + "\x91": 145, + "\x92": 146, + "\x93": 147, + "\x94": 148, + "\x95": 149, + "\x96": 150, + "\x97": 151, + "\x98": 152, + "\x99": 153, + "\x9a": 154, + "\x9b": 155, + "\x9c": 156, + "\x9d": 157, + "\x9e": 158, + "\x9f": 159, + "\xa0": 160, + "\xa1": 161, + "\xa2": 162, + "\xa3": 163, + "\xa4": 164, + "\xa5": 165, + "\xa6": 166, + "\xa7": 167, + "\xa8": 168, + "\xa9": 169, + "\xaa": 170, + "\xab": 171, + "\xac": 172, + "\xad": 173, + "\xae": 174, + "\xaf": 175, + "\xb0": 176, + "\xb1": 177, + "\xb2": 178, + "\xb3": 179, + "\xb4": 180, + "\xb5": 181, + "\xb6": 182, + "\xb7": 183, + "\xb8": 184, + "\xb9": 185, + "\xba": 186, + "\xbb": 187, + "\xbc": 188, + "\xbd": 189, + "\xbe": 190, + "\xbf": 191, + "\xc0": 192, + "\xc1": 193, + "\xc2": 194, + "\xc3": 195, + "\xc4": 196, + "\xc5": 197, + "\xc6": 198, + "\xc7": 199, + "\xc8": 200, + "\xc9": 201, + "\xca": 202, + "\xcb": 203, + "\xcc": 204, + "\xcd": 205, + "\xce": 206, + "\xcf": 207, + "\xd0": 208, + "\xd1": 209, + "\xd2": 210, + "\xd3": 211, + "\xd4": 212, + "\xd5": 213, + "\xd6": 214, + "\xd7": 215, + "\xd8": 216, + "\xd9": 217, + "\xda": 218, + "\xdb": 219, + "\xdc": 220, + "\xdd": 221, + "\xde": 222, + "\xdf": 223, + "\xe0": 224, + "\xe1": 225, + "\xe2": 226, + "\xe3": 227, + "\xe4": 228, + "\xe5": 229, + "\xe6": 230, + "\xe7": 231, + "\xe8": 232, + "\xe9": 233, + "\xea": 234, + "\xeb": 235, + "\xec": 236, + "\xed": 237, + "\xee": 238, + "\xef": 239, + "\xf0": 240, + "\xf1": 241, + "\xf2": 242, + "\xf3": 243, + "\xf4": 244, + "\xf5": 245, + "\xf6": 246, + "\xf7": 247, + "\xf8": 248, + "\xf9": 249, + "\xfa": 250, + "\xfb": 251, + "\xfc": 252, + "\xfd": 253, + "\xfe": 254, + "\xff": 255 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_hex_chars_as_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_hex_chars_as_properties/output.mangleOnly.js new file mode 100644 index 00000000000..581cd8b2dec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_hex_chars_as_properties/output.mangleOnly.js @@ -0,0 +1,258 @@ +var a = { + "\0": 0, + "": 1, + "": 2, + "": 3, + "": 4, + "": 5, + "": 6, + "": 7, + "\b": 8, + "\t": 9, + "\n": 10, + "\v": 11, + "\f": 12, + "\r": 13, + "": 14, + "": 15, + "": 16, + "": 17, + "": 18, + "": 19, + "": 20, + "": 21, + "": 22, + "": 23, + "": 24, + "": 25, + "": 26, + "": 27, + "": 28, + "": 29, + "": 30, + "": 31, + " ": 32, + "!": 33, + '"': 34, + "#": 35, + $: 36, + "%": 37, + "&": 38, + "'": 39, + "(": 40, + ")": 41, + "*": 42, + "+": 43, + ",": 44, + "-": 45, + ".": 46, + "/": 47, + 0: 48, + 1: 49, + 2: 50, + 3: 51, + 4: 52, + 5: 53, + 6: 54, + 7: 55, + 8: 56, + 9: 57, + ":": 58, + ";": 59, + "<": 60, + "=": 61, + ">": 62, + "?": 63, + "@": 64, + A: 65, + B: 66, + C: 67, + D: 68, + E: 69, + F: 70, + G: 71, + H: 72, + I: 73, + J: 74, + K: 75, + L: 76, + M: 77, + N: 78, + O: 79, + P: 80, + Q: 81, + R: 82, + S: 83, + T: 84, + U: 85, + V: 86, + W: 87, + X: 88, + Y: 89, + Z: 90, + "[": 91, + "\\": 92, + "]": 93, + "^": 94, + _: 95, + "`": 96, + a: 97, + b: 98, + c: 99, + d: 100, + e: 101, + f: 102, + g: 103, + h: 104, + i: 105, + j: 106, + k: 107, + l: 108, + m: 109, + n: 110, + o: 111, + p: 112, + q: 113, + r: 114, + s: 115, + t: 116, + u: 117, + v: 118, + w: 119, + x: 120, + y: 121, + z: 122, + "{": 123, + "|": 124, + "}": 125, + "~": 126, + "": 127, + "€": 128, + "": 129, + "‚": 130, + "ƒ": 131, + "„": 132, + "…": 133, + "†": 134, + "‡": 135, + "ˆ": 136, + "‰": 137, + "Š": 138, + "‹": 139, + "Œ": 140, + "": 141, + "Ž": 142, + "": 143, + "": 144, + "‘": 145, + "’": 146, + "“": 147, + "”": 148, + "•": 149, + "–": 150, + "—": 151, + "˜": 152, + "™": 153, + "š": 154, + "›": 155, + "œ": 156, + "": 157, + "ž": 158, + "Ÿ": 159, + " ": 160, + "¡": 161, + "¢": 162, + "£": 163, + "¤": 164, + "¥": 165, + "¦": 166, + "§": 167, + "¨": 168, + "©": 169, + ª: 170, + "«": 171, + "¬": 172, + "­": 173, + "®": 174, + "¯": 175, + "°": 176, + "±": 177, + "²": 178, + "³": 179, + "´": 180, + µ: 181, + "¶": 182, + "·": 183, + "¸": 184, + "¹": 185, + º: 186, + "»": 187, + "¼": 188, + "½": 189, + "¾": 190, + "¿": 191, + À: 192, + Á: 193, + Â: 194, + Ã: 195, + Ä: 196, + Å: 197, + Æ: 198, + Ç: 199, + È: 200, + É: 201, + Ê: 202, + Ë: 203, + Ì: 204, + Í: 205, + Î: 206, + Ï: 207, + Ð: 208, + Ñ: 209, + Ò: 210, + Ó: 211, + Ô: 212, + Õ: 213, + Ö: 214, + "×": 215, + Ø: 216, + Ù: 217, + Ú: 218, + Û: 219, + Ü: 220, + Ý: 221, + Þ: 222, + ß: 223, + à: 224, + á: 225, + â: 226, + ã: 227, + ä: 228, + å: 229, + æ: 230, + ç: 231, + è: 232, + é: 233, + ê: 234, + ë: 235, + ì: 236, + í: 237, + î: 238, + ï: 239, + ð: 240, + ñ: 241, + ò: 242, + ó: 243, + ô: 244, + õ: 245, + ö: 246, + "÷": 247, + ø: 248, + ù: 249, + ú: 250, + û: 251, + ü: 252, + ý: 253, + þ: 254, + ÿ: 255 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_unicode_chars_as_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_unicode_chars_as_properties/output.mangleOnly.js new file mode 100644 index 00000000000..581cd8b2dec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/first_256_unicode_chars_as_properties/output.mangleOnly.js @@ -0,0 +1,258 @@ +var a = { + "\0": 0, + "": 1, + "": 2, + "": 3, + "": 4, + "": 5, + "": 6, + "": 7, + "\b": 8, + "\t": 9, + "\n": 10, + "\v": 11, + "\f": 12, + "\r": 13, + "": 14, + "": 15, + "": 16, + "": 17, + "": 18, + "": 19, + "": 20, + "": 21, + "": 22, + "": 23, + "": 24, + "": 25, + "": 26, + "": 27, + "": 28, + "": 29, + "": 30, + "": 31, + " ": 32, + "!": 33, + '"': 34, + "#": 35, + $: 36, + "%": 37, + "&": 38, + "'": 39, + "(": 40, + ")": 41, + "*": 42, + "+": 43, + ",": 44, + "-": 45, + ".": 46, + "/": 47, + 0: 48, + 1: 49, + 2: 50, + 3: 51, + 4: 52, + 5: 53, + 6: 54, + 7: 55, + 8: 56, + 9: 57, + ":": 58, + ";": 59, + "<": 60, + "=": 61, + ">": 62, + "?": 63, + "@": 64, + A: 65, + B: 66, + C: 67, + D: 68, + E: 69, + F: 70, + G: 71, + H: 72, + I: 73, + J: 74, + K: 75, + L: 76, + M: 77, + N: 78, + O: 79, + P: 80, + Q: 81, + R: 82, + S: 83, + T: 84, + U: 85, + V: 86, + W: 87, + X: 88, + Y: 89, + Z: 90, + "[": 91, + "\\": 92, + "]": 93, + "^": 94, + _: 95, + "`": 96, + a: 97, + b: 98, + c: 99, + d: 100, + e: 101, + f: 102, + g: 103, + h: 104, + i: 105, + j: 106, + k: 107, + l: 108, + m: 109, + n: 110, + o: 111, + p: 112, + q: 113, + r: 114, + s: 115, + t: 116, + u: 117, + v: 118, + w: 119, + x: 120, + y: 121, + z: 122, + "{": 123, + "|": 124, + "}": 125, + "~": 126, + "": 127, + "€": 128, + "": 129, + "‚": 130, + "ƒ": 131, + "„": 132, + "…": 133, + "†": 134, + "‡": 135, + "ˆ": 136, + "‰": 137, + "Š": 138, + "‹": 139, + "Œ": 140, + "": 141, + "Ž": 142, + "": 143, + "": 144, + "‘": 145, + "’": 146, + "“": 147, + "”": 148, + "•": 149, + "–": 150, + "—": 151, + "˜": 152, + "™": 153, + "š": 154, + "›": 155, + "œ": 156, + "": 157, + "ž": 158, + "Ÿ": 159, + " ": 160, + "¡": 161, + "¢": 162, + "£": 163, + "¤": 164, + "¥": 165, + "¦": 166, + "§": 167, + "¨": 168, + "©": 169, + ª: 170, + "«": 171, + "¬": 172, + "­": 173, + "®": 174, + "¯": 175, + "°": 176, + "±": 177, + "²": 178, + "³": 179, + "´": 180, + µ: 181, + "¶": 182, + "·": 183, + "¸": 184, + "¹": 185, + º: 186, + "»": 187, + "¼": 188, + "½": 189, + "¾": 190, + "¿": 191, + À: 192, + Á: 193, + Â: 194, + Ã: 195, + Ä: 196, + Å: 197, + Æ: 198, + Ç: 199, + È: 200, + É: 201, + Ê: 202, + Ë: 203, + Ì: 204, + Í: 205, + Î: 206, + Ï: 207, + Ð: 208, + Ñ: 209, + Ò: 210, + Ó: 211, + Ô: 212, + Õ: 213, + Ö: 214, + "×": 215, + Ø: 216, + Ù: 217, + Ú: 218, + Û: 219, + Ü: 220, + Ý: 221, + Þ: 222, + ß: 223, + à: 224, + á: 225, + â: 226, + ã: 227, + ä: 228, + å: 229, + æ: 230, + ç: 231, + è: 232, + é: 233, + ê: 234, + ë: 235, + ì: 236, + í: 237, + î: 238, + ï: 239, + ð: 240, + ñ: 241, + ò: 242, + ó: 243, + ô: 244, + õ: 245, + ö: 246, + "÷": 247, + ø: 248, + ù: 249, + ú: 250, + û: 251, + ü: 252, + ý: 253, + þ: 254, + ÿ: 255 +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_1/output.mangleOnly.js new file mode 100644 index 00000000000..7e033f0a64f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log({ + p: function() { + return 42; + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_2/output.mangleOnly.js new file mode 100644 index 00000000000..91b49abccde --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log({ + a: 42, + p: function() { + return this.a; + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_3/output.mangleOnly.js new file mode 100644 index 00000000000..4fb838de3db --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_3/output.mangleOnly.js @@ -0,0 +1,8 @@ +a = 42; +console.log({ + p: function() { + return (function() { + return this.a; + })(); + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_4/output.mangleOnly.js new file mode 100644 index 00000000000..db70ddcb1e9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() {} +console.log({ + a: a(), + p: function() { + return 42; + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_5/output.mangleOnly.js new file mode 100644 index 00000000000..9c0557a7f89 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_5/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log({ + p: "FAIL", + p: function() { + return 42; + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_6/output.mangleOnly.js new file mode 100644 index 00000000000..47fc706d085 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_6/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log({ + p: ()=>42 +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_7/output.mangleOnly.js new file mode 100644 index 00000000000..a92f32451de --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_7/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log({ + p () { + return 42; + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_8/output.mangleOnly.js new file mode 100644 index 00000000000..854700e0b31 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_8/output.mangleOnly.js @@ -0,0 +1,10 @@ +console.log({ + *p () { + return x(); + } +}.p()); +console.log({ + async p () { + return await x(); + } +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_9/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_9/output.mangleOnly.js new file mode 100644 index 00000000000..b5140568365 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2208_9/output.mangleOnly.js @@ -0,0 +1,6 @@ +a = 42; +console.log({ + p: ()=>(function() { + return this.a; + })() +}.p()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2256/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2256/output.mangleOnly.js new file mode 100644 index 00000000000..96c1d4d562a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2256/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = {}; +({ + keep: 1 +}); +a.keep = a.change; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2321/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2321/output.mangleOnly.js new file mode 100644 index 00000000000..eebef0229dd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2321/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = { + foo: function() { + console.log("foo"); + }, + bar () { + console.log("bar"); + } +}; +var b = new a.foo(); +var c = a.bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2513/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2513/output.mangleOnly.js new file mode 100644 index 00000000000..6175aa014b2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2513/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function(a, b, c) { + console.log("a"[1 / 0], "b"["Infinity"]); + console.log("c"[0 / 0], "d"["NaN"]); + console.log("e"[void 0], "f"["undefined"]); +})(0, 0, 0); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816/output.mangleOnly.js new file mode 100644 index 00000000000..ae3531092be --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816/output.mangleOnly.js @@ -0,0 +1,8 @@ +"use strict"; +var a = { + a: 1 +}; +a.b = 2; +a.a = 3; +a.c = 4; +console.log(a.a, a.b, a.c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816_ecma6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816_ecma6/output.mangleOnly.js new file mode 100644 index 00000000000..ae3531092be --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2816_ecma6/output.mangleOnly.js @@ -0,0 +1,8 @@ +"use strict"; +var a = { + a: 1 +}; +a.b = 2; +a.a = 3; +a.c = 4; +console.log(a.a, a.b, a.c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_1/output.mangleOnly.js new file mode 100644 index 00000000000..493c5c2ff4e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = { + get a () { + return "PASS"; + } +}; +a.a = "FAIL"; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_2/output.mangleOnly.js new file mode 100644 index 00000000000..5e440e52a93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = { + set a (v){ + this.b = v; + }, + b: "FAIL" +}; +a.a = "PASS"; +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_3/output.mangleOnly.js new file mode 100644 index 00000000000..493c5c2ff4e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_3/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = { + get a () { + return "PASS"; + } +}; +a.a = "FAIL"; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_4/output.mangleOnly.js new file mode 100644 index 00000000000..5e440e52a93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_4/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = { + set a (v){ + this.b = v; + }, + b: "FAIL" +}; +a.a = "PASS"; +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_5/output.mangleOnly.js new file mode 100644 index 00000000000..ab598cf2b19 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_5/output.mangleOnly.js @@ -0,0 +1,8 @@ +"use strict"; +var a = { + get a () { + return "PASS"; + } +}; +a.a = "FAIL"; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_6/output.mangleOnly.js new file mode 100644 index 00000000000..434a2ec9fd6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_6/output.mangleOnly.js @@ -0,0 +1,9 @@ +"use strict"; +var a = { + set a (v){ + this.b = v; + }, + b: "FAIL" +}; +a.a = "PASS"; +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_7/output.mangleOnly.js new file mode 100644 index 00000000000..ab598cf2b19 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_7/output.mangleOnly.js @@ -0,0 +1,8 @@ +"use strict"; +var a = { + get a () { + return "PASS"; + } +}; +a.a = "FAIL"; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_8/output.mangleOnly.js new file mode 100644 index 00000000000..434a2ec9fd6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_2893_8/output.mangleOnly.js @@ -0,0 +1,9 @@ +"use strict"; +var a = { + set a (v){ + this.b = v; + }, + b: "FAIL" +}; +a.a = "PASS"; +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_1/output.mangleOnly.js new file mode 100644 index 00000000000..2ab8aff7db5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_1/output.mangleOnly.js @@ -0,0 +1,12 @@ +(function() { + function a() { + console.log(this.p); + } + (function() { + var b = { + p: "PASS", + f: a + }; + b.f(); + })(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_2/output.mangleOnly.js new file mode 100644 index 00000000000..aae144a4074 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +(function() { + var b = function() { + console.log(this.p); + }; + function a() { + var a = { + p: "PASS", + f: b + }; + a.f(); + } + a(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_3/output.mangleOnly.js new file mode 100644 index 00000000000..fd7696c3737 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_3188_3/output.mangleOnly.js @@ -0,0 +1,12 @@ +(function() { + function a() { + console.log(this[0]); + } + (function() { + var b = [ + "PASS", + a + ]; + b[1](); + })(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_1/output.mangleOnly.js new file mode 100644 index 00000000000..0b42927ede7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +var a = { + p: "FAIL" +}; +Object.defineProperty(a, "p", { + get: function() { + return "PASS"; + } +}); +console.log(a.p); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_2/output.mangleOnly.js new file mode 100644 index 00000000000..c3e59bba515 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_869_2/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = { + p: "FAIL" +}; +Object.defineProperties(a, { + p: { + get: function() { + return "PASS"; + } + } +}); +console.log(a.p); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_t64/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_t64/output.mangleOnly.js new file mode 100644 index 00000000000..97bbd357f7c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/issue_t64/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a = {}; +a.Base = class { + constructor(){ + this.id = "PASS"; + } +}; +a.Derived = class extends a.Base { + constructor(){ + super(); + console.log(this.id); + } +}; +new a.Derived(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_1/output.mangleOnly.js new file mode 100644 index 00000000000..0fcb6cca850 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +console.log((function() { + var a = { + a: 1, + c: (console.log("c"), "C") + }; + a.b = 2; + (a[3] = function() { + console.log(a); + }), (a["a"] = /foo/), (a.bar = a); + return a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_2/output.mangleOnly.js new file mode 100644 index 00000000000..0694c287fdd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = { + foo: 1 +}; +a.bar = 2; +a.baz = 3; +console.log(a.foo, a.bar + a.bar, a.foo * a.bar * a.baz); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_3/output.mangleOnly.js new file mode 100644 index 00000000000..952bde29117 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_3/output.mangleOnly.js @@ -0,0 +1,7 @@ +console.log((function() { + var a = { + a: "PASS" + }, b = a.a; + a.a = "FAIL"; + return b; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_4/output.mangleOnly.js new file mode 100644 index 00000000000..c7361c98001 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a; +console.log(a); +a = {}; +a.a = "foo"; +console.log(a.b); +a.b = "bar"; +console.log(a.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_Infinity/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_Infinity/output.mangleOnly.js new file mode 100644 index 00000000000..d244a16ebf6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_Infinity/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = {}; +a[Infinity] = 1; +a[1 / 0] = 2; +a[-Infinity] = 3; +a[-1 / 0] = 4; +console.log(a[Infinity], a[1 / 0], a[-Infinity], a[-1 / 0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_1/output.mangleOnly.js new file mode 100644 index 00000000000..ec891284fca --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = {}; +a[NaN] = 1; +a[0 / 0] = 2; +console.log(a[NaN], a[NaN]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_2/output.mangleOnly.js new file mode 100644 index 00000000000..ec891284fca --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_NaN_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = {}; +a[NaN] = 1; +a[0 / 0] = 2; +console.log(a[NaN], a[NaN]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_for/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_for/output.mangleOnly.js new file mode 100644 index 00000000000..74675e73b30 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_for/output.mangleOnly.js @@ -0,0 +1,7 @@ +console.log((function() { + var a = { + p: 3 + }; + for(a.q = "foo"; console.log(a.q);); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_forin/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_forin/output.mangleOnly.js new file mode 100644 index 00000000000..4d8ca5d2a7f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_forin/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function() { + var a = {}; + for(var b in ((a.a = "PASS"), a))return a[b]; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_if/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_if/output.mangleOnly.js new file mode 100644 index 00000000000..1aea66bb8ad --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_if/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function() { + var a = {}; + if ((a.a = "PASS")) return a.a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_negative/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_negative/output.mangleOnly.js new file mode 100644 index 00000000000..e116c92d2a6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_negative/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = {}; +a[0] = 0; +a[-0] = 1; +a[-1] = 2; +console.log(a[0], a[-0], a[-1]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_0/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_0/output.mangleOnly.js new file mode 100644 index 00000000000..cdff3e63eb5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_0/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[null] = 1; +console.log(a[null]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_1/output.mangleOnly.js new file mode 100644 index 00000000000..cdff3e63eb5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_null_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[null] = 1; +console.log(a[null]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_regex/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_regex/output.mangleOnly.js new file mode 100644 index 00000000000..60ecda7b4ea --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_regex/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[/rx/] = 1; +console.log(a[/rx/]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_1/output.mangleOnly.js new file mode 100644 index 00000000000..93658430e3e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log((function() { + var a = { + p: 3 + }; + return (a.q = "foo"); +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_2/output.mangleOnly.js new file mode 100644 index 00000000000..91bf66049e2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log((function() { + var a = { + p: 3 + }; + return (a.q = /foo/), (a.r = "bar"); +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_3/output.mangleOnly.js new file mode 100644 index 00000000000..9ce5babe56b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_return_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log((function() { + var a = { + p: 3 + }; + return (a.q = "foo"), (a.p += ""), console.log(a.q), a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_1/output.mangleOnly.js new file mode 100644 index 00000000000..769360ba31a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[undefined] = 1; +console.log(a[undefined]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_2/output.mangleOnly.js new file mode 100644 index 00000000000..769360ba31a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_undefined_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[undefined] = 1; +console.log(a[undefined]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_void_0/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_void_0/output.mangleOnly.js new file mode 100644 index 00000000000..e2c7bdd5595 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/join_object_assignments_void_0/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = {}; +a[void 0] = 1; +console.log(a[void 0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/keep_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/keep_properties/output.mangleOnly.js new file mode 100644 index 00000000000..214d07345ce --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/keep_properties/output.mangleOnly.js @@ -0,0 +1 @@ +a["foo"] = "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_1/output.mangleOnly.js new file mode 100644 index 00000000000..bcde4998b25 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(++{ + a: 1 +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_2/output.mangleOnly.js new file mode 100644 index 00000000000..2f374179654 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/lhs_prop_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +[ + 1 +][0] = 42; +(function(a) { + a.b = "g"; +})("abc"); +(function(a) { + a[2] = "g"; +})("def"); +(function(a) { + a[""] = "g"; +})("ghi"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/literal_duplicate_key_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/literal_duplicate_key_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..dde6ebe490e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/literal_duplicate_key_side_effects/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log({ + a: "FAIL", + a: console.log ? "PASS" : "FAIL" +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug/output.mangleOnly.js new file mode 100644 index 00000000000..a4b7cb837e8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = {}; +a.foo = "bar"; +x = { + baz: "ban" +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix/output.mangleOnly.js new file mode 100644 index 00000000000..a4b7cb837e8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = {}; +a.foo = "bar"; +x = { + baz: "ban" +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix_keep_quoted/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix_keep_quoted/output.mangleOnly.js new file mode 100644 index 00000000000..cabf767069b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_suffix_keep_quoted/output.mangleOnly.js @@ -0,0 +1,22 @@ +var a = {}; +a.top = 1; +function b() { + a["foo"] = "bar"; + a.color = "red"; + a.stuff = 2; + x = { + bar: 10, + size: 7 + }; + a.size = 9; +} +function c() { + a.foo = "bar"; + a["color"] = "red"; + x = { + bar: 10, + size: 7 + }; + a.size = 9; + a.stuff = 3; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_true/output.mangleOnly.js new file mode 100644 index 00000000000..a4b7cb837e8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_debug_true/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = {}; +a.foo = "bar"; +x = { + baz: "ban" +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_define_property_arg/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_define_property_arg/output.mangleOnly.js new file mode 100644 index 00000000000..1ff8acc40da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_define_property_arg/output.mangleOnly.js @@ -0,0 +1,15 @@ +var c = "propname"; +const a = { + some_prop: c +}; +const b = console; +b.log(a); +Object.defineProperty(a, "some_prop", { + value: 3 +}); +Object.defineProperty(b, "lag", { + value: 3 +}); +Object.defineProperty(console, "lag", { + value: 3 +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_private_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_private_properties/output.mangleOnly.js new file mode 100644 index 00000000000..dae8718b6c8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_private_properties/output.mangleOnly.js @@ -0,0 +1,6 @@ +class a { + #a = 123; + #b() {} + get #c() {} + set #c(b) {} +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties/output.mangleOnly.js new file mode 100644 index 00000000000..bda364da420 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties/output.mangleOnly.js @@ -0,0 +1,10 @@ +a["foo"] = "bar"; +a.color = "red"; +x = { + bar: 10 +}; +a.run(x.bar, a.foo); +a["run"]({ + color: "blue", + foo: "baz" +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties_which_matches_pattern/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties_which_matches_pattern/output.mangleOnly.js new file mode 100644 index 00000000000..4ff6eb3cb7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_properties_which_matches_pattern/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = { + get asd () { + return this._asd; + }, + _asd: true +}; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_undeclared_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_undeclared_properties/output.mangleOnly.js new file mode 100644 index 00000000000..88037ac8e69 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_undeclared_properties/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = { + foo: function() { + return Bar.bar(); + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_unquoted_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_unquoted_properties/output.mangleOnly.js new file mode 100644 index 00000000000..cabf767069b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/mangle_unquoted_properties/output.mangleOnly.js @@ -0,0 +1,22 @@ +var a = {}; +a.top = 1; +function b() { + a["foo"] = "bar"; + a.color = "red"; + a.stuff = 2; + x = { + bar: 10, + size: 7 + }; + a.size = 9; +} +function c() { + a.foo = "bar"; + a["color"] = "red"; + x = { + bar: 10, + size: 7 + }; + a.size = 9; + a.stuff = 3; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_false/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_false/output.mangleOnly.js new file mode 100644 index 00000000000..f96e3a2170c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_false/output.mangleOnly.js @@ -0,0 +1,15 @@ +class a { + Quoted() {} + Unquoted() {} +} +f1({ + Quoted () {}, + Unquoted () {}, + Prop: 3 +}); +f2({ + Quoted: function() {} +}); +f3({ + Quoted: ()=>{} +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_from_dead_code/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_from_dead_code/output.mangleOnly.js new file mode 100644 index 00000000000..9b084f86ca8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_from_dead_code/output.mangleOnly.js @@ -0,0 +1,16 @@ +class a { + Quoted() {} + Unquoted() {} +} +f1({ + Quoted () {}, + Unquoted () {}, + Prop: 3 +}); +f2({ + Quoted: function() {} +}); +f3({ + Quoted: ()=>{} +}); +0 && obj["Quoted"]; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_true/output.mangleOnly.js new file mode 100644 index 00000000000..f96e3a2170c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/methods_keep_quoted_true/output.mangleOnly.js @@ -0,0 +1,15 @@ +class a { + Quoted() {} + Unquoted() {} +} +f1({ + Quoted () {}, + Unquoted () {}, + Prop: 3 +}); +f2({ + Quoted: function() {} +}); +f3({ + Quoted: ()=>{} +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype/output.mangleOnly.js new file mode 100644 index 00000000000..9ee4855c730 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype/output.mangleOnly.js @@ -0,0 +1,13 @@ +Array.prototype.splice.apply(a, [ + 1, + 2, + b, + c +]); +Function.prototype.call.apply(console.log, console, [ + "foo" +]); +Number.prototype.toFixed.call(Math.PI, 2); +Object.prototype.hasOwnProperty.call(d, "foo"); +RegExp.prototype.test.call(/foo/, "bar"); +String.prototype.indexOf.call(e, "bar"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype_lhs/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype_lhs/output.mangleOnly.js new file mode 100644 index 00000000000..5c3a27b9e93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/native_prototype_lhs/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function() { + Function.prototype.bar = "PASS"; + return function() {}; +})().bar); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/new_this/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/new_this/output.mangleOnly.js new file mode 100644 index 00000000000..efe0124bd51 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/new_this/output.mangleOnly.js @@ -0,0 +1,5 @@ +new { + f: function(a) { + this.a = a; + } +}.f(42); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_1/output.mangleOnly.js new file mode 100644 index 00000000000..9f822cdfb7b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_1/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 1; +console.log(a); +var b = { + bar: function() { + return a + a; + } +}; +console.log(b.bar()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_2/output.mangleOnly.js new file mode 100644 index 00000000000..b0d8cfafbd9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/prop_side_effects_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 1; +console.log(a); +var b = { + "": function() { + return a + a; + } +}; +console.log(b[""]()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/skip_undeclared_properties_by_default/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/skip_undeclared_properties_by_default/output.mangleOnly.js new file mode 100644 index 00000000000..88037ac8e69 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/skip_undeclared_properties_by_default/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a = { + foo: function() { + return Bar.bar(); + } +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/sub_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/sub_properties/output.mangleOnly.js new file mode 100644 index 00000000000..0cb11a2c2d1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/sub_properties/output.mangleOnly.js @@ -0,0 +1,9 @@ +a[0] = 0; +a["0"] = 1; +a[3.14] = 2; +a["3" + ".14"] = 3; +a["i" + "f"] = 4; +a["foo" + " bar"] = 5; +a[0 / 0] = 6; +a[null] = 7; +a[undefined] = 8; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/properties/unsafe_methods_regex/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/properties/unsafe_methods_regex/output.mangleOnly.js new file mode 100644 index 00000000000..6a3503cb456 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/properties/unsafe_methods_regex/output.mangleOnly.js @@ -0,0 +1,30 @@ +var a = { + 123: function() { + console.log("123"); + }, + foo: function() { + console.log("foo"); + }, + bar () { + console.log("bar"); + }, + Baz: function() { + console.log("baz"); + }, + BOO: function() { + console.log("boo"); + }, + null: function() { + console.log("null"); + }, + undefined: function() { + console.log("undefined"); + } +}; +a[123](); +new a.foo(); +a.bar(); +a.Baz(); +a.BOO(); +new a.null(); +new a.undefined(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/arithmetic/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/arithmetic/output.mangleOnly.js new file mode 100644 index 00000000000..d5b3f23f08e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/arithmetic/output.mangleOnly.js @@ -0,0 +1,9 @@ +foo() + foo(); +foo() - bar(); +foo() * "bar"; +bar() / foo(); +bar() & bar(); +bar() | "bar"; +"bar" >> foo(); +"bar" << bar(); +"bar" >>> "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/array/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/array/output.mangleOnly.js new file mode 100644 index 00000000000..7f3cc4a06dd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/array/output.mangleOnly.js @@ -0,0 +1,5 @@ +var a; +function b(b) { + Math.floor(a / b); + Math.floor(c / b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/assign/output.mangleOnly.js new file mode 100644 index 00000000000..51c7be24771 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/assign/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a; +function b(b) { + a = foo(); + b *= 4 + foo(); + c >>= 0 | foo(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/babel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/babel/output.mangleOnly.js new file mode 100644 index 00000000000..4b17ff1081d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/babel/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a(a, b) { + if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); +} +var b = function b() { + a(this, b); +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_and/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_and/output.mangleOnly.js new file mode 100644 index 00000000000..49d8fb0bf74 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_and/output.mangleOnly.js @@ -0,0 +1,9 @@ +foo() && foo(); +foo() && bar(); +foo() && "bar"; +bar() && foo(); +bar() && bar(); +bar() && "bar"; +"bar" && foo(); +"bar" && bar(); +"bar" && "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_or/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_or/output.mangleOnly.js new file mode 100644 index 00000000000..32365fa08d8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/boolean_or/output.mangleOnly.js @@ -0,0 +1,9 @@ +foo() || foo(); +foo() || bar(); +foo() || "bar"; +bar() || foo(); +bar() || bar(); +bar() || "bar"; +"bar" || foo(); +"bar" || bar(); +"bar" || "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/conditional/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/conditional/output.mangleOnly.js new file mode 100644 index 00000000000..dd33a487c17 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/conditional/output.mangleOnly.js @@ -0,0 +1,8 @@ +pure(1 | a() ? 2 & b() : 7 ^ c()); +pure(1 | a() ? 2 & b() : 5); +pure(1 | a() ? 4 : 7 ^ c()); +pure(1 | a() ? 4 : 5); +pure(3 ? 2 & b() : 7 ^ c()); +pure(3 ? 2 & b() : 5); +pure(3 ? 4 : 7 ^ c()); +pure(3 ? 4 : 5); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/func/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/func/output.mangleOnly.js new file mode 100644 index 00000000000..bcda5eee293 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/func/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a(b, a) { + Math.floor(b / a); + Math.floor(c / a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_1/output.mangleOnly.js new file mode 100644 index 00000000000..e6035141263 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +a(); +b(); +c(); +d(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_2/output.mangleOnly.js new file mode 100644 index 00000000000..01868ced35d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +a(1)(2)(3); +b(1)(2)(3); +c(1)(2)(3); +d(1)(2)(3); +e(1)(2)(3); +f(1)(2)(3); +g(1)(2)(3); +h(1)(2)(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_3/output.mangleOnly.js new file mode 100644 index 00000000000..2f11e7ad7fe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_3/output.mangleOnly.js @@ -0,0 +1,14 @@ +a.x(1).y(2).z(3); +b.x(1).y(2).z(3); +c.x(1).y(2).z(3); +d.x(1).y(2).z(3); +e.x(1).y(2).z(3); +f.x(1).y(2).z(3); +g.x(1).y(2).z(3); +h.x(1).y(2).z(3); +i.x(1).y(2).z(3); +j.x(1).y(2).z(3); +k.x(1).y(2).z(3); +l.x(1).y(2).z(3); +m.x(1).y(2).z(3); +n.x(1).y(2).z(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_4/output.mangleOnly.js new file mode 100644 index 00000000000..1409bc5a07e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_4/output.mangleOnly.js @@ -0,0 +1,2 @@ +x(), y(); +w(), x(), y(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_5/output.mangleOnly.js new file mode 100644 index 00000000000..3d6685d9f4e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2629_5/output.mangleOnly.js @@ -0,0 +1,12 @@ +[ + x() +]; +[ + x(), + y() +]; +[ + w(), + x(), + y() +]; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2638/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2638/output.mangleOnly.js new file mode 100644 index 00000000000..3769f318d68 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2638/output.mangleOnly.js @@ -0,0 +1,2 @@ +(g() || h())(x(), y()); +(a() || b())(c(), d()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_1/output.mangleOnly.js new file mode 100644 index 00000000000..ee4cacce5b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +new a(); +new b(); +new c(); +new d(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_2/output.mangleOnly.js new file mode 100644 index 00000000000..30374f532bc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +new a(1)(2)(3); +new (b(1))(2)(3); +new (c(1)(2))(3); +new (d(1)(2)(3))(); +new e(1)(2)(3); +new f(1)(2)(3); +new g(1)(2)(3); +new h(1)(2)(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_3/output.mangleOnly.js new file mode 100644 index 00000000000..dab6962bebf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_3/output.mangleOnly.js @@ -0,0 +1,14 @@ +new a.x(1).y(2).z(3); +new b.x(1).y(2).z(3); +new (c.x(1).y)(2).z(3); +new (d.x(1).y)(2).z(3); +new (e.x(1).y(2).z)(3); +new (f.x(1).y(2).z)(3); +new (g.x(1).y(2).z(3))(); +new h.x(1).y(2).z(3); +new i.x(1).y(2).z(3); +new j.x(1).y(2).z(3); +new k.x(1).y(2).z(3); +new l.x(1).y(2).z(3); +new m.x(1).y(2).z(3); +new n.x(1).y(2).z(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_4/output.mangleOnly.js new file mode 100644 index 00000000000..62353ad961a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_4/output.mangleOnly.js @@ -0,0 +1,2 @@ +new x(), y(); +w(), new x(), y(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_5/output.mangleOnly.js new file mode 100644 index 00000000000..1326268e434 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_5/output.mangleOnly.js @@ -0,0 +1,12 @@ +[ + new x() +]; +[ + new x(), + y() +]; +[ + w(), + new x(), + y() +]; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_6/output.mangleOnly.js new file mode 100644 index 00000000000..760bf092b26 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_2705_6/output.mangleOnly.js @@ -0,0 +1,2 @@ +new (g() || h())(x(), y()); +new (a() || b())(c(), d()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_1/output.mangleOnly.js new file mode 100644 index 00000000000..518bc6fb1b2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function b(b, c, a) { + a.a = b; + a.f = c; + return a; +} +function a(a) { + return b(1, a, function(b) { + return a(b); + }); +} +var c = a(function(a) { + return a; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2/output.mangleOnly.js new file mode 100644 index 00000000000..518bc6fb1b2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +function b(b, c, a) { + a.a = b; + a.f = c; + return a; +} +function a(a) { + return b(1, a, function(b) { + return a(b); + }); +} +var c = a(function(a) { + return a; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2b/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2b/output.mangleOnly.js new file mode 100644 index 00000000000..57192910f7f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_2b/output.mangleOnly.js @@ -0,0 +1,18 @@ +function c(b, c, a) { + a.a = b; + a.f = c; + return a; +} +function b(a) { + return c(1, a, function(b) { + return a(b); + }); +} +var d = b(function(a) { + return a; +}); +function a(a) { + console.log(a); +} +a(2); +a(3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_3/output.mangleOnly.js new file mode 100644 index 00000000000..c3ab4f01286 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_3/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a) { + console.log(a); +} +a((function() { + console.log("PASS"); + return "FAIL"; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_4/output.mangleOnly.js new file mode 100644 index 00000000000..9bc5d099569 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_3065_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = function(a) { + console.log(a); +}; +a((function() { + console.log("PASS"); + return "FAIL"; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_526_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_526_1/output.mangleOnly.js new file mode 100644 index 00000000000..760bf092b26 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/issue_526_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +new (g() || h())(x(), y()); +new (a() || b())(c(), d()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/relational/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/relational/output.mangleOnly.js new file mode 100644 index 00000000000..7c071a094ff --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/relational/output.mangleOnly.js @@ -0,0 +1,9 @@ +foo() in foo(); +foo() instanceof bar(); +foo() < "bar"; +bar() > foo(); +bar() != bar(); +bar() !== "bar"; +"bar" == foo(); +"bar" === bar(); +"bar" >= "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..57cd0ada51f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/side_effects/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a(a, b) { + console.log(a()); + console.log(b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unary/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unary/output.mangleOnly.js new file mode 100644 index 00000000000..4b0b537039d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unary/output.mangleOnly.js @@ -0,0 +1,18 @@ +typeof foo(); +typeof bar(); +typeof "bar"; +void foo(); +void bar(); +void "bar"; +delete a[foo()]; +delete a[bar()]; +delete a["bar"]; +a[foo()]++; +a[bar()]++; +a["bar"]++; +--a[foo()]; +--a[bar()]; +--a["bar"]; +~foo(); +~bar(); +~"bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unused/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unused/output.mangleOnly.js new file mode 100644 index 00000000000..31c9bdad7d9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_funcs/unused/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + var b = pure(1); + var a = pure(2); + var c = pure(a); + var d = pure(pure(side_effects())); + return pure(3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/chained/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/chained/output.mangleOnly.js new file mode 100644 index 00000000000..deb84787e94 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/chained/output.mangleOnly.js @@ -0,0 +1 @@ +a.b.c; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_call/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_call/output.mangleOnly.js new file mode 100644 index 00000000000..659cf92e03d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_call/output.mangleOnly.js @@ -0,0 +1,6 @@ +var b = {}; +function a() { + console.log("PASS"); +} +b.f = a; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_false/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_false/output.mangleOnly.js new file mode 100644 index 00000000000..68558f5163d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_false/output.mangleOnly.js @@ -0,0 +1,9 @@ +console.log((((42).length = "PASS"), "PASS")); +console.log((("foo".length = "PASS"), "PASS")); +console.log(((false.length = "PASS"), "PASS")); +console.log(((function() {}.length = "PASS"), "PASS")); +console.log((({ + get length () { + return "FAIL"; + } +}.length = "PASS"), "PASS")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_lhs/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_lhs/output.mangleOnly.js new file mode 100644 index 00000000000..577ae3b835e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_lhs/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(b, a) { + (b.b = a), (a += 2); + console.log(b.b, a); +} +a({}, 1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_setter/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_setter/output.mangleOnly.js new file mode 100644 index 00000000000..5b04adb283f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_setter/output.mangleOnly.js @@ -0,0 +1,9 @@ +try { + console.log((({ + set length (v){ + throw "PASS"; + } + }.length = "FAIL"), "FAIL")); +} catch (a) { + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_strict/output.mangleOnly.js new file mode 100644 index 00000000000..68558f5163d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_strict/output.mangleOnly.js @@ -0,0 +1,9 @@ +console.log((((42).length = "PASS"), "PASS")); +console.log((("foo".length = "PASS"), "PASS")); +console.log(((false.length = "PASS"), "PASS")); +console.log(((function() {}.length = "PASS"), "PASS")); +console.log((({ + get length () { + return "FAIL"; + } +}.length = "PASS"), "PASS")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_true/output.mangleOnly.js new file mode 100644 index 00000000000..68558f5163d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_rhs_true/output.mangleOnly.js @@ -0,0 +1,9 @@ +console.log((((42).length = "PASS"), "PASS")); +console.log((("foo".length = "PASS"), "PASS")); +console.log(((false.length = "PASS"), "PASS")); +console.log(((function() {}.length = "PASS"), "PASS")); +console.log((({ + get length () { + return "FAIL"; + } +}.length = "PASS"), "PASS")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_false/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_false/output.mangleOnly.js new file mode 100644 index 00000000000..29fb702b718 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_false/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a, b) { + for(;;){ + var c = a.g(); + var d = b.p; + if (c || d) break; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_strict/output.mangleOnly.js new file mode 100644 index 00000000000..29fb702b718 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_strict/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a, b) { + for(;;){ + var c = a.g(); + var d = b.p; + if (c || d) break; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_true/output.mangleOnly.js new file mode 100644 index 00000000000..29fb702b718 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_1_true/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a, b) { + for(;;){ + var c = a.g(); + var d = b.p; + if (c || d) break; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_false/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_false/output.mangleOnly.js new file mode 100644 index 00000000000..dfe60bb74fc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_false/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + function a() {} + a.a = function() {}; + a.b = a.a; + return a; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_strict/output.mangleOnly.js new file mode 100644 index 00000000000..dfe60bb74fc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_strict/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + function a() {} + a.a = function() {}; + a.b = a.a; + return a; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_true/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_true/output.mangleOnly.js new file mode 100644 index 00000000000..dfe60bb74fc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/collapse_vars_2_true/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + function a() {} + a.a = function() {}; + a.b = a.a; + return a; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_1/output.mangleOnly.js new file mode 100644 index 00000000000..355287e71da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_1/output.mangleOnly.js @@ -0,0 +1,12 @@ +({ + get a () { + console.log(1); + }, + b: 1 +}.a); +({ + get a () { + console.log(1); + }, + b: 1 +}.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_2/output.mangleOnly.js new file mode 100644 index 00000000000..355287e71da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/impure_getter_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +({ + get a () { + console.log(1); + }, + b: 1 +}.a); +({ + get a () { + console.log(1); + }, + b: 1 +}.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_1/output.mangleOnly.js new file mode 100644 index 00000000000..49195e16816 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + function a() {} + function b() { + return this; + } + a.g = b; + return a.g(); +} +console.log(typeof a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_2/output.mangleOnly.js new file mode 100644 index 00000000000..49195e16816 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2110_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + function a() {} + function b() { + return this; + } + a.g = b; + return a.g(); +} +console.log(typeof a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_1/output.mangleOnly.js new file mode 100644 index 00000000000..2d192026d61 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +({ + ...{} +}.p); +({ + ...g +}.p); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_2/output.mangleOnly.js new file mode 100644 index 00000000000..1c756b6c3e1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = { + get b () { + throw 0; + } +}; +({ + ...a +}.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_3/output.mangleOnly.js new file mode 100644 index 00000000000..5f0a5b87d54 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_3/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = { + set b (){ + throw 0; + } +}; +({ + ...a +}.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_4/output.mangleOnly.js new file mode 100644 index 00000000000..e42110c5c89 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2265_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = { + b: 1 +}; +({ + ...a +}.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_1/output.mangleOnly.js new file mode 100644 index 00000000000..89cb11569f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_1/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + console.log(1); + return { + y: function() { + console.log(2); + return { + z: 0 + }; + } + }; +} +a().y().z++; +if (a().y().z) { + console.log(3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_2/output.mangleOnly.js new file mode 100644 index 00000000000..89cb11569f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_2/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + console.log(1); + return { + y: function() { + console.log(2); + return { + z: 0 + }; + } + }; +} +a().y().z++; +if (a().y().z) { + console.log(3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_3/output.mangleOnly.js new file mode 100644 index 00000000000..89cb11569f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_3/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + console.log(1); + return { + y: function() { + console.log(2); + return { + z: 0 + }; + } + }; +} +a().y().z++; +if (a().y().z) { + console.log(3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_4/output.mangleOnly.js new file mode 100644 index 00000000000..89cb11569f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_4/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + console.log(1); + return { + y: function() { + console.log(2); + return { + z: 0 + }; + } + }; +} +a().y().z++; +if (a().y().z) { + console.log(3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_5/output.mangleOnly.js new file mode 100644 index 00000000000..eb4c55e08e5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_5/output.mangleOnly.js @@ -0,0 +1,2 @@ +x().y++; +x().y; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_6/output.mangleOnly.js new file mode 100644 index 00000000000..eb4c55e08e5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_6/output.mangleOnly.js @@ -0,0 +1,2 @@ +x().y++; +x().y; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_7/output.mangleOnly.js new file mode 100644 index 00000000000..9526b34e15e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2313_7/output.mangleOnly.js @@ -0,0 +1,17 @@ +var c = 0, d = 0; +class a { + get c() { + c++; + return 42; + } + set c(a) { + d++; + } +} +class b extends a { + d() { + super.c++; + if (super.c) console.log(c, d); + } +} +new b().d(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2678/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2678/output.mangleOnly.js new file mode 100644 index 00000000000..d6faf7cbcab --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2678/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1, a = "FAIL"; +(function c() { + (b-- && c()).p; + return { + get p () { + a = "PASS"; + } + }; +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2838/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2838/output.mangleOnly.js new file mode 100644 index 00000000000..02cb6f3033e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2838/output.mangleOnly.js @@ -0,0 +1,9 @@ +function b(a, c) { + (a || c).c = "PASS"; + (function() { + return b(a, c); + }.prototype.foo = "bar"); +} +var a = {}; +b(null, a); +console.log(a.c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_1/output.mangleOnly.js new file mode 100644 index 00000000000..c308d184869 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +function b(a) { + a.b = "PASS"; +} +var a = {}; +b(a); +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_2/output.mangleOnly.js new file mode 100644 index 00000000000..da0ee351fd0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = function a() {}; +var b = a.prototype; +b.initialContext = function a() { + console.log("PASS"); +}; +b.braceIsBlock = function() {}; +new a().initialContext(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_3/output.mangleOnly.js new file mode 100644 index 00000000000..d81e44a9f3f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_3/output.mangleOnly.js @@ -0,0 +1,9 @@ +function b(a) { + var b = a.a; + a.b = "PASS"; + a.c; +} +var a = {}; +a.d; +b(a); +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_4/output.mangleOnly.js new file mode 100644 index 00000000000..6b831e96d04 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/issue_2938_4/output.mangleOnly.js @@ -0,0 +1,9 @@ +var b = function a() {}; +var a = b.prototype; +var c = a.x; +a.initialContext = function b() { + a.y; + console.log("PASS"); +}; +a.braceIsBlock = function() {}; +new b().initialContext(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_1/output.mangleOnly.js new file mode 100644 index 00000000000..af7bd5e55cd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_2/output.mangleOnly.js new file mode 100644 index 00000000000..af7bd5e55cd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_3/output.mangleOnly.js new file mode 100644 index 00000000000..b880c2c7a93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_3/output.mangleOnly.js @@ -0,0 +1,5 @@ +"use strict"; +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_4/output.mangleOnly.js new file mode 100644 index 00000000000..b880c2c7a93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_4/output.mangleOnly.js @@ -0,0 +1,5 @@ +"use strict"; +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_5/output.mangleOnly.js new file mode 100644 index 00000000000..b880c2c7a93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_5/output.mangleOnly.js @@ -0,0 +1,5 @@ +"use strict"; +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_6/output.mangleOnly.js new file mode 100644 index 00000000000..af7bd5e55cd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_immutable_6/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 1; +a.foo += ""; +if (a.foo) console.log("FAIL"); +else console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_1/output.mangleOnly.js new file mode 100644 index 00000000000..bc2c7c34fd4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function a() { + a.foo += ""; + if (a.foo) console.log("PASS"); + else console.log("FAIL"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_2/output.mangleOnly.js new file mode 100644 index 00000000000..bc2c7c34fd4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/set_mutable_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function a() { + a.foo += ""; + if (a.foo) console.log("PASS"); + else console.log("FAIL"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict/output.mangleOnly.js new file mode 100644 index 00000000000..e4825114ea8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a, b = null, c = {}; +a.prop; +b.prop; +c.prop; +d.prop; +null.prop; +(void 0).prop; +undefined.prop; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict_reduce_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict_reduce_vars/output.mangleOnly.js new file mode 100644 index 00000000000..e4825114ea8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/strict_reduce_vars/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a, b = null, c = {}; +a.prop; +b.prop; +c.prop; +d.prop; +null.prop; +(void 0).prop; +undefined.prop; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe/output.mangleOnly.js new file mode 100644 index 00000000000..e4825114ea8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a, b = null, c = {}; +a.prop; +b.prop; +c.prop; +d.prop; +null.prop; +(void 0).prop; +undefined.prop; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe_reduce_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe_reduce_vars/output.mangleOnly.js new file mode 100644 index 00000000000..e4825114ea8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_getters/unsafe_reduce_vars/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a, b = null, c = {}; +a.prop; +b.prop; +c.prop; +d.prop; +null.prop; +(void 0).prop; +undefined.prop; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/globals_whose_access_is_pure/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/globals_whose_access_is_pure/output.mangleOnly.js new file mode 100644 index 00000000000..b7b9ef54acf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/globals_whose_access_is_pure/output.mangleOnly.js @@ -0,0 +1,9 @@ +try { + Promise; + Number; + Object; + String; + Array; +} catch (a) { + console.log("side effect!"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/window_access_is_impure/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/window_access_is_impure/output.mangleOnly.js new file mode 100644 index 00000000000..db39f661e64 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/pure_globals/window_access_is_impure/output.mangleOnly.js @@ -0,0 +1,5 @@ +try { + window; +} catch (a) { + console.log("PASS"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_1/output.mangleOnly.js new file mode 100644 index 00000000000..23d575c8454 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_1/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 1; +console.log({ + get a () { + a = 2; + return a; + }, + b: 1 +}.b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_2/output.mangleOnly.js new file mode 100644 index 00000000000..c6831e8319c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/accessor_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 1; +var b = { + get c () { + console.log(a); + } +}; +b.c; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_1/output.mangleOnly.js new file mode 100644 index 00000000000..a2139c9cd83 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = [ + 1, + 2, + 3 +]; +for(var b in a)console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_2/output.mangleOnly.js new file mode 100644 index 00000000000..a4fbba708b7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forin_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = []; +for(var b in [ + 1, + 2, + 3 +])a.push(b); +console.log(a.length); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_1/output.mangleOnly.js new file mode 100644 index 00000000000..b092701d7fd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = [ + 1, + 2, + 3 +]; +for (var b of a)console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_2/output.mangleOnly.js new file mode 100644 index 00000000000..2cd3c5721c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/array_forof_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = []; +for (var b of [ + 1, + 2, + 3 +])a.push(b); +console.log(a.length); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/boolean_binary_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/boolean_binary_assign/output.mangleOnly.js new file mode 100644 index 00000000000..f7ac398227b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/boolean_binary_assign/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function() { + var a; + void 0 && (a = 1); + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/booleans/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/booleans/output.mangleOnly.js new file mode 100644 index 00000000000..fb5be1050bf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/booleans/output.mangleOnly.js @@ -0,0 +1,9 @@ +console.log((function(a) { + if (a != 0) ; + switch(a){ + case 0: + return "FAIL"; + case false: + return "PASS"; + } +})(false)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/catch_var/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/catch_var/output.mangleOnly.js new file mode 100644 index 00000000000..4722d1ac309 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/catch_var/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw {}; +} catch (a) { + var a; + console.log(!!a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/chained_assignments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/chained_assignments/output.mangleOnly.js new file mode 100644 index 00000000000..e03a70be1c3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/chained_assignments/output.mangleOnly.js @@ -0,0 +1,18 @@ +function a() { + var b = [ + 94, + 173, + 190, + 239 + ]; + var a = 0; + a |= b[0]; + a <<= 8; + a |= b[1]; + a <<= 8; + a |= b[2]; + a <<= 8; + a |= b[3]; + return a; +} +console.log(a().toString(16)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/cond_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/cond_assign/output.mangleOnly.js new file mode 100644 index 00000000000..f78724dd722 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/cond_assign/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function() { + var a; + void 0 ? (a = 1) : 0; + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call/output.mangleOnly.js new file mode 100644 index 00000000000..031d888f660 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call/output.mangleOnly.js @@ -0,0 +1,6 @@ +global.a = { + b: null +}; +let b = "PASS"; +a.b?.c((b = "FAIL")); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call_direct/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call_direct/output.mangleOnly.js new file mode 100644 index 00000000000..887281b87b5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_call_direct/output.mangleOnly.js @@ -0,0 +1,6 @@ +global.a = { + b: null +}; +let b = "PASS"; +a.b?.((b = "FAIL")); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_and_uncertain_part/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_and_uncertain_part/output.mangleOnly.js new file mode 100644 index 00000000000..bdbac713e23 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_and_uncertain_part/output.mangleOnly.js @@ -0,0 +1,6 @@ +global.a = { + b: null +}; +let b = "FAIL"; +a.b?.[(b = "PASS")]?.d((b = "FAIL")); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_part/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_part/output.mangleOnly.js new file mode 100644 index 00000000000..b6e0a0b4314 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_certain_part/output.mangleOnly.js @@ -0,0 +1,6 @@ +global.a = { + b: null +}; +let b = "FAIL"; +a.b.c((b = "PASS"))?.x; +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop/output.mangleOnly.js new file mode 100644 index 00000000000..8370675f96c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop/output.mangleOnly.js @@ -0,0 +1,4 @@ +global.a = null; +let b = "PASS"; +a?.b[(b = "FAIL")]; +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop_direct/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop_direct/output.mangleOnly.js new file mode 100644 index 00000000000..5a500075c2b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_chain_prop_direct/output.mangleOnly.js @@ -0,0 +1,6 @@ +global.a = { + b: null +}; +let b = "PASS"; +a.b?.[(b = "FAIL")]; +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_1/output.mangleOnly.js new file mode 100644 index 00000000000..51f376b958b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_1/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 1, a = 0; +(function d(e) { + function c() { + e && (e.a = 0); + e && (e.a = 0); + e && (e[a++] *= 0); + } + c(b-- && d(c((e = 42)))); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_2/output.mangleOnly.js new file mode 100644 index 00000000000..9fa365f7020 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 0; +(function(c) { + function b() { + c && a++; + } + b(!a && b(), (c = 1)); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_3/output.mangleOnly.js new file mode 100644 index 00000000000..37d7db71ad8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/conditional_nested_3/output.mangleOnly.js @@ -0,0 +1,10 @@ +var b = 2, a = 0; +(function c(d) { + 0 < b-- && e((d = 1)); + function e() { + d && a++; + } + e(); + 0 < b-- && c(); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_1/output.mangleOnly.js new file mode 100644 index 00000000000..c12b0b2b4b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = { + a: 1, + b: 2 +}; +a.a++; +console.log(a.a, a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_2/output.mangleOnly.js new file mode 100644 index 00000000000..21ca0640177 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/const_expr_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +Object.prototype.c = function() { + this.a++; +}; +var a = { + a: 1, + b: 2 +}; +a.c(); +console.log(a.a, a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_assign/output.mangleOnly.js new file mode 100644 index 00000000000..f7059ac58c4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_assign/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log(typeof a); +a = 42; +console.log(typeof a); +function a() {} +console.log(typeof a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_call/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_call/output.mangleOnly.js new file mode 100644 index 00000000000..1f5ab188f88 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_call/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + return a() + b(1) - b(a(), 2, 3); + function a() { + return 4; + } + function b(a) { + return a; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_1/output.mangleOnly.js new file mode 100644 index 00000000000..0ff26fb843c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +function b() {} +try { + throw 42; +} catch (a) { + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_2/output.mangleOnly.js new file mode 100644 index 00000000000..7f39a12722c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + function b() {} + throw 42; +} catch (a) { + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_3/output.mangleOnly.js new file mode 100644 index 00000000000..60eebaa8d46 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw 42; + function b() {} +} catch (a) { + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_4/output.mangleOnly.js new file mode 100644 index 00000000000..435b0a1cd6f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw 42; +} catch (a) { + function a() {} + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_5/output.mangleOnly.js new file mode 100644 index 00000000000..6da990004d1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_5/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw 42; +} catch (a) { + console.log(a); + function a() {} +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_6/output.mangleOnly.js new file mode 100644 index 00000000000..3e82231c0b9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_catch_6/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw 42; +} catch (a) { + console.log(a); +} +function b() {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_1/output.mangleOnly.js new file mode 100644 index 00000000000..6cd985d50ba --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + return a(2) + b(); + function a(a) { + return a; + } + function b() { + return b(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_2/output.mangleOnly.js new file mode 100644 index 00000000000..fa5763dbda6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + function a(a) { + return a; + } + function b() { + return b(); + } + return a(2) + b(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_3/output.mangleOnly.js new file mode 100644 index 00000000000..385fb34fa23 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_inline_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + return a(2); + function a(a) { + return a; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_label/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_label/output.mangleOnly.js new file mode 100644 index 00000000000..30b7ad56512 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_label/output.mangleOnly.js @@ -0,0 +1,9 @@ +!(function() { + function a(a) { + L: { + if (a) break L; + return 1; + } + } + console.log(a(2)); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_redefine/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_redefine/output.mangleOnly.js new file mode 100644 index 00000000000..734fe37d3ba --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_redefine/output.mangleOnly.js @@ -0,0 +1,12 @@ +function a() { + function a() { + return 1; + } + function b() { + return 2; + } + a = function() { + return 3; + }; + return a() + b(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_reference/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_reference/output.mangleOnly.js new file mode 100644 index 00000000000..06f3eb6a547 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_reference/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + function c() { + x(); + return a; + } + var a = d(); + var b = 2; + return a + b; + function d() { + y(); + return b; + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_single_use_loop/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_single_use_loop/output.mangleOnly.js new file mode 100644 index 00000000000..f8136856445 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_single_use_loop/output.mangleOnly.js @@ -0,0 +1,6 @@ +for(var a, b = 2; --b >= 0;){ + var c = a; + a = d; + console.log(a === c); +} +function d() {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_1/output.mangleOnly.js new file mode 100644 index 00000000000..dcea3860804 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 42, b; +function a() {} +function b() {} +console.log(typeof a, typeof b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_2/output.mangleOnly.js new file mode 100644 index 00000000000..13f11db6731 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() {} +function b() {} +var a = 42, b; +console.log(typeof a, typeof b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_3/output.mangleOnly.js new file mode 100644 index 00000000000..0de6a42c9ad --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/defun_var_3/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() {} +function b() {} +console.log(typeof a, typeof b); +var a = 42, b; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def/output.mangleOnly.js new file mode 100644 index 00000000000..7ae4802c6f2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + return a; + var a; +} +function b() { + return a; + var a = 1; +} +console.log(a(), b()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def_lhs/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def_lhs/output.mangleOnly.js new file mode 100644 index 00000000000..fbd995acddd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/delay_def_lhs/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log((function() { + a++; + return a; + var a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/do_while/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/do_while/output.mangleOnly.js new file mode 100644 index 00000000000..648963242c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/do_while/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(a) { + do { + (function() { + a && (b = "PASS"); + })(); + }while ((a = 0)) +} +var b = "FAIL"; +a(1); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/double_reference/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/double_reference/output.mangleOnly.js new file mode 100644 index 00000000000..8ef39f3ba4b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/double_reference/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + var a = function a() { + a(); + }; + a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_1/output.mangleOnly.js new file mode 100644 index 00000000000..f29b3e162cb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function a(b) { + function a() {} + return a.length; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_2/output.mangleOnly.js new file mode 100644 index 00000000000..f29b3e162cb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/duplicate_lambda_defun_name_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function a(b) { + function a() {} + return a.length; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_await/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_await/output.mangleOnly.js new file mode 100644 index 00000000000..00f6433cdf1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_await/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + var a; + c().then((b)=>{ + a = b; + }); + c().then((b)=>{ + if (a !== (a = b)) console.log("FAIL"); + else console.log("PASS"); + }); +} +function b() {} +async function c() { + return await b; +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_conditional/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_conditional/output.mangleOnly.js new file mode 100644 index 00000000000..c677df78209 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_conditional/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a() { + var a = b(); + if (a !== (a = b())) console.log("FAIL"); + else console.log("PASS"); +} +function b(a) { + return a ? c : d; +} +function c() {} +function d() {} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_expansion/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_expansion/output.mangleOnly.js new file mode 100644 index 00000000000..0d34ab5f944 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_expansion/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + var a = d(); + if (a !== (a = d())) console.log("FAIL"); + else console.log("PASS"); +} +function b() {} +function c(...a) { + return a[0]; +} +function d() { + return c(...[ + b + ]); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_conditional/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_conditional/output.mangleOnly.js new file mode 100644 index 00000000000..1c4aa937a56 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_conditional/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a() { + var a = b(); + if (a !== (a = b())) console.log("PASS"); + else console.log("FAIL"); +} +function b(a) { + function b() {} + function c() {} + return a ? b : c; +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_sequence/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_sequence/output.mangleOnly.js new file mode 100644 index 00000000000..39b82c40568 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_sequence/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a() { + var a = b(); + if (a !== (a = b())) console.log("PASS"); + else console.log("FAIL"); +} +function b() { + function a() {} + function b() {} + return a, b; +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_throw/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_throw/output.mangleOnly.js new file mode 100644 index 00000000000..a65bd16d2a0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_local_throw/output.mangleOnly.js @@ -0,0 +1,14 @@ +function a() { + var a = b(); + if (a !== (a = b())) console.log("PASS"); + else console.log("FAIL"); +} +function b() { + function a() {} + try { + throw a; + } catch (b) { + return b; + } +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_throw/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_throw/output.mangleOnly.js new file mode 100644 index 00000000000..114df285704 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_throw/output.mangleOnly.js @@ -0,0 +1,14 @@ +function a() { + var a = b(); + if (a !== (a = b())) console.log("FAIL"); + else console.log("PASS"); +} +function b() { + try { + throw c; + } catch (a) { + return a; + } +} +function c() {} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_yield/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_yield/output.mangleOnly.js new file mode 100644 index 00000000000..2e4f2e70f43 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escape_yield/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a() { + var a = d.next().value; + if (a !== (a = d.next().value)) console.log("FAIL"); + else console.log("PASS"); +} +function c() {} +function* b(a) { + for(;;)yield c; +} +var d = b(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_1/output.mangleOnly.js new file mode 100644 index 00000000000..1da76d5326e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = { + o: { + a: 1 + } +}; +(function(a) { + a.a++; +})(a.o); +(function(a) { + console.log(a.a); +})(a.o); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_2/output.mangleOnly.js new file mode 100644 index 00000000000..1da76d5326e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_2/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = { + o: { + a: 1 + } +}; +(function(a) { + a.a++; +})(a.o); +(function(a) { + console.log(a.a); +})(a.o); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_3/output.mangleOnly.js new file mode 100644 index 00000000000..1897710c0c8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/escaped_prop_3/output.mangleOnly.js @@ -0,0 +1,13 @@ +var b; +function c(a) { + if (b) console.log(b === a.c); + b = a.c; +} +function d() {} +function a() { + c({ + c: d + }); +} +a(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/for_in_prop/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/for_in_prop/output.mangleOnly.js new file mode 100644 index 00000000000..f0242e4cdc8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/for_in_prop/output.mangleOnly.js @@ -0,0 +1,10 @@ +var a = { + foo: function() { + for(this.b in [ + 1, + 2 + ]); + } +}; +a.foo(); +console.log(a.b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_1/output.mangleOnly.js new file mode 100644 index 00000000000..b9f6a083ad8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 42; +!(function(a) { + console.log(a()); +})(function() { + return a; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_2/output.mangleOnly.js new file mode 100644 index 00000000000..cb0f3b936a1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_arg_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 42; +!(function(a) { + console.log(a()); +})(function(a) { + return a; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_inline/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_inline/output.mangleOnly.js new file mode 100644 index 00000000000..e8987d16a77 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_inline/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + var a = function() { + return 1; + }; + console.log(a() + b()); + var b = function() { + return 2; + }; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_modified/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_modified/output.mangleOnly.js new file mode 100644 index 00000000000..076ecef8967 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/func_modified/output.mangleOnly.js @@ -0,0 +1,16 @@ +function a(a) { + function a() { + return 1; + } + function b() { + return 2; + } + function c() { + return 3; + } + b.inject = []; + c = function() { + return 4; + }; + return a() + b() + c(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife/output.mangleOnly.js new file mode 100644 index 00000000000..20e7dd84136 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife/output.mangleOnly.js @@ -0,0 +1,4 @@ +!(function(b, a, c) { + a++; + console.log(b - 1, a * 1, c + 2); +})(1, 2, 3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_assign/output.mangleOnly.js new file mode 100644 index 00000000000..0ee4060de1d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_assign/output.mangleOnly.js @@ -0,0 +1,9 @@ +!(function() { + var a = 1, b = 0; + !(function() { + b++; + return; + a = 2; + })(); + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.mangleOnly.js new file mode 100644 index 00000000000..816752f81ce --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function(x) { + console.log(x() === eval("x")); +})(function a() { + return a; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.mangleOnly.js new file mode 100644 index 00000000000..086baec4dfe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +(function() { + var x = function a() { + return a; + }; + console.log(x() === eval("x")); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_func_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_func_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..fdc9379cb22 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_func_side_effects/output.mangleOnly.js @@ -0,0 +1,17 @@ +function a() { + console.log("x"); +} +function c() { + console.log("y"); +} +function b() { + console.log("z"); +} +(function(c, a, d) { + function b() { + console.log("FAIL"); + } + return b + a(); +})(a(), function() { + return c(); +}, b()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_new/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_new/output.mangleOnly.js new file mode 100644 index 00000000000..7205ebd0dd6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_new/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = new (function(b, a, c) { + a++; + console.log(b - 1, a * 1, c + 2); +})(1, 2, 3); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/immutable/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/immutable/output.mangleOnly.js new file mode 100644 index 00000000000..fc81b8aa23d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/immutable/output.mangleOnly.js @@ -0,0 +1,4 @@ +!(function() { + var a = "test"; + console.log(a.indexOf("e")); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_catch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_catch/output.mangleOnly.js new file mode 100644 index 00000000000..e746f8ef750 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_catch/output.mangleOnly.js @@ -0,0 +1,8 @@ +function b() { + try { + a(); + } catch (c) { + var b = 1; + } + console.log(b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_1/output.mangleOnly.js new file mode 100644 index 00000000000..9df6dc573c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + var a = 1; + x(a, b, d); + for(var b = 2, c = 3; x(a, b, c, d); x(a, b, c, d)){ + var d = 4, e = 5; + x(a, b, c, d, e); + } + x(a, b, c, d, e); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_2/output.mangleOnly.js new file mode 100644 index 00000000000..e1fa96bfcb9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function() { + var a = 1; + for(var b = 1; --b;)var a = 2; + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_1/output.mangleOnly.js new file mode 100644 index 00000000000..284a52f388e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_1/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a() { + var b = 1, a = 2; + for(a in (function() { + return x(b, a, c); + })()){ + var c = 3, d = 4; + x(b, a, c, d); + } + x(b, a, c, d); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_2/output.mangleOnly.js new file mode 100644 index 00000000000..4d56454e462 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_for_in_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a() { + for(var a in {})console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_if/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_if/output.mangleOnly.js new file mode 100644 index 00000000000..477d793d835 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_if/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a(b) { + if (b) var a = 1; + if (!a) console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_label/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_label/output.mangleOnly.js new file mode 100644 index 00000000000..7cb67fa3ca8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inner_var_label/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(a) { + l: { + if (a) break l; + var b = 1; + } + console.log(b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inverted_var/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inverted_var/output.mangleOnly.js new file mode 100644 index 00000000000..1b55ae8b1ee --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/inverted_var/output.mangleOnly.js @@ -0,0 +1,30 @@ +console.log((function() { + var a = 1; + return a; +})(), (function() { + var a; + a = 2; + return a; +})(), (function() { + a = 3; + return a; + var a; +})(), (function(a) { + a = 4; + return a; +})(), (function(a) { + a = 5; + return a; + var a; +})(), (function a() { + a = 6; + return a; +})(), (function a() { + a = 7; + return a; + var a; +})(), (function() { + a = 8; + return a; + var a = "foo"; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_1/output.mangleOnly.js new file mode 100644 index 00000000000..f965ff78bac --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + var a = ""; + for(a in { + break: "me" + })console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_2/output.mangleOnly.js new file mode 100644 index 00000000000..512d49e6671 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1533_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + var a = ""; + for(var a in { + break: "me" + })console.log(a); + console.log(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_1/output.mangleOnly.js new file mode 100644 index 00000000000..05821d36e37 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function a(b) { + return a(b + 1); +})(2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_2/output.mangleOnly.js new file mode 100644 index 00000000000..01afb29b744 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function b(a) { + return g(a + 1); +})(2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_3/output.mangleOnly.js new file mode 100644 index 00000000000..01afb29b744 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_3/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function b(a) { + return g(a + 1); +})(2); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_4/output.mangleOnly.js new file mode 100644 index 00000000000..c8ad1f5f0ef --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1595_4/output.mangleOnly.js @@ -0,0 +1,4 @@ +(function d(a, b, c) { + console.log(a, b, c); + if (a) d(a - 1, b, c); +})(3, 4, 5); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1606/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1606/output.mangleOnly.js new file mode 100644 index 00000000000..e5f3777c6e8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1606/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + var b; + function c() {} + var a = 2; + x(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_1/output.mangleOnly.js new file mode 100644 index 00000000000..8d88a07083e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_1/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function b() { + switch(1){ + case 0: + var a = true; + break; + default: + if (typeof a === "undefined") console.log("PASS"); + else console.log("FAIL"); + } +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_2/output.mangleOnly.js new file mode 100644 index 00000000000..8d88a07083e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_2/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function b() { + switch(1){ + case 0: + var a = true; + break; + default: + if (typeof a === "undefined") console.log("PASS"); + else console.log("FAIL"); + } +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_3/output.mangleOnly.js new file mode 100644 index 00000000000..847142a3db2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_3/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function b() { + switch(1){ + case 0: + var a = true; + break; + case 1: + if (typeof a === "undefined") console.log("PASS"); + else console.log("FAIL"); + } +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_4/output.mangleOnly.js new file mode 100644 index 00000000000..847142a3db2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_4/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function b() { + switch(1){ + case 0: + var a = true; + break; + case 1: + if (typeof a === "undefined") console.log("PASS"); + else console.log("FAIL"); + } +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_5/output.mangleOnly.js new file mode 100644 index 00000000000..7c3c208f9ae --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_5/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function(a) { + switch(1){ + case a: + console.log(a); + break; + default: + console.log(2); + break; + } +})(1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_6/output.mangleOnly.js new file mode 100644 index 00000000000..4b647dc6401 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1670_6/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function(a) { + switch(1){ + case (a = 1): + console.log(a); + break; + default: + console.log(2); + break; + } +})(1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_1/output.mangleOnly.js new file mode 100644 index 00000000000..4fb4e541726 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +const a = 42; +!(function() { + var b = a; + !(function(a) { + console.log(a++, b); + })(0); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_2/output.mangleOnly.js new file mode 100644 index 00000000000..7176eadabec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1814_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +const a = "32"; +!(function() { + var b = a + 1; + !(function(a) { + console.log(b, a++); + })(0); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_1/output.mangleOnly.js new file mode 100644 index 00000000000..0b4fbabb8d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + console.log(b, b, b); +} +var b = 1; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_2/output.mangleOnly.js new file mode 100644 index 00000000000..0b4fbabb8d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + console.log(b, b, b); +} +var b = 1; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_3/output.mangleOnly.js new file mode 100644 index 00000000000..0b4fbabb8d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_3/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + console.log(b, b, b); +} +var b = 1; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_4/output.mangleOnly.js new file mode 100644 index 00000000000..0b4fbabb8d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1850_4/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + console.log(b, b, b); +} +var b = 1; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1865/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1865/output.mangleOnly.js new file mode 100644 index 00000000000..7b7abf00e46 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1865/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(a) { + a.thing = false; +} +console.log((function() { + var b = { + thing: true + }; + a(b); + return b.thing; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_1/output.mangleOnly.js new file mode 100644 index 00000000000..6f570af366d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function(a) { + arguments[0] = 2; + return a; +})(1)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_2/output.mangleOnly.js new file mode 100644 index 00000000000..1867e1a0688 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_1922_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log((function() { + var a; + eval("a = 1"); + return a; +})(1)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_1/output.mangleOnly.js new file mode 100644 index 00000000000..bb7e1f46888 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +console.log((function() { + var a = 1; + [].forEach(()=>(a = 2)); + return a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_2/output.mangleOnly.js new file mode 100644 index 00000000000..7565845a2cc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2090_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +console.log((function() { + var a = 1; + [].forEach(()=>{ + a = 2; + }); + return a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_1/output.mangleOnly.js new file mode 100644 index 00000000000..01f66453786 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_1/output.mangleOnly.js @@ -0,0 +1,16 @@ +const a = { + fn: function() { + return this; + } +}; +let b = { + fn: function() { + return this; + } +}; +var c = { + fn: function() { + return this; + } +}; +console.log(a.fn(), b.fn(), c.fn()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_2/output.mangleOnly.js new file mode 100644 index 00000000000..01f66453786 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2406_2/output.mangleOnly.js @@ -0,0 +1,16 @@ +const a = { + fn: function() { + return this; + } +}; +let b = { + fn: function() { + return this; + } +}; +var c = { + fn: function() { + return this; + } +}; +console.log(a.fn(), b.fn(), c.fn()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2416/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2416/output.mangleOnly.js new file mode 100644 index 00000000000..1e8c59746ae --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2416/output.mangleOnly.js @@ -0,0 +1,3 @@ +class a { +} +console.log(a.name); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_1/output.mangleOnly.js new file mode 100644 index 00000000000..a24d2c3f191 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_1/output.mangleOnly.js @@ -0,0 +1,16 @@ +function a() { + var a = this; + if (a.count++) a.foo(); + else a.bar(); +} +var b = { + count: 0, + foo: function() { + console.log("foo"); + }, + bar: function() { + console.log("bar"); + } +}; +a.call(b); +a.call(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_2/output.mangleOnly.js new file mode 100644 index 00000000000..bd0c66f3443 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_2/output.mangleOnly.js @@ -0,0 +1,14 @@ +function a() { + var a = this; + if (a.bar) a.foo(); + else !(function(a, b) { + console.log(this === a, b === this, a === b); + })(a, this); +} +a.call({ + bar: 1, + foo: function() { + console.log("foo", this.bar); + } +}); +a.call({}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_3/output.mangleOnly.js new file mode 100644 index 00000000000..06601d263a7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2420_3/output.mangleOnly.js @@ -0,0 +1,14 @@ +function a() { + var a = this; + if (a.bar) a.foo(); + else ((a, b)=>{ + console.log(this === a, b === this, a === b); + })(a, this); +} +a.call({ + bar: 1, + foo: function() { + console.log("foo", this.bar); + } +}); +a.call({}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_1/output.mangleOnly.js new file mode 100644 index 00000000000..7a3c688adb1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_1/output.mangleOnly.js @@ -0,0 +1,8 @@ +function b() { + return 1; +} +function a() { + console.log(b()); +} +a(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_2/output.mangleOnly.js new file mode 100644 index 00000000000..7a3c688adb1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_2/output.mangleOnly.js @@ -0,0 +1,8 @@ +function b() { + return 1; +} +function a() { + console.log(b()); +} +a(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_3/output.mangleOnly.js new file mode 100644 index 00000000000..44dac8c0195 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_3/output.mangleOnly.js @@ -0,0 +1,7 @@ +function b() { + return 1; +} +function a() { + console.log(b()); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_4/output.mangleOnly.js new file mode 100644 index 00000000000..44dac8c0195 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +function b() { + return 1; +} +function a() { + console.log(b()); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_5/output.mangleOnly.js new file mode 100644 index 00000000000..696e49a5edf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_5/output.mangleOnly.js @@ -0,0 +1,14 @@ +function b() { + c(); +} +function c() { + console.log(1); +} +function a() { + function a() { + console.log(2); + } + b(); +} +a(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_6/output.mangleOnly.js new file mode 100644 index 00000000000..e1e8951baf2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2423_6/output.mangleOnly.js @@ -0,0 +1,15 @@ +function b() { + c(); +} +function c() { + console.log(1); +} +function a() { + function a() { + console.log(2); + } + b(); + a(); +} +a(); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2436/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2436/output.mangleOnly.js new file mode 100644 index 00000000000..224997e6c64 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2436/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a; +console.log((((a = { + a: 1, + b: 2 +}).a = 3), { + x: a.a, + y: a.b +})); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_1/output.mangleOnly.js new file mode 100644 index 00000000000..4b7dd0242d6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +function foo() { + return bar(); +} +baz = { + quux: foo +}; +exec = function() { + return eval("foo()"); +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_2/output.mangleOnly.js new file mode 100644 index 00000000000..a3696cb5a45 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_eval_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +baz = { + quux: foo +}; +exec = function() { + return eval("foo()"); +}; +function foo() { + return bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_1/output.mangleOnly.js new file mode 100644 index 00000000000..dd79f051dbb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +function foo() { + return bar(); +} +baz = { + quux: foo +}; +with (o)whatever(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_2/output.mangleOnly.js new file mode 100644 index 00000000000..7c6a04a6216 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2440_with_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +baz = { + quux: foo +}; +with (o)whatever(); +function foo() { + return bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2442/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2442/output.mangleOnly.js new file mode 100644 index 00000000000..ed2056221b1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2442/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a() { + a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2449/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2449/output.mangleOnly.js new file mode 100644 index 00000000000..593714c1918 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2449/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = "PASS"; +function b() { + return a; +} +function c() { + return b(); +} +(function() { + var a = "FAIL"; + if (a == a) console.log(c()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_1/output.mangleOnly.js new file mode 100644 index 00000000000..aec502e6a13 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +function b() {} +function a() { + return b; +} +console.log(a() === a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_2/output.mangleOnly.js new file mode 100644 index 00000000000..152dd3fe12f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_2/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + function a() {} + return a; +} +console.log(a() === a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_3/output.mangleOnly.js new file mode 100644 index 00000000000..bb274fa3a13 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_3/output.mangleOnly.js @@ -0,0 +1,12 @@ +var a = (function() { + function a() { + return "foo"; + } + return function b() { + return [ + 1, + a + ]; + }; +})(); +console.log(a()[1] === a()[1]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_4/output.mangleOnly.js new file mode 100644 index 00000000000..9d0132feead --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +var d; +function a(a) { + console.log(d === a); + d = a; +} +function b() {} +for(var c = 3; --c >= 0;)a(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_5/output.mangleOnly.js new file mode 100644 index 00000000000..ce03aa14b72 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2450_5/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a; +function b(b) { + console.log(a === b); + a = b; +} +function c() {} +[ + 1, + 2, + 3 +].forEach(function() { + b(c); +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2455/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2455/output.mangleOnly.js new file mode 100644 index 00000000000..62cd9954edd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2455/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + var a = this; + for(;;)a.bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2485/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2485/output.mangleOnly.js new file mode 100644 index 00000000000..3094b89f2a6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2485/output.mangleOnly.js @@ -0,0 +1,22 @@ +var a = function(a) { + var b = function(a, b) { + return a + b; + }; + var c = function(a) { + return a.reduce(b, 0); + }; + var d = function(a) { + return c(a); + }; + a.baz = function(b) { + var a = d(b); + return (a.get = 1), a; + }; + return a; +}; +var b = a({}); +console.log(b.baz([ + 1, + 2, + 3 +])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2496/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2496/output.mangleOnly.js new file mode 100644 index 00000000000..bc37ec95891 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2496/output.mangleOnly.js @@ -0,0 +1,18 @@ +function b(a) { + a(); +} +class a { + constructor(a){ + this.message = a; + } + go() { + this.message = "PASS"; + console.log(this.message); + } + run() { + b(()=>{ + this.go(); + }); + } +} +new a("FAIL").run(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2598/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2598/output.mangleOnly.js new file mode 100644 index 00000000000..94d04a9414d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2598/output.mangleOnly.js @@ -0,0 +1,5 @@ +function b() {} +function a(a) { + return a || b; +} +console.log(a(false) === a(null)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2669/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2669/output.mangleOnly.js new file mode 100644 index 00000000000..1e065934ecb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2669/output.mangleOnly.js @@ -0,0 +1,4 @@ +let a; +console.log(([a] = [ + "PASS" +]) && a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2670/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2670/output.mangleOnly.js new file mode 100644 index 00000000000..2cd78bf5cf0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2670/output.mangleOnly.js @@ -0,0 +1,4 @@ +const a = {}; +a.prop = "PASS"; +const { prop: b } = a; +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_1/output.mangleOnly.js new file mode 100644 index 00000000000..43e44ba561c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +let a; +(function() { + let b; + console.log(a, b); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_2/output.mangleOnly.js new file mode 100644 index 00000000000..78dc562417a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2757_2/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function() { + let a; + const b = function() { + a = true; + }; + if (!a) { + console.log(1); + } + console.log(2); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2774/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2774/output.mangleOnly.js new file mode 100644 index 00000000000..91444553551 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2774/output.mangleOnly.js @@ -0,0 +1,7 @@ +console.log({ + get a () { + var a; + (a = true) && a.c; + a = void 0; + } +}.a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_1/output.mangleOnly.js new file mode 100644 index 00000000000..c7d763c03da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_1/output.mangleOnly.js @@ -0,0 +1,12 @@ +console.log((function() { + return a; + function a(a) { + function c(a) { + return a && a + c(a - 1); + } + function b(a) { + return c(a); + } + return b(a); + } +})()(5)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_2/output.mangleOnly.js new file mode 100644 index 00000000000..9373f4df662 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2799_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +(function() { + function a() { + Function.prototype.call.apply(console.log, [ + null, + "PASS" + ]); + } + a(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2836/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2836/output.mangleOnly.js new file mode 100644 index 00000000000..60f4ea6e488 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2836/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + return "FAIL"; +} +console.log(a()); +function a() { + return "PASS"; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_1/output.mangleOnly.js new file mode 100644 index 00000000000..3b69cdb2ada --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function(a) { + return (a ^= 1); + a ^= 2; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_2/output.mangleOnly.js new file mode 100644 index 00000000000..3b69cdb2ada --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2860_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log((function(a) { + return (a ^= 1); + a ^= 2; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2869/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2869/output.mangleOnly.js new file mode 100644 index 00000000000..ee06d6377d2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2869/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +(function c(b) { + var b; + if (!c) b = 0; + if (b) a = "PASS"; +})(1); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2916/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2916/output.mangleOnly.js new file mode 100644 index 00000000000..b7d7527403c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2916/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = "FAIL"; +(function(b) { + (function(a) { + a[0] = 1; + })(b); + +b && (a = "PASS"); +})([]); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2919/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2919/output.mangleOnly.js new file mode 100644 index 00000000000..8728ee88d56 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2919/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = [ + function() {} +]; +console.log(typeof a[0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_294/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_294/output.mangleOnly.js new file mode 100644 index 00000000000..77f93495756 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_294/output.mangleOnly.js @@ -0,0 +1,12 @@ +module.exports = (function(a) { + return a(); +})(function() { + return function(a) { + var b = a.key; + return { + mappedKey: (function(a) { + return a || "CONDITIONAL_DEFAULT_VALUE"; + })(b) + }; + }; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2992/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2992/output.mangleOnly.js new file mode 100644 index 00000000000..fa167bbac9c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_2992/output.mangleOnly.js @@ -0,0 +1,9 @@ +var a = "PASS"; +(function c(b) { + switch(0){ + case 0: + case (b = 1): + b && (a = "FAIL"); + } +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_1/output.mangleOnly.js new file mode 100644 index 00000000000..76892a8df39 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_1/output.mangleOnly.js @@ -0,0 +1,8 @@ +function b() {} +var a = [ + 1, + 2 +].map(function() { + return new b(); +}); +console.log(a[0].constructor === a[1].constructor); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_2/output.mangleOnly.js new file mode 100644 index 00000000000..35ddf632e4a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3042_2/output.mangleOnly.js @@ -0,0 +1,18 @@ +function c() { + this.isFoo = function(a) { + return a instanceof c; + }; +} +function b() { + this.foos = [ + 1, + 1 + ].map(function() { + return new c(); + }); +} +var a = new b(); +console.log(a.foos[0].isFoo(a.foos[0])); +console.log(a.foos[0].isFoo(a.foos[1])); +console.log(a.foos[1].isFoo(a.foos[0])); +console.log(a.foos[1].isFoo(a.foos[1])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_1/output.mangleOnly.js new file mode 100644 index 00000000000..cfe93c08cf3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +(function() { + do { + continue; + var a = "defined"; + }while (a && a.c) +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_2/output.mangleOnly.js new file mode 100644 index 00000000000..583136479bd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3068_2/output.mangleOnly.js @@ -0,0 +1,10 @@ +(function() { + do { + try { + while("" == typeof a); + } finally{ + continue; + } + var b = "defined"; + }while (b && b.c) +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_308/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_308/output.mangleOnly.js new file mode 100644 index 00000000000..68ed05d5530 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_308/output.mangleOnly.js @@ -0,0 +1,14 @@ +exports.withStyles = b; +function a(a) { + if (typeof a !== "function") { + throw new TypeError(); + } + Object.create(a); +} +function b() { + var b = EXTERNAL(); + return (function(b) { + a(b); + function c() {} + })(b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_1/output.mangleOnly.js new file mode 100644 index 00000000000..e17428ef5cb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +(function() { + function a() { + return c ? "foo" : "bar"; + } + var c = true; + var b = { + foo: a + }; + console.log(a()); + console.log(b.foo()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_2/output.mangleOnly.js new file mode 100644 index 00000000000..b7af10cb332 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_2/output.mangleOnly.js @@ -0,0 +1,11 @@ +(function() { + function a() { + return c ? "foo" : "bar"; + } + var c = true; + console.log(a()); + var b = { + foo: a + }; + console.log(b.foo()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_3/output.mangleOnly.js new file mode 100644 index 00000000000..f176076e067 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3110_3/output.mangleOnly.js @@ -0,0 +1,11 @@ +(function() { + function a() { + return c ? "foo" : "bar"; + } + console.log(a()); + var c = true; + var b = { + foo: a + }; + console.log(b.foo()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_1/output.mangleOnly.js new file mode 100644 index 00000000000..3c9e928fc0e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_1/output.mangleOnly.js @@ -0,0 +1,12 @@ +var a = 0; +(function() { + function b() { + while(d()); + } + var c = b(); + function d() { + c && c[a++]; + } + d((c = 1)); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_2/output.mangleOnly.js new file mode 100644 index 00000000000..23f0b50acc4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a = 0; +(function() { + function b() { + while(d()); + } + var c = b(); + function d() { + c && c[a++]; + } + c = 1; + d(); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_3/output.mangleOnly.js new file mode 100644 index 00000000000..965f7333f1f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_3/output.mangleOnly.js @@ -0,0 +1,12 @@ +var a = 0; +(function() { + function d() { + while(c()); + } + var b; + function c() { + b && b[a++]; + } + c((b = 1)); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_4/output.mangleOnly.js new file mode 100644 index 00000000000..182f2607561 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_4/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 0, c = 0; +function b() { + c += a; +} +b(b(), ++a); +console.log(a, c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_5/output.mangleOnly.js new file mode 100644 index 00000000000..ed4ae73bdfd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3113_5/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a() { + console.log(c); +} +function b() { + a(); +} +while(b()); +var c = 1; +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3125/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3125/output.mangleOnly.js new file mode 100644 index 00000000000..7edde784ffd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3125/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a; +console.log((function() { + this.p++; +}.call((a = { + p: 6 +})), a.p)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_1/output.mangleOnly.js new file mode 100644 index 00000000000..f106bbe19ae --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_1/output.mangleOnly.js @@ -0,0 +1,15 @@ +(function() { + var b; + function a() {} + a.g = function c() { + function a() { + console.log(b ? "PASS" : "FAIL"); + } + b = true; + this(); + b = false; + a.g = c; + return a; + }; + return a; +})().g().g(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_2/output.mangleOnly.js new file mode 100644 index 00000000000..979678262ea --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_2/output.mangleOnly.js @@ -0,0 +1,16 @@ +(function() { + var b; + function a() {} + a.g = function c() { + var d = this; + function a() { + console.log(b ? "PASS" : "FAIL"); + } + b = true; + d(); + b = false; + a.g = c; + return a; + }; + return a; +})().g().g(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_3/output.mangleOnly.js new file mode 100644 index 00000000000..f1bb8a5de0a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_3/output.mangleOnly.js @@ -0,0 +1,18 @@ +(function() { + var b; + function a() {} + a.g = function c() { + var d = this; + function a() { + console.log(b ? "PASS" : "FAIL"); + } + b = true; + (function() { + return d; + })()(); + b = false; + a.g = c; + return a; + }; + return a; +})().g().g(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_4/output.mangleOnly.js new file mode 100644 index 00000000000..c6ab57affc6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_4/output.mangleOnly.js @@ -0,0 +1,18 @@ +(function() { + var b; + function a() {} + a.g = function c() { + var d = { + p: this + }; + function a() { + console.log(b ? "PASS" : "FAIL"); + } + b = true; + d.p(); + b = false; + a.g = c; + return a; + }; + return a; +})().g().g(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_5/output.mangleOnly.js new file mode 100644 index 00000000000..483d1478797 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_3140_5/output.mangleOnly.js @@ -0,0 +1,12 @@ +var b = 1, a = 0; +(function(e) { + var c = (function() { + this; + b-- && d(); + })(); + function d() { + c && a++; + } + d((c = 1)); +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_369/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_369/output.mangleOnly.js new file mode 100644 index 00000000000..d45d77f408e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_369/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = (function(a) { + function a() { + console.log("Value after override"); + } + return a; +})("Value before override"); +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_379/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_379/output.mangleOnly.js new file mode 100644 index 00000000000..b84df9b0773 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_379/output.mangleOnly.js @@ -0,0 +1 @@ +global.a = ((...a)=>(a, b)=>a.foo === b.foo)(...args); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_1/output.mangleOnly.js new file mode 100644 index 00000000000..45e4bd5a7d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +const a = ()=>{ + b(); +}; +function b() { + const a = ()=>{ + var a = ()=>{ + b(); + }; + }; + a(); +} +leak(()=>Topology); +console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_2/output.mangleOnly.js new file mode 100644 index 00000000000..925a00cc83e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_432_2/output.mangleOnly.js @@ -0,0 +1,14 @@ +const a = ()=>{ + b(); +}; +function b() { + function a() { + var a = ()=>{ + b(); + }; + leak(a); + } + a(); +} +leak(()=>Topology); +console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_443/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_443/output.mangleOnly.js new file mode 100644 index 00000000000..428b790e865 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_443/output.mangleOnly.js @@ -0,0 +1,8 @@ +const c = "PASS"; +var a = ()=>{ + if (c) return c; +}; +{ + let b = a(); + console.log(b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581/output.mangleOnly.js new file mode 100644 index 00000000000..aa0e131651f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581/output.mangleOnly.js @@ -0,0 +1,13 @@ +class a { + method() { + const a = "FAIL"; + return b(a, ()=>console.log(this.message())); + } + message() { + return "PASS"; + } +} +function b(a, b) { + return b(a); +} +new a().method(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581_2/output.mangleOnly.js new file mode 100644 index 00000000000..d93e0eb8332 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_581_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +(function() { + return (function(a) { + return a(); + })(()=>{ + console.log(this.message); + }); +}.call({ + message: "PASS" +})); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_639/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_639/output.mangleOnly.js new file mode 100644 index 00000000000..c4378338c19 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_639/output.mangleOnly.js @@ -0,0 +1,21 @@ +const a = id({ + extname: (a)=>{ + console.log("PASS:" + a); + } +}); +global.getExtFn = function a() { + return function(a) { + return b(a); + }; +}; +function b(b) { + let a; + if (!a) { + a = c(b); + } + return a; +} +function c(b) { + return a.extname(b); +} +getExtFn()("name"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_2/output.mangleOnly.js new file mode 100644 index 00000000000..bde1e3f047a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a = console.log; +var b = 0; +global.problem = ()=>{ + var c = b; + a(c); +}; +global.increment = ()=>{ + b++; +}; +increment(); +problem(); +increment(); +problem(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_reference_cycle/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_reference_cycle/output.mangleOnly.js new file mode 100644 index 00000000000..a30cb59d8e1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/issue_741_reference_cycle/output.mangleOnly.js @@ -0,0 +1,5 @@ +for(var b = console.log, a = 1; a <= 3;){ + var c = a; + b(c); + a++; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_1/output.mangleOnly.js new file mode 100644 index 00000000000..f719fc79090 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = 1; +var b = a++, a = NaN; +console.log(b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_2/output.mangleOnly.js new file mode 100644 index 00000000000..e4143cae5d8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/lvalues_def_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = 1; +var b = (a += 1), a = NaN; +console.log(b, a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_1/output.mangleOnly.js new file mode 100644 index 00000000000..b08174d6afd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 1; +console.log(new (class { + a() { + a = 2; + return a; + } +})().a(), a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_2/output.mangleOnly.js new file mode 100644 index 00000000000..149cd686da5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/method_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var b = 1; +var a = class { + c() { + console.log(b); + } +}; +new a().c(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/modified/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/modified/output.mangleOnly.js new file mode 100644 index 00000000000..81f42cbc346 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/modified/output.mangleOnly.js @@ -0,0 +1,46 @@ +function a() { + var b = 1, a = 2; + a++; + console.log(b + 1); + console.log(a + 1); +} +function b() { + var b = 1, a = 2; + --a; + console.log(b + 1); + console.log(a + 1); +} +function c() { + var c = 1, a = 2, b = 3; + a = b; + console.log(c + a); + console.log(a + b); + console.log(c + b); + console.log(c + a + b); +} +function d() { + var c = 1, a = 2, b = 3; + a *= b; + console.log(c + a); + console.log(a + b); + console.log(c + b); + console.log(c + a + b); +} +function e() { + var c = 1, a = 2, b = 3; + if (c) { + a = b; + } else { + b = a; + } + console.log(c + a); + console.log(a + b); + console.log(c + b); + console.log(c + a + b); +} +function f(a) { + B = a; + console.log(typeof A ? "yes" : "no"); + console.log(typeof B ? "yes" : "no"); +} +a(), b(), c(), d(), e(), f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_1/output.mangleOnly.js new file mode 100644 index 00000000000..20d8f7185e1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(b) { + if (b) var a = 1; + else var a = 2; + console.log(a + 1); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_2/output.mangleOnly.js new file mode 100644 index 00000000000..1e10caf9115 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + if (code == 16) var a = 2, b = 3, c = len; + else if (code == 17) var a = 3, b = 3, c = (len = 0); + else if (code == 18) var a = 7, b = 11, c = (len = 0); + var d = this.getBits(a) + b; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_3/output.mangleOnly.js new file mode 100644 index 00000000000..bffbf27ed3a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/multi_def_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a(b) { + var a = 2; + if (b) var a; + else var a; + console.log(a + 1); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/named_function_with_recursive_ref_reuse/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/named_function_with_recursive_ref_reuse/output.mangleOnly.js new file mode 100644 index 00000000000..32475ae60e6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/named_function_with_recursive_ref_reuse/output.mangleOnly.js @@ -0,0 +1,9 @@ +var a = []; +var b = function b() { + a.push(b); +}; +[ + 0, + 1 +].map(()=>b()); +console.log(a[0] === a[1]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_1/output.mangleOnly.js new file mode 100644 index 00000000000..513066c332c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +var b = 1; +function a(a) { + return a.bar(); +} +console.log(a({ + bar: function() { + return b + b; + } +})); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_2/output.mangleOnly.js new file mode 100644 index 00000000000..513066c332c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_arg_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +var b = 1; +function a(a) { + return a.bar(); +} +console.log(a({ + bar: function() { + return b + b; + } +})); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_1/output.mangleOnly.js new file mode 100644 index 00000000000..2b082c3ca3f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +var b = { + a: 1 +}; +for(var a = b.a--; a; a--)console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_2/output.mangleOnly.js new file mode 100644 index 00000000000..05f9b0ae548 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_for_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +var b = { + a: 1 +}; +for(var a; (a = b.a--);)console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_1/output.mangleOnly.js new file mode 100644 index 00000000000..533f70a41ec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +var b = 1; +var a = { + bar: function() { + return b + b; + } +}; +console.log(a.bar()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_2/output.mangleOnly.js new file mode 100644 index 00000000000..533f70a41ec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/obj_var_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var b = 1; +var a = { + bar: function() { + return b + b; + } +}; +console.log(a.bar()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/passes/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/passes/output.mangleOnly.js new file mode 100644 index 00000000000..19ab29152fa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/passes/output.mangleOnly.js @@ -0,0 +1,12 @@ +function a() { + var c = 1, a = 2, b = 3; + if (c) { + a = b; + } else { + b = a; + } + console.log(c + a); + console.log(a + b); + console.log(c + b); + console.log(c + a + b); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_1/output.mangleOnly.js new file mode 100644 index 00000000000..c3bcdcf689b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +function d(a, b, c) { + return a < b ? a * b + c : a * c - b; +} +function c(a, b, c) { + return d(a, b, c); +} +var b = 0; +for(var a = 0; a < 100; ++a){ + b += c(a, a + 1, 3 * a); +} +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_3/output.mangleOnly.js new file mode 100644 index 00000000000..e2b6c177b03 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_3/output.mangleOnly.js @@ -0,0 +1,9 @@ +var d = function(a, b, c) { + return a < b ? a * b + c : a * c - b; +}; +var c = function(a, b, c) { + return d(a, b, c); +}; +var b = 0; +for(var a = 0; a < 100; ++a)b += c(a, a + 1, 3 * a); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_5/output.mangleOnly.js new file mode 100644 index 00000000000..7d7812db032 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_5/output.mangleOnly.js @@ -0,0 +1,11 @@ +function c(a, b, c) { + function d(a, b, c) { + return a < b ? a * b + c : a * c - b; + } + return d(a, b, c); +} +var b = 0; +for(var a = 0; a < 100; ++a){ + b += c(a, a + 1, 3 * a); +} +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_7/output.mangleOnly.js new file mode 100644 index 00000000000..3ace1af5c35 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/perf_7/output.mangleOnly.js @@ -0,0 +1,9 @@ +var c = function(a, b, c) { + var d = function(a, b, c) { + return a < b ? a * b + c : a * c - b; + }; + return d(a, b, c); +}; +var b = 0; +for(var a = 0; a < 100; ++a)b += c(a, a + 1, 3 * a); +console.log(b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_1/output.mangleOnly.js new file mode 100644 index 00000000000..e6819296d76 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +try { + var a = (a.b, 2); +} catch (b) {} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_2/output.mangleOnly.js new file mode 100644 index 00000000000..b53e8508631 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_2/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a; +var a = a && a.b; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_3/output.mangleOnly.js new file mode 100644 index 00000000000..b53e8508631 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/pure_getters_3/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a; +var a = a && a.b; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_1/output.mangleOnly.js new file mode 100644 index 00000000000..ed2536ec82b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_1/output.mangleOnly.js @@ -0,0 +1,9 @@ +!(function() { + function a() { + b(); + } + function b() { + a(); + } + console.log("PASS"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_2/output.mangleOnly.js new file mode 100644 index 00000000000..9247bb8da35 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +!(function() { + function a() { + c(); + } + function b() { + a(); + } + function c() { + b(); + } + console.log("PASS"); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_3/output.mangleOnly.js new file mode 100644 index 00000000000..a4f25a5e958 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_3/output.mangleOnly.js @@ -0,0 +1,15 @@ +!(function() { + function b(a) { + console.log("foo", a); + if (a) c(a - 1); + } + function c(b) { + console.log("bar", b); + if (b) a(b - 1); + } + function a(a) { + console.log("qux", a); + if (a) b(a - 1); + } + a(4); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_4/output.mangleOnly.js new file mode 100644 index 00000000000..bdb9d3703dc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_4/output.mangleOnly.js @@ -0,0 +1,16 @@ +!(function() { + function c(b) { + console.log("foo", b); + if (b) a(b - 1); + } + function a(a) { + console.log("bar", a); + if (a) b(a - 1); + } + function b(a) { + console.log("qux", a); + if (a) c(a - 1); + } + b(4); + a(5); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_5/output.mangleOnly.js new file mode 100644 index 00000000000..7b5df25185c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/recursive_inlining_5/output.mangleOnly.js @@ -0,0 +1,17 @@ +!(function() { + function a(a) { + console.log("foo", a); + if (a) b(a - 1); + } + function b(a) { + console.log("bar", a); + if (a) c(a - 1); + } + function c(b) { + console.log("qux", b); + if (b) a(b - 1); + } + c(4); + b(5); + a(3); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_1/output.mangleOnly.js new file mode 100644 index 00000000000..5cfe22a9917 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + var arguments; + return typeof arguments; +} +function b() { + var arguments = 42; + return typeof arguments; +} +function c(a) { + var arguments = a; + return typeof arguments; +} +console.log(a(), b(), c()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_2/output.mangleOnly.js new file mode 100644 index 00000000000..5cfe22a9917 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + var arguments; + return typeof arguments; +} +function b() { + var arguments = 42; + return typeof arguments; +} +function c(a) { + var arguments = a; + return typeof arguments; +} +console.log(a(), b(), c()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_3/output.mangleOnly.js new file mode 100644 index 00000000000..5cfe22a9917 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_arguments_3/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + var arguments; + return typeof arguments; +} +function b() { + var arguments = 42; + return typeof arguments; +} +function c(a) { + var arguments = a; + return typeof arguments; +} +console.log(a(), b(), c()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_1/output.mangleOnly.js new file mode 100644 index 00000000000..b319572b734 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a) { + var a; + return typeof a; +} +function b(a) { + var a = 42; + return typeof a; +} +function c(a, b) { + var a = b; + return typeof a; +} +console.log(a([]), b([]), c([])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_2/output.mangleOnly.js new file mode 100644 index 00000000000..b319572b734 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a) { + var a; + return typeof a; +} +function b(a) { + var a = 42; + return typeof a; +} +function c(a, b) { + var a = b; + return typeof a; +} +console.log(a([]), b([]), c([])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_3/output.mangleOnly.js new file mode 100644 index 00000000000..b319572b734 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/redefine_farg_3/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a) { + var a; + return typeof a; +} +function b(a) { + var a = 42; + return typeof a; +} +function c(a, b) { + var a = b; + return typeof a; +} +console.log(a([]), b([]), c([])); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_extends/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_extends/output.mangleOnly.js new file mode 100644 index 00000000000..51166991667 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_extends/output.mangleOnly.js @@ -0,0 +1,10 @@ +let a = ""; +class b extends ((a += "PA"), Array) { +} +class c extends ((a += "SS"), Array) { +} +global.something = [ + new c(), + new b() +]; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_properties/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_properties/output.mangleOnly.js new file mode 100644 index 00000000000..e8780389c2e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_class_with_side_effects_in_properties/output.mangleOnly.js @@ -0,0 +1,12 @@ +let a = ""; +class b { + static _ = (a += "PA"); +} +class c { + static _ = (a += "SS"); +} +global.something = [ + new c(), + new b() +]; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_1/output.mangleOnly.js new file mode 100644 index 00000000000..210e370868c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_1/output.mangleOnly.js @@ -0,0 +1,17 @@ +(function() { + function c() { + return 123; + } + function b() { + return [ + c + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], a[0][0]()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_2/output.mangleOnly.js new file mode 100644 index 00000000000..747d37a7116 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_array_2/output.mangleOnly.js @@ -0,0 +1,17 @@ +(function() { + function c() { + return 123; + } + function b(a) { + return [ + a || c + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], a[0][0]()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_1/output.mangleOnly.js new file mode 100644 index 00000000000..429f52037cc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_1/output.mangleOnly.js @@ -0,0 +1,19 @@ +(function() { + function c() { + return 123; + } + function b() { + return [ + { + prop: c + }.prop + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], a[0][0]()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_2/output.mangleOnly.js new file mode 100644 index 00000000000..747d37a7116 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_funcs_in_object_literal_2/output.mangleOnly.js @@ -0,0 +1,17 @@ +(function() { + function c() { + return 123; + } + function b(a) { + return [ + a || c + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], a[0][0]()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_vars/output.mangleOnly.js new file mode 100644 index 00000000000..2f3182dff77 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/reduce_vars/output.mangleOnly.js @@ -0,0 +1,26 @@ +var A = 1; +(function b() { + var a = 2; + console.log(a - 5); + console.log(A - 5); +})(); +(function f1() { + var a = 2; + console.log(a - 5); + eval("console.log(a);"); +})(); +(function f2(eval) { + var a = 2; + console.log(a - 5); + eval("console.log(a);"); +})(eval); +(function b() { + var a = typeof C !== "undefined"; + var c = 4; + if (a) { + return "yes"; + } else { + return "no"; + } +})(); +console.log(A + 1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/regex_loop/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/regex_loop/output.mangleOnly.js new file mode 100644 index 00000000000..74a67ddfdff --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/regex_loop/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a(b) { + for(var a, c = "acdabcdeabbb"; (a = b().exec(c));)console.log(a[0]); +} +var b = /ab*/g; +a(function() { + return b; +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/side_effects_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/side_effects_assign/output.mangleOnly.js new file mode 100644 index 00000000000..b1d3f4c953c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/side_effects_assign/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = typeof void (a && a.in == 1, 0); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_array/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_array/output.mangleOnly.js new file mode 100644 index 00000000000..3dabc39ffb8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_array/output.mangleOnly.js @@ -0,0 +1,19 @@ +(function() { + class c { + data() { + return 123; + } + } + function b(a) { + return [ + a || c + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], new a[0][0]().data()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_object_literal/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_object_literal/output.mangleOnly.js new file mode 100644 index 00000000000..b2da0e0ae9a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/single_use_class_referenced_in_object_literal/output.mangleOnly.js @@ -0,0 +1,21 @@ +(function() { + class c { + data() { + return 123; + } + } + function b(a) { + return [ + { + prop: a || c + }.prop + ].concat([ + 2 + ]); + } + var a = [ + b(), + b() + ]; + console.log(a[0][0] === a[1][0], new a[0][0]().data()); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off/output.mangleOnly.js new file mode 100644 index 00000000000..81278ce63fe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = 3; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_1/output.mangleOnly.js new file mode 100644 index 00000000000..8fdbb09d8c4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + console.log("bar:", --b); +} +var b = 3; +do { + a(); +}while (b) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_2/output.mangleOnly.js new file mode 100644 index 00000000000..acf3c026535 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + console.log("bar:"); +} +var b = 3; +do { + a(); +}while (b) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_3/output.mangleOnly.js new file mode 100644 index 00000000000..5bf847fc4a5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_off_loops_3/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = 3; +while(a)bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on/output.mangleOnly.js new file mode 100644 index 00000000000..81278ce63fe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = 3; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_1/output.mangleOnly.js new file mode 100644 index 00000000000..8fdbb09d8c4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + console.log("bar:", --b); +} +var b = 3; +do { + a(); +}while (b) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_2/output.mangleOnly.js new file mode 100644 index 00000000000..acf3c026535 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + console.log("bar:"); +} +var b = 3; +do { + a(); +}while (b) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_3/output.mangleOnly.js new file mode 100644 index 00000000000..5bf847fc4a5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/toplevel_on_loops_3/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = 3; +while(a)bar(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/try_abort/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/try_abort/output.mangleOnly.js new file mode 100644 index 00000000000..3c5c07538c5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/try_abort/output.mangleOnly.js @@ -0,0 +1,8 @@ +!(function() { + try { + var a = 1; + throw ""; + var b = 2; + } catch (c) {} + console.log(a, b); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unary_delete/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unary_delete/output.mangleOnly.js new file mode 100644 index 00000000000..4e8d443f2f4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unary_delete/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 10; +function b() { + var b; + if (delete b) a--; +} +b(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..2edf04e48e1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a() { + var a = { + b: 1 + }; + console.log(a.b + 3); +} +function b() { + var a = { + b: { + c: 1 + }, + d: 2 + }; + console.log(a.b + 3, a.d + 4, a.b.c + 5, a.d.c + 6); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_1/output.mangleOnly.js new file mode 100644 index 00000000000..757d203da9e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_1/output.mangleOnly.js @@ -0,0 +1,20 @@ +function a() { + var a = 1; + var b = []; + b[a] = 2; + console.log(a + 3); +} +function b() { + var a = [ + 1 + ]; + a[2] = 3; + console.log(a.length); +} +function c() { + var a = [ + 1 + ]; + a.push(2); + console.log(a.length); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_2/output.mangleOnly.js new file mode 100644 index 00000000000..e8227ffc767 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_2/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = [ + 1, + 2, + function(a) { + return a * a; + }, + function(a) { + return a * a * a; + }, +]; +console.log(a[0], a[1], a[2](2), a[3]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_3/output.mangleOnly.js new file mode 100644 index 00000000000..47869bfa001 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_3/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = [ + 1, + 2, + function() { + return ++a[0]; + }, +]; +console.log(a[0], a[1], a[2](), a[0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_4/output.mangleOnly.js new file mode 100644 index 00000000000..10d0ce8b3c8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_4/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = [ + 1, + 2, + function() { + return ++this[0]; + }, +]; +console.log(a[0], a[1], a[2], a[0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_5/output.mangleOnly.js new file mode 100644 index 00000000000..a17c3988c0b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_array_5/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = [ + 1, + 2, + function() { + return ++this[0]; + }, +]; +console.log(a[0], a[1], a[2](), a[0]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_escaped/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_escaped/output.mangleOnly.js new file mode 100644 index 00000000000..17fe3e17b71 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_escaped/output.mangleOnly.js @@ -0,0 +1,23 @@ +console.log((function() { + var a = { + p: 1 + }; + console.log(a, a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 2 + }; + console.log(a.p, a); + return a.p; +})()); +console.log((function() { + var a = { + p: 3 + }, b = [ + a + ]; + console.log(b[0].p++); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_modified/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_modified/output.mangleOnly.js new file mode 100644 index 00000000000..a8cd3d3360a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_modified/output.mangleOnly.js @@ -0,0 +1,69 @@ +console.log((function() { + var a = { + p: 1 + }; + a.p++; + console.log(a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 2 + }; + --a.p; + console.log(a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 3 + }; + a.p += ""; + console.log(a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 4 + }; + a = {}; + console.log(a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 5 + }; + a.p = -9; + console.log(a.p); + return a.p; +})()); +function a() { + this.p++; +} +console.log((function() { + var b = { + p: 6 + }; + a.call(b); + console.log(b.p); + return b.p; +})()); +console.log((function() { + var a = { + p: 7 + }; + console.log([ + a + ][0].p++); + return a.p; +})()); +console.log((function() { + var a = { + p: 8 + }; + console.log({ + q: a + }.q.p++); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_1/output.mangleOnly.js new file mode 100644 index 00000000000..72fa6f39573 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a() { + var a = 1; + var b = {}; + b[a] = 2; + console.log(a + 3); +} +function b() { + var a = { + b: 1 + }; + a.b = 2; + console.log(a.b + 3); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_2/output.mangleOnly.js new file mode 100644 index 00000000000..6e8af2314ce --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_2/output.mangleOnly.js @@ -0,0 +1,11 @@ +var a = { + foo: 1, + bar: 2, + square: function(a) { + return a * a; + }, + cube: function(a) { + return a * a * a; + } +}; +console.log(a.foo, a.bar, a.square(2), a.cube); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_3/output.mangleOnly.js new file mode 100644 index 00000000000..4da1b4b5b3b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_object_3/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a = { + get foo () { + return 1; + }, + bar: 2, + square: function(a) { + return a * a; + }, + cube: function(a) { + return a * a * a; + } +}; +console.log(a.foo, a.bar, a.square(2), a.cube); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_1/output.mangleOnly.js new file mode 100644 index 00000000000..bbdf8accd41 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_1/output.mangleOnly.js @@ -0,0 +1,23 @@ +console.log((function() { + var a = { + p: 1 + }; + console.log(a.p); + return a.p; +})()); +console.log((function() { + var a = { + p: 2 + }; + console.log(a.p); + return a; +})()); +console.log((function() { + var a = { + p: 3 + }; + console.log([ + a + ][0].p); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_2/output.mangleOnly.js new file mode 100644 index 00000000000..5424bbb5be1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_side_effect_free_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +console.log((function() { + var a = { + p: 1 + }, b = [ + a + ]; + console.log(b[0].p); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_unknown/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_unknown/output.mangleOnly.js new file mode 100644 index 00000000000..3fa481bfe62 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unsafe_evaluate_unknown/output.mangleOnly.js @@ -0,0 +1,21 @@ +console.log((function() { + var a = { + p: 1 + }; + console.log(a.not_present); + return a.p; +})()); +console.log((function() { + var a = { + p: 2 + }; + console.log(a.prototype); + return a.p; +})()); +console.log((function() { + var a = { + p: 3 + }; + console.log(a.hasOwnProperty); + return a.p; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unused_modified/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unused_modified/output.mangleOnly.js new file mode 100644 index 00000000000..004cdf4d0d0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/unused_modified/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log((function() { + var a = 1, b = "FAIL"; + if (0 || a--) b = "PASS"; + a = 1; + return b; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/use_before_var/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/use_before_var/output.mangleOnly.js new file mode 100644 index 00000000000..ef2ed692c2c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/use_before_var/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + console.log(a); + var a = 1; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_1/output.mangleOnly.js new file mode 100644 index 00000000000..a9f6d5eb1ec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function() { + var a; + a = 2; + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_2/output.mangleOnly.js new file mode 100644 index 00000000000..08bbc89c2bf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +!(function() { + var a; + if ((a = 2)) console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_3/output.mangleOnly.js new file mode 100644 index 00000000000..9e14b6ff4d1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_3/output.mangleOnly.js @@ -0,0 +1,5 @@ +!(function() { + var a; + while((a = 2)); + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_4/output.mangleOnly.js new file mode 100644 index 00000000000..325a181400e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_4/output.mangleOnly.js @@ -0,0 +1,4 @@ +!(function a() { + a = 2; + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_5/output.mangleOnly.js new file mode 100644 index 00000000000..3e9cf1fba70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_5/output.mangleOnly.js @@ -0,0 +1,7 @@ +!(function() { + var a; + !(function(b) { + a = 2; + console.log(a, b); + })(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_6/output.mangleOnly.js new file mode 100644 index 00000000000..ed8984deae2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_assign_6/output.mangleOnly.js @@ -0,0 +1,4 @@ +!(function() { + var a = (function() {})((a = 1)); + console.log(a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_if/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_if/output.mangleOnly.js new file mode 100644 index 00000000000..ca792f266ca --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/var_if/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + if (x()) { + var a; + if (!g) a = true; + if (a) g(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/variables_collision_in_immediately_invoked_func/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/variables_collision_in_immediately_invoked_func/output.mangleOnly.js new file mode 100644 index 00000000000..a8adaabca70 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/variables_collision_in_immediately_invoked_func/output.mangleOnly.js @@ -0,0 +1,11 @@ +(function(a) { + a(); +})(function() { + window.used = function() { + var c = window.foo, a = window.bar, b = window.foobar; + return (function(a, b) { + if (-1 === b) return a; + return $(a, b); + })(a, b); + }.call(this); +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/inline_script/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/inline_script/output.mangleOnly.js new file mode 100644 index 00000000000..9092550494f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/inline_script/output.mangleOnly.js @@ -0,0 +1 @@ +/[<\/script>]/; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_1/output.mangleOnly.js new file mode 100644 index 00000000000..5ed700d094c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(JSON.stringify("COMPASS? Overpass.".match(/([Sap]+)/gi))); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_2/output.mangleOnly.js new file mode 100644 index 00000000000..7521d62737f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(JSON.stringify("COMPASS? Overpass.".match(new RegExp("([Sap]+)", "ig")))); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_simple/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_simple/output.mangleOnly.js new file mode 100644 index 00000000000..e0cac60d35e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_simple/output.mangleOnly.js @@ -0,0 +1 @@ +/rx/gi; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_slashes/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_slashes/output.mangleOnly.js new file mode 100644 index 00000000000..945738f2c1d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/regexp_slashes/output.mangleOnly.js @@ -0,0 +1 @@ +/\\\/rx\/\\/gi; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/regexp/unsafe_slashes/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/regexp/unsafe_slashes/output.mangleOnly.js new file mode 100644 index 00000000000..0acd88c00fb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/regexp/unsafe_slashes/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(new RegExp("^https://")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch/output.mangleOnly.js new file mode 100644 index 00000000000..f6380f4f634 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch/output.mangleOnly.js @@ -0,0 +1,15 @@ +var b = 0; +function a() { + try { + throw 1; + } catch (b) { + try { + throw 2; + } catch (a) { + var a = 3; + console.log(a); + } + } + console.log(a); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..f6380f4f634 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_catch_catch_ie8/output.mangleOnly.js @@ -0,0 +1,15 @@ +var b = 0; +function a() { + try { + throw 1; + } catch (b) { + try { + throw 2; + } catch (a) { + var a = 3; + console.log(a); + } + } + console.log(a); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch/output.mangleOnly.js new file mode 100644 index 00000000000..3d0d9b5af6a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a(a) { + !(function() { + try { + throw 0; + } catch (a) { + var b = 1; + console.log(a, b); + } + })(); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..3d0d9b5af6a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/function_iife_catch_ie8/output.mangleOnly.js @@ -0,0 +1,11 @@ +function a(a) { + !(function() { + try { + throw 0; + } catch (a) { + var b = 1; + console.log(a, b); + } + })(); +} +a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_1/output.mangleOnly.js new file mode 100644 index 00000000000..8a0319d233c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_1/output.mangleOnly.js @@ -0,0 +1,12 @@ +"aaaaaaaa"; +var c = 1, a = "FAIL"; +try { + throw 1; +} catch (b) { + try { + throw 0; + } catch (d) { + if (b) a = "PASS"; + } +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_2/output.mangleOnly.js new file mode 100644 index 00000000000..8a0319d233c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/issue_2120_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +"aaaaaaaa"; +var c = 1, a = "FAIL"; +try { + throw 1; +} catch (b) { + try { + throw 0; + } catch (d) { + if (b) a = "PASS"; + } +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch/output.mangleOnly.js new file mode 100644 index 00000000000..1fd2bd048e7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..1fd2bd048e7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..1fd2bd048e7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_ie8_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1/output.mangleOnly.js new file mode 100644 index 00000000000..f1909dbf8d5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "PASS"; +try { + throw "FAIL1"; +} catch (b) { + var b = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..f1909dbf8d5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "PASS"; +try { + throw "FAIL1"; +} catch (b) { + var b = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..f1909dbf8d5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_ie8_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "PASS"; +try { + throw "FAIL1"; +} catch (b) { + var b = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..f1909dbf8d5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_1_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "PASS"; +try { + throw "FAIL1"; +} catch (b) { + var b = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2/output.mangleOnly.js new file mode 100644 index 00000000000..48a0ae5f669 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw "FAIL1"; +} catch (a) { + var a = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..48a0ae5f669 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw "FAIL1"; +} catch (a) { + var a = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..48a0ae5f669 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_ie8_toplevel/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw "FAIL1"; +} catch (a) { + var a = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..48a0ae5f669 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_redef_2_toplevel/output.mangleOnly.js @@ -0,0 +1,6 @@ +try { + throw "FAIL1"; +} catch (a) { + var a = "FAIL2"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..1fd2bd048e7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var/output.mangleOnly.js new file mode 100644 index 00000000000..f32fd9afa38 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + var a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8/output.mangleOnly.js new file mode 100644 index 00000000000..f32fd9afa38 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + var a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..f32fd9afa38 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_ie8_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + var a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_toplevel/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_toplevel/output.mangleOnly.js new file mode 100644 index 00000000000..f32fd9afa38 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/rename/mangle_catch_var_toplevel/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = "FAIL"; +try { + throw 1; +} catch (b) { + var a = "PASS"; +} +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_undefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_undefined/output.mangleOnly.js new file mode 100644 index 00000000000..110adae5e68 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_undefined/output.mangleOnly.js @@ -0,0 +1,55 @@ +function a() {} +function b() { + return undefined; +} +function c() { + return void 0; +} +function d() { + return void 123; +} +function e() { + return; +} +function f(a, b) { + console.log(a, b); + baz(a); + return; +} +function g(a, b) { + console.log(a, b); + if (a) { + foo(b); + baz(a); + return a + b; + } + return undefined; +} +function h(a, b) { + console.log(a, b); + if (a) { + foo(b); + baz(a); + return void 0; + } + return a + b; +} +function i(a, b) { + foo(a); + bar(b); + return void 0; +} +function j(a, b) { + foo(a); + bar(b); + return undefined; +} +function k() { + return false; +} +function l() { + return null; +} +function m() { + return 0; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_void/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_void/output.mangleOnly.js new file mode 100644 index 00000000000..48fed1e3589 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/return_undefined/return_void/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + function a() { + h(); + } + return a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sandbox/console_log/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sandbox/console_log/output.mangleOnly.js new file mode 100644 index 00000000000..ee2edbe7e8e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sandbox/console_log/output.mangleOnly.js @@ -0,0 +1,2 @@ +console.log("%% %s"); +console.log("%% %s", "%s"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/call/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/call/output.mangleOnly.js new file mode 100644 index 00000000000..22ba40a5cf0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/call/output.mangleOnly.js @@ -0,0 +1,19 @@ +var a = (function() { + return this; +})(); +function b() { + console.log("foo"); +} +b.c = function() { + console.log(this === b ? "bar" : "baz"); +}; +(a, b)(); +(a, b.c)(); +(a, function() { + console.log(this === a); +})(); +new (a, b)(); +new (a, b.c)(); +new (a, function() { + console.log(this === a); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/cascade_assignment_in_return/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/cascade_assignment_in_return/output.mangleOnly.js new file mode 100644 index 00000000000..795c4311abb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/cascade_assignment_in_return/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a, b) { + return (a = x()), b(a); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_1/output.mangleOnly.js new file mode 100644 index 00000000000..03ca4111d2d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_1/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log(delete (1, undefined)); +console.log(delete (1, void 0)); +console.log(delete (1, Infinity)); +console.log(delete (1, 1 / 0)); +console.log(delete (1, NaN)); +console.log(delete (1, 0 / 0)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_2/output.mangleOnly.js new file mode 100644 index 00000000000..8c2be123e03 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log(delete (1, 2, undefined)); +console.log(delete (1, 2, void 0)); +console.log(delete (1, 2, Infinity)); +console.log(delete (1, 2, 1 / 0)); +console.log(delete (1, 2, NaN)); +console.log(delete (1, 2, 0 / 0)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_3/output.mangleOnly.js new file mode 100644 index 00000000000..8c2be123e03 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +console.log(delete (1, 2, undefined)); +console.log(delete (1, 2, void 0)); +console.log(delete (1, 2, Infinity)); +console.log(delete (1, 2, 1 / 0)); +console.log(delete (1, 2, NaN)); +console.log(delete (1, 2, 0 / 0)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_4/output.mangleOnly.js new file mode 100644 index 00000000000..e0557048354 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() {} +console.log(delete (a(), undefined)); +console.log(delete (a(), void 0)); +console.log(delete (a(), Infinity)); +console.log(delete (a(), 1 / 0)); +console.log(delete (a(), NaN)); +console.log(delete (a(), 0 / 0)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_5/output.mangleOnly.js new file mode 100644 index 00000000000..e0557048354 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_5/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() {} +console.log(delete (a(), undefined)); +console.log(delete (a(), void 0)); +console.log(delete (a(), Infinity)); +console.log(delete (a(), 1 / 0)); +console.log(delete (a(), NaN)); +console.log(delete (a(), 0 / 0)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_6/output.mangleOnly.js new file mode 100644 index 00000000000..1369a64d4b4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/delete_seq_6/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a; +console.log(delete (1, a)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_init_var/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_init_var/output.mangleOnly.js new file mode 100644 index 00000000000..f6e5812cddc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_init_var/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = "PASS"; +(function() { + var b = 42; + for(var a = 5; a > 0;)a--; + c = "FAIL"; + var c; +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_sequences/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_sequences/output.mangleOnly.js new file mode 100644 index 00000000000..a3b9ea4bf60 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/for_sequences/output.mangleOnly.js @@ -0,0 +1,14 @@ +foo(); +bar(); +for(; false;); +foo(); +bar(); +for(x = 5; false;); +x = foo in bar; +for(; false;); +x = foo in bar; +for(y = 5; false;); +x = function() { + foo in bar; +}; +for(y = 5; false;); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/forin/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/forin/output.mangleOnly.js new file mode 100644 index 00000000000..b6d8dcf966d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/forin/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = []; +a.push("PASS"); +for(var b in a)console.log(a[b]); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_1/output.mangleOnly.js new file mode 100644 index 00000000000..64ea8b848d4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_1/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a() { + return (a = 0), !!a; +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_2/output.mangleOnly.js new file mode 100644 index 00000000000..7accf25cf5d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log((function a() { + return (a = 0), !!a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_3/output.mangleOnly.js new file mode 100644 index 00000000000..a54c315bfe3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_3/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a() { + function a() {} + return (a = 0), !!a; +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_4/output.mangleOnly.js new file mode 100644 index 00000000000..720aa36cb63 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_4/output.mangleOnly.js @@ -0,0 +1,7 @@ +function a() { + function a() { + return (a = 0), !!a; + } + return a(); +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_5/output.mangleOnly.js new file mode 100644 index 00000000000..bd78732c69e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/func_def_5/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + return (function a() { + return (a = 0), !!a; + })(); +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_decl/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_decl/output.mangleOnly.js new file mode 100644 index 00000000000..7baf14377ef --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_decl/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a; +w(); +var b = x(); +y(); +for(var c; 0;)z(); +var d; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_defun/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_defun/output.mangleOnly.js new file mode 100644 index 00000000000..ee2d19c7b04 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/hoist_defun/output.mangleOnly.js @@ -0,0 +1,3 @@ +x(); +function a() {} +y(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/iife/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/iife/output.mangleOnly.js new file mode 100644 index 00000000000..2b279d38b52 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/iife/output.mangleOnly.js @@ -0,0 +1,8 @@ +x = 42; +(function a() {})(); +!(function a() {})(); +~(function a() {})(); ++(function a() {})(); +-(function a() {})(); +void (function a() {})(); +typeof (function a() {})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1685/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1685/output.mangleOnly.js new file mode 100644 index 00000000000..0c80149c72b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1685/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 100, b = 10; +function c() { + var a = (a--, delete a && --b); +} +c(); +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1758/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1758/output.mangleOnly.js new file mode 100644 index 00000000000..a9a94f13f7b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_1758/output.mangleOnly.js @@ -0,0 +1,8 @@ +console.log((function(a) { + var b = 42; + return (function() { + a--; + a--, a.toString(); + return; + })(); +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2062/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2062/output.mangleOnly.js new file mode 100644 index 00000000000..eb293521096 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2062/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 1; +if ([ + a || a++ + a--, + a++ + a--, + a && a.var +]) ; +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2313/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2313/output.mangleOnly.js new file mode 100644 index 00000000000..9f3ddf2d006 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_2313/output.mangleOnly.js @@ -0,0 +1,15 @@ +var a = 0, b = 0; +var c = { + get c () { + a++; + return 42; + }, + set c (c){ + b++; + }, + d: function() { + this.c++; + if (this.c) console.log(a, b); + } +}; +c.d(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_27/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_27/output.mangleOnly.js new file mode 100644 index 00000000000..7015879fe7d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_27/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function(b) { + var a; + a = b; + a("body").addClass("foo"); +})(jQuery); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_1/output.mangleOnly.js new file mode 100644 index 00000000000..dbf5e43b49a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a, b, c, d; +a = !(b(), c(), d()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_2/output.mangleOnly.js new file mode 100644 index 00000000000..ee645535d59 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = 1, b; +a.x = ((a = {}), 10); +b = ((b = {}), 10); +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_3/output.mangleOnly.js new file mode 100644 index 00000000000..0dfafa3622f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_3/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a, b, c, d; +a = (b(), c(), d()) ? 10 : 20; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_4/output.mangleOnly.js new file mode 100644 index 00000000000..ab71e4fba6d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_4/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a, b, c, d; +a = (b, c, d); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_5/output.mangleOnly.js new file mode 100644 index 00000000000..e9b642bf012 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_5/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = 2, b; +a *= (b, (a = 4), 3); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_6/output.mangleOnly.js new file mode 100644 index 00000000000..cc6d25ce2ee --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/lift_sequences_6/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = 2; +a &&= (leak(), (a = 4), 3); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_1/output.mangleOnly.js new file mode 100644 index 00000000000..e541426e053 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +a; +b; +c; +d; +e; +f; +g; +h; +i; +j; +k; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_2/output.mangleOnly.js new file mode 100644 index 00000000000..26423a7aaf5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/limit_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +a, b; +c, d; +e, f; +g, h; +i, j; +k; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_1/output.mangleOnly.js new file mode 100644 index 00000000000..4ed9f26145f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +foo(); +bar(); +baz(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_2/output.mangleOnly.js new file mode 100644 index 00000000000..4a2ebbbab8b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +if (boo) { + foo(); + bar(); + baz(); +} else { + x(); + y(); + z(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_3/output.mangleOnly.js new file mode 100644 index 00000000000..99a804c9cc2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_3/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a() { + foo(); + bar(); + return baz(); +} +function b() { + foo(); + bar(); + throw new Error(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_4/output.mangleOnly.js new file mode 100644 index 00000000000..c9aa87e6464 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/make_sequences_4/output.mangleOnly.js @@ -0,0 +1,11 @@ +x = 5; +if (y) z(); +x = 5; +for(i = 0; i < 5; i++)console.log(i); +x = 5; +for(; i < 5; i++)console.log(i); +x = 5; +switch(y){ +} +x = 5; +with (obj){} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/negate_iife_for/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/negate_iife_for/output.mangleOnly.js new file mode 100644 index 00000000000..f2bf89a476c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/negate_iife_for/output.mangleOnly.js @@ -0,0 +1,4 @@ +(function() {})(); +for(i = 0; i < 5; i++)console.log(i); +(function() {})(); +for(; i < 10; i++)console.log(i); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/reassign_const/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/reassign_const/output.mangleOnly.js new file mode 100644 index 00000000000..8d1afa169b2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/reassign_const/output.mangleOnly.js @@ -0,0 +1,6 @@ +function a() { + const a = 1; + a++; + return a; +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..a41ce0b9509 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects/output.mangleOnly.js @@ -0,0 +1 @@ +0, a(), 1, b(), 2, c(), 3; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_1/output.mangleOnly.js new file mode 100644 index 00000000000..d5cb30d1792 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(a, b) { + a -= 42; + if (a < 0) a = 0; + b.a = a; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_2/output.mangleOnly.js new file mode 100644 index 00000000000..1e30d5ad5a2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_2/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a, b) { + (b = a), !a + (b += a) || (b += a), (b = a), b; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_3/output.mangleOnly.js new file mode 100644 index 00000000000..bcc60cc135a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/side_effects_cascade_3/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a, b) { + "foo" ^ (b += a), b ? false : (b = a) ? -1 : (b -= a) - (b ^= a), a-- || !a, a; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/sequences/unsafe_undefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/sequences/unsafe_undefined/output.mangleOnly.js new file mode 100644 index 00000000000..dd8cbe1cd1b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/sequences/unsafe_undefined/output.mangleOnly.js @@ -0,0 +1,9 @@ +function f(f) { + if (a) return b; + if (c) return d; +} +function g(f) { + if (a) return b; + if (c) return d; + e(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/string_literal/issue_1929/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/string_literal/issue_1929/output.mangleOnly.js new file mode 100644 index 00000000000..9d53ccfa9f3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/string_literal/issue_1929/output.mangleOnly.js @@ -0,0 +1,5 @@ +function b(a) { + return a.split(/[\\/]/); +} +var a = b("A/B\\C\\D/E\\F"); +console.log(a[5], a[4], a[3], a[2], a[1], a[0], a.length); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/string_literal/octal_escape_sequence/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/string_literal/octal_escape_sequence/output.mangleOnly.js new file mode 100644 index 00000000000..65b76ca1bc1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/string_literal/octal_escape_sequence/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = "\0\08?\0?Àÿ"; +var b = " 080\x000À0"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/beautify/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/beautify/output.mangleOnly.js new file mode 100644 index 00000000000..31de328bc3e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/beautify/output.mangleOnly.js @@ -0,0 +1,14 @@ +switch(a){ + case 0: + case 1: + break; + case 2: + default: +} +switch(b){ + case 3: + foo(); + bar(); + default: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_1/output.mangleOnly.js new file mode 100644 index 00000000000..987493855bc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +switch(1 + 1){ + case 1: + foo(); + break; + case 1 + 1: + bar(); + break; + case 1 + 1 + 1: + baz(); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_2/output.mangleOnly.js new file mode 100644 index 00000000000..6f6267029c2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +switch(1){ + case 1: + foo(); + case 1 + 1: + bar(); + break; + case 1 + 1 + 1: + baz(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_3/output.mangleOnly.js new file mode 100644 index 00000000000..530c5b4b141 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_3/output.mangleOnly.js @@ -0,0 +1,11 @@ +switch(10){ + case 1: + foo(); + case 1 + 1: + bar(); + break; + case 1 + 1 + 1: + baz(); + default: + def(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_4/output.mangleOnly.js new file mode 100644 index 00000000000..63a93b94565 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_4/output.mangleOnly.js @@ -0,0 +1,11 @@ +switch(2){ + case 1: + x(); + if (foo) break; + y(); + break; + case 1 + 1: + bar(); + default: + def(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_5/output.mangleOnly.js new file mode 100644 index 00000000000..a7fb50fb7d9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_5/output.mangleOnly.js @@ -0,0 +1,11 @@ +switch(1){ + case 1: + x(); + if (foo) break; + y(); + break; + case 1 + 1: + bar(); + default: + def(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_6/output.mangleOnly.js new file mode 100644 index 00000000000..cf112050e8a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_6/output.mangleOnly.js @@ -0,0 +1,14 @@ +OUT: { + foo(); + switch(1){ + case 1: + x(); + if (foo) break OUT; + y(); + case 1 + 1: + bar(); + break; + default: + def(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_7/output.mangleOnly.js new file mode 100644 index 00000000000..6ac6a089fe8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_7/output.mangleOnly.js @@ -0,0 +1,18 @@ +OUT: { + foo(); + switch(1){ + case 1: + a(); + if (foo) break OUT; + for(var a = 0; a < 10; a++){ + if (a > 5) break; + console.log(a); + } + y(); + case 1 + 1: + bar(); + break; + default: + def(); + } +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_8/output.mangleOnly.js new file mode 100644 index 00000000000..66637e437bc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_8/output.mangleOnly.js @@ -0,0 +1,11 @@ +OUT: switch(1){ + case 1: + x(); + for(;;)break OUT; + y(); + break; + case 1 + 1: + bar(); + default: + def(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_9/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_9/output.mangleOnly.js new file mode 100644 index 00000000000..917cf914c3f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/constant_switch_9/output.mangleOnly.js @@ -0,0 +1,10 @@ +OUT: switch(1){ + case 1: + x(); + for(;;)if (foo) break OUT; + y(); + case 1 + 1: + bar(); + default: + def(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case/output.mangleOnly.js new file mode 100644 index 00000000000..31e5007ff6d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + baz(); + break; + case "moo": + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case_2/output.mangleOnly.js new file mode 100644 index 00000000000..5ead2e1bd2c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_case_2/output.mangleOnly.js @@ -0,0 +1,9 @@ +switch(foo){ + case "bar": + bar(); + break; + case "moo": + case moo: + case "baz": + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_1/output.mangleOnly.js new file mode 100644 index 00000000000..25b20a9d100 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_1/output.mangleOnly.js @@ -0,0 +1,5 @@ +switch(foo){ + case "bar": + baz(); + default: +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_2/output.mangleOnly.js new file mode 100644 index 00000000000..082c3f38175 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/drop_default_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + baz(); + break; + default: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch/output.mangleOnly.js new file mode 100644 index 00000000000..afaf54c843a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(id(123)){ + case 1: + case 2: + case 3: + default: + console.log("PASS"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch_2/output.mangleOnly.js new file mode 100644 index 00000000000..1762a875704 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/gut_entire_switch_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(id(123)){ + case 1: + "no side effect"; + case 1: + default: + console.log("PASS"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else/output.mangleOnly.js new file mode 100644 index 00000000000..b9ed23fba03 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + bar(); + break; + default: + other(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else2/output.mangleOnly.js new file mode 100644 index 00000000000..8107300499b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else2/output.mangleOnly.js @@ -0,0 +1,6 @@ +switch(foo){ + case "bar": + bar(); + default: + other(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else3/output.mangleOnly.js new file mode 100644 index 00000000000..c27c7e8a5e2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else3/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + default: + other(); + break; + case "bar": + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else4/output.mangleOnly.js new file mode 100644 index 00000000000..6a471fc86dc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else4/output.mangleOnly.js @@ -0,0 +1,6 @@ +switch(foo){ + default: + other(); + case "bar": + bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else5/output.mangleOnly.js new file mode 100644 index 00000000000..30cc9a70adf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else5/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(1){ + case bar: + bar(); + break; + case 1: + other(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else6/output.mangleOnly.js new file mode 100644 index 00000000000..8f9ac394ba3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else6/output.mangleOnly.js @@ -0,0 +1,6 @@ +switch(1){ + case bar: + bar(); + case 1: + other(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else7/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else7/output.mangleOnly.js new file mode 100644 index 00000000000..d4eca66703e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else7/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + break; + bar(); + default: + other(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else8/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else8/output.mangleOnly.js new file mode 100644 index 00000000000..d0674459df9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_else8/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a(a) { + switch(a){ + case "bar": + return "PASS"; + default: + return "FAIL"; + } +} +console.log(a("bar")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/if_switch_typeof/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_switch_typeof/output.mangleOnly.js new file mode 100644 index 00000000000..a69a0721a28 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/if_switch_typeof/output.mangleOnly.js @@ -0,0 +1,2 @@ +if (a) switch(typeof b){ +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_1/output.mangleOnly.js new file mode 100644 index 00000000000..3a666752411 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a, b) { + switch(true){ + case a: + default: + console.log("PASS"); + break; + case b: + console.log("FAIL"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_2/output.mangleOnly.js new file mode 100644 index 00000000000..3a666752411 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a, b) { + switch(true){ + case a: + default: + console.log("PASS"); + break; + case b: + console.log("FAIL"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_3/output.mangleOnly.js new file mode 100644 index 00000000000..e6138771b79 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_3/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a, b) { + switch(true){ + case b: + console.log("maybe"); + break; + default: + case a: + console.log("definitely"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_4/output.mangleOnly.js new file mode 100644 index 00000000000..2d5e74fc1c1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_4/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a, b) { + switch(true){ + case b: + console.log("maybe"); + break; + case a: + default: + console.log("definitely"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_5/output.mangleOnly.js new file mode 100644 index 00000000000..ce9463dd4a2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_5/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a(a, b) { + switch(true){ + default: + console.log("definitely"); + break; + case b: + console.log("maybe"); + break; + case a: + console.log("definitely"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_6/output.mangleOnly.js new file mode 100644 index 00000000000..5a6637a5943 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1083_6/output.mangleOnly.js @@ -0,0 +1,15 @@ +function a(a, b) { + switch(true){ + case a: + console.log("definitely"); + break; + case b: + console.log("maybe"); + break; + default: + console.log("definitely"); + break; + } +} +a(true, false); +a(true, true); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1663/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1663/output.mangleOnly.js new file mode 100644 index 00000000000..f21c5c869cf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1663/output.mangleOnly.js @@ -0,0 +1,12 @@ +var a = 100, b = 10; +function c() { + switch(1){ + case 1: + b = a++; + return ++b; + default: + var b; + } +} +c(); +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1674/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1674/output.mangleOnly.js new file mode 100644 index 00000000000..757c2ee3d0c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1674/output.mangleOnly.js @@ -0,0 +1,8 @@ +switch(0){ + default: + console.log("FAIL"); + break; + case 0: + console.log("PASS"); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1679/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1679/output.mangleOnly.js new file mode 100644 index 00000000000..fdecdcb3944 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1679/output.mangleOnly.js @@ -0,0 +1,18 @@ +var a = 100, b = 10; +function c() { + switch(--b){ + default: + case !function a() {}: + break; + case b--: + switch(0){ + default: + case a--: + } + break; + case a++: + break; + } +} +c(); +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_1/output.mangleOnly.js new file mode 100644 index 00000000000..a56bfe9d4da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_1/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(a) { + console.log(a); + return a + 1; +} +switch(2){ + case a(0): + case a(1): + a(2); + case 2: + case a(3): + case a(4): + a(5); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_2/output.mangleOnly.js new file mode 100644 index 00000000000..b2a04027665 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1680_2/output.mangleOnly.js @@ -0,0 +1,13 @@ +var a = 100, b = 10; +switch(b){ + case a--: + break; + case b: + var c; + break; + case a: + break; + case a--: + break; +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_1/output.mangleOnly.js new file mode 100644 index 00000000000..5507d9829d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +switch(console.log("PASS")){ +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_2/output.mangleOnly.js new file mode 100644 index 00000000000..5507d9829d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1690_2/output.mangleOnly.js @@ -0,0 +1,2 @@ +switch(console.log("PASS")){ +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1698/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1698/output.mangleOnly.js new file mode 100644 index 00000000000..3a59fce49bb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1698/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 1; +!(function() { + switch(a++){ + } +})(); +console.log(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_1/output.mangleOnly.js new file mode 100644 index 00000000000..a28f59ffcf7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_1/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 0; +switch(a){ + default: + console.log("FAIL"); + case 0: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_2/output.mangleOnly.js new file mode 100644 index 00000000000..a28f59ffcf7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = 0; +switch(a){ + default: + console.log("FAIL"); + case 0: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_3/output.mangleOnly.js new file mode 100644 index 00000000000..5eb320b483e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1705_3/output.mangleOnly.js @@ -0,0 +1,6 @@ +switch(a){ + case 0: + break; + default: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1750/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1750/output.mangleOnly.js new file mode 100644 index 00000000000..c6e64f758d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1750/output.mangleOnly.js @@ -0,0 +1,8 @@ +var a = 0, b = 1; +switch(true){ + case (a, true): + default: + b = 2; + case true: +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1758/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1758/output.mangleOnly.js new file mode 100644 index 00000000000..d30e8c4b3df --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_1758/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = 1, b = 2; +switch(a--){ + default: + b++; +} +console.log(a, b); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_2535/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_2535/output.mangleOnly.js new file mode 100644 index 00000000000..602f650764b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_2535/output.mangleOnly.js @@ -0,0 +1,8 @@ +switch((w(), 42)){ + case 13: + x(); + case 42: + y(); + default: + z(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_376/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_376/output.mangleOnly.js new file mode 100644 index 00000000000..37febb4280c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_376/output.mangleOnly.js @@ -0,0 +1,8 @@ +switch(true){ + case boolCondition: + console.log(1); + break; + case false: + console.log(2); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_1/output.mangleOnly.js new file mode 100644 index 00000000000..f0178b8c4c6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_1/output.mangleOnly.js @@ -0,0 +1,11 @@ +switch(foo){ + case bar: + qux(); + break; + case baz: + qux(); + break; + default: + qux(); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_2/output.mangleOnly.js new file mode 100644 index 00000000000..86318c05639 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_441_2/output.mangleOnly.js @@ -0,0 +1,12 @@ +switch(foo){ + case bar: + qux(); + break; + case fall: + case baz: + qux(); + break; + default: + qux(); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_445/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_445/output.mangleOnly.js new file mode 100644 index 00000000000..6b1e85a6f38 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/issue_445/output.mangleOnly.js @@ -0,0 +1,12 @@ +const b = ()=>{}; +function a() { + let a = b(); + let c = 0; + switch((c = 123)){ + case "never-reached": + const d = b(); + b(d); + } + return a === 123 ? "FAIL" : "PASS"; +} +console.log(a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_case/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_case/output.mangleOnly.js new file mode 100644 index 00000000000..5ab68d927d4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_case/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + baz(); + break; + case moo: + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_default/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_default/output.mangleOnly.js new file mode 100644 index 00000000000..69af1c4c7a2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/keep_default/output.mangleOnly.js @@ -0,0 +1,7 @@ +switch(foo){ + case "bar": + baz(); + default: + something(); + break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if/output.mangleOnly.js new file mode 100644 index 00000000000..5b9db584b21 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if/output.mangleOnly.js @@ -0,0 +1,5 @@ +switch(id(1)){ + case id(2): + console.log("FAIL"); +} +console.log("PASS"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if_2/output.mangleOnly.js new file mode 100644 index 00000000000..2d68233869c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/switch/turn_into_if_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +switch(id(1)){ + case id(2): + console.log("FAIL"); + default: + console.log("PASS"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_chained_templates/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_chained_templates/output.mangleOnly.js new file mode 100644 index 00000000000..4c4b767776e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_chained_templates/output.mangleOnly.js @@ -0,0 +1 @@ +var a = tag`a``b``c``d`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_null_character/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_null_character/output.mangleOnly.js new file mode 100644 index 00000000000..ed166bb0d71 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/allow_null_character/output.mangleOnly.js @@ -0,0 +1,2 @@ +`\0`; +`\0${x}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/array_join/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/array_join/output.mangleOnly.js new file mode 100644 index 00000000000..6d07f8cee8a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/array_join/output.mangleOnly.js @@ -0,0 +1,16 @@ +var a = [ + `1 ${any} 2` +].join(""); +var b = [ + "before", + `1 ${any} 2` +].join(""); +var c = [ + `1 ${any} 2`, + "after" +].join(""); +var d = [ + "before", + `1 ${any} 2`, + "after" +].join(""); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/check_escaped_chars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/check_escaped_chars/output.mangleOnly.js new file mode 100644 index 00000000000..0e18a829db9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/check_escaped_chars/output.mangleOnly.js @@ -0,0 +1 @@ +var a = ` `; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/coerce_to_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/coerce_to_string/output.mangleOnly.js new file mode 100644 index 00000000000..f2c31772e0e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/coerce_to_string/output.mangleOnly.js @@ -0,0 +1 @@ +var a = `${any}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_1/output.mangleOnly.js new file mode 100644 index 00000000000..35fc2e7afee --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = tag`Shall not be optimized. ${"But " + "this " + "is " + "fine."}`; +var b = tag`Don't even mind changing my quotes!`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_2/output.mangleOnly.js new file mode 100644 index 00000000000..713068cbcc2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/do_not_optimize_tagged_template_2/output.mangleOnly.js @@ -0,0 +1 @@ +var a = tag`test` + " something out"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/equality/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/equality/output.mangleOnly.js new file mode 100644 index 00000000000..8bb54372c2b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/equality/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = `1${any}2` === "12"; +var b = `1${any}2` === `12`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/es2018_revision_of_template_escapes_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/es2018_revision_of_template_escapes_1/output.mangleOnly.js new file mode 100644 index 00000000000..b0bfca36931 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/es2018_revision_of_template_escapes_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(String.raw`\unicode \xerces \1234567890`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/escape_dollar_curly/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/escape_dollar_curly/output.mangleOnly.js new file mode 100644 index 00000000000..11e1065e720 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/escape_dollar_curly/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(`\${ beep }`); +console.log(`${1 - 0}\${2-0}\${3-0}${4 - 0}`); +console.log(`$${""}{not an expression}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/evaluate_nested_templates/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/evaluate_nested_templates/output.mangleOnly.js new file mode 100644 index 00000000000..794d9c2b93a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/evaluate_nested_templates/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = `${`${`${`foo`}`}`}`; +var b = `before ${`innerBefore ${any} innerAfter`} after`; +var c = `1 ${2 + `3 ${any} 4` + 5} 6`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856/output.mangleOnly.js new file mode 100644 index 00000000000..5ec81afd671 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`\\n\\r\\u2028\\u2029\n\r\u2028\u2029`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856_ascii_only/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856_ascii_only/output.mangleOnly.js new file mode 100644 index 00000000000..5ec81afd671 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/issue_1856_ascii_only/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`\\n\\r\\u2028\\u2029\n\r\u2028\u2029`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/keep_raw_content_in_tagged_template/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/keep_raw_content_in_tagged_template/output.mangleOnly.js new file mode 100644 index 00000000000..4ef2fbb17e4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/keep_raw_content_in_tagged_template/output.mangleOnly.js @@ -0,0 +1 @@ +var a = tag`\u0020\u{20}\u{00020}\x20\40\040 `; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_1/output.mangleOnly.js new file mode 100644 index 00000000000..4864a5f87ea --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`${/a/} ${6 / 2} ${/b/.test("b")} ${1 ? /c/ : /d/}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_2/output.mangleOnly.js new file mode 100644 index 00000000000..4864a5f87ea --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/regex_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`${/a/} ${6 / 2} ${/b/.test("b")} ${1 ? /c/ : /d/}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/respect_inline_script/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/respect_inline_script/output.mangleOnly.js new file mode 100644 index 00000000000..dd8d8038852 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/respect_inline_script/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = `<\/script>${content}`; +var b = `\x3c!--`; +var c = `--\x3e`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/return_template_string_with_trailing_backslash/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/return_template_string_with_trailing_backslash/output.mangleOnly.js new file mode 100644 index 00000000000..b89d0010897 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/return_template_string_with_trailing_backslash/output.mangleOnly.js @@ -0,0 +1,18 @@ +function a() { + return `foo`; +} +function b() { + return `\nbar`; +} +function c() { + return; + `baz`; +} +function d() { + return; + `qux`; +} +function e() { + return `\nfin`; +} +console.log(a(), b(), c(), d(), e()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/semicolons/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/semicolons/output.mangleOnly.js new file mode 100644 index 00000000000..25b0a941de9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/semicolons/output.mangleOnly.js @@ -0,0 +1,2 @@ +foo; +`bar`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_1/output.mangleOnly.js new file mode 100644 index 00000000000..60d27dc19fb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`${(1, 2)} ${(/a/, /b/)}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_2/output.mangleOnly.js new file mode 100644 index 00000000000..60d27dc19fb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/sequence_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(`${(1, 2)} ${(/a/, /b/)}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..8d3fe74ca2a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/side_effects/output.mangleOnly.js @@ -0,0 +1,11 @@ +`t1`; +tag`t2`; +`t${3}`; +tag`t${4}`; +console.log(`\nt${5}`); +function a(c) { + `t6${c}`; + c = `t7${c}` & c; + c = `t8${b}` | c; + c = a`t9${c}` ^ c; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/simple_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/simple_string/output.mangleOnly.js new file mode 100644 index 00000000000..d8b2e66b8b2 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/simple_string/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(`world`, { + [`foo`]: 1 +}[`foo`], `hi` == "hi"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/special_chars_in_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/special_chars_in_string/output.mangleOnly.js new file mode 100644 index 00000000000..a1011c6e95a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/special_chars_in_string/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = `foo ${"`;\n`${any}"} bar`; +var b = `foo ${any} bar` + "`;\n`${any}"; +var c = `foo ${"`;\n`${any}"} ${any} bar`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape/output.mangleOnly.js new file mode 100644 index 00000000000..c97554ea61f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape/output.mangleOnly.js @@ -0,0 +1,2 @@ +let a = ()=>String.raw; +console.log(a()`\4321\u\x`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape_2/output.mangleOnly.js new file mode 100644 index 00000000000..d6d6995d3e3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_call_with_invalid_escape_2/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = { + y: ()=>String.raw +}; +console.log(a.y()`\4321\u\x`); +let b = ()=>String.raw; +console.log(b()`\4321\u\x`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_1/output.mangleOnly.js new file mode 100644 index 00000000000..baf9eb8d3e4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_1/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = ()=>{}; +a`test`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_2/output.mangleOnly.js new file mode 100644 index 00000000000..e0e4c28ccbd --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_2/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = function() {}; +a`test`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_3/output.mangleOnly.js new file mode 100644 index 00000000000..60c8c18a755 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_3/output.mangleOnly.js @@ -0,0 +1,2 @@ +function a() {} +a`test`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_4/output.mangleOnly.js new file mode 100644 index 00000000000..b86ae35c9f8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_4/output.mangleOnly.js @@ -0,0 +1,4 @@ +const a = { + pl: function() {} +}; +a.pl`test`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_5/output.mangleOnly.js new file mode 100644 index 00000000000..8ec9cc876f9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_function_inline_5/output.mangleOnly.js @@ -0,0 +1,4 @@ +const a = { + pl () {} +}; +a.pl`test`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_parens/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_parens/output.mangleOnly.js new file mode 100644 index 00000000000..e3700f2e4e9 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_parens/output.mangleOnly.js @@ -0,0 +1,10 @@ +a`0`; +((d)=>b)`1`; +(a = b)`2`; +(a + b)`3`; +(a ? b : c)`4`; +(a, b, c)`5`; +(~a)`6`; +a.b`7`; +a["b"]`8`; +a()`9`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_valid_strict_legacy_octal/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_valid_strict_legacy_octal/output.mangleOnly.js new file mode 100644 index 00000000000..2e10fdedcec --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_valid_strict_legacy_octal/output.mangleOnly.js @@ -0,0 +1,2 @@ +"use strict"; +console.log(String.raw`\u\x\567`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_comment/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_comment/output.mangleOnly.js new file mode 100644 index 00000000000..67ca8020182 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_comment/output.mangleOnly.js @@ -0,0 +1,2 @@ +console.log(String.raw`\u`); +console.log((()=>String.raw)()`\x`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_ill_formed_unicode_escape/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_ill_formed_unicode_escape/output.mangleOnly.js new file mode 100644 index 00000000000..85e19e9d719 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_ill_formed_unicode_escape/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(String.raw`\u{-1}`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_invalid_escape/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_invalid_escape/output.mangleOnly.js new file mode 100644 index 00000000000..eb85f610a33 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/tagged_template_with_invalid_escape/output.mangleOnly.js @@ -0,0 +1,5 @@ +function a(a) { + return a.raw[0]; +} +console.log(String.raw`\u`); +console.log(a`\u`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_concattenating_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_concattenating_string/output.mangleOnly.js new file mode 100644 index 00000000000..0f77e51b701 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_concattenating_string/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = "Have a nice " + `day. ${`day. ` + `day.`}`; +var b = "Have a nice " + `${day()}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_ending_with_newline/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_ending_with_newline/output.mangleOnly.js new file mode 100644 index 00000000000..0c10fa55862 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_ending_with_newline/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a) { + return `this is a template string!\n`; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_evaluate_undefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_evaluate_undefined/output.mangleOnly.js new file mode 100644 index 00000000000..bba3d776ed7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_evaluate_undefined/output.mangleOnly.js @@ -0,0 +1,4 @@ +()=>{ + let a; + console.log(a + `?ts=${Date.now()}`); +}; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus/output.mangleOnly.js new file mode 100644 index 00000000000..fb62ad08f59 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(`foo${any}baz` + 1); +console.log(1 + `foo${any}baz`); +console.log(`1${any}2` + `foo${any}baz`); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus_grouping/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus_grouping/output.mangleOnly.js new file mode 100644 index 00000000000..8b807b87def --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_literal_plus_grouping/output.mangleOnly.js @@ -0,0 +1,4 @@ +console.log(`foo${any}baz` + "middle" + "test"); +console.log("test" + ("middle" + `foo${any}baz`)); +console.log(`1${any}2` + "3" + ("4" + `foo${any}baz`)); +console.log(1 + `2${any}3` + "4" + ("5" + `foo${any}baz` + 6)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_starting_with_newline/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_starting_with_newline/output.mangleOnly.js new file mode 100644 index 00000000000..11a216f7fd8 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_starting_with_newline/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a) { + return `\nthis is a template string!`; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_evaluate_with_many_segments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_evaluate_with_many_segments/output.mangleOnly.js new file mode 100644 index 00000000000..b7ac43d707b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_evaluate_with_many_segments/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = `Hello ${guest()}, welcome to ${location()}${"."}`; +var b = `${1}${2}${3}${4}${5}${6}${7}${8}${9}${0}`; +var c = `${foobar()}${foobar()}${foobar()}${foobar()}`; +var d = `${1}${foobar()}${2}${foobar()}${3}${foobar()}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_prefixes/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_prefixes/output.mangleOnly.js new file mode 100644 index 00000000000..90e60e919fe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_prefixes/output.mangleOnly.js @@ -0,0 +1,2 @@ +String.raw`foo`; +foo`bar`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_to_normal_string/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_to_normal_string/output.mangleOnly.js new file mode 100644 index 00000000000..daa875be119 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_to_normal_string/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = `This is ${undefined}`; +var b = "Decimals " + `${1}${2}${3}${4}${5}${6}${7}${8}${9}${0}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_constant_expression/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_constant_expression/output.mangleOnly.js new file mode 100644 index 00000000000..68ff67e0992 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_constant_expression/output.mangleOnly.js @@ -0,0 +1 @@ +var a = `${4 + 4} equals 4 + 4`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_many_segments/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_many_segments/output.mangleOnly.js new file mode 100644 index 00000000000..b7ac43d707b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_many_segments/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = `Hello ${guest()}, welcome to ${location()}${"."}`; +var b = `${1}${2}${3}${4}${5}${6}${7}${8}${9}${0}`; +var c = `${foobar()}${foobar()}${foobar()}${foobar()}`; +var d = `${1}${foobar()}${2}${foobar()}${3}${foobar()}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_predefined_constants/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_predefined_constants/output.mangleOnly.js new file mode 100644 index 00000000000..b18dc374bd4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_string_with_predefined_constants/output.mangleOnly.js @@ -0,0 +1,15 @@ +var b = `This is ${undefined}`; +var c = `This is ${NaN}`; +var d = `This is ${null}`; +var e = `This is ${Infinity}`; +var f = "This is ${1/0}"; +var g = "This is ${1/0}"; +var h = "This is ${NaN}"; +var i = "This is ${null}"; +var j = `This is ${1 / 0}`; +var a = `This is ${0 / 0}`; +var a = "This is ${0/0}"; +var k = "This is ${0/0}"; +var l = `${4 ** 11}`; +var m = `${4 ** 12}`; +var n = `${4 ** 14}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings/output.mangleOnly.js new file mode 100644 index 00000000000..465ebc7a23e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings/output.mangleOnly.js @@ -0,0 +1,4 @@ +``; +`xx\`x`; +`${foo + 2}`; +` foo ${bar + `baz ${qux}`}`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_ascii_only/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_ascii_only/output.mangleOnly.js new file mode 100644 index 00000000000..8c02005a597 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_ascii_only/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = `foo\n bar\n \u2182\u03c9\u2182`; +var b = `\``; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_without_ascii_only/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_without_ascii_only/output.mangleOnly.js new file mode 100644 index 00000000000..de0550da97f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_strings_without_ascii_only/output.mangleOnly.js @@ -0,0 +1 @@ +var a = `foo\n bar\n ↂωↂ`; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_with_newline/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_with_newline/output.mangleOnly.js new file mode 100644 index 00000000000..bd0681e482d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/template_string/template_with_newline/output.mangleOnly.js @@ -0,0 +1,3 @@ +function a(a) { + return `yep,\nthis is a template string!`; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..9ed3faa86d0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_evaluate/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log(typeof void 0 != "undefined"); +console.log(1 == 1, 1 === 1); +console.log(1 != 1, 1 !== 1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_global_defs/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_global_defs/output.mangleOnly.js new file mode 100644 index 00000000000..1ace305878c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/booleans_global_defs/output.mangleOnly.js @@ -0,0 +1 @@ +console.log(A == 1); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/condition_evaluate/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/condition_evaluate/output.mangleOnly.js new file mode 100644 index 00000000000..c3ae3d5a0dc --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/condition_evaluate/output.mangleOnly.js @@ -0,0 +1,3 @@ +while(1 === 2); +for(; 1 == true;); +if (void 0 == null) ; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/if_else_empty/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/if_else_empty/output.mangleOnly.js new file mode 100644 index 00000000000..ca444c0ca2c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/if_else_empty/output.mangleOnly.js @@ -0,0 +1,2 @@ +if ({} ? a : b) ; +else {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/if_return/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/if_return/output.mangleOnly.js new file mode 100644 index 00000000000..e1f8503f111 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/if_return/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(c, a, b, d) { + if (a) return; + if (c) { + if (b) return; + } else if (d) return; + if (a == b) return true; + if (a) c(); + if (b) d(); + return true; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/label_if_break/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/label_if_break/output.mangleOnly.js new file mode 100644 index 00000000000..09553e7c500 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/label_if_break/output.mangleOnly.js @@ -0,0 +1,4 @@ +L: if (true) { + a; + break L; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/transform/while_if_break/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/transform/while_if_break/output.mangleOnly.js new file mode 100644 index 00000000000..cebfe159b93 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/transform/while_if_break/output.mangleOnly.js @@ -0,0 +1,4 @@ +while(a){ + if (b) if (c) d; + if (e) break; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.mangleOnly.js new file mode 100644 index 00000000000..e9551e8601c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.mangleOnly.js @@ -0,0 +1,13 @@ +"AAAAAAAA"; +"BBBBBBB"; +new (class { + f(b) { + try { + throw { + m: "PASS" + }; + } catch ({ m: a }) { + console.log(a); + } + } +})().f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.mangleOnly.js new file mode 100644 index 00000000000..e9551e8601c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.mangleOnly.js @@ -0,0 +1,13 @@ +"AAAAAAAA"; +"BBBBBBB"; +new (class { + f(b) { + try { + throw { + m: "PASS" + }; + } catch ({ m: a }) { + console.log(a); + } + } +})().f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/catch_destructuring_with_sequence/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/catch_destructuring_with_sequence/output.mangleOnly.js new file mode 100644 index 00000000000..e7ba1206ccf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/catch_destructuring_with_sequence/output.mangleOnly.js @@ -0,0 +1,3 @@ +try { + throw {}; +} catch ({ xCover: a = (0, function() {}) }) {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/issue_452/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/issue_452/output.mangleOnly.js new file mode 100644 index 00000000000..da382f0daf7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/issue_452/output.mangleOnly.js @@ -0,0 +1,8 @@ +try { + const a = [ + "PASS" + ]; + for (const b of a){ + console.log(b); + } +} catch (c) {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parameterless_catch/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parameterless_catch/output.mangleOnly.js new file mode 100644 index 00000000000..c232a70f901 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parameterless_catch/output.mangleOnly.js @@ -0,0 +1,5 @@ +try { + unknown(); +} catch { + console.log("PASS"); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parent_scope_of_catch_block_is_not_the_try_block/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parent_scope_of_catch_block_is_not_the_try_block/output.mangleOnly.js new file mode 100644 index 00000000000..3d9a9057904 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/parent_scope_of_catch_block_is_not_the_try_block/output.mangleOnly.js @@ -0,0 +1,9 @@ +function a(c, a) { + try { + const d = {}; + throw "PASS"; + } catch (b) { + return a(b); + } +} +console.log(a(null, (a)=>a)); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_defun_arg_name/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_defun_arg_name/output.mangleOnly.js new file mode 100644 index 00000000000..0aade46dcd5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_defun_arg_name/output.mangleOnly.js @@ -0,0 +1,4 @@ +function a(a) { + return typeof a; +} +console.log(typeof a, a()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_lambda_arg_name/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_lambda_arg_name/output.mangleOnly.js new file mode 100644 index 00000000000..bf4bded8e87 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/duplicate_lambda_arg_name/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log((function a(a) { + return typeof a; +})()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_1668/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_1668/output.mangleOnly.js new file mode 100644 index 00000000000..2d681c80ead --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_1668/output.mangleOnly.js @@ -0,0 +1 @@ +if (typeof bar) ; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_1/output.mangleOnly.js new file mode 100644 index 00000000000..5c5b5986d47 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_1/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function arguments() { + console.log(typeof arguments); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_2/output.mangleOnly.js new file mode 100644 index 00000000000..ce2df3c59fa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_2/output.mangleOnly.js @@ -0,0 +1,4 @@ +function arguments() { + return typeof arguments; +} +console.log(typeof arguments, arguments()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_3/output.mangleOnly.js new file mode 100644 index 00000000000..16b2a4aa0f4 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_3/output.mangleOnly.js @@ -0,0 +1,4 @@ +(function() { + function arguments() {} + console.log(typeof arguments); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_4/output.mangleOnly.js new file mode 100644 index 00000000000..391caed45fb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_4/output.mangleOnly.js @@ -0,0 +1,2 @@ +function arguments() {} +console.log(typeof arguments); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_5/output.mangleOnly.js new file mode 100644 index 00000000000..31df48e9a8c --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_5/output.mangleOnly.js @@ -0,0 +1,3 @@ +(function arguments(arguments) { + console.log(typeof arguments); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_6/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_6/output.mangleOnly.js new file mode 100644 index 00000000000..05a13788bf0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/issue_2728_6/output.mangleOnly.js @@ -0,0 +1,4 @@ +function arguments(arguments) { + return typeof arguments; +} +console.log(typeof arguments, arguments()); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_1/output.mangleOnly.js new file mode 100644 index 00000000000..855e3cea680 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_1/output.mangleOnly.js @@ -0,0 +1,14 @@ +function b() { + console.log("YES"); +} +function a() { + c = 42; + console.log("NOPE"); +} +function c() { + console.log("YUP"); +} +a = 42; +"function" == typeof b && b(); +"function" == typeof a && a(); +"function" == typeof c && c(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_2/output.mangleOnly.js new file mode 100644 index 00000000000..b0b2c615c18 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_defun_2/output.mangleOnly.js @@ -0,0 +1,7 @@ +var a = function() { + console.log(b); +}; +var b = 0; +b++ < 2 && typeof a == "function" && a(); +b++ < 2 && typeof a == "function" && a(); +b++ < 2 && typeof a == "function" && a(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_evaluation/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_evaluation/output.mangleOnly.js new file mode 100644 index 00000000000..31f1e2ad6e3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_evaluation/output.mangleOnly.js @@ -0,0 +1,8 @@ +a = typeof 1; +b = typeof "test"; +c = typeof []; +d = typeof {}; +e = typeof /./; +f = typeof false; +g = typeof function() {}; +h = typeof undefined; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_in_boolean_context/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_in_boolean_context/output.mangleOnly.js new file mode 100644 index 00000000000..15217d4e871 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/typeof/typeof_in_boolean_context/output.mangleOnly.js @@ -0,0 +1,10 @@ +function a(a) { + return typeof a ? "yes" : "no"; +} +function b() { + return typeof g() ? "Yes" : "No"; +} +typeof 0 ? foo() : bar(); +!typeof console.log(1); +var c = !typeof console.log(2); +if (typeof (1 + foo())) ; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/ID_continue_with_surrogate_pair/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/ID_continue_with_surrogate_pair/output.mangleOnly.js new file mode 100644 index 00000000000..3e5a283262b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/ID_continue_with_surrogate_pair/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "\u{100000}\u{100000}\u{100000}\u{100000}\u{100000}"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/check_escape_style/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/check_escape_style/output.mangleOnly.js new file mode 100644 index 00000000000..724bd59ad80 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/check_escape_style/output.mangleOnly.js @@ -0,0 +1,6 @@ +var a = "\x01"; +var b = "\x10"; +var c = "\u0100"; +var d = "\u1000"; +var e = "\u{10000}"; +var f = "\u{100000}"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/escape_non_escaped_identifier/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/escape_non_escaped_identifier/output.mangleOnly.js new file mode 100644 index 00000000000..633b5eeb3da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/escape_non_escaped_identifier/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "\xb5\xfe"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_1/output.mangleOnly.js new file mode 100644 index 00000000000..8abf2febb89 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_1/output.mangleOnly.js @@ -0,0 +1 @@ +console.log("\ud83d", "\ude00", "😀", "\ud83d@\ude00"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_2/output.mangleOnly.js new file mode 100644 index 00000000000..87485328ad3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_2/output.mangleOnly.js @@ -0,0 +1 @@ +console.log("\ud83d", "\ude00", "\ud83d\ude00", "\ud83d@\ude00"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_3/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_3/output.mangleOnly.js new file mode 100644 index 00000000000..63a9b080459 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_3/output.mangleOnly.js @@ -0,0 +1 @@ +console.log("\ud83d" + "\ude00", "\ud83d" + "@" + "\ude00"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_4/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_4/output.mangleOnly.js new file mode 100644 index 00000000000..63a9b080459 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2242_4/output.mangleOnly.js @@ -0,0 +1 @@ +console.log("\ud83d" + "\ude00", "\ud83d" + "@" + "\ude00"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2569/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2569/output.mangleOnly.js new file mode 100644 index 00000000000..c661fb6df4e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_2569/output.mangleOnly.js @@ -0,0 +1 @@ +new RegExp("[\udc42-\udcaa\udd74-\udd96\ude45-\ude4f\udea3-\udecc]"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_3271/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_3271/output.mangleOnly.js new file mode 100644 index 00000000000..06e89907451 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/issue_3271/output.mangleOnly.js @@ -0,0 +1,13 @@ +function a(d) { + var c = 0, a = new Array(2), b = d.charCodeAt(0); + if (b < 2048) { + a[c++] = 192 | (b >>> 6); + a[c++] = 128 | (b & 63); + } else { + a[c++] = 224 | (b >>> 12); + a[c++] = 128 | ((b >>> 6) & 63); + a[c++] = 128 | (b & 63); + } + return a; +} +console.log(a("é")); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_es5/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_es5/output.mangleOnly.js new file mode 100644 index 00000000000..dfbb23c2837 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_es5/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log({ + Ꞡ: "2139" +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_safari/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_safari/output.mangleOnly.js new file mode 100644 index 00000000000..dfbb23c2837 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/keep_quoted_unicode_props_safari/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log({ + Ꞡ: "2139" +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/non_escape_2_non_escape/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/non_escape_2_non_escape/output.mangleOnly.js new file mode 100644 index 00000000000..34e81d8903f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/non_escape_2_non_escape/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "µþ"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_2015/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_2015/output.mangleOnly.js new file mode 100644 index 00000000000..f84557c8630 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_2015/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = "foo"; +var b = "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_es5_as_is/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_es5_as_is/output.mangleOnly.js new file mode 100644 index 00000000000..985150438ee --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_es5_as_is/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "bar"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_safari/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_safari/output.mangleOnly.js new file mode 100644 index 00000000000..1ddcc1ec2eb --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_escaped_identifier_safari/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "foo"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_identifier_ascii_only/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_identifier_ascii_only/output.mangleOnly.js new file mode 100644 index 00000000000..ad93ef746cf --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_identifier_ascii_only/output.mangleOnly.js @@ -0,0 +1,3 @@ +var a = "hi"; +var b = "hello"; +var c = "testing \u{101111}"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_parse_variables/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_parse_variables/output.mangleOnly.js new file mode 100644 index 00000000000..62cc97adfe7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_parse_variables/output.mangleOnly.js @@ -0,0 +1,4 @@ +var a = {}; +a.你好 = 456; +var b = 123; +var c = 3; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_props_safari/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_props_safari/output.mangleOnly.js new file mode 100644 index 00000000000..f00c425cb67 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_props_safari/output.mangleOnly.js @@ -0,0 +1,3 @@ +console.log({ + "𝒶": "foo" +}); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_string_literals/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_string_literals/output.mangleOnly.js new file mode 100644 index 00000000000..868fc8a1e26 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unicode/unicode_string_literals/output.mangleOnly.js @@ -0,0 +1 @@ +var a = "6 length unicode character: \u{101111}"; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_1/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_1/output.mangleOnly.js new file mode 100644 index 00000000000..f3a70f9f526 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_1/output.mangleOnly.js @@ -0,0 +1 @@ +Symbol("kDog"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_2/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_2/output.mangleOnly.js new file mode 100644 index 00000000000..f3a70f9f526 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/unsafe_symbols/unsafe_symbols_2/output.mangleOnly.js @@ -0,0 +1 @@ +Symbol("kDog"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife/output.mangleOnly.js new file mode 100644 index 00000000000..a39567de33d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return function() { + console.log("test"); + }; +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_expression/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_expression/output.mangleOnly.js new file mode 100644 index 00000000000..dabfa8ecc80 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_expression/output.mangleOnly.js @@ -0,0 +1,3 @@ +foo = (function() { + return bar(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_return_call/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_return_call/output.mangleOnly.js new file mode 100644 index 00000000000..a3ad81dd546 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_return_call/output.mangleOnly.js @@ -0,0 +1,5 @@ +(function() { + return (function() { + console.log("test"); + })(); +})()(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..d69b3efc724 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = Object.getPrototypeOf(Object.getPrototypeOf((function*() {})())); +evaluate(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.mangleOnly.js new file mode 100644 index 00000000000..d69b3efc724 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.mangleOnly.js @@ -0,0 +1,2 @@ +var a = Object.getPrototypeOf(Object.getPrototypeOf((function*() {})())); +evaluate(a); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.mangleOnly.js new file mode 100644 index 00000000000..1f0c4c287a5 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.mangleOnly.js @@ -0,0 +1,3 @@ +function* a() { + yield; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.mangleOnly.js new file mode 100644 index 00000000000..4df46943d26 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.mangleOnly.js @@ -0,0 +1 @@ +function* a() {} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.mangleOnly.js new file mode 100644 index 00000000000..5553f225967 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.mangleOnly.js @@ -0,0 +1,3 @@ +function* a() { + yield remote(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.mangleOnly.js new file mode 100644 index 00000000000..081c5672721 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.mangleOnly.js @@ -0,0 +1,4 @@ +function* a() { + var a = {}; + a.prop = yield 5; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.mangleOnly.js new file mode 100644 index 00000000000..1e40f995233 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.mangleOnly.js @@ -0,0 +1,4 @@ +function* a() { + var a = yield x(); + return new a(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.mangleOnly.js new file mode 100644 index 00000000000..4ec503fa600 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.mangleOnly.js @@ -0,0 +1,10 @@ +function* b(a) { + const b = yield ((c = a), -c); + var c; + console.log(c); + console.log(b); + yield 2; +} +var a = b(1); +console.log(a.next("first").value); +console.log(a.next("second").value); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.mangleOnly.js new file mode 100644 index 00000000000..70653117fb0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.mangleOnly.js @@ -0,0 +1,7 @@ +function* b() { + const a = yield 1; + yield 2; + return a; +} +var a = b(); +console.log(a.next().value, a.next().value); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.mangleOnly.js new file mode 100644 index 00000000000..264ce39f536 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.mangleOnly.js @@ -0,0 +1,4 @@ +"use strict"; +console.log({ + yield: 42 +}.yield); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.mangleOnly.js new file mode 100644 index 00000000000..85e03544fc1 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.mangleOnly.js @@ -0,0 +1,17 @@ +iter = (function*() { + assignmentResult = [x = yield] = value; +})(); +function* a() { + yield; +} +function* b() { + [ + yield + ]; +} +function* c() { + yield, yield; +} +function* d() { + (yield) ? yield : yield; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.mangleOnly.js new file mode 100644 index 00000000000..ddc1bd64c96 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.mangleOnly.js @@ -0,0 +1,5 @@ +function* a() { + yield x.foo; + (yield x).foo; + yield (yield obj.foo()).bar(); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.mangleOnly.js new file mode 100644 index 00000000000..d30cbf87435 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.mangleOnly.js @@ -0,0 +1,12 @@ +function* a() { + yield; +} +function* b() { + yield undefined; +} +function* c() { + yield null; +} +function* d() { + yield* undefined; +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.mangleOnly.js new file mode 100644 index 00000000000..7b5380d630a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.mangleOnly.js @@ -0,0 +1,8 @@ +function* a() { + var a = (yield 1) + (yield 2); + var b = (yield 3) === (yield 4); + var c = (yield 5) << (yield 6); + var d = yield 7; + var e = (yield 8) ? yield 9 : yield 10; + var f = -(yield 11); +} diff --git a/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.mangleOnly.js new file mode 100644 index 00000000000..130864a9683 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.mangleOnly.js @@ -0,0 +1,5 @@ +function* a() { + yield x["foo"]; + (yield x)["foo"]; + yield (yield obj.foo())["bar"](); +}