@colijnit/configurator 1.0.21 → 1.0.22

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.
Files changed (158) hide show
  1. package/app/builder.d.ts +53 -0
  2. package/app/components/answers/answer/answer.component.d.ts +11 -0
  3. package/app/components/answers/answers.component.d.ts +8 -0
  4. package/app/components/answers/answers.module.d.ts +2 -0
  5. package/app/components/selections/selections.component.d.ts +22 -0
  6. package/app/components/selections/selections.module.d.ts +2 -0
  7. package/app/components/shared/loader/loader.component.d.ts +2 -0
  8. package/app/components/shared/shared.module.d.ts +2 -0
  9. package/app/directives/visibility-observer-master.directive.d.ts +9 -0
  10. package/app/directives/visibility-observer.directive.d.ts +13 -0
  11. package/app/services/configurator.service.d.ts +22 -0
  12. package/app/services/image-cache.service.d.ts +10 -0
  13. package/app/services/locator.service.d.ts +4 -0
  14. package/bundles/colijnit-configurator.umd.js +2745 -0
  15. package/bundles/colijnit-configurator.umd.js.map +1 -0
  16. package/bundles/colijnit-configurator.umd.min.js +17 -0
  17. package/bundles/colijnit-configurator.umd.min.js.map +1 -0
  18. package/colijnit-configurator.d.ts +10 -0
  19. package/colijnit-configurator.metadata.json +1 -0
  20. package/esm2015/app/builder.js +477 -0
  21. package/esm2015/app/components/answers/answer/answer.component.js +69 -0
  22. package/esm2015/app/components/answers/answers.component.js +43 -0
  23. package/esm2015/app/components/answers/answers.module.js +29 -0
  24. package/esm2015/app/components/selections/selections.component.js +134 -0
  25. package/esm2015/app/components/selections/selections.module.js +23 -0
  26. package/esm2015/app/components/shared/loader/loader.component.js +24 -0
  27. package/esm2015/app/components/shared/shared.module.js +21 -0
  28. package/esm2015/app/directives/visibility-observer-master.directive.js +51 -0
  29. package/esm2015/app/directives/visibility-observer.directive.js +57 -0
  30. package/esm2015/app/services/configurator.service.js +94 -0
  31. package/esm2015/app/services/image-cache.service.js +66 -0
  32. package/esm2015/app/services/locator.service.js +10 -0
  33. package/esm2015/colijnit-configurator.js +11 -0
  34. package/esm2015/helper/variation-helper.js +216 -0
  35. package/esm2015/model/material.js +11 -0
  36. package/esm2015/model/variation-settings.js +6 -0
  37. package/esm2015/model/variation.js +3 -0
  38. package/esm2015/public_api.js +7 -0
  39. package/esm2015/utils/asset.utils.js +74 -0
  40. package/esm2015/utils/file.utils.js +139 -0
  41. package/esm2015/utils/image.utils.js +52 -0
  42. package/esm2015/utils/object.utils.js +49 -0
  43. package/esm2015/utils/scene-utils.js +94 -0
  44. package/esm2015/utils/threed.utils.js +222 -0
  45. package/esm2015/utils/variation-utils.js +224 -0
  46. package/esm5/app/builder.js +591 -0
  47. package/esm5/app/components/answers/answer/answer.component.js +64 -0
  48. package/esm5/app/components/answers/answers.component.js +27 -0
  49. package/esm5/app/components/answers/answers.module.js +32 -0
  50. package/esm5/app/components/selections/selections.component.js +104 -0
  51. package/esm5/app/components/selections/selections.module.js +26 -0
  52. package/esm5/app/components/shared/loader/loader.component.js +16 -0
  53. package/esm5/app/components/shared/shared.module.js +24 -0
  54. package/esm5/app/directives/visibility-observer-master.directive.js +64 -0
  55. package/esm5/app/directives/visibility-observer.directive.js +59 -0
  56. package/esm5/app/services/configurator.service.js +160 -0
  57. package/esm5/app/services/image-cache.service.js +69 -0
  58. package/esm5/app/services/locator.service.js +13 -0
  59. package/esm5/colijnit-configurator.js +11 -0
  60. package/esm5/helper/variation-helper.js +268 -0
  61. package/esm5/model/material.js +13 -0
  62. package/esm5/model/variation-settings.js +8 -0
  63. package/esm5/model/variation.js +7 -0
  64. package/esm5/public_api.js +7 -0
  65. package/esm5/utils/asset.utils.js +106 -0
  66. package/esm5/utils/file.utils.js +151 -0
  67. package/esm5/utils/image.utils.js +56 -0
  68. package/esm5/utils/object.utils.js +56 -0
  69. package/esm5/utils/scene-utils.js +98 -0
  70. package/esm5/utils/threed.utils.js +279 -0
  71. package/esm5/utils/variation-utils.js +327 -0
  72. package/fesm2015/colijnit-configurator.js +2109 -0
  73. package/fesm2015/colijnit-configurator.js.map +1 -0
  74. package/fesm5/colijnit-configurator.js +2527 -0
  75. package/fesm5/colijnit-configurator.js.map +1 -0
  76. package/helper/variation-helper.d.ts +14 -0
  77. package/model/material.d.ts +17 -0
  78. package/model/variation-settings.d.ts +14 -0
  79. package/model/variation.d.ts +10 -0
  80. package/package.json +12 -45
  81. package/{src/public_api.ts → public_api.d.ts} +6 -6
  82. package/utils/asset.utils.d.ts +13 -0
  83. package/utils/file.utils.d.ts +27 -0
  84. package/utils/image.utils.d.ts +8 -0
  85. package/utils/object.utils.d.ts +7 -0
  86. package/utils/scene-utils.d.ts +7 -0
  87. package/utils/threed.utils.d.ts +16 -0
  88. package/utils/variation-utils.d.ts +12 -0
  89. package/.idea/Configurator.iml +0 -12
  90. package/.idea/codeStyles/Project.xml +0 -21
  91. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  92. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  93. package/.idea/misc.xml +0 -9
  94. package/.idea/modules.xml +0 -8
  95. package/.idea/vcs.xml +0 -6
  96. package/angular.json +0 -193
  97. package/configurator.iml +0 -11
  98. package/dist/configurator/index.html +0 -14
  99. package/dist/configurator/main-es2015.js +0 -3129
  100. package/dist/configurator/main-es2015.js.map +0 -1
  101. package/dist/configurator/main-es5.js +0 -5482
  102. package/dist/configurator/main-es5.js.map +0 -1
  103. package/dist/configurator/polyfills-es2015.js +0 -4520
  104. package/dist/configurator/polyfills-es2015.js.map +0 -1
  105. package/dist/configurator/polyfills-es5.js +0 -18375
  106. package/dist/configurator/polyfills-es5.js.map +0 -1
  107. package/dist/configurator/runtime-es2015.js +0 -155
  108. package/dist/configurator/runtime-es2015.js.map +0 -1
  109. package/dist/configurator/runtime-es5.js +0 -155
  110. package/dist/configurator/runtime-es5.js.map +0 -1
  111. package/dist/configurator/styles-es2015.js +0 -450
  112. package/dist/configurator/styles-es2015.js.map +0 -1
  113. package/dist/configurator/styles-es5.js +0 -432
  114. package/dist/configurator/styles-es5.js.map +0 -1
  115. package/dist/configurator/vendor-es2015.js +0 -155551
  116. package/dist/configurator/vendor-es2015.js.map +0 -1
  117. package/dist/configurator/vendor-es5.js +0 -183588
  118. package/dist/configurator/vendor-es5.js.map +0 -1
  119. package/ng-package.json +0 -9
  120. package/src/app/app.component.ts +0 -222
  121. package/src/app/app.module.ts +0 -34
  122. package/src/app/builder.ts +0 -480
  123. package/src/app/components/answers/answer/answer.component.ts +0 -61
  124. package/src/app/components/answers/answers.component.ts +0 -41
  125. package/src/app/components/answers/answers.module.ts +0 -26
  126. package/src/app/components/selections/selections.component.ts +0 -131
  127. package/src/app/components/selections/selections.module.ts +0 -20
  128. package/src/app/components/shared/loader/loader.component.scss +0 -33
  129. package/src/app/components/shared/loader/loader.component.ts +0 -20
  130. package/src/app/components/shared/shared.module.ts +0 -16
  131. package/src/app/directives/visibility-observer-master.directive.ts +0 -71
  132. package/src/app/directives/visibility-observer.directive.ts +0 -74
  133. package/src/app/services/configurator.service.ts +0 -86
  134. package/src/app/services/image-cache.service.ts +0 -56
  135. package/src/app/services/locator.service.ts +0 -6
  136. package/src/environments/environment.prod.ts +0 -3
  137. package/src/environments/environment.ts +0 -8
  138. package/src/helper/variation-helper.ts +0 -220
  139. package/src/index.html +0 -14
  140. package/src/main.ts +0 -11
  141. package/src/model/material.ts +0 -22
  142. package/src/model/variation-settings.ts +0 -14
  143. package/src/model/variation.ts +0 -11
  144. package/src/polyfills.ts +0 -73
  145. package/src/style/shared.scss +0 -173
  146. package/src/style/styles.scss +0 -45
  147. package/src/tsconfig.app.json +0 -16
  148. package/src/tsconfig.spec.json +0 -19
  149. package/src/utils/asset.utils.ts +0 -88
  150. package/src/utils/file.utils.ts +0 -156
  151. package/src/utils/file.utils.unit.test.ts +0 -8
  152. package/src/utils/image.utils.ts +0 -54
  153. package/src/utils/object.utils.ts +0 -52
  154. package/src/utils/scene-utils.ts +0 -119
  155. package/src/utils/threed.utils.ts +0 -219
  156. package/src/utils/variation-utils.ts +0 -216
  157. package/tsconfig.json +0 -23
  158. package/tslint.json +0 -132
