@mxtommy/kip 3.9.0-beta.2 → 3.9.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +1 -1
- package/.github/instructions/angular.instructions.md +46 -0
- package/README.md +49 -12
- package/package.json +2 -4
- package/public/3rdpartylicenses.txt +77 -77
- package/public/app-help.component.css.map +7 -0
- package/public/app.component.css.map +7 -0
- package/public/assets/help-docs/configuration.md +4 -4
- package/public/assets/help-docs/dashboards.md +4 -2
- package/public/assets/svg/icons.svg +1 -1
- package/public/boolean-control-config.component.css.map +7 -0
- package/public/boolean-multicontrol-options.component.css.map +7 -0
- package/public/chunk-3EWIS24B.js +5237 -0
- package/public/chunk-3EWIS24B.js.map +1 -0
- package/public/chunk-3VR3EA35.js +1022 -0
- package/public/chunk-3VR3EA35.js.map +1 -0
- package/public/chunk-63ILPRXC.js +2091 -0
- package/public/chunk-63ILPRXC.js.map +1 -0
- package/public/chunk-65ZWQBS6.js +3102 -0
- package/public/chunk-65ZWQBS6.js.map +1 -0
- package/public/chunk-B3LKEWZP.js +4950 -0
- package/public/chunk-B3LKEWZP.js.map +1 -0
- package/public/chunk-BIBIW64D.js +16773 -0
- package/public/chunk-BIBIW64D.js.map +1 -0
- package/public/chunk-BM53SC5N.js +77 -0
- package/public/chunk-BM53SC5N.js.map +7 -0
- package/public/chunk-D7ILNFDM.js +3059 -0
- package/public/chunk-D7ILNFDM.js.map +1 -0
- package/public/chunk-E24UNLSJ.js +2228 -0
- package/public/chunk-E24UNLSJ.js.map +1 -0
- package/public/chunk-J42S2ELC.js +5927 -0
- package/public/chunk-J42S2ELC.js.map +1 -0
- package/public/chunk-KC22A6VH.js +17 -0
- package/public/chunk-KC22A6VH.js.map +7 -0
- package/public/chunk-MCEJWZB2.js +116 -0
- package/public/chunk-MCEJWZB2.js.map +1 -0
- package/public/chunk-NBF6SE6O.js +89 -0
- package/public/chunk-NBF6SE6O.js.map +7 -0
- package/public/chunk-QC7VGVAR.js +343 -0
- package/public/chunk-QC7VGVAR.js.map +7 -0
- package/public/chunk-SDOP6T56.js +42377 -0
- package/public/chunk-SDOP6T56.js.map +1 -0
- package/public/chunk-U2DCSTRY.js +159 -0
- package/public/chunk-U2DCSTRY.js.map +7 -0
- package/public/chunk-UHVNAEXC.js +4752 -0
- package/public/chunk-UHVNAEXC.js.map +1 -0
- package/public/chunk-UQYTD5AC.js +2723 -0
- package/public/chunk-UQYTD5AC.js.map +1 -0
- package/public/chunk-XSABJ5NZ.js +272 -0
- package/public/chunk-XSABJ5NZ.js.map +7 -0
- package/public/chunk-Y6N6O2IP.js +19852 -0
- package/public/chunk-Y6N6O2IP.js.map +1 -0
- package/public/chunk-YGJLBLOX.js +2708 -0
- package/public/chunk-YGJLBLOX.js.map +1 -0
- package/public/chunk-YT33DHC3.js +591 -0
- package/public/chunk-YT33DHC3.js.map +7 -0
- package/public/chunk-YZXYVP72.js +4934 -0
- package/public/chunk-YZXYVP72.js.map +1 -0
- package/public/chunk-ZEHRDSTB.js +13727 -0
- package/public/chunk-ZEHRDSTB.js.map +1 -0
- package/public/config.component.css.map +7 -0
- package/public/dashboard-scroller.component.css.map +7 -0
- package/public/dashboard.component.css.map +7 -0
- package/public/dashboards-editor.component.css.map +7 -0
- package/public/data-inspector-row.component.css.map +7 -0
- package/public/data-inspector.component.css.map +7 -0
- package/public/dataset-chart-options.component.css.map +7 -0
- package/public/datasets.component.css.map +7 -0
- package/public/dialog-confirmation.component.css.map +7 -0
- package/public/dialog-dashboard-page-editor.component.css.map +7 -0
- package/public/dialog-frame.component.css.map +7 -0
- package/public/dialog-name.component.css.map +7 -0
- package/public/display-chart-options.component.css.map +7 -0
- package/public/display.component.css.map +7 -0
- package/public/gauge-steel.component.css.map +7 -0
- package/public/home.component.css.map +7 -0
- package/public/index.html +19 -17
- package/public/main.js +36423 -0
- package/public/main.js.map +1 -0
- package/public/menu-actions.component.css.map +7 -0
- package/public/menu-notifications.component.css.map +7 -0
- package/public/minichart.component.css.map +7 -0
- package/public/modal-user-credential.component.css.map +7 -0
- package/public/modal-widget-config.component.css.map +7 -0
- package/public/notification-badge.component.css.map +7 -0
- package/public/page-header.component.css.map +7 -0
- package/public/path-control-config.component.css.map +7 -0
- package/public/paths-options.component.css.map +7 -0
- package/public/polyfills.js +4422 -0
- package/public/polyfills.js.map +1 -0
- package/public/select-autopilot.component.css.map +7 -0
- package/public/select-icon.component.css.map +7 -0
- package/public/settings.component.css.map +7 -0
- package/public/signalk.component.css.map +7 -0
- package/public/styles.css +1651 -0
- package/public/styles.css.map +7 -0
- package/public/svg-autopilot.component.css.map +7 -0
- package/public/svg-racesteer.component.css.map +7 -0
- package/public/svg-simple-linear-gauge.component.css.map +7 -0
- package/public/svg-windsteer.component.css.map +7 -0
- package/public/tile-large-icon.component.css.map +7 -0
- package/public/units.component.css.map +7 -0
- package/public/upgrade-config.component.css.map +7 -0
- package/public/widget-autopilot.component.css.map +7 -0
- package/public/widget-boolean-switch.component.css.map +7 -0
- package/public/widget-datetime.component.css.map +7 -0
- package/public/widget-freeboardsk.component.css.map +7 -0
- package/public/widget-gauge-ng-compass.component.css.map +7 -0
- package/public/widget-gauge-ng-linear.component.css.map +7 -0
- package/public/widget-gauge-ng-radial.component.css.map +7 -0
- package/public/widget-gauge-steel.component.css.map +7 -0
- package/public/widget-horizon.component.css.map +7 -0
- package/public/widget-host.component.css.map +7 -0
- package/public/widget-iframe.component.css.map +7 -0
- package/public/widget-label.component.css.map +7 -0
- package/public/widget-list-card.component.css.map +7 -0
- package/public/widget-numeric.component.css.map +7 -0
- package/public/widget-position.component.css.map +7 -0
- package/public/widget-race-timer.component.css.map +7 -0
- package/public/widget-racer-line.component.css.map +7 -0
- package/public/widget-racer-timer.component.css.map +7 -0
- package/public/widget-simple-linear.component.css.map +7 -0
- package/public/widget-slider.component.css.map +7 -0
- package/public/widget-text.component.css.map +7 -0
- package/public/widget-title.component.css.map +7 -0
- package/public/widget-tutorial.component.css.map +7 -0
- package/public/widgets-list.component.css.map +7 -0
- package/public/assets/hammer.min.js +0 -7
- package/public/chunk-2YVW3TBK.js +0 -2
- package/public/chunk-35L7BBBD.js +0 -15
- package/public/chunk-3LEMFOCV.js +0 -3
- package/public/chunk-3LJAKLLW.js +0 -1
- package/public/chunk-4JJLPUET.js +0 -60
- package/public/chunk-CBUY7NMR.js +0 -2
- package/public/chunk-CQXWGD3T.js +0 -2
- package/public/chunk-EUFDL4TJ.js +0 -6
- package/public/chunk-FBFTGVZ6.js +0 -1
- package/public/chunk-HCXH72CD.js +0 -5
- package/public/chunk-JY3WVS7C.js +0 -2
- package/public/chunk-KTDDP73O.js +0 -2
- package/public/chunk-NMEZOCU2.js +0 -1
- package/public/chunk-NS2FPVWM.js +0 -4
- package/public/chunk-OSYHJB4F.js +0 -11
- package/public/chunk-PKNLASTF.js +0 -4
- package/public/chunk-Q2Y75POI.js +0 -1
- package/public/chunk-RRTCHHRC.js +0 -3
- package/public/chunk-TA4GACKT.js +0 -4
- package/public/chunk-TXPLRBW5.js +0 -2
- package/public/chunk-VHFBF47T.js +0 -1
- package/public/chunk-VYUMZVH2.js +0 -2
- package/public/chunk-XRGAX4LS.js +0 -2
- package/public/chunk-YNJRIFUM.js +0 -1
- package/public/chunk-ZBCOJLI4.js +0 -6
- package/public/main-XM5EHMUE.js +0 -50
- package/public/polyfills-KH22MU6U.js +0 -2
- package/public/styles-RECKN66R.css +0 -1
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP-ILKS6RVC.woff2 → KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ-MJ3CERJ6.woff2 → KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP-UW3XWY7P.woff2 → KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP-U3JTBV4H.woff2 → KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP-36ULTGLY.woff2 → KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP-5NJLO2HW.woff2 → KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP-2EL65J2O.woff2 → KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP-XWLWMQVU.woff2 → KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ-PWGJWDFE.woff2 → KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP-ITB7NUJC.woff2 → KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP-32PLHKPQ.woff2 → KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP-QPSNQEDD.woff2 → KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP-JKBSJZY3.woff2 → KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP-OG5AHRIX.woff2 → KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz-PPTELUJT.woff2 → KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu4mxKKTU1Kg-SNGEW7FX.woff2 → KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz-DRL4U32S.woff2 → KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu72xKKTU1Kvnz-PRJ7OQMU.woff2 → KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz-HW6RMPJ3.woff2 → KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz-KZD6JQRT.woff2 → KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz-Z72STTMG.woff2 → KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ-CN2J7AYH.woff2 → flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2} +0 -0
|
@@ -0,0 +1,4422 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// node_modules/core-js/internals/global-this.js
|
|
28
|
+
var require_global_this = __commonJS({
|
|
29
|
+
"node_modules/core-js/internals/global-this.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
var check = function(it) {
|
|
32
|
+
return it && it.Math === Math && it;
|
|
33
|
+
};
|
|
34
|
+
module.exports = // eslint-disable-next-line es/no-global-this -- safe
|
|
35
|
+
check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
36
|
+
check(typeof self == "object" && self) || check(typeof global == "object" && global) || check(typeof exports == "object" && exports) || // eslint-disable-next-line no-new-func -- fallback
|
|
37
|
+
/* @__PURE__ */ (function() {
|
|
38
|
+
return this;
|
|
39
|
+
})() || Function("return this")();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// node_modules/core-js/internals/is-pure.js
|
|
44
|
+
var require_is_pure = __commonJS({
|
|
45
|
+
"node_modules/core-js/internals/is-pure.js"(exports, module) {
|
|
46
|
+
"use strict";
|
|
47
|
+
module.exports = false;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// node_modules/core-js/internals/define-global-property.js
|
|
52
|
+
var require_define_global_property = __commonJS({
|
|
53
|
+
"node_modules/core-js/internals/define-global-property.js"(exports, module) {
|
|
54
|
+
"use strict";
|
|
55
|
+
var globalThis2 = require_global_this();
|
|
56
|
+
var defineProperty = Object.defineProperty;
|
|
57
|
+
module.exports = function(key, value) {
|
|
58
|
+
try {
|
|
59
|
+
defineProperty(globalThis2, key, { value, configurable: true, writable: true });
|
|
60
|
+
} catch (error) {
|
|
61
|
+
globalThis2[key] = value;
|
|
62
|
+
}
|
|
63
|
+
return value;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// node_modules/core-js/internals/shared-store.js
|
|
69
|
+
var require_shared_store = __commonJS({
|
|
70
|
+
"node_modules/core-js/internals/shared-store.js"(exports, module) {
|
|
71
|
+
"use strict";
|
|
72
|
+
var IS_PURE = require_is_pure();
|
|
73
|
+
var globalThis2 = require_global_this();
|
|
74
|
+
var defineGlobalProperty = require_define_global_property();
|
|
75
|
+
var SHARED = "__core-js_shared__";
|
|
76
|
+
var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
|
|
77
|
+
(store.versions || (store.versions = [])).push({
|
|
78
|
+
version: "3.45.1",
|
|
79
|
+
mode: IS_PURE ? "pure" : "global",
|
|
80
|
+
copyright: "\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",
|
|
81
|
+
license: "https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",
|
|
82
|
+
source: "https://github.com/zloirock/core-js"
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// node_modules/core-js/internals/shared.js
|
|
88
|
+
var require_shared = __commonJS({
|
|
89
|
+
"node_modules/core-js/internals/shared.js"(exports, module) {
|
|
90
|
+
"use strict";
|
|
91
|
+
var store = require_shared_store();
|
|
92
|
+
module.exports = function(key, value) {
|
|
93
|
+
return store[key] || (store[key] = value || {});
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// node_modules/core-js/internals/fails.js
|
|
99
|
+
var require_fails = __commonJS({
|
|
100
|
+
"node_modules/core-js/internals/fails.js"(exports, module) {
|
|
101
|
+
"use strict";
|
|
102
|
+
module.exports = function(exec) {
|
|
103
|
+
try {
|
|
104
|
+
return !!exec();
|
|
105
|
+
} catch (error) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// node_modules/core-js/internals/function-bind-native.js
|
|
113
|
+
var require_function_bind_native = __commonJS({
|
|
114
|
+
"node_modules/core-js/internals/function-bind-native.js"(exports, module) {
|
|
115
|
+
"use strict";
|
|
116
|
+
var fails = require_fails();
|
|
117
|
+
module.exports = !fails(function() {
|
|
118
|
+
var test = (function() {
|
|
119
|
+
}).bind();
|
|
120
|
+
return typeof test != "function" || test.hasOwnProperty("prototype");
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// node_modules/core-js/internals/function-uncurry-this.js
|
|
126
|
+
var require_function_uncurry_this = __commonJS({
|
|
127
|
+
"node_modules/core-js/internals/function-uncurry-this.js"(exports, module) {
|
|
128
|
+
"use strict";
|
|
129
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
130
|
+
var FunctionPrototype = Function.prototype;
|
|
131
|
+
var call = FunctionPrototype.call;
|
|
132
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
133
|
+
module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
|
|
134
|
+
return function() {
|
|
135
|
+
return call.apply(fn, arguments);
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// node_modules/core-js/internals/is-null-or-undefined.js
|
|
142
|
+
var require_is_null_or_undefined = __commonJS({
|
|
143
|
+
"node_modules/core-js/internals/is-null-or-undefined.js"(exports, module) {
|
|
144
|
+
"use strict";
|
|
145
|
+
module.exports = function(it) {
|
|
146
|
+
return it === null || it === void 0;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// node_modules/core-js/internals/require-object-coercible.js
|
|
152
|
+
var require_require_object_coercible = __commonJS({
|
|
153
|
+
"node_modules/core-js/internals/require-object-coercible.js"(exports, module) {
|
|
154
|
+
"use strict";
|
|
155
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
156
|
+
var $TypeError = TypeError;
|
|
157
|
+
module.exports = function(it) {
|
|
158
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
159
|
+
return it;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// node_modules/core-js/internals/to-object.js
|
|
165
|
+
var require_to_object = __commonJS({
|
|
166
|
+
"node_modules/core-js/internals/to-object.js"(exports, module) {
|
|
167
|
+
"use strict";
|
|
168
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
169
|
+
var $Object = Object;
|
|
170
|
+
module.exports = function(argument) {
|
|
171
|
+
return $Object(requireObjectCoercible(argument));
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// node_modules/core-js/internals/has-own-property.js
|
|
177
|
+
var require_has_own_property = __commonJS({
|
|
178
|
+
"node_modules/core-js/internals/has-own-property.js"(exports, module) {
|
|
179
|
+
"use strict";
|
|
180
|
+
var uncurryThis = require_function_uncurry_this();
|
|
181
|
+
var toObject = require_to_object();
|
|
182
|
+
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
|
183
|
+
module.exports = Object.hasOwn || function hasOwn(it, key) {
|
|
184
|
+
return hasOwnProperty(toObject(it), key);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// node_modules/core-js/internals/uid.js
|
|
190
|
+
var require_uid = __commonJS({
|
|
191
|
+
"node_modules/core-js/internals/uid.js"(exports, module) {
|
|
192
|
+
"use strict";
|
|
193
|
+
var uncurryThis = require_function_uncurry_this();
|
|
194
|
+
var id = 0;
|
|
195
|
+
var postfix = Math.random();
|
|
196
|
+
var toString = uncurryThis(1.1.toString);
|
|
197
|
+
module.exports = function(key) {
|
|
198
|
+
return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// node_modules/core-js/internals/environment-user-agent.js
|
|
204
|
+
var require_environment_user_agent = __commonJS({
|
|
205
|
+
"node_modules/core-js/internals/environment-user-agent.js"(exports, module) {
|
|
206
|
+
"use strict";
|
|
207
|
+
var globalThis2 = require_global_this();
|
|
208
|
+
var navigator = globalThis2.navigator;
|
|
209
|
+
var userAgent = navigator && navigator.userAgent;
|
|
210
|
+
module.exports = userAgent ? String(userAgent) : "";
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// node_modules/core-js/internals/environment-v8-version.js
|
|
215
|
+
var require_environment_v8_version = __commonJS({
|
|
216
|
+
"node_modules/core-js/internals/environment-v8-version.js"(exports, module) {
|
|
217
|
+
"use strict";
|
|
218
|
+
var globalThis2 = require_global_this();
|
|
219
|
+
var userAgent = require_environment_user_agent();
|
|
220
|
+
var process = globalThis2.process;
|
|
221
|
+
var Deno = globalThis2.Deno;
|
|
222
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
223
|
+
var v8 = versions && versions.v8;
|
|
224
|
+
var match;
|
|
225
|
+
var version;
|
|
226
|
+
if (v8) {
|
|
227
|
+
match = v8.split(".");
|
|
228
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
229
|
+
}
|
|
230
|
+
if (!version && userAgent) {
|
|
231
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
232
|
+
if (!match || match[1] >= 74) {
|
|
233
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
234
|
+
if (match) version = +match[1];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
module.exports = version;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// node_modules/core-js/internals/symbol-constructor-detection.js
|
|
242
|
+
var require_symbol_constructor_detection = __commonJS({
|
|
243
|
+
"node_modules/core-js/internals/symbol-constructor-detection.js"(exports, module) {
|
|
244
|
+
"use strict";
|
|
245
|
+
var V8_VERSION = require_environment_v8_version();
|
|
246
|
+
var fails = require_fails();
|
|
247
|
+
var globalThis2 = require_global_this();
|
|
248
|
+
var $String = globalThis2.String;
|
|
249
|
+
module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
|
|
250
|
+
var symbol = Symbol("symbol detection");
|
|
251
|
+
return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
252
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// node_modules/core-js/internals/use-symbol-as-uid.js
|
|
258
|
+
var require_use_symbol_as_uid = __commonJS({
|
|
259
|
+
"node_modules/core-js/internals/use-symbol-as-uid.js"(exports, module) {
|
|
260
|
+
"use strict";
|
|
261
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
262
|
+
module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// node_modules/core-js/internals/well-known-symbol.js
|
|
267
|
+
var require_well_known_symbol = __commonJS({
|
|
268
|
+
"node_modules/core-js/internals/well-known-symbol.js"(exports, module) {
|
|
269
|
+
"use strict";
|
|
270
|
+
var globalThis2 = require_global_this();
|
|
271
|
+
var shared = require_shared();
|
|
272
|
+
var hasOwn = require_has_own_property();
|
|
273
|
+
var uid = require_uid();
|
|
274
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
275
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
276
|
+
var Symbol2 = globalThis2.Symbol;
|
|
277
|
+
var WellKnownSymbolsStore = shared("wks");
|
|
278
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2["for"] || Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
|
|
279
|
+
module.exports = function(name) {
|
|
280
|
+
if (!hasOwn(WellKnownSymbolsStore, name)) {
|
|
281
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol2, name) ? Symbol2[name] : createWellKnownSymbol("Symbol." + name);
|
|
282
|
+
}
|
|
283
|
+
return WellKnownSymbolsStore[name];
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// node_modules/core-js/internals/to-string-tag-support.js
|
|
289
|
+
var require_to_string_tag_support = __commonJS({
|
|
290
|
+
"node_modules/core-js/internals/to-string-tag-support.js"(exports, module) {
|
|
291
|
+
"use strict";
|
|
292
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
293
|
+
var TO_STRING_TAG = wellKnownSymbol("toStringTag");
|
|
294
|
+
var test = {};
|
|
295
|
+
test[TO_STRING_TAG] = "z";
|
|
296
|
+
module.exports = String(test) === "[object z]";
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// node_modules/core-js/internals/is-callable.js
|
|
301
|
+
var require_is_callable = __commonJS({
|
|
302
|
+
"node_modules/core-js/internals/is-callable.js"(exports, module) {
|
|
303
|
+
"use strict";
|
|
304
|
+
var documentAll = typeof document == "object" && document.all;
|
|
305
|
+
module.exports = typeof documentAll == "undefined" && documentAll !== void 0 ? function(argument) {
|
|
306
|
+
return typeof argument == "function" || argument === documentAll;
|
|
307
|
+
} : function(argument) {
|
|
308
|
+
return typeof argument == "function";
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// node_modules/core-js/internals/descriptors.js
|
|
314
|
+
var require_descriptors = __commonJS({
|
|
315
|
+
"node_modules/core-js/internals/descriptors.js"(exports, module) {
|
|
316
|
+
"use strict";
|
|
317
|
+
var fails = require_fails();
|
|
318
|
+
module.exports = !fails(function() {
|
|
319
|
+
return Object.defineProperty({}, 1, { get: function() {
|
|
320
|
+
return 7;
|
|
321
|
+
} })[1] !== 7;
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// node_modules/core-js/internals/is-object.js
|
|
327
|
+
var require_is_object = __commonJS({
|
|
328
|
+
"node_modules/core-js/internals/is-object.js"(exports, module) {
|
|
329
|
+
"use strict";
|
|
330
|
+
var isCallable = require_is_callable();
|
|
331
|
+
module.exports = function(it) {
|
|
332
|
+
return typeof it == "object" ? it !== null : isCallable(it);
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
// node_modules/core-js/internals/document-create-element.js
|
|
338
|
+
var require_document_create_element = __commonJS({
|
|
339
|
+
"node_modules/core-js/internals/document-create-element.js"(exports, module) {
|
|
340
|
+
"use strict";
|
|
341
|
+
var globalThis2 = require_global_this();
|
|
342
|
+
var isObject = require_is_object();
|
|
343
|
+
var document2 = globalThis2.document;
|
|
344
|
+
var EXISTS = isObject(document2) && isObject(document2.createElement);
|
|
345
|
+
module.exports = function(it) {
|
|
346
|
+
return EXISTS ? document2.createElement(it) : {};
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
// node_modules/core-js/internals/ie8-dom-define.js
|
|
352
|
+
var require_ie8_dom_define = __commonJS({
|
|
353
|
+
"node_modules/core-js/internals/ie8-dom-define.js"(exports, module) {
|
|
354
|
+
"use strict";
|
|
355
|
+
var DESCRIPTORS = require_descriptors();
|
|
356
|
+
var fails = require_fails();
|
|
357
|
+
var createElement = require_document_create_element();
|
|
358
|
+
module.exports = !DESCRIPTORS && !fails(function() {
|
|
359
|
+
return Object.defineProperty(createElement("div"), "a", {
|
|
360
|
+
get: function() {
|
|
361
|
+
return 7;
|
|
362
|
+
}
|
|
363
|
+
}).a !== 7;
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
// node_modules/core-js/internals/v8-prototype-define-bug.js
|
|
369
|
+
var require_v8_prototype_define_bug = __commonJS({
|
|
370
|
+
"node_modules/core-js/internals/v8-prototype-define-bug.js"(exports, module) {
|
|
371
|
+
"use strict";
|
|
372
|
+
var DESCRIPTORS = require_descriptors();
|
|
373
|
+
var fails = require_fails();
|
|
374
|
+
module.exports = DESCRIPTORS && fails(function() {
|
|
375
|
+
return Object.defineProperty(function() {
|
|
376
|
+
}, "prototype", {
|
|
377
|
+
value: 42,
|
|
378
|
+
writable: false
|
|
379
|
+
}).prototype !== 42;
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
// node_modules/core-js/internals/an-object.js
|
|
385
|
+
var require_an_object = __commonJS({
|
|
386
|
+
"node_modules/core-js/internals/an-object.js"(exports, module) {
|
|
387
|
+
"use strict";
|
|
388
|
+
var isObject = require_is_object();
|
|
389
|
+
var $String = String;
|
|
390
|
+
var $TypeError = TypeError;
|
|
391
|
+
module.exports = function(argument) {
|
|
392
|
+
if (isObject(argument)) return argument;
|
|
393
|
+
throw new $TypeError($String(argument) + " is not an object");
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
// node_modules/core-js/internals/function-call.js
|
|
399
|
+
var require_function_call = __commonJS({
|
|
400
|
+
"node_modules/core-js/internals/function-call.js"(exports, module) {
|
|
401
|
+
"use strict";
|
|
402
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
403
|
+
var call = Function.prototype.call;
|
|
404
|
+
module.exports = NATIVE_BIND ? call.bind(call) : function() {
|
|
405
|
+
return call.apply(call, arguments);
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
// node_modules/core-js/internals/get-built-in.js
|
|
411
|
+
var require_get_built_in = __commonJS({
|
|
412
|
+
"node_modules/core-js/internals/get-built-in.js"(exports, module) {
|
|
413
|
+
"use strict";
|
|
414
|
+
var globalThis2 = require_global_this();
|
|
415
|
+
var isCallable = require_is_callable();
|
|
416
|
+
var aFunction = function(argument) {
|
|
417
|
+
return isCallable(argument) ? argument : void 0;
|
|
418
|
+
};
|
|
419
|
+
module.exports = function(namespace, method) {
|
|
420
|
+
return arguments.length < 2 ? aFunction(globalThis2[namespace]) : globalThis2[namespace] && globalThis2[namespace][method];
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
// node_modules/core-js/internals/object-is-prototype-of.js
|
|
426
|
+
var require_object_is_prototype_of = __commonJS({
|
|
427
|
+
"node_modules/core-js/internals/object-is-prototype-of.js"(exports, module) {
|
|
428
|
+
"use strict";
|
|
429
|
+
var uncurryThis = require_function_uncurry_this();
|
|
430
|
+
module.exports = uncurryThis({}.isPrototypeOf);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// node_modules/core-js/internals/is-symbol.js
|
|
435
|
+
var require_is_symbol = __commonJS({
|
|
436
|
+
"node_modules/core-js/internals/is-symbol.js"(exports, module) {
|
|
437
|
+
"use strict";
|
|
438
|
+
var getBuiltIn = require_get_built_in();
|
|
439
|
+
var isCallable = require_is_callable();
|
|
440
|
+
var isPrototypeOf = require_object_is_prototype_of();
|
|
441
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
442
|
+
var $Object = Object;
|
|
443
|
+
module.exports = USE_SYMBOL_AS_UID ? function(it) {
|
|
444
|
+
return typeof it == "symbol";
|
|
445
|
+
} : function(it) {
|
|
446
|
+
var $Symbol = getBuiltIn("Symbol");
|
|
447
|
+
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
// node_modules/core-js/internals/try-to-string.js
|
|
453
|
+
var require_try_to_string = __commonJS({
|
|
454
|
+
"node_modules/core-js/internals/try-to-string.js"(exports, module) {
|
|
455
|
+
"use strict";
|
|
456
|
+
var $String = String;
|
|
457
|
+
module.exports = function(argument) {
|
|
458
|
+
try {
|
|
459
|
+
return $String(argument);
|
|
460
|
+
} catch (error) {
|
|
461
|
+
return "Object";
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
// node_modules/core-js/internals/a-callable.js
|
|
468
|
+
var require_a_callable = __commonJS({
|
|
469
|
+
"node_modules/core-js/internals/a-callable.js"(exports, module) {
|
|
470
|
+
"use strict";
|
|
471
|
+
var isCallable = require_is_callable();
|
|
472
|
+
var tryToString = require_try_to_string();
|
|
473
|
+
var $TypeError = TypeError;
|
|
474
|
+
module.exports = function(argument) {
|
|
475
|
+
if (isCallable(argument)) return argument;
|
|
476
|
+
throw new $TypeError(tryToString(argument) + " is not a function");
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
// node_modules/core-js/internals/get-method.js
|
|
482
|
+
var require_get_method = __commonJS({
|
|
483
|
+
"node_modules/core-js/internals/get-method.js"(exports, module) {
|
|
484
|
+
"use strict";
|
|
485
|
+
var aCallable = require_a_callable();
|
|
486
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
487
|
+
module.exports = function(V, P) {
|
|
488
|
+
var func = V[P];
|
|
489
|
+
return isNullOrUndefined(func) ? void 0 : aCallable(func);
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
// node_modules/core-js/internals/ordinary-to-primitive.js
|
|
495
|
+
var require_ordinary_to_primitive = __commonJS({
|
|
496
|
+
"node_modules/core-js/internals/ordinary-to-primitive.js"(exports, module) {
|
|
497
|
+
"use strict";
|
|
498
|
+
var call = require_function_call();
|
|
499
|
+
var isCallable = require_is_callable();
|
|
500
|
+
var isObject = require_is_object();
|
|
501
|
+
var $TypeError = TypeError;
|
|
502
|
+
module.exports = function(input, pref) {
|
|
503
|
+
var fn, val;
|
|
504
|
+
if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
505
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
|
|
506
|
+
if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
507
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
// node_modules/core-js/internals/to-primitive.js
|
|
513
|
+
var require_to_primitive = __commonJS({
|
|
514
|
+
"node_modules/core-js/internals/to-primitive.js"(exports, module) {
|
|
515
|
+
"use strict";
|
|
516
|
+
var call = require_function_call();
|
|
517
|
+
var isObject = require_is_object();
|
|
518
|
+
var isSymbol = require_is_symbol();
|
|
519
|
+
var getMethod = require_get_method();
|
|
520
|
+
var ordinaryToPrimitive = require_ordinary_to_primitive();
|
|
521
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
522
|
+
var $TypeError = TypeError;
|
|
523
|
+
var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
|
|
524
|
+
module.exports = function(input, pref) {
|
|
525
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
526
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
527
|
+
var result;
|
|
528
|
+
if (exoticToPrim) {
|
|
529
|
+
if (pref === void 0) pref = "default";
|
|
530
|
+
result = call(exoticToPrim, input, pref);
|
|
531
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
532
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
533
|
+
}
|
|
534
|
+
if (pref === void 0) pref = "number";
|
|
535
|
+
return ordinaryToPrimitive(input, pref);
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
// node_modules/core-js/internals/to-property-key.js
|
|
541
|
+
var require_to_property_key = __commonJS({
|
|
542
|
+
"node_modules/core-js/internals/to-property-key.js"(exports, module) {
|
|
543
|
+
"use strict";
|
|
544
|
+
var toPrimitive = require_to_primitive();
|
|
545
|
+
var isSymbol = require_is_symbol();
|
|
546
|
+
module.exports = function(argument) {
|
|
547
|
+
var key = toPrimitive(argument, "string");
|
|
548
|
+
return isSymbol(key) ? key : key + "";
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
// node_modules/core-js/internals/object-define-property.js
|
|
554
|
+
var require_object_define_property = __commonJS({
|
|
555
|
+
"node_modules/core-js/internals/object-define-property.js"(exports) {
|
|
556
|
+
"use strict";
|
|
557
|
+
var DESCRIPTORS = require_descriptors();
|
|
558
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
559
|
+
var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
|
|
560
|
+
var anObject = require_an_object();
|
|
561
|
+
var toPropertyKey = require_to_property_key();
|
|
562
|
+
var $TypeError = TypeError;
|
|
563
|
+
var $defineProperty = Object.defineProperty;
|
|
564
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
565
|
+
var ENUMERABLE = "enumerable";
|
|
566
|
+
var CONFIGURABLE = "configurable";
|
|
567
|
+
var WRITABLE = "writable";
|
|
568
|
+
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
569
|
+
anObject(O);
|
|
570
|
+
P = toPropertyKey(P);
|
|
571
|
+
anObject(Attributes);
|
|
572
|
+
if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
573
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
574
|
+
if (current && current[WRITABLE]) {
|
|
575
|
+
O[P] = Attributes.value;
|
|
576
|
+
Attributes = {
|
|
577
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
578
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
579
|
+
writable: false
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return $defineProperty(O, P, Attributes);
|
|
584
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
585
|
+
anObject(O);
|
|
586
|
+
P = toPropertyKey(P);
|
|
587
|
+
anObject(Attributes);
|
|
588
|
+
if (IE8_DOM_DEFINE) try {
|
|
589
|
+
return $defineProperty(O, P, Attributes);
|
|
590
|
+
} catch (error) {
|
|
591
|
+
}
|
|
592
|
+
if ("get" in Attributes || "set" in Attributes) throw new $TypeError("Accessors not supported");
|
|
593
|
+
if ("value" in Attributes) O[P] = Attributes.value;
|
|
594
|
+
return O;
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// node_modules/core-js/internals/function-name.js
|
|
600
|
+
var require_function_name = __commonJS({
|
|
601
|
+
"node_modules/core-js/internals/function-name.js"(exports, module) {
|
|
602
|
+
"use strict";
|
|
603
|
+
var DESCRIPTORS = require_descriptors();
|
|
604
|
+
var hasOwn = require_has_own_property();
|
|
605
|
+
var FunctionPrototype = Function.prototype;
|
|
606
|
+
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
|
607
|
+
var EXISTS = hasOwn(FunctionPrototype, "name");
|
|
608
|
+
var PROPER = EXISTS && (function something() {
|
|
609
|
+
}).name === "something";
|
|
610
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
|
|
611
|
+
module.exports = {
|
|
612
|
+
EXISTS,
|
|
613
|
+
PROPER,
|
|
614
|
+
CONFIGURABLE
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
// node_modules/core-js/internals/inspect-source.js
|
|
620
|
+
var require_inspect_source = __commonJS({
|
|
621
|
+
"node_modules/core-js/internals/inspect-source.js"(exports, module) {
|
|
622
|
+
"use strict";
|
|
623
|
+
var uncurryThis = require_function_uncurry_this();
|
|
624
|
+
var isCallable = require_is_callable();
|
|
625
|
+
var store = require_shared_store();
|
|
626
|
+
var functionToString = uncurryThis(Function.toString);
|
|
627
|
+
if (!isCallable(store.inspectSource)) {
|
|
628
|
+
store.inspectSource = function(it) {
|
|
629
|
+
return functionToString(it);
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
module.exports = store.inspectSource;
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
// node_modules/core-js/internals/weak-map-basic-detection.js
|
|
637
|
+
var require_weak_map_basic_detection = __commonJS({
|
|
638
|
+
"node_modules/core-js/internals/weak-map-basic-detection.js"(exports, module) {
|
|
639
|
+
"use strict";
|
|
640
|
+
var globalThis2 = require_global_this();
|
|
641
|
+
var isCallable = require_is_callable();
|
|
642
|
+
var WeakMap = globalThis2.WeakMap;
|
|
643
|
+
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
// node_modules/core-js/internals/create-property-descriptor.js
|
|
648
|
+
var require_create_property_descriptor = __commonJS({
|
|
649
|
+
"node_modules/core-js/internals/create-property-descriptor.js"(exports, module) {
|
|
650
|
+
"use strict";
|
|
651
|
+
module.exports = function(bitmap, value) {
|
|
652
|
+
return {
|
|
653
|
+
enumerable: !(bitmap & 1),
|
|
654
|
+
configurable: !(bitmap & 2),
|
|
655
|
+
writable: !(bitmap & 4),
|
|
656
|
+
value
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
// node_modules/core-js/internals/create-non-enumerable-property.js
|
|
663
|
+
var require_create_non_enumerable_property = __commonJS({
|
|
664
|
+
"node_modules/core-js/internals/create-non-enumerable-property.js"(exports, module) {
|
|
665
|
+
"use strict";
|
|
666
|
+
var DESCRIPTORS = require_descriptors();
|
|
667
|
+
var definePropertyModule = require_object_define_property();
|
|
668
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
669
|
+
module.exports = DESCRIPTORS ? function(object, key, value) {
|
|
670
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
671
|
+
} : function(object, key, value) {
|
|
672
|
+
object[key] = value;
|
|
673
|
+
return object;
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
// node_modules/core-js/internals/shared-key.js
|
|
679
|
+
var require_shared_key = __commonJS({
|
|
680
|
+
"node_modules/core-js/internals/shared-key.js"(exports, module) {
|
|
681
|
+
"use strict";
|
|
682
|
+
var shared = require_shared();
|
|
683
|
+
var uid = require_uid();
|
|
684
|
+
var keys = shared("keys");
|
|
685
|
+
module.exports = function(key) {
|
|
686
|
+
return keys[key] || (keys[key] = uid(key));
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// node_modules/core-js/internals/hidden-keys.js
|
|
692
|
+
var require_hidden_keys = __commonJS({
|
|
693
|
+
"node_modules/core-js/internals/hidden-keys.js"(exports, module) {
|
|
694
|
+
"use strict";
|
|
695
|
+
module.exports = {};
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
// node_modules/core-js/internals/internal-state.js
|
|
700
|
+
var require_internal_state = __commonJS({
|
|
701
|
+
"node_modules/core-js/internals/internal-state.js"(exports, module) {
|
|
702
|
+
"use strict";
|
|
703
|
+
var NATIVE_WEAK_MAP = require_weak_map_basic_detection();
|
|
704
|
+
var globalThis2 = require_global_this();
|
|
705
|
+
var isObject = require_is_object();
|
|
706
|
+
var createNonEnumerableProperty = require_create_non_enumerable_property();
|
|
707
|
+
var hasOwn = require_has_own_property();
|
|
708
|
+
var shared = require_shared_store();
|
|
709
|
+
var sharedKey = require_shared_key();
|
|
710
|
+
var hiddenKeys = require_hidden_keys();
|
|
711
|
+
var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
|
|
712
|
+
var TypeError2 = globalThis2.TypeError;
|
|
713
|
+
var WeakMap = globalThis2.WeakMap;
|
|
714
|
+
var set;
|
|
715
|
+
var get;
|
|
716
|
+
var has;
|
|
717
|
+
var enforce = function(it) {
|
|
718
|
+
return has(it) ? get(it) : set(it, {});
|
|
719
|
+
};
|
|
720
|
+
var getterFor = function(TYPE) {
|
|
721
|
+
return function(it) {
|
|
722
|
+
var state;
|
|
723
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
724
|
+
throw new TypeError2("Incompatible receiver, " + TYPE + " required");
|
|
725
|
+
}
|
|
726
|
+
return state;
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
730
|
+
store = shared.state || (shared.state = new WeakMap());
|
|
731
|
+
store.get = store.get;
|
|
732
|
+
store.has = store.has;
|
|
733
|
+
store.set = store.set;
|
|
734
|
+
set = function(it, metadata) {
|
|
735
|
+
if (store.has(it)) throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
|
|
736
|
+
metadata.facade = it;
|
|
737
|
+
store.set(it, metadata);
|
|
738
|
+
return metadata;
|
|
739
|
+
};
|
|
740
|
+
get = function(it) {
|
|
741
|
+
return store.get(it) || {};
|
|
742
|
+
};
|
|
743
|
+
has = function(it) {
|
|
744
|
+
return store.has(it);
|
|
745
|
+
};
|
|
746
|
+
} else {
|
|
747
|
+
STATE = sharedKey("state");
|
|
748
|
+
hiddenKeys[STATE] = true;
|
|
749
|
+
set = function(it, metadata) {
|
|
750
|
+
if (hasOwn(it, STATE)) throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
|
|
751
|
+
metadata.facade = it;
|
|
752
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
753
|
+
return metadata;
|
|
754
|
+
};
|
|
755
|
+
get = function(it) {
|
|
756
|
+
return hasOwn(it, STATE) ? it[STATE] : {};
|
|
757
|
+
};
|
|
758
|
+
has = function(it) {
|
|
759
|
+
return hasOwn(it, STATE);
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
var store;
|
|
763
|
+
var STATE;
|
|
764
|
+
module.exports = {
|
|
765
|
+
set,
|
|
766
|
+
get,
|
|
767
|
+
has,
|
|
768
|
+
enforce,
|
|
769
|
+
getterFor
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
|
|
774
|
+
// node_modules/core-js/internals/make-built-in.js
|
|
775
|
+
var require_make_built_in = __commonJS({
|
|
776
|
+
"node_modules/core-js/internals/make-built-in.js"(exports, module) {
|
|
777
|
+
"use strict";
|
|
778
|
+
var uncurryThis = require_function_uncurry_this();
|
|
779
|
+
var fails = require_fails();
|
|
780
|
+
var isCallable = require_is_callable();
|
|
781
|
+
var hasOwn = require_has_own_property();
|
|
782
|
+
var DESCRIPTORS = require_descriptors();
|
|
783
|
+
var CONFIGURABLE_FUNCTION_NAME = require_function_name().CONFIGURABLE;
|
|
784
|
+
var inspectSource = require_inspect_source();
|
|
785
|
+
var InternalStateModule = require_internal_state();
|
|
786
|
+
var enforceInternalState = InternalStateModule.enforce;
|
|
787
|
+
var getInternalState = InternalStateModule.get;
|
|
788
|
+
var $String = String;
|
|
789
|
+
var defineProperty = Object.defineProperty;
|
|
790
|
+
var stringSlice = uncurryThis("".slice);
|
|
791
|
+
var replace = uncurryThis("".replace);
|
|
792
|
+
var join = uncurryThis([].join);
|
|
793
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
|
|
794
|
+
return defineProperty(function() {
|
|
795
|
+
}, "length", { value: 8 }).length !== 8;
|
|
796
|
+
});
|
|
797
|
+
var TEMPLATE = String(String).split("String");
|
|
798
|
+
var makeBuiltIn = module.exports = function(value, name, options) {
|
|
799
|
+
if (stringSlice($String(name), 0, 7) === "Symbol(") {
|
|
800
|
+
name = "[" + replace($String(name), /^Symbol\(([^)]*)\).*$/, "$1") + "]";
|
|
801
|
+
}
|
|
802
|
+
if (options && options.getter) name = "get " + name;
|
|
803
|
+
if (options && options.setter) name = "set " + name;
|
|
804
|
+
if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
805
|
+
if (DESCRIPTORS) defineProperty(value, "name", { value: name, configurable: true });
|
|
806
|
+
else value.name = name;
|
|
807
|
+
}
|
|
808
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn(options, "arity") && value.length !== options.arity) {
|
|
809
|
+
defineProperty(value, "length", { value: options.arity });
|
|
810
|
+
}
|
|
811
|
+
try {
|
|
812
|
+
if (options && hasOwn(options, "constructor") && options.constructor) {
|
|
813
|
+
if (DESCRIPTORS) defineProperty(value, "prototype", { writable: false });
|
|
814
|
+
} else if (value.prototype) value.prototype = void 0;
|
|
815
|
+
} catch (error) {
|
|
816
|
+
}
|
|
817
|
+
var state = enforceInternalState(value);
|
|
818
|
+
if (!hasOwn(state, "source")) {
|
|
819
|
+
state.source = join(TEMPLATE, typeof name == "string" ? name : "");
|
|
820
|
+
}
|
|
821
|
+
return value;
|
|
822
|
+
};
|
|
823
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
824
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
825
|
+
}, "toString");
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
// node_modules/core-js/internals/define-built-in.js
|
|
830
|
+
var require_define_built_in = __commonJS({
|
|
831
|
+
"node_modules/core-js/internals/define-built-in.js"(exports, module) {
|
|
832
|
+
"use strict";
|
|
833
|
+
var isCallable = require_is_callable();
|
|
834
|
+
var definePropertyModule = require_object_define_property();
|
|
835
|
+
var makeBuiltIn = require_make_built_in();
|
|
836
|
+
var defineGlobalProperty = require_define_global_property();
|
|
837
|
+
module.exports = function(O, key, value, options) {
|
|
838
|
+
if (!options) options = {};
|
|
839
|
+
var simple = options.enumerable;
|
|
840
|
+
var name = options.name !== void 0 ? options.name : key;
|
|
841
|
+
if (isCallable(value)) makeBuiltIn(value, name, options);
|
|
842
|
+
if (options.global) {
|
|
843
|
+
if (simple) O[key] = value;
|
|
844
|
+
else defineGlobalProperty(key, value);
|
|
845
|
+
} else {
|
|
846
|
+
try {
|
|
847
|
+
if (!options.unsafe) delete O[key];
|
|
848
|
+
else if (O[key]) simple = true;
|
|
849
|
+
} catch (error) {
|
|
850
|
+
}
|
|
851
|
+
if (simple) O[key] = value;
|
|
852
|
+
else definePropertyModule.f(O, key, {
|
|
853
|
+
value,
|
|
854
|
+
enumerable: false,
|
|
855
|
+
configurable: !options.nonConfigurable,
|
|
856
|
+
writable: !options.nonWritable
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
return O;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
// node_modules/core-js/internals/classof-raw.js
|
|
865
|
+
var require_classof_raw = __commonJS({
|
|
866
|
+
"node_modules/core-js/internals/classof-raw.js"(exports, module) {
|
|
867
|
+
"use strict";
|
|
868
|
+
var uncurryThis = require_function_uncurry_this();
|
|
869
|
+
var toString = uncurryThis({}.toString);
|
|
870
|
+
var stringSlice = uncurryThis("".slice);
|
|
871
|
+
module.exports = function(it) {
|
|
872
|
+
return stringSlice(toString(it), 8, -1);
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
// node_modules/core-js/internals/classof.js
|
|
878
|
+
var require_classof = __commonJS({
|
|
879
|
+
"node_modules/core-js/internals/classof.js"(exports, module) {
|
|
880
|
+
"use strict";
|
|
881
|
+
var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
|
|
882
|
+
var isCallable = require_is_callable();
|
|
883
|
+
var classofRaw = require_classof_raw();
|
|
884
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
885
|
+
var TO_STRING_TAG = wellKnownSymbol("toStringTag");
|
|
886
|
+
var $Object = Object;
|
|
887
|
+
var CORRECT_ARGUMENTS = classofRaw(/* @__PURE__ */ (function() {
|
|
888
|
+
return arguments;
|
|
889
|
+
})()) === "Arguments";
|
|
890
|
+
var tryGet = function(it, key) {
|
|
891
|
+
try {
|
|
892
|
+
return it[key];
|
|
893
|
+
} catch (error) {
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
|
|
897
|
+
var O, tag, result;
|
|
898
|
+
return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) === "Object" && isCallable(O.callee) ? "Arguments" : result;
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
// node_modules/core-js/internals/object-to-string.js
|
|
904
|
+
var require_object_to_string = __commonJS({
|
|
905
|
+
"node_modules/core-js/internals/object-to-string.js"(exports, module) {
|
|
906
|
+
"use strict";
|
|
907
|
+
var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
|
|
908
|
+
var classof = require_classof();
|
|
909
|
+
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
|
|
910
|
+
return "[object " + classof(this) + "]";
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
// node_modules/core-js/modules/es.object.to-string.js
|
|
916
|
+
var require_es_object_to_string = __commonJS({
|
|
917
|
+
"node_modules/core-js/modules/es.object.to-string.js"() {
|
|
918
|
+
"use strict";
|
|
919
|
+
var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
|
|
920
|
+
var defineBuiltIn = require_define_built_in();
|
|
921
|
+
var toString = require_object_to_string();
|
|
922
|
+
if (!TO_STRING_TAG_SUPPORT) {
|
|
923
|
+
defineBuiltIn(Object.prototype, "toString", toString, { unsafe: true });
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
// node_modules/core-js/internals/object-property-is-enumerable.js
|
|
929
|
+
var require_object_property_is_enumerable = __commonJS({
|
|
930
|
+
"node_modules/core-js/internals/object-property-is-enumerable.js"(exports) {
|
|
931
|
+
"use strict";
|
|
932
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
933
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
934
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
935
|
+
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
936
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
937
|
+
return !!descriptor && descriptor.enumerable;
|
|
938
|
+
} : $propertyIsEnumerable;
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
// node_modules/core-js/internals/indexed-object.js
|
|
943
|
+
var require_indexed_object = __commonJS({
|
|
944
|
+
"node_modules/core-js/internals/indexed-object.js"(exports, module) {
|
|
945
|
+
"use strict";
|
|
946
|
+
var uncurryThis = require_function_uncurry_this();
|
|
947
|
+
var fails = require_fails();
|
|
948
|
+
var classof = require_classof_raw();
|
|
949
|
+
var $Object = Object;
|
|
950
|
+
var split = uncurryThis("".split);
|
|
951
|
+
module.exports = fails(function() {
|
|
952
|
+
return !$Object("z").propertyIsEnumerable(0);
|
|
953
|
+
}) ? function(it) {
|
|
954
|
+
return classof(it) === "String" ? split(it, "") : $Object(it);
|
|
955
|
+
} : $Object;
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
|
|
959
|
+
// node_modules/core-js/internals/to-indexed-object.js
|
|
960
|
+
var require_to_indexed_object = __commonJS({
|
|
961
|
+
"node_modules/core-js/internals/to-indexed-object.js"(exports, module) {
|
|
962
|
+
"use strict";
|
|
963
|
+
var IndexedObject = require_indexed_object();
|
|
964
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
965
|
+
module.exports = function(it) {
|
|
966
|
+
return IndexedObject(requireObjectCoercible(it));
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
|
|
971
|
+
// node_modules/core-js/internals/object-get-own-property-descriptor.js
|
|
972
|
+
var require_object_get_own_property_descriptor = __commonJS({
|
|
973
|
+
"node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports) {
|
|
974
|
+
"use strict";
|
|
975
|
+
var DESCRIPTORS = require_descriptors();
|
|
976
|
+
var call = require_function_call();
|
|
977
|
+
var propertyIsEnumerableModule = require_object_property_is_enumerable();
|
|
978
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
979
|
+
var toIndexedObject = require_to_indexed_object();
|
|
980
|
+
var toPropertyKey = require_to_property_key();
|
|
981
|
+
var hasOwn = require_has_own_property();
|
|
982
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
983
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
984
|
+
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
985
|
+
O = toIndexedObject(O);
|
|
986
|
+
P = toPropertyKey(P);
|
|
987
|
+
if (IE8_DOM_DEFINE) try {
|
|
988
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
989
|
+
} catch (error) {
|
|
990
|
+
}
|
|
991
|
+
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
// node_modules/core-js/internals/math-trunc.js
|
|
997
|
+
var require_math_trunc = __commonJS({
|
|
998
|
+
"node_modules/core-js/internals/math-trunc.js"(exports, module) {
|
|
999
|
+
"use strict";
|
|
1000
|
+
var ceil = Math.ceil;
|
|
1001
|
+
var floor = Math.floor;
|
|
1002
|
+
module.exports = Math.trunc || function trunc(x) {
|
|
1003
|
+
var n = +x;
|
|
1004
|
+
return (n > 0 ? floor : ceil)(n);
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
// node_modules/core-js/internals/to-integer-or-infinity.js
|
|
1010
|
+
var require_to_integer_or_infinity = __commonJS({
|
|
1011
|
+
"node_modules/core-js/internals/to-integer-or-infinity.js"(exports, module) {
|
|
1012
|
+
"use strict";
|
|
1013
|
+
var trunc = require_math_trunc();
|
|
1014
|
+
module.exports = function(argument) {
|
|
1015
|
+
var number = +argument;
|
|
1016
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
// node_modules/core-js/internals/to-absolute-index.js
|
|
1022
|
+
var require_to_absolute_index = __commonJS({
|
|
1023
|
+
"node_modules/core-js/internals/to-absolute-index.js"(exports, module) {
|
|
1024
|
+
"use strict";
|
|
1025
|
+
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
1026
|
+
var max = Math.max;
|
|
1027
|
+
var min = Math.min;
|
|
1028
|
+
module.exports = function(index, length) {
|
|
1029
|
+
var integer = toIntegerOrInfinity(index);
|
|
1030
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
|
|
1035
|
+
// node_modules/core-js/internals/to-length.js
|
|
1036
|
+
var require_to_length = __commonJS({
|
|
1037
|
+
"node_modules/core-js/internals/to-length.js"(exports, module) {
|
|
1038
|
+
"use strict";
|
|
1039
|
+
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
1040
|
+
var min = Math.min;
|
|
1041
|
+
module.exports = function(argument) {
|
|
1042
|
+
var len = toIntegerOrInfinity(argument);
|
|
1043
|
+
return len > 0 ? min(len, 9007199254740991) : 0;
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
|
|
1048
|
+
// node_modules/core-js/internals/length-of-array-like.js
|
|
1049
|
+
var require_length_of_array_like = __commonJS({
|
|
1050
|
+
"node_modules/core-js/internals/length-of-array-like.js"(exports, module) {
|
|
1051
|
+
"use strict";
|
|
1052
|
+
var toLength = require_to_length();
|
|
1053
|
+
module.exports = function(obj) {
|
|
1054
|
+
return toLength(obj.length);
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
|
|
1059
|
+
// node_modules/core-js/internals/array-includes.js
|
|
1060
|
+
var require_array_includes = __commonJS({
|
|
1061
|
+
"node_modules/core-js/internals/array-includes.js"(exports, module) {
|
|
1062
|
+
"use strict";
|
|
1063
|
+
var toIndexedObject = require_to_indexed_object();
|
|
1064
|
+
var toAbsoluteIndex = require_to_absolute_index();
|
|
1065
|
+
var lengthOfArrayLike = require_length_of_array_like();
|
|
1066
|
+
var createMethod = function(IS_INCLUDES) {
|
|
1067
|
+
return function($this, el, fromIndex) {
|
|
1068
|
+
var O = toIndexedObject($this);
|
|
1069
|
+
var length = lengthOfArrayLike(O);
|
|
1070
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
1071
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
1072
|
+
var value;
|
|
1073
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
1074
|
+
value = O[index++];
|
|
1075
|
+
if (value !== value) return true;
|
|
1076
|
+
}
|
|
1077
|
+
else for (; length > index; index++) {
|
|
1078
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
1079
|
+
}
|
|
1080
|
+
return !IS_INCLUDES && -1;
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
module.exports = {
|
|
1084
|
+
// `Array.prototype.includes` method
|
|
1085
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1086
|
+
includes: createMethod(true),
|
|
1087
|
+
// `Array.prototype.indexOf` method
|
|
1088
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
1089
|
+
indexOf: createMethod(false)
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
// node_modules/core-js/internals/object-keys-internal.js
|
|
1095
|
+
var require_object_keys_internal = __commonJS({
|
|
1096
|
+
"node_modules/core-js/internals/object-keys-internal.js"(exports, module) {
|
|
1097
|
+
"use strict";
|
|
1098
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1099
|
+
var hasOwn = require_has_own_property();
|
|
1100
|
+
var toIndexedObject = require_to_indexed_object();
|
|
1101
|
+
var indexOf = require_array_includes().indexOf;
|
|
1102
|
+
var hiddenKeys = require_hidden_keys();
|
|
1103
|
+
var push = uncurryThis([].push);
|
|
1104
|
+
module.exports = function(object, names) {
|
|
1105
|
+
var O = toIndexedObject(object);
|
|
1106
|
+
var i = 0;
|
|
1107
|
+
var result = [];
|
|
1108
|
+
var key;
|
|
1109
|
+
for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
|
|
1110
|
+
while (names.length > i) if (hasOwn(O, key = names[i++])) {
|
|
1111
|
+
~indexOf(result, key) || push(result, key);
|
|
1112
|
+
}
|
|
1113
|
+
return result;
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
|
|
1118
|
+
// node_modules/core-js/internals/enum-bug-keys.js
|
|
1119
|
+
var require_enum_bug_keys = __commonJS({
|
|
1120
|
+
"node_modules/core-js/internals/enum-bug-keys.js"(exports, module) {
|
|
1121
|
+
"use strict";
|
|
1122
|
+
module.exports = [
|
|
1123
|
+
"constructor",
|
|
1124
|
+
"hasOwnProperty",
|
|
1125
|
+
"isPrototypeOf",
|
|
1126
|
+
"propertyIsEnumerable",
|
|
1127
|
+
"toLocaleString",
|
|
1128
|
+
"toString",
|
|
1129
|
+
"valueOf"
|
|
1130
|
+
];
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
// node_modules/core-js/internals/object-get-own-property-names.js
|
|
1135
|
+
var require_object_get_own_property_names = __commonJS({
|
|
1136
|
+
"node_modules/core-js/internals/object-get-own-property-names.js"(exports) {
|
|
1137
|
+
"use strict";
|
|
1138
|
+
var internalObjectKeys = require_object_keys_internal();
|
|
1139
|
+
var enumBugKeys = require_enum_bug_keys();
|
|
1140
|
+
var hiddenKeys = enumBugKeys.concat("length", "prototype");
|
|
1141
|
+
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1142
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
// node_modules/core-js/internals/object-get-own-property-symbols.js
|
|
1148
|
+
var require_object_get_own_property_symbols = __commonJS({
|
|
1149
|
+
"node_modules/core-js/internals/object-get-own-property-symbols.js"(exports) {
|
|
1150
|
+
"use strict";
|
|
1151
|
+
exports.f = Object.getOwnPropertySymbols;
|
|
1152
|
+
}
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
// node_modules/core-js/internals/own-keys.js
|
|
1156
|
+
var require_own_keys = __commonJS({
|
|
1157
|
+
"node_modules/core-js/internals/own-keys.js"(exports, module) {
|
|
1158
|
+
"use strict";
|
|
1159
|
+
var getBuiltIn = require_get_built_in();
|
|
1160
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1161
|
+
var getOwnPropertyNamesModule = require_object_get_own_property_names();
|
|
1162
|
+
var getOwnPropertySymbolsModule = require_object_get_own_property_symbols();
|
|
1163
|
+
var anObject = require_an_object();
|
|
1164
|
+
var concat = uncurryThis([].concat);
|
|
1165
|
+
module.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) {
|
|
1166
|
+
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
1167
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1168
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
|
|
1173
|
+
// node_modules/core-js/internals/copy-constructor-properties.js
|
|
1174
|
+
var require_copy_constructor_properties = __commonJS({
|
|
1175
|
+
"node_modules/core-js/internals/copy-constructor-properties.js"(exports, module) {
|
|
1176
|
+
"use strict";
|
|
1177
|
+
var hasOwn = require_has_own_property();
|
|
1178
|
+
var ownKeys = require_own_keys();
|
|
1179
|
+
var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
|
|
1180
|
+
var definePropertyModule = require_object_define_property();
|
|
1181
|
+
module.exports = function(target, source, exceptions) {
|
|
1182
|
+
var keys = ownKeys(source);
|
|
1183
|
+
var defineProperty = definePropertyModule.f;
|
|
1184
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1185
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1186
|
+
var key = keys[i];
|
|
1187
|
+
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
|
1188
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
// node_modules/core-js/internals/is-forced.js
|
|
1196
|
+
var require_is_forced = __commonJS({
|
|
1197
|
+
"node_modules/core-js/internals/is-forced.js"(exports, module) {
|
|
1198
|
+
"use strict";
|
|
1199
|
+
var fails = require_fails();
|
|
1200
|
+
var isCallable = require_is_callable();
|
|
1201
|
+
var replacement = /#|\.prototype\./;
|
|
1202
|
+
var isForced = function(feature, detection) {
|
|
1203
|
+
var value = data[normalize(feature)];
|
|
1204
|
+
return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
1205
|
+
};
|
|
1206
|
+
var normalize = isForced.normalize = function(string) {
|
|
1207
|
+
return String(string).replace(replacement, ".").toLowerCase();
|
|
1208
|
+
};
|
|
1209
|
+
var data = isForced.data = {};
|
|
1210
|
+
var NATIVE = isForced.NATIVE = "N";
|
|
1211
|
+
var POLYFILL = isForced.POLYFILL = "P";
|
|
1212
|
+
module.exports = isForced;
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
|
|
1216
|
+
// node_modules/core-js/internals/export.js
|
|
1217
|
+
var require_export = __commonJS({
|
|
1218
|
+
"node_modules/core-js/internals/export.js"(exports, module) {
|
|
1219
|
+
"use strict";
|
|
1220
|
+
var globalThis2 = require_global_this();
|
|
1221
|
+
var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
|
|
1222
|
+
var createNonEnumerableProperty = require_create_non_enumerable_property();
|
|
1223
|
+
var defineBuiltIn = require_define_built_in();
|
|
1224
|
+
var defineGlobalProperty = require_define_global_property();
|
|
1225
|
+
var copyConstructorProperties = require_copy_constructor_properties();
|
|
1226
|
+
var isForced = require_is_forced();
|
|
1227
|
+
module.exports = function(options, source) {
|
|
1228
|
+
var TARGET = options.target;
|
|
1229
|
+
var GLOBAL = options.global;
|
|
1230
|
+
var STATIC = options.stat;
|
|
1231
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1232
|
+
if (GLOBAL) {
|
|
1233
|
+
target = globalThis2;
|
|
1234
|
+
} else if (STATIC) {
|
|
1235
|
+
target = globalThis2[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1236
|
+
} else {
|
|
1237
|
+
target = globalThis2[TARGET] && globalThis2[TARGET].prototype;
|
|
1238
|
+
}
|
|
1239
|
+
if (target) for (key in source) {
|
|
1240
|
+
sourceProperty = source[key];
|
|
1241
|
+
if (options.dontCallGetSet) {
|
|
1242
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1243
|
+
targetProperty = descriptor && descriptor.value;
|
|
1244
|
+
} else targetProperty = target[key];
|
|
1245
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
|
|
1246
|
+
if (!FORCED && targetProperty !== void 0) {
|
|
1247
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1248
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1249
|
+
}
|
|
1250
|
+
if (options.sham || targetProperty && targetProperty.sham) {
|
|
1251
|
+
createNonEnumerableProperty(sourceProperty, "sham", true);
|
|
1252
|
+
}
|
|
1253
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
// node_modules/core-js/internals/function-apply.js
|
|
1260
|
+
var require_function_apply = __commonJS({
|
|
1261
|
+
"node_modules/core-js/internals/function-apply.js"(exports, module) {
|
|
1262
|
+
"use strict";
|
|
1263
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
1264
|
+
var FunctionPrototype = Function.prototype;
|
|
1265
|
+
var apply = FunctionPrototype.apply;
|
|
1266
|
+
var call = FunctionPrototype.call;
|
|
1267
|
+
module.exports = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
|
|
1268
|
+
return call.apply(apply, arguments);
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
// node_modules/core-js/modules/es.reflect.apply.js
|
|
1274
|
+
var require_es_reflect_apply = __commonJS({
|
|
1275
|
+
"node_modules/core-js/modules/es.reflect.apply.js"() {
|
|
1276
|
+
"use strict";
|
|
1277
|
+
var $ = require_export();
|
|
1278
|
+
var functionApply = require_function_apply();
|
|
1279
|
+
var aCallable = require_a_callable();
|
|
1280
|
+
var anObject = require_an_object();
|
|
1281
|
+
var fails = require_fails();
|
|
1282
|
+
var OPTIONAL_ARGUMENTS_LIST = !fails(function() {
|
|
1283
|
+
Reflect.apply(function() {
|
|
1284
|
+
});
|
|
1285
|
+
});
|
|
1286
|
+
$({ target: "Reflect", stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
|
|
1287
|
+
apply: function apply(target, thisArgument, argumentsList) {
|
|
1288
|
+
return functionApply(aCallable(target), thisArgument, anObject(argumentsList));
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
|
|
1294
|
+
// node_modules/core-js/internals/array-slice.js
|
|
1295
|
+
var require_array_slice = __commonJS({
|
|
1296
|
+
"node_modules/core-js/internals/array-slice.js"(exports, module) {
|
|
1297
|
+
"use strict";
|
|
1298
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1299
|
+
module.exports = uncurryThis([].slice);
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
|
|
1303
|
+
// node_modules/core-js/internals/function-bind.js
|
|
1304
|
+
var require_function_bind = __commonJS({
|
|
1305
|
+
"node_modules/core-js/internals/function-bind.js"(exports, module) {
|
|
1306
|
+
"use strict";
|
|
1307
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1308
|
+
var aCallable = require_a_callable();
|
|
1309
|
+
var isObject = require_is_object();
|
|
1310
|
+
var hasOwn = require_has_own_property();
|
|
1311
|
+
var arraySlice = require_array_slice();
|
|
1312
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
1313
|
+
var $Function = Function;
|
|
1314
|
+
var concat = uncurryThis([].concat);
|
|
1315
|
+
var join = uncurryThis([].join);
|
|
1316
|
+
var factories = {};
|
|
1317
|
+
var construct = function(C, argsLength, args) {
|
|
1318
|
+
if (!hasOwn(factories, argsLength)) {
|
|
1319
|
+
var list = [];
|
|
1320
|
+
var i = 0;
|
|
1321
|
+
for (; i < argsLength; i++) list[i] = "a[" + i + "]";
|
|
1322
|
+
factories[argsLength] = $Function("C,a", "return new C(" + join(list, ",") + ")");
|
|
1323
|
+
}
|
|
1324
|
+
return factories[argsLength](C, args);
|
|
1325
|
+
};
|
|
1326
|
+
module.exports = NATIVE_BIND ? $Function.bind : function bind(that) {
|
|
1327
|
+
var F = aCallable(this);
|
|
1328
|
+
var Prototype = F.prototype;
|
|
1329
|
+
var partArgs = arraySlice(arguments, 1);
|
|
1330
|
+
var boundFunction = function bound() {
|
|
1331
|
+
var args = concat(partArgs, arraySlice(arguments));
|
|
1332
|
+
return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
|
|
1333
|
+
};
|
|
1334
|
+
if (isObject(Prototype)) boundFunction.prototype = Prototype;
|
|
1335
|
+
return boundFunction;
|
|
1336
|
+
};
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// node_modules/core-js/internals/is-constructor.js
|
|
1341
|
+
var require_is_constructor = __commonJS({
|
|
1342
|
+
"node_modules/core-js/internals/is-constructor.js"(exports, module) {
|
|
1343
|
+
"use strict";
|
|
1344
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1345
|
+
var fails = require_fails();
|
|
1346
|
+
var isCallable = require_is_callable();
|
|
1347
|
+
var classof = require_classof();
|
|
1348
|
+
var getBuiltIn = require_get_built_in();
|
|
1349
|
+
var inspectSource = require_inspect_source();
|
|
1350
|
+
var noop = function() {
|
|
1351
|
+
};
|
|
1352
|
+
var construct = getBuiltIn("Reflect", "construct");
|
|
1353
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1354
|
+
var exec = uncurryThis(constructorRegExp.exec);
|
|
1355
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1356
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1357
|
+
if (!isCallable(argument)) return false;
|
|
1358
|
+
try {
|
|
1359
|
+
construct(noop, [], argument);
|
|
1360
|
+
return true;
|
|
1361
|
+
} catch (error) {
|
|
1362
|
+
return false;
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1366
|
+
if (!isCallable(argument)) return false;
|
|
1367
|
+
switch (classof(argument)) {
|
|
1368
|
+
case "AsyncFunction":
|
|
1369
|
+
case "GeneratorFunction":
|
|
1370
|
+
case "AsyncGeneratorFunction":
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1373
|
+
try {
|
|
1374
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1375
|
+
} catch (error) {
|
|
1376
|
+
return true;
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
isConstructorLegacy.sham = true;
|
|
1380
|
+
module.exports = !construct || fails(function() {
|
|
1381
|
+
var called;
|
|
1382
|
+
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
|
|
1383
|
+
called = true;
|
|
1384
|
+
}) || called;
|
|
1385
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1386
|
+
}
|
|
1387
|
+
});
|
|
1388
|
+
|
|
1389
|
+
// node_modules/core-js/internals/a-constructor.js
|
|
1390
|
+
var require_a_constructor = __commonJS({
|
|
1391
|
+
"node_modules/core-js/internals/a-constructor.js"(exports, module) {
|
|
1392
|
+
"use strict";
|
|
1393
|
+
var isConstructor = require_is_constructor();
|
|
1394
|
+
var tryToString = require_try_to_string();
|
|
1395
|
+
var $TypeError = TypeError;
|
|
1396
|
+
module.exports = function(argument) {
|
|
1397
|
+
if (isConstructor(argument)) return argument;
|
|
1398
|
+
throw new $TypeError(tryToString(argument) + " is not a constructor");
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1402
|
+
|
|
1403
|
+
// node_modules/core-js/internals/object-keys.js
|
|
1404
|
+
var require_object_keys = __commonJS({
|
|
1405
|
+
"node_modules/core-js/internals/object-keys.js"(exports, module) {
|
|
1406
|
+
"use strict";
|
|
1407
|
+
var internalObjectKeys = require_object_keys_internal();
|
|
1408
|
+
var enumBugKeys = require_enum_bug_keys();
|
|
1409
|
+
module.exports = Object.keys || function keys(O) {
|
|
1410
|
+
return internalObjectKeys(O, enumBugKeys);
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
// node_modules/core-js/internals/object-define-properties.js
|
|
1416
|
+
var require_object_define_properties = __commonJS({
|
|
1417
|
+
"node_modules/core-js/internals/object-define-properties.js"(exports) {
|
|
1418
|
+
"use strict";
|
|
1419
|
+
var DESCRIPTORS = require_descriptors();
|
|
1420
|
+
var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
|
|
1421
|
+
var definePropertyModule = require_object_define_property();
|
|
1422
|
+
var anObject = require_an_object();
|
|
1423
|
+
var toIndexedObject = require_to_indexed_object();
|
|
1424
|
+
var objectKeys = require_object_keys();
|
|
1425
|
+
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1426
|
+
anObject(O);
|
|
1427
|
+
var props = toIndexedObject(Properties);
|
|
1428
|
+
var keys = objectKeys(Properties);
|
|
1429
|
+
var length = keys.length;
|
|
1430
|
+
var index = 0;
|
|
1431
|
+
var key;
|
|
1432
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1433
|
+
return O;
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
|
|
1438
|
+
// node_modules/core-js/internals/html.js
|
|
1439
|
+
var require_html = __commonJS({
|
|
1440
|
+
"node_modules/core-js/internals/html.js"(exports, module) {
|
|
1441
|
+
"use strict";
|
|
1442
|
+
var getBuiltIn = require_get_built_in();
|
|
1443
|
+
module.exports = getBuiltIn("document", "documentElement");
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
// node_modules/core-js/internals/object-create.js
|
|
1448
|
+
var require_object_create = __commonJS({
|
|
1449
|
+
"node_modules/core-js/internals/object-create.js"(exports, module) {
|
|
1450
|
+
"use strict";
|
|
1451
|
+
var anObject = require_an_object();
|
|
1452
|
+
var definePropertiesModule = require_object_define_properties();
|
|
1453
|
+
var enumBugKeys = require_enum_bug_keys();
|
|
1454
|
+
var hiddenKeys = require_hidden_keys();
|
|
1455
|
+
var html = require_html();
|
|
1456
|
+
var documentCreateElement = require_document_create_element();
|
|
1457
|
+
var sharedKey = require_shared_key();
|
|
1458
|
+
var GT = ">";
|
|
1459
|
+
var LT = "<";
|
|
1460
|
+
var PROTOTYPE = "prototype";
|
|
1461
|
+
var SCRIPT = "script";
|
|
1462
|
+
var IE_PROTO = sharedKey("IE_PROTO");
|
|
1463
|
+
var EmptyConstructor = function() {
|
|
1464
|
+
};
|
|
1465
|
+
var scriptTag = function(content) {
|
|
1466
|
+
return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT;
|
|
1467
|
+
};
|
|
1468
|
+
var NullProtoObjectViaActiveX = function(activeXDocument2) {
|
|
1469
|
+
activeXDocument2.write(scriptTag(""));
|
|
1470
|
+
activeXDocument2.close();
|
|
1471
|
+
var temp = activeXDocument2.parentWindow.Object;
|
|
1472
|
+
activeXDocument2 = null;
|
|
1473
|
+
return temp;
|
|
1474
|
+
};
|
|
1475
|
+
var NullProtoObjectViaIFrame = function() {
|
|
1476
|
+
var iframe = documentCreateElement("iframe");
|
|
1477
|
+
var JS = "java" + SCRIPT + ":";
|
|
1478
|
+
var iframeDocument;
|
|
1479
|
+
iframe.style.display = "none";
|
|
1480
|
+
html.appendChild(iframe);
|
|
1481
|
+
iframe.src = String(JS);
|
|
1482
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1483
|
+
iframeDocument.open();
|
|
1484
|
+
iframeDocument.write(scriptTag("document.F=Object"));
|
|
1485
|
+
iframeDocument.close();
|
|
1486
|
+
return iframeDocument.F;
|
|
1487
|
+
};
|
|
1488
|
+
var activeXDocument;
|
|
1489
|
+
var NullProtoObject = function() {
|
|
1490
|
+
try {
|
|
1491
|
+
activeXDocument = new ActiveXObject("htmlfile");
|
|
1492
|
+
} catch (error) {
|
|
1493
|
+
}
|
|
1494
|
+
NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
|
|
1495
|
+
var length = enumBugKeys.length;
|
|
1496
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1497
|
+
return NullProtoObject();
|
|
1498
|
+
};
|
|
1499
|
+
hiddenKeys[IE_PROTO] = true;
|
|
1500
|
+
module.exports = Object.create || function create(O, Properties) {
|
|
1501
|
+
var result;
|
|
1502
|
+
if (O !== null) {
|
|
1503
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1504
|
+
result = new EmptyConstructor();
|
|
1505
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1506
|
+
result[IE_PROTO] = O;
|
|
1507
|
+
} else result = NullProtoObject();
|
|
1508
|
+
return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1513
|
+
// node_modules/core-js/modules/es.reflect.construct.js
|
|
1514
|
+
var require_es_reflect_construct = __commonJS({
|
|
1515
|
+
"node_modules/core-js/modules/es.reflect.construct.js"() {
|
|
1516
|
+
"use strict";
|
|
1517
|
+
var $ = require_export();
|
|
1518
|
+
var getBuiltIn = require_get_built_in();
|
|
1519
|
+
var apply = require_function_apply();
|
|
1520
|
+
var bind = require_function_bind();
|
|
1521
|
+
var aConstructor = require_a_constructor();
|
|
1522
|
+
var anObject = require_an_object();
|
|
1523
|
+
var isObject = require_is_object();
|
|
1524
|
+
var create = require_object_create();
|
|
1525
|
+
var fails = require_fails();
|
|
1526
|
+
var nativeConstruct = getBuiltIn("Reflect", "construct");
|
|
1527
|
+
var ObjectPrototype = Object.prototype;
|
|
1528
|
+
var push = [].push;
|
|
1529
|
+
var NEW_TARGET_BUG = fails(function() {
|
|
1530
|
+
function F() {
|
|
1531
|
+
}
|
|
1532
|
+
return !(nativeConstruct(function() {
|
|
1533
|
+
}, [], F) instanceof F);
|
|
1534
|
+
});
|
|
1535
|
+
var ARGS_BUG = !fails(function() {
|
|
1536
|
+
nativeConstruct(function() {
|
|
1537
|
+
});
|
|
1538
|
+
});
|
|
1539
|
+
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
|
|
1540
|
+
$({ target: "Reflect", stat: true, forced: FORCED, sham: FORCED }, {
|
|
1541
|
+
construct: function construct(Target, args) {
|
|
1542
|
+
aConstructor(Target);
|
|
1543
|
+
anObject(args);
|
|
1544
|
+
var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
|
|
1545
|
+
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
|
|
1546
|
+
if (Target === newTarget) {
|
|
1547
|
+
switch (args.length) {
|
|
1548
|
+
case 0:
|
|
1549
|
+
return new Target();
|
|
1550
|
+
case 1:
|
|
1551
|
+
return new Target(args[0]);
|
|
1552
|
+
case 2:
|
|
1553
|
+
return new Target(args[0], args[1]);
|
|
1554
|
+
case 3:
|
|
1555
|
+
return new Target(args[0], args[1], args[2]);
|
|
1556
|
+
case 4:
|
|
1557
|
+
return new Target(args[0], args[1], args[2], args[3]);
|
|
1558
|
+
}
|
|
1559
|
+
var $args = [null];
|
|
1560
|
+
apply(push, $args, args);
|
|
1561
|
+
return new (apply(bind, Target, $args))();
|
|
1562
|
+
}
|
|
1563
|
+
var proto = newTarget.prototype;
|
|
1564
|
+
var instance = create(isObject(proto) ? proto : ObjectPrototype);
|
|
1565
|
+
var result = apply(Target, instance, args);
|
|
1566
|
+
return isObject(result) ? result : instance;
|
|
1567
|
+
}
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
});
|
|
1571
|
+
|
|
1572
|
+
// node_modules/core-js/modules/es.reflect.define-property.js
|
|
1573
|
+
var require_es_reflect_define_property = __commonJS({
|
|
1574
|
+
"node_modules/core-js/modules/es.reflect.define-property.js"() {
|
|
1575
|
+
"use strict";
|
|
1576
|
+
var $ = require_export();
|
|
1577
|
+
var DESCRIPTORS = require_descriptors();
|
|
1578
|
+
var anObject = require_an_object();
|
|
1579
|
+
var toPropertyKey = require_to_property_key();
|
|
1580
|
+
var definePropertyModule = require_object_define_property();
|
|
1581
|
+
var fails = require_fails();
|
|
1582
|
+
var ERROR_INSTEAD_OF_FALSE = fails(function() {
|
|
1583
|
+
Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
|
|
1584
|
+
});
|
|
1585
|
+
$({ target: "Reflect", stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
|
|
1586
|
+
defineProperty: function defineProperty(target, propertyKey, attributes) {
|
|
1587
|
+
anObject(target);
|
|
1588
|
+
var key = toPropertyKey(propertyKey);
|
|
1589
|
+
anObject(attributes);
|
|
1590
|
+
try {
|
|
1591
|
+
definePropertyModule.f(target, key, attributes);
|
|
1592
|
+
return true;
|
|
1593
|
+
} catch (error) {
|
|
1594
|
+
return false;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
|
|
1601
|
+
// node_modules/core-js/modules/es.reflect.delete-property.js
|
|
1602
|
+
var require_es_reflect_delete_property = __commonJS({
|
|
1603
|
+
"node_modules/core-js/modules/es.reflect.delete-property.js"() {
|
|
1604
|
+
"use strict";
|
|
1605
|
+
var $ = require_export();
|
|
1606
|
+
var anObject = require_an_object();
|
|
1607
|
+
var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
|
|
1608
|
+
$({ target: "Reflect", stat: true }, {
|
|
1609
|
+
deleteProperty: function deleteProperty(target, propertyKey) {
|
|
1610
|
+
var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
|
|
1611
|
+
return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
}
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
// node_modules/core-js/internals/is-data-descriptor.js
|
|
1618
|
+
var require_is_data_descriptor = __commonJS({
|
|
1619
|
+
"node_modules/core-js/internals/is-data-descriptor.js"(exports, module) {
|
|
1620
|
+
"use strict";
|
|
1621
|
+
var hasOwn = require_has_own_property();
|
|
1622
|
+
module.exports = function(descriptor) {
|
|
1623
|
+
return descriptor !== void 0 && (hasOwn(descriptor, "value") || hasOwn(descriptor, "writable"));
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
// node_modules/core-js/internals/correct-prototype-getter.js
|
|
1629
|
+
var require_correct_prototype_getter = __commonJS({
|
|
1630
|
+
"node_modules/core-js/internals/correct-prototype-getter.js"(exports, module) {
|
|
1631
|
+
"use strict";
|
|
1632
|
+
var fails = require_fails();
|
|
1633
|
+
module.exports = !fails(function() {
|
|
1634
|
+
function F() {
|
|
1635
|
+
}
|
|
1636
|
+
F.prototype.constructor = null;
|
|
1637
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
|
|
1642
|
+
// node_modules/core-js/internals/object-get-prototype-of.js
|
|
1643
|
+
var require_object_get_prototype_of = __commonJS({
|
|
1644
|
+
"node_modules/core-js/internals/object-get-prototype-of.js"(exports, module) {
|
|
1645
|
+
"use strict";
|
|
1646
|
+
var hasOwn = require_has_own_property();
|
|
1647
|
+
var isCallable = require_is_callable();
|
|
1648
|
+
var toObject = require_to_object();
|
|
1649
|
+
var sharedKey = require_shared_key();
|
|
1650
|
+
var CORRECT_PROTOTYPE_GETTER = require_correct_prototype_getter();
|
|
1651
|
+
var IE_PROTO = sharedKey("IE_PROTO");
|
|
1652
|
+
var $Object = Object;
|
|
1653
|
+
var ObjectPrototype = $Object.prototype;
|
|
1654
|
+
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function(O) {
|
|
1655
|
+
var object = toObject(O);
|
|
1656
|
+
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
|
1657
|
+
var constructor = object.constructor;
|
|
1658
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
1659
|
+
return constructor.prototype;
|
|
1660
|
+
}
|
|
1661
|
+
return object instanceof $Object ? ObjectPrototype : null;
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
// node_modules/core-js/modules/es.reflect.get.js
|
|
1667
|
+
var require_es_reflect_get = __commonJS({
|
|
1668
|
+
"node_modules/core-js/modules/es.reflect.get.js"() {
|
|
1669
|
+
"use strict";
|
|
1670
|
+
var $ = require_export();
|
|
1671
|
+
var call = require_function_call();
|
|
1672
|
+
var isObject = require_is_object();
|
|
1673
|
+
var anObject = require_an_object();
|
|
1674
|
+
var isDataDescriptor = require_is_data_descriptor();
|
|
1675
|
+
var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
|
|
1676
|
+
var getPrototypeOf = require_object_get_prototype_of();
|
|
1677
|
+
function get(target, propertyKey) {
|
|
1678
|
+
var receiver = arguments.length < 3 ? target : arguments[2];
|
|
1679
|
+
var descriptor, prototype;
|
|
1680
|
+
if (anObject(target) === receiver) return target[propertyKey];
|
|
1681
|
+
descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey);
|
|
1682
|
+
if (descriptor) return isDataDescriptor(descriptor) ? descriptor.value : descriptor.get === void 0 ? void 0 : call(descriptor.get, receiver);
|
|
1683
|
+
if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
|
|
1684
|
+
}
|
|
1685
|
+
$({ target: "Reflect", stat: true }, {
|
|
1686
|
+
get
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
|
|
1691
|
+
// node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js
|
|
1692
|
+
var require_es_reflect_get_own_property_descriptor = __commonJS({
|
|
1693
|
+
"node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js"() {
|
|
1694
|
+
"use strict";
|
|
1695
|
+
var $ = require_export();
|
|
1696
|
+
var DESCRIPTORS = require_descriptors();
|
|
1697
|
+
var anObject = require_an_object();
|
|
1698
|
+
var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
|
|
1699
|
+
$({ target: "Reflect", stat: true, sham: !DESCRIPTORS }, {
|
|
1700
|
+
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
|
|
1701
|
+
return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
|
|
1702
|
+
}
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
|
|
1707
|
+
// node_modules/core-js/modules/es.reflect.get-prototype-of.js
|
|
1708
|
+
var require_es_reflect_get_prototype_of = __commonJS({
|
|
1709
|
+
"node_modules/core-js/modules/es.reflect.get-prototype-of.js"() {
|
|
1710
|
+
"use strict";
|
|
1711
|
+
var $ = require_export();
|
|
1712
|
+
var anObject = require_an_object();
|
|
1713
|
+
var objectGetPrototypeOf = require_object_get_prototype_of();
|
|
1714
|
+
var CORRECT_PROTOTYPE_GETTER = require_correct_prototype_getter();
|
|
1715
|
+
$({ target: "Reflect", stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
|
|
1716
|
+
getPrototypeOf: function getPrototypeOf(target) {
|
|
1717
|
+
return objectGetPrototypeOf(anObject(target));
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
|
|
1723
|
+
// node_modules/core-js/modules/es.reflect.has.js
|
|
1724
|
+
var require_es_reflect_has = __commonJS({
|
|
1725
|
+
"node_modules/core-js/modules/es.reflect.has.js"() {
|
|
1726
|
+
"use strict";
|
|
1727
|
+
var $ = require_export();
|
|
1728
|
+
$({ target: "Reflect", stat: true }, {
|
|
1729
|
+
has: function has(target, propertyKey) {
|
|
1730
|
+
return propertyKey in target;
|
|
1731
|
+
}
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1736
|
+
// node_modules/core-js/internals/array-buffer-non-extensible.js
|
|
1737
|
+
var require_array_buffer_non_extensible = __commonJS({
|
|
1738
|
+
"node_modules/core-js/internals/array-buffer-non-extensible.js"(exports, module) {
|
|
1739
|
+
"use strict";
|
|
1740
|
+
var fails = require_fails();
|
|
1741
|
+
module.exports = fails(function() {
|
|
1742
|
+
if (typeof ArrayBuffer == "function") {
|
|
1743
|
+
var buffer = new ArrayBuffer(8);
|
|
1744
|
+
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, "a", { value: 8 });
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
|
|
1750
|
+
// node_modules/core-js/internals/object-is-extensible.js
|
|
1751
|
+
var require_object_is_extensible = __commonJS({
|
|
1752
|
+
"node_modules/core-js/internals/object-is-extensible.js"(exports, module) {
|
|
1753
|
+
"use strict";
|
|
1754
|
+
var fails = require_fails();
|
|
1755
|
+
var isObject = require_is_object();
|
|
1756
|
+
var classof = require_classof_raw();
|
|
1757
|
+
var ARRAY_BUFFER_NON_EXTENSIBLE = require_array_buffer_non_extensible();
|
|
1758
|
+
var $isExtensible = Object.isExtensible;
|
|
1759
|
+
var FAILS_ON_PRIMITIVES = fails(function() {
|
|
1760
|
+
$isExtensible(1);
|
|
1761
|
+
});
|
|
1762
|
+
module.exports = FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE ? function isExtensible(it) {
|
|
1763
|
+
if (!isObject(it)) return false;
|
|
1764
|
+
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === "ArrayBuffer") return false;
|
|
1765
|
+
return $isExtensible ? $isExtensible(it) : true;
|
|
1766
|
+
} : $isExtensible;
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
|
|
1770
|
+
// node_modules/core-js/modules/es.reflect.is-extensible.js
|
|
1771
|
+
var require_es_reflect_is_extensible = __commonJS({
|
|
1772
|
+
"node_modules/core-js/modules/es.reflect.is-extensible.js"() {
|
|
1773
|
+
"use strict";
|
|
1774
|
+
var $ = require_export();
|
|
1775
|
+
var anObject = require_an_object();
|
|
1776
|
+
var $isExtensible = require_object_is_extensible();
|
|
1777
|
+
$({ target: "Reflect", stat: true }, {
|
|
1778
|
+
isExtensible: function isExtensible(target) {
|
|
1779
|
+
anObject(target);
|
|
1780
|
+
return $isExtensible(target);
|
|
1781
|
+
}
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
// node_modules/core-js/modules/es.reflect.own-keys.js
|
|
1787
|
+
var require_es_reflect_own_keys = __commonJS({
|
|
1788
|
+
"node_modules/core-js/modules/es.reflect.own-keys.js"() {
|
|
1789
|
+
"use strict";
|
|
1790
|
+
var $ = require_export();
|
|
1791
|
+
var ownKeys = require_own_keys();
|
|
1792
|
+
$({ target: "Reflect", stat: true }, {
|
|
1793
|
+
ownKeys
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
});
|
|
1797
|
+
|
|
1798
|
+
// node_modules/core-js/internals/freezing.js
|
|
1799
|
+
var require_freezing = __commonJS({
|
|
1800
|
+
"node_modules/core-js/internals/freezing.js"(exports, module) {
|
|
1801
|
+
"use strict";
|
|
1802
|
+
var fails = require_fails();
|
|
1803
|
+
module.exports = !fails(function() {
|
|
1804
|
+
return Object.isExtensible(Object.preventExtensions({}));
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
|
|
1809
|
+
// node_modules/core-js/modules/es.reflect.prevent-extensions.js
|
|
1810
|
+
var require_es_reflect_prevent_extensions = __commonJS({
|
|
1811
|
+
"node_modules/core-js/modules/es.reflect.prevent-extensions.js"() {
|
|
1812
|
+
"use strict";
|
|
1813
|
+
var $ = require_export();
|
|
1814
|
+
var getBuiltIn = require_get_built_in();
|
|
1815
|
+
var anObject = require_an_object();
|
|
1816
|
+
var FREEZING = require_freezing();
|
|
1817
|
+
$({ target: "Reflect", stat: true, sham: !FREEZING }, {
|
|
1818
|
+
preventExtensions: function preventExtensions(target) {
|
|
1819
|
+
anObject(target);
|
|
1820
|
+
try {
|
|
1821
|
+
var objectPreventExtensions = getBuiltIn("Object", "preventExtensions");
|
|
1822
|
+
if (objectPreventExtensions) objectPreventExtensions(target);
|
|
1823
|
+
return true;
|
|
1824
|
+
} catch (error) {
|
|
1825
|
+
return false;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
});
|
|
1831
|
+
|
|
1832
|
+
// node_modules/core-js/modules/es.reflect.set.js
|
|
1833
|
+
var require_es_reflect_set = __commonJS({
|
|
1834
|
+
"node_modules/core-js/modules/es.reflect.set.js"() {
|
|
1835
|
+
"use strict";
|
|
1836
|
+
var $ = require_export();
|
|
1837
|
+
var call = require_function_call();
|
|
1838
|
+
var anObject = require_an_object();
|
|
1839
|
+
var isObject = require_is_object();
|
|
1840
|
+
var isDataDescriptor = require_is_data_descriptor();
|
|
1841
|
+
var fails = require_fails();
|
|
1842
|
+
var definePropertyModule = require_object_define_property();
|
|
1843
|
+
var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
|
|
1844
|
+
var getPrototypeOf = require_object_get_prototype_of();
|
|
1845
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
1846
|
+
function set(target, propertyKey, V) {
|
|
1847
|
+
var receiver = arguments.length < 4 ? target : arguments[3];
|
|
1848
|
+
var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
|
|
1849
|
+
var existingDescriptor, prototype, setter;
|
|
1850
|
+
if (!ownDescriptor) {
|
|
1851
|
+
if (isObject(prototype = getPrototypeOf(target))) {
|
|
1852
|
+
return set(prototype, propertyKey, V, receiver);
|
|
1853
|
+
}
|
|
1854
|
+
ownDescriptor = createPropertyDescriptor(0);
|
|
1855
|
+
}
|
|
1856
|
+
if (isDataDescriptor(ownDescriptor)) {
|
|
1857
|
+
if (ownDescriptor.writable === false || !isObject(receiver)) return false;
|
|
1858
|
+
if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
|
|
1859
|
+
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
|
|
1860
|
+
existingDescriptor.value = V;
|
|
1861
|
+
definePropertyModule.f(receiver, propertyKey, existingDescriptor);
|
|
1862
|
+
} else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
|
|
1863
|
+
} else {
|
|
1864
|
+
setter = ownDescriptor.set;
|
|
1865
|
+
if (setter === void 0) return false;
|
|
1866
|
+
call(setter, receiver, V);
|
|
1867
|
+
}
|
|
1868
|
+
return true;
|
|
1869
|
+
}
|
|
1870
|
+
var MS_EDGE_BUG = fails(function() {
|
|
1871
|
+
var Constructor = function() {
|
|
1872
|
+
};
|
|
1873
|
+
var object = definePropertyModule.f(new Constructor(), "a", { configurable: true });
|
|
1874
|
+
return Reflect.set(Constructor.prototype, "a", 1, object) !== false;
|
|
1875
|
+
});
|
|
1876
|
+
$({ target: "Reflect", stat: true, forced: MS_EDGE_BUG }, {
|
|
1877
|
+
set
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
|
|
1882
|
+
// node_modules/core-js/internals/is-possible-prototype.js
|
|
1883
|
+
var require_is_possible_prototype = __commonJS({
|
|
1884
|
+
"node_modules/core-js/internals/is-possible-prototype.js"(exports, module) {
|
|
1885
|
+
"use strict";
|
|
1886
|
+
var isObject = require_is_object();
|
|
1887
|
+
module.exports = function(argument) {
|
|
1888
|
+
return isObject(argument) || argument === null;
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
|
|
1893
|
+
// node_modules/core-js/internals/a-possible-prototype.js
|
|
1894
|
+
var require_a_possible_prototype = __commonJS({
|
|
1895
|
+
"node_modules/core-js/internals/a-possible-prototype.js"(exports, module) {
|
|
1896
|
+
"use strict";
|
|
1897
|
+
var isPossiblePrototype = require_is_possible_prototype();
|
|
1898
|
+
var $String = String;
|
|
1899
|
+
var $TypeError = TypeError;
|
|
1900
|
+
module.exports = function(argument) {
|
|
1901
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
1902
|
+
throw new $TypeError("Can't set " + $String(argument) + " as a prototype");
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
|
|
1907
|
+
// node_modules/core-js/internals/function-uncurry-this-accessor.js
|
|
1908
|
+
var require_function_uncurry_this_accessor = __commonJS({
|
|
1909
|
+
"node_modules/core-js/internals/function-uncurry-this-accessor.js"(exports, module) {
|
|
1910
|
+
"use strict";
|
|
1911
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1912
|
+
var aCallable = require_a_callable();
|
|
1913
|
+
module.exports = function(object, key, method) {
|
|
1914
|
+
try {
|
|
1915
|
+
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1916
|
+
} catch (error) {
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
});
|
|
1921
|
+
|
|
1922
|
+
// node_modules/core-js/internals/object-set-prototype-of.js
|
|
1923
|
+
var require_object_set_prototype_of = __commonJS({
|
|
1924
|
+
"node_modules/core-js/internals/object-set-prototype-of.js"(exports, module) {
|
|
1925
|
+
"use strict";
|
|
1926
|
+
var uncurryThisAccessor = require_function_uncurry_this_accessor();
|
|
1927
|
+
var isObject = require_is_object();
|
|
1928
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
1929
|
+
var aPossiblePrototype = require_a_possible_prototype();
|
|
1930
|
+
module.exports = Object.setPrototypeOf || ("__proto__" in {} ? (function() {
|
|
1931
|
+
var CORRECT_SETTER = false;
|
|
1932
|
+
var test = {};
|
|
1933
|
+
var setter;
|
|
1934
|
+
try {
|
|
1935
|
+
setter = uncurryThisAccessor(Object.prototype, "__proto__", "set");
|
|
1936
|
+
setter(test, []);
|
|
1937
|
+
CORRECT_SETTER = test instanceof Array;
|
|
1938
|
+
} catch (error) {
|
|
1939
|
+
}
|
|
1940
|
+
return function setPrototypeOf(O, proto) {
|
|
1941
|
+
requireObjectCoercible(O);
|
|
1942
|
+
aPossiblePrototype(proto);
|
|
1943
|
+
if (!isObject(O)) return O;
|
|
1944
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1945
|
+
else O.__proto__ = proto;
|
|
1946
|
+
return O;
|
|
1947
|
+
};
|
|
1948
|
+
})() : void 0);
|
|
1949
|
+
}
|
|
1950
|
+
});
|
|
1951
|
+
|
|
1952
|
+
// node_modules/core-js/modules/es.reflect.set-prototype-of.js
|
|
1953
|
+
var require_es_reflect_set_prototype_of = __commonJS({
|
|
1954
|
+
"node_modules/core-js/modules/es.reflect.set-prototype-of.js"() {
|
|
1955
|
+
"use strict";
|
|
1956
|
+
var $ = require_export();
|
|
1957
|
+
var anObject = require_an_object();
|
|
1958
|
+
var aPossiblePrototype = require_a_possible_prototype();
|
|
1959
|
+
var objectSetPrototypeOf = require_object_set_prototype_of();
|
|
1960
|
+
if (objectSetPrototypeOf) $({ target: "Reflect", stat: true }, {
|
|
1961
|
+
setPrototypeOf: function setPrototypeOf(target, proto) {
|
|
1962
|
+
anObject(target);
|
|
1963
|
+
aPossiblePrototype(proto);
|
|
1964
|
+
try {
|
|
1965
|
+
objectSetPrototypeOf(target, proto);
|
|
1966
|
+
return true;
|
|
1967
|
+
} catch (error) {
|
|
1968
|
+
return false;
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1974
|
+
|
|
1975
|
+
// node_modules/core-js/internals/set-to-string-tag.js
|
|
1976
|
+
var require_set_to_string_tag = __commonJS({
|
|
1977
|
+
"node_modules/core-js/internals/set-to-string-tag.js"(exports, module) {
|
|
1978
|
+
"use strict";
|
|
1979
|
+
var defineProperty = require_object_define_property().f;
|
|
1980
|
+
var hasOwn = require_has_own_property();
|
|
1981
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
1982
|
+
var TO_STRING_TAG = wellKnownSymbol("toStringTag");
|
|
1983
|
+
module.exports = function(target, TAG, STATIC) {
|
|
1984
|
+
if (target && !STATIC) target = target.prototype;
|
|
1985
|
+
if (target && !hasOwn(target, TO_STRING_TAG)) {
|
|
1986
|
+
defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
1987
|
+
}
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
});
|
|
1991
|
+
|
|
1992
|
+
// node_modules/core-js/modules/es.reflect.to-string-tag.js
|
|
1993
|
+
var require_es_reflect_to_string_tag = __commonJS({
|
|
1994
|
+
"node_modules/core-js/modules/es.reflect.to-string-tag.js"() {
|
|
1995
|
+
"use strict";
|
|
1996
|
+
var $ = require_export();
|
|
1997
|
+
var globalThis2 = require_global_this();
|
|
1998
|
+
var setToStringTag = require_set_to_string_tag();
|
|
1999
|
+
$({ global: true }, { Reflect: {} });
|
|
2000
|
+
setToStringTag(globalThis2.Reflect, "Reflect", true);
|
|
2001
|
+
}
|
|
2002
|
+
});
|
|
2003
|
+
|
|
2004
|
+
// node_modules/core-js/internals/path.js
|
|
2005
|
+
var require_path = __commonJS({
|
|
2006
|
+
"node_modules/core-js/internals/path.js"(exports, module) {
|
|
2007
|
+
"use strict";
|
|
2008
|
+
var globalThis2 = require_global_this();
|
|
2009
|
+
module.exports = globalThis2;
|
|
2010
|
+
}
|
|
2011
|
+
});
|
|
2012
|
+
|
|
2013
|
+
// node_modules/core-js/es/reflect/index.js
|
|
2014
|
+
var require_reflect = __commonJS({
|
|
2015
|
+
"node_modules/core-js/es/reflect/index.js"(exports, module) {
|
|
2016
|
+
"use strict";
|
|
2017
|
+
require_es_object_to_string();
|
|
2018
|
+
require_es_reflect_apply();
|
|
2019
|
+
require_es_reflect_construct();
|
|
2020
|
+
require_es_reflect_define_property();
|
|
2021
|
+
require_es_reflect_delete_property();
|
|
2022
|
+
require_es_reflect_get();
|
|
2023
|
+
require_es_reflect_get_own_property_descriptor();
|
|
2024
|
+
require_es_reflect_get_prototype_of();
|
|
2025
|
+
require_es_reflect_has();
|
|
2026
|
+
require_es_reflect_is_extensible();
|
|
2027
|
+
require_es_reflect_own_keys();
|
|
2028
|
+
require_es_reflect_prevent_extensions();
|
|
2029
|
+
require_es_reflect_set();
|
|
2030
|
+
require_es_reflect_set_prototype_of();
|
|
2031
|
+
require_es_reflect_to_string_tag();
|
|
2032
|
+
var path = require_path();
|
|
2033
|
+
module.exports = path.Reflect;
|
|
2034
|
+
}
|
|
2035
|
+
});
|
|
2036
|
+
|
|
2037
|
+
// src/polyfills.ts
|
|
2038
|
+
var import_reflect = __toESM(require_reflect());
|
|
2039
|
+
|
|
2040
|
+
// node_modules/zone.js/fesm2015/zone.js
|
|
2041
|
+
var global2 = globalThis;
|
|
2042
|
+
function __symbol__(name) {
|
|
2043
|
+
const symbolPrefix = global2["__Zone_symbol_prefix"] || "__zone_symbol__";
|
|
2044
|
+
return symbolPrefix + name;
|
|
2045
|
+
}
|
|
2046
|
+
function initZone() {
|
|
2047
|
+
const performance = global2["performance"];
|
|
2048
|
+
function mark(name) {
|
|
2049
|
+
performance && performance["mark"] && performance["mark"](name);
|
|
2050
|
+
}
|
|
2051
|
+
function performanceMeasure(name, label) {
|
|
2052
|
+
performance && performance["measure"] && performance["measure"](name, label);
|
|
2053
|
+
}
|
|
2054
|
+
mark("Zone");
|
|
2055
|
+
class ZoneImpl {
|
|
2056
|
+
static __symbol__ = __symbol__;
|
|
2057
|
+
static assertZonePatched() {
|
|
2058
|
+
if (global2["Promise"] !== patches["ZoneAwarePromise"]) {
|
|
2059
|
+
throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)");
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
static get root() {
|
|
2063
|
+
let zone = ZoneImpl.current;
|
|
2064
|
+
while (zone.parent) {
|
|
2065
|
+
zone = zone.parent;
|
|
2066
|
+
}
|
|
2067
|
+
return zone;
|
|
2068
|
+
}
|
|
2069
|
+
static get current() {
|
|
2070
|
+
return _currentZoneFrame.zone;
|
|
2071
|
+
}
|
|
2072
|
+
static get currentTask() {
|
|
2073
|
+
return _currentTask;
|
|
2074
|
+
}
|
|
2075
|
+
static __load_patch(name, fn, ignoreDuplicate = false) {
|
|
2076
|
+
if (patches.hasOwnProperty(name)) {
|
|
2077
|
+
const checkDuplicate = global2[__symbol__("forceDuplicateZoneCheck")] === true;
|
|
2078
|
+
if (!ignoreDuplicate && checkDuplicate) {
|
|
2079
|
+
throw Error("Already loaded patch: " + name);
|
|
2080
|
+
}
|
|
2081
|
+
} else if (!global2["__Zone_disable_" + name]) {
|
|
2082
|
+
const perfName = "Zone:" + name;
|
|
2083
|
+
mark(perfName);
|
|
2084
|
+
patches[name] = fn(global2, ZoneImpl, _api);
|
|
2085
|
+
performanceMeasure(perfName, perfName);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
get parent() {
|
|
2089
|
+
return this._parent;
|
|
2090
|
+
}
|
|
2091
|
+
get name() {
|
|
2092
|
+
return this._name;
|
|
2093
|
+
}
|
|
2094
|
+
_parent;
|
|
2095
|
+
_name;
|
|
2096
|
+
_properties;
|
|
2097
|
+
_zoneDelegate;
|
|
2098
|
+
constructor(parent, zoneSpec) {
|
|
2099
|
+
this._parent = parent;
|
|
2100
|
+
this._name = zoneSpec ? zoneSpec.name || "unnamed" : "<root>";
|
|
2101
|
+
this._properties = zoneSpec && zoneSpec.properties || {};
|
|
2102
|
+
this._zoneDelegate = new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
|
|
2103
|
+
}
|
|
2104
|
+
get(key) {
|
|
2105
|
+
const zone = this.getZoneWith(key);
|
|
2106
|
+
if (zone)
|
|
2107
|
+
return zone._properties[key];
|
|
2108
|
+
}
|
|
2109
|
+
getZoneWith(key) {
|
|
2110
|
+
let current = this;
|
|
2111
|
+
while (current) {
|
|
2112
|
+
if (current._properties.hasOwnProperty(key)) {
|
|
2113
|
+
return current;
|
|
2114
|
+
}
|
|
2115
|
+
current = current._parent;
|
|
2116
|
+
}
|
|
2117
|
+
return null;
|
|
2118
|
+
}
|
|
2119
|
+
fork(zoneSpec) {
|
|
2120
|
+
if (!zoneSpec)
|
|
2121
|
+
throw new Error("ZoneSpec required!");
|
|
2122
|
+
return this._zoneDelegate.fork(this, zoneSpec);
|
|
2123
|
+
}
|
|
2124
|
+
wrap(callback, source) {
|
|
2125
|
+
if (typeof callback !== "function") {
|
|
2126
|
+
throw new Error("Expecting function got: " + callback);
|
|
2127
|
+
}
|
|
2128
|
+
const _callback = this._zoneDelegate.intercept(this, callback, source);
|
|
2129
|
+
const zone = this;
|
|
2130
|
+
return function() {
|
|
2131
|
+
return zone.runGuarded(_callback, this, arguments, source);
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
run(callback, applyThis, applyArgs, source) {
|
|
2135
|
+
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
2136
|
+
try {
|
|
2137
|
+
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
|
|
2138
|
+
} finally {
|
|
2139
|
+
_currentZoneFrame = _currentZoneFrame.parent;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
runGuarded(callback, applyThis = null, applyArgs, source) {
|
|
2143
|
+
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
2144
|
+
try {
|
|
2145
|
+
try {
|
|
2146
|
+
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
|
|
2147
|
+
} catch (error) {
|
|
2148
|
+
if (this._zoneDelegate.handleError(this, error)) {
|
|
2149
|
+
throw error;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
} finally {
|
|
2153
|
+
_currentZoneFrame = _currentZoneFrame.parent;
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
runTask(task, applyThis, applyArgs) {
|
|
2157
|
+
if (task.zone != this) {
|
|
2158
|
+
throw new Error("A task can only be run in the zone of creation! (Creation: " + (task.zone || NO_ZONE).name + "; Execution: " + this.name + ")");
|
|
2159
|
+
}
|
|
2160
|
+
const zoneTask = task;
|
|
2161
|
+
const { type, data: { isPeriodic = false, isRefreshable = false } = {} } = task;
|
|
2162
|
+
if (task.state === notScheduled && (type === eventTask || type === macroTask)) {
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2165
|
+
const reEntryGuard = task.state != running;
|
|
2166
|
+
reEntryGuard && zoneTask._transitionTo(running, scheduled);
|
|
2167
|
+
const previousTask = _currentTask;
|
|
2168
|
+
_currentTask = zoneTask;
|
|
2169
|
+
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
2170
|
+
try {
|
|
2171
|
+
if (type == macroTask && task.data && !isPeriodic && !isRefreshable) {
|
|
2172
|
+
task.cancelFn = void 0;
|
|
2173
|
+
}
|
|
2174
|
+
try {
|
|
2175
|
+
return this._zoneDelegate.invokeTask(this, zoneTask, applyThis, applyArgs);
|
|
2176
|
+
} catch (error) {
|
|
2177
|
+
if (this._zoneDelegate.handleError(this, error)) {
|
|
2178
|
+
throw error;
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
} finally {
|
|
2182
|
+
const state = task.state;
|
|
2183
|
+
if (state !== notScheduled && state !== unknown) {
|
|
2184
|
+
if (type == eventTask || isPeriodic || isRefreshable && state === scheduling) {
|
|
2185
|
+
reEntryGuard && zoneTask._transitionTo(scheduled, running, scheduling);
|
|
2186
|
+
} else {
|
|
2187
|
+
const zoneDelegates = zoneTask._zoneDelegates;
|
|
2188
|
+
this._updateTaskCount(zoneTask, -1);
|
|
2189
|
+
reEntryGuard && zoneTask._transitionTo(notScheduled, running, notScheduled);
|
|
2190
|
+
if (isRefreshable) {
|
|
2191
|
+
zoneTask._zoneDelegates = zoneDelegates;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
_currentZoneFrame = _currentZoneFrame.parent;
|
|
2196
|
+
_currentTask = previousTask;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
scheduleTask(task) {
|
|
2200
|
+
if (task.zone && task.zone !== this) {
|
|
2201
|
+
let newZone = this;
|
|
2202
|
+
while (newZone) {
|
|
2203
|
+
if (newZone === task.zone) {
|
|
2204
|
+
throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);
|
|
2205
|
+
}
|
|
2206
|
+
newZone = newZone.parent;
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
task._transitionTo(scheduling, notScheduled);
|
|
2210
|
+
const zoneDelegates = [];
|
|
2211
|
+
task._zoneDelegates = zoneDelegates;
|
|
2212
|
+
task._zone = this;
|
|
2213
|
+
try {
|
|
2214
|
+
task = this._zoneDelegate.scheduleTask(this, task);
|
|
2215
|
+
} catch (err) {
|
|
2216
|
+
task._transitionTo(unknown, scheduling, notScheduled);
|
|
2217
|
+
this._zoneDelegate.handleError(this, err);
|
|
2218
|
+
throw err;
|
|
2219
|
+
}
|
|
2220
|
+
if (task._zoneDelegates === zoneDelegates) {
|
|
2221
|
+
this._updateTaskCount(task, 1);
|
|
2222
|
+
}
|
|
2223
|
+
if (task.state == scheduling) {
|
|
2224
|
+
task._transitionTo(scheduled, scheduling);
|
|
2225
|
+
}
|
|
2226
|
+
return task;
|
|
2227
|
+
}
|
|
2228
|
+
scheduleMicroTask(source, callback, data, customSchedule) {
|
|
2229
|
+
return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, void 0));
|
|
2230
|
+
}
|
|
2231
|
+
scheduleMacroTask(source, callback, data, customSchedule, customCancel) {
|
|
2232
|
+
return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));
|
|
2233
|
+
}
|
|
2234
|
+
scheduleEventTask(source, callback, data, customSchedule, customCancel) {
|
|
2235
|
+
return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));
|
|
2236
|
+
}
|
|
2237
|
+
cancelTask(task) {
|
|
2238
|
+
if (task.zone != this)
|
|
2239
|
+
throw new Error("A task can only be cancelled in the zone of creation! (Creation: " + (task.zone || NO_ZONE).name + "; Execution: " + this.name + ")");
|
|
2240
|
+
if (task.state !== scheduled && task.state !== running) {
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
task._transitionTo(canceling, scheduled, running);
|
|
2244
|
+
try {
|
|
2245
|
+
this._zoneDelegate.cancelTask(this, task);
|
|
2246
|
+
} catch (err) {
|
|
2247
|
+
task._transitionTo(unknown, canceling);
|
|
2248
|
+
this._zoneDelegate.handleError(this, err);
|
|
2249
|
+
throw err;
|
|
2250
|
+
}
|
|
2251
|
+
this._updateTaskCount(task, -1);
|
|
2252
|
+
task._transitionTo(notScheduled, canceling);
|
|
2253
|
+
task.runCount = -1;
|
|
2254
|
+
return task;
|
|
2255
|
+
}
|
|
2256
|
+
_updateTaskCount(task, count) {
|
|
2257
|
+
const zoneDelegates = task._zoneDelegates;
|
|
2258
|
+
if (count == -1) {
|
|
2259
|
+
task._zoneDelegates = null;
|
|
2260
|
+
}
|
|
2261
|
+
for (let i = 0; i < zoneDelegates.length; i++) {
|
|
2262
|
+
zoneDelegates[i]._updateTaskCount(task.type, count);
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
const DELEGATE_ZS = {
|
|
2267
|
+
name: "",
|
|
2268
|
+
onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),
|
|
2269
|
+
onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),
|
|
2270
|
+
onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),
|
|
2271
|
+
onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)
|
|
2272
|
+
};
|
|
2273
|
+
class _ZoneDelegate {
|
|
2274
|
+
get zone() {
|
|
2275
|
+
return this._zone;
|
|
2276
|
+
}
|
|
2277
|
+
_zone;
|
|
2278
|
+
_taskCounts = {
|
|
2279
|
+
"microTask": 0,
|
|
2280
|
+
"macroTask": 0,
|
|
2281
|
+
"eventTask": 0
|
|
2282
|
+
};
|
|
2283
|
+
_parentDelegate;
|
|
2284
|
+
_forkDlgt;
|
|
2285
|
+
_forkZS;
|
|
2286
|
+
_forkCurrZone;
|
|
2287
|
+
_interceptDlgt;
|
|
2288
|
+
_interceptZS;
|
|
2289
|
+
_interceptCurrZone;
|
|
2290
|
+
_invokeDlgt;
|
|
2291
|
+
_invokeZS;
|
|
2292
|
+
_invokeCurrZone;
|
|
2293
|
+
_handleErrorDlgt;
|
|
2294
|
+
_handleErrorZS;
|
|
2295
|
+
_handleErrorCurrZone;
|
|
2296
|
+
_scheduleTaskDlgt;
|
|
2297
|
+
_scheduleTaskZS;
|
|
2298
|
+
_scheduleTaskCurrZone;
|
|
2299
|
+
_invokeTaskDlgt;
|
|
2300
|
+
_invokeTaskZS;
|
|
2301
|
+
_invokeTaskCurrZone;
|
|
2302
|
+
_cancelTaskDlgt;
|
|
2303
|
+
_cancelTaskZS;
|
|
2304
|
+
_cancelTaskCurrZone;
|
|
2305
|
+
_hasTaskDlgt;
|
|
2306
|
+
_hasTaskDlgtOwner;
|
|
2307
|
+
_hasTaskZS;
|
|
2308
|
+
_hasTaskCurrZone;
|
|
2309
|
+
constructor(zone, parentDelegate, zoneSpec) {
|
|
2310
|
+
this._zone = zone;
|
|
2311
|
+
this._parentDelegate = parentDelegate;
|
|
2312
|
+
this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
|
|
2313
|
+
this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
|
|
2314
|
+
this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this._zone : parentDelegate._forkCurrZone);
|
|
2315
|
+
this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
|
|
2316
|
+
this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
|
|
2317
|
+
this._interceptCurrZone = zoneSpec && (zoneSpec.onIntercept ? this._zone : parentDelegate._interceptCurrZone);
|
|
2318
|
+
this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
|
|
2319
|
+
this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
|
|
2320
|
+
this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this._zone : parentDelegate._invokeCurrZone);
|
|
2321
|
+
this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
|
|
2322
|
+
this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
|
|
2323
|
+
this._handleErrorCurrZone = zoneSpec && (zoneSpec.onHandleError ? this._zone : parentDelegate._handleErrorCurrZone);
|
|
2324
|
+
this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
|
|
2325
|
+
this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
|
|
2326
|
+
this._scheduleTaskCurrZone = zoneSpec && (zoneSpec.onScheduleTask ? this._zone : parentDelegate._scheduleTaskCurrZone);
|
|
2327
|
+
this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
|
|
2328
|
+
this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
|
|
2329
|
+
this._invokeTaskCurrZone = zoneSpec && (zoneSpec.onInvokeTask ? this._zone : parentDelegate._invokeTaskCurrZone);
|
|
2330
|
+
this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
|
|
2331
|
+
this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
|
|
2332
|
+
this._cancelTaskCurrZone = zoneSpec && (zoneSpec.onCancelTask ? this._zone : parentDelegate._cancelTaskCurrZone);
|
|
2333
|
+
this._hasTaskZS = null;
|
|
2334
|
+
this._hasTaskDlgt = null;
|
|
2335
|
+
this._hasTaskDlgtOwner = null;
|
|
2336
|
+
this._hasTaskCurrZone = null;
|
|
2337
|
+
const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
|
|
2338
|
+
const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
|
|
2339
|
+
if (zoneSpecHasTask || parentHasTask) {
|
|
2340
|
+
this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
|
|
2341
|
+
this._hasTaskDlgt = parentDelegate;
|
|
2342
|
+
this._hasTaskDlgtOwner = this;
|
|
2343
|
+
this._hasTaskCurrZone = this._zone;
|
|
2344
|
+
if (!zoneSpec.onScheduleTask) {
|
|
2345
|
+
this._scheduleTaskZS = DELEGATE_ZS;
|
|
2346
|
+
this._scheduleTaskDlgt = parentDelegate;
|
|
2347
|
+
this._scheduleTaskCurrZone = this._zone;
|
|
2348
|
+
}
|
|
2349
|
+
if (!zoneSpec.onInvokeTask) {
|
|
2350
|
+
this._invokeTaskZS = DELEGATE_ZS;
|
|
2351
|
+
this._invokeTaskDlgt = parentDelegate;
|
|
2352
|
+
this._invokeTaskCurrZone = this._zone;
|
|
2353
|
+
}
|
|
2354
|
+
if (!zoneSpec.onCancelTask) {
|
|
2355
|
+
this._cancelTaskZS = DELEGATE_ZS;
|
|
2356
|
+
this._cancelTaskDlgt = parentDelegate;
|
|
2357
|
+
this._cancelTaskCurrZone = this._zone;
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
fork(targetZone, zoneSpec) {
|
|
2362
|
+
return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : new ZoneImpl(targetZone, zoneSpec);
|
|
2363
|
+
}
|
|
2364
|
+
intercept(targetZone, callback, source) {
|
|
2365
|
+
return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : callback;
|
|
2366
|
+
}
|
|
2367
|
+
invoke(targetZone, callback, applyThis, applyArgs, source) {
|
|
2368
|
+
return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : callback.apply(applyThis, applyArgs);
|
|
2369
|
+
}
|
|
2370
|
+
handleError(targetZone, error) {
|
|
2371
|
+
return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : true;
|
|
2372
|
+
}
|
|
2373
|
+
scheduleTask(targetZone, task) {
|
|
2374
|
+
let returnTask = task;
|
|
2375
|
+
if (this._scheduleTaskZS) {
|
|
2376
|
+
if (this._hasTaskZS) {
|
|
2377
|
+
returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
|
|
2378
|
+
}
|
|
2379
|
+
returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);
|
|
2380
|
+
if (!returnTask)
|
|
2381
|
+
returnTask = task;
|
|
2382
|
+
} else {
|
|
2383
|
+
if (task.scheduleFn) {
|
|
2384
|
+
task.scheduleFn(task);
|
|
2385
|
+
} else if (task.type == microTask) {
|
|
2386
|
+
scheduleMicroTask(task);
|
|
2387
|
+
} else {
|
|
2388
|
+
throw new Error("Task is missing scheduleFn.");
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
return returnTask;
|
|
2392
|
+
}
|
|
2393
|
+
invokeTask(targetZone, task, applyThis, applyArgs) {
|
|
2394
|
+
return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : task.callback.apply(applyThis, applyArgs);
|
|
2395
|
+
}
|
|
2396
|
+
cancelTask(targetZone, task) {
|
|
2397
|
+
let value;
|
|
2398
|
+
if (this._cancelTaskZS) {
|
|
2399
|
+
value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);
|
|
2400
|
+
} else {
|
|
2401
|
+
if (!task.cancelFn) {
|
|
2402
|
+
throw Error("Task is not cancelable");
|
|
2403
|
+
}
|
|
2404
|
+
value = task.cancelFn(task);
|
|
2405
|
+
}
|
|
2406
|
+
return value;
|
|
2407
|
+
}
|
|
2408
|
+
hasTask(targetZone, isEmpty) {
|
|
2409
|
+
try {
|
|
2410
|
+
this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
|
|
2411
|
+
} catch (err) {
|
|
2412
|
+
this.handleError(targetZone, err);
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
_updateTaskCount(type, count) {
|
|
2416
|
+
const counts = this._taskCounts;
|
|
2417
|
+
const prev = counts[type];
|
|
2418
|
+
const next = counts[type] = prev + count;
|
|
2419
|
+
if (next < 0) {
|
|
2420
|
+
throw new Error("More tasks executed then were scheduled.");
|
|
2421
|
+
}
|
|
2422
|
+
if (prev == 0 || next == 0) {
|
|
2423
|
+
const isEmpty = {
|
|
2424
|
+
microTask: counts["microTask"] > 0,
|
|
2425
|
+
macroTask: counts["macroTask"] > 0,
|
|
2426
|
+
eventTask: counts["eventTask"] > 0,
|
|
2427
|
+
change: type
|
|
2428
|
+
};
|
|
2429
|
+
this.hasTask(this._zone, isEmpty);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
class ZoneTask {
|
|
2434
|
+
type;
|
|
2435
|
+
source;
|
|
2436
|
+
invoke;
|
|
2437
|
+
callback;
|
|
2438
|
+
data;
|
|
2439
|
+
scheduleFn;
|
|
2440
|
+
cancelFn;
|
|
2441
|
+
_zone = null;
|
|
2442
|
+
runCount = 0;
|
|
2443
|
+
_zoneDelegates = null;
|
|
2444
|
+
_state = "notScheduled";
|
|
2445
|
+
constructor(type, source, callback, options, scheduleFn, cancelFn) {
|
|
2446
|
+
this.type = type;
|
|
2447
|
+
this.source = source;
|
|
2448
|
+
this.data = options;
|
|
2449
|
+
this.scheduleFn = scheduleFn;
|
|
2450
|
+
this.cancelFn = cancelFn;
|
|
2451
|
+
if (!callback) {
|
|
2452
|
+
throw new Error("callback is not defined");
|
|
2453
|
+
}
|
|
2454
|
+
this.callback = callback;
|
|
2455
|
+
const self2 = this;
|
|
2456
|
+
if (type === eventTask && options && options.useG) {
|
|
2457
|
+
this.invoke = ZoneTask.invokeTask;
|
|
2458
|
+
} else {
|
|
2459
|
+
this.invoke = function() {
|
|
2460
|
+
return ZoneTask.invokeTask.call(global2, self2, this, arguments);
|
|
2461
|
+
};
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
static invokeTask(task, target, args) {
|
|
2465
|
+
if (!task) {
|
|
2466
|
+
task = this;
|
|
2467
|
+
}
|
|
2468
|
+
_numberOfNestedTaskFrames++;
|
|
2469
|
+
try {
|
|
2470
|
+
task.runCount++;
|
|
2471
|
+
return task.zone.runTask(task, target, args);
|
|
2472
|
+
} finally {
|
|
2473
|
+
if (_numberOfNestedTaskFrames == 1) {
|
|
2474
|
+
drainMicroTaskQueue();
|
|
2475
|
+
}
|
|
2476
|
+
_numberOfNestedTaskFrames--;
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
get zone() {
|
|
2480
|
+
return this._zone;
|
|
2481
|
+
}
|
|
2482
|
+
get state() {
|
|
2483
|
+
return this._state;
|
|
2484
|
+
}
|
|
2485
|
+
cancelScheduleRequest() {
|
|
2486
|
+
this._transitionTo(notScheduled, scheduling);
|
|
2487
|
+
}
|
|
2488
|
+
_transitionTo(toState, fromState1, fromState2) {
|
|
2489
|
+
if (this._state === fromState1 || this._state === fromState2) {
|
|
2490
|
+
this._state = toState;
|
|
2491
|
+
if (toState == notScheduled) {
|
|
2492
|
+
this._zoneDelegates = null;
|
|
2493
|
+
}
|
|
2494
|
+
} else {
|
|
2495
|
+
throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? " or '" + fromState2 + "'" : ""}, was '${this._state}'.`);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
toString() {
|
|
2499
|
+
if (this.data && typeof this.data.handleId !== "undefined") {
|
|
2500
|
+
return this.data.handleId.toString();
|
|
2501
|
+
} else {
|
|
2502
|
+
return Object.prototype.toString.call(this);
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
// add toJSON method to prevent cyclic error when
|
|
2506
|
+
// call JSON.stringify(zoneTask)
|
|
2507
|
+
toJSON() {
|
|
2508
|
+
return {
|
|
2509
|
+
type: this.type,
|
|
2510
|
+
state: this.state,
|
|
2511
|
+
source: this.source,
|
|
2512
|
+
zone: this.zone.name,
|
|
2513
|
+
runCount: this.runCount
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
const symbolSetTimeout = __symbol__("setTimeout");
|
|
2518
|
+
const symbolPromise = __symbol__("Promise");
|
|
2519
|
+
const symbolThen = __symbol__("then");
|
|
2520
|
+
let _microTaskQueue = [];
|
|
2521
|
+
let _isDrainingMicrotaskQueue = false;
|
|
2522
|
+
let nativeMicroTaskQueuePromise;
|
|
2523
|
+
function nativeScheduleMicroTask(func) {
|
|
2524
|
+
if (!nativeMicroTaskQueuePromise) {
|
|
2525
|
+
if (global2[symbolPromise]) {
|
|
2526
|
+
nativeMicroTaskQueuePromise = global2[symbolPromise].resolve(0);
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
if (nativeMicroTaskQueuePromise) {
|
|
2530
|
+
let nativeThen = nativeMicroTaskQueuePromise[symbolThen];
|
|
2531
|
+
if (!nativeThen) {
|
|
2532
|
+
nativeThen = nativeMicroTaskQueuePromise["then"];
|
|
2533
|
+
}
|
|
2534
|
+
nativeThen.call(nativeMicroTaskQueuePromise, func);
|
|
2535
|
+
} else {
|
|
2536
|
+
global2[symbolSetTimeout](func, 0);
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
function scheduleMicroTask(task) {
|
|
2540
|
+
if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {
|
|
2541
|
+
nativeScheduleMicroTask(drainMicroTaskQueue);
|
|
2542
|
+
}
|
|
2543
|
+
task && _microTaskQueue.push(task);
|
|
2544
|
+
}
|
|
2545
|
+
function drainMicroTaskQueue() {
|
|
2546
|
+
if (!_isDrainingMicrotaskQueue) {
|
|
2547
|
+
_isDrainingMicrotaskQueue = true;
|
|
2548
|
+
while (_microTaskQueue.length) {
|
|
2549
|
+
const queue = _microTaskQueue;
|
|
2550
|
+
_microTaskQueue = [];
|
|
2551
|
+
for (let i = 0; i < queue.length; i++) {
|
|
2552
|
+
const task = queue[i];
|
|
2553
|
+
try {
|
|
2554
|
+
task.zone.runTask(task, null, null);
|
|
2555
|
+
} catch (error) {
|
|
2556
|
+
_api.onUnhandledError(error);
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
_api.microtaskDrainDone();
|
|
2561
|
+
_isDrainingMicrotaskQueue = false;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
const NO_ZONE = { name: "NO ZONE" };
|
|
2565
|
+
const notScheduled = "notScheduled", scheduling = "scheduling", scheduled = "scheduled", running = "running", canceling = "canceling", unknown = "unknown";
|
|
2566
|
+
const microTask = "microTask", macroTask = "macroTask", eventTask = "eventTask";
|
|
2567
|
+
const patches = {};
|
|
2568
|
+
const _api = {
|
|
2569
|
+
symbol: __symbol__,
|
|
2570
|
+
currentZoneFrame: () => _currentZoneFrame,
|
|
2571
|
+
onUnhandledError: noop,
|
|
2572
|
+
microtaskDrainDone: noop,
|
|
2573
|
+
scheduleMicroTask,
|
|
2574
|
+
showUncaughtError: () => !ZoneImpl[__symbol__("ignoreConsoleErrorUncaughtError")],
|
|
2575
|
+
patchEventTarget: () => [],
|
|
2576
|
+
patchOnProperties: noop,
|
|
2577
|
+
patchMethod: () => noop,
|
|
2578
|
+
bindArguments: () => [],
|
|
2579
|
+
patchThen: () => noop,
|
|
2580
|
+
patchMacroTask: () => noop,
|
|
2581
|
+
patchEventPrototype: () => noop,
|
|
2582
|
+
isIEOrEdge: () => false,
|
|
2583
|
+
getGlobalObjects: () => void 0,
|
|
2584
|
+
ObjectDefineProperty: () => noop,
|
|
2585
|
+
ObjectGetOwnPropertyDescriptor: () => void 0,
|
|
2586
|
+
ObjectCreate: () => void 0,
|
|
2587
|
+
ArraySlice: () => [],
|
|
2588
|
+
patchClass: () => noop,
|
|
2589
|
+
wrapWithCurrentZone: () => noop,
|
|
2590
|
+
filterProperties: () => [],
|
|
2591
|
+
attachOriginToPatched: () => noop,
|
|
2592
|
+
_redefineProperty: () => noop,
|
|
2593
|
+
patchCallbacks: () => noop,
|
|
2594
|
+
nativeScheduleMicroTask
|
|
2595
|
+
};
|
|
2596
|
+
let _currentZoneFrame = { parent: null, zone: new ZoneImpl(null, null) };
|
|
2597
|
+
let _currentTask = null;
|
|
2598
|
+
let _numberOfNestedTaskFrames = 0;
|
|
2599
|
+
function noop() {
|
|
2600
|
+
}
|
|
2601
|
+
performanceMeasure("Zone", "Zone");
|
|
2602
|
+
return ZoneImpl;
|
|
2603
|
+
}
|
|
2604
|
+
function loadZone() {
|
|
2605
|
+
const global3 = globalThis;
|
|
2606
|
+
const checkDuplicate = global3[__symbol__("forceDuplicateZoneCheck")] === true;
|
|
2607
|
+
if (global3["Zone"] && (checkDuplicate || typeof global3["Zone"].__symbol__ !== "function")) {
|
|
2608
|
+
throw new Error("Zone already loaded.");
|
|
2609
|
+
}
|
|
2610
|
+
global3["Zone"] ??= initZone();
|
|
2611
|
+
return global3["Zone"];
|
|
2612
|
+
}
|
|
2613
|
+
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2614
|
+
var ObjectDefineProperty = Object.defineProperty;
|
|
2615
|
+
var ObjectGetPrototypeOf = Object.getPrototypeOf;
|
|
2616
|
+
var ObjectCreate = Object.create;
|
|
2617
|
+
var ArraySlice = Array.prototype.slice;
|
|
2618
|
+
var ADD_EVENT_LISTENER_STR = "addEventListener";
|
|
2619
|
+
var REMOVE_EVENT_LISTENER_STR = "removeEventListener";
|
|
2620
|
+
var ZONE_SYMBOL_ADD_EVENT_LISTENER = __symbol__(ADD_EVENT_LISTENER_STR);
|
|
2621
|
+
var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = __symbol__(REMOVE_EVENT_LISTENER_STR);
|
|
2622
|
+
var TRUE_STR = "true";
|
|
2623
|
+
var FALSE_STR = "false";
|
|
2624
|
+
var ZONE_SYMBOL_PREFIX = __symbol__("");
|
|
2625
|
+
function wrapWithCurrentZone(callback, source) {
|
|
2626
|
+
return Zone.current.wrap(callback, source);
|
|
2627
|
+
}
|
|
2628
|
+
function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {
|
|
2629
|
+
return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);
|
|
2630
|
+
}
|
|
2631
|
+
var zoneSymbol = __symbol__;
|
|
2632
|
+
var isWindowExists = typeof window !== "undefined";
|
|
2633
|
+
var internalWindow = isWindowExists ? window : void 0;
|
|
2634
|
+
var _global = isWindowExists && internalWindow || globalThis;
|
|
2635
|
+
var REMOVE_ATTRIBUTE = "removeAttribute";
|
|
2636
|
+
function bindArguments(args, source) {
|
|
2637
|
+
for (let i = args.length - 1; i >= 0; i--) {
|
|
2638
|
+
if (typeof args[i] === "function") {
|
|
2639
|
+
args[i] = wrapWithCurrentZone(args[i], source + "_" + i);
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
return args;
|
|
2643
|
+
}
|
|
2644
|
+
function patchPrototype(prototype, fnNames) {
|
|
2645
|
+
const source = prototype.constructor["name"];
|
|
2646
|
+
for (let i = 0; i < fnNames.length; i++) {
|
|
2647
|
+
const name = fnNames[i];
|
|
2648
|
+
const delegate = prototype[name];
|
|
2649
|
+
if (delegate) {
|
|
2650
|
+
const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);
|
|
2651
|
+
if (!isPropertyWritable(prototypeDesc)) {
|
|
2652
|
+
continue;
|
|
2653
|
+
}
|
|
2654
|
+
prototype[name] = ((delegate2) => {
|
|
2655
|
+
const patched = function() {
|
|
2656
|
+
return delegate2.apply(this, bindArguments(arguments, source + "." + name));
|
|
2657
|
+
};
|
|
2658
|
+
attachOriginToPatched(patched, delegate2);
|
|
2659
|
+
return patched;
|
|
2660
|
+
})(delegate);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
function isPropertyWritable(propertyDesc) {
|
|
2665
|
+
if (!propertyDesc) {
|
|
2666
|
+
return true;
|
|
2667
|
+
}
|
|
2668
|
+
if (propertyDesc.writable === false) {
|
|
2669
|
+
return false;
|
|
2670
|
+
}
|
|
2671
|
+
return !(typeof propertyDesc.get === "function" && typeof propertyDesc.set === "undefined");
|
|
2672
|
+
}
|
|
2673
|
+
var isWebWorker = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
|
|
2674
|
+
var isNode = !("nw" in _global) && typeof _global.process !== "undefined" && _global.process.toString() === "[object process]";
|
|
2675
|
+
var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow["HTMLElement"]);
|
|
2676
|
+
var isMix = typeof _global.process !== "undefined" && _global.process.toString() === "[object process]" && !isWebWorker && !!(isWindowExists && internalWindow["HTMLElement"]);
|
|
2677
|
+
var zoneSymbolEventNames$1 = {};
|
|
2678
|
+
var enableBeforeunloadSymbol = zoneSymbol("enable_beforeunload");
|
|
2679
|
+
var wrapFn = function(event) {
|
|
2680
|
+
event = event || _global.event;
|
|
2681
|
+
if (!event) {
|
|
2682
|
+
return;
|
|
2683
|
+
}
|
|
2684
|
+
let eventNameSymbol = zoneSymbolEventNames$1[event.type];
|
|
2685
|
+
if (!eventNameSymbol) {
|
|
2686
|
+
eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol("ON_PROPERTY" + event.type);
|
|
2687
|
+
}
|
|
2688
|
+
const target = this || event.target || _global;
|
|
2689
|
+
const listener = target[eventNameSymbol];
|
|
2690
|
+
let result;
|
|
2691
|
+
if (isBrowser && target === internalWindow && event.type === "error") {
|
|
2692
|
+
const errorEvent = event;
|
|
2693
|
+
result = listener && listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);
|
|
2694
|
+
if (result === true) {
|
|
2695
|
+
event.preventDefault();
|
|
2696
|
+
}
|
|
2697
|
+
} else {
|
|
2698
|
+
result = listener && listener.apply(this, arguments);
|
|
2699
|
+
if (
|
|
2700
|
+
// https://github.com/angular/angular/issues/47579
|
|
2701
|
+
// https://www.w3.org/TR/2011/WD-html5-20110525/history.html#beforeunloadevent
|
|
2702
|
+
// This is the only specific case we should check for. The spec defines that the
|
|
2703
|
+
// `returnValue` attribute represents the message to show the user. When the event
|
|
2704
|
+
// is created, this attribute must be set to the empty string.
|
|
2705
|
+
event.type === "beforeunload" && // To prevent any breaking changes resulting from this change, given that
|
|
2706
|
+
// it was already causing a significant number of failures in G3, we have hidden
|
|
2707
|
+
// that behavior behind a global configuration flag. Consumers can enable this
|
|
2708
|
+
// flag explicitly if they want the `beforeunload` event to be handled as defined
|
|
2709
|
+
// in the specification.
|
|
2710
|
+
_global[enableBeforeunloadSymbol] && // The IDL event definition is `attribute DOMString returnValue`, so we check whether
|
|
2711
|
+
// `typeof result` is a string.
|
|
2712
|
+
typeof result === "string"
|
|
2713
|
+
) {
|
|
2714
|
+
event.returnValue = result;
|
|
2715
|
+
} else if (result != void 0 && !result) {
|
|
2716
|
+
event.preventDefault();
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
return result;
|
|
2720
|
+
};
|
|
2721
|
+
function patchProperty(obj, prop, prototype) {
|
|
2722
|
+
let desc = ObjectGetOwnPropertyDescriptor(obj, prop);
|
|
2723
|
+
if (!desc && prototype) {
|
|
2724
|
+
const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);
|
|
2725
|
+
if (prototypeDesc) {
|
|
2726
|
+
desc = { enumerable: true, configurable: true };
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
if (!desc || !desc.configurable) {
|
|
2730
|
+
return;
|
|
2731
|
+
}
|
|
2732
|
+
const onPropPatchedSymbol = zoneSymbol("on" + prop + "patched");
|
|
2733
|
+
if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {
|
|
2734
|
+
return;
|
|
2735
|
+
}
|
|
2736
|
+
delete desc.writable;
|
|
2737
|
+
delete desc.value;
|
|
2738
|
+
const originalDescGet = desc.get;
|
|
2739
|
+
const originalDescSet = desc.set;
|
|
2740
|
+
const eventName = prop.slice(2);
|
|
2741
|
+
let eventNameSymbol = zoneSymbolEventNames$1[eventName];
|
|
2742
|
+
if (!eventNameSymbol) {
|
|
2743
|
+
eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol("ON_PROPERTY" + eventName);
|
|
2744
|
+
}
|
|
2745
|
+
desc.set = function(newValue) {
|
|
2746
|
+
let target = this;
|
|
2747
|
+
if (!target && obj === _global) {
|
|
2748
|
+
target = _global;
|
|
2749
|
+
}
|
|
2750
|
+
if (!target) {
|
|
2751
|
+
return;
|
|
2752
|
+
}
|
|
2753
|
+
const previousValue = target[eventNameSymbol];
|
|
2754
|
+
if (typeof previousValue === "function") {
|
|
2755
|
+
target.removeEventListener(eventName, wrapFn);
|
|
2756
|
+
}
|
|
2757
|
+
originalDescSet?.call(target, null);
|
|
2758
|
+
target[eventNameSymbol] = newValue;
|
|
2759
|
+
if (typeof newValue === "function") {
|
|
2760
|
+
target.addEventListener(eventName, wrapFn, false);
|
|
2761
|
+
}
|
|
2762
|
+
};
|
|
2763
|
+
desc.get = function() {
|
|
2764
|
+
let target = this;
|
|
2765
|
+
if (!target && obj === _global) {
|
|
2766
|
+
target = _global;
|
|
2767
|
+
}
|
|
2768
|
+
if (!target) {
|
|
2769
|
+
return null;
|
|
2770
|
+
}
|
|
2771
|
+
const listener = target[eventNameSymbol];
|
|
2772
|
+
if (listener) {
|
|
2773
|
+
return listener;
|
|
2774
|
+
} else if (originalDescGet) {
|
|
2775
|
+
let value = originalDescGet.call(this);
|
|
2776
|
+
if (value) {
|
|
2777
|
+
desc.set.call(this, value);
|
|
2778
|
+
if (typeof target[REMOVE_ATTRIBUTE] === "function") {
|
|
2779
|
+
target.removeAttribute(prop);
|
|
2780
|
+
}
|
|
2781
|
+
return value;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
return null;
|
|
2785
|
+
};
|
|
2786
|
+
ObjectDefineProperty(obj, prop, desc);
|
|
2787
|
+
obj[onPropPatchedSymbol] = true;
|
|
2788
|
+
}
|
|
2789
|
+
function patchOnProperties(obj, properties, prototype) {
|
|
2790
|
+
if (properties) {
|
|
2791
|
+
for (let i = 0; i < properties.length; i++) {
|
|
2792
|
+
patchProperty(obj, "on" + properties[i], prototype);
|
|
2793
|
+
}
|
|
2794
|
+
} else {
|
|
2795
|
+
const onProperties = [];
|
|
2796
|
+
for (const prop in obj) {
|
|
2797
|
+
if (prop.slice(0, 2) == "on") {
|
|
2798
|
+
onProperties.push(prop);
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
for (let j = 0; j < onProperties.length; j++) {
|
|
2802
|
+
patchProperty(obj, onProperties[j], prototype);
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
var originalInstanceKey = zoneSymbol("originalInstance");
|
|
2807
|
+
function patchClass(className) {
|
|
2808
|
+
const OriginalClass = _global[className];
|
|
2809
|
+
if (!OriginalClass)
|
|
2810
|
+
return;
|
|
2811
|
+
_global[zoneSymbol(className)] = OriginalClass;
|
|
2812
|
+
_global[className] = function() {
|
|
2813
|
+
const a = bindArguments(arguments, className);
|
|
2814
|
+
switch (a.length) {
|
|
2815
|
+
case 0:
|
|
2816
|
+
this[originalInstanceKey] = new OriginalClass();
|
|
2817
|
+
break;
|
|
2818
|
+
case 1:
|
|
2819
|
+
this[originalInstanceKey] = new OriginalClass(a[0]);
|
|
2820
|
+
break;
|
|
2821
|
+
case 2:
|
|
2822
|
+
this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
|
|
2823
|
+
break;
|
|
2824
|
+
case 3:
|
|
2825
|
+
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
|
|
2826
|
+
break;
|
|
2827
|
+
case 4:
|
|
2828
|
+
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
|
|
2829
|
+
break;
|
|
2830
|
+
default:
|
|
2831
|
+
throw new Error("Arg list too long.");
|
|
2832
|
+
}
|
|
2833
|
+
};
|
|
2834
|
+
attachOriginToPatched(_global[className], OriginalClass);
|
|
2835
|
+
const instance = new OriginalClass(function() {
|
|
2836
|
+
});
|
|
2837
|
+
let prop;
|
|
2838
|
+
for (prop in instance) {
|
|
2839
|
+
if (className === "XMLHttpRequest" && prop === "responseBlob")
|
|
2840
|
+
continue;
|
|
2841
|
+
(function(prop2) {
|
|
2842
|
+
if (typeof instance[prop2] === "function") {
|
|
2843
|
+
_global[className].prototype[prop2] = function() {
|
|
2844
|
+
return this[originalInstanceKey][prop2].apply(this[originalInstanceKey], arguments);
|
|
2845
|
+
};
|
|
2846
|
+
} else {
|
|
2847
|
+
ObjectDefineProperty(_global[className].prototype, prop2, {
|
|
2848
|
+
set: function(fn) {
|
|
2849
|
+
if (typeof fn === "function") {
|
|
2850
|
+
this[originalInstanceKey][prop2] = wrapWithCurrentZone(fn, className + "." + prop2);
|
|
2851
|
+
attachOriginToPatched(this[originalInstanceKey][prop2], fn);
|
|
2852
|
+
} else {
|
|
2853
|
+
this[originalInstanceKey][prop2] = fn;
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
get: function() {
|
|
2857
|
+
return this[originalInstanceKey][prop2];
|
|
2858
|
+
}
|
|
2859
|
+
});
|
|
2860
|
+
}
|
|
2861
|
+
})(prop);
|
|
2862
|
+
}
|
|
2863
|
+
for (prop in OriginalClass) {
|
|
2864
|
+
if (prop !== "prototype" && OriginalClass.hasOwnProperty(prop)) {
|
|
2865
|
+
_global[className][prop] = OriginalClass[prop];
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
function patchMethod(target, name, patchFn) {
|
|
2870
|
+
let proto = target;
|
|
2871
|
+
while (proto && !proto.hasOwnProperty(name)) {
|
|
2872
|
+
proto = ObjectGetPrototypeOf(proto);
|
|
2873
|
+
}
|
|
2874
|
+
if (!proto && target[name]) {
|
|
2875
|
+
proto = target;
|
|
2876
|
+
}
|
|
2877
|
+
const delegateName = zoneSymbol(name);
|
|
2878
|
+
let delegate = null;
|
|
2879
|
+
if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {
|
|
2880
|
+
delegate = proto[delegateName] = proto[name];
|
|
2881
|
+
const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
|
|
2882
|
+
if (isPropertyWritable(desc)) {
|
|
2883
|
+
const patchDelegate = patchFn(delegate, delegateName, name);
|
|
2884
|
+
proto[name] = function() {
|
|
2885
|
+
return patchDelegate(this, arguments);
|
|
2886
|
+
};
|
|
2887
|
+
attachOriginToPatched(proto[name], delegate);
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
return delegate;
|
|
2891
|
+
}
|
|
2892
|
+
function patchMacroTask(obj, funcName, metaCreator) {
|
|
2893
|
+
let setNative = null;
|
|
2894
|
+
function scheduleTask(task) {
|
|
2895
|
+
const data = task.data;
|
|
2896
|
+
data.args[data.cbIdx] = function() {
|
|
2897
|
+
task.invoke.apply(this, arguments);
|
|
2898
|
+
};
|
|
2899
|
+
setNative.apply(data.target, data.args);
|
|
2900
|
+
return task;
|
|
2901
|
+
}
|
|
2902
|
+
setNative = patchMethod(obj, funcName, (delegate) => function(self2, args) {
|
|
2903
|
+
const meta = metaCreator(self2, args);
|
|
2904
|
+
if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === "function") {
|
|
2905
|
+
return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);
|
|
2906
|
+
} else {
|
|
2907
|
+
return delegate.apply(self2, args);
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
}
|
|
2911
|
+
function attachOriginToPatched(patched, original) {
|
|
2912
|
+
patched[zoneSymbol("OriginalDelegate")] = original;
|
|
2913
|
+
}
|
|
2914
|
+
var isDetectedIEOrEdge = false;
|
|
2915
|
+
var ieOrEdge = false;
|
|
2916
|
+
function isIEOrEdge() {
|
|
2917
|
+
if (isDetectedIEOrEdge) {
|
|
2918
|
+
return ieOrEdge;
|
|
2919
|
+
}
|
|
2920
|
+
isDetectedIEOrEdge = true;
|
|
2921
|
+
try {
|
|
2922
|
+
const ua = internalWindow.navigator.userAgent;
|
|
2923
|
+
if (ua.indexOf("MSIE ") !== -1 || ua.indexOf("Trident/") !== -1 || ua.indexOf("Edge/") !== -1) {
|
|
2924
|
+
ieOrEdge = true;
|
|
2925
|
+
}
|
|
2926
|
+
} catch (error) {
|
|
2927
|
+
}
|
|
2928
|
+
return ieOrEdge;
|
|
2929
|
+
}
|
|
2930
|
+
function isFunction(value) {
|
|
2931
|
+
return typeof value === "function";
|
|
2932
|
+
}
|
|
2933
|
+
function isNumber(value) {
|
|
2934
|
+
return typeof value === "number";
|
|
2935
|
+
}
|
|
2936
|
+
var OPTIMIZED_ZONE_EVENT_TASK_DATA = {
|
|
2937
|
+
useG: true
|
|
2938
|
+
};
|
|
2939
|
+
var zoneSymbolEventNames = {};
|
|
2940
|
+
var globalSources = {};
|
|
2941
|
+
var EVENT_NAME_SYMBOL_REGX = new RegExp("^" + ZONE_SYMBOL_PREFIX + "(\\w+)(true|false)$");
|
|
2942
|
+
var IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol("propagationStopped");
|
|
2943
|
+
function prepareEventNames(eventName, eventNameToString) {
|
|
2944
|
+
const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;
|
|
2945
|
+
const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;
|
|
2946
|
+
const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
|
|
2947
|
+
const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
|
|
2948
|
+
zoneSymbolEventNames[eventName] = {};
|
|
2949
|
+
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
|
|
2950
|
+
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
|
|
2951
|
+
}
|
|
2952
|
+
function patchEventTarget(_global2, api, apis, patchOptions) {
|
|
2953
|
+
const ADD_EVENT_LISTENER = patchOptions && patchOptions.add || ADD_EVENT_LISTENER_STR;
|
|
2954
|
+
const REMOVE_EVENT_LISTENER = patchOptions && patchOptions.rm || REMOVE_EVENT_LISTENER_STR;
|
|
2955
|
+
const LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.listeners || "eventListeners";
|
|
2956
|
+
const REMOVE_ALL_LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.rmAll || "removeAllListeners";
|
|
2957
|
+
const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
|
|
2958
|
+
const ADD_EVENT_LISTENER_SOURCE = "." + ADD_EVENT_LISTENER + ":";
|
|
2959
|
+
const PREPEND_EVENT_LISTENER = "prependListener";
|
|
2960
|
+
const PREPEND_EVENT_LISTENER_SOURCE = "." + PREPEND_EVENT_LISTENER + ":";
|
|
2961
|
+
const invokeTask = function(task, target, event) {
|
|
2962
|
+
if (task.isRemoved) {
|
|
2963
|
+
return;
|
|
2964
|
+
}
|
|
2965
|
+
const delegate = task.callback;
|
|
2966
|
+
if (typeof delegate === "object" && delegate.handleEvent) {
|
|
2967
|
+
task.callback = (event2) => delegate.handleEvent(event2);
|
|
2968
|
+
task.originalDelegate = delegate;
|
|
2969
|
+
}
|
|
2970
|
+
let error;
|
|
2971
|
+
try {
|
|
2972
|
+
task.invoke(task, target, [event]);
|
|
2973
|
+
} catch (err) {
|
|
2974
|
+
error = err;
|
|
2975
|
+
}
|
|
2976
|
+
const options = task.options;
|
|
2977
|
+
if (options && typeof options === "object" && options.once) {
|
|
2978
|
+
const delegate2 = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
2979
|
+
target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate2, options);
|
|
2980
|
+
}
|
|
2981
|
+
return error;
|
|
2982
|
+
};
|
|
2983
|
+
function globalCallback(context, event, isCapture) {
|
|
2984
|
+
event = event || _global2.event;
|
|
2985
|
+
if (!event) {
|
|
2986
|
+
return;
|
|
2987
|
+
}
|
|
2988
|
+
const target = context || event.target || _global2;
|
|
2989
|
+
const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];
|
|
2990
|
+
if (tasks) {
|
|
2991
|
+
const errors = [];
|
|
2992
|
+
if (tasks.length === 1) {
|
|
2993
|
+
const err = invokeTask(tasks[0], target, event);
|
|
2994
|
+
err && errors.push(err);
|
|
2995
|
+
} else {
|
|
2996
|
+
const copyTasks = tasks.slice();
|
|
2997
|
+
for (let i = 0; i < copyTasks.length; i++) {
|
|
2998
|
+
if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
|
|
2999
|
+
break;
|
|
3000
|
+
}
|
|
3001
|
+
const err = invokeTask(copyTasks[i], target, event);
|
|
3002
|
+
err && errors.push(err);
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
if (errors.length === 1) {
|
|
3006
|
+
throw errors[0];
|
|
3007
|
+
} else {
|
|
3008
|
+
for (let i = 0; i < errors.length; i++) {
|
|
3009
|
+
const err = errors[i];
|
|
3010
|
+
api.nativeScheduleMicroTask(() => {
|
|
3011
|
+
throw err;
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
const globalZoneAwareCallback = function(event) {
|
|
3018
|
+
return globalCallback(this, event, false);
|
|
3019
|
+
};
|
|
3020
|
+
const globalZoneAwareCaptureCallback = function(event) {
|
|
3021
|
+
return globalCallback(this, event, true);
|
|
3022
|
+
};
|
|
3023
|
+
function patchEventTargetMethods(obj, patchOptions2) {
|
|
3024
|
+
if (!obj) {
|
|
3025
|
+
return false;
|
|
3026
|
+
}
|
|
3027
|
+
let useGlobalCallback = true;
|
|
3028
|
+
if (patchOptions2 && patchOptions2.useG !== void 0) {
|
|
3029
|
+
useGlobalCallback = patchOptions2.useG;
|
|
3030
|
+
}
|
|
3031
|
+
const validateHandler = patchOptions2 && patchOptions2.vh;
|
|
3032
|
+
let checkDuplicate = true;
|
|
3033
|
+
if (patchOptions2 && patchOptions2.chkDup !== void 0) {
|
|
3034
|
+
checkDuplicate = patchOptions2.chkDup;
|
|
3035
|
+
}
|
|
3036
|
+
let returnTarget = false;
|
|
3037
|
+
if (patchOptions2 && patchOptions2.rt !== void 0) {
|
|
3038
|
+
returnTarget = patchOptions2.rt;
|
|
3039
|
+
}
|
|
3040
|
+
let proto = obj;
|
|
3041
|
+
while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
|
|
3042
|
+
proto = ObjectGetPrototypeOf(proto);
|
|
3043
|
+
}
|
|
3044
|
+
if (!proto && obj[ADD_EVENT_LISTENER]) {
|
|
3045
|
+
proto = obj;
|
|
3046
|
+
}
|
|
3047
|
+
if (!proto) {
|
|
3048
|
+
return false;
|
|
3049
|
+
}
|
|
3050
|
+
if (proto[zoneSymbolAddEventListener]) {
|
|
3051
|
+
return false;
|
|
3052
|
+
}
|
|
3053
|
+
const eventNameToString = patchOptions2 && patchOptions2.eventNameToString;
|
|
3054
|
+
const taskData = {};
|
|
3055
|
+
const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];
|
|
3056
|
+
const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = proto[REMOVE_EVENT_LISTENER];
|
|
3057
|
+
const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = proto[LISTENERS_EVENT_LISTENER];
|
|
3058
|
+
const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];
|
|
3059
|
+
let nativePrependEventListener;
|
|
3060
|
+
if (patchOptions2 && patchOptions2.prepend) {
|
|
3061
|
+
nativePrependEventListener = proto[zoneSymbol(patchOptions2.prepend)] = proto[patchOptions2.prepend];
|
|
3062
|
+
}
|
|
3063
|
+
function buildEventListenerOptions(options, passive) {
|
|
3064
|
+
if (!passive) {
|
|
3065
|
+
return options;
|
|
3066
|
+
}
|
|
3067
|
+
if (typeof options === "boolean") {
|
|
3068
|
+
return { capture: options, passive: true };
|
|
3069
|
+
}
|
|
3070
|
+
if (!options) {
|
|
3071
|
+
return { passive: true };
|
|
3072
|
+
}
|
|
3073
|
+
if (typeof options === "object" && options.passive !== false) {
|
|
3074
|
+
return { ...options, passive: true };
|
|
3075
|
+
}
|
|
3076
|
+
return options;
|
|
3077
|
+
}
|
|
3078
|
+
const customScheduleGlobal = function(task) {
|
|
3079
|
+
if (taskData.isExisting) {
|
|
3080
|
+
return;
|
|
3081
|
+
}
|
|
3082
|
+
return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);
|
|
3083
|
+
};
|
|
3084
|
+
const customCancelGlobal = function(task) {
|
|
3085
|
+
if (!task.isRemoved) {
|
|
3086
|
+
const symbolEventNames = zoneSymbolEventNames[task.eventName];
|
|
3087
|
+
let symbolEventName;
|
|
3088
|
+
if (symbolEventNames) {
|
|
3089
|
+
symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
|
|
3090
|
+
}
|
|
3091
|
+
const existingTasks = symbolEventName && task.target[symbolEventName];
|
|
3092
|
+
if (existingTasks) {
|
|
3093
|
+
for (let i = 0; i < existingTasks.length; i++) {
|
|
3094
|
+
const existingTask = existingTasks[i];
|
|
3095
|
+
if (existingTask === task) {
|
|
3096
|
+
existingTasks.splice(i, 1);
|
|
3097
|
+
task.isRemoved = true;
|
|
3098
|
+
if (task.removeAbortListener) {
|
|
3099
|
+
task.removeAbortListener();
|
|
3100
|
+
task.removeAbortListener = null;
|
|
3101
|
+
}
|
|
3102
|
+
if (existingTasks.length === 0) {
|
|
3103
|
+
task.allRemoved = true;
|
|
3104
|
+
task.target[symbolEventName] = null;
|
|
3105
|
+
}
|
|
3106
|
+
break;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
if (!task.allRemoved) {
|
|
3112
|
+
return;
|
|
3113
|
+
}
|
|
3114
|
+
return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);
|
|
3115
|
+
};
|
|
3116
|
+
const customScheduleNonGlobal = function(task) {
|
|
3117
|
+
return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
|
|
3118
|
+
};
|
|
3119
|
+
const customSchedulePrepend = function(task) {
|
|
3120
|
+
return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
|
|
3121
|
+
};
|
|
3122
|
+
const customCancelNonGlobal = function(task) {
|
|
3123
|
+
return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);
|
|
3124
|
+
};
|
|
3125
|
+
const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;
|
|
3126
|
+
const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;
|
|
3127
|
+
const compareTaskCallbackVsDelegate = function(task, delegate) {
|
|
3128
|
+
const typeOfDelegate = typeof delegate;
|
|
3129
|
+
return typeOfDelegate === "function" && task.callback === delegate || typeOfDelegate === "object" && task.originalDelegate === delegate;
|
|
3130
|
+
};
|
|
3131
|
+
const compare = patchOptions2?.diff || compareTaskCallbackVsDelegate;
|
|
3132
|
+
const unpatchedEvents = Zone[zoneSymbol("UNPATCHED_EVENTS")];
|
|
3133
|
+
const passiveEvents = _global2[zoneSymbol("PASSIVE_EVENTS")];
|
|
3134
|
+
function copyEventListenerOptions(options) {
|
|
3135
|
+
if (typeof options === "object" && options !== null) {
|
|
3136
|
+
const newOptions = { ...options };
|
|
3137
|
+
if (options.signal) {
|
|
3138
|
+
newOptions.signal = options.signal;
|
|
3139
|
+
}
|
|
3140
|
+
return newOptions;
|
|
3141
|
+
}
|
|
3142
|
+
return options;
|
|
3143
|
+
}
|
|
3144
|
+
const makeAddListener = function(nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget2 = false, prepend = false) {
|
|
3145
|
+
return function() {
|
|
3146
|
+
const target = this || _global2;
|
|
3147
|
+
let eventName = arguments[0];
|
|
3148
|
+
if (patchOptions2 && patchOptions2.transferEventName) {
|
|
3149
|
+
eventName = patchOptions2.transferEventName(eventName);
|
|
3150
|
+
}
|
|
3151
|
+
let delegate = arguments[1];
|
|
3152
|
+
if (!delegate) {
|
|
3153
|
+
return nativeListener.apply(this, arguments);
|
|
3154
|
+
}
|
|
3155
|
+
if (isNode && eventName === "uncaughtException") {
|
|
3156
|
+
return nativeListener.apply(this, arguments);
|
|
3157
|
+
}
|
|
3158
|
+
let isEventListenerObject = false;
|
|
3159
|
+
if (typeof delegate !== "function") {
|
|
3160
|
+
if (!delegate.handleEvent) {
|
|
3161
|
+
return nativeListener.apply(this, arguments);
|
|
3162
|
+
}
|
|
3163
|
+
isEventListenerObject = true;
|
|
3164
|
+
}
|
|
3165
|
+
if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {
|
|
3166
|
+
return;
|
|
3167
|
+
}
|
|
3168
|
+
const passive = !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;
|
|
3169
|
+
const options = copyEventListenerOptions(buildEventListenerOptions(arguments[2], passive));
|
|
3170
|
+
const signal = options?.signal;
|
|
3171
|
+
if (signal?.aborted) {
|
|
3172
|
+
return;
|
|
3173
|
+
}
|
|
3174
|
+
if (unpatchedEvents) {
|
|
3175
|
+
for (let i = 0; i < unpatchedEvents.length; i++) {
|
|
3176
|
+
if (eventName === unpatchedEvents[i]) {
|
|
3177
|
+
if (passive) {
|
|
3178
|
+
return nativeListener.call(target, eventName, delegate, options);
|
|
3179
|
+
} else {
|
|
3180
|
+
return nativeListener.apply(this, arguments);
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
const capture = !options ? false : typeof options === "boolean" ? true : options.capture;
|
|
3186
|
+
const once = options && typeof options === "object" ? options.once : false;
|
|
3187
|
+
const zone = Zone.current;
|
|
3188
|
+
let symbolEventNames = zoneSymbolEventNames[eventName];
|
|
3189
|
+
if (!symbolEventNames) {
|
|
3190
|
+
prepareEventNames(eventName, eventNameToString);
|
|
3191
|
+
symbolEventNames = zoneSymbolEventNames[eventName];
|
|
3192
|
+
}
|
|
3193
|
+
const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
|
|
3194
|
+
let existingTasks = target[symbolEventName];
|
|
3195
|
+
let isExisting = false;
|
|
3196
|
+
if (existingTasks) {
|
|
3197
|
+
isExisting = true;
|
|
3198
|
+
if (checkDuplicate) {
|
|
3199
|
+
for (let i = 0; i < existingTasks.length; i++) {
|
|
3200
|
+
if (compare(existingTasks[i], delegate)) {
|
|
3201
|
+
return;
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
} else {
|
|
3206
|
+
existingTasks = target[symbolEventName] = [];
|
|
3207
|
+
}
|
|
3208
|
+
let source;
|
|
3209
|
+
const constructorName = target.constructor["name"];
|
|
3210
|
+
const targetSource = globalSources[constructorName];
|
|
3211
|
+
if (targetSource) {
|
|
3212
|
+
source = targetSource[eventName];
|
|
3213
|
+
}
|
|
3214
|
+
if (!source) {
|
|
3215
|
+
source = constructorName + addSource + (eventNameToString ? eventNameToString(eventName) : eventName);
|
|
3216
|
+
}
|
|
3217
|
+
taskData.options = options;
|
|
3218
|
+
if (once) {
|
|
3219
|
+
taskData.options.once = false;
|
|
3220
|
+
}
|
|
3221
|
+
taskData.target = target;
|
|
3222
|
+
taskData.capture = capture;
|
|
3223
|
+
taskData.eventName = eventName;
|
|
3224
|
+
taskData.isExisting = isExisting;
|
|
3225
|
+
const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : void 0;
|
|
3226
|
+
if (data) {
|
|
3227
|
+
data.taskData = taskData;
|
|
3228
|
+
}
|
|
3229
|
+
if (signal) {
|
|
3230
|
+
taskData.options.signal = void 0;
|
|
3231
|
+
}
|
|
3232
|
+
const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);
|
|
3233
|
+
if (signal) {
|
|
3234
|
+
taskData.options.signal = signal;
|
|
3235
|
+
const onAbort = () => task.zone.cancelTask(task);
|
|
3236
|
+
nativeListener.call(signal, "abort", onAbort, { once: true });
|
|
3237
|
+
task.removeAbortListener = () => signal.removeEventListener("abort", onAbort);
|
|
3238
|
+
}
|
|
3239
|
+
taskData.target = null;
|
|
3240
|
+
if (data) {
|
|
3241
|
+
data.taskData = null;
|
|
3242
|
+
}
|
|
3243
|
+
if (once) {
|
|
3244
|
+
taskData.options.once = true;
|
|
3245
|
+
}
|
|
3246
|
+
if (typeof task.options !== "boolean") {
|
|
3247
|
+
task.options = options;
|
|
3248
|
+
}
|
|
3249
|
+
task.target = target;
|
|
3250
|
+
task.capture = capture;
|
|
3251
|
+
task.eventName = eventName;
|
|
3252
|
+
if (isEventListenerObject) {
|
|
3253
|
+
task.originalDelegate = delegate;
|
|
3254
|
+
}
|
|
3255
|
+
if (!prepend) {
|
|
3256
|
+
existingTasks.push(task);
|
|
3257
|
+
} else {
|
|
3258
|
+
existingTasks.unshift(task);
|
|
3259
|
+
}
|
|
3260
|
+
if (returnTarget2) {
|
|
3261
|
+
return target;
|
|
3262
|
+
}
|
|
3263
|
+
};
|
|
3264
|
+
};
|
|
3265
|
+
proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);
|
|
3266
|
+
if (nativePrependEventListener) {
|
|
3267
|
+
proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);
|
|
3268
|
+
}
|
|
3269
|
+
proto[REMOVE_EVENT_LISTENER] = function() {
|
|
3270
|
+
const target = this || _global2;
|
|
3271
|
+
let eventName = arguments[0];
|
|
3272
|
+
if (patchOptions2 && patchOptions2.transferEventName) {
|
|
3273
|
+
eventName = patchOptions2.transferEventName(eventName);
|
|
3274
|
+
}
|
|
3275
|
+
const options = arguments[2];
|
|
3276
|
+
const capture = !options ? false : typeof options === "boolean" ? true : options.capture;
|
|
3277
|
+
const delegate = arguments[1];
|
|
3278
|
+
if (!delegate) {
|
|
3279
|
+
return nativeRemoveEventListener.apply(this, arguments);
|
|
3280
|
+
}
|
|
3281
|
+
if (validateHandler && !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {
|
|
3282
|
+
return;
|
|
3283
|
+
}
|
|
3284
|
+
const symbolEventNames = zoneSymbolEventNames[eventName];
|
|
3285
|
+
let symbolEventName;
|
|
3286
|
+
if (symbolEventNames) {
|
|
3287
|
+
symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
|
|
3288
|
+
}
|
|
3289
|
+
const existingTasks = symbolEventName && target[symbolEventName];
|
|
3290
|
+
if (existingTasks) {
|
|
3291
|
+
for (let i = 0; i < existingTasks.length; i++) {
|
|
3292
|
+
const existingTask = existingTasks[i];
|
|
3293
|
+
if (compare(existingTask, delegate)) {
|
|
3294
|
+
existingTasks.splice(i, 1);
|
|
3295
|
+
existingTask.isRemoved = true;
|
|
3296
|
+
if (existingTasks.length === 0) {
|
|
3297
|
+
existingTask.allRemoved = true;
|
|
3298
|
+
target[symbolEventName] = null;
|
|
3299
|
+
if (!capture && typeof eventName === "string") {
|
|
3300
|
+
const onPropertySymbol = ZONE_SYMBOL_PREFIX + "ON_PROPERTY" + eventName;
|
|
3301
|
+
target[onPropertySymbol] = null;
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
existingTask.zone.cancelTask(existingTask);
|
|
3305
|
+
if (returnTarget) {
|
|
3306
|
+
return target;
|
|
3307
|
+
}
|
|
3308
|
+
return;
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
return nativeRemoveEventListener.apply(this, arguments);
|
|
3313
|
+
};
|
|
3314
|
+
proto[LISTENERS_EVENT_LISTENER] = function() {
|
|
3315
|
+
const target = this || _global2;
|
|
3316
|
+
let eventName = arguments[0];
|
|
3317
|
+
if (patchOptions2 && patchOptions2.transferEventName) {
|
|
3318
|
+
eventName = patchOptions2.transferEventName(eventName);
|
|
3319
|
+
}
|
|
3320
|
+
const listeners = [];
|
|
3321
|
+
const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);
|
|
3322
|
+
for (let i = 0; i < tasks.length; i++) {
|
|
3323
|
+
const task = tasks[i];
|
|
3324
|
+
let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
3325
|
+
listeners.push(delegate);
|
|
3326
|
+
}
|
|
3327
|
+
return listeners;
|
|
3328
|
+
};
|
|
3329
|
+
proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function() {
|
|
3330
|
+
const target = this || _global2;
|
|
3331
|
+
let eventName = arguments[0];
|
|
3332
|
+
if (!eventName) {
|
|
3333
|
+
const keys = Object.keys(target);
|
|
3334
|
+
for (let i = 0; i < keys.length; i++) {
|
|
3335
|
+
const prop = keys[i];
|
|
3336
|
+
const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
|
|
3337
|
+
let evtName = match && match[1];
|
|
3338
|
+
if (evtName && evtName !== "removeListener") {
|
|
3339
|
+
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, "removeListener");
|
|
3343
|
+
} else {
|
|
3344
|
+
if (patchOptions2 && patchOptions2.transferEventName) {
|
|
3345
|
+
eventName = patchOptions2.transferEventName(eventName);
|
|
3346
|
+
}
|
|
3347
|
+
const symbolEventNames = zoneSymbolEventNames[eventName];
|
|
3348
|
+
if (symbolEventNames) {
|
|
3349
|
+
const symbolEventName = symbolEventNames[FALSE_STR];
|
|
3350
|
+
const symbolCaptureEventName = symbolEventNames[TRUE_STR];
|
|
3351
|
+
const tasks = target[symbolEventName];
|
|
3352
|
+
const captureTasks = target[symbolCaptureEventName];
|
|
3353
|
+
if (tasks) {
|
|
3354
|
+
const removeTasks = tasks.slice();
|
|
3355
|
+
for (let i = 0; i < removeTasks.length; i++) {
|
|
3356
|
+
const task = removeTasks[i];
|
|
3357
|
+
let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
3358
|
+
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
if (captureTasks) {
|
|
3362
|
+
const removeTasks = captureTasks.slice();
|
|
3363
|
+
for (let i = 0; i < removeTasks.length; i++) {
|
|
3364
|
+
const task = removeTasks[i];
|
|
3365
|
+
let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
3366
|
+
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
if (returnTarget) {
|
|
3372
|
+
return this;
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);
|
|
3376
|
+
attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);
|
|
3377
|
+
if (nativeRemoveAllListeners) {
|
|
3378
|
+
attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);
|
|
3379
|
+
}
|
|
3380
|
+
if (nativeListeners) {
|
|
3381
|
+
attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);
|
|
3382
|
+
}
|
|
3383
|
+
return true;
|
|
3384
|
+
}
|
|
3385
|
+
let results = [];
|
|
3386
|
+
for (let i = 0; i < apis.length; i++) {
|
|
3387
|
+
results[i] = patchEventTargetMethods(apis[i], patchOptions);
|
|
3388
|
+
}
|
|
3389
|
+
return results;
|
|
3390
|
+
}
|
|
3391
|
+
function findEventTasks(target, eventName) {
|
|
3392
|
+
if (!eventName) {
|
|
3393
|
+
const foundTasks = [];
|
|
3394
|
+
for (let prop in target) {
|
|
3395
|
+
const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
|
|
3396
|
+
let evtName = match && match[1];
|
|
3397
|
+
if (evtName && (!eventName || evtName === eventName)) {
|
|
3398
|
+
const tasks = target[prop];
|
|
3399
|
+
if (tasks) {
|
|
3400
|
+
for (let i = 0; i < tasks.length; i++) {
|
|
3401
|
+
foundTasks.push(tasks[i]);
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
return foundTasks;
|
|
3407
|
+
}
|
|
3408
|
+
let symbolEventName = zoneSymbolEventNames[eventName];
|
|
3409
|
+
if (!symbolEventName) {
|
|
3410
|
+
prepareEventNames(eventName);
|
|
3411
|
+
symbolEventName = zoneSymbolEventNames[eventName];
|
|
3412
|
+
}
|
|
3413
|
+
const captureFalseTasks = target[symbolEventName[FALSE_STR]];
|
|
3414
|
+
const captureTrueTasks = target[symbolEventName[TRUE_STR]];
|
|
3415
|
+
if (!captureFalseTasks) {
|
|
3416
|
+
return captureTrueTasks ? captureTrueTasks.slice() : [];
|
|
3417
|
+
} else {
|
|
3418
|
+
return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : captureFalseTasks.slice();
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
function patchEventPrototype(global3, api) {
|
|
3422
|
+
const Event = global3["Event"];
|
|
3423
|
+
if (Event && Event.prototype) {
|
|
3424
|
+
api.patchMethod(Event.prototype, "stopImmediatePropagation", (delegate) => function(self2, args) {
|
|
3425
|
+
self2[IMMEDIATE_PROPAGATION_SYMBOL] = true;
|
|
3426
|
+
delegate && delegate.apply(self2, args);
|
|
3427
|
+
});
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
function patchQueueMicrotask(global3, api) {
|
|
3431
|
+
api.patchMethod(global3, "queueMicrotask", (delegate) => {
|
|
3432
|
+
return function(self2, args) {
|
|
3433
|
+
Zone.current.scheduleMicroTask("queueMicrotask", args[0]);
|
|
3434
|
+
};
|
|
3435
|
+
});
|
|
3436
|
+
}
|
|
3437
|
+
var taskSymbol = zoneSymbol("zoneTask");
|
|
3438
|
+
function patchTimer(window2, setName, cancelName, nameSuffix) {
|
|
3439
|
+
let setNative = null;
|
|
3440
|
+
let clearNative = null;
|
|
3441
|
+
setName += nameSuffix;
|
|
3442
|
+
cancelName += nameSuffix;
|
|
3443
|
+
const tasksByHandleId = {};
|
|
3444
|
+
function scheduleTask(task) {
|
|
3445
|
+
const data = task.data;
|
|
3446
|
+
data.args[0] = function() {
|
|
3447
|
+
return task.invoke.apply(this, arguments);
|
|
3448
|
+
};
|
|
3449
|
+
const handleOrId = setNative.apply(window2, data.args);
|
|
3450
|
+
if (isNumber(handleOrId)) {
|
|
3451
|
+
data.handleId = handleOrId;
|
|
3452
|
+
} else {
|
|
3453
|
+
data.handle = handleOrId;
|
|
3454
|
+
data.isRefreshable = isFunction(handleOrId.refresh);
|
|
3455
|
+
}
|
|
3456
|
+
return task;
|
|
3457
|
+
}
|
|
3458
|
+
function clearTask(task) {
|
|
3459
|
+
const { handle, handleId } = task.data;
|
|
3460
|
+
return clearNative.call(window2, handle ?? handleId);
|
|
3461
|
+
}
|
|
3462
|
+
setNative = patchMethod(window2, setName, (delegate) => function(self2, args) {
|
|
3463
|
+
if (isFunction(args[0])) {
|
|
3464
|
+
const options = {
|
|
3465
|
+
isRefreshable: false,
|
|
3466
|
+
isPeriodic: nameSuffix === "Interval",
|
|
3467
|
+
delay: nameSuffix === "Timeout" || nameSuffix === "Interval" ? args[1] || 0 : void 0,
|
|
3468
|
+
args
|
|
3469
|
+
};
|
|
3470
|
+
const callback = args[0];
|
|
3471
|
+
args[0] = function timer() {
|
|
3472
|
+
try {
|
|
3473
|
+
return callback.apply(this, arguments);
|
|
3474
|
+
} finally {
|
|
3475
|
+
const { handle: handle2, handleId: handleId2, isPeriodic: isPeriodic2, isRefreshable: isRefreshable2 } = options;
|
|
3476
|
+
if (!isPeriodic2 && !isRefreshable2) {
|
|
3477
|
+
if (handleId2) {
|
|
3478
|
+
delete tasksByHandleId[handleId2];
|
|
3479
|
+
} else if (handle2) {
|
|
3480
|
+
handle2[taskSymbol] = null;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
};
|
|
3485
|
+
const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);
|
|
3486
|
+
if (!task) {
|
|
3487
|
+
return task;
|
|
3488
|
+
}
|
|
3489
|
+
const { handleId, handle, isRefreshable, isPeriodic } = task.data;
|
|
3490
|
+
if (handleId) {
|
|
3491
|
+
tasksByHandleId[handleId] = task;
|
|
3492
|
+
} else if (handle) {
|
|
3493
|
+
handle[taskSymbol] = task;
|
|
3494
|
+
if (isRefreshable && !isPeriodic) {
|
|
3495
|
+
const originalRefresh = handle.refresh;
|
|
3496
|
+
handle.refresh = function() {
|
|
3497
|
+
const { zone, state } = task;
|
|
3498
|
+
if (state === "notScheduled") {
|
|
3499
|
+
task._state = "scheduled";
|
|
3500
|
+
zone._updateTaskCount(task, 1);
|
|
3501
|
+
} else if (state === "running") {
|
|
3502
|
+
task._state = "scheduling";
|
|
3503
|
+
}
|
|
3504
|
+
return originalRefresh.call(this);
|
|
3505
|
+
};
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
return handle ?? handleId ?? task;
|
|
3509
|
+
} else {
|
|
3510
|
+
return delegate.apply(window2, args);
|
|
3511
|
+
}
|
|
3512
|
+
});
|
|
3513
|
+
clearNative = patchMethod(window2, cancelName, (delegate) => function(self2, args) {
|
|
3514
|
+
const id = args[0];
|
|
3515
|
+
let task;
|
|
3516
|
+
if (isNumber(id)) {
|
|
3517
|
+
task = tasksByHandleId[id];
|
|
3518
|
+
delete tasksByHandleId[id];
|
|
3519
|
+
} else {
|
|
3520
|
+
task = id?.[taskSymbol];
|
|
3521
|
+
if (task) {
|
|
3522
|
+
id[taskSymbol] = null;
|
|
3523
|
+
} else {
|
|
3524
|
+
task = id;
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3527
|
+
if (task?.type) {
|
|
3528
|
+
if (task.cancelFn) {
|
|
3529
|
+
task.zone.cancelTask(task);
|
|
3530
|
+
}
|
|
3531
|
+
} else {
|
|
3532
|
+
delegate.apply(window2, args);
|
|
3533
|
+
}
|
|
3534
|
+
});
|
|
3535
|
+
}
|
|
3536
|
+
function patchCustomElements(_global2, api) {
|
|
3537
|
+
const { isBrowser: isBrowser2, isMix: isMix2 } = api.getGlobalObjects();
|
|
3538
|
+
if (!isBrowser2 && !isMix2 || !_global2["customElements"] || !("customElements" in _global2)) {
|
|
3539
|
+
return;
|
|
3540
|
+
}
|
|
3541
|
+
const callbacks = [
|
|
3542
|
+
"connectedCallback",
|
|
3543
|
+
"disconnectedCallback",
|
|
3544
|
+
"adoptedCallback",
|
|
3545
|
+
"attributeChangedCallback",
|
|
3546
|
+
"formAssociatedCallback",
|
|
3547
|
+
"formDisabledCallback",
|
|
3548
|
+
"formResetCallback",
|
|
3549
|
+
"formStateRestoreCallback"
|
|
3550
|
+
];
|
|
3551
|
+
api.patchCallbacks(api, _global2.customElements, "customElements", "define", callbacks);
|
|
3552
|
+
}
|
|
3553
|
+
function eventTargetPatch(_global2, api) {
|
|
3554
|
+
if (Zone[api.symbol("patchEventTarget")]) {
|
|
3555
|
+
return;
|
|
3556
|
+
}
|
|
3557
|
+
const { eventNames, zoneSymbolEventNames: zoneSymbolEventNames2, TRUE_STR: TRUE_STR2, FALSE_STR: FALSE_STR2, ZONE_SYMBOL_PREFIX: ZONE_SYMBOL_PREFIX2 } = api.getGlobalObjects();
|
|
3558
|
+
for (let i = 0; i < eventNames.length; i++) {
|
|
3559
|
+
const eventName = eventNames[i];
|
|
3560
|
+
const falseEventName = eventName + FALSE_STR2;
|
|
3561
|
+
const trueEventName = eventName + TRUE_STR2;
|
|
3562
|
+
const symbol = ZONE_SYMBOL_PREFIX2 + falseEventName;
|
|
3563
|
+
const symbolCapture = ZONE_SYMBOL_PREFIX2 + trueEventName;
|
|
3564
|
+
zoneSymbolEventNames2[eventName] = {};
|
|
3565
|
+
zoneSymbolEventNames2[eventName][FALSE_STR2] = symbol;
|
|
3566
|
+
zoneSymbolEventNames2[eventName][TRUE_STR2] = symbolCapture;
|
|
3567
|
+
}
|
|
3568
|
+
const EVENT_TARGET = _global2["EventTarget"];
|
|
3569
|
+
if (!EVENT_TARGET || !EVENT_TARGET.prototype) {
|
|
3570
|
+
return;
|
|
3571
|
+
}
|
|
3572
|
+
api.patchEventTarget(_global2, api, [EVENT_TARGET && EVENT_TARGET.prototype]);
|
|
3573
|
+
return true;
|
|
3574
|
+
}
|
|
3575
|
+
function patchEvent(global3, api) {
|
|
3576
|
+
api.patchEventPrototype(global3, api);
|
|
3577
|
+
}
|
|
3578
|
+
function filterProperties(target, onProperties, ignoreProperties) {
|
|
3579
|
+
if (!ignoreProperties || ignoreProperties.length === 0) {
|
|
3580
|
+
return onProperties;
|
|
3581
|
+
}
|
|
3582
|
+
const tip = ignoreProperties.filter((ip) => ip.target === target);
|
|
3583
|
+
if (tip.length === 0) {
|
|
3584
|
+
return onProperties;
|
|
3585
|
+
}
|
|
3586
|
+
const targetIgnoreProperties = tip[0].ignoreProperties;
|
|
3587
|
+
return onProperties.filter((op) => targetIgnoreProperties.indexOf(op) === -1);
|
|
3588
|
+
}
|
|
3589
|
+
function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {
|
|
3590
|
+
if (!target) {
|
|
3591
|
+
return;
|
|
3592
|
+
}
|
|
3593
|
+
const filteredProperties = filterProperties(target, onProperties, ignoreProperties);
|
|
3594
|
+
patchOnProperties(target, filteredProperties, prototype);
|
|
3595
|
+
}
|
|
3596
|
+
function getOnEventNames(target) {
|
|
3597
|
+
return Object.getOwnPropertyNames(target).filter((name) => name.startsWith("on") && name.length > 2).map((name) => name.substring(2));
|
|
3598
|
+
}
|
|
3599
|
+
function propertyDescriptorPatch(api, _global2) {
|
|
3600
|
+
if (isNode && !isMix) {
|
|
3601
|
+
return;
|
|
3602
|
+
}
|
|
3603
|
+
if (Zone[api.symbol("patchEvents")]) {
|
|
3604
|
+
return;
|
|
3605
|
+
}
|
|
3606
|
+
const ignoreProperties = _global2["__Zone_ignore_on_properties"];
|
|
3607
|
+
let patchTargets = [];
|
|
3608
|
+
if (isBrowser) {
|
|
3609
|
+
const internalWindow2 = window;
|
|
3610
|
+
patchTargets = patchTargets.concat([
|
|
3611
|
+
"Document",
|
|
3612
|
+
"SVGElement",
|
|
3613
|
+
"Element",
|
|
3614
|
+
"HTMLElement",
|
|
3615
|
+
"HTMLBodyElement",
|
|
3616
|
+
"HTMLMediaElement",
|
|
3617
|
+
"HTMLFrameSetElement",
|
|
3618
|
+
"HTMLFrameElement",
|
|
3619
|
+
"HTMLIFrameElement",
|
|
3620
|
+
"HTMLMarqueeElement",
|
|
3621
|
+
"Worker"
|
|
3622
|
+
]);
|
|
3623
|
+
const ignoreErrorProperties = [];
|
|
3624
|
+
patchFilteredProperties(internalWindow2, getOnEventNames(internalWindow2), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow2));
|
|
3625
|
+
}
|
|
3626
|
+
patchTargets = patchTargets.concat([
|
|
3627
|
+
"XMLHttpRequest",
|
|
3628
|
+
"XMLHttpRequestEventTarget",
|
|
3629
|
+
"IDBIndex",
|
|
3630
|
+
"IDBRequest",
|
|
3631
|
+
"IDBOpenDBRequest",
|
|
3632
|
+
"IDBDatabase",
|
|
3633
|
+
"IDBTransaction",
|
|
3634
|
+
"IDBCursor",
|
|
3635
|
+
"WebSocket"
|
|
3636
|
+
]);
|
|
3637
|
+
for (let i = 0; i < patchTargets.length; i++) {
|
|
3638
|
+
const target = _global2[patchTargets[i]];
|
|
3639
|
+
target?.prototype && patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
function patchBrowser(Zone2) {
|
|
3643
|
+
Zone2.__load_patch("legacy", (global3) => {
|
|
3644
|
+
const legacyPatch = global3[Zone2.__symbol__("legacyPatch")];
|
|
3645
|
+
if (legacyPatch) {
|
|
3646
|
+
legacyPatch();
|
|
3647
|
+
}
|
|
3648
|
+
});
|
|
3649
|
+
Zone2.__load_patch("timers", (global3) => {
|
|
3650
|
+
const set = "set";
|
|
3651
|
+
const clear = "clear";
|
|
3652
|
+
patchTimer(global3, set, clear, "Timeout");
|
|
3653
|
+
patchTimer(global3, set, clear, "Interval");
|
|
3654
|
+
patchTimer(global3, set, clear, "Immediate");
|
|
3655
|
+
});
|
|
3656
|
+
Zone2.__load_patch("requestAnimationFrame", (global3) => {
|
|
3657
|
+
patchTimer(global3, "request", "cancel", "AnimationFrame");
|
|
3658
|
+
patchTimer(global3, "mozRequest", "mozCancel", "AnimationFrame");
|
|
3659
|
+
patchTimer(global3, "webkitRequest", "webkitCancel", "AnimationFrame");
|
|
3660
|
+
});
|
|
3661
|
+
Zone2.__load_patch("blocking", (global3, Zone3) => {
|
|
3662
|
+
const blockingMethods = ["alert", "prompt", "confirm"];
|
|
3663
|
+
for (let i = 0; i < blockingMethods.length; i++) {
|
|
3664
|
+
const name = blockingMethods[i];
|
|
3665
|
+
patchMethod(global3, name, (delegate, symbol, name2) => {
|
|
3666
|
+
return function(s, args) {
|
|
3667
|
+
return Zone3.current.run(delegate, global3, args, name2);
|
|
3668
|
+
};
|
|
3669
|
+
});
|
|
3670
|
+
}
|
|
3671
|
+
});
|
|
3672
|
+
Zone2.__load_patch("EventTarget", (global3, Zone3, api) => {
|
|
3673
|
+
patchEvent(global3, api);
|
|
3674
|
+
eventTargetPatch(global3, api);
|
|
3675
|
+
const XMLHttpRequestEventTarget = global3["XMLHttpRequestEventTarget"];
|
|
3676
|
+
if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {
|
|
3677
|
+
api.patchEventTarget(global3, api, [XMLHttpRequestEventTarget.prototype]);
|
|
3678
|
+
}
|
|
3679
|
+
});
|
|
3680
|
+
Zone2.__load_patch("MutationObserver", (global3, Zone3, api) => {
|
|
3681
|
+
patchClass("MutationObserver");
|
|
3682
|
+
patchClass("WebKitMutationObserver");
|
|
3683
|
+
});
|
|
3684
|
+
Zone2.__load_patch("IntersectionObserver", (global3, Zone3, api) => {
|
|
3685
|
+
patchClass("IntersectionObserver");
|
|
3686
|
+
});
|
|
3687
|
+
Zone2.__load_patch("FileReader", (global3, Zone3, api) => {
|
|
3688
|
+
patchClass("FileReader");
|
|
3689
|
+
});
|
|
3690
|
+
Zone2.__load_patch("on_property", (global3, Zone3, api) => {
|
|
3691
|
+
propertyDescriptorPatch(api, global3);
|
|
3692
|
+
});
|
|
3693
|
+
Zone2.__load_patch("customElements", (global3, Zone3, api) => {
|
|
3694
|
+
patchCustomElements(global3, api);
|
|
3695
|
+
});
|
|
3696
|
+
Zone2.__load_patch("XHR", (global3, Zone3) => {
|
|
3697
|
+
patchXHR(global3);
|
|
3698
|
+
const XHR_TASK = zoneSymbol("xhrTask");
|
|
3699
|
+
const XHR_SYNC = zoneSymbol("xhrSync");
|
|
3700
|
+
const XHR_LISTENER = zoneSymbol("xhrListener");
|
|
3701
|
+
const XHR_SCHEDULED = zoneSymbol("xhrScheduled");
|
|
3702
|
+
const XHR_URL = zoneSymbol("xhrURL");
|
|
3703
|
+
const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol("xhrErrorBeforeScheduled");
|
|
3704
|
+
function patchXHR(window2) {
|
|
3705
|
+
const XMLHttpRequest = window2["XMLHttpRequest"];
|
|
3706
|
+
if (!XMLHttpRequest) {
|
|
3707
|
+
return;
|
|
3708
|
+
}
|
|
3709
|
+
const XMLHttpRequestPrototype = XMLHttpRequest.prototype;
|
|
3710
|
+
function findPendingTask(target) {
|
|
3711
|
+
return target[XHR_TASK];
|
|
3712
|
+
}
|
|
3713
|
+
let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
3714
|
+
let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
3715
|
+
if (!oriAddListener) {
|
|
3716
|
+
const XMLHttpRequestEventTarget = window2["XMLHttpRequestEventTarget"];
|
|
3717
|
+
if (XMLHttpRequestEventTarget) {
|
|
3718
|
+
const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;
|
|
3719
|
+
oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
3720
|
+
oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
const READY_STATE_CHANGE = "readystatechange";
|
|
3724
|
+
const SCHEDULED = "scheduled";
|
|
3725
|
+
function scheduleTask(task) {
|
|
3726
|
+
const data = task.data;
|
|
3727
|
+
const target = data.target;
|
|
3728
|
+
target[XHR_SCHEDULED] = false;
|
|
3729
|
+
target[XHR_ERROR_BEFORE_SCHEDULED] = false;
|
|
3730
|
+
const listener = target[XHR_LISTENER];
|
|
3731
|
+
if (!oriAddListener) {
|
|
3732
|
+
oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
3733
|
+
oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
3734
|
+
}
|
|
3735
|
+
if (listener) {
|
|
3736
|
+
oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
|
|
3737
|
+
}
|
|
3738
|
+
const newListener = target[XHR_LISTENER] = () => {
|
|
3739
|
+
if (target.readyState === target.DONE) {
|
|
3740
|
+
if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {
|
|
3741
|
+
const loadTasks = target[Zone3.__symbol__("loadfalse")];
|
|
3742
|
+
if (target.status !== 0 && loadTasks && loadTasks.length > 0) {
|
|
3743
|
+
const oriInvoke = task.invoke;
|
|
3744
|
+
task.invoke = function() {
|
|
3745
|
+
const loadTasks2 = target[Zone3.__symbol__("loadfalse")];
|
|
3746
|
+
for (let i = 0; i < loadTasks2.length; i++) {
|
|
3747
|
+
if (loadTasks2[i] === task) {
|
|
3748
|
+
loadTasks2.splice(i, 1);
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
if (!data.aborted && task.state === SCHEDULED) {
|
|
3752
|
+
oriInvoke.call(task);
|
|
3753
|
+
}
|
|
3754
|
+
};
|
|
3755
|
+
loadTasks.push(task);
|
|
3756
|
+
} else {
|
|
3757
|
+
task.invoke();
|
|
3758
|
+
}
|
|
3759
|
+
} else if (!data.aborted && target[XHR_SCHEDULED] === false) {
|
|
3760
|
+
target[XHR_ERROR_BEFORE_SCHEDULED] = true;
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
};
|
|
3764
|
+
oriAddListener.call(target, READY_STATE_CHANGE, newListener);
|
|
3765
|
+
const storedTask = target[XHR_TASK];
|
|
3766
|
+
if (!storedTask) {
|
|
3767
|
+
target[XHR_TASK] = task;
|
|
3768
|
+
}
|
|
3769
|
+
sendNative.apply(target, data.args);
|
|
3770
|
+
target[XHR_SCHEDULED] = true;
|
|
3771
|
+
return task;
|
|
3772
|
+
}
|
|
3773
|
+
function placeholderCallback() {
|
|
3774
|
+
}
|
|
3775
|
+
function clearTask(task) {
|
|
3776
|
+
const data = task.data;
|
|
3777
|
+
data.aborted = true;
|
|
3778
|
+
return abortNative.apply(data.target, data.args);
|
|
3779
|
+
}
|
|
3780
|
+
const openNative = patchMethod(XMLHttpRequestPrototype, "open", () => function(self2, args) {
|
|
3781
|
+
self2[XHR_SYNC] = args[2] == false;
|
|
3782
|
+
self2[XHR_URL] = args[1];
|
|
3783
|
+
return openNative.apply(self2, args);
|
|
3784
|
+
});
|
|
3785
|
+
const XMLHTTPREQUEST_SOURCE = "XMLHttpRequest.send";
|
|
3786
|
+
const fetchTaskAborting = zoneSymbol("fetchTaskAborting");
|
|
3787
|
+
const fetchTaskScheduling = zoneSymbol("fetchTaskScheduling");
|
|
3788
|
+
const sendNative = patchMethod(XMLHttpRequestPrototype, "send", () => function(self2, args) {
|
|
3789
|
+
if (Zone3.current[fetchTaskScheduling] === true) {
|
|
3790
|
+
return sendNative.apply(self2, args);
|
|
3791
|
+
}
|
|
3792
|
+
if (self2[XHR_SYNC]) {
|
|
3793
|
+
return sendNative.apply(self2, args);
|
|
3794
|
+
} else {
|
|
3795
|
+
const options = {
|
|
3796
|
+
target: self2,
|
|
3797
|
+
url: self2[XHR_URL],
|
|
3798
|
+
isPeriodic: false,
|
|
3799
|
+
args,
|
|
3800
|
+
aborted: false
|
|
3801
|
+
};
|
|
3802
|
+
const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);
|
|
3803
|
+
if (self2 && self2[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && task.state === SCHEDULED) {
|
|
3804
|
+
task.invoke();
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
});
|
|
3808
|
+
const abortNative = patchMethod(XMLHttpRequestPrototype, "abort", () => function(self2, args) {
|
|
3809
|
+
const task = findPendingTask(self2);
|
|
3810
|
+
if (task && typeof task.type == "string") {
|
|
3811
|
+
if (task.cancelFn == null || task.data && task.data.aborted) {
|
|
3812
|
+
return;
|
|
3813
|
+
}
|
|
3814
|
+
task.zone.cancelTask(task);
|
|
3815
|
+
} else if (Zone3.current[fetchTaskAborting] === true) {
|
|
3816
|
+
return abortNative.apply(self2, args);
|
|
3817
|
+
}
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
});
|
|
3821
|
+
Zone2.__load_patch("geolocation", (global3) => {
|
|
3822
|
+
if (global3["navigator"] && global3["navigator"].geolocation) {
|
|
3823
|
+
patchPrototype(global3["navigator"].geolocation, ["getCurrentPosition", "watchPosition"]);
|
|
3824
|
+
}
|
|
3825
|
+
});
|
|
3826
|
+
Zone2.__load_patch("PromiseRejectionEvent", (global3, Zone3) => {
|
|
3827
|
+
function findPromiseRejectionHandler(evtName) {
|
|
3828
|
+
return function(e) {
|
|
3829
|
+
const eventTasks = findEventTasks(global3, evtName);
|
|
3830
|
+
eventTasks.forEach((eventTask) => {
|
|
3831
|
+
const PromiseRejectionEvent = global3["PromiseRejectionEvent"];
|
|
3832
|
+
if (PromiseRejectionEvent) {
|
|
3833
|
+
const evt = new PromiseRejectionEvent(evtName, {
|
|
3834
|
+
promise: e.promise,
|
|
3835
|
+
reason: e.rejection
|
|
3836
|
+
});
|
|
3837
|
+
eventTask.invoke(evt);
|
|
3838
|
+
}
|
|
3839
|
+
});
|
|
3840
|
+
};
|
|
3841
|
+
}
|
|
3842
|
+
if (global3["PromiseRejectionEvent"]) {
|
|
3843
|
+
Zone3[zoneSymbol("unhandledPromiseRejectionHandler")] = findPromiseRejectionHandler("unhandledrejection");
|
|
3844
|
+
Zone3[zoneSymbol("rejectionHandledHandler")] = findPromiseRejectionHandler("rejectionhandled");
|
|
3845
|
+
}
|
|
3846
|
+
});
|
|
3847
|
+
Zone2.__load_patch("queueMicrotask", (global3, Zone3, api) => {
|
|
3848
|
+
patchQueueMicrotask(global3, api);
|
|
3849
|
+
});
|
|
3850
|
+
}
|
|
3851
|
+
function patchPromise(Zone2) {
|
|
3852
|
+
Zone2.__load_patch("ZoneAwarePromise", (global3, Zone3, api) => {
|
|
3853
|
+
const ObjectGetOwnPropertyDescriptor2 = Object.getOwnPropertyDescriptor;
|
|
3854
|
+
const ObjectDefineProperty2 = Object.defineProperty;
|
|
3855
|
+
function readableObjectToString(obj) {
|
|
3856
|
+
if (obj && obj.toString === Object.prototype.toString) {
|
|
3857
|
+
const className = obj.constructor && obj.constructor.name;
|
|
3858
|
+
return (className ? className : "") + ": " + JSON.stringify(obj);
|
|
3859
|
+
}
|
|
3860
|
+
return obj ? obj.toString() : Object.prototype.toString.call(obj);
|
|
3861
|
+
}
|
|
3862
|
+
const __symbol__2 = api.symbol;
|
|
3863
|
+
const _uncaughtPromiseErrors = [];
|
|
3864
|
+
const isDisableWrappingUncaughtPromiseRejection = global3[__symbol__2("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")] !== false;
|
|
3865
|
+
const symbolPromise = __symbol__2("Promise");
|
|
3866
|
+
const symbolThen = __symbol__2("then");
|
|
3867
|
+
const creationTrace = "__creationTrace__";
|
|
3868
|
+
api.onUnhandledError = (e) => {
|
|
3869
|
+
if (api.showUncaughtError()) {
|
|
3870
|
+
const rejection = e && e.rejection;
|
|
3871
|
+
if (rejection) {
|
|
3872
|
+
console.error("Unhandled Promise rejection:", rejection instanceof Error ? rejection.message : rejection, "; Zone:", e.zone.name, "; Task:", e.task && e.task.source, "; Value:", rejection, rejection instanceof Error ? rejection.stack : void 0);
|
|
3873
|
+
} else {
|
|
3874
|
+
console.error(e);
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
};
|
|
3878
|
+
api.microtaskDrainDone = () => {
|
|
3879
|
+
while (_uncaughtPromiseErrors.length) {
|
|
3880
|
+
const uncaughtPromiseError = _uncaughtPromiseErrors.shift();
|
|
3881
|
+
try {
|
|
3882
|
+
uncaughtPromiseError.zone.runGuarded(() => {
|
|
3883
|
+
if (uncaughtPromiseError.throwOriginal) {
|
|
3884
|
+
throw uncaughtPromiseError.rejection;
|
|
3885
|
+
}
|
|
3886
|
+
throw uncaughtPromiseError;
|
|
3887
|
+
});
|
|
3888
|
+
} catch (error) {
|
|
3889
|
+
handleUnhandledRejection(error);
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
};
|
|
3893
|
+
const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__2("unhandledPromiseRejectionHandler");
|
|
3894
|
+
function handleUnhandledRejection(e) {
|
|
3895
|
+
api.onUnhandledError(e);
|
|
3896
|
+
try {
|
|
3897
|
+
const handler = Zone3[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
|
|
3898
|
+
if (typeof handler === "function") {
|
|
3899
|
+
handler.call(this, e);
|
|
3900
|
+
}
|
|
3901
|
+
} catch (err) {
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
function isThenable(value) {
|
|
3905
|
+
return value && typeof value.then === "function";
|
|
3906
|
+
}
|
|
3907
|
+
function forwardResolution(value) {
|
|
3908
|
+
return value;
|
|
3909
|
+
}
|
|
3910
|
+
function forwardRejection(rejection) {
|
|
3911
|
+
return ZoneAwarePromise.reject(rejection);
|
|
3912
|
+
}
|
|
3913
|
+
const symbolState = __symbol__2("state");
|
|
3914
|
+
const symbolValue = __symbol__2("value");
|
|
3915
|
+
const symbolFinally = __symbol__2("finally");
|
|
3916
|
+
const symbolParentPromiseValue = __symbol__2("parentPromiseValue");
|
|
3917
|
+
const symbolParentPromiseState = __symbol__2("parentPromiseState");
|
|
3918
|
+
const source = "Promise.then";
|
|
3919
|
+
const UNRESOLVED = null;
|
|
3920
|
+
const RESOLVED = true;
|
|
3921
|
+
const REJECTED = false;
|
|
3922
|
+
const REJECTED_NO_CATCH = 0;
|
|
3923
|
+
function makeResolver(promise, state) {
|
|
3924
|
+
return (v) => {
|
|
3925
|
+
try {
|
|
3926
|
+
resolvePromise(promise, state, v);
|
|
3927
|
+
} catch (err) {
|
|
3928
|
+
resolvePromise(promise, false, err);
|
|
3929
|
+
}
|
|
3930
|
+
};
|
|
3931
|
+
}
|
|
3932
|
+
const once = function() {
|
|
3933
|
+
let wasCalled = false;
|
|
3934
|
+
return function wrapper(wrappedFunction) {
|
|
3935
|
+
return function() {
|
|
3936
|
+
if (wasCalled) {
|
|
3937
|
+
return;
|
|
3938
|
+
}
|
|
3939
|
+
wasCalled = true;
|
|
3940
|
+
wrappedFunction.apply(null, arguments);
|
|
3941
|
+
};
|
|
3942
|
+
};
|
|
3943
|
+
};
|
|
3944
|
+
const TYPE_ERROR = "Promise resolved with itself";
|
|
3945
|
+
const CURRENT_TASK_TRACE_SYMBOL = __symbol__2("currentTaskTrace");
|
|
3946
|
+
function resolvePromise(promise, state, value) {
|
|
3947
|
+
const onceWrapper = once();
|
|
3948
|
+
if (promise === value) {
|
|
3949
|
+
throw new TypeError(TYPE_ERROR);
|
|
3950
|
+
}
|
|
3951
|
+
if (promise[symbolState] === UNRESOLVED) {
|
|
3952
|
+
let then = null;
|
|
3953
|
+
try {
|
|
3954
|
+
if (typeof value === "object" || typeof value === "function") {
|
|
3955
|
+
then = value && value.then;
|
|
3956
|
+
}
|
|
3957
|
+
} catch (err) {
|
|
3958
|
+
onceWrapper(() => {
|
|
3959
|
+
resolvePromise(promise, false, err);
|
|
3960
|
+
})();
|
|
3961
|
+
return promise;
|
|
3962
|
+
}
|
|
3963
|
+
if (state !== REJECTED && value instanceof ZoneAwarePromise && value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && value[symbolState] !== UNRESOLVED) {
|
|
3964
|
+
clearRejectedNoCatch(value);
|
|
3965
|
+
resolvePromise(promise, value[symbolState], value[symbolValue]);
|
|
3966
|
+
} else if (state !== REJECTED && typeof then === "function") {
|
|
3967
|
+
try {
|
|
3968
|
+
then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
|
|
3969
|
+
} catch (err) {
|
|
3970
|
+
onceWrapper(() => {
|
|
3971
|
+
resolvePromise(promise, false, err);
|
|
3972
|
+
})();
|
|
3973
|
+
}
|
|
3974
|
+
} else {
|
|
3975
|
+
promise[symbolState] = state;
|
|
3976
|
+
const queue = promise[symbolValue];
|
|
3977
|
+
promise[symbolValue] = value;
|
|
3978
|
+
if (promise[symbolFinally] === symbolFinally) {
|
|
3979
|
+
if (state === RESOLVED) {
|
|
3980
|
+
promise[symbolState] = promise[symbolParentPromiseState];
|
|
3981
|
+
promise[symbolValue] = promise[symbolParentPromiseValue];
|
|
3982
|
+
}
|
|
3983
|
+
}
|
|
3984
|
+
if (state === REJECTED && value instanceof Error) {
|
|
3985
|
+
const trace = Zone3.currentTask && Zone3.currentTask.data && Zone3.currentTask.data[creationTrace];
|
|
3986
|
+
if (trace) {
|
|
3987
|
+
ObjectDefineProperty2(value, CURRENT_TASK_TRACE_SYMBOL, {
|
|
3988
|
+
configurable: true,
|
|
3989
|
+
enumerable: false,
|
|
3990
|
+
writable: true,
|
|
3991
|
+
value: trace
|
|
3992
|
+
});
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
for (let i = 0; i < queue.length; ) {
|
|
3996
|
+
scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
|
|
3997
|
+
}
|
|
3998
|
+
if (queue.length == 0 && state == REJECTED) {
|
|
3999
|
+
promise[symbolState] = REJECTED_NO_CATCH;
|
|
4000
|
+
let uncaughtPromiseError = value;
|
|
4001
|
+
try {
|
|
4002
|
+
throw new Error("Uncaught (in promise): " + readableObjectToString(value) + (value && value.stack ? "\n" + value.stack : ""));
|
|
4003
|
+
} catch (err) {
|
|
4004
|
+
uncaughtPromiseError = err;
|
|
4005
|
+
}
|
|
4006
|
+
if (isDisableWrappingUncaughtPromiseRejection) {
|
|
4007
|
+
uncaughtPromiseError.throwOriginal = true;
|
|
4008
|
+
}
|
|
4009
|
+
uncaughtPromiseError.rejection = value;
|
|
4010
|
+
uncaughtPromiseError.promise = promise;
|
|
4011
|
+
uncaughtPromiseError.zone = Zone3.current;
|
|
4012
|
+
uncaughtPromiseError.task = Zone3.currentTask;
|
|
4013
|
+
_uncaughtPromiseErrors.push(uncaughtPromiseError);
|
|
4014
|
+
api.scheduleMicroTask();
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
return promise;
|
|
4019
|
+
}
|
|
4020
|
+
const REJECTION_HANDLED_HANDLER = __symbol__2("rejectionHandledHandler");
|
|
4021
|
+
function clearRejectedNoCatch(promise) {
|
|
4022
|
+
if (promise[symbolState] === REJECTED_NO_CATCH) {
|
|
4023
|
+
try {
|
|
4024
|
+
const handler = Zone3[REJECTION_HANDLED_HANDLER];
|
|
4025
|
+
if (handler && typeof handler === "function") {
|
|
4026
|
+
handler.call(this, { rejection: promise[symbolValue], promise });
|
|
4027
|
+
}
|
|
4028
|
+
} catch (err) {
|
|
4029
|
+
}
|
|
4030
|
+
promise[symbolState] = REJECTED;
|
|
4031
|
+
for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {
|
|
4032
|
+
if (promise === _uncaughtPromiseErrors[i].promise) {
|
|
4033
|
+
_uncaughtPromiseErrors.splice(i, 1);
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
}
|
|
4038
|
+
function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
|
|
4039
|
+
clearRejectedNoCatch(promise);
|
|
4040
|
+
const promiseState = promise[symbolState];
|
|
4041
|
+
const delegate = promiseState ? typeof onFulfilled === "function" ? onFulfilled : forwardResolution : typeof onRejected === "function" ? onRejected : forwardRejection;
|
|
4042
|
+
zone.scheduleMicroTask(source, () => {
|
|
4043
|
+
try {
|
|
4044
|
+
const parentPromiseValue = promise[symbolValue];
|
|
4045
|
+
const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];
|
|
4046
|
+
if (isFinallyPromise) {
|
|
4047
|
+
chainPromise[symbolParentPromiseValue] = parentPromiseValue;
|
|
4048
|
+
chainPromise[symbolParentPromiseState] = promiseState;
|
|
4049
|
+
}
|
|
4050
|
+
const value = zone.run(delegate, void 0, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]);
|
|
4051
|
+
resolvePromise(chainPromise, true, value);
|
|
4052
|
+
} catch (error) {
|
|
4053
|
+
resolvePromise(chainPromise, false, error);
|
|
4054
|
+
}
|
|
4055
|
+
}, chainPromise);
|
|
4056
|
+
}
|
|
4057
|
+
const ZONE_AWARE_PROMISE_TO_STRING = "function ZoneAwarePromise() { [native code] }";
|
|
4058
|
+
const noop = function() {
|
|
4059
|
+
};
|
|
4060
|
+
const AggregateError = global3.AggregateError;
|
|
4061
|
+
class ZoneAwarePromise {
|
|
4062
|
+
static toString() {
|
|
4063
|
+
return ZONE_AWARE_PROMISE_TO_STRING;
|
|
4064
|
+
}
|
|
4065
|
+
static resolve(value) {
|
|
4066
|
+
if (value instanceof ZoneAwarePromise) {
|
|
4067
|
+
return value;
|
|
4068
|
+
}
|
|
4069
|
+
return resolvePromise(new this(null), RESOLVED, value);
|
|
4070
|
+
}
|
|
4071
|
+
static reject(error) {
|
|
4072
|
+
return resolvePromise(new this(null), REJECTED, error);
|
|
4073
|
+
}
|
|
4074
|
+
static withResolvers() {
|
|
4075
|
+
const result = {};
|
|
4076
|
+
result.promise = new ZoneAwarePromise((res, rej) => {
|
|
4077
|
+
result.resolve = res;
|
|
4078
|
+
result.reject = rej;
|
|
4079
|
+
});
|
|
4080
|
+
return result;
|
|
4081
|
+
}
|
|
4082
|
+
static any(values) {
|
|
4083
|
+
if (!values || typeof values[Symbol.iterator] !== "function") {
|
|
4084
|
+
return Promise.reject(new AggregateError([], "All promises were rejected"));
|
|
4085
|
+
}
|
|
4086
|
+
const promises = [];
|
|
4087
|
+
let count = 0;
|
|
4088
|
+
try {
|
|
4089
|
+
for (let v of values) {
|
|
4090
|
+
count++;
|
|
4091
|
+
promises.push(ZoneAwarePromise.resolve(v));
|
|
4092
|
+
}
|
|
4093
|
+
} catch (err) {
|
|
4094
|
+
return Promise.reject(new AggregateError([], "All promises were rejected"));
|
|
4095
|
+
}
|
|
4096
|
+
if (count === 0) {
|
|
4097
|
+
return Promise.reject(new AggregateError([], "All promises were rejected"));
|
|
4098
|
+
}
|
|
4099
|
+
let finished = false;
|
|
4100
|
+
const errors = [];
|
|
4101
|
+
return new ZoneAwarePromise((resolve, reject) => {
|
|
4102
|
+
for (let i = 0; i < promises.length; i++) {
|
|
4103
|
+
promises[i].then((v) => {
|
|
4104
|
+
if (finished) {
|
|
4105
|
+
return;
|
|
4106
|
+
}
|
|
4107
|
+
finished = true;
|
|
4108
|
+
resolve(v);
|
|
4109
|
+
}, (err) => {
|
|
4110
|
+
errors.push(err);
|
|
4111
|
+
count--;
|
|
4112
|
+
if (count === 0) {
|
|
4113
|
+
finished = true;
|
|
4114
|
+
reject(new AggregateError(errors, "All promises were rejected"));
|
|
4115
|
+
}
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
});
|
|
4119
|
+
}
|
|
4120
|
+
static race(values) {
|
|
4121
|
+
let resolve;
|
|
4122
|
+
let reject;
|
|
4123
|
+
let promise = new this((res, rej) => {
|
|
4124
|
+
resolve = res;
|
|
4125
|
+
reject = rej;
|
|
4126
|
+
});
|
|
4127
|
+
function onResolve(value) {
|
|
4128
|
+
resolve(value);
|
|
4129
|
+
}
|
|
4130
|
+
function onReject(error) {
|
|
4131
|
+
reject(error);
|
|
4132
|
+
}
|
|
4133
|
+
for (let value of values) {
|
|
4134
|
+
if (!isThenable(value)) {
|
|
4135
|
+
value = this.resolve(value);
|
|
4136
|
+
}
|
|
4137
|
+
value.then(onResolve, onReject);
|
|
4138
|
+
}
|
|
4139
|
+
return promise;
|
|
4140
|
+
}
|
|
4141
|
+
static all(values) {
|
|
4142
|
+
return ZoneAwarePromise.allWithCallback(values);
|
|
4143
|
+
}
|
|
4144
|
+
static allSettled(values) {
|
|
4145
|
+
const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;
|
|
4146
|
+
return P.allWithCallback(values, {
|
|
4147
|
+
thenCallback: (value) => ({ status: "fulfilled", value }),
|
|
4148
|
+
errorCallback: (err) => ({ status: "rejected", reason: err })
|
|
4149
|
+
});
|
|
4150
|
+
}
|
|
4151
|
+
static allWithCallback(values, callback) {
|
|
4152
|
+
let resolve;
|
|
4153
|
+
let reject;
|
|
4154
|
+
let promise = new this((res, rej) => {
|
|
4155
|
+
resolve = res;
|
|
4156
|
+
reject = rej;
|
|
4157
|
+
});
|
|
4158
|
+
let unresolvedCount = 2;
|
|
4159
|
+
let valueIndex = 0;
|
|
4160
|
+
const resolvedValues = [];
|
|
4161
|
+
for (let value of values) {
|
|
4162
|
+
if (!isThenable(value)) {
|
|
4163
|
+
value = this.resolve(value);
|
|
4164
|
+
}
|
|
4165
|
+
const curValueIndex = valueIndex;
|
|
4166
|
+
try {
|
|
4167
|
+
value.then((value2) => {
|
|
4168
|
+
resolvedValues[curValueIndex] = callback ? callback.thenCallback(value2) : value2;
|
|
4169
|
+
unresolvedCount--;
|
|
4170
|
+
if (unresolvedCount === 0) {
|
|
4171
|
+
resolve(resolvedValues);
|
|
4172
|
+
}
|
|
4173
|
+
}, (err) => {
|
|
4174
|
+
if (!callback) {
|
|
4175
|
+
reject(err);
|
|
4176
|
+
} else {
|
|
4177
|
+
resolvedValues[curValueIndex] = callback.errorCallback(err);
|
|
4178
|
+
unresolvedCount--;
|
|
4179
|
+
if (unresolvedCount === 0) {
|
|
4180
|
+
resolve(resolvedValues);
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4183
|
+
});
|
|
4184
|
+
} catch (thenErr) {
|
|
4185
|
+
reject(thenErr);
|
|
4186
|
+
}
|
|
4187
|
+
unresolvedCount++;
|
|
4188
|
+
valueIndex++;
|
|
4189
|
+
}
|
|
4190
|
+
unresolvedCount -= 2;
|
|
4191
|
+
if (unresolvedCount === 0) {
|
|
4192
|
+
resolve(resolvedValues);
|
|
4193
|
+
}
|
|
4194
|
+
return promise;
|
|
4195
|
+
}
|
|
4196
|
+
constructor(executor) {
|
|
4197
|
+
const promise = this;
|
|
4198
|
+
if (!(promise instanceof ZoneAwarePromise)) {
|
|
4199
|
+
throw new Error("Must be an instanceof Promise.");
|
|
4200
|
+
}
|
|
4201
|
+
promise[symbolState] = UNRESOLVED;
|
|
4202
|
+
promise[symbolValue] = [];
|
|
4203
|
+
try {
|
|
4204
|
+
const onceWrapper = once();
|
|
4205
|
+
executor && executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));
|
|
4206
|
+
} catch (error) {
|
|
4207
|
+
resolvePromise(promise, false, error);
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
get [Symbol.toStringTag]() {
|
|
4211
|
+
return "Promise";
|
|
4212
|
+
}
|
|
4213
|
+
get [Symbol.species]() {
|
|
4214
|
+
return ZoneAwarePromise;
|
|
4215
|
+
}
|
|
4216
|
+
then(onFulfilled, onRejected) {
|
|
4217
|
+
let C = this.constructor?.[Symbol.species];
|
|
4218
|
+
if (!C || typeof C !== "function") {
|
|
4219
|
+
C = this.constructor || ZoneAwarePromise;
|
|
4220
|
+
}
|
|
4221
|
+
const chainPromise = new C(noop);
|
|
4222
|
+
const zone = Zone3.current;
|
|
4223
|
+
if (this[symbolState] == UNRESOLVED) {
|
|
4224
|
+
this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
|
|
4225
|
+
} else {
|
|
4226
|
+
scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
|
|
4227
|
+
}
|
|
4228
|
+
return chainPromise;
|
|
4229
|
+
}
|
|
4230
|
+
catch(onRejected) {
|
|
4231
|
+
return this.then(null, onRejected);
|
|
4232
|
+
}
|
|
4233
|
+
finally(onFinally) {
|
|
4234
|
+
let C = this.constructor?.[Symbol.species];
|
|
4235
|
+
if (!C || typeof C !== "function") {
|
|
4236
|
+
C = ZoneAwarePromise;
|
|
4237
|
+
}
|
|
4238
|
+
const chainPromise = new C(noop);
|
|
4239
|
+
chainPromise[symbolFinally] = symbolFinally;
|
|
4240
|
+
const zone = Zone3.current;
|
|
4241
|
+
if (this[symbolState] == UNRESOLVED) {
|
|
4242
|
+
this[symbolValue].push(zone, chainPromise, onFinally, onFinally);
|
|
4243
|
+
} else {
|
|
4244
|
+
scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);
|
|
4245
|
+
}
|
|
4246
|
+
return chainPromise;
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
ZoneAwarePromise["resolve"] = ZoneAwarePromise.resolve;
|
|
4250
|
+
ZoneAwarePromise["reject"] = ZoneAwarePromise.reject;
|
|
4251
|
+
ZoneAwarePromise["race"] = ZoneAwarePromise.race;
|
|
4252
|
+
ZoneAwarePromise["all"] = ZoneAwarePromise.all;
|
|
4253
|
+
const NativePromise = global3[symbolPromise] = global3["Promise"];
|
|
4254
|
+
global3["Promise"] = ZoneAwarePromise;
|
|
4255
|
+
const symbolThenPatched = __symbol__2("thenPatched");
|
|
4256
|
+
function patchThen(Ctor) {
|
|
4257
|
+
const proto = Ctor.prototype;
|
|
4258
|
+
const prop = ObjectGetOwnPropertyDescriptor2(proto, "then");
|
|
4259
|
+
if (prop && (prop.writable === false || !prop.configurable)) {
|
|
4260
|
+
return;
|
|
4261
|
+
}
|
|
4262
|
+
const originalThen = proto.then;
|
|
4263
|
+
proto[symbolThen] = originalThen;
|
|
4264
|
+
Ctor.prototype.then = function(onResolve, onReject) {
|
|
4265
|
+
const wrapped = new ZoneAwarePromise((resolve, reject) => {
|
|
4266
|
+
originalThen.call(this, resolve, reject);
|
|
4267
|
+
});
|
|
4268
|
+
return wrapped.then(onResolve, onReject);
|
|
4269
|
+
};
|
|
4270
|
+
Ctor[symbolThenPatched] = true;
|
|
4271
|
+
}
|
|
4272
|
+
api.patchThen = patchThen;
|
|
4273
|
+
function zoneify(fn) {
|
|
4274
|
+
return function(self2, args) {
|
|
4275
|
+
let resultPromise = fn.apply(self2, args);
|
|
4276
|
+
if (resultPromise instanceof ZoneAwarePromise) {
|
|
4277
|
+
return resultPromise;
|
|
4278
|
+
}
|
|
4279
|
+
let ctor = resultPromise.constructor;
|
|
4280
|
+
if (!ctor[symbolThenPatched]) {
|
|
4281
|
+
patchThen(ctor);
|
|
4282
|
+
}
|
|
4283
|
+
return resultPromise;
|
|
4284
|
+
};
|
|
4285
|
+
}
|
|
4286
|
+
if (NativePromise) {
|
|
4287
|
+
patchThen(NativePromise);
|
|
4288
|
+
patchMethod(global3, "fetch", (delegate) => zoneify(delegate));
|
|
4289
|
+
}
|
|
4290
|
+
Promise[Zone3.__symbol__("uncaughtPromiseErrors")] = _uncaughtPromiseErrors;
|
|
4291
|
+
return ZoneAwarePromise;
|
|
4292
|
+
});
|
|
4293
|
+
}
|
|
4294
|
+
function patchToString(Zone2) {
|
|
4295
|
+
Zone2.__load_patch("toString", (global3) => {
|
|
4296
|
+
const originalFunctionToString = Function.prototype.toString;
|
|
4297
|
+
const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol("OriginalDelegate");
|
|
4298
|
+
const PROMISE_SYMBOL = zoneSymbol("Promise");
|
|
4299
|
+
const ERROR_SYMBOL = zoneSymbol("Error");
|
|
4300
|
+
const newFunctionToString = function toString() {
|
|
4301
|
+
if (typeof this === "function") {
|
|
4302
|
+
const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
|
|
4303
|
+
if (originalDelegate) {
|
|
4304
|
+
if (typeof originalDelegate === "function") {
|
|
4305
|
+
return originalFunctionToString.call(originalDelegate);
|
|
4306
|
+
} else {
|
|
4307
|
+
return Object.prototype.toString.call(originalDelegate);
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
if (this === Promise) {
|
|
4311
|
+
const nativePromise = global3[PROMISE_SYMBOL];
|
|
4312
|
+
if (nativePromise) {
|
|
4313
|
+
return originalFunctionToString.call(nativePromise);
|
|
4314
|
+
}
|
|
4315
|
+
}
|
|
4316
|
+
if (this === Error) {
|
|
4317
|
+
const nativeError = global3[ERROR_SYMBOL];
|
|
4318
|
+
if (nativeError) {
|
|
4319
|
+
return originalFunctionToString.call(nativeError);
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
return originalFunctionToString.call(this);
|
|
4324
|
+
};
|
|
4325
|
+
newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;
|
|
4326
|
+
Function.prototype.toString = newFunctionToString;
|
|
4327
|
+
const originalObjectToString = Object.prototype.toString;
|
|
4328
|
+
const PROMISE_OBJECT_TO_STRING = "[object Promise]";
|
|
4329
|
+
Object.prototype.toString = function() {
|
|
4330
|
+
if (typeof Promise === "function" && this instanceof Promise) {
|
|
4331
|
+
return PROMISE_OBJECT_TO_STRING;
|
|
4332
|
+
}
|
|
4333
|
+
return originalObjectToString.call(this);
|
|
4334
|
+
};
|
|
4335
|
+
});
|
|
4336
|
+
}
|
|
4337
|
+
function patchCallbacks(api, target, targetName, method, callbacks) {
|
|
4338
|
+
const symbol = Zone.__symbol__(method);
|
|
4339
|
+
if (target[symbol]) {
|
|
4340
|
+
return;
|
|
4341
|
+
}
|
|
4342
|
+
const nativeDelegate = target[symbol] = target[method];
|
|
4343
|
+
target[method] = function(name, opts, options) {
|
|
4344
|
+
if (opts && opts.prototype) {
|
|
4345
|
+
callbacks.forEach(function(callback) {
|
|
4346
|
+
const source = `${targetName}.${method}::` + callback;
|
|
4347
|
+
const prototype = opts.prototype;
|
|
4348
|
+
try {
|
|
4349
|
+
if (prototype.hasOwnProperty(callback)) {
|
|
4350
|
+
const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);
|
|
4351
|
+
if (descriptor && descriptor.value) {
|
|
4352
|
+
descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);
|
|
4353
|
+
api._redefineProperty(opts.prototype, callback, descriptor);
|
|
4354
|
+
} else if (prototype[callback]) {
|
|
4355
|
+
prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
|
|
4356
|
+
}
|
|
4357
|
+
} else if (prototype[callback]) {
|
|
4358
|
+
prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
|
|
4359
|
+
}
|
|
4360
|
+
} catch {
|
|
4361
|
+
}
|
|
4362
|
+
});
|
|
4363
|
+
}
|
|
4364
|
+
return nativeDelegate.call(target, name, opts, options);
|
|
4365
|
+
};
|
|
4366
|
+
api.attachOriginToPatched(target[method], nativeDelegate);
|
|
4367
|
+
}
|
|
4368
|
+
function patchUtil(Zone2) {
|
|
4369
|
+
Zone2.__load_patch("util", (global3, Zone3, api) => {
|
|
4370
|
+
const eventNames = getOnEventNames(global3);
|
|
4371
|
+
api.patchOnProperties = patchOnProperties;
|
|
4372
|
+
api.patchMethod = patchMethod;
|
|
4373
|
+
api.bindArguments = bindArguments;
|
|
4374
|
+
api.patchMacroTask = patchMacroTask;
|
|
4375
|
+
const SYMBOL_BLACK_LISTED_EVENTS = Zone3.__symbol__("BLACK_LISTED_EVENTS");
|
|
4376
|
+
const SYMBOL_UNPATCHED_EVENTS = Zone3.__symbol__("UNPATCHED_EVENTS");
|
|
4377
|
+
if (global3[SYMBOL_UNPATCHED_EVENTS]) {
|
|
4378
|
+
global3[SYMBOL_BLACK_LISTED_EVENTS] = global3[SYMBOL_UNPATCHED_EVENTS];
|
|
4379
|
+
}
|
|
4380
|
+
if (global3[SYMBOL_BLACK_LISTED_EVENTS]) {
|
|
4381
|
+
Zone3[SYMBOL_BLACK_LISTED_EVENTS] = Zone3[SYMBOL_UNPATCHED_EVENTS] = global3[SYMBOL_BLACK_LISTED_EVENTS];
|
|
4382
|
+
}
|
|
4383
|
+
api.patchEventPrototype = patchEventPrototype;
|
|
4384
|
+
api.patchEventTarget = patchEventTarget;
|
|
4385
|
+
api.isIEOrEdge = isIEOrEdge;
|
|
4386
|
+
api.ObjectDefineProperty = ObjectDefineProperty;
|
|
4387
|
+
api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
|
|
4388
|
+
api.ObjectCreate = ObjectCreate;
|
|
4389
|
+
api.ArraySlice = ArraySlice;
|
|
4390
|
+
api.patchClass = patchClass;
|
|
4391
|
+
api.wrapWithCurrentZone = wrapWithCurrentZone;
|
|
4392
|
+
api.filterProperties = filterProperties;
|
|
4393
|
+
api.attachOriginToPatched = attachOriginToPatched;
|
|
4394
|
+
api._redefineProperty = Object.defineProperty;
|
|
4395
|
+
api.patchCallbacks = patchCallbacks;
|
|
4396
|
+
api.getGlobalObjects = () => ({
|
|
4397
|
+
globalSources,
|
|
4398
|
+
zoneSymbolEventNames,
|
|
4399
|
+
eventNames,
|
|
4400
|
+
isBrowser,
|
|
4401
|
+
isMix,
|
|
4402
|
+
isNode,
|
|
4403
|
+
TRUE_STR,
|
|
4404
|
+
FALSE_STR,
|
|
4405
|
+
ZONE_SYMBOL_PREFIX,
|
|
4406
|
+
ADD_EVENT_LISTENER_STR,
|
|
4407
|
+
REMOVE_EVENT_LISTENER_STR
|
|
4408
|
+
});
|
|
4409
|
+
});
|
|
4410
|
+
}
|
|
4411
|
+
function patchCommon(Zone2) {
|
|
4412
|
+
patchPromise(Zone2);
|
|
4413
|
+
patchToString(Zone2);
|
|
4414
|
+
patchUtil(Zone2);
|
|
4415
|
+
}
|
|
4416
|
+
var Zone$1 = loadZone();
|
|
4417
|
+
patchCommon(Zone$1);
|
|
4418
|
+
patchBrowser(Zone$1);
|
|
4419
|
+
|
|
4420
|
+
// src/polyfills.ts
|
|
4421
|
+
window.process = { env: { DEBUG: void 0 } };
|
|
4422
|
+
//# sourceMappingURL=polyfills.js.map
|