@@ -1,4520 +0,0 @@
1
- (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["polyfills"],{
2
-
3
- /***/ "./node_modules/core-js/es6/reflect.js":
4
- /*!*********************************************!*\
5
- !*** ./node_modules/core-js/es6/reflect.js ***!
6
- \*********************************************/
7
- /*! no static exports found */
8
- /***/ (function(module, exports, __webpack_require__) {
9
-
10
- __webpack_require__(/*! ../modules/es6.reflect.apply */ "./node_modules/core-js/modules/es6.reflect.apply.js");
11
- __webpack_require__(/*! ../modules/es6.reflect.construct */ "./node_modules/core-js/modules/es6.reflect.construct.js");
12
- __webpack_require__(/*! ../modules/es6.reflect.define-property */ "./node_modules/core-js/modules/es6.reflect.define-property.js");
13
- __webpack_require__(/*! ../modules/es6.reflect.delete-property */ "./node_modules/core-js/modules/es6.reflect.delete-property.js");
14
- __webpack_require__(/*! ../modules/es6.reflect.enumerate */ "./node_modules/core-js/modules/es6.reflect.enumerate.js");
15
- __webpack_require__(/*! ../modules/es6.reflect.get */ "./node_modules/core-js/modules/es6.reflect.get.js");
16
- __webpack_require__(/*! ../modules/es6.reflect.get-own-property-descriptor */ "./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js");
17
- __webpack_require__(/*! ../modules/es6.reflect.get-prototype-of */ "./node_modules/core-js/modules/es6.reflect.get-prototype-of.js");
18
- __webpack_require__(/*! ../modules/es6.reflect.has */ "./node_modules/core-js/modules/es6.reflect.has.js");
19
- __webpack_require__(/*! ../modules/es6.reflect.is-extensible */ "./node_modules/core-js/modules/es6.reflect.is-extensible.js");
20
- __webpack_require__(/*! ../modules/es6.reflect.own-keys */ "./node_modules/core-js/modules/es6.reflect.own-keys.js");
21
- __webpack_require__(/*! ../modules/es6.reflect.prevent-extensions */ "./node_modules/core-js/modules/es6.reflect.prevent-extensions.js");
22
- __webpack_require__(/*! ../modules/es6.reflect.set */ "./node_modules/core-js/modules/es6.reflect.set.js");
23
- __webpack_require__(/*! ../modules/es6.reflect.set-prototype-of */ "./node_modules/core-js/modules/es6.reflect.set-prototype-of.js");
24
- module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/modules/_core.js").Reflect;
25
-
26
-
27
- /***/ }),
28
-
29
- /***/ "./node_modules/core-js/modules/_a-function.js":
30
- /*!*****************************************************!*\
31
- !*** ./node_modules/core-js/modules/_a-function.js ***!
32
- \*****************************************************/
33
- /*! no static exports found */
34
- /***/ (function(module, exports) {
35
-
36
- module.exports = function (it) {
37
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
38
- return it;
39
- };
40
-
41
-
42
- /***/ }),
43
-
44
- /***/ "./node_modules/core-js/modules/_an-object.js":
45
- /*!****************************************************!*\
46
- !*** ./node_modules/core-js/modules/_an-object.js ***!
47
- \****************************************************/
48
- /*! no static exports found */
49
- /***/ (function(module, exports, __webpack_require__) {
50
-
51
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
52
- module.exports = function (it) {
53
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
54
- return it;
55
- };
56
-
57
-
58
- /***/ }),
59
-
60
- /***/ "./node_modules/core-js/modules/_array-includes.js":
61
- /*!*********************************************************!*\
62
- !*** ./node_modules/core-js/modules/_array-includes.js ***!
63
- \*********************************************************/
64
- /*! no static exports found */
65
- /***/ (function(module, exports, __webpack_require__) {
66
-
67
- // false -> Array#indexOf
68
- // true -> Array#includes
69
- var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
70
- var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
71
- var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
72
- module.exports = function (IS_INCLUDES) {
73
- return function ($this, el, fromIndex) {
74
- var O = toIObject($this);
75
- var length = toLength(O.length);
76
- var index = toAbsoluteIndex(fromIndex, length);
77
- var value;
78
- // Array#includes uses SameValueZero equality algorithm
79
- // eslint-disable-next-line no-self-compare
80
- if (IS_INCLUDES && el != el) while (length > index) {
81
- value = O[index++];
82
- // eslint-disable-next-line no-self-compare
83
- if (value != value) return true;
84
- // Array#indexOf ignores holes, Array#includes - not
85
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
86
- if (O[index] === el) return IS_INCLUDES || index || 0;
87
- } return !IS_INCLUDES && -1;
88
- };
89
- };
90
-
91
-
92
- /***/ }),
93
-
94
- /***/ "./node_modules/core-js/modules/_bind.js":
95
- /*!***********************************************!*\
96
- !*** ./node_modules/core-js/modules/_bind.js ***!
97
- \***********************************************/
98
- /*! no static exports found */
99
- /***/ (function(module, exports, __webpack_require__) {
100
-
101
- "use strict";
102
-
103
- var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
104
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
105
- var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/modules/_invoke.js");
106
- var arraySlice = [].slice;
107
- var factories = {};
108
-
109
- var construct = function (F, len, args) {
110
- if (!(len in factories)) {
111
- for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
112
- // eslint-disable-next-line no-new-func
113
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
114
- } return factories[len](F, args);
115
- };
116
-
117
- module.exports = Function.bind || function bind(that /* , ...args */) {
118
- var fn = aFunction(this);
119
- var partArgs = arraySlice.call(arguments, 1);
120
- var bound = function (/* args... */) {
121
- var args = partArgs.concat(arraySlice.call(arguments));
122
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
123
- };
124
- if (isObject(fn.prototype)) bound.prototype = fn.prototype;
125
- return bound;
126
- };
127
-
128
-
129
- /***/ }),
130
-
131
- /***/ "./node_modules/core-js/modules/_cof.js":
132
- /*!**********************************************!*\
133
- !*** ./node_modules/core-js/modules/_cof.js ***!
134
- \**********************************************/
135
- /*! no static exports found */
136
- /***/ (function(module, exports) {
137
-
138
- var toString = {}.toString;
139
-
140
- module.exports = function (it) {
141
- return toString.call(it).slice(8, -1);
142
- };
143
-
144
-
145
- /***/ }),
146
-
147
- /***/ "./node_modules/core-js/modules/_core.js":
148
- /*!***********************************************!*\
149
- !*** ./node_modules/core-js/modules/_core.js ***!
150
- \***********************************************/
151
- /*! no static exports found */
152
- /***/ (function(module, exports) {
153
-
154
- var core = module.exports = { version: '2.6.12' };
155
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
156
-
157
-
158
- /***/ }),
159
-
160
- /***/ "./node_modules/core-js/modules/_ctx.js":
161
- /*!**********************************************!*\
162
- !*** ./node_modules/core-js/modules/_ctx.js ***!
163
- \**********************************************/
164
- /*! no static exports found */
165
- /***/ (function(module, exports, __webpack_require__) {
166
-
167
- // optional / simple context binding
168
- var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
169
- module.exports = function (fn, that, length) {
170
- aFunction(fn);
171
- if (that === undefined) return fn;
172
- switch (length) {
173
- case 1: return function (a) {
174
- return fn.call(that, a);
175
- };
176
- case 2: return function (a, b) {
177
- return fn.call(that, a, b);
178
- };
179
- case 3: return function (a, b, c) {
180
- return fn.call(that, a, b, c);
181
- };
182
- }
183
- return function (/* ...args */) {
184
- return fn.apply(that, arguments);
185
- };
186
- };
187
-
188
-
189
- /***/ }),
190
-
191
- /***/ "./node_modules/core-js/modules/_defined.js":
192
- /*!**************************************************!*\
193
- !*** ./node_modules/core-js/modules/_defined.js ***!
194
- \**************************************************/
195
- /*! no static exports found */
196
- /***/ (function(module, exports) {
197
-
198
- // 7.2.1 RequireObjectCoercible(argument)
199
- module.exports = function (it) {
200
- if (it == undefined) throw TypeError("Can't call method on " + it);
201
- return it;
202
- };
203
-
204
-
205
- /***/ }),
206
-
207
- /***/ "./node_modules/core-js/modules/_descriptors.js":
208
- /*!******************************************************!*\
209
- !*** ./node_modules/core-js/modules/_descriptors.js ***!
210
- \******************************************************/
211
- /*! no static exports found */
212
- /***/ (function(module, exports, __webpack_require__) {
213
-
214
- // Thank's IE8 for his funny defineProperty
215
- module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
216
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
217
- });
218
-
219
-
220
- /***/ }),
221
-
222
- /***/ "./node_modules/core-js/modules/_dom-create.js":
223
- /*!*****************************************************!*\
224
- !*** ./node_modules/core-js/modules/_dom-create.js ***!
225
- \*****************************************************/
226
- /*! no static exports found */
227
- /***/ (function(module, exports, __webpack_require__) {
228
-
229
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
230
- var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
231
- // typeof document.createElement is 'object' in old IE
232
- var is = isObject(document) && isObject(document.createElement);
233
- module.exports = function (it) {
234
- return is ? document.createElement(it) : {};
235
- };
236
-
237
-
238
- /***/ }),
239
-
240
- /***/ "./node_modules/core-js/modules/_enum-bug-keys.js":
241
- /*!********************************************************!*\
242
- !*** ./node_modules/core-js/modules/_enum-bug-keys.js ***!
243
- \********************************************************/
244
- /*! no static exports found */
245
- /***/ (function(module, exports) {
246
-
247
- // IE 8- don't enum bug keys
248
- module.exports = (
249
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
250
- ).split(',');
251
-
252
-
253
- /***/ }),
254
-
255
- /***/ "./node_modules/core-js/modules/_export.js":
256
- /*!*************************************************!*\
257
- !*** ./node_modules/core-js/modules/_export.js ***!
258
- \*************************************************/
259
- /*! no static exports found */
260
- /***/ (function(module, exports, __webpack_require__) {
261
-
262
- var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
263
- var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
264
- var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
265
- var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
266
- var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
267
- var PROTOTYPE = 'prototype';
268
-
269
- var $export = function (type, name, source) {
270
- var IS_FORCED = type & $export.F;
271
- var IS_GLOBAL = type & $export.G;
272
- var IS_STATIC = type & $export.S;
273
- var IS_PROTO = type & $export.P;
274
- var IS_BIND = type & $export.B;
275
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
276
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
277
- var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
278
- var key, own, out, exp;
279
- if (IS_GLOBAL) source = name;
280
- for (key in source) {
281
- // contains in native
282
- own = !IS_FORCED && target && target[key] !== undefined;
283
- // export native or passed
284
- out = (own ? target : source)[key];
285
- // bind timers to global for call from export context
286
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
287
- // extend global
288
- if (target) redefine(target, key, out, type & $export.U);
289
- // export
290
- if (exports[key] != out) hide(exports, key, exp);
291
- if (IS_PROTO && expProto[key] != out) expProto[key] = out;
292
- }
293
- };
294
- global.core = core;
295
- // type bitmap
296
- $export.F = 1; // forced
297
- $export.G = 2; // global
298
- $export.S = 4; // static
299
- $export.P = 8; // proto
300
- $export.B = 16; // bind
301
- $export.W = 32; // wrap
302
- $export.U = 64; // safe
303
- $export.R = 128; // real proto method for `library`
304
- module.exports = $export;
305
-
306
-
307
- /***/ }),
308
-
309
- /***/ "./node_modules/core-js/modules/_fails.js":
310
- /*!************************************************!*\
311
- !*** ./node_modules/core-js/modules/_fails.js ***!
312
- \************************************************/
313
- /*! no static exports found */
314
- /***/ (function(module, exports) {
315
-
316
- module.exports = function (exec) {
317
- try {
318
- return !!exec();
319
- } catch (e) {
320
- return true;
321
- }
322
- };
323
-
324
-
325
- /***/ }),
326
-
327
- /***/ "./node_modules/core-js/modules/_function-to-string.js":
328
- /*!*************************************************************!*\
329
- !*** ./node_modules/core-js/modules/_function-to-string.js ***!
330
- \*************************************************************/
331
- /*! no static exports found */
332
- /***/ (function(module, exports, __webpack_require__) {
333
-
334
- module.exports = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('native-function-to-string', Function.toString);
335
-
336
-
337
- /***/ }),
338
-
339
- /***/ "./node_modules/core-js/modules/_global.js":
340
- /*!*************************************************!*\
341
- !*** ./node_modules/core-js/modules/_global.js ***!
342
- \*************************************************/
343
- /*! no static exports found */
344
- /***/ (function(module, exports) {
345
-
346
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
347
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
348
- ? window : typeof self != 'undefined' && self.Math == Math ? self
349
- // eslint-disable-next-line no-new-func
350
- : Function('return this')();
351
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
352
-
353
-
354
- /***/ }),
355
-
356
- /***/ "./node_modules/core-js/modules/_has.js":
357
- /*!**********************************************!*\
358
- !*** ./node_modules/core-js/modules/_has.js ***!
359
- \**********************************************/
360
- /*! no static exports found */
361
- /***/ (function(module, exports) {
362
-
363
- var hasOwnProperty = {}.hasOwnProperty;
364
- module.exports = function (it, key) {
365
- return hasOwnProperty.call(it, key);
366
- };
367
-
368
-
369
- /***/ }),
370
-
371
- /***/ "./node_modules/core-js/modules/_hide.js":
372
- /*!***********************************************!*\
373
- !*** ./node_modules/core-js/modules/_hide.js ***!
374
- \***********************************************/
375
- /*! no static exports found */
376
- /***/ (function(module, exports, __webpack_require__) {
377
-
378
- var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
379
- var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
380
- module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
381
- return dP.f(object, key, createDesc(1, value));
382
- } : function (object, key, value) {
383
- object[key] = value;
384
- return object;
385
- };
386
-
387
-
388
- /***/ }),
389
-
390
- /***/ "./node_modules/core-js/modules/_html.js":
391
- /*!***********************************************!*\
392
- !*** ./node_modules/core-js/modules/_html.js ***!
393
- \***********************************************/
394
- /*! no static exports found */
395
- /***/ (function(module, exports, __webpack_require__) {
396
-
397
- var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
398
- module.exports = document && document.documentElement;
399
-
400
-
401
- /***/ }),
402
-
403
- /***/ "./node_modules/core-js/modules/_ie8-dom-define.js":
404
- /*!*********************************************************!*\
405
- !*** ./node_modules/core-js/modules/_ie8-dom-define.js ***!
406
- \*********************************************************/
407
- /*! no static exports found */
408
- /***/ (function(module, exports, __webpack_require__) {
409
-
410
- module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
411
- return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
412
- });
413
-
414
-
415
- /***/ }),
416
-
417
- /***/ "./node_modules/core-js/modules/_invoke.js":
418
- /*!*************************************************!*\
419
- !*** ./node_modules/core-js/modules/_invoke.js ***!
420
- \*************************************************/
421
- /*! no static exports found */
422
- /***/ (function(module, exports) {
423
-
424
- // fast apply, http://jsperf.lnkit.com/fast-apply/5
425
- module.exports = function (fn, args, that) {
426
- var un = that === undefined;
427
- switch (args.length) {
428
- case 0: return un ? fn()
429
- : fn.call(that);
430
- case 1: return un ? fn(args[0])
431
- : fn.call(that, args[0]);
432
- case 2: return un ? fn(args[0], args[1])
433
- : fn.call(that, args[0], args[1]);
434
- case 3: return un ? fn(args[0], args[1], args[2])
435
- : fn.call(that, args[0], args[1], args[2]);
436
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
437
- : fn.call(that, args[0], args[1], args[2], args[3]);
438
- } return fn.apply(that, args);
439
- };
440
-
441
-
442
- /***/ }),
443
-
444
- /***/ "./node_modules/core-js/modules/_iobject.js":
445
- /*!**************************************************!*\
446
- !*** ./node_modules/core-js/modules/_iobject.js ***!
447
- \**************************************************/
448
- /*! no static exports found */
449
- /***/ (function(module, exports, __webpack_require__) {
450
-
451
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
452
- var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
453
- // eslint-disable-next-line no-prototype-builtins
454
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
455
- return cof(it) == 'String' ? it.split('') : Object(it);
456
- };
457
-
458
-
459
- /***/ }),
460
-
461
- /***/ "./node_modules/core-js/modules/_is-object.js":
462
- /*!****************************************************!*\
463
- !*** ./node_modules/core-js/modules/_is-object.js ***!
464
- \****************************************************/
465
- /*! no static exports found */
466
- /***/ (function(module, exports) {
467
-
468
- module.exports = function (it) {
469
- return typeof it === 'object' ? it !== null : typeof it === 'function';
470
- };
471
-
472
-
473
- /***/ }),
474
-
475
- /***/ "./node_modules/core-js/modules/_iter-create.js":
476
- /*!******************************************************!*\
477
- !*** ./node_modules/core-js/modules/_iter-create.js ***!
478
- \******************************************************/
479
- /*! no static exports found */
480
- /***/ (function(module, exports, __webpack_require__) {
481
-
482
- "use strict";
483
-
484
- var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
485
- var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
486
- var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
487
- var IteratorPrototype = {};
488
-
489
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
490
- __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; });
491
-
492
- module.exports = function (Constructor, NAME, next) {
493
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
494
- setToStringTag(Constructor, NAME + ' Iterator');
495
- };
496
-
497
-
498
- /***/ }),
499
-
500
- /***/ "./node_modules/core-js/modules/_library.js":
501
- /*!**************************************************!*\
502
- !*** ./node_modules/core-js/modules/_library.js ***!
503
- \**************************************************/
504
- /*! no static exports found */
505
- /***/ (function(module, exports) {
506
-
507
- module.exports = false;
508
-
509
-
510
- /***/ }),
511
-
512
- /***/ "./node_modules/core-js/modules/_object-create.js":
513
- /*!********************************************************!*\
514
- !*** ./node_modules/core-js/modules/_object-create.js ***!
515
- \********************************************************/
516
- /*! no static exports found */
517
- /***/ (function(module, exports, __webpack_require__) {
518
-
519
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
520
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
521
- var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js");
522
- var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");
523
- var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
524
- var Empty = function () { /* empty */ };
525
- var PROTOTYPE = 'prototype';
526
-
527
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
528
- var createDict = function () {
529
- // Thrash, waste and sodomy: IE GC bug
530
- var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('iframe');
531
- var i = enumBugKeys.length;
532
- var lt = '<';
533
- var gt = '>';
534
- var iframeDocument;
535
- iframe.style.display = 'none';
536
- __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js").appendChild(iframe);
537
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
538
- // createDict = iframe.contentWindow.Object;
539
- // html.removeChild(iframe);
540
- iframeDocument = iframe.contentWindow.document;
541
- iframeDocument.open();
542
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
543
- iframeDocument.close();
544
- createDict = iframeDocument.F;
545
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
546
- return createDict();
547
- };
548
-
549
- module.exports = Object.create || function create(O, Properties) {
550
- var result;
551
- if (O !== null) {
552
- Empty[PROTOTYPE] = anObject(O);
553
- result = new Empty();
554
- Empty[PROTOTYPE] = null;
555
- // add "__proto__" for Object.getPrototypeOf polyfill
556
- result[IE_PROTO] = O;
557
- } else result = createDict();
558
- return Properties === undefined ? result : dPs(result, Properties);
559
- };
560
-
561
-
562
- /***/ }),
563
-
564
- /***/ "./node_modules/core-js/modules/_object-dp.js":
565
- /*!****************************************************!*\
566
- !*** ./node_modules/core-js/modules/_object-dp.js ***!
567
- \****************************************************/
568
- /*! no static exports found */
569
- /***/ (function(module, exports, __webpack_require__) {
570
-
571
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
572
- var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
573
- var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
574
- var dP = Object.defineProperty;
575
-
576
- exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
577
- anObject(O);
578
- P = toPrimitive(P, true);
579
- anObject(Attributes);
580
- if (IE8_DOM_DEFINE) try {
581
- return dP(O, P, Attributes);
582
- } catch (e) { /* empty */ }
583
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
584
- if ('value' in Attributes) O[P] = Attributes.value;
585
- return O;
586
- };
587
-
588
-
589
- /***/ }),
590
-
591
- /***/ "./node_modules/core-js/modules/_object-dps.js":
592
- /*!*****************************************************!*\
593
- !*** ./node_modules/core-js/modules/_object-dps.js ***!
594
- \*****************************************************/
595
- /*! no static exports found */
596
- /***/ (function(module, exports, __webpack_require__) {
597
-
598
- var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
599
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
600
- var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
601
-
602
- module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
603
- anObject(O);
604
- var keys = getKeys(Properties);
605
- var length = keys.length;
606
- var i = 0;
607
- var P;
608
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
609
- return O;
610
- };
611
-
612
-
613
- /***/ }),
614
-
615
- /***/ "./node_modules/core-js/modules/_object-gopd.js":
616
- /*!******************************************************!*\
617
- !*** ./node_modules/core-js/modules/_object-gopd.js ***!
618
- \******************************************************/
619
- /*! no static exports found */
620
- /***/ (function(module, exports, __webpack_require__) {
621
-
622
- var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
623
- var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
624
- var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
625
- var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
626
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
627
- var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
628
- var gOPD = Object.getOwnPropertyDescriptor;
629
-
630
- exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
631
- O = toIObject(O);
632
- P = toPrimitive(P, true);
633
- if (IE8_DOM_DEFINE) try {
634
- return gOPD(O, P);
635
- } catch (e) { /* empty */ }
636
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
637
- };
638
-
639
-
640
- /***/ }),
641
-
642
- /***/ "./node_modules/core-js/modules/_object-gopn.js":
643
- /*!******************************************************!*\
644
- !*** ./node_modules/core-js/modules/_object-gopn.js ***!
645
- \******************************************************/
646
- /*! no static exports found */
647
- /***/ (function(module, exports, __webpack_require__) {
648
-
649
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
650
- var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js");
651
- var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js").concat('length', 'prototype');
652
-
653
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
654
- return $keys(O, hiddenKeys);
655
- };
656
-
657
-
658
- /***/ }),
659
-
660
- /***/ "./node_modules/core-js/modules/_object-gops.js":
661
- /*!******************************************************!*\
662
- !*** ./node_modules/core-js/modules/_object-gops.js ***!
663
- \******************************************************/
664
- /*! no static exports found */
665
- /***/ (function(module, exports) {
666
-
667
- exports.f = Object.getOwnPropertySymbols;
668
-
669
-
670
- /***/ }),
671
-
672
- /***/ "./node_modules/core-js/modules/_object-gpo.js":
673
- /*!*****************************************************!*\
674
- !*** ./node_modules/core-js/modules/_object-gpo.js ***!
675
- \*****************************************************/
676
- /*! no static exports found */
677
- /***/ (function(module, exports, __webpack_require__) {
678
-
679
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
680
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
681
- var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
682
- var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
683
- var ObjectProto = Object.prototype;
684
-
685
- module.exports = Object.getPrototypeOf || function (O) {
686
- O = toObject(O);
687
- if (has(O, IE_PROTO)) return O[IE_PROTO];
688
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
689
- return O.constructor.prototype;
690
- } return O instanceof Object ? ObjectProto : null;
691
- };
692
-
693
-
694
- /***/ }),
695
-
696
- /***/ "./node_modules/core-js/modules/_object-keys-internal.js":
697
- /*!***************************************************************!*\
698
- !*** ./node_modules/core-js/modules/_object-keys-internal.js ***!
699
- \***************************************************************/
700
- /*! no static exports found */
701
- /***/ (function(module, exports, __webpack_require__) {
702
-
703
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
704
- var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
705
- var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false);
706
- var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
707
-
708
- module.exports = function (object, names) {
709
- var O = toIObject(object);
710
- var i = 0;
711
- var result = [];
712
- var key;
713
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
714
- // Don't enum bug & hidden keys
715
- while (names.length > i) if (has(O, key = names[i++])) {
716
- ~arrayIndexOf(result, key) || result.push(key);
717
- }
718
- return result;
719
- };
720
-
721
-
722
- /***/ }),
723
-
724
- /***/ "./node_modules/core-js/modules/_object-keys.js":
725
- /*!******************************************************!*\
726
- !*** ./node_modules/core-js/modules/_object-keys.js ***!
727
- \******************************************************/
728
- /*! no static exports found */
729
- /***/ (function(module, exports, __webpack_require__) {
730
-
731
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
732
- var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js");
733
- var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");
734
-
735
- module.exports = Object.keys || function keys(O) {
736
- return $keys(O, enumBugKeys);
737
- };
738
-
739
-
740
- /***/ }),
741
-
742
- /***/ "./node_modules/core-js/modules/_object-pie.js":
743
- /*!*****************************************************!*\
744
- !*** ./node_modules/core-js/modules/_object-pie.js ***!
745
- \*****************************************************/
746
- /*! no static exports found */
747
- /***/ (function(module, exports) {
748
-
749
- exports.f = {}.propertyIsEnumerable;
750
-
751
-
752
- /***/ }),
753
-
754
- /***/ "./node_modules/core-js/modules/_own-keys.js":
755
- /*!***************************************************!*\
756
- !*** ./node_modules/core-js/modules/_own-keys.js ***!
757
- \***************************************************/
758
- /*! no static exports found */
759
- /***/ (function(module, exports, __webpack_require__) {
760
-
761
- // all object keys, includes non-enumerable and symbols
762
- var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js");
763
- var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
764
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
765
- var Reflect = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect;
766
- module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
767
- var keys = gOPN.f(anObject(it));
768
- var getSymbols = gOPS.f;
769
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
770
- };
771
-
772
-
773
- /***/ }),
774
-
775
- /***/ "./node_modules/core-js/modules/_property-desc.js":
776
- /*!********************************************************!*\
777
- !*** ./node_modules/core-js/modules/_property-desc.js ***!
778
- \********************************************************/
779
- /*! no static exports found */
780
- /***/ (function(module, exports) {
781
-
782
- module.exports = function (bitmap, value) {
783
- return {
784
- enumerable: !(bitmap & 1),
785
- configurable: !(bitmap & 2),
786
- writable: !(bitmap & 4),
787
- value: value
788
- };
789
- };
790
-
791
-
792
- /***/ }),
793
-
794
- /***/ "./node_modules/core-js/modules/_redefine.js":
795
- /*!***************************************************!*\
796
- !*** ./node_modules/core-js/modules/_redefine.js ***!
797
- \***************************************************/
798
- /*! no static exports found */
799
- /***/ (function(module, exports, __webpack_require__) {
800
-
801
- var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
802
- var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
803
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
804
- var SRC = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('src');
805
- var $toString = __webpack_require__(/*! ./_function-to-string */ "./node_modules/core-js/modules/_function-to-string.js");
806
- var TO_STRING = 'toString';
807
- var TPL = ('' + $toString).split(TO_STRING);
808
-
809
- __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").inspectSource = function (it) {
810
- return $toString.call(it);
811
- };
812
-
813
- (module.exports = function (O, key, val, safe) {
814
- var isFunction = typeof val == 'function';
815
- if (isFunction) has(val, 'name') || hide(val, 'name', key);
816
- if (O[key] === val) return;
817
- if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
818
- if (O === global) {
819
- O[key] = val;
820
- } else if (!safe) {
821
- delete O[key];
822
- hide(O, key, val);
823
- } else if (O[key]) {
824
- O[key] = val;
825
- } else {
826
- hide(O, key, val);
827
- }
828
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
829
- })(Function.prototype, TO_STRING, function toString() {
830
- return typeof this == 'function' && this[SRC] || $toString.call(this);
831
- });
832
-
833
-
834
- /***/ }),
835
-
836
- /***/ "./node_modules/core-js/modules/_set-proto.js":
837
- /*!****************************************************!*\
838
- !*** ./node_modules/core-js/modules/_set-proto.js ***!
839
- \****************************************************/
840
- /*! no static exports found */
841
- /***/ (function(module, exports, __webpack_require__) {
842
-
843
- // Works with __proto__ only. Old v8 can't work with null proto objects.
844
- /* eslint-disable no-proto */
845
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
846
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
847
- var check = function (O, proto) {
848
- anObject(O);
849
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
850
- };
851
- module.exports = {
852
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
853
- function (test, buggy, set) {
854
- try {
855
- set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2);
856
- set(test, []);
857
- buggy = !(test instanceof Array);
858
- } catch (e) { buggy = true; }
859
- return function setPrototypeOf(O, proto) {
860
- check(O, proto);
861
- if (buggy) O.__proto__ = proto;
862
- else set(O, proto);
863
- return O;
864
- };
865
- }({}, false) : undefined),
866
- check: check
867
- };
868
-
869
-
870
- /***/ }),
871
-
872
- /***/ "./node_modules/core-js/modules/_set-to-string-tag.js":
873
- /*!************************************************************!*\
874
- !*** ./node_modules/core-js/modules/_set-to-string-tag.js ***!
875
- \************************************************************/
876
- /*! no static exports found */
877
- /***/ (function(module, exports, __webpack_require__) {
878
-
879
- var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
880
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
881
- var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag');
882
-
883
- module.exports = function (it, tag, stat) {
884
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
885
- };
886
-
887
-
888
- /***/ }),
889
-
890
- /***/ "./node_modules/core-js/modules/_shared-key.js":
891
- /*!*****************************************************!*\
892
- !*** ./node_modules/core-js/modules/_shared-key.js ***!
893
- \*****************************************************/
894
- /*! no static exports found */
895
- /***/ (function(module, exports, __webpack_require__) {
896
-
897
- var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('keys');
898
- var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
899
- module.exports = function (key) {
900
- return shared[key] || (shared[key] = uid(key));
901
- };
902
-
903
-
904
- /***/ }),
905
-
906
- /***/ "./node_modules/core-js/modules/_shared.js":
907
- /*!*************************************************!*\
908
- !*** ./node_modules/core-js/modules/_shared.js ***!
909
- \*************************************************/
910
- /*! no static exports found */
911
- /***/ (function(module, exports, __webpack_require__) {
912
-
913
- var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
914
- var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
915
- var SHARED = '__core-js_shared__';
916
- var store = global[SHARED] || (global[SHARED] = {});
917
-
918
- (module.exports = function (key, value) {
919
- return store[key] || (store[key] = value !== undefined ? value : {});
920
- })('versions', []).push({
921
- version: core.version,
922
- mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js") ? 'pure' : 'global',
923
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
924
- });
925
-
926
-
927
- /***/ }),
928
-
929
- /***/ "./node_modules/core-js/modules/_to-absolute-index.js":
930
- /*!************************************************************!*\
931
- !*** ./node_modules/core-js/modules/_to-absolute-index.js ***!
932
- \************************************************************/
933
- /*! no static exports found */
934
- /***/ (function(module, exports, __webpack_require__) {
935
-
936
- var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
937
- var max = Math.max;
938
- var min = Math.min;
939
- module.exports = function (index, length) {
940
- index = toInteger(index);
941
- return index < 0 ? max(index + length, 0) : min(index, length);
942
- };
943
-
944
-
945
- /***/ }),
946
-
947
- /***/ "./node_modules/core-js/modules/_to-integer.js":
948
- /*!*****************************************************!*\
949
- !*** ./node_modules/core-js/modules/_to-integer.js ***!
950
- \*****************************************************/
951
- /*! no static exports found */
952
- /***/ (function(module, exports) {
953
-
954
- // 7.1.4 ToInteger
955
- var ceil = Math.ceil;
956
- var floor = Math.floor;
957
- module.exports = function (it) {
958
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
959
- };
960
-
961
-
962
- /***/ }),
963
-
964
- /***/ "./node_modules/core-js/modules/_to-iobject.js":
965
- /*!*****************************************************!*\
966
- !*** ./node_modules/core-js/modules/_to-iobject.js ***!
967
- \*****************************************************/
968
- /*! no static exports found */
969
- /***/ (function(module, exports, __webpack_require__) {
970
-
971
- // to indexed object, toObject with fallback for non-array-like ES3 strings
972
- var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
973
- var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
974
- module.exports = function (it) {
975
- return IObject(defined(it));
976
- };
977
-
978
-
979
- /***/ }),
980
-
981
- /***/ "./node_modules/core-js/modules/_to-length.js":
982
- /*!****************************************************!*\
983
- !*** ./node_modules/core-js/modules/_to-length.js ***!
984
- \****************************************************/
985
- /*! no static exports found */
986
- /***/ (function(module, exports, __webpack_require__) {
987
-
988
- // 7.1.15 ToLength
989
- var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
990
- var min = Math.min;
991
- module.exports = function (it) {
992
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
993
- };
994
-
995
-
996
- /***/ }),
997
-
998
- /***/ "./node_modules/core-js/modules/_to-object.js":
999
- /*!****************************************************!*\
1000
- !*** ./node_modules/core-js/modules/_to-object.js ***!
1001
- \****************************************************/
1002
- /*! no static exports found */
1003
- /***/ (function(module, exports, __webpack_require__) {
1004
-
1005
- // 7.1.13 ToObject(argument)
1006
- var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
1007
- module.exports = function (it) {
1008
- return Object(defined(it));
1009
- };
1010
-
1011
-
1012
- /***/ }),
1013
-
1014
- /***/ "./node_modules/core-js/modules/_to-primitive.js":
1015
- /*!*******************************************************!*\
1016
- !*** ./node_modules/core-js/modules/_to-primitive.js ***!
1017
- \*******************************************************/
1018
- /*! no static exports found */
1019
- /***/ (function(module, exports, __webpack_require__) {
1020
-
1021
- // 7.1.1 ToPrimitive(input [, PreferredType])
1022
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
1023
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
1024
- // and the second argument - flag - preferred type is a string
1025
- module.exports = function (it, S) {
1026
- if (!isObject(it)) return it;
1027
- var fn, val;
1028
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
1029
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
1030
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
1031
- throw TypeError("Can't convert object to primitive value");
1032
- };
1033
-
1034
-
1035
- /***/ }),
1036
-
1037
- /***/ "./node_modules/core-js/modules/_uid.js":
1038
- /*!**********************************************!*\
1039
- !*** ./node_modules/core-js/modules/_uid.js ***!
1040
- \**********************************************/
1041
- /*! no static exports found */
1042
- /***/ (function(module, exports) {
1043
-
1044
- var id = 0;
1045
- var px = Math.random();
1046
- module.exports = function (key) {
1047
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
1048
- };
1049
-
1050
-
1051
- /***/ }),
1052
-
1053
- /***/ "./node_modules/core-js/modules/_wks.js":
1054
- /*!**********************************************!*\
1055
- !*** ./node_modules/core-js/modules/_wks.js ***!
1056
- \**********************************************/
1057
- /*! no static exports found */
1058
- /***/ (function(module, exports, __webpack_require__) {
1059
-
1060
- var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('wks');
1061
- var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
1062
- var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Symbol;
1063
- var USE_SYMBOL = typeof Symbol == 'function';
1064
-
1065
- var $exports = module.exports = function (name) {
1066
- return store[name] || (store[name] =
1067
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
1068
- };
1069
-
1070
- $exports.store = store;
1071
-
1072
-
1073
- /***/ }),
1074
-
1075
- /***/ "./node_modules/core-js/modules/es6.reflect.apply.js":
1076
- /*!***********************************************************!*\
1077
- !*** ./node_modules/core-js/modules/es6.reflect.apply.js ***!
1078
- \***********************************************************/
1079
- /*! no static exports found */
1080
- /***/ (function(module, exports, __webpack_require__) {
1081
-
1082
- // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
1083
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1084
- var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
1085
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1086
- var rApply = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).apply;
1087
- var fApply = Function.apply;
1088
- // MS Edge argumentsList argument is optional
1089
- $export($export.S + $export.F * !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
1090
- rApply(function () { /* empty */ });
1091
- }), 'Reflect', {
1092
- apply: function apply(target, thisArgument, argumentsList) {
1093
- var T = aFunction(target);
1094
- var L = anObject(argumentsList);
1095
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
1096
- }
1097
- });
1098
-
1099
-
1100
- /***/ }),
1101
-
1102
- /***/ "./node_modules/core-js/modules/es6.reflect.construct.js":
1103
- /*!***************************************************************!*\
1104
- !*** ./node_modules/core-js/modules/es6.reflect.construct.js ***!
1105
- \***************************************************************/
1106
- /*! no static exports found */
1107
- /***/ (function(module, exports, __webpack_require__) {
1108
-
1109
- // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
1110
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1111
- var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
1112
- var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
1113
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1114
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
1115
- var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
1116
- var bind = __webpack_require__(/*! ./_bind */ "./node_modules/core-js/modules/_bind.js");
1117
- var rConstruct = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).construct;
1118
-
1119
- // MS Edge supports only 2 arguments and argumentsList argument is optional
1120
- // FF Nightly sets third argument as `new.target`, but does not create `this` from it
1121
- var NEW_TARGET_BUG = fails(function () {
1122
- function F() { /* empty */ }
1123
- return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
1124
- });
1125
- var ARGS_BUG = !fails(function () {
1126
- rConstruct(function () { /* empty */ });
1127
- });
1128
-
1129
- $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
1130
- construct: function construct(Target, args /* , newTarget */) {
1131
- aFunction(Target);
1132
- anObject(args);
1133
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
1134
- if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
1135
- if (Target == newTarget) {
1136
- // w/o altered newTarget, optimization for 0-4 arguments
1137
- switch (args.length) {
1138
- case 0: return new Target();
1139
- case 1: return new Target(args[0]);
1140
- case 2: return new Target(args[0], args[1]);
1141
- case 3: return new Target(args[0], args[1], args[2]);
1142
- case 4: return new Target(args[0], args[1], args[2], args[3]);
1143
- }
1144
- // w/o altered newTarget, lot of arguments case
1145
- var $args = [null];
1146
- $args.push.apply($args, args);
1147
- return new (bind.apply(Target, $args))();
1148
- }
1149
- // with altered newTarget, not support built-in constructors
1150
- var proto = newTarget.prototype;
1151
- var instance = create(isObject(proto) ? proto : Object.prototype);
1152
- var result = Function.apply.call(Target, instance, args);
1153
- return isObject(result) ? result : instance;
1154
- }
1155
- });
1156
-
1157
-
1158
- /***/ }),
1159
-
1160
- /***/ "./node_modules/core-js/modules/es6.reflect.define-property.js":
1161
- /*!*********************************************************************!*\
1162
- !*** ./node_modules/core-js/modules/es6.reflect.define-property.js ***!
1163
- \*********************************************************************/
1164
- /*! no static exports found */
1165
- /***/ (function(module, exports, __webpack_require__) {
1166
-
1167
- // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
1168
- var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
1169
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1170
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1171
- var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
1172
-
1173
- // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
1174
- $export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
1175
- // eslint-disable-next-line no-undef
1176
- Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
1177
- }), 'Reflect', {
1178
- defineProperty: function defineProperty(target, propertyKey, attributes) {
1179
- anObject(target);
1180
- propertyKey = toPrimitive(propertyKey, true);
1181
- anObject(attributes);
1182
- try {
1183
- dP.f(target, propertyKey, attributes);
1184
- return true;
1185
- } catch (e) {
1186
- return false;
1187
- }
1188
- }
1189
- });
1190
-
1191
-
1192
- /***/ }),
1193
-
1194
- /***/ "./node_modules/core-js/modules/es6.reflect.delete-property.js":
1195
- /*!*********************************************************************!*\
1196
- !*** ./node_modules/core-js/modules/es6.reflect.delete-property.js ***!
1197
- \*********************************************************************/
1198
- /*! no static exports found */
1199
- /***/ (function(module, exports, __webpack_require__) {
1200
-
1201
- // 26.1.4 Reflect.deleteProperty(target, propertyKey)
1202
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1203
- var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;
1204
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1205
-
1206
- $export($export.S, 'Reflect', {
1207
- deleteProperty: function deleteProperty(target, propertyKey) {
1208
- var desc = gOPD(anObject(target), propertyKey);
1209
- return desc && !desc.configurable ? false : delete target[propertyKey];
1210
- }
1211
- });
1212
-
1213
-
1214
- /***/ }),
1215
-
1216
- /***/ "./node_modules/core-js/modules/es6.reflect.enumerate.js":
1217
- /*!***************************************************************!*\
1218
- !*** ./node_modules/core-js/modules/es6.reflect.enumerate.js ***!
1219
- \***************************************************************/
1220
- /*! no static exports found */
1221
- /***/ (function(module, exports, __webpack_require__) {
1222
-
1223
- "use strict";
1224
-
1225
- // 26.1.5 Reflect.enumerate(target)
1226
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1227
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1228
- var Enumerate = function (iterated) {
1229
- this._t = anObject(iterated); // target
1230
- this._i = 0; // next index
1231
- var keys = this._k = []; // keys
1232
- var key;
1233
- for (key in iterated) keys.push(key);
1234
- };
1235
- __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js")(Enumerate, 'Object', function () {
1236
- var that = this;
1237
- var keys = that._k;
1238
- var key;
1239
- do {
1240
- if (that._i >= keys.length) return { value: undefined, done: true };
1241
- } while (!((key = keys[that._i++]) in that._t));
1242
- return { value: key, done: false };
1243
- });
1244
-
1245
- $export($export.S, 'Reflect', {
1246
- enumerate: function enumerate(target) {
1247
- return new Enumerate(target);
1248
- }
1249
- });
1250
-
1251
-
1252
- /***/ }),
1253
-
1254
- /***/ "./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js":
1255
- /*!*********************************************************************************!*\
1256
- !*** ./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js ***!
1257
- \*********************************************************************************/
1258
- /*! no static exports found */
1259
- /***/ (function(module, exports, __webpack_require__) {
1260
-
1261
- // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
1262
- var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
1263
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1264
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1265
-
1266
- $export($export.S, 'Reflect', {
1267
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
1268
- return gOPD.f(anObject(target), propertyKey);
1269
- }
1270
- });
1271
-
1272
-
1273
- /***/ }),
1274
-
1275
- /***/ "./node_modules/core-js/modules/es6.reflect.get-prototype-of.js":
1276
- /*!**********************************************************************!*\
1277
- !*** ./node_modules/core-js/modules/es6.reflect.get-prototype-of.js ***!
1278
- \**********************************************************************/
1279
- /*! no static exports found */
1280
- /***/ (function(module, exports, __webpack_require__) {
1281
-
1282
- // 26.1.8 Reflect.getPrototypeOf(target)
1283
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1284
- var getProto = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
1285
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1286
-
1287
- $export($export.S, 'Reflect', {
1288
- getPrototypeOf: function getPrototypeOf(target) {
1289
- return getProto(anObject(target));
1290
- }
1291
- });
1292
-
1293
-
1294
- /***/ }),
1295
-
1296
- /***/ "./node_modules/core-js/modules/es6.reflect.get.js":
1297
- /*!*********************************************************!*\
1298
- !*** ./node_modules/core-js/modules/es6.reflect.get.js ***!
1299
- \*********************************************************/
1300
- /*! no static exports found */
1301
- /***/ (function(module, exports, __webpack_require__) {
1302
-
1303
- // 26.1.6 Reflect.get(target, propertyKey [, receiver])
1304
- var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
1305
- var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
1306
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
1307
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1308
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
1309
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1310
-
1311
- function get(target, propertyKey /* , receiver */) {
1312
- var receiver = arguments.length < 3 ? target : arguments[2];
1313
- var desc, proto;
1314
- if (anObject(target) === receiver) return target[propertyKey];
1315
- if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
1316
- ? desc.value
1317
- : desc.get !== undefined
1318
- ? desc.get.call(receiver)
1319
- : undefined;
1320
- if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
1321
- }
1322
-
1323
- $export($export.S, 'Reflect', { get: get });
1324
-
1325
-
1326
- /***/ }),
1327
-
1328
- /***/ "./node_modules/core-js/modules/es6.reflect.has.js":
1329
- /*!*********************************************************!*\
1330
- !*** ./node_modules/core-js/modules/es6.reflect.has.js ***!
1331
- \*********************************************************/
1332
- /*! no static exports found */
1333
- /***/ (function(module, exports, __webpack_require__) {
1334
-
1335
- // 26.1.9 Reflect.has(target, propertyKey)
1336
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1337
-
1338
- $export($export.S, 'Reflect', {
1339
- has: function has(target, propertyKey) {
1340
- return propertyKey in target;
1341
- }
1342
- });
1343
-
1344
-
1345
- /***/ }),
1346
-
1347
- /***/ "./node_modules/core-js/modules/es6.reflect.is-extensible.js":
1348
- /*!*******************************************************************!*\
1349
- !*** ./node_modules/core-js/modules/es6.reflect.is-extensible.js ***!
1350
- \*******************************************************************/
1351
- /*! no static exports found */
1352
- /***/ (function(module, exports, __webpack_require__) {
1353
-
1354
- // 26.1.10 Reflect.isExtensible(target)
1355
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1356
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1357
- var $isExtensible = Object.isExtensible;
1358
-
1359
- $export($export.S, 'Reflect', {
1360
- isExtensible: function isExtensible(target) {
1361
- anObject(target);
1362
- return $isExtensible ? $isExtensible(target) : true;
1363
- }
1364
- });
1365
-
1366
-
1367
- /***/ }),
1368
-
1369
- /***/ "./node_modules/core-js/modules/es6.reflect.own-keys.js":
1370
- /*!**************************************************************!*\
1371
- !*** ./node_modules/core-js/modules/es6.reflect.own-keys.js ***!
1372
- \**************************************************************/
1373
- /*! no static exports found */
1374
- /***/ (function(module, exports, __webpack_require__) {
1375
-
1376
- // 26.1.11 Reflect.ownKeys(target)
1377
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1378
-
1379
- $export($export.S, 'Reflect', { ownKeys: __webpack_require__(/*! ./_own-keys */ "./node_modules/core-js/modules/_own-keys.js") });
1380
-
1381
-
1382
- /***/ }),
1383
-
1384
- /***/ "./node_modules/core-js/modules/es6.reflect.prevent-extensions.js":
1385
- /*!************************************************************************!*\
1386
- !*** ./node_modules/core-js/modules/es6.reflect.prevent-extensions.js ***!
1387
- \************************************************************************/
1388
- /*! no static exports found */
1389
- /***/ (function(module, exports, __webpack_require__) {
1390
-
1391
- // 26.1.12 Reflect.preventExtensions(target)
1392
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1393
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1394
- var $preventExtensions = Object.preventExtensions;
1395
-
1396
- $export($export.S, 'Reflect', {
1397
- preventExtensions: function preventExtensions(target) {
1398
- anObject(target);
1399
- try {
1400
- if ($preventExtensions) $preventExtensions(target);
1401
- return true;
1402
- } catch (e) {
1403
- return false;
1404
- }
1405
- }
1406
- });
1407
-
1408
-
1409
- /***/ }),
1410
-
1411
- /***/ "./node_modules/core-js/modules/es6.reflect.set-prototype-of.js":
1412
- /*!**********************************************************************!*\
1413
- !*** ./node_modules/core-js/modules/es6.reflect.set-prototype-of.js ***!
1414
- \**********************************************************************/
1415
- /*! no static exports found */
1416
- /***/ (function(module, exports, __webpack_require__) {
1417
-
1418
- // 26.1.14 Reflect.setPrototypeOf(target, proto)
1419
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1420
- var setProto = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js");
1421
-
1422
- if (setProto) $export($export.S, 'Reflect', {
1423
- setPrototypeOf: function setPrototypeOf(target, proto) {
1424
- setProto.check(target, proto);
1425
- try {
1426
- setProto.set(target, proto);
1427
- return true;
1428
- } catch (e) {
1429
- return false;
1430
- }
1431
- }
1432
- });
1433
-
1434
-
1435
- /***/ }),
1436
-
1437
- /***/ "./node_modules/core-js/modules/es6.reflect.set.js":
1438
- /*!*********************************************************!*\
1439
- !*** ./node_modules/core-js/modules/es6.reflect.set.js ***!
1440
- \*********************************************************/
1441
- /*! no static exports found */
1442
- /***/ (function(module, exports, __webpack_require__) {
1443
-
1444
- // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
1445
- var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
1446
- var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
1447
- var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
1448
- var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
1449
- var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
1450
- var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
1451
- var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
1452
- var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
1453
-
1454
- function set(target, propertyKey, V /* , receiver */) {
1455
- var receiver = arguments.length < 4 ? target : arguments[3];
1456
- var ownDesc = gOPD.f(anObject(target), propertyKey);
1457
- var existingDescriptor, proto;
1458
- if (!ownDesc) {
1459
- if (isObject(proto = getPrototypeOf(target))) {
1460
- return set(proto, propertyKey, V, receiver);
1461
- }
1462
- ownDesc = createDesc(0);
1463
- }
1464
- if (has(ownDesc, 'value')) {
1465
- if (ownDesc.writable === false || !isObject(receiver)) return false;
1466
- if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
1467
- if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
1468
- existingDescriptor.value = V;
1469
- dP.f(receiver, propertyKey, existingDescriptor);
1470
- } else dP.f(receiver, propertyKey, createDesc(0, V));
1471
- return true;
1472
- }
1473
- return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
1474
- }
1475
-
1476
- $export($export.S, 'Reflect', { set: set });
1477
-
1478
-
1479
- /***/ }),
1480
-
1481
- /***/ "./node_modules/zone.js/dist/zone-evergreen.js":
1482
- /*!*****************************************************!*\
1483
- !*** ./node_modules/zone.js/dist/zone-evergreen.js ***!
1484
- \*****************************************************/
1485
- /*! no static exports found */
1486
- /***/ (function(module, exports, __webpack_require__) {
1487
-
1488
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
1489
- * @license Angular v9.1.0-next.4+61.sha-e552591.with-local-changes
1490
- * (c) 2010-2020 Google LLC. https://angular.io/
1491
- * License: MIT
1492
- */
1493
- (function (factory) {
1494
- true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1495
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1496
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1497
- __WEBPACK_AMD_DEFINE_FACTORY__),
1498
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) :
1499
- undefined;
1500
- }((function () { 'use strict';
1501
-
1502
- /**
1503
- * @license
1504
- * Copyright Google Inc. All Rights Reserved.
1505
- *
1506
- * Use of this source code is governed by an MIT-style license that can be
1507
- * found in the LICENSE file at https://angular.io/license
1508
- */
1509
- const Zone$1 = (function (global) {
1510
- const performance = global['performance'];
1511
- function mark(name) { performance && performance['mark'] && performance['mark'](name); }
1512
- function performanceMeasure(name, label) {
1513
- performance && performance['measure'] && performance['measure'](name, label);
1514
- }
1515
- mark('Zone');
1516
- // Initialize before it's accessed below.
1517
- // __Zone_symbol_prefix global can be used to override the default zone
1518
- // symbol prefix with a custom one if needed.
1519
- const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';
1520
- function __symbol__(name) { return symbolPrefix + name; }
1521
- const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;
1522
- if (global['Zone']) {
1523
- // if global['Zone'] already exists (maybe zone.js was already loaded or
1524
- // some other lib also registered a global object named Zone), we may need
1525
- // to throw an error, but sometimes user may not want this error.
1526
- // For example,
1527
- // we have two web pages, page1 includes zone.js, page2 doesn't.
1528
- // and the 1st time user load page1 and page2, everything work fine,
1529
- // but when user load page2 again, error occurs because global['Zone'] already exists.
1530
- // so we add a flag to let user choose whether to throw this error or not.
1531
- // By default, if existing Zone is from zone.js, we will not throw the error.
1532
- if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {
1533
- throw new Error('Zone already loaded.');
1534
- }
1535
- else {
1536
- return global['Zone'];
1537
- }
1538
- }
1539
- class Zone {
1540
- constructor(parent, zoneSpec) {
1541
- this._parent = parent;
1542
- this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';
1543
- this._properties = zoneSpec && zoneSpec.properties || {};
1544
- this._zoneDelegate =
1545
- new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
1546
- }
1547
- static assertZonePatched() {
1548
- if (global['Promise'] !== patches['ZoneAwarePromise']) {
1549
- throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +
1550
- 'has been overwritten.\n' +
1551
- 'Most likely cause is that a Promise polyfill has been loaded ' +
1552
- 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +
1553
- 'If you must load one, do so before loading zone.js.)');
1554
- }
1555
- }
1556
- static get root() {
1557
- let zone = Zone.current;
1558
- while (zone.parent) {
1559
- zone = zone.parent;
1560
- }
1561
- return zone;
1562
- }
1563
- static get current() { return _currentZoneFrame.zone; }
1564
- static get currentTask() { return _currentTask; }
1565
- // tslint:disable-next-line:require-internal-with-underscore
1566
- static __load_patch(name, fn) {
1567
- if (patches.hasOwnProperty(name)) {
1568
- if (checkDuplicate) {
1569
- throw Error('Already loaded patch: ' + name);
1570
- }
1571
- }
1572
- else if (!global['__Zone_disable_' + name]) {
1573
- const perfName = 'Zone:' + name;
1574
- mark(perfName);
1575
- patches[name] = fn(global, Zone, _api);
1576
- performanceMeasure(perfName, perfName);
1577
- }
1578
- }
1579
- get parent() { return this._parent; }
1580
- get name() { return this._name; }
1581
- get(key) {
1582
- const zone = this.getZoneWith(key);
1583
- if (zone)
1584
- return zone._properties[key];
1585
- }
1586
- getZoneWith(key) {
1587
- let current = this;
1588
- while (current) {
1589
- if (current._properties.hasOwnProperty(key)) {
1590
- return current;
1591
- }
1592
- current = current._parent;
1593
- }
1594
- return null;
1595
- }
1596
- fork(zoneSpec) {
1597
- if (!zoneSpec)
1598
- throw new Error('ZoneSpec required!');
1599
- return this._zoneDelegate.fork(this, zoneSpec);
1600
- }
1601
- wrap(callback, source) {
1602
- if (typeof callback !== 'function') {
1603
- throw new Error('Expecting function got: ' + callback);
1604
- }
1605
- const _callback = this._zoneDelegate.intercept(this, callback, source);
1606
- const zone = this;
1607
- return function () {
1608
- return zone.runGuarded(_callback, this, arguments, source);
1609
- };
1610
- }
1611
- run(callback, applyThis, applyArgs, source) {
1612
- _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
1613
- try {
1614
- return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
1615
- }
1616
- finally {
1617
- _currentZoneFrame = _currentZoneFrame.parent;
1618
- }
1619
- }
1620
- runGuarded(callback, applyThis = null, applyArgs, source) {
1621
- _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
1622
- try {
1623
- try {
1624
- return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
1625
- }
1626
- catch (error) {
1627
- if (this._zoneDelegate.handleError(this, error)) {
1628
- throw error;
1629
- }
1630
- }
1631
- }
1632
- finally {
1633
- _currentZoneFrame = _currentZoneFrame.parent;
1634
- }
1635
- }
1636
- runTask(task, applyThis, applyArgs) {
1637
- if (task.zone != this) {
1638
- throw new Error('A task can only be run in the zone of creation! (Creation: ' +
1639
- (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
1640
- }
1641
- // https://github.com/angular/zone.js/issues/778, sometimes eventTask
1642
- // will run in notScheduled(canceled) state, we should not try to
1643
- // run such kind of task but just return
1644
- if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {
1645
- return;
1646
- }
1647
- const reEntryGuard = task.state != running;
1648
- reEntryGuard && task._transitionTo(running, scheduled);
1649
- task.runCount++;
1650
- const previousTask = _currentTask;
1651
- _currentTask = task;
1652
- _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
1653
- try {
1654
- if (task.type == macroTask && task.data && !task.data.isPeriodic) {
1655
- task.cancelFn = undefined;
1656
- }
1657
- try {
1658
- return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
1659
- }
1660
- catch (error) {
1661
- if (this._zoneDelegate.handleError(this, error)) {
1662
- throw error;
1663
- }
1664
- }
1665
- }
1666
- finally {
1667
- // if the task's state is notScheduled or unknown, then it has already been cancelled
1668
- // we should not reset the state to scheduled
1669
- if (task.state !== notScheduled && task.state !== unknown) {
1670
- if (task.type == eventTask || (task.data && task.data.isPeriodic)) {
1671
- reEntryGuard && task._transitionTo(scheduled, running);
1672
- }
1673
- else {
1674
- task.runCount = 0;
1675
- this._updateTaskCount(task, -1);
1676
- reEntryGuard &&
1677
- task._transitionTo(notScheduled, running, notScheduled);
1678
- }
1679
- }
1680
- _currentZoneFrame = _currentZoneFrame.parent;
1681
- _currentTask = previousTask;
1682
- }
1683
- }
1684
- scheduleTask(task) {
1685
- if (task.zone && task.zone !== this) {
1686
- // check if the task was rescheduled, the newZone
1687
- // should not be the children of the original zone
1688
- let newZone = this;
1689
- while (newZone) {
1690
- if (newZone === task.zone) {
1691
- throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);
1692
- }
1693
- newZone = newZone.parent;
1694
- }
1695
- }
1696
- task._transitionTo(scheduling, notScheduled);
1697
- const zoneDelegates = [];
1698
- task._zoneDelegates = zoneDelegates;
1699
- task._zone = this;
1700
- try {
1701
- task = this._zoneDelegate.scheduleTask(this, task);
1702
- }
1703
- catch (err) {
1704
- // should set task's state to unknown when scheduleTask throw error
1705
- // because the err may from reschedule, so the fromState maybe notScheduled
1706
- task._transitionTo(unknown, scheduling, notScheduled);
1707
- // TODO: @JiaLiPassion, should we check the result from handleError?
1708
- this._zoneDelegate.handleError(this, err);
1709
- throw err;
1710
- }
1711
- if (task._zoneDelegates === zoneDelegates) {
1712
- // we have to check because internally the delegate can reschedule the task.
1713
- this._updateTaskCount(task, 1);
1714
- }
1715
- if (task.state == scheduling) {
1716
- task._transitionTo(scheduled, scheduling);
1717
- }
1718
- return task;
1719
- }
1720
- scheduleMicroTask(source, callback, data, customSchedule) {
1721
- return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));
1722
- }
1723
- scheduleMacroTask(source, callback, data, customSchedule, customCancel) {
1724
- return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));
1725
- }
1726
- scheduleEventTask(source, callback, data, customSchedule, customCancel) {
1727
- return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));
1728
- }
1729
- cancelTask(task) {
1730
- if (task.zone != this)
1731
- throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +
1732
- (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
1733
- task._transitionTo(canceling, scheduled, running);
1734
- try {
1735
- this._zoneDelegate.cancelTask(this, task);
1736
- }
1737
- catch (err) {
1738
- // if error occurs when cancelTask, transit the state to unknown
1739
- task._transitionTo(unknown, canceling);
1740
- this._zoneDelegate.handleError(this, err);
1741
- throw err;
1742
- }
1743
- this._updateTaskCount(task, -1);
1744
- task._transitionTo(notScheduled, canceling);
1745
- task.runCount = 0;
1746
- return task;
1747
- }
1748
- _updateTaskCount(task, count) {
1749
- const zoneDelegates = task._zoneDelegates;
1750
- if (count == -1) {
1751
- task._zoneDelegates = null;
1752
- }
1753
- for (let i = 0; i < zoneDelegates.length; i++) {
1754
- zoneDelegates[i]._updateTaskCount(task.type, count);
1755
- }
1756
- }
1757
- }
1758
- // tslint:disable-next-line:require-internal-with-underscore
1759
- Zone.__symbol__ = __symbol__;
1760
- const DELEGATE_ZS = {
1761
- name: '',
1762
- onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),
1763
- onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),
1764
- onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),
1765
- onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)
1766
- };
1767
- class ZoneDelegate {
1768
- constructor(zone, parentDelegate, zoneSpec) {
1769
- this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };
1770
- this.zone = zone;
1771
- this._parentDelegate = parentDelegate;
1772
- this._forkZS =
1773
- zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
1774
- this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
1775
- this._forkCurrZone =
1776
- zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);
1777
- this._interceptZS =
1778
- zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
1779
- this._interceptDlgt =
1780
- zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
1781
- this._interceptCurrZone =
1782
- zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);
1783
- this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
1784
- this._invokeDlgt =
1785
- zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
1786
- this._invokeCurrZone =
1787
- zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);
1788
- this._handleErrorZS =
1789
- zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
1790
- this._handleErrorDlgt = zoneSpec &&
1791
- (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
1792
- this._handleErrorCurrZone =
1793
- zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);
1794
- this._scheduleTaskZS =
1795
- zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
1796
- this._scheduleTaskDlgt = zoneSpec &&
1797
- (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
1798
- this._scheduleTaskCurrZone = zoneSpec &&
1799
- (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);
1800
- this._invokeTaskZS =
1801
- zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
1802
- this._invokeTaskDlgt =
1803
- zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
1804
- this._invokeTaskCurrZone =
1805
- zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);
1806
- this._cancelTaskZS =
1807
- zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
1808
- this._cancelTaskDlgt =
1809
- zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
1810
- this._cancelTaskCurrZone =
1811
- zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);
1812
- this._hasTaskZS = null;
1813
- this._hasTaskDlgt = null;
1814
- this._hasTaskDlgtOwner = null;
1815
- this._hasTaskCurrZone = null;
1816
- const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
1817
- const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
1818
- if (zoneSpecHasTask || parentHasTask) {
1819
- // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such
1820
- // a case all task related interceptors must go through this ZD. We can't short circuit it.
1821
- this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
1822
- this._hasTaskDlgt = parentDelegate;
1823
- this._hasTaskDlgtOwner = this;
1824
- this._hasTaskCurrZone = zone;
1825
- if (!zoneSpec.onScheduleTask) {
1826
- this._scheduleTaskZS = DELEGATE_ZS;
1827
- this._scheduleTaskDlgt = parentDelegate;
1828
- this._scheduleTaskCurrZone = this.zone;
1829
- }
1830
- if (!zoneSpec.onInvokeTask) {
1831
- this._invokeTaskZS = DELEGATE_ZS;
1832
- this._invokeTaskDlgt = parentDelegate;
1833
- this._invokeTaskCurrZone = this.zone;
1834
- }
1835
- if (!zoneSpec.onCancelTask) {
1836
- this._cancelTaskZS = DELEGATE_ZS;
1837
- this._cancelTaskDlgt = parentDelegate;
1838
- this._cancelTaskCurrZone = this.zone;
1839
- }
1840
- }
1841
- }
1842
- fork(targetZone, zoneSpec) {
1843
- return this._forkZS ?
1844
- this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :
1845
- new Zone(targetZone, zoneSpec);
1846
- }
1847
- intercept(targetZone, callback, source) {
1848
- return this._interceptZS ?
1849
- this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :
1850
- callback;
1851
- }
1852
- invoke(targetZone, callback, applyThis, applyArgs, source) {
1853
- return this._invokeZS ?
1854
- this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :
1855
- callback.apply(applyThis, applyArgs);
1856
- }
1857
- handleError(targetZone, error) {
1858
- return this._handleErrorZS ?
1859
- this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :
1860
- true;
1861
- }
1862
- scheduleTask(targetZone, task) {
1863
- let returnTask = task;
1864
- if (this._scheduleTaskZS) {
1865
- if (this._hasTaskZS) {
1866
- returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
1867
- }
1868
- // clang-format off
1869
- returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);
1870
- // clang-format on
1871
- if (!returnTask)
1872
- returnTask = task;
1873
- }
1874
- else {
1875
- if (task.scheduleFn) {
1876
- task.scheduleFn(task);
1877
- }
1878
- else if (task.type == microTask) {
1879
- scheduleMicroTask(task);
1880
- }
1881
- else {
1882
- throw new Error('Task is missing scheduleFn.');
1883
- }
1884
- }
1885
- return returnTask;
1886
- }
1887
- invokeTask(targetZone, task, applyThis, applyArgs) {
1888
- return this._invokeTaskZS ?
1889
- this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :
1890
- task.callback.apply(applyThis, applyArgs);
1891
- }
1892
- cancelTask(targetZone, task) {
1893
- let value;
1894
- if (this._cancelTaskZS) {
1895
- value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);
1896
- }
1897
- else {
1898
- if (!task.cancelFn) {
1899
- throw Error('Task is not cancelable');
1900
- }
1901
- value = task.cancelFn(task);
1902
- }
1903
- return value;
1904
- }
1905
- hasTask(targetZone, isEmpty) {
1906
- // hasTask should not throw error so other ZoneDelegate
1907
- // can still trigger hasTask callback
1908
- try {
1909
- this._hasTaskZS &&
1910
- this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
1911
- }
1912
- catch (err) {
1913
- this.handleError(targetZone, err);
1914
- }
1915
- }
1916
- // tslint:disable-next-line:require-internal-with-underscore
1917
- _updateTaskCount(type, count) {
1918
- const counts = this._taskCounts;
1919
- const prev = counts[type];
1920
- const next = counts[type] = prev + count;
1921
- if (next < 0) {
1922
- throw new Error('More tasks executed then were scheduled.');
1923
- }
1924
- if (prev == 0 || next == 0) {
1925
- const isEmpty = {
1926
- microTask: counts['microTask'] > 0,
1927
- macroTask: counts['macroTask'] > 0,
1928
- eventTask: counts['eventTask'] > 0,
1929
- change: type
1930
- };
1931
- this.hasTask(this.zone, isEmpty);
1932
- }
1933
- }
1934
- }
1935
- class ZoneTask {
1936
- constructor(type, source, callback, options, scheduleFn, cancelFn) {
1937
- // tslint:disable-next-line:require-internal-with-underscore
1938
- this._zone = null;
1939
- this.runCount = 0;
1940
- // tslint:disable-next-line:require-internal-with-underscore
1941
- this._zoneDelegates = null;
1942
- // tslint:disable-next-line:require-internal-with-underscore
1943
- this._state = 'notScheduled';
1944
- this.type = type;
1945
- this.source = source;
1946
- this.data = options;
1947
- this.scheduleFn = scheduleFn;
1948
- this.cancelFn = cancelFn;
1949
- if (!callback) {
1950
- throw new Error('callback is not defined');
1951
- }
1952
- this.callback = callback;
1953
- const self = this;
1954
- // TODO: @JiaLiPassion options should have interface
1955
- if (type === eventTask && options && options.useG) {
1956
- this.invoke = ZoneTask.invokeTask;
1957
- }
1958
- else {
1959
- this.invoke = function () {
1960
- return ZoneTask.invokeTask.call(global, self, this, arguments);
1961
- };
1962
- }
1963
- }
1964
- static invokeTask(task, target, args) {
1965
- if (!task) {
1966
- task = this;
1967
- }
1968
- _numberOfNestedTaskFrames++;
1969
- try {
1970
- task.runCount++;
1971
- return task.zone.runTask(task, target, args);
1972
- }
1973
- finally {
1974
- if (_numberOfNestedTaskFrames == 1) {
1975
- drainMicroTaskQueue();
1976
- }
1977
- _numberOfNestedTaskFrames--;
1978
- }
1979
- }
1980
- get zone() { return this._zone; }
1981
- get state() { return this._state; }
1982
- cancelScheduleRequest() { this._transitionTo(notScheduled, scheduling); }
1983
- // tslint:disable-next-line:require-internal-with-underscore
1984
- _transitionTo(toState, fromState1, fromState2) {
1985
- if (this._state === fromState1 || this._state === fromState2) {
1986
- this._state = toState;
1987
- if (toState == notScheduled) {
1988
- this._zoneDelegates = null;
1989
- }
1990
- }
1991
- else {
1992
- throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \'' + fromState2 + '\'' : ''}, was '${this._state}'.`);
1993
- }
1994
- }
1995
- toString() {
1996
- if (this.data && typeof this.data.handleId !== 'undefined') {
1997
- return this.data.handleId.toString();
1998
- }
1999
- else {
2000
- return Object.prototype.toString.call(this);
2001
- }
2002
- }
2003
- // add toJSON method to prevent cyclic error when
2004
- // call JSON.stringify(zoneTask)
2005
- toJSON() {
2006
- return {
2007
- type: this.type,
2008
- state: this.state,
2009
- source: this.source,
2010
- zone: this.zone.name,
2011
- runCount: this.runCount
2012
- };
2013
- }
2014
- }
2015
- //////////////////////////////////////////////////////
2016
- //////////////////////////////////////////////////////
2017
- /// MICROTASK QUEUE
2018
- //////////////////////////////////////////////////////
2019
- //////////////////////////////////////////////////////
2020
- const symbolSetTimeout = __symbol__('setTimeout');
2021
- const symbolPromise = __symbol__('Promise');
2022
- const symbolThen = __symbol__('then');
2023
- let _microTaskQueue = [];
2024
- let _isDrainingMicrotaskQueue = false;
2025
- let nativeMicroTaskQueuePromise;
2026
- function scheduleMicroTask(task) {
2027
- // if we are not running in any task, and there has not been anything scheduled
2028
- // we must bootstrap the initial task creation by manually scheduling the drain
2029
- if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {
2030
- // We are not running in Task, so we need to kickstart the microtask queue.
2031
- if (!nativeMicroTaskQueuePromise) {
2032
- if (global[symbolPromise]) {
2033
- nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
2034
- }
2035
- }
2036
- if (nativeMicroTaskQueuePromise) {
2037
- let nativeThen = nativeMicroTaskQueuePromise[symbolThen];
2038
- if (!nativeThen) {
2039
- // native Promise is not patchable, we need to use `then` directly
2040
- // issue 1078
2041
- nativeThen = nativeMicroTaskQueuePromise['then'];
2042
- }
2043
- nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue);
2044
- }
2045
- else {
2046
- global[symbolSetTimeout](drainMicroTaskQueue, 0);
2047
- }
2048
- }
2049
- task && _microTaskQueue.push(task);
2050
- }
2051
- function drainMicroTaskQueue() {
2052
- if (!_isDrainingMicrotaskQueue) {
2053
- _isDrainingMicrotaskQueue = true;
2054
- while (_microTaskQueue.length) {
2055
- const queue = _microTaskQueue;
2056
- _microTaskQueue = [];
2057
- for (let i = 0; i < queue.length; i++) {
2058
- const task = queue[i];
2059
- try {
2060
- task.zone.runTask(task, null, null);
2061
- }
2062
- catch (error) {
2063
- _api.onUnhandledError(error);
2064
- }
2065
- }
2066
- }
2067
- _api.microtaskDrainDone();
2068
- _isDrainingMicrotaskQueue = false;
2069
- }
2070
- }
2071
- //////////////////////////////////////////////////////
2072
- //////////////////////////////////////////////////////
2073
- /// BOOTSTRAP
2074
- //////////////////////////////////////////////////////
2075
- //////////////////////////////////////////////////////
2076
- const NO_ZONE = { name: 'NO ZONE' };
2077
- const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';
2078
- const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';
2079
- const patches = {};
2080
- const _api = {
2081
- symbol: __symbol__,
2082
- currentZoneFrame: () => _currentZoneFrame,
2083
- onUnhandledError: noop,
2084
- microtaskDrainDone: noop,
2085
- scheduleMicroTask: scheduleMicroTask,
2086
- showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],
2087
- patchEventTarget: () => [],
2088
- patchOnProperties: noop,
2089
- patchMethod: () => noop,
2090
- bindArguments: () => [],
2091
- patchThen: () => noop,
2092
- patchMacroTask: () => noop,
2093
- setNativePromise: (NativePromise) => {
2094
- // sometimes NativePromise.resolve static function
2095
- // is not ready yet, (such as core-js/es6.promise)
2096
- // so we need to check here.
2097
- if (NativePromise && typeof NativePromise.resolve === 'function') {
2098
- nativeMicroTaskQueuePromise = NativePromise.resolve(0);
2099
- }
2100
- },
2101
- patchEventPrototype: () => noop,
2102
- isIEOrEdge: () => false,
2103
- getGlobalObjects: () => undefined,
2104
- ObjectDefineProperty: () => noop,
2105
- ObjectGetOwnPropertyDescriptor: () => undefined,
2106
- ObjectCreate: () => undefined,
2107
- ArraySlice: () => [],
2108
- patchClass: () => noop,
2109
- wrapWithCurrentZone: () => noop,
2110
- filterProperties: () => [],
2111
- attachOriginToPatched: () => noop,
2112
- _redefineProperty: () => noop,
2113
- patchCallbacks: () => noop
2114
- };
2115
- let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };
2116
- let _currentTask = null;
2117
- let _numberOfNestedTaskFrames = 0;
2118
- function noop() { }
2119
- performanceMeasure('Zone', 'Zone');
2120
- return global['Zone'] = Zone;
2121
- })(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
2122
-
2123
- /**
2124
- * @license
2125
- * Copyright Google Inc. All Rights Reserved.
2126
- *
2127
- * Use of this source code is governed by an MIT-style license that can be
2128
- * found in the LICENSE file at https://angular.io/license
2129
- */
2130
- Zone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {
2131
- const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2132
- const ObjectDefineProperty = Object.defineProperty;
2133
- function readableObjectToString(obj) {
2134
- if (obj && obj.toString === Object.prototype.toString) {
2135
- const className = obj.constructor && obj.constructor.name;
2136
- return (className ? className : '') + ': ' + JSON.stringify(obj);
2137
- }
2138
- return obj ? obj.toString() : Object.prototype.toString.call(obj);
2139
- }
2140
- const __symbol__ = api.symbol;
2141
- const _uncaughtPromiseErrors = [];
2142
- const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;
2143
- const symbolPromise = __symbol__('Promise');
2144
- const symbolThen = __symbol__('then');
2145
- const creationTrace = '__creationTrace__';
2146
- api.onUnhandledError = (e) => {
2147
- if (api.showUncaughtError()) {
2148
- const rejection = e && e.rejection;
2149
- if (rejection) {
2150
- 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 : undefined);
2151
- }
2152
- else {
2153
- console.error(e);
2154
- }
2155
- }
2156
- };
2157
- api.microtaskDrainDone = () => {
2158
- while (_uncaughtPromiseErrors.length) {
2159
- const uncaughtPromiseError = _uncaughtPromiseErrors.shift();
2160
- try {
2161
- uncaughtPromiseError.zone.runGuarded(() => { throw uncaughtPromiseError; });
2162
- }
2163
- catch (error) {
2164
- handleUnhandledRejection(error);
2165
- }
2166
- }
2167
- };
2168
- const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');
2169
- function handleUnhandledRejection(e) {
2170
- api.onUnhandledError(e);
2171
- try {
2172
- const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
2173
- if (typeof handler === 'function') {
2174
- handler.call(this, e);
2175
- }
2176
- }
2177
- catch (err) {
2178
- }
2179
- }
2180
- function isThenable(value) { return value && value.then; }
2181
- function forwardResolution(value) { return value; }
2182
- function forwardRejection(rejection) { return ZoneAwarePromise.reject(rejection); }
2183
- const symbolState = __symbol__('state');
2184
- const symbolValue = __symbol__('value');
2185
- const symbolFinally = __symbol__('finally');
2186
- const symbolParentPromiseValue = __symbol__('parentPromiseValue');
2187
- const symbolParentPromiseState = __symbol__('parentPromiseState');
2188
- const source = 'Promise.then';
2189
- const UNRESOLVED = null;
2190
- const RESOLVED = true;
2191
- const REJECTED = false;
2192
- const REJECTED_NO_CATCH = 0;
2193
- function makeResolver(promise, state) {
2194
- return (v) => {
2195
- try {
2196
- resolvePromise(promise, state, v);
2197
- }
2198
- catch (err) {
2199
- resolvePromise(promise, false, err);
2200
- }
2201
- // Do not return value or you will break the Promise spec.
2202
- };
2203
- }
2204
- const once = function () {
2205
- let wasCalled = false;
2206
- return function wrapper(wrappedFunction) {
2207
- return function () {
2208
- if (wasCalled) {
2209
- return;
2210
- }
2211
- wasCalled = true;
2212
- wrappedFunction.apply(null, arguments);
2213
- };
2214
- };
2215
- };
2216
- const TYPE_ERROR = 'Promise resolved with itself';
2217
- const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');
2218
- // Promise Resolution
2219
- function resolvePromise(promise, state, value) {
2220
- const onceWrapper = once();
2221
- if (promise === value) {
2222
- throw new TypeError(TYPE_ERROR);
2223
- }
2224
- if (promise[symbolState] === UNRESOLVED) {
2225
- // should only get value.then once based on promise spec.
2226
- let then = null;
2227
- try {
2228
- if (typeof value === 'object' || typeof value === 'function') {
2229
- then = value && value.then;
2230
- }
2231
- }
2232
- catch (err) {
2233
- onceWrapper(() => { resolvePromise(promise, false, err); })();
2234
- return promise;
2235
- }
2236
- // if (value instanceof ZoneAwarePromise) {
2237
- if (state !== REJECTED && value instanceof ZoneAwarePromise &&
2238
- value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&
2239
- value[symbolState] !== UNRESOLVED) {
2240
- clearRejectedNoCatch(value);
2241
- resolvePromise(promise, value[symbolState], value[symbolValue]);
2242
- }
2243
- else if (state !== REJECTED && typeof then === 'function') {
2244
- try {
2245
- then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
2246
- }
2247
- catch (err) {
2248
- onceWrapper(() => { resolvePromise(promise, false, err); })();
2249
- }
2250
- }
2251
- else {
2252
- promise[symbolState] = state;
2253
- const queue = promise[symbolValue];
2254
- promise[symbolValue] = value;
2255
- if (promise[symbolFinally] === symbolFinally) {
2256
- // the promise is generated by Promise.prototype.finally
2257
- if (state === RESOLVED) {
2258
- // the state is resolved, should ignore the value
2259
- // and use parent promise value
2260
- promise[symbolState] = promise[symbolParentPromiseState];
2261
- promise[symbolValue] = promise[symbolParentPromiseValue];
2262
- }
2263
- }
2264
- // record task information in value when error occurs, so we can
2265
- // do some additional work such as render longStackTrace
2266
- if (state === REJECTED && value instanceof Error) {
2267
- // check if longStackTraceZone is here
2268
- const trace = Zone.currentTask && Zone.currentTask.data &&
2269
- Zone.currentTask.data[creationTrace];
2270
- if (trace) {
2271
- // only keep the long stack trace into error when in longStackTraceZone
2272
- ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });
2273
- }
2274
- }
2275
- for (let i = 0; i < queue.length;) {
2276
- scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
2277
- }
2278
- if (queue.length == 0 && state == REJECTED) {
2279
- promise[symbolState] = REJECTED_NO_CATCH;
2280
- let uncaughtPromiseError = value;
2281
- if (!isDisableWrappingUncaughtPromiseRejection) {
2282
- // If disable wrapping uncaught promise reject
2283
- // and the rejected value is an Error object,
2284
- // use the value instead of wrapping it.
2285
- try {
2286
- // Here we throws a new Error to print more readable error log
2287
- // and if the value is not an error, zone.js builds an `Error`
2288
- // Object here to attach the stack information.
2289
- throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +
2290
- (value && value.stack ? '\n' + value.stack : ''));
2291
- }
2292
- catch (err) {
2293
- uncaughtPromiseError = err;
2294
- }
2295
- }
2296
- uncaughtPromiseError.rejection = value;
2297
- uncaughtPromiseError.promise = promise;
2298
- uncaughtPromiseError.zone = Zone.current;
2299
- uncaughtPromiseError.task = Zone.currentTask;
2300
- _uncaughtPromiseErrors.push(uncaughtPromiseError);
2301
- api.scheduleMicroTask(); // to make sure that it is running
2302
- }
2303
- }
2304
- }
2305
- // Resolving an already resolved promise is a noop.
2306
- return promise;
2307
- }
2308
- const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');
2309
- function clearRejectedNoCatch(promise) {
2310
- if (promise[symbolState] === REJECTED_NO_CATCH) {
2311
- // if the promise is rejected no catch status
2312
- // and queue.length > 0, means there is a error handler
2313
- // here to handle the rejected promise, we should trigger
2314
- // windows.rejectionhandled eventHandler or nodejs rejectionHandled
2315
- // eventHandler
2316
- try {
2317
- const handler = Zone[REJECTION_HANDLED_HANDLER];
2318
- if (handler && typeof handler === 'function') {
2319
- handler.call(this, { rejection: promise[symbolValue], promise: promise });
2320
- }
2321
- }
2322
- catch (err) {
2323
- }
2324
- promise[symbolState] = REJECTED;
2325
- for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {
2326
- if (promise === _uncaughtPromiseErrors[i].promise) {
2327
- _uncaughtPromiseErrors.splice(i, 1);
2328
- }
2329
- }
2330
- }
2331
- }
2332
- function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
2333
- clearRejectedNoCatch(promise);
2334
- const promiseState = promise[symbolState];
2335
- const delegate = promiseState ?
2336
- (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :
2337
- (typeof onRejected === 'function') ? onRejected : forwardRejection;
2338
- zone.scheduleMicroTask(source, () => {
2339
- try {
2340
- const parentPromiseValue = promise[symbolValue];
2341
- const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];
2342
- if (isFinallyPromise) {
2343
- // if the promise is generated from finally call, keep parent promise's state and value
2344
- chainPromise[symbolParentPromiseValue] = parentPromiseValue;
2345
- chainPromise[symbolParentPromiseState] = promiseState;
2346
- }
2347
- // should not pass value to finally callback
2348
- const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?
2349
- [] :
2350
- [parentPromiseValue]);
2351
- resolvePromise(chainPromise, true, value);
2352
- }
2353
- catch (error) {
2354
- // if error occurs, should always return this error
2355
- resolvePromise(chainPromise, false, error);
2356
- }
2357
- }, chainPromise);
2358
- }
2359
- const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';
2360
- const noop = function () { };
2361
- class ZoneAwarePromise {
2362
- static toString() { return ZONE_AWARE_PROMISE_TO_STRING; }
2363
- static resolve(value) {
2364
- return resolvePromise(new this(null), RESOLVED, value);
2365
- }
2366
- static reject(error) {
2367
- return resolvePromise(new this(null), REJECTED, error);
2368
- }
2369
- static race(values) {
2370
- let resolve;
2371
- let reject;
2372
- let promise = new this((res, rej) => {
2373
- resolve = res;
2374
- reject = rej;
2375
- });
2376
- function onResolve(value) { resolve(value); }
2377
- function onReject(error) { reject(error); }
2378
- for (let value of values) {
2379
- if (!isThenable(value)) {
2380
- value = this.resolve(value);
2381
- }
2382
- value.then(onResolve, onReject);
2383
- }
2384
- return promise;
2385
- }
2386
- static all(values) { return ZoneAwarePromise.allWithCallback(values); }
2387
- static allSettled(values) {
2388
- const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;
2389
- return P.allWithCallback(values, {
2390
- thenCallback: (value) => ({ status: 'fulfilled', value }),
2391
- errorCallback: (err) => ({ status: 'rejected', reason: err })
2392
- });
2393
- }
2394
- static allWithCallback(values, callback) {
2395
- let resolve;
2396
- let reject;
2397
- let promise = new this((res, rej) => {
2398
- resolve = res;
2399
- reject = rej;
2400
- });
2401
- // Start at 2 to prevent prematurely resolving if .then is called immediately.
2402
- let unresolvedCount = 2;
2403
- let valueIndex = 0;
2404
- const resolvedValues = [];
2405
- for (let value of values) {
2406
- if (!isThenable(value)) {
2407
- value = this.resolve(value);
2408
- }
2409
- const curValueIndex = valueIndex;
2410
- try {
2411
- value.then((value) => {
2412
- resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;
2413
- unresolvedCount--;
2414
- if (unresolvedCount === 0) {
2415
- resolve(resolvedValues);
2416
- }
2417
- }, (err) => {
2418
- if (!callback) {
2419
- reject(err);
2420
- }
2421
- else {
2422
- resolvedValues[curValueIndex] = callback.errorCallback(err);
2423
- unresolvedCount--;
2424
- if (unresolvedCount === 0) {
2425
- resolve(resolvedValues);
2426
- }
2427
- }
2428
- });
2429
- }
2430
- catch (thenErr) {
2431
- reject(thenErr);
2432
- }
2433
- unresolvedCount++;
2434
- valueIndex++;
2435
- }
2436
- // Make the unresolvedCount zero-based again.
2437
- unresolvedCount -= 2;
2438
- if (unresolvedCount === 0) {
2439
- resolve(resolvedValues);
2440
- }
2441
- return promise;
2442
- }
2443
- constructor(executor) {
2444
- const promise = this;
2445
- if (!(promise instanceof ZoneAwarePromise)) {
2446
- throw new Error('Must be an instanceof Promise.');
2447
- }
2448
- promise[symbolState] = UNRESOLVED;
2449
- promise[symbolValue] = []; // queue;
2450
- try {
2451
- executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));
2452
- }
2453
- catch (error) {
2454
- resolvePromise(promise, false, error);
2455
- }
2456
- }
2457
- get [Symbol.toStringTag]() { return 'Promise'; }
2458
- get [Symbol.species]() { return ZoneAwarePromise; }
2459
- then(onFulfilled, onRejected) {
2460
- let C = this.constructor[Symbol.species];
2461
- if (!C || typeof C !== 'function') {
2462
- C = this.constructor || ZoneAwarePromise;
2463
- }
2464
- const chainPromise = new C(noop);
2465
- const zone = Zone.current;
2466
- if (this[symbolState] == UNRESOLVED) {
2467
- this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
2468
- }
2469
- else {
2470
- scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
2471
- }
2472
- return chainPromise;
2473
- }
2474
- catch(onRejected) {
2475
- return this.then(null, onRejected);
2476
- }
2477
- finally(onFinally) {
2478
- let C = this.constructor[Symbol.species];
2479
- if (!C || typeof C !== 'function') {
2480
- C = ZoneAwarePromise;
2481
- }
2482
- const chainPromise = new C(noop);
2483
- chainPromise[symbolFinally] = symbolFinally;
2484
- const zone = Zone.current;
2485
- if (this[symbolState] == UNRESOLVED) {
2486
- this[symbolValue].push(zone, chainPromise, onFinally, onFinally);
2487
- }
2488
- else {
2489
- scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);
2490
- }
2491
- return chainPromise;
2492
- }
2493
- }
2494
- // Protect against aggressive optimizers dropping seemingly unused properties.
2495
- // E.g. Closure Compiler in advanced mode.
2496
- ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
2497
- ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
2498
- ZoneAwarePromise['race'] = ZoneAwarePromise.race;
2499
- ZoneAwarePromise['all'] = ZoneAwarePromise.all;
2500
- const NativePromise = global[symbolPromise] = global['Promise'];
2501
- const ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');
2502
- let desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');
2503
- if (!desc || desc.configurable) {
2504
- desc && delete desc.writable;
2505
- desc && delete desc.value;
2506
- if (!desc) {
2507
- desc = { configurable: true, enumerable: true };
2508
- }
2509
- desc.get = function () {
2510
- // if we already set ZoneAwarePromise, use patched one
2511
- // otherwise return native one.
2512
- return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];
2513
- };
2514
- desc.set = function (NewNativePromise) {
2515
- if (NewNativePromise === ZoneAwarePromise) {
2516
- // if the NewNativePromise is ZoneAwarePromise
2517
- // save to global
2518
- global[ZONE_AWARE_PROMISE] = NewNativePromise;
2519
- }
2520
- else {
2521
- // if the NewNativePromise is not ZoneAwarePromise
2522
- // for example: after load zone.js, some library just
2523
- // set es6-promise to global, if we set it to global
2524
- // directly, assertZonePatched will fail and angular
2525
- // will not loaded, so we just set the NewNativePromise
2526
- // to global[symbolPromise], so the result is just like
2527
- // we load ES6 Promise before zone.js
2528
- global[symbolPromise] = NewNativePromise;
2529
- if (!NewNativePromise.prototype[symbolThen]) {
2530
- patchThen(NewNativePromise);
2531
- }
2532
- api.setNativePromise(NewNativePromise);
2533
- }
2534
- };
2535
- ObjectDefineProperty(global, 'Promise', desc);
2536
- }
2537
- global['Promise'] = ZoneAwarePromise;
2538
- const symbolThenPatched = __symbol__('thenPatched');
2539
- function patchThen(Ctor) {
2540
- const proto = Ctor.prototype;
2541
- const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');
2542
- if (prop && (prop.writable === false || !prop.configurable)) {
2543
- // check Ctor.prototype.then propertyDescriptor is writable or not
2544
- // in meteor env, writable is false, we should ignore such case
2545
- return;
2546
- }
2547
- const originalThen = proto.then;
2548
- // Keep a reference to the original method.
2549
- proto[symbolThen] = originalThen;
2550
- Ctor.prototype.then = function (onResolve, onReject) {
2551
- const wrapped = new ZoneAwarePromise((resolve, reject) => { originalThen.call(this, resolve, reject); });
2552
- return wrapped.then(onResolve, onReject);
2553
- };
2554
- Ctor[symbolThenPatched] = true;
2555
- }
2556
- api.patchThen = patchThen;
2557
- function zoneify(fn) {
2558
- return function () {
2559
- let resultPromise = fn.apply(this, arguments);
2560
- if (resultPromise instanceof ZoneAwarePromise) {
2561
- return resultPromise;
2562
- }
2563
- let ctor = resultPromise.constructor;
2564
- if (!ctor[symbolThenPatched]) {
2565
- patchThen(ctor);
2566
- }
2567
- return resultPromise;
2568
- };
2569
- }
2570
- if (NativePromise) {
2571
- patchThen(NativePromise);
2572
- const fetch = global['fetch'];
2573
- if (typeof fetch == 'function') {
2574
- global[api.symbol('fetch')] = fetch;
2575
- global['fetch'] = zoneify(fetch);
2576
- }
2577
- }
2578
- // This is not part of public API, but it is useful for tests, so we expose it.
2579
- Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;
2580
- return ZoneAwarePromise;
2581
- });
2582
-
2583
- /**
2584
- * @license
2585
- * Copyright Google Inc. All Rights Reserved.
2586
- *
2587
- * Use of this source code is governed by an MIT-style license that can be
2588
- * found in the LICENSE file at https://angular.io/license
2589
- */
2590
- /**
2591
- * Suppress closure compiler errors about unknown 'Zone' variable
2592
- * @fileoverview
2593
- * @suppress {undefinedVars,globalThis,missingRequire}
2594
- */
2595
- /// <reference types="node"/>
2596
- // issue #989, to reduce bundle size, use short name
2597
- /** Object.getOwnPropertyDescriptor */
2598
- const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2599
- /** Object.defineProperty */
2600
- const ObjectDefineProperty = Object.defineProperty;
2601
- /** Object.getPrototypeOf */
2602
- const ObjectGetPrototypeOf = Object.getPrototypeOf;
2603
- /** Object.create */
2604
- const ObjectCreate = Object.create;
2605
- /** Array.prototype.slice */
2606
- const ArraySlice = Array.prototype.slice;
2607
- /** addEventListener string const */
2608
- const ADD_EVENT_LISTENER_STR = 'addEventListener';
2609
- /** removeEventListener string const */
2610
- const REMOVE_EVENT_LISTENER_STR = 'removeEventListener';
2611
- /** zoneSymbol addEventListener */
2612
- const ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);
2613
- /** zoneSymbol removeEventListener */
2614
- const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);
2615
- /** true string const */
2616
- const TRUE_STR = 'true';
2617
- /** false string const */
2618
- const FALSE_STR = 'false';
2619
- /** Zone symbol prefix string const. */
2620
- const ZONE_SYMBOL_PREFIX = Zone.__symbol__('');
2621
- function wrapWithCurrentZone(callback, source) {
2622
- return Zone.current.wrap(callback, source);
2623
- }
2624
- function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {
2625
- return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);
2626
- }
2627
- const zoneSymbol = Zone.__symbol__;
2628
- const isWindowExists = typeof window !== 'undefined';
2629
- const internalWindow = isWindowExists ? window : undefined;
2630
- const _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;
2631
- const REMOVE_ATTRIBUTE = 'removeAttribute';
2632
- const NULL_ON_PROP_VALUE = [null];
2633
- function bindArguments(args, source) {
2634
- for (let i = args.length - 1; i >= 0; i--) {
2635
- if (typeof args[i] === 'function') {
2636
- args[i] = wrapWithCurrentZone(args[i], source + '_' + i);
2637
- }
2638
- }
2639
- return args;
2640
- }
2641
- function patchPrototype(prototype, fnNames) {
2642
- const source = prototype.constructor['name'];
2643
- for (let i = 0; i < fnNames.length; i++) {
2644
- const name = fnNames[i];
2645
- const delegate = prototype[name];
2646
- if (delegate) {
2647
- const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);
2648
- if (!isPropertyWritable(prototypeDesc)) {
2649
- continue;
2650
- }
2651
- prototype[name] = ((delegate) => {
2652
- const patched = function () {
2653
- return delegate.apply(this, bindArguments(arguments, source + '.' + name));
2654
- };
2655
- attachOriginToPatched(patched, delegate);
2656
- return patched;
2657
- })(delegate);
2658
- }
2659
- }
2660
- }
2661
- function isPropertyWritable(propertyDesc) {
2662
- if (!propertyDesc) {
2663
- return true;
2664
- }
2665
- if (propertyDesc.writable === false) {
2666
- return false;
2667
- }
2668
- return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');
2669
- }
2670
- const isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);
2671
- // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
2672
- // this code.
2673
- const isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&
2674
- {}.toString.call(_global.process) === '[object process]');
2675
- const isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);
2676
- // we are in electron of nw, so we are both browser and nodejs
2677
- // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
2678
- // this code.
2679
- const isMix = typeof _global.process !== 'undefined' &&
2680
- {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&
2681
- !!(isWindowExists && internalWindow['HTMLElement']);
2682
- const zoneSymbolEventNames = {};
2683
- const wrapFn = function (event) {
2684
- // https://github.com/angular/zone.js/issues/911, in IE, sometimes
2685
- // event will be undefined, so we need to use window.event
2686
- event = event || _global.event;
2687
- if (!event) {
2688
- return;
2689
- }
2690
- let eventNameSymbol = zoneSymbolEventNames[event.type];
2691
- if (!eventNameSymbol) {
2692
- eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);
2693
- }
2694
- const target = this || event.target || _global;
2695
- const listener = target[eventNameSymbol];
2696
- let result;
2697
- if (isBrowser && target === internalWindow && event.type === 'error') {
2698
- // window.onerror have different signiture
2699
- // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror
2700
- // and onerror callback will prevent default when callback return true
2701
- const errorEvent = event;
2702
- result = listener &&
2703
- listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);
2704
- if (result === true) {
2705
- event.preventDefault();
2706
- }
2707
- }
2708
- else {
2709
- result = listener && listener.apply(this, arguments);
2710
- if (result != undefined && !result) {
2711
- event.preventDefault();
2712
- }
2713
- }
2714
- return result;
2715
- };
2716
- function patchProperty(obj, prop, prototype) {
2717
- let desc = ObjectGetOwnPropertyDescriptor(obj, prop);
2718
- if (!desc && prototype) {
2719
- // when patch window object, use prototype to check prop exist or not
2720
- const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);
2721
- if (prototypeDesc) {
2722
- desc = { enumerable: true, configurable: true };
2723
- }
2724
- }
2725
- // if the descriptor not exists or is not configurable
2726
- // just return
2727
- if (!desc || !desc.configurable) {
2728
- return;
2729
- }
2730
- const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');
2731
- if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {
2732
- return;
2733
- }
2734
- // A property descriptor cannot have getter/setter and be writable
2735
- // deleting the writable and value properties avoids this error:
2736
- //
2737
- // TypeError: property descriptors must not specify a value or be writable when a
2738
- // getter or setter has been specified
2739
- delete desc.writable;
2740
- delete desc.value;
2741
- const originalDescGet = desc.get;
2742
- const originalDescSet = desc.set;
2743
- // substr(2) cuz 'onclick' -> 'click', etc
2744
- const eventName = prop.substr(2);
2745
- let eventNameSymbol = zoneSymbolEventNames[eventName];
2746
- if (!eventNameSymbol) {
2747
- eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);
2748
- }
2749
- desc.set = function (newValue) {
2750
- // in some of windows's onproperty callback, this is undefined
2751
- // so we need to check it
2752
- let target = this;
2753
- if (!target && obj === _global) {
2754
- target = _global;
2755
- }
2756
- if (!target) {
2757
- return;
2758
- }
2759
- let previousValue = target[eventNameSymbol];
2760
- if (previousValue) {
2761
- target.removeEventListener(eventName, wrapFn);
2762
- }
2763
- // issue #978, when onload handler was added before loading zone.js
2764
- // we should remove it with originalDescSet
2765
- if (originalDescSet) {
2766
- originalDescSet.apply(target, NULL_ON_PROP_VALUE);
2767
- }
2768
- if (typeof newValue === 'function') {
2769
- target[eventNameSymbol] = newValue;
2770
- target.addEventListener(eventName, wrapFn, false);
2771
- }
2772
- else {
2773
- target[eventNameSymbol] = null;
2774
- }
2775
- };
2776
- // The getter would return undefined for unassigned properties but the default value of an
2777
- // unassigned property is null
2778
- desc.get = function () {
2779
- // in some of windows's onproperty callback, this is undefined
2780
- // so we need to check it
2781
- let target = this;
2782
- if (!target && obj === _global) {
2783
- target = _global;
2784
- }
2785
- if (!target) {
2786
- return null;
2787
- }
2788
- const listener = target[eventNameSymbol];
2789
- if (listener) {
2790
- return listener;
2791
- }
2792
- else if (originalDescGet) {
2793
- // result will be null when use inline event attribute,
2794
- // such as <button onclick="func();">OK</button>
2795
- // because the onclick function is internal raw uncompiled handler
2796
- // the onclick will be evaluated when first time event was triggered or
2797
- // the property is accessed, https://github.com/angular/zone.js/issues/525
2798
- // so we should use original native get to retrieve the handler
2799
- let value = originalDescGet && originalDescGet.call(this);
2800
- if (value) {
2801
- desc.set.call(this, value);
2802
- if (typeof target[REMOVE_ATTRIBUTE] === 'function') {
2803
- target.removeAttribute(prop);
2804
- }
2805
- return value;
2806
- }
2807
- }
2808
- return null;
2809
- };
2810
- ObjectDefineProperty(obj, prop, desc);
2811
- obj[onPropPatchedSymbol] = true;
2812
- }
2813
- function patchOnProperties(obj, properties, prototype) {
2814
- if (properties) {
2815
- for (let i = 0; i < properties.length; i++) {
2816
- patchProperty(obj, 'on' + properties[i], prototype);
2817
- }
2818
- }
2819
- else {
2820
- const onProperties = [];
2821
- for (const prop in obj) {
2822
- if (prop.substr(0, 2) == 'on') {
2823
- onProperties.push(prop);
2824
- }
2825
- }
2826
- for (let j = 0; j < onProperties.length; j++) {
2827
- patchProperty(obj, onProperties[j], prototype);
2828
- }
2829
- }
2830
- }
2831
- const originalInstanceKey = zoneSymbol('originalInstance');
2832
- // wrap some native API on `window`
2833
- function patchClass(className) {
2834
- const OriginalClass = _global[className];
2835
- if (!OriginalClass)
2836
- return;
2837
- // keep original class in global
2838
- _global[zoneSymbol(className)] = OriginalClass;
2839
- _global[className] = function () {
2840
- const a = bindArguments(arguments, className);
2841
- switch (a.length) {
2842
- case 0:
2843
- this[originalInstanceKey] = new OriginalClass();
2844
- break;
2845
- case 1:
2846
- this[originalInstanceKey] = new OriginalClass(a[0]);
2847
- break;
2848
- case 2:
2849
- this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
2850
- break;
2851
- case 3:
2852
- this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
2853
- break;
2854
- case 4:
2855
- this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
2856
- break;
2857
- default:
2858
- throw new Error('Arg list too long.');
2859
- }
2860
- };
2861
- // attach original delegate to patched function
2862
- attachOriginToPatched(_global[className], OriginalClass);
2863
- const instance = new OriginalClass(function () { });
2864
- let prop;
2865
- for (prop in instance) {
2866
- // https://bugs.webkit.org/show_bug.cgi?id=44721
2867
- if (className === 'XMLHttpRequest' && prop === 'responseBlob')
2868
- continue;
2869
- (function (prop) {
2870
- if (typeof instance[prop] === 'function') {
2871
- _global[className].prototype[prop] = function () {
2872
- return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
2873
- };
2874
- }
2875
- else {
2876
- ObjectDefineProperty(_global[className].prototype, prop, {
2877
- set: function (fn) {
2878
- if (typeof fn === 'function') {
2879
- this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);
2880
- // keep callback in wrapped function so we can
2881
- // use it in Function.prototype.toString to return
2882
- // the native one.
2883
- attachOriginToPatched(this[originalInstanceKey][prop], fn);
2884
- }
2885
- else {
2886
- this[originalInstanceKey][prop] = fn;
2887
- }
2888
- },
2889
- get: function () { return this[originalInstanceKey][prop]; }
2890
- });
2891
- }
2892
- }(prop));
2893
- }
2894
- for (prop in OriginalClass) {
2895
- if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {
2896
- _global[className][prop] = OriginalClass[prop];
2897
- }
2898
- }
2899
- }
2900
- function copySymbolProperties(src, dest) {
2901
- if (typeof Object.getOwnPropertySymbols !== 'function') {
2902
- return;
2903
- }
2904
- const symbols = Object.getOwnPropertySymbols(src);
2905
- symbols.forEach((symbol) => {
2906
- const desc = Object.getOwnPropertyDescriptor(src, symbol);
2907
- Object.defineProperty(dest, symbol, {
2908
- get: function () { return src[symbol]; },
2909
- set: function (value) {
2910
- if (desc && (!desc.writable || typeof desc.set !== 'function')) {
2911
- // if src[symbol] is not writable or not have a setter, just return
2912
- return;
2913
- }
2914
- src[symbol] = value;
2915
- },
2916
- enumerable: desc ? desc.enumerable : true,
2917
- configurable: desc ? desc.configurable : true
2918
- });
2919
- });
2920
- }
2921
- let shouldCopySymbolProperties = false;
2922
- function patchMethod(target, name, patchFn) {
2923
- let proto = target;
2924
- while (proto && !proto.hasOwnProperty(name)) {
2925
- proto = ObjectGetPrototypeOf(proto);
2926
- }
2927
- if (!proto && target[name]) {
2928
- // somehow we did not find it, but we can see it. This happens on IE for Window properties.
2929
- proto = target;
2930
- }
2931
- const delegateName = zoneSymbol(name);
2932
- let delegate = null;
2933
- if (proto && !(delegate = proto[delegateName])) {
2934
- delegate = proto[delegateName] = proto[name];
2935
- // check whether proto[name] is writable
2936
- // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob
2937
- const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
2938
- if (isPropertyWritable(desc)) {
2939
- const patchDelegate = patchFn(delegate, delegateName, name);
2940
- proto[name] = function () { return patchDelegate(this, arguments); };
2941
- attachOriginToPatched(proto[name], delegate);
2942
- if (shouldCopySymbolProperties) {
2943
- copySymbolProperties(delegate, proto[name]);
2944
- }
2945
- }
2946
- }
2947
- return delegate;
2948
- }
2949
- // TODO: @JiaLiPassion, support cancel task later if necessary
2950
- function patchMacroTask(obj, funcName, metaCreator) {
2951
- let setNative = null;
2952
- function scheduleTask(task) {
2953
- const data = task.data;
2954
- data.args[data.cbIdx] = function () { task.invoke.apply(this, arguments); };
2955
- setNative.apply(data.target, data.args);
2956
- return task;
2957
- }
2958
- setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {
2959
- const meta = metaCreator(self, args);
2960
- if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {
2961
- return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);
2962
- }
2963
- else {
2964
- // cause an error by calling it directly.
2965
- return delegate.apply(self, args);
2966
- }
2967
- });
2968
- }
2969
- function attachOriginToPatched(patched, original) {
2970
- patched[zoneSymbol('OriginalDelegate')] = original;
2971
- }
2972
- let isDetectedIEOrEdge = false;
2973
- let ieOrEdge = false;
2974
- function isIE() {
2975
- try {
2976
- const ua = internalWindow.navigator.userAgent;
2977
- if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {
2978
- return true;
2979
- }
2980
- }
2981
- catch (error) {
2982
- }
2983
- return false;
2984
- }
2985
- function isIEOrEdge() {
2986
- if (isDetectedIEOrEdge) {
2987
- return ieOrEdge;
2988
- }
2989
- isDetectedIEOrEdge = true;
2990
- try {
2991
- const ua = internalWindow.navigator.userAgent;
2992
- if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {
2993
- ieOrEdge = true;
2994
- }
2995
- }
2996
- catch (error) {
2997
- }
2998
- return ieOrEdge;
2999
- }
3000
-
3001
- /**
3002
- * @license
3003
- * Copyright Google Inc. All Rights Reserved.
3004
- *
3005
- * Use of this source code is governed by an MIT-style license that can be
3006
- * found in the LICENSE file at https://angular.io/license
3007
- */
3008
- // override Function.prototype.toString to make zone.js patched function
3009
- // look like native function
3010
- Zone.__load_patch('toString', (global) => {
3011
- // patch Func.prototype.toString to let them look like native
3012
- const originalFunctionToString = Function.prototype.toString;
3013
- const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');
3014
- const PROMISE_SYMBOL = zoneSymbol('Promise');
3015
- const ERROR_SYMBOL = zoneSymbol('Error');
3016
- const newFunctionToString = function toString() {
3017
- if (typeof this === 'function') {
3018
- const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
3019
- if (originalDelegate) {
3020
- if (typeof originalDelegate === 'function') {
3021
- return originalFunctionToString.call(originalDelegate);
3022
- }
3023
- else {
3024
- return Object.prototype.toString.call(originalDelegate);
3025
- }
3026
- }
3027
- if (this === Promise) {
3028
- const nativePromise = global[PROMISE_SYMBOL];
3029
- if (nativePromise) {
3030
- return originalFunctionToString.call(nativePromise);
3031
- }
3032
- }
3033
- if (this === Error) {
3034
- const nativeError = global[ERROR_SYMBOL];
3035
- if (nativeError) {
3036
- return originalFunctionToString.call(nativeError);
3037
- }
3038
- }
3039
- }
3040
- return originalFunctionToString.call(this);
3041
- };
3042
- newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;
3043
- Function.prototype.toString = newFunctionToString;
3044
- // patch Object.prototype.toString to let them look like native
3045
- const originalObjectToString = Object.prototype.toString;
3046
- const PROMISE_OBJECT_TO_STRING = '[object Promise]';
3047
- Object.prototype.toString = function () {
3048
- if (this instanceof Promise) {
3049
- return PROMISE_OBJECT_TO_STRING;
3050
- }
3051
- return originalObjectToString.call(this);
3052
- };
3053
- });
3054
-
3055
- /**
3056
- * @license
3057
- * Copyright Google Inc. All Rights Reserved.
3058
- *
3059
- * Use of this source code is governed by an MIT-style license that can be
3060
- * found in the LICENSE file at https://angular.io/license
3061
- */
3062
- let passiveSupported = false;
3063
- if (typeof window !== 'undefined') {
3064
- try {
3065
- const options = Object.defineProperty({}, 'passive', { get: function () { passiveSupported = true; } });
3066
- window.addEventListener('test', options, options);
3067
- window.removeEventListener('test', options, options);
3068
- }
3069
- catch (err) {
3070
- passiveSupported = false;
3071
- }
3072
- }
3073
- // an identifier to tell ZoneTask do not create a new invoke closure
3074
- const OPTIMIZED_ZONE_EVENT_TASK_DATA = {
3075
- useG: true
3076
- };
3077
- const zoneSymbolEventNames$1 = {};
3078
- const globalSources = {};
3079
- const EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\w+)(true|false)$');
3080
- const IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');
3081
- function prepareEventNames(eventName, eventNameToString) {
3082
- const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;
3083
- const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;
3084
- const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
3085
- const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
3086
- zoneSymbolEventNames$1[eventName] = {};
3087
- zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
3088
- zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
3089
- }
3090
- function patchEventTarget(_global, apis, patchOptions) {
3091
- const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;
3092
- const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;
3093
- const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';
3094
- const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';
3095
- const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
3096
- const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';
3097
- const PREPEND_EVENT_LISTENER = 'prependListener';
3098
- const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';
3099
- const invokeTask = function (task, target, event) {
3100
- // for better performance, check isRemoved which is set
3101
- // by removeEventListener
3102
- if (task.isRemoved) {
3103
- return;
3104
- }
3105
- const delegate = task.callback;
3106
- if (typeof delegate === 'object' && delegate.handleEvent) {
3107
- // create the bind version of handleEvent when invoke
3108
- task.callback = (event) => delegate.handleEvent(event);
3109
- task.originalDelegate = delegate;
3110
- }
3111
- // invoke static task.invoke
3112
- task.invoke(task, target, [event]);
3113
- const options = task.options;
3114
- if (options && typeof options === 'object' && options.once) {
3115
- // if options.once is true, after invoke once remove listener here
3116
- // only browser need to do this, nodejs eventEmitter will cal removeListener
3117
- // inside EventEmitter.once
3118
- const delegate = task.originalDelegate ? task.originalDelegate : task.callback;
3119
- target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);
3120
- }
3121
- };
3122
- // global shared zoneAwareCallback to handle all event callback with capture = false
3123
- const globalZoneAwareCallback = function (event) {
3124
- // https://github.com/angular/zone.js/issues/911, in IE, sometimes
3125
- // event will be undefined, so we need to use window.event
3126
- event = event || _global.event;
3127
- if (!event) {
3128
- return;
3129
- }
3130
- // event.target is needed for Samsung TV and SourceBuffer
3131
- // || global is needed https://github.com/angular/zone.js/issues/190
3132
- const target = this || event.target || _global;
3133
- const tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];
3134
- if (tasks) {
3135
- // invoke all tasks which attached to current target with given event.type and capture = false
3136
- // for performance concern, if task.length === 1, just invoke
3137
- if (tasks.length === 1) {
3138
- invokeTask(tasks[0], target, event);
3139
- }
3140
- else {
3141
- // https://github.com/angular/zone.js/issues/836
3142
- // copy the tasks array before invoke, to avoid
3143
- // the callback will remove itself or other listener
3144
- const copyTasks = tasks.slice();
3145
- for (let i = 0; i < copyTasks.length; i++) {
3146
- if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
3147
- break;
3148
- }
3149
- invokeTask(copyTasks[i], target, event);
3150
- }
3151
- }
3152
- }
3153
- };
3154
- // global shared zoneAwareCallback to handle all event callback with capture = true
3155
- const globalZoneAwareCaptureCallback = function (event) {
3156
- // https://github.com/angular/zone.js/issues/911, in IE, sometimes
3157
- // event will be undefined, so we need to use window.event
3158
- event = event || _global.event;
3159
- if (!event) {
3160
- return;
3161
- }
3162
- // event.target is needed for Samsung TV and SourceBuffer
3163
- // || global is needed https://github.com/angular/zone.js/issues/190
3164
- const target = this || event.target || _global;
3165
- const tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];
3166
- if (tasks) {
3167
- // invoke all tasks which attached to current target with given event.type and capture = false
3168
- // for performance concern, if task.length === 1, just invoke
3169
- if (tasks.length === 1) {
3170
- invokeTask(tasks[0], target, event);
3171
- }
3172
- else {
3173
- // https://github.com/angular/zone.js/issues/836
3174
- // copy the tasks array before invoke, to avoid
3175
- // the callback will remove itself or other listener
3176
- const copyTasks = tasks.slice();
3177
- for (let i = 0; i < copyTasks.length; i++) {
3178
- if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
3179
- break;
3180
- }
3181
- invokeTask(copyTasks[i], target, event);
3182
- }
3183
- }
3184
- }
3185
- };
3186
- function patchEventTargetMethods(obj, patchOptions) {
3187
- if (!obj) {
3188
- return false;
3189
- }
3190
- let useGlobalCallback = true;
3191
- if (patchOptions && patchOptions.useG !== undefined) {
3192
- useGlobalCallback = patchOptions.useG;
3193
- }
3194
- const validateHandler = patchOptions && patchOptions.vh;
3195
- let checkDuplicate = true;
3196
- if (patchOptions && patchOptions.chkDup !== undefined) {
3197
- checkDuplicate = patchOptions.chkDup;
3198
- }
3199
- let returnTarget = false;
3200
- if (patchOptions && patchOptions.rt !== undefined) {
3201
- returnTarget = patchOptions.rt;
3202
- }
3203
- let proto = obj;
3204
- while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
3205
- proto = ObjectGetPrototypeOf(proto);
3206
- }
3207
- if (!proto && obj[ADD_EVENT_LISTENER]) {
3208
- // somehow we did not find it, but we can see it. This happens on IE for Window properties.
3209
- proto = obj;
3210
- }
3211
- if (!proto) {
3212
- return false;
3213
- }
3214
- if (proto[zoneSymbolAddEventListener]) {
3215
- return false;
3216
- }
3217
- const eventNameToString = patchOptions && patchOptions.eventNameToString;
3218
- // a shared global taskData to pass data for scheduleEventTask
3219
- // so we do not need to create a new object just for pass some data
3220
- const taskData = {};
3221
- const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];
3222
- const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =
3223
- proto[REMOVE_EVENT_LISTENER];
3224
- const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =
3225
- proto[LISTENERS_EVENT_LISTENER];
3226
- const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =
3227
- proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];
3228
- let nativePrependEventListener;
3229
- if (patchOptions && patchOptions.prepend) {
3230
- nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =
3231
- proto[patchOptions.prepend];
3232
- }
3233
- /**
3234
- * This util function will build an option object with passive option
3235
- * to handle all possible input from the user.
3236
- */
3237
- function buildEventListenerOptions(options, passive) {
3238
- if (!passiveSupported && typeof options === 'object' && options) {
3239
- // doesn't support passive but user want to pass an object as options.
3240
- // this will not work on some old browser, so we just pass a boolean
3241
- // as useCapture parameter
3242
- return !!options.capture;
3243
- }
3244
- if (!passiveSupported || !passive) {
3245
- return options;
3246
- }
3247
- if (typeof options === 'boolean') {
3248
- return { capture: options, passive: true };
3249
- }
3250
- if (!options) {
3251
- return { passive: true };
3252
- }
3253
- if (typeof options === 'object' && options.passive !== false) {
3254
- return Object.assign(Object.assign({}, options), { passive: true });
3255
- }
3256
- return options;
3257
- }
3258
- const customScheduleGlobal = function (task) {
3259
- // if there is already a task for the eventName + capture,
3260
- // just return, because we use the shared globalZoneAwareCallback here.
3261
- if (taskData.isExisting) {
3262
- return;
3263
- }
3264
- return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);
3265
- };
3266
- const customCancelGlobal = function (task) {
3267
- // if task is not marked as isRemoved, this call is directly
3268
- // from Zone.prototype.cancelTask, we should remove the task
3269
- // from tasksList of target first
3270
- if (!task.isRemoved) {
3271
- const symbolEventNames = zoneSymbolEventNames$1[task.eventName];
3272
- let symbolEventName;
3273
- if (symbolEventNames) {
3274
- symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
3275
- }
3276
- const existingTasks = symbolEventName && task.target[symbolEventName];
3277
- if (existingTasks) {
3278
- for (let i = 0; i < existingTasks.length; i++) {
3279
- const existingTask = existingTasks[i];
3280
- if (existingTask === task) {
3281
- existingTasks.splice(i, 1);
3282
- // set isRemoved to data for faster invokeTask check
3283
- task.isRemoved = true;
3284
- if (existingTasks.length === 0) {
3285
- // all tasks for the eventName + capture have gone,
3286
- // remove globalZoneAwareCallback and remove the task cache from target
3287
- task.allRemoved = true;
3288
- task.target[symbolEventName] = null;
3289
- }
3290
- break;
3291
- }
3292
- }
3293
- }
3294
- }
3295
- // if all tasks for the eventName + capture have gone,
3296
- // we will really remove the global event callback,
3297
- // if not, return
3298
- if (!task.allRemoved) {
3299
- return;
3300
- }
3301
- return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);
3302
- };
3303
- const customScheduleNonGlobal = function (task) {
3304
- return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
3305
- };
3306
- const customSchedulePrepend = function (task) {
3307
- return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
3308
- };
3309
- const customCancelNonGlobal = function (task) {
3310
- return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);
3311
- };
3312
- const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;
3313
- const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;
3314
- const compareTaskCallbackVsDelegate = function (task, delegate) {
3315
- const typeOfDelegate = typeof delegate;
3316
- return (typeOfDelegate === 'function' && task.callback === delegate) ||
3317
- (typeOfDelegate === 'object' && task.originalDelegate === delegate);
3318
- };
3319
- const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;
3320
- const blackListedEvents = Zone[zoneSymbol('BLACK_LISTED_EVENTS')];
3321
- const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];
3322
- const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {
3323
- return function () {
3324
- const target = this || _global;
3325
- let eventName = arguments[0];
3326
- if (patchOptions && patchOptions.transferEventName) {
3327
- eventName = patchOptions.transferEventName(eventName);
3328
- }
3329
- let delegate = arguments[1];
3330
- if (!delegate) {
3331
- return nativeListener.apply(this, arguments);
3332
- }
3333
- if (isNode && eventName === 'uncaughtException') {
3334
- // don't patch uncaughtException of nodejs to prevent endless loop
3335
- return nativeListener.apply(this, arguments);
3336
- }
3337
- // don't create the bind delegate function for handleEvent
3338
- // case here to improve addEventListener performance
3339
- // we will create the bind delegate when invoke
3340
- let isHandleEvent = false;
3341
- if (typeof delegate !== 'function') {
3342
- if (!delegate.handleEvent) {
3343
- return nativeListener.apply(this, arguments);
3344
- }
3345
- isHandleEvent = true;
3346
- }
3347
- if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {
3348
- return;
3349
- }
3350
- const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;
3351
- const options = buildEventListenerOptions(arguments[2], passive);
3352
- if (blackListedEvents) {
3353
- // check black list
3354
- for (let i = 0; i < blackListedEvents.length; i++) {
3355
- if (eventName === blackListedEvents[i]) {
3356
- if (passive) {
3357
- return nativeListener.call(target, eventName, delegate, options);
3358
- }
3359
- else {
3360
- return nativeListener.apply(this, arguments);
3361
- }
3362
- }
3363
- }
3364
- }
3365
- const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;
3366
- const once = options && typeof options === 'object' ? options.once : false;
3367
- const zone = Zone.current;
3368
- let symbolEventNames = zoneSymbolEventNames$1[eventName];
3369
- if (!symbolEventNames) {
3370
- prepareEventNames(eventName, eventNameToString);
3371
- symbolEventNames = zoneSymbolEventNames$1[eventName];
3372
- }
3373
- const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
3374
- let existingTasks = target[symbolEventName];
3375
- let isExisting = false;
3376
- if (existingTasks) {
3377
- // already have task registered
3378
- isExisting = true;
3379
- if (checkDuplicate) {
3380
- for (let i = 0; i < existingTasks.length; i++) {
3381
- if (compare(existingTasks[i], delegate)) {
3382
- // same callback, same capture, same event name, just return
3383
- return;
3384
- }
3385
- }
3386
- }
3387
- }
3388
- else {
3389
- existingTasks = target[symbolEventName] = [];
3390
- }
3391
- let source;
3392
- const constructorName = target.constructor['name'];
3393
- const targetSource = globalSources[constructorName];
3394
- if (targetSource) {
3395
- source = targetSource[eventName];
3396
- }
3397
- if (!source) {
3398
- source = constructorName + addSource +
3399
- (eventNameToString ? eventNameToString(eventName) : eventName);
3400
- }
3401
- // do not create a new object as task.data to pass those things
3402
- // just use the global shared one
3403
- taskData.options = options;
3404
- if (once) {
3405
- // if addEventListener with once options, we don't pass it to
3406
- // native addEventListener, instead we keep the once setting
3407
- // and handle ourselves.
3408
- taskData.options.once = false;
3409
- }
3410
- taskData.target = target;
3411
- taskData.capture = capture;
3412
- taskData.eventName = eventName;
3413
- taskData.isExisting = isExisting;
3414
- const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;
3415
- // keep taskData into data to allow onScheduleEventTask to access the task information
3416
- if (data) {
3417
- data.taskData = taskData;
3418
- }
3419
- const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);
3420
- // should clear taskData.target to avoid memory leak
3421
- // issue, https://github.com/angular/angular/issues/20442
3422
- taskData.target = null;
3423
- // need to clear up taskData because it is a global object
3424
- if (data) {
3425
- data.taskData = null;
3426
- }
3427
- // have to save those information to task in case
3428
- // application may call task.zone.cancelTask() directly
3429
- if (once) {
3430
- options.once = true;
3431
- }
3432
- if (!(!passiveSupported && typeof task.options === 'boolean')) {
3433
- // if not support passive, and we pass an option object
3434
- // to addEventListener, we should save the options to task
3435
- task.options = options;
3436
- }
3437
- task.target = target;
3438
- task.capture = capture;
3439
- task.eventName = eventName;
3440
- if (isHandleEvent) {
3441
- // save original delegate for compare to check duplicate
3442
- task.originalDelegate = delegate;
3443
- }
3444
- if (!prepend) {
3445
- existingTasks.push(task);
3446
- }
3447
- else {
3448
- existingTasks.unshift(task);
3449
- }
3450
- if (returnTarget) {
3451
- return target;
3452
- }
3453
- };
3454
- };
3455
- proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);
3456
- if (nativePrependEventListener) {
3457
- proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);
3458
- }
3459
- proto[REMOVE_EVENT_LISTENER] = function () {
3460
- const target = this || _global;
3461
- let eventName = arguments[0];
3462
- if (patchOptions && patchOptions.transferEventName) {
3463
- eventName = patchOptions.transferEventName(eventName);
3464
- }
3465
- const options = arguments[2];
3466
- const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;
3467
- const delegate = arguments[1];
3468
- if (!delegate) {
3469
- return nativeRemoveEventListener.apply(this, arguments);
3470
- }
3471
- if (validateHandler &&
3472
- !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {
3473
- return;
3474
- }
3475
- const symbolEventNames = zoneSymbolEventNames$1[eventName];
3476
- let symbolEventName;
3477
- if (symbolEventNames) {
3478
- symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
3479
- }
3480
- const existingTasks = symbolEventName && target[symbolEventName];
3481
- if (existingTasks) {
3482
- for (let i = 0; i < existingTasks.length; i++) {
3483
- const existingTask = existingTasks[i];
3484
- if (compare(existingTask, delegate)) {
3485
- existingTasks.splice(i, 1);
3486
- // set isRemoved to data for faster invokeTask check
3487
- existingTask.isRemoved = true;
3488
- if (existingTasks.length === 0) {
3489
- // all tasks for the eventName + capture have gone,
3490
- // remove globalZoneAwareCallback and remove the task cache from target
3491
- existingTask.allRemoved = true;
3492
- target[symbolEventName] = null;
3493
- // in the target, we have an event listener which is added by on_property
3494
- // such as target.onclick = function() {}, so we need to clear this internal
3495
- // property too if all delegates all removed
3496
- if (typeof eventName === 'string') {
3497
- const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;
3498
- target[onPropertySymbol] = null;
3499
- }
3500
- }
3501
- existingTask.zone.cancelTask(existingTask);
3502
- if (returnTarget) {
3503
- return target;
3504
- }
3505
- return;
3506
- }
3507
- }
3508
- }
3509
- // issue 930, didn't find the event name or callback
3510
- // from zone kept existingTasks, the callback maybe
3511
- // added outside of zone, we need to call native removeEventListener
3512
- // to try to remove it.
3513
- return nativeRemoveEventListener.apply(this, arguments);
3514
- };
3515
- proto[LISTENERS_EVENT_LISTENER] = function () {
3516
- const target = this || _global;
3517
- let eventName = arguments[0];
3518
- if (patchOptions && patchOptions.transferEventName) {
3519
- eventName = patchOptions.transferEventName(eventName);
3520
- }
3521
- const listeners = [];
3522
- const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);
3523
- for (let i = 0; i < tasks.length; i++) {
3524
- const task = tasks[i];
3525
- let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
3526
- listeners.push(delegate);
3527
- }
3528
- return listeners;
3529
- };
3530
- proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {
3531
- const target = this || _global;
3532
- let eventName = arguments[0];
3533
- if (!eventName) {
3534
- const keys = Object.keys(target);
3535
- for (let i = 0; i < keys.length; i++) {
3536
- const prop = keys[i];
3537
- const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
3538
- let evtName = match && match[1];
3539
- // in nodejs EventEmitter, removeListener event is
3540
- // used for monitoring the removeListener call,
3541
- // so just keep removeListener eventListener until
3542
- // all other eventListeners are removed
3543
- if (evtName && evtName !== 'removeListener') {
3544
- this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);
3545
- }
3546
- }
3547
- // remove removeListener listener finally
3548
- this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');
3549
- }
3550
- else {
3551
- if (patchOptions && patchOptions.transferEventName) {
3552
- eventName = patchOptions.transferEventName(eventName);
3553
- }
3554
- const symbolEventNames = zoneSymbolEventNames$1[eventName];
3555
- if (symbolEventNames) {
3556
- const symbolEventName = symbolEventNames[FALSE_STR];
3557
- const symbolCaptureEventName = symbolEventNames[TRUE_STR];
3558
- const tasks = target[symbolEventName];
3559
- const captureTasks = target[symbolCaptureEventName];
3560
- if (tasks) {
3561
- const removeTasks = tasks.slice();
3562
- for (let i = 0; i < removeTasks.length; i++) {
3563
- const task = removeTasks[i];
3564
- let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
3565
- this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
3566
- }
3567
- }
3568
- if (captureTasks) {
3569
- const removeTasks = captureTasks.slice();
3570
- for (let i = 0; i < removeTasks.length; i++) {
3571
- const task = removeTasks[i];
3572
- let delegate = task.originalDelegate ? task.originalDelegate : task.callback;
3573
- this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
3574
- }
3575
- }
3576
- }
3577
- }
3578
- if (returnTarget) {
3579
- return this;
3580
- }
3581
- };
3582
- // for native toString patch
3583
- attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);
3584
- attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);
3585
- if (nativeRemoveAllListeners) {
3586
- attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);
3587
- }
3588
- if (nativeListeners) {
3589
- attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);
3590
- }
3591
- return true;
3592
- }
3593
- let results = [];
3594
- for (let i = 0; i < apis.length; i++) {
3595
- results[i] = patchEventTargetMethods(apis[i], patchOptions);
3596
- }
3597
- return results;
3598
- }
3599
- function findEventTasks(target, eventName) {
3600
- if (!eventName) {
3601
- const foundTasks = [];
3602
- for (let prop in target) {
3603
- const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
3604
- let evtName = match && match[1];
3605
- if (evtName && (!eventName || evtName === eventName)) {
3606
- const tasks = target[prop];
3607
- if (tasks) {
3608
- for (let i = 0; i < tasks.length; i++) {
3609
- foundTasks.push(tasks[i]);
3610
- }
3611
- }
3612
- }
3613
- }
3614
- return foundTasks;
3615
- }
3616
- let symbolEventName = zoneSymbolEventNames$1[eventName];
3617
- if (!symbolEventName) {
3618
- prepareEventNames(eventName);
3619
- symbolEventName = zoneSymbolEventNames$1[eventName];
3620
- }
3621
- const captureFalseTasks = target[symbolEventName[FALSE_STR]];
3622
- const captureTrueTasks = target[symbolEventName[TRUE_STR]];
3623
- if (!captureFalseTasks) {
3624
- return captureTrueTasks ? captureTrueTasks.slice() : [];
3625
- }
3626
- else {
3627
- return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :
3628
- captureFalseTasks.slice();
3629
- }
3630
- }
3631
- function patchEventPrototype(global, api) {
3632
- const Event = global['Event'];
3633
- if (Event && Event.prototype) {
3634
- api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {
3635
- self[IMMEDIATE_PROPAGATION_SYMBOL] = true;
3636
- // we need to call the native stopImmediatePropagation
3637
- // in case in some hybrid application, some part of
3638
- // application will be controlled by zone, some are not
3639
- delegate && delegate.apply(self, args);
3640
- });
3641
- }
3642
- }
3643
-
3644
- /**
3645
- * @license
3646
- * Copyright Google Inc. All Rights Reserved.
3647
- *
3648
- * Use of this source code is governed by an MIT-style license that can be
3649
- * found in the LICENSE file at https://angular.io/license
3650
- */
3651
- function patchCallbacks(api, target, targetName, method, callbacks) {
3652
- const symbol = Zone.__symbol__(method);
3653
- if (target[symbol]) {
3654
- return;
3655
- }
3656
- const nativeDelegate = target[symbol] = target[method];
3657
- target[method] = function (name, opts, options) {
3658
- if (opts && opts.prototype) {
3659
- callbacks.forEach(function (callback) {
3660
- const source = `${targetName}.${method}::` + callback;
3661
- const prototype = opts.prototype;
3662
- if (prototype.hasOwnProperty(callback)) {
3663
- const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);
3664
- if (descriptor && descriptor.value) {
3665
- descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);
3666
- api._redefineProperty(opts.prototype, callback, descriptor);
3667
- }
3668
- else if (prototype[callback]) {
3669
- prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
3670
- }
3671
- }
3672
- else if (prototype[callback]) {
3673
- prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
3674
- }
3675
- });
3676
- }
3677
- return nativeDelegate.call(target, name, opts, options);
3678
- };
3679
- api.attachOriginToPatched(target[method], nativeDelegate);
3680
- }
3681
-
3682
- /**
3683
- * @license
3684
- * Copyright Google Inc. All Rights Reserved.
3685
- *
3686
- * Use of this source code is governed by an MIT-style license that can be
3687
- * found in the LICENSE file at https://angular.io/license
3688
- */
3689
- const globalEventHandlersEventNames = [
3690
- 'abort',
3691
- 'animationcancel',
3692
- 'animationend',
3693
- 'animationiteration',
3694
- 'auxclick',
3695
- 'beforeinput',
3696
- 'blur',
3697
- 'cancel',
3698
- 'canplay',
3699
- 'canplaythrough',
3700
- 'change',
3701
- 'compositionstart',
3702
- 'compositionupdate',
3703
- 'compositionend',
3704
- 'cuechange',
3705
- 'click',
3706
- 'close',
3707
- 'contextmenu',
3708
- 'curechange',
3709
- 'dblclick',
3710
- 'drag',
3711
- 'dragend',
3712
- 'dragenter',
3713
- 'dragexit',
3714
- 'dragleave',
3715
- 'dragover',
3716
- 'drop',
3717
- 'durationchange',
3718
- 'emptied',
3719
- 'ended',
3720
- 'error',
3721
- 'focus',
3722
- 'focusin',
3723
- 'focusout',
3724
- 'gotpointercapture',
3725
- 'input',
3726
- 'invalid',
3727
- 'keydown',
3728
- 'keypress',
3729
- 'keyup',
3730
- 'load',
3731
- 'loadstart',
3732
- 'loadeddata',
3733
- 'loadedmetadata',
3734
- 'lostpointercapture',
3735
- 'mousedown',
3736
- 'mouseenter',
3737
- 'mouseleave',
3738
- 'mousemove',
3739
- 'mouseout',
3740
- 'mouseover',
3741
- 'mouseup',
3742
- 'mousewheel',
3743
- 'orientationchange',
3744
- 'pause',
3745
- 'play',
3746
- 'playing',
3747
- 'pointercancel',
3748
- 'pointerdown',
3749
- 'pointerenter',
3750
- 'pointerleave',
3751
- 'pointerlockchange',
3752
- 'mozpointerlockchange',
3753
- 'webkitpointerlockerchange',
3754
- 'pointerlockerror',
3755
- 'mozpointerlockerror',
3756
- 'webkitpointerlockerror',
3757
- 'pointermove',
3758
- 'pointout',
3759
- 'pointerover',
3760
- 'pointerup',
3761
- 'progress',
3762
- 'ratechange',
3763
- 'reset',
3764
- 'resize',
3765
- 'scroll',
3766
- 'seeked',
3767
- 'seeking',
3768
- 'select',
3769
- 'selectionchange',
3770
- 'selectstart',
3771
- 'show',
3772
- 'sort',
3773
- 'stalled',
3774
- 'submit',
3775
- 'suspend',
3776
- 'timeupdate',
3777
- 'volumechange',
3778
- 'touchcancel',
3779
- 'touchmove',
3780
- 'touchstart',
3781
- 'touchend',
3782
- 'transitioncancel',
3783
- 'transitionend',
3784
- 'waiting',
3785
- 'wheel'
3786
- ];
3787
- const documentEventNames = [
3788
- 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',
3789
- 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
3790
- 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
3791
- 'visibilitychange', 'resume'
3792
- ];
3793
- const windowEventNames = [
3794
- 'absolutedeviceorientation',
3795
- 'afterinput',
3796
- 'afterprint',
3797
- 'appinstalled',
3798
- 'beforeinstallprompt',
3799
- 'beforeprint',
3800
- 'beforeunload',
3801
- 'devicelight',
3802
- 'devicemotion',
3803
- 'deviceorientation',
3804
- 'deviceorientationabsolute',
3805
- 'deviceproximity',
3806
- 'hashchange',
3807
- 'languagechange',
3808
- 'message',
3809
- 'mozbeforepaint',
3810
- 'offline',
3811
- 'online',
3812
- 'paint',
3813
- 'pageshow',
3814
- 'pagehide',
3815
- 'popstate',
3816
- 'rejectionhandled',
3817
- 'storage',
3818
- 'unhandledrejection',
3819
- 'unload',
3820
- 'userproximity',
3821
- 'vrdisplayconnected',
3822
- 'vrdisplaydisconnected',
3823
- 'vrdisplaypresentchange'
3824
- ];
3825
- const htmlElementEventNames = [
3826
- 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
3827
- 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
3828
- 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
3829
- ];
3830
- const mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];
3831
- const ieElementEventNames = [
3832
- 'activate',
3833
- 'afterupdate',
3834
- 'ariarequest',
3835
- 'beforeactivate',
3836
- 'beforedeactivate',
3837
- 'beforeeditfocus',
3838
- 'beforeupdate',
3839
- 'cellchange',
3840
- 'controlselect',
3841
- 'dataavailable',
3842
- 'datasetchanged',
3843
- 'datasetcomplete',
3844
- 'errorupdate',
3845
- 'filterchange',
3846
- 'layoutcomplete',
3847
- 'losecapture',
3848
- 'move',
3849
- 'moveend',
3850
- 'movestart',
3851
- 'propertychange',
3852
- 'resizeend',
3853
- 'resizestart',
3854
- 'rowenter',
3855
- 'rowexit',
3856
- 'rowsdelete',
3857
- 'rowsinserted',
3858
- 'command',
3859
- 'compassneedscalibration',
3860
- 'deactivate',
3861
- 'help',
3862
- 'mscontentzoom',
3863
- 'msmanipulationstatechanged',
3864
- 'msgesturechange',
3865
- 'msgesturedoubletap',
3866
- 'msgestureend',
3867
- 'msgesturehold',
3868
- 'msgesturestart',
3869
- 'msgesturetap',
3870
- 'msgotpointercapture',
3871
- 'msinertiastart',
3872
- 'mslostpointercapture',
3873
- 'mspointercancel',
3874
- 'mspointerdown',
3875
- 'mspointerenter',
3876
- 'mspointerhover',
3877
- 'mspointerleave',
3878
- 'mspointermove',
3879
- 'mspointerout',
3880
- 'mspointerover',
3881
- 'mspointerup',
3882
- 'pointerout',
3883
- 'mssitemodejumplistitemremoved',
3884
- 'msthumbnailclick',
3885
- 'stop',
3886
- 'storagecommit'
3887
- ];
3888
- const webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
3889
- const formEventNames = ['autocomplete', 'autocompleteerror'];
3890
- const detailEventNames = ['toggle'];
3891
- const frameEventNames = ['load'];
3892
- const frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];
3893
- const marqueeEventNames = ['bounce', 'finish', 'start'];
3894
- const XMLHttpRequestEventNames = [
3895
- 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',
3896
- 'readystatechange'
3897
- ];
3898
- const IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];
3899
- const websocketEventNames = ['close', 'error', 'open', 'message'];
3900
- const workerEventNames = ['error', 'message'];
3901
- const eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);
3902
- function filterProperties(target, onProperties, ignoreProperties) {
3903
- if (!ignoreProperties || ignoreProperties.length === 0) {
3904
- return onProperties;
3905
- }
3906
- const tip = ignoreProperties.filter(ip => ip.target === target);
3907
- if (!tip || tip.length === 0) {
3908
- return onProperties;
3909
- }
3910
- const targetIgnoreProperties = tip[0].ignoreProperties;
3911
- return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);
3912
- }
3913
- function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {
3914
- // check whether target is available, sometimes target will be undefined
3915
- // because different browser or some 3rd party plugin.
3916
- if (!target) {
3917
- return;
3918
- }
3919
- const filteredProperties = filterProperties(target, onProperties, ignoreProperties);
3920
- patchOnProperties(target, filteredProperties, prototype);
3921
- }
3922
- function propertyDescriptorPatch(api, _global) {
3923
- if (isNode && !isMix) {
3924
- return;
3925
- }
3926
- if (Zone[api.symbol('patchEvents')]) {
3927
- // events are already been patched by legacy patch.
3928
- return;
3929
- }
3930
- const supportsWebSocket = typeof WebSocket !== 'undefined';
3931
- const ignoreProperties = _global['__Zone_ignore_on_properties'];
3932
- // for browsers that we can patch the descriptor: Chrome & Firefox
3933
- if (isBrowser) {
3934
- const internalWindow = window;
3935
- const ignoreErrorProperties = isIE ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];
3936
- // in IE/Edge, onProp not exist in window object, but in WindowPrototype
3937
- // so we need to pass WindowPrototype to check onProp exist or not
3938
- patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));
3939
- patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);
3940
- if (typeof internalWindow['SVGElement'] !== 'undefined') {
3941
- patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);
3942
- }
3943
- patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);
3944
- patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);
3945
- patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);
3946
- patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
3947
- patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
3948
- patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);
3949
- patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);
3950
- const HTMLMarqueeElement = internalWindow['HTMLMarqueeElement'];
3951
- if (HTMLMarqueeElement) {
3952
- patchFilteredProperties(HTMLMarqueeElement.prototype, marqueeEventNames, ignoreProperties);
3953
- }
3954
- const Worker = internalWindow['Worker'];
3955
- if (Worker) {
3956
- patchFilteredProperties(Worker.prototype, workerEventNames, ignoreProperties);
3957
- }
3958
- }
3959
- const XMLHttpRequest = _global['XMLHttpRequest'];
3960
- if (XMLHttpRequest) {
3961
- // XMLHttpRequest is not available in ServiceWorker, so we need to check here
3962
- patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);
3963
- }
3964
- const XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];
3965
- if (XMLHttpRequestEventTarget) {
3966
- patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);
3967
- }
3968
- if (typeof IDBIndex !== 'undefined') {
3969
- patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);
3970
- patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
3971
- patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
3972
- patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);
3973
- patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);
3974
- patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);
3975
- }
3976
- if (supportsWebSocket) {
3977
- patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);
3978
- }
3979
- }
3980
-
3981
- /**
3982
- * @license
3983
- * Copyright Google Inc. All Rights Reserved.
3984
- *
3985
- * Use of this source code is governed by an MIT-style license that can be
3986
- * found in the LICENSE file at https://angular.io/license
3987
- */
3988
- Zone.__load_patch('util', (global, Zone, api) => {
3989
- api.patchOnProperties = patchOnProperties;
3990
- api.patchMethod = patchMethod;
3991
- api.bindArguments = bindArguments;
3992
- api.patchMacroTask = patchMacroTask;
3993
- // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to
3994
- // define which events will not be patched by `Zone.js`.
3995
- // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep
3996
- // the name consistent with angular repo.
3997
- // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for
3998
- // backwards compatibility.
3999
- const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');
4000
- const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');
4001
- if (global[SYMBOL_UNPATCHED_EVENTS]) {
4002
- global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];
4003
- }
4004
- if (global[SYMBOL_BLACK_LISTED_EVENTS]) {
4005
- Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =
4006
- global[SYMBOL_BLACK_LISTED_EVENTS];
4007
- }
4008
- api.patchEventPrototype = patchEventPrototype;
4009
- api.patchEventTarget = patchEventTarget;
4010
- api.isIEOrEdge = isIEOrEdge;
4011
- api.ObjectDefineProperty = ObjectDefineProperty;
4012
- api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
4013
- api.ObjectCreate = ObjectCreate;
4014
- api.ArraySlice = ArraySlice;
4015
- api.patchClass = patchClass;
4016
- api.wrapWithCurrentZone = wrapWithCurrentZone;
4017
- api.filterProperties = filterProperties;
4018
- api.attachOriginToPatched = attachOriginToPatched;
4019
- api._redefineProperty = Object.defineProperty;
4020
- api.patchCallbacks = patchCallbacks;
4021
- api.getGlobalObjects = () => ({ globalSources, zoneSymbolEventNames: zoneSymbolEventNames$1, eventNames, isBrowser, isMix, isNode, TRUE_STR,
4022
- FALSE_STR, ZONE_SYMBOL_PREFIX, ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR });
4023
- });
4024
-
4025
- /**
4026
- * @license
4027
- * Copyright Google Inc. All Rights Reserved.
4028
- *
4029
- * Use of this source code is governed by an MIT-style license that can be
4030
- * found in the LICENSE file at https://angular.io/license
4031
- */
4032
- const taskSymbol = zoneSymbol('zoneTask');
4033
- function patchTimer(window, setName, cancelName, nameSuffix) {
4034
- let setNative = null;
4035
- let clearNative = null;
4036
- setName += nameSuffix;
4037
- cancelName += nameSuffix;
4038
- const tasksByHandleId = {};
4039
- function scheduleTask(task) {
4040
- const data = task.data;
4041
- function timer() {
4042
- try {
4043
- task.invoke.apply(this, arguments);
4044
- }
4045
- finally {
4046
- // issue-934, task will be cancelled
4047
- // even it is a periodic task such as
4048
- // setInterval
4049
- if (!(task.data && task.data.isPeriodic)) {
4050
- if (typeof data.handleId === 'number') {
4051
- // in non-nodejs env, we remove timerId
4052
- // from local cache
4053
- delete tasksByHandleId[data.handleId];
4054
- }
4055
- else if (data.handleId) {
4056
- // Node returns complex objects as handleIds
4057
- // we remove task reference from timer object
4058
- data.handleId[taskSymbol] = null;
4059
- }
4060
- }
4061
- }
4062
- }
4063
- data.args[0] = timer;
4064
- data.handleId = setNative.apply(window, data.args);
4065
- return task;
4066
- }
4067
- function clearTask(task) { return clearNative(task.data.handleId); }
4068
- setNative =
4069
- patchMethod(window, setName, (delegate) => function (self, args) {
4070
- if (typeof args[0] === 'function') {
4071
- const options = {
4072
- isPeriodic: nameSuffix === 'Interval',
4073
- delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :
4074
- undefined,
4075
- args: args
4076
- };
4077
- const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);
4078
- if (!task) {
4079
- return task;
4080
- }
4081
- // Node.js must additionally support the ref and unref functions.
4082
- const handle = task.data.handleId;
4083
- if (typeof handle === 'number') {
4084
- // for non nodejs env, we save handleId: task
4085
- // mapping in local cache for clearTimeout
4086
- tasksByHandleId[handle] = task;
4087
- }
4088
- else if (handle) {
4089
- // for nodejs env, we save task
4090
- // reference in timerId Object for clearTimeout
4091
- handle[taskSymbol] = task;
4092
- }
4093
- // check whether handle is null, because some polyfill or browser
4094
- // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame
4095
- if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&
4096
- typeof handle.unref === 'function') {
4097
- task.ref = handle.ref.bind(handle);
4098
- task.unref = handle.unref.bind(handle);
4099
- }
4100
- if (typeof handle === 'number' || handle) {
4101
- return handle;
4102
- }
4103
- return task;
4104
- }
4105
- else {
4106
- // cause an error by calling it directly.
4107
- return delegate.apply(window, args);
4108
- }
4109
- });
4110
- clearNative =
4111
- patchMethod(window, cancelName, (delegate) => function (self, args) {
4112
- const id = args[0];
4113
- let task;
4114
- if (typeof id === 'number') {
4115
- // non nodejs env.
4116
- task = tasksByHandleId[id];
4117
- }
4118
- else {
4119
- // nodejs env.
4120
- task = id && id[taskSymbol];
4121
- // other environments.
4122
- if (!task) {
4123
- task = id;
4124
- }
4125
- }
4126
- if (task && typeof task.type === 'string') {
4127
- if (task.state !== 'notScheduled' &&
4128
- (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {
4129
- if (typeof id === 'number') {
4130
- delete tasksByHandleId[id];
4131
- }
4132
- else if (id) {
4133
- id[taskSymbol] = null;
4134
- }
4135
- // Do not cancel already canceled functions
4136
- task.zone.cancelTask(task);
4137
- }
4138
- }
4139
- else {
4140
- // cause an error by calling it directly.
4141
- delegate.apply(window, args);
4142
- }
4143
- });
4144
- }
4145
-
4146
- /**
4147
- * @license
4148
- * Copyright Google Inc. All Rights Reserved.
4149
- *
4150
- * Use of this source code is governed by an MIT-style license that can be
4151
- * found in the LICENSE file at https://angular.io/license
4152
- */
4153
- function patchCustomElements(_global, api) {
4154
- const { isBrowser, isMix } = api.getGlobalObjects();
4155
- if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {
4156
- return;
4157
- }
4158
- const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];
4159
- api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);
4160
- }
4161
-
4162
- /**
4163
- * @license
4164
- * Copyright Google Inc. All Rights Reserved.
4165
- *
4166
- * Use of this source code is governed by an MIT-style license that can be
4167
- * found in the LICENSE file at https://angular.io/license
4168
- */
4169
- function eventTargetPatch(_global, api) {
4170
- if (Zone[api.symbol('patchEventTarget')]) {
4171
- // EventTarget is already patched.
4172
- return;
4173
- }
4174
- const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();
4175
- // predefine all __zone_symbol__ + eventName + true/false string
4176
- for (let i = 0; i < eventNames.length; i++) {
4177
- const eventName = eventNames[i];
4178
- const falseEventName = eventName + FALSE_STR;
4179
- const trueEventName = eventName + TRUE_STR;
4180
- const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
4181
- const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
4182
- zoneSymbolEventNames[eventName] = {};
4183
- zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
4184
- zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
4185
- }
4186
- const EVENT_TARGET = _global['EventTarget'];
4187
- if (!EVENT_TARGET || !EVENT_TARGET.prototype) {
4188
- return;
4189
- }
4190
- api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]);
4191
- return true;
4192
- }
4193
- function patchEvent(global, api) {
4194
- api.patchEventPrototype(global, api);
4195
- }
4196
-
4197
- /**
4198
- * @license
4199
- * Copyright Google Inc. All Rights Reserved.
4200
- *
4201
- * Use of this source code is governed by an MIT-style license that can be
4202
- * found in the LICENSE file at https://angular.io/license
4203
- */
4204
- Zone.__load_patch('legacy', (global) => {
4205
- const legacyPatch = global[Zone.__symbol__('legacyPatch')];
4206
- if (legacyPatch) {
4207
- legacyPatch();
4208
- }
4209
- });
4210
- Zone.__load_patch('timers', (global) => {
4211
- const set = 'set';
4212
- const clear = 'clear';
4213
- patchTimer(global, set, clear, 'Timeout');
4214
- patchTimer(global, set, clear, 'Interval');
4215
- patchTimer(global, set, clear, 'Immediate');
4216
- });
4217
- Zone.__load_patch('requestAnimationFrame', (global) => {
4218
- patchTimer(global, 'request', 'cancel', 'AnimationFrame');
4219
- patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');
4220
- patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');
4221
- });
4222
- Zone.__load_patch('blocking', (global, Zone) => {
4223
- const blockingMethods = ['alert', 'prompt', 'confirm'];
4224
- for (let i = 0; i < blockingMethods.length; i++) {
4225
- const name = blockingMethods[i];
4226
- patchMethod(global, name, (delegate, symbol, name) => {
4227
- return function (s, args) {
4228
- return Zone.current.run(delegate, global, args, name);
4229
- };
4230
- });
4231
- }
4232
- });
4233
- Zone.__load_patch('EventTarget', (global, Zone, api) => {
4234
- patchEvent(global, api);
4235
- eventTargetPatch(global, api);
4236
- // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener
4237
- const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];
4238
- if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {
4239
- api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);
4240
- }
4241
- patchClass('MutationObserver');
4242
- patchClass('WebKitMutationObserver');
4243
- patchClass('IntersectionObserver');
4244
- patchClass('FileReader');
4245
- });
4246
- Zone.__load_patch('on_property', (global, Zone, api) => {
4247
- propertyDescriptorPatch(api, global);
4248
- });
4249
- Zone.__load_patch('customElements', (global, Zone, api) => {
4250
- patchCustomElements(global, api);
4251
- });
4252
- Zone.__load_patch('XHR', (global, Zone) => {
4253
- // Treat XMLHttpRequest as a macrotask.
4254
- patchXHR(global);
4255
- const XHR_TASK = zoneSymbol('xhrTask');
4256
- const XHR_SYNC = zoneSymbol('xhrSync');
4257
- const XHR_LISTENER = zoneSymbol('xhrListener');
4258
- const XHR_SCHEDULED = zoneSymbol('xhrScheduled');
4259
- const XHR_URL = zoneSymbol('xhrURL');
4260
- const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');
4261
- function patchXHR(window) {
4262
- const XMLHttpRequest = window['XMLHttpRequest'];
4263
- if (!XMLHttpRequest) {
4264
- // XMLHttpRequest is not available in service worker
4265
- return;
4266
- }
4267
- const XMLHttpRequestPrototype = XMLHttpRequest.prototype;
4268
- function findPendingTask(target) { return target[XHR_TASK]; }
4269
- let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
4270
- let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
4271
- if (!oriAddListener) {
4272
- const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];
4273
- if (XMLHttpRequestEventTarget) {
4274
- const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;
4275
- oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
4276
- oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
4277
- }
4278
- }
4279
- const READY_STATE_CHANGE = 'readystatechange';
4280
- const SCHEDULED = 'scheduled';
4281
- function scheduleTask(task) {
4282
- const data = task.data;
4283
- const target = data.target;
4284
- target[XHR_SCHEDULED] = false;
4285
- target[XHR_ERROR_BEFORE_SCHEDULED] = false;
4286
- // remove existing event listener
4287
- const listener = target[XHR_LISTENER];
4288
- if (!oriAddListener) {
4289
- oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
4290
- oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
4291
- }
4292
- if (listener) {
4293
- oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
4294
- }
4295
- const newListener = target[XHR_LISTENER] = () => {
4296
- if (target.readyState === target.DONE) {
4297
- // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
4298
- // readyState=4 multiple times, so we need to check task state here
4299
- if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {
4300
- // check whether the xhr has registered onload listener
4301
- // if that is the case, the task should invoke after all
4302
- // onload listeners finish.
4303
- const loadTasks = target[Zone.__symbol__('loadfalse')];
4304
- if (loadTasks && loadTasks.length > 0) {
4305
- const oriInvoke = task.invoke;
4306
- task.invoke = function () {
4307
- // need to load the tasks again, because in other
4308
- // load listener, they may remove themselves
4309
- const loadTasks = target[Zone.__symbol__('loadfalse')];
4310
- for (let i = 0; i < loadTasks.length; i++) {
4311
- if (loadTasks[i] === task) {
4312
- loadTasks.splice(i, 1);
4313
- }
4314
- }
4315
- if (!data.aborted && task.state === SCHEDULED) {
4316
- oriInvoke.call(task);
4317
- }
4318
- };
4319
- loadTasks.push(task);
4320
- }
4321
- else {
4322
- task.invoke();
4323
- }
4324
- }
4325
- else if (!data.aborted && target[XHR_SCHEDULED] === false) {
4326
- // error occurs when xhr.send()
4327
- target[XHR_ERROR_BEFORE_SCHEDULED] = true;
4328
- }
4329
- }
4330
- };
4331
- oriAddListener.call(target, READY_STATE_CHANGE, newListener);
4332
- const storedTask = target[XHR_TASK];
4333
- if (!storedTask) {
4334
- target[XHR_TASK] = task;
4335
- }
4336
- sendNative.apply(target, data.args);
4337
- target[XHR_SCHEDULED] = true;
4338
- return task;
4339
- }
4340
- function placeholderCallback() { }
4341
- function clearTask(task) {
4342
- const data = task.data;
4343
- // Note - ideally, we would call data.target.removeEventListener here, but it's too late
4344
- // to prevent it from firing. So instead, we store info for the event listener.
4345
- data.aborted = true;
4346
- return abortNative.apply(data.target, data.args);
4347
- }
4348
- const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {
4349
- self[XHR_SYNC] = args[2] == false;
4350
- self[XHR_URL] = args[1];
4351
- return openNative.apply(self, args);
4352
- });
4353
- const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';
4354
- const fetchTaskAborting = zoneSymbol('fetchTaskAborting');
4355
- const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');
4356
- const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {
4357
- if (Zone.current[fetchTaskScheduling] === true) {
4358
- // a fetch is scheduling, so we are using xhr to polyfill fetch
4359
- // and because we already schedule macroTask for fetch, we should
4360
- // not schedule a macroTask for xhr again
4361
- return sendNative.apply(self, args);
4362
- }
4363
- if (self[XHR_SYNC]) {
4364
- // if the XHR is sync there is no task to schedule, just execute the code.
4365
- return sendNative.apply(self, args);
4366
- }
4367
- else {
4368
- const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };
4369
- const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);
4370
- if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&
4371
- task.state === SCHEDULED) {
4372
- // xhr request throw error when send
4373
- // we should invoke task instead of leaving a scheduled
4374
- // pending macroTask
4375
- task.invoke();
4376
- }
4377
- }
4378
- });
4379
- const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {
4380
- const task = findPendingTask(self);
4381
- if (task && typeof task.type == 'string') {
4382
- // If the XHR has already completed, do nothing.
4383
- // If the XHR has already been aborted, do nothing.
4384
- // Fix #569, call abort multiple times before done will cause
4385
- // macroTask task count be negative number
4386
- if (task.cancelFn == null || (task.data && task.data.aborted)) {
4387
- return;
4388
- }
4389
- task.zone.cancelTask(task);
4390
- }
4391
- else if (Zone.current[fetchTaskAborting] === true) {
4392
- // the abort is called from fetch polyfill, we need to call native abort of XHR.
4393
- return abortNative.apply(self, args);
4394
- }
4395
- // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
4396
- // task
4397
- // to cancel. Do nothing.
4398
- });
4399
- }
4400
- });
4401
- Zone.__load_patch('geolocation', (global) => {
4402
- /// GEO_LOCATION
4403
- if (global['navigator'] && global['navigator'].geolocation) {
4404
- patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);
4405
- }
4406
- });
4407
- Zone.__load_patch('PromiseRejectionEvent', (global, Zone) => {
4408
- // handle unhandled promise rejection
4409
- function findPromiseRejectionHandler(evtName) {
4410
- return function (e) {
4411
- const eventTasks = findEventTasks(global, evtName);
4412
- eventTasks.forEach(eventTask => {
4413
- // windows has added unhandledrejection event listener
4414
- // trigger the event listener
4415
- const PromiseRejectionEvent = global['PromiseRejectionEvent'];
4416
- if (PromiseRejectionEvent) {
4417
- const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });
4418
- eventTask.invoke(evt);
4419
- }
4420
- });
4421
- };
4422
- }
4423
- if (global['PromiseRejectionEvent']) {
4424
- Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =
4425
- findPromiseRejectionHandler('unhandledrejection');
4426
- Zone[zoneSymbol('rejectionHandledHandler')] =
4427
- findPromiseRejectionHandler('rejectionhandled');
4428
- }
4429
- });
4430
-
4431
- })));
4432
-
4433
-
4434
- /***/ }),
4435
-
4436
- /***/ "./src/polyfills.ts":
4437
- /*!**************************!*\
4438
- !*** ./src/polyfills.ts ***!
4439
- \**************************/
4440
- /*! no static exports found */
4441
- /***/ (function(module, exports, __webpack_require__) {
4442
-
4443
- "use strict";
4444
-
4445
- /**
4446
- * This file includes polyfills needed by Angular and is loaded before the app.
4447
- * You can add your own extra polyfills to this file.
4448
- *
4449
- * This file is divided into 2 sections:
4450
- * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
4451
- * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
4452
- * file.
4453
- *
4454
- * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
4455
- * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
4456
- * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
4457
- *
4458
- * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
4459
- */
4460
- Object.defineProperty(exports, "__esModule", { value: true });
4461
- /***************************************************************************************************
4462
- * BROWSER POLYFILLS
4463
- */
4464
- /** IE9, IE10 and IE11 requires all of the following polyfills. **/
4465
- // import 'core-js/es6/symbol';
4466
- // import 'core-js/es6/object';
4467
- // import 'core-js/es6/function';
4468
- // import 'core-js/es6/parse-int';
4469
- // import 'core-js/es6/parse-float';
4470
- // import 'core-js/es6/number';
4471
- // import 'core-js/es6/math';
4472
- // import 'core-js/es6/string';
4473
- // import 'core-js/es6/date';
4474
- // import 'core-js/es6/array';
4475
- // import 'core-js/es6/regexp';
4476
- // import 'core-js/es6/map';
4477
- // import 'core-js/es6/weak-map';
4478
- // import 'core-js/es6/set';
4479
- /** IE10 and IE11 requires the following for NgClass support on SVG elements */
4480
- // import 'classlist.js'; // Run `npm install --save classlist.js`.
4481
- /** IE10 and IE11 requires the following to support `@angular/animation`. */
4482
- // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
4483
- /** Evergreen browsers require these. **/
4484
- __webpack_require__(/*! core-js/es6/reflect */ "./node_modules/core-js/es6/reflect.js");
4485
- /** ALL Firefox browsers require the following to support `@angular/animation`. **/
4486
- // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
4487
- /***************************************************************************************************
4488
- * Zone JS is required by Angular itself.
4489
- */
4490
- __webpack_require__(/*! zone.js/dist/zone */ "./node_modules/zone.js/dist/zone-evergreen.js"); // Included with Angular CLI.
4491
- /***************************************************************************************************
4492
- * APPLICATION IMPORTS
4493
- */
4494
- /**
4495
- * Date, currency, decimal and percent pipes.
4496
- * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
4497
- */
4498
- // import 'intl'; // Run `npm install --save intl`.
4499
- /**
4500
- * Need to import at least one locale-data with intl.
4501
- */
4502
- // import 'intl/locale-data/jsonp/en';
4503
-
4504
-
4505
- /***/ }),
4506
-
4507
- /***/ 2:
4508
- /*!********************************!*\
4509
- !*** multi ./src/polyfills.ts ***!
4510
- \********************************/
4511
- /*! no static exports found */
4512
- /***/ (function(module, exports, __webpack_require__) {
4513
-
4514
- module.exports = __webpack_require__(/*! /home/jk/workspace/colijn/repos/iones/master/Ione/Client/JavaScript/Configurator/src/polyfills.ts */"./src/polyfills.ts");
4515
-
4516
-
4517
- /***/ })
4518
-
4519
- },[[2,"runtime"]]]);
4520
- //# sourceMappingURL=polyfills-es2015.js.map