3205 |
delphine |
1 |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["polyfills"],{
|
|
|
2 |
|
|
|
3 |
/***/ "./node_modules/core-js/es7/reflect.js":
|
|
|
4 |
/*!*********************************************!*\
|
|
|
5 |
!*** ./node_modules/core-js/es7/reflect.js ***!
|
|
|
6 |
\*********************************************/
|
|
|
7 |
/*! no static exports found */
|
|
|
8 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
9 |
|
|
|
10 |
__webpack_require__(/*! ../modules/es7.reflect.define-metadata */ "./node_modules/core-js/modules/es7.reflect.define-metadata.js");
|
|
|
11 |
__webpack_require__(/*! ../modules/es7.reflect.delete-metadata */ "./node_modules/core-js/modules/es7.reflect.delete-metadata.js");
|
|
|
12 |
__webpack_require__(/*! ../modules/es7.reflect.get-metadata */ "./node_modules/core-js/modules/es7.reflect.get-metadata.js");
|
|
|
13 |
__webpack_require__(/*! ../modules/es7.reflect.get-metadata-keys */ "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js");
|
|
|
14 |
__webpack_require__(/*! ../modules/es7.reflect.get-own-metadata */ "./node_modules/core-js/modules/es7.reflect.get-own-metadata.js");
|
|
|
15 |
__webpack_require__(/*! ../modules/es7.reflect.get-own-metadata-keys */ "./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js");
|
|
|
16 |
__webpack_require__(/*! ../modules/es7.reflect.has-metadata */ "./node_modules/core-js/modules/es7.reflect.has-metadata.js");
|
|
|
17 |
__webpack_require__(/*! ../modules/es7.reflect.has-own-metadata */ "./node_modules/core-js/modules/es7.reflect.has-own-metadata.js");
|
|
|
18 |
__webpack_require__(/*! ../modules/es7.reflect.metadata */ "./node_modules/core-js/modules/es7.reflect.metadata.js");
|
|
|
19 |
module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/modules/_core.js").Reflect;
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
/***/ }),
|
|
|
23 |
|
|
|
24 |
/***/ "./node_modules/core-js/modules/_a-function.js":
|
|
|
25 |
/*!*****************************************************!*\
|
|
|
26 |
!*** ./node_modules/core-js/modules/_a-function.js ***!
|
|
|
27 |
\*****************************************************/
|
|
|
28 |
/*! no static exports found */
|
|
|
29 |
/***/ (function(module, exports) {
|
|
|
30 |
|
|
|
31 |
module.exports = function (it) {
|
|
|
32 |
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
|
|
33 |
return it;
|
|
|
34 |
};
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
/***/ }),
|
|
|
38 |
|
|
|
39 |
/***/ "./node_modules/core-js/modules/_an-instance.js":
|
|
|
40 |
/*!******************************************************!*\
|
|
|
41 |
!*** ./node_modules/core-js/modules/_an-instance.js ***!
|
|
|
42 |
\******************************************************/
|
|
|
43 |
/*! no static exports found */
|
|
|
44 |
/***/ (function(module, exports) {
|
|
|
45 |
|
|
|
46 |
module.exports = function (it, Constructor, name, forbiddenField) {
|
|
|
47 |
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
|
|
|
48 |
throw TypeError(name + ': incorrect invocation!');
|
|
|
49 |
} return it;
|
|
|
50 |
};
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
/***/ }),
|
|
|
54 |
|
|
|
55 |
/***/ "./node_modules/core-js/modules/_an-object.js":
|
|
|
56 |
/*!****************************************************!*\
|
|
|
57 |
!*** ./node_modules/core-js/modules/_an-object.js ***!
|
|
|
58 |
\****************************************************/
|
|
|
59 |
/*! no static exports found */
|
|
|
60 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
61 |
|
|
|
62 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
63 |
module.exports = function (it) {
|
|
|
64 |
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
|
|
65 |
return it;
|
|
|
66 |
};
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
/***/ }),
|
|
|
70 |
|
|
|
71 |
/***/ "./node_modules/core-js/modules/_array-from-iterable.js":
|
|
|
72 |
/*!**************************************************************!*\
|
|
|
73 |
!*** ./node_modules/core-js/modules/_array-from-iterable.js ***!
|
|
|
74 |
\**************************************************************/
|
|
|
75 |
/*! no static exports found */
|
|
|
76 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
77 |
|
|
|
78 |
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
|
|
|
79 |
|
|
|
80 |
module.exports = function (iter, ITERATOR) {
|
|
|
81 |
var result = [];
|
|
|
82 |
forOf(iter, false, result.push, result, ITERATOR);
|
|
|
83 |
return result;
|
|
|
84 |
};
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
/***/ }),
|
|
|
88 |
|
|
|
89 |
/***/ "./node_modules/core-js/modules/_array-includes.js":
|
|
|
90 |
/*!*********************************************************!*\
|
|
|
91 |
!*** ./node_modules/core-js/modules/_array-includes.js ***!
|
|
|
92 |
\*********************************************************/
|
|
|
93 |
/*! no static exports found */
|
|
|
94 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
95 |
|
|
|
96 |
// false -> Array#indexOf
|
|
|
97 |
// true -> Array#includes
|
|
|
98 |
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
|
|
|
99 |
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
|
|
|
100 |
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
|
|
|
101 |
module.exports = function (IS_INCLUDES) {
|
|
|
102 |
return function ($this, el, fromIndex) {
|
|
|
103 |
var O = toIObject($this);
|
|
|
104 |
var length = toLength(O.length);
|
|
|
105 |
var index = toAbsoluteIndex(fromIndex, length);
|
|
|
106 |
var value;
|
|
|
107 |
// Array#includes uses SameValueZero equality algorithm
|
|
|
108 |
// eslint-disable-next-line no-self-compare
|
|
|
109 |
if (IS_INCLUDES && el != el) while (length > index) {
|
|
|
110 |
value = O[index++];
|
|
|
111 |
// eslint-disable-next-line no-self-compare
|
|
|
112 |
if (value != value) return true;
|
|
|
113 |
// Array#indexOf ignores holes, Array#includes - not
|
|
|
114 |
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
|
|
115 |
if (O[index] === el) return IS_INCLUDES || index || 0;
|
|
|
116 |
} return !IS_INCLUDES && -1;
|
|
|
117 |
};
|
|
|
118 |
};
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
/***/ }),
|
|
|
122 |
|
|
|
123 |
/***/ "./node_modules/core-js/modules/_array-methods.js":
|
|
|
124 |
/*!********************************************************!*\
|
|
|
125 |
!*** ./node_modules/core-js/modules/_array-methods.js ***!
|
|
|
126 |
\********************************************************/
|
|
|
127 |
/*! no static exports found */
|
|
|
128 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
129 |
|
|
|
130 |
// 0 -> Array#forEach
|
|
|
131 |
// 1 -> Array#map
|
|
|
132 |
// 2 -> Array#filter
|
|
|
133 |
// 3 -> Array#some
|
|
|
134 |
// 4 -> Array#every
|
|
|
135 |
// 5 -> Array#find
|
|
|
136 |
// 6 -> Array#findIndex
|
|
|
137 |
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
|
|
|
138 |
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
|
|
|
139 |
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
|
|
|
140 |
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
|
|
|
141 |
var asc = __webpack_require__(/*! ./_array-species-create */ "./node_modules/core-js/modules/_array-species-create.js");
|
|
|
142 |
module.exports = function (TYPE, $create) {
|
|
|
143 |
var IS_MAP = TYPE == 1;
|
|
|
144 |
var IS_FILTER = TYPE == 2;
|
|
|
145 |
var IS_SOME = TYPE == 3;
|
|
|
146 |
var IS_EVERY = TYPE == 4;
|
|
|
147 |
var IS_FIND_INDEX = TYPE == 6;
|
|
|
148 |
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
|
149 |
var create = $create || asc;
|
|
|
150 |
return function ($this, callbackfn, that) {
|
|
|
151 |
var O = toObject($this);
|
|
|
152 |
var self = IObject(O);
|
|
|
153 |
var f = ctx(callbackfn, that, 3);
|
|
|
154 |
var length = toLength(self.length);
|
|
|
155 |
var index = 0;
|
|
|
156 |
var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
|
157 |
var val, res;
|
|
|
158 |
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
|
159 |
val = self[index];
|
|
|
160 |
res = f(val, index, O);
|
|
|
161 |
if (TYPE) {
|
|
|
162 |
if (IS_MAP) result[index] = res; // map
|
|
|
163 |
else if (res) switch (TYPE) {
|
|
|
164 |
case 3: return true; // some
|
|
|
165 |
case 5: return val; // find
|
|
|
166 |
case 6: return index; // findIndex
|
|
|
167 |
case 2: result.push(val); // filter
|
|
|
168 |
} else if (IS_EVERY) return false; // every
|
|
|
169 |
}
|
|
|
170 |
}
|
|
|
171 |
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
|
|
|
172 |
};
|
|
|
173 |
};
|
|
|
174 |
|
|
|
175 |
|
|
|
176 |
/***/ }),
|
|
|
177 |
|
|
|
178 |
/***/ "./node_modules/core-js/modules/_array-species-constructor.js":
|
|
|
179 |
/*!********************************************************************!*\
|
|
|
180 |
!*** ./node_modules/core-js/modules/_array-species-constructor.js ***!
|
|
|
181 |
\********************************************************************/
|
|
|
182 |
/*! no static exports found */
|
|
|
183 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
184 |
|
|
|
185 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
186 |
var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js");
|
|
|
187 |
var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species');
|
|
|
188 |
|
|
|
189 |
module.exports = function (original) {
|
|
|
190 |
var C;
|
|
|
191 |
if (isArray(original)) {
|
|
|
192 |
C = original.constructor;
|
|
|
193 |
// cross-realm fallback
|
|
|
194 |
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
|
195 |
if (isObject(C)) {
|
|
|
196 |
C = C[SPECIES];
|
|
|
197 |
if (C === null) C = undefined;
|
|
|
198 |
}
|
|
|
199 |
} return C === undefined ? Array : C;
|
|
|
200 |
};
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
/***/ }),
|
|
|
204 |
|
|
|
205 |
/***/ "./node_modules/core-js/modules/_array-species-create.js":
|
|
|
206 |
/*!***************************************************************!*\
|
|
|
207 |
!*** ./node_modules/core-js/modules/_array-species-create.js ***!
|
|
|
208 |
\***************************************************************/
|
|
|
209 |
/*! no static exports found */
|
|
|
210 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
211 |
|
|
|
212 |
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
|
|
|
213 |
var speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ "./node_modules/core-js/modules/_array-species-constructor.js");
|
|
|
214 |
|
|
|
215 |
module.exports = function (original, length) {
|
|
|
216 |
return new (speciesConstructor(original))(length);
|
|
|
217 |
};
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
/***/ }),
|
|
|
221 |
|
|
|
222 |
/***/ "./node_modules/core-js/modules/_classof.js":
|
|
|
223 |
/*!**************************************************!*\
|
|
|
224 |
!*** ./node_modules/core-js/modules/_classof.js ***!
|
|
|
225 |
\**************************************************/
|
|
|
226 |
/*! no static exports found */
|
|
|
227 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
228 |
|
|
|
229 |
// getting tag from 19.1.3.6 Object.prototype.toString()
|
|
|
230 |
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
|
|
|
231 |
var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag');
|
|
|
232 |
// ES3 wrong here
|
|
|
233 |
var ARG = cof(function () { return arguments; }()) == 'Arguments';
|
|
|
234 |
|
|
|
235 |
// fallback for IE11 Script Access Denied error
|
|
|
236 |
var tryGet = function (it, key) {
|
|
|
237 |
try {
|
|
|
238 |
return it[key];
|
|
|
239 |
} catch (e) { /* empty */ }
|
|
|
240 |
};
|
|
|
241 |
|
|
|
242 |
module.exports = function (it) {
|
|
|
243 |
var O, T, B;
|
|
|
244 |
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
|
245 |
// @@toStringTag case
|
|
|
246 |
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
|
|
247 |
// builtinTag case
|
|
|
248 |
: ARG ? cof(O)
|
|
|
249 |
// ES3 arguments fallback
|
|
|
250 |
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
|
|
251 |
};
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
/***/ }),
|
|
|
255 |
|
|
|
256 |
/***/ "./node_modules/core-js/modules/_cof.js":
|
|
|
257 |
/*!**********************************************!*\
|
|
|
258 |
!*** ./node_modules/core-js/modules/_cof.js ***!
|
|
|
259 |
\**********************************************/
|
|
|
260 |
/*! no static exports found */
|
|
|
261 |
/***/ (function(module, exports) {
|
|
|
262 |
|
|
|
263 |
var toString = {}.toString;
|
|
|
264 |
|
|
|
265 |
module.exports = function (it) {
|
|
|
266 |
return toString.call(it).slice(8, -1);
|
|
|
267 |
};
|
|
|
268 |
|
|
|
269 |
|
|
|
270 |
/***/ }),
|
|
|
271 |
|
|
|
272 |
/***/ "./node_modules/core-js/modules/_collection-strong.js":
|
|
|
273 |
/*!************************************************************!*\
|
|
|
274 |
!*** ./node_modules/core-js/modules/_collection-strong.js ***!
|
|
|
275 |
\************************************************************/
|
|
|
276 |
/*! no static exports found */
|
|
|
277 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
278 |
|
|
|
279 |
"use strict";
|
|
|
280 |
|
|
|
281 |
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
|
|
|
282 |
var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
|
|
|
283 |
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
|
|
|
284 |
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
|
|
|
285 |
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
|
|
|
286 |
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
|
|
|
287 |
var $iterDefine = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js");
|
|
|
288 |
var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/modules/_iter-step.js");
|
|
|
289 |
var setSpecies = __webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js");
|
|
|
290 |
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
|
|
|
291 |
var fastKey = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").fastKey;
|
|
|
292 |
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
|
|
|
293 |
var SIZE = DESCRIPTORS ? '_s' : 'size';
|
|
|
294 |
|
|
|
295 |
var getEntry = function (that, key) {
|
|
|
296 |
// fast case
|
|
|
297 |
var index = fastKey(key);
|
|
|
298 |
var entry;
|
|
|
299 |
if (index !== 'F') return that._i[index];
|
|
|
300 |
// frozen object case
|
|
|
301 |
for (entry = that._f; entry; entry = entry.n) {
|
|
|
302 |
if (entry.k == key) return entry;
|
|
|
303 |
}
|
|
|
304 |
};
|
|
|
305 |
|
|
|
306 |
module.exports = {
|
|
|
307 |
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
|
|
|
308 |
var C = wrapper(function (that, iterable) {
|
|
|
309 |
anInstance(that, C, NAME, '_i');
|
|
|
310 |
that._t = NAME; // collection type
|
|
|
311 |
that._i = create(null); // index
|
|
|
312 |
that._f = undefined; // first entry
|
|
|
313 |
that._l = undefined; // last entry
|
|
|
314 |
that[SIZE] = 0; // size
|
|
|
315 |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
|
316 |
});
|
|
|
317 |
redefineAll(C.prototype, {
|
|
|
318 |
// 23.1.3.1 Map.prototype.clear()
|
|
|
319 |
// 23.2.3.2 Set.prototype.clear()
|
|
|
320 |
clear: function clear() {
|
|
|
321 |
for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
|
|
|
322 |
entry.r = true;
|
|
|
323 |
if (entry.p) entry.p = entry.p.n = undefined;
|
|
|
324 |
delete data[entry.i];
|
|
|
325 |
}
|
|
|
326 |
that._f = that._l = undefined;
|
|
|
327 |
that[SIZE] = 0;
|
|
|
328 |
},
|
|
|
329 |
// 23.1.3.3 Map.prototype.delete(key)
|
|
|
330 |
// 23.2.3.4 Set.prototype.delete(value)
|
|
|
331 |
'delete': function (key) {
|
|
|
332 |
var that = validate(this, NAME);
|
|
|
333 |
var entry = getEntry(that, key);
|
|
|
334 |
if (entry) {
|
|
|
335 |
var next = entry.n;
|
|
|
336 |
var prev = entry.p;
|
|
|
337 |
delete that._i[entry.i];
|
|
|
338 |
entry.r = true;
|
|
|
339 |
if (prev) prev.n = next;
|
|
|
340 |
if (next) next.p = prev;
|
|
|
341 |
if (that._f == entry) that._f = next;
|
|
|
342 |
if (that._l == entry) that._l = prev;
|
|
|
343 |
that[SIZE]--;
|
|
|
344 |
} return !!entry;
|
|
|
345 |
},
|
|
|
346 |
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
|
|
|
347 |
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
|
|
|
348 |
forEach: function forEach(callbackfn /* , that = undefined */) {
|
|
|
349 |
validate(this, NAME);
|
|
|
350 |
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
|
351 |
var entry;
|
|
|
352 |
while (entry = entry ? entry.n : this._f) {
|
|
|
353 |
f(entry.v, entry.k, this);
|
|
|
354 |
// revert to the last existing entry
|
|
|
355 |
while (entry && entry.r) entry = entry.p;
|
|
|
356 |
}
|
|
|
357 |
},
|
|
|
358 |
// 23.1.3.7 Map.prototype.has(key)
|
|
|
359 |
// 23.2.3.7 Set.prototype.has(value)
|
|
|
360 |
has: function has(key) {
|
|
|
361 |
return !!getEntry(validate(this, NAME), key);
|
|
|
362 |
}
|
|
|
363 |
});
|
|
|
364 |
if (DESCRIPTORS) dP(C.prototype, 'size', {
|
|
|
365 |
get: function () {
|
|
|
366 |
return validate(this, NAME)[SIZE];
|
|
|
367 |
}
|
|
|
368 |
});
|
|
|
369 |
return C;
|
|
|
370 |
},
|
|
|
371 |
def: function (that, key, value) {
|
|
|
372 |
var entry = getEntry(that, key);
|
|
|
373 |
var prev, index;
|
|
|
374 |
// change existing entry
|
|
|
375 |
if (entry) {
|
|
|
376 |
entry.v = value;
|
|
|
377 |
// create new entry
|
|
|
378 |
} else {
|
|
|
379 |
that._l = entry = {
|
|
|
380 |
i: index = fastKey(key, true), // <- index
|
|
|
381 |
k: key, // <- key
|
|
|
382 |
v: value, // <- value
|
|
|
383 |
p: prev = that._l, // <- previous entry
|
|
|
384 |
n: undefined, // <- next entry
|
|
|
385 |
r: false // <- removed
|
|
|
386 |
};
|
|
|
387 |
if (!that._f) that._f = entry;
|
|
|
388 |
if (prev) prev.n = entry;
|
|
|
389 |
that[SIZE]++;
|
|
|
390 |
// add to index
|
|
|
391 |
if (index !== 'F') that._i[index] = entry;
|
|
|
392 |
} return that;
|
|
|
393 |
},
|
|
|
394 |
getEntry: getEntry,
|
|
|
395 |
setStrong: function (C, NAME, IS_MAP) {
|
|
|
396 |
// add .keys, .values, .entries, [@@iterator]
|
|
|
397 |
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
|
|
398 |
$iterDefine(C, NAME, function (iterated, kind) {
|
|
|
399 |
this._t = validate(iterated, NAME); // target
|
|
|
400 |
this._k = kind; // kind
|
|
|
401 |
this._l = undefined; // previous
|
|
|
402 |
}, function () {
|
|
|
403 |
var that = this;
|
|
|
404 |
var kind = that._k;
|
|
|
405 |
var entry = that._l;
|
|
|
406 |
// revert to the last existing entry
|
|
|
407 |
while (entry && entry.r) entry = entry.p;
|
|
|
408 |
// get next entry
|
|
|
409 |
if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
|
|
|
410 |
// or finish the iteration
|
|
|
411 |
that._t = undefined;
|
|
|
412 |
return step(1);
|
|
|
413 |
}
|
|
|
414 |
// return step by kind
|
|
|
415 |
if (kind == 'keys') return step(0, entry.k);
|
|
|
416 |
if (kind == 'values') return step(0, entry.v);
|
|
|
417 |
return step(0, [entry.k, entry.v]);
|
|
|
418 |
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
|
|
419 |
|
|
|
420 |
// add [@@species], 23.1.2.2, 23.2.2.2
|
|
|
421 |
setSpecies(NAME);
|
|
|
422 |
}
|
|
|
423 |
};
|
|
|
424 |
|
|
|
425 |
|
|
|
426 |
/***/ }),
|
|
|
427 |
|
|
|
428 |
/***/ "./node_modules/core-js/modules/_collection-weak.js":
|
|
|
429 |
/*!**********************************************************!*\
|
|
|
430 |
!*** ./node_modules/core-js/modules/_collection-weak.js ***!
|
|
|
431 |
\**********************************************************/
|
|
|
432 |
/*! no static exports found */
|
|
|
433 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
434 |
|
|
|
435 |
"use strict";
|
|
|
436 |
|
|
|
437 |
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
|
|
|
438 |
var getWeak = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").getWeak;
|
|
|
439 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
440 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
441 |
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
|
|
|
442 |
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
|
|
|
443 |
var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js");
|
|
|
444 |
var $has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
445 |
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
|
|
|
446 |
var arrayFind = createArrayMethod(5);
|
|
|
447 |
var arrayFindIndex = createArrayMethod(6);
|
|
|
448 |
var id = 0;
|
|
|
449 |
|
|
|
450 |
// fallback for uncaught frozen keys
|
|
|
451 |
var uncaughtFrozenStore = function (that) {
|
|
|
452 |
return that._l || (that._l = new UncaughtFrozenStore());
|
|
|
453 |
};
|
|
|
454 |
var UncaughtFrozenStore = function () {
|
|
|
455 |
this.a = [];
|
|
|
456 |
};
|
|
|
457 |
var findUncaughtFrozen = function (store, key) {
|
|
|
458 |
return arrayFind(store.a, function (it) {
|
|
|
459 |
return it[0] === key;
|
|
|
460 |
});
|
|
|
461 |
};
|
|
|
462 |
UncaughtFrozenStore.prototype = {
|
|
|
463 |
get: function (key) {
|
|
|
464 |
var entry = findUncaughtFrozen(this, key);
|
|
|
465 |
if (entry) return entry[1];
|
|
|
466 |
},
|
|
|
467 |
has: function (key) {
|
|
|
468 |
return !!findUncaughtFrozen(this, key);
|
|
|
469 |
},
|
|
|
470 |
set: function (key, value) {
|
|
|
471 |
var entry = findUncaughtFrozen(this, key);
|
|
|
472 |
if (entry) entry[1] = value;
|
|
|
473 |
else this.a.push([key, value]);
|
|
|
474 |
},
|
|
|
475 |
'delete': function (key) {
|
|
|
476 |
var index = arrayFindIndex(this.a, function (it) {
|
|
|
477 |
return it[0] === key;
|
|
|
478 |
});
|
|
|
479 |
if (~index) this.a.splice(index, 1);
|
|
|
480 |
return !!~index;
|
|
|
481 |
}
|
|
|
482 |
};
|
|
|
483 |
|
|
|
484 |
module.exports = {
|
|
|
485 |
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
|
|
|
486 |
var C = wrapper(function (that, iterable) {
|
|
|
487 |
anInstance(that, C, NAME, '_i');
|
|
|
488 |
that._t = NAME; // collection type
|
|
|
489 |
that._i = id++; // collection id
|
|
|
490 |
that._l = undefined; // leak store for uncaught frozen objects
|
|
|
491 |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
|
492 |
});
|
|
|
493 |
redefineAll(C.prototype, {
|
|
|
494 |
// 23.3.3.2 WeakMap.prototype.delete(key)
|
|
|
495 |
// 23.4.3.3 WeakSet.prototype.delete(value)
|
|
|
496 |
'delete': function (key) {
|
|
|
497 |
if (!isObject(key)) return false;
|
|
|
498 |
var data = getWeak(key);
|
|
|
499 |
if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
|
|
|
500 |
return data && $has(data, this._i) && delete data[this._i];
|
|
|
501 |
},
|
|
|
502 |
// 23.3.3.4 WeakMap.prototype.has(key)
|
|
|
503 |
// 23.4.3.4 WeakSet.prototype.has(value)
|
|
|
504 |
has: function has(key) {
|
|
|
505 |
if (!isObject(key)) return false;
|
|
|
506 |
var data = getWeak(key);
|
|
|
507 |
if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
|
|
|
508 |
return data && $has(data, this._i);
|
|
|
509 |
}
|
|
|
510 |
});
|
|
|
511 |
return C;
|
|
|
512 |
},
|
|
|
513 |
def: function (that, key, value) {
|
|
|
514 |
var data = getWeak(anObject(key), true);
|
|
|
515 |
if (data === true) uncaughtFrozenStore(that).set(key, value);
|
|
|
516 |
else data[that._i] = value;
|
|
|
517 |
return that;
|
|
|
518 |
},
|
|
|
519 |
ufstore: uncaughtFrozenStore
|
|
|
520 |
};
|
|
|
521 |
|
|
|
522 |
|
|
|
523 |
/***/ }),
|
|
|
524 |
|
|
|
525 |
/***/ "./node_modules/core-js/modules/_collection.js":
|
|
|
526 |
/*!*****************************************************!*\
|
|
|
527 |
!*** ./node_modules/core-js/modules/_collection.js ***!
|
|
|
528 |
\*****************************************************/
|
|
|
529 |
/*! no static exports found */
|
|
|
530 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
531 |
|
|
|
532 |
"use strict";
|
|
|
533 |
|
|
|
534 |
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
|
|
|
535 |
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
|
|
|
536 |
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
|
|
|
537 |
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
|
|
|
538 |
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js");
|
|
|
539 |
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
|
|
|
540 |
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
|
|
|
541 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
542 |
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
|
|
|
543 |
var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js");
|
|
|
544 |
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
|
|
|
545 |
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js");
|
|
|
546 |
|
|
|
547 |
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
|
|
|
548 |
var Base = global[NAME];
|
|
|
549 |
var C = Base;
|
|
|
550 |
var ADDER = IS_MAP ? 'set' : 'add';
|
|
|
551 |
var proto = C && C.prototype;
|
|
|
552 |
var O = {};
|
|
|
553 |
var fixMethod = function (KEY) {
|
|
|
554 |
var fn = proto[KEY];
|
|
|
555 |
redefine(proto, KEY,
|
|
|
556 |
KEY == 'delete' ? function (a) {
|
|
|
557 |
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
|
|
|
558 |
} : KEY == 'has' ? function has(a) {
|
|
|
559 |
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
|
|
|
560 |
} : KEY == 'get' ? function get(a) {
|
|
|
561 |
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
|
|
|
562 |
} : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
|
|
|
563 |
: function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
|
|
|
564 |
);
|
|
|
565 |
};
|
|
|
566 |
if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
|
|
|
567 |
new C().entries().next();
|
|
|
568 |
}))) {
|
|
|
569 |
// create collection constructor
|
|
|
570 |
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
|
|
|
571 |
redefineAll(C.prototype, methods);
|
|
|
572 |
meta.NEED = true;
|
|
|
573 |
} else {
|
|
|
574 |
var instance = new C();
|
|
|
575 |
// early implementations not supports chaining
|
|
|
576 |
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
|
|
577 |
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
|
|
578 |
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
|
|
579 |
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
|
|
580 |
var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
|
|
|
581 |
// for early implementations -0 and +0 not the same
|
|
|
582 |
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
|
|
583 |
// V8 ~ Chromium 42- fails only with 5+ elements
|
|
|
584 |
var $instance = new C();
|
|
|
585 |
var index = 5;
|
|
|
586 |
while (index--) $instance[ADDER](index, index);
|
|
|
587 |
return !$instance.has(-0);
|
|
|
588 |
});
|
|
|
589 |
if (!ACCEPT_ITERABLES) {
|
|
|
590 |
C = wrapper(function (target, iterable) {
|
|
|
591 |
anInstance(target, C, NAME);
|
|
|
592 |
var that = inheritIfRequired(new Base(), target, C);
|
|
|
593 |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
|
594 |
return that;
|
|
|
595 |
});
|
|
|
596 |
C.prototype = proto;
|
|
|
597 |
proto.constructor = C;
|
|
|
598 |
}
|
|
|
599 |
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
|
|
600 |
fixMethod('delete');
|
|
|
601 |
fixMethod('has');
|
|
|
602 |
IS_MAP && fixMethod('get');
|
|
|
603 |
}
|
|
|
604 |
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
|
|
605 |
// weak collections should not contains .clear method
|
|
|
606 |
if (IS_WEAK && proto.clear) delete proto.clear;
|
|
|
607 |
}
|
|
|
608 |
|
|
|
609 |
setToStringTag(C, NAME);
|
|
|
610 |
|
|
|
611 |
O[NAME] = C;
|
|
|
612 |
$export($export.G + $export.W + $export.F * (C != Base), O);
|
|
|
613 |
|
|
|
614 |
if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
|
|
|
615 |
|
|
|
616 |
return C;
|
|
|
617 |
};
|
|
|
618 |
|
|
|
619 |
|
|
|
620 |
/***/ }),
|
|
|
621 |
|
|
|
622 |
/***/ "./node_modules/core-js/modules/_core.js":
|
|
|
623 |
/*!***********************************************!*\
|
|
|
624 |
!*** ./node_modules/core-js/modules/_core.js ***!
|
|
|
625 |
\***********************************************/
|
|
|
626 |
/*! no static exports found */
|
|
|
627 |
/***/ (function(module, exports) {
|
|
|
628 |
|
|
|
629 |
var core = module.exports = { version: '2.5.7' };
|
|
|
630 |
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
|
|
631 |
|
|
|
632 |
|
|
|
633 |
/***/ }),
|
|
|
634 |
|
|
|
635 |
/***/ "./node_modules/core-js/modules/_ctx.js":
|
|
|
636 |
/*!**********************************************!*\
|
|
|
637 |
!*** ./node_modules/core-js/modules/_ctx.js ***!
|
|
|
638 |
\**********************************************/
|
|
|
639 |
/*! no static exports found */
|
|
|
640 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
641 |
|
|
|
642 |
// optional / simple context binding
|
|
|
643 |
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
|
|
|
644 |
module.exports = function (fn, that, length) {
|
|
|
645 |
aFunction(fn);
|
|
|
646 |
if (that === undefined) return fn;
|
|
|
647 |
switch (length) {
|
|
|
648 |
case 1: return function (a) {
|
|
|
649 |
return fn.call(that, a);
|
|
|
650 |
};
|
|
|
651 |
case 2: return function (a, b) {
|
|
|
652 |
return fn.call(that, a, b);
|
|
|
653 |
};
|
|
|
654 |
case 3: return function (a, b, c) {
|
|
|
655 |
return fn.call(that, a, b, c);
|
|
|
656 |
};
|
|
|
657 |
}
|
|
|
658 |
return function (/* ...args */) {
|
|
|
659 |
return fn.apply(that, arguments);
|
|
|
660 |
};
|
|
|
661 |
};
|
|
|
662 |
|
|
|
663 |
|
|
|
664 |
/***/ }),
|
|
|
665 |
|
|
|
666 |
/***/ "./node_modules/core-js/modules/_defined.js":
|
|
|
667 |
/*!**************************************************!*\
|
|
|
668 |
!*** ./node_modules/core-js/modules/_defined.js ***!
|
|
|
669 |
\**************************************************/
|
|
|
670 |
/*! no static exports found */
|
|
|
671 |
/***/ (function(module, exports) {
|
|
|
672 |
|
|
|
673 |
// 7.2.1 RequireObjectCoercible(argument)
|
|
|
674 |
module.exports = function (it) {
|
|
|
675 |
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
|
676 |
return it;
|
|
|
677 |
};
|
|
|
678 |
|
|
|
679 |
|
|
|
680 |
/***/ }),
|
|
|
681 |
|
|
|
682 |
/***/ "./node_modules/core-js/modules/_descriptors.js":
|
|
|
683 |
/*!******************************************************!*\
|
|
|
684 |
!*** ./node_modules/core-js/modules/_descriptors.js ***!
|
|
|
685 |
\******************************************************/
|
|
|
686 |
/*! no static exports found */
|
|
|
687 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
688 |
|
|
|
689 |
// Thank's IE8 for his funny defineProperty
|
|
|
690 |
module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
|
|
|
691 |
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
|
692 |
});
|
|
|
693 |
|
|
|
694 |
|
|
|
695 |
/***/ }),
|
|
|
696 |
|
|
|
697 |
/***/ "./node_modules/core-js/modules/_dom-create.js":
|
|
|
698 |
/*!*****************************************************!*\
|
|
|
699 |
!*** ./node_modules/core-js/modules/_dom-create.js ***!
|
|
|
700 |
\*****************************************************/
|
|
|
701 |
/*! no static exports found */
|
|
|
702 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
703 |
|
|
|
704 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
705 |
var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
|
|
|
706 |
// typeof document.createElement is 'object' in old IE
|
|
|
707 |
var is = isObject(document) && isObject(document.createElement);
|
|
|
708 |
module.exports = function (it) {
|
|
|
709 |
return is ? document.createElement(it) : {};
|
|
|
710 |
};
|
|
|
711 |
|
|
|
712 |
|
|
|
713 |
/***/ }),
|
|
|
714 |
|
|
|
715 |
/***/ "./node_modules/core-js/modules/_enum-bug-keys.js":
|
|
|
716 |
/*!********************************************************!*\
|
|
|
717 |
!*** ./node_modules/core-js/modules/_enum-bug-keys.js ***!
|
|
|
718 |
\********************************************************/
|
|
|
719 |
/*! no static exports found */
|
|
|
720 |
/***/ (function(module, exports) {
|
|
|
721 |
|
|
|
722 |
// IE 8- don't enum bug keys
|
|
|
723 |
module.exports = (
|
|
|
724 |
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
|
|
725 |
).split(',');
|
|
|
726 |
|
|
|
727 |
|
|
|
728 |
/***/ }),
|
|
|
729 |
|
|
|
730 |
/***/ "./node_modules/core-js/modules/_export.js":
|
|
|
731 |
/*!*************************************************!*\
|
|
|
732 |
!*** ./node_modules/core-js/modules/_export.js ***!
|
|
|
733 |
\*************************************************/
|
|
|
734 |
/*! no static exports found */
|
|
|
735 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
736 |
|
|
|
737 |
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
|
|
|
738 |
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
|
|
|
739 |
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
|
|
|
740 |
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
|
|
|
741 |
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
|
|
|
742 |
var PROTOTYPE = 'prototype';
|
|
|
743 |
|
|
|
744 |
var $export = function (type, name, source) {
|
|
|
745 |
var IS_FORCED = type & $export.F;
|
|
|
746 |
var IS_GLOBAL = type & $export.G;
|
|
|
747 |
var IS_STATIC = type & $export.S;
|
|
|
748 |
var IS_PROTO = type & $export.P;
|
|
|
749 |
var IS_BIND = type & $export.B;
|
|
|
750 |
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
|
|
|
751 |
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
|
|
752 |
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
|
|
753 |
var key, own, out, exp;
|
|
|
754 |
if (IS_GLOBAL) source = name;
|
|
|
755 |
for (key in source) {
|
|
|
756 |
// contains in native
|
|
|
757 |
own = !IS_FORCED && target && target[key] !== undefined;
|
|
|
758 |
// export native or passed
|
|
|
759 |
out = (own ? target : source)[key];
|
|
|
760 |
// bind timers to global for call from export context
|
|
|
761 |
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
|
|
762 |
// extend global
|
|
|
763 |
if (target) redefine(target, key, out, type & $export.U);
|
|
|
764 |
// export
|
|
|
765 |
if (exports[key] != out) hide(exports, key, exp);
|
|
|
766 |
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
|
|
|
767 |
}
|
|
|
768 |
};
|
|
|
769 |
global.core = core;
|
|
|
770 |
// type bitmap
|
|
|
771 |
$export.F = 1; // forced
|
|
|
772 |
$export.G = 2; // global
|
|
|
773 |
$export.S = 4; // static
|
|
|
774 |
$export.P = 8; // proto
|
|
|
775 |
$export.B = 16; // bind
|
|
|
776 |
$export.W = 32; // wrap
|
|
|
777 |
$export.U = 64; // safe
|
|
|
778 |
$export.R = 128; // real proto method for `library`
|
|
|
779 |
module.exports = $export;
|
|
|
780 |
|
|
|
781 |
|
|
|
782 |
/***/ }),
|
|
|
783 |
|
|
|
784 |
/***/ "./node_modules/core-js/modules/_fails.js":
|
|
|
785 |
/*!************************************************!*\
|
|
|
786 |
!*** ./node_modules/core-js/modules/_fails.js ***!
|
|
|
787 |
\************************************************/
|
|
|
788 |
/*! no static exports found */
|
|
|
789 |
/***/ (function(module, exports) {
|
|
|
790 |
|
|
|
791 |
module.exports = function (exec) {
|
|
|
792 |
try {
|
|
|
793 |
return !!exec();
|
|
|
794 |
} catch (e) {
|
|
|
795 |
return true;
|
|
|
796 |
}
|
|
|
797 |
};
|
|
|
798 |
|
|
|
799 |
|
|
|
800 |
/***/ }),
|
|
|
801 |
|
|
|
802 |
/***/ "./node_modules/core-js/modules/_for-of.js":
|
|
|
803 |
/*!*************************************************!*\
|
|
|
804 |
!*** ./node_modules/core-js/modules/_for-of.js ***!
|
|
|
805 |
\*************************************************/
|
|
|
806 |
/*! no static exports found */
|
|
|
807 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
808 |
|
|
|
809 |
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
|
|
|
810 |
var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/modules/_iter-call.js");
|
|
|
811 |
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js");
|
|
|
812 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
813 |
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
|
|
|
814 |
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js");
|
|
|
815 |
var BREAK = {};
|
|
|
816 |
var RETURN = {};
|
|
|
817 |
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
|
|
|
818 |
var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
|
|
|
819 |
var f = ctx(fn, that, entries ? 2 : 1);
|
|
|
820 |
var index = 0;
|
|
|
821 |
var length, step, iterator, result;
|
|
|
822 |
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
|
|
|
823 |
// fast case for arrays with default iterator
|
|
|
824 |
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
|
|
|
825 |
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
|
|
|
826 |
if (result === BREAK || result === RETURN) return result;
|
|
|
827 |
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
|
|
|
828 |
result = call(iterator, f, step.value, entries);
|
|
|
829 |
if (result === BREAK || result === RETURN) return result;
|
|
|
830 |
}
|
|
|
831 |
};
|
|
|
832 |
exports.BREAK = BREAK;
|
|
|
833 |
exports.RETURN = RETURN;
|
|
|
834 |
|
|
|
835 |
|
|
|
836 |
/***/ }),
|
|
|
837 |
|
|
|
838 |
/***/ "./node_modules/core-js/modules/_global.js":
|
|
|
839 |
/*!*************************************************!*\
|
|
|
840 |
!*** ./node_modules/core-js/modules/_global.js ***!
|
|
|
841 |
\*************************************************/
|
|
|
842 |
/*! no static exports found */
|
|
|
843 |
/***/ (function(module, exports) {
|
|
|
844 |
|
|
|
845 |
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
|
846 |
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
|
|
847 |
? window : typeof self != 'undefined' && self.Math == Math ? self
|
|
|
848 |
// eslint-disable-next-line no-new-func
|
|
|
849 |
: Function('return this')();
|
|
|
850 |
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
|
|
851 |
|
|
|
852 |
|
|
|
853 |
/***/ }),
|
|
|
854 |
|
|
|
855 |
/***/ "./node_modules/core-js/modules/_has.js":
|
|
|
856 |
/*!**********************************************!*\
|
|
|
857 |
!*** ./node_modules/core-js/modules/_has.js ***!
|
|
|
858 |
\**********************************************/
|
|
|
859 |
/*! no static exports found */
|
|
|
860 |
/***/ (function(module, exports) {
|
|
|
861 |
|
|
|
862 |
var hasOwnProperty = {}.hasOwnProperty;
|
|
|
863 |
module.exports = function (it, key) {
|
|
|
864 |
return hasOwnProperty.call(it, key);
|
|
|
865 |
};
|
|
|
866 |
|
|
|
867 |
|
|
|
868 |
/***/ }),
|
|
|
869 |
|
|
|
870 |
/***/ "./node_modules/core-js/modules/_hide.js":
|
|
|
871 |
/*!***********************************************!*\
|
|
|
872 |
!*** ./node_modules/core-js/modules/_hide.js ***!
|
|
|
873 |
\***********************************************/
|
|
|
874 |
/*! no static exports found */
|
|
|
875 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
876 |
|
|
|
877 |
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
|
|
|
878 |
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
|
|
|
879 |
module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
|
|
|
880 |
return dP.f(object, key, createDesc(1, value));
|
|
|
881 |
} : function (object, key, value) {
|
|
|
882 |
object[key] = value;
|
|
|
883 |
return object;
|
|
|
884 |
};
|
|
|
885 |
|
|
|
886 |
|
|
|
887 |
/***/ }),
|
|
|
888 |
|
|
|
889 |
/***/ "./node_modules/core-js/modules/_html.js":
|
|
|
890 |
/*!***********************************************!*\
|
|
|
891 |
!*** ./node_modules/core-js/modules/_html.js ***!
|
|
|
892 |
\***********************************************/
|
|
|
893 |
/*! no static exports found */
|
|
|
894 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
895 |
|
|
|
896 |
var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
|
|
|
897 |
module.exports = document && document.documentElement;
|
|
|
898 |
|
|
|
899 |
|
|
|
900 |
/***/ }),
|
|
|
901 |
|
|
|
902 |
/***/ "./node_modules/core-js/modules/_ie8-dom-define.js":
|
|
|
903 |
/*!*********************************************************!*\
|
|
|
904 |
!*** ./node_modules/core-js/modules/_ie8-dom-define.js ***!
|
|
|
905 |
\*********************************************************/
|
|
|
906 |
/*! no static exports found */
|
|
|
907 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
908 |
|
|
|
909 |
module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
|
|
|
910 |
return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
|
911 |
});
|
|
|
912 |
|
|
|
913 |
|
|
|
914 |
/***/ }),
|
|
|
915 |
|
|
|
916 |
/***/ "./node_modules/core-js/modules/_inherit-if-required.js":
|
|
|
917 |
/*!**************************************************************!*\
|
|
|
918 |
!*** ./node_modules/core-js/modules/_inherit-if-required.js ***!
|
|
|
919 |
\**************************************************************/
|
|
|
920 |
/*! no static exports found */
|
|
|
921 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
922 |
|
|
|
923 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
924 |
var setPrototypeOf = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js").set;
|
|
|
925 |
module.exports = function (that, target, C) {
|
|
|
926 |
var S = target.constructor;
|
|
|
927 |
var P;
|
|
|
928 |
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
|
|
|
929 |
setPrototypeOf(that, P);
|
|
|
930 |
} return that;
|
|
|
931 |
};
|
|
|
932 |
|
|
|
933 |
|
|
|
934 |
/***/ }),
|
|
|
935 |
|
|
|
936 |
/***/ "./node_modules/core-js/modules/_iobject.js":
|
|
|
937 |
/*!**************************************************!*\
|
|
|
938 |
!*** ./node_modules/core-js/modules/_iobject.js ***!
|
|
|
939 |
\**************************************************/
|
|
|
940 |
/*! no static exports found */
|
|
|
941 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
942 |
|
|
|
943 |
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
|
944 |
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
|
|
|
945 |
// eslint-disable-next-line no-prototype-builtins
|
|
|
946 |
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
|
947 |
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
|
948 |
};
|
|
|
949 |
|
|
|
950 |
|
|
|
951 |
/***/ }),
|
|
|
952 |
|
|
|
953 |
/***/ "./node_modules/core-js/modules/_is-array-iter.js":
|
|
|
954 |
/*!********************************************************!*\
|
|
|
955 |
!*** ./node_modules/core-js/modules/_is-array-iter.js ***!
|
|
|
956 |
\********************************************************/
|
|
|
957 |
/*! no static exports found */
|
|
|
958 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
959 |
|
|
|
960 |
// check on default Array iterator
|
|
|
961 |
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
|
|
|
962 |
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
|
|
|
963 |
var ArrayProto = Array.prototype;
|
|
|
964 |
|
|
|
965 |
module.exports = function (it) {
|
|
|
966 |
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
|
967 |
};
|
|
|
968 |
|
|
|
969 |
|
|
|
970 |
/***/ }),
|
|
|
971 |
|
|
|
972 |
/***/ "./node_modules/core-js/modules/_is-array.js":
|
|
|
973 |
/*!***************************************************!*\
|
|
|
974 |
!*** ./node_modules/core-js/modules/_is-array.js ***!
|
|
|
975 |
\***************************************************/
|
|
|
976 |
/*! no static exports found */
|
|
|
977 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
978 |
|
|
|
979 |
// 7.2.2 IsArray(argument)
|
|
|
980 |
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
|
|
|
981 |
module.exports = Array.isArray || function isArray(arg) {
|
|
|
982 |
return cof(arg) == 'Array';
|
|
|
983 |
};
|
|
|
984 |
|
|
|
985 |
|
|
|
986 |
/***/ }),
|
|
|
987 |
|
|
|
988 |
/***/ "./node_modules/core-js/modules/_is-object.js":
|
|
|
989 |
/*!****************************************************!*\
|
|
|
990 |
!*** ./node_modules/core-js/modules/_is-object.js ***!
|
|
|
991 |
\****************************************************/
|
|
|
992 |
/*! no static exports found */
|
|
|
993 |
/***/ (function(module, exports) {
|
|
|
994 |
|
|
|
995 |
module.exports = function (it) {
|
|
|
996 |
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
|
997 |
};
|
|
|
998 |
|
|
|
999 |
|
|
|
1000 |
/***/ }),
|
|
|
1001 |
|
|
|
1002 |
/***/ "./node_modules/core-js/modules/_iter-call.js":
|
|
|
1003 |
/*!****************************************************!*\
|
|
|
1004 |
!*** ./node_modules/core-js/modules/_iter-call.js ***!
|
|
|
1005 |
\****************************************************/
|
|
|
1006 |
/*! no static exports found */
|
|
|
1007 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1008 |
|
|
|
1009 |
// call something on iterator step with safe closing on error
|
|
|
1010 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
1011 |
module.exports = function (iterator, fn, value, entries) {
|
|
|
1012 |
try {
|
|
|
1013 |
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
|
1014 |
// 7.4.6 IteratorClose(iterator, completion)
|
|
|
1015 |
} catch (e) {
|
|
|
1016 |
var ret = iterator['return'];
|
|
|
1017 |
if (ret !== undefined) anObject(ret.call(iterator));
|
|
|
1018 |
throw e;
|
|
|
1019 |
}
|
|
|
1020 |
};
|
|
|
1021 |
|
|
|
1022 |
|
|
|
1023 |
/***/ }),
|
|
|
1024 |
|
|
|
1025 |
/***/ "./node_modules/core-js/modules/_iter-create.js":
|
|
|
1026 |
/*!******************************************************!*\
|
|
|
1027 |
!*** ./node_modules/core-js/modules/_iter-create.js ***!
|
|
|
1028 |
\******************************************************/
|
|
|
1029 |
/*! no static exports found */
|
|
|
1030 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1031 |
|
|
|
1032 |
"use strict";
|
|
|
1033 |
|
|
|
1034 |
var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
|
|
|
1035 |
var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
|
|
|
1036 |
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
|
|
|
1037 |
var IteratorPrototype = {};
|
|
|
1038 |
|
|
|
1039 |
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
|
1040 |
__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; });
|
|
|
1041 |
|
|
|
1042 |
module.exports = function (Constructor, NAME, next) {
|
|
|
1043 |
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
|
|
1044 |
setToStringTag(Constructor, NAME + ' Iterator');
|
|
|
1045 |
};
|
|
|
1046 |
|
|
|
1047 |
|
|
|
1048 |
/***/ }),
|
|
|
1049 |
|
|
|
1050 |
/***/ "./node_modules/core-js/modules/_iter-define.js":
|
|
|
1051 |
/*!******************************************************!*\
|
|
|
1052 |
!*** ./node_modules/core-js/modules/_iter-define.js ***!
|
|
|
1053 |
\******************************************************/
|
|
|
1054 |
/*! no static exports found */
|
|
|
1055 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1056 |
|
|
|
1057 |
"use strict";
|
|
|
1058 |
|
|
|
1059 |
var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
|
|
|
1060 |
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
|
|
|
1061 |
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
|
|
|
1062 |
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
|
|
|
1063 |
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
|
|
|
1064 |
var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js");
|
|
|
1065 |
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
|
|
|
1066 |
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
|
|
|
1067 |
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
|
|
|
1068 |
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
|
|
1069 |
var FF_ITERATOR = '@@iterator';
|
|
|
1070 |
var KEYS = 'keys';
|
|
|
1071 |
var VALUES = 'values';
|
|
|
1072 |
|
|
|
1073 |
var returnThis = function () { return this; };
|
|
|
1074 |
|
|
|
1075 |
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
|
|
1076 |
$iterCreate(Constructor, NAME, next);
|
|
|
1077 |
var getMethod = function (kind) {
|
|
|
1078 |
if (!BUGGY && kind in proto) return proto[kind];
|
|
|
1079 |
switch (kind) {
|
|
|
1080 |
case KEYS: return function keys() { return new Constructor(this, kind); };
|
|
|
1081 |
case VALUES: return function values() { return new Constructor(this, kind); };
|
|
|
1082 |
} return function entries() { return new Constructor(this, kind); };
|
|
|
1083 |
};
|
|
|
1084 |
var TAG = NAME + ' Iterator';
|
|
|
1085 |
var DEF_VALUES = DEFAULT == VALUES;
|
|
|
1086 |
var VALUES_BUG = false;
|
|
|
1087 |
var proto = Base.prototype;
|
|
|
1088 |
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
|
|
1089 |
var $default = $native || getMethod(DEFAULT);
|
|
|
1090 |
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
|
|
1091 |
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
|
|
1092 |
var methods, key, IteratorPrototype;
|
|
|
1093 |
// Fix native
|
|
|
1094 |
if ($anyNative) {
|
|
|
1095 |
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
|
|
1096 |
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
|
|
1097 |
// Set @@toStringTag to native iterators
|
|
|
1098 |
setToStringTag(IteratorPrototype, TAG, true);
|
|
|
1099 |
// fix for some old engines
|
|
|
1100 |
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
|
|
1101 |
}
|
|
|
1102 |
}
|
|
|
1103 |
// fix Array#{values, @@iterator}.name in V8 / FF
|
|
|
1104 |
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
|
|
1105 |
VALUES_BUG = true;
|
|
|
1106 |
$default = function values() { return $native.call(this); };
|
|
|
1107 |
}
|
|
|
1108 |
// Define iterator
|
|
|
1109 |
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
|
|
1110 |
hide(proto, ITERATOR, $default);
|
|
|
1111 |
}
|
|
|
1112 |
// Plug for library
|
|
|
1113 |
Iterators[NAME] = $default;
|
|
|
1114 |
Iterators[TAG] = returnThis;
|
|
|
1115 |
if (DEFAULT) {
|
|
|
1116 |
methods = {
|
|
|
1117 |
values: DEF_VALUES ? $default : getMethod(VALUES),
|
|
|
1118 |
keys: IS_SET ? $default : getMethod(KEYS),
|
|
|
1119 |
entries: $entries
|
|
|
1120 |
};
|
|
|
1121 |
if (FORCED) for (key in methods) {
|
|
|
1122 |
if (!(key in proto)) redefine(proto, key, methods[key]);
|
|
|
1123 |
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
|
|
1124 |
}
|
|
|
1125 |
return methods;
|
|
|
1126 |
};
|
|
|
1127 |
|
|
|
1128 |
|
|
|
1129 |
/***/ }),
|
|
|
1130 |
|
|
|
1131 |
/***/ "./node_modules/core-js/modules/_iter-detect.js":
|
|
|
1132 |
/*!******************************************************!*\
|
|
|
1133 |
!*** ./node_modules/core-js/modules/_iter-detect.js ***!
|
|
|
1134 |
\******************************************************/
|
|
|
1135 |
/*! no static exports found */
|
|
|
1136 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1137 |
|
|
|
1138 |
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
|
|
|
1139 |
var SAFE_CLOSING = false;
|
|
|
1140 |
|
|
|
1141 |
try {
|
|
|
1142 |
var riter = [7][ITERATOR]();
|
|
|
1143 |
riter['return'] = function () { SAFE_CLOSING = true; };
|
|
|
1144 |
// eslint-disable-next-line no-throw-literal
|
|
|
1145 |
Array.from(riter, function () { throw 2; });
|
|
|
1146 |
} catch (e) { /* empty */ }
|
|
|
1147 |
|
|
|
1148 |
module.exports = function (exec, skipClosing) {
|
|
|
1149 |
if (!skipClosing && !SAFE_CLOSING) return false;
|
|
|
1150 |
var safe = false;
|
|
|
1151 |
try {
|
|
|
1152 |
var arr = [7];
|
|
|
1153 |
var iter = arr[ITERATOR]();
|
|
|
1154 |
iter.next = function () { return { done: safe = true }; };
|
|
|
1155 |
arr[ITERATOR] = function () { return iter; };
|
|
|
1156 |
exec(arr);
|
|
|
1157 |
} catch (e) { /* empty */ }
|
|
|
1158 |
return safe;
|
|
|
1159 |
};
|
|
|
1160 |
|
|
|
1161 |
|
|
|
1162 |
/***/ }),
|
|
|
1163 |
|
|
|
1164 |
/***/ "./node_modules/core-js/modules/_iter-step.js":
|
|
|
1165 |
/*!****************************************************!*\
|
|
|
1166 |
!*** ./node_modules/core-js/modules/_iter-step.js ***!
|
|
|
1167 |
\****************************************************/
|
|
|
1168 |
/*! no static exports found */
|
|
|
1169 |
/***/ (function(module, exports) {
|
|
|
1170 |
|
|
|
1171 |
module.exports = function (done, value) {
|
|
|
1172 |
return { value: value, done: !!done };
|
|
|
1173 |
};
|
|
|
1174 |
|
|
|
1175 |
|
|
|
1176 |
/***/ }),
|
|
|
1177 |
|
|
|
1178 |
/***/ "./node_modules/core-js/modules/_iterators.js":
|
|
|
1179 |
/*!****************************************************!*\
|
|
|
1180 |
!*** ./node_modules/core-js/modules/_iterators.js ***!
|
|
|
1181 |
\****************************************************/
|
|
|
1182 |
/*! no static exports found */
|
|
|
1183 |
/***/ (function(module, exports) {
|
|
|
1184 |
|
|
|
1185 |
module.exports = {};
|
|
|
1186 |
|
|
|
1187 |
|
|
|
1188 |
/***/ }),
|
|
|
1189 |
|
|
|
1190 |
/***/ "./node_modules/core-js/modules/_library.js":
|
|
|
1191 |
/*!**************************************************!*\
|
|
|
1192 |
!*** ./node_modules/core-js/modules/_library.js ***!
|
|
|
1193 |
\**************************************************/
|
|
|
1194 |
/*! no static exports found */
|
|
|
1195 |
/***/ (function(module, exports) {
|
|
|
1196 |
|
|
|
1197 |
module.exports = false;
|
|
|
1198 |
|
|
|
1199 |
|
|
|
1200 |
/***/ }),
|
|
|
1201 |
|
|
|
1202 |
/***/ "./node_modules/core-js/modules/_meta.js":
|
|
|
1203 |
/*!***********************************************!*\
|
|
|
1204 |
!*** ./node_modules/core-js/modules/_meta.js ***!
|
|
|
1205 |
\***********************************************/
|
|
|
1206 |
/*! no static exports found */
|
|
|
1207 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1208 |
|
|
|
1209 |
var META = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('meta');
|
|
|
1210 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
1211 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1212 |
var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
|
|
|
1213 |
var id = 0;
|
|
|
1214 |
var isExtensible = Object.isExtensible || function () {
|
|
|
1215 |
return true;
|
|
|
1216 |
};
|
|
|
1217 |
var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
|
|
|
1218 |
return isExtensible(Object.preventExtensions({}));
|
|
|
1219 |
});
|
|
|
1220 |
var setMeta = function (it) {
|
|
|
1221 |
setDesc(it, META, { value: {
|
|
|
1222 |
i: 'O' + ++id, // object ID
|
|
|
1223 |
w: {} // weak collections IDs
|
|
|
1224 |
} });
|
|
|
1225 |
};
|
|
|
1226 |
var fastKey = function (it, create) {
|
|
|
1227 |
// return primitive with prefix
|
|
|
1228 |
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
|
1229 |
if (!has(it, META)) {
|
|
|
1230 |
// can't set metadata to uncaught frozen object
|
|
|
1231 |
if (!isExtensible(it)) return 'F';
|
|
|
1232 |
// not necessary to add metadata
|
|
|
1233 |
if (!create) return 'E';
|
|
|
1234 |
// add missing metadata
|
|
|
1235 |
setMeta(it);
|
|
|
1236 |
// return object ID
|
|
|
1237 |
} return it[META].i;
|
|
|
1238 |
};
|
|
|
1239 |
var getWeak = function (it, create) {
|
|
|
1240 |
if (!has(it, META)) {
|
|
|
1241 |
// can't set metadata to uncaught frozen object
|
|
|
1242 |
if (!isExtensible(it)) return true;
|
|
|
1243 |
// not necessary to add metadata
|
|
|
1244 |
if (!create) return false;
|
|
|
1245 |
// add missing metadata
|
|
|
1246 |
setMeta(it);
|
|
|
1247 |
// return hash weak collections IDs
|
|
|
1248 |
} return it[META].w;
|
|
|
1249 |
};
|
|
|
1250 |
// add metadata on freeze-family methods calling
|
|
|
1251 |
var onFreeze = function (it) {
|
|
|
1252 |
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
|
|
1253 |
return it;
|
|
|
1254 |
};
|
|
|
1255 |
var meta = module.exports = {
|
|
|
1256 |
KEY: META,
|
|
|
1257 |
NEED: false,
|
|
|
1258 |
fastKey: fastKey,
|
|
|
1259 |
getWeak: getWeak,
|
|
|
1260 |
onFreeze: onFreeze
|
|
|
1261 |
};
|
|
|
1262 |
|
|
|
1263 |
|
|
|
1264 |
/***/ }),
|
|
|
1265 |
|
|
|
1266 |
/***/ "./node_modules/core-js/modules/_metadata.js":
|
|
|
1267 |
/*!***************************************************!*\
|
|
|
1268 |
!*** ./node_modules/core-js/modules/_metadata.js ***!
|
|
|
1269 |
\***************************************************/
|
|
|
1270 |
/*! no static exports found */
|
|
|
1271 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1272 |
|
|
|
1273 |
var Map = __webpack_require__(/*! ./es6.map */ "./node_modules/core-js/modules/es6.map.js");
|
|
|
1274 |
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
|
|
|
1275 |
var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('metadata');
|
|
|
1276 |
var store = shared.store || (shared.store = new (__webpack_require__(/*! ./es6.weak-map */ "./node_modules/core-js/modules/es6.weak-map.js"))());
|
|
|
1277 |
|
|
|
1278 |
var getOrCreateMetadataMap = function (target, targetKey, create) {
|
|
|
1279 |
var targetMetadata = store.get(target);
|
|
|
1280 |
if (!targetMetadata) {
|
|
|
1281 |
if (!create) return undefined;
|
|
|
1282 |
store.set(target, targetMetadata = new Map());
|
|
|
1283 |
}
|
|
|
1284 |
var keyMetadata = targetMetadata.get(targetKey);
|
|
|
1285 |
if (!keyMetadata) {
|
|
|
1286 |
if (!create) return undefined;
|
|
|
1287 |
targetMetadata.set(targetKey, keyMetadata = new Map());
|
|
|
1288 |
} return keyMetadata;
|
|
|
1289 |
};
|
|
|
1290 |
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
|
|
|
1291 |
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
|
|
1292 |
return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
|
|
|
1293 |
};
|
|
|
1294 |
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
|
|
|
1295 |
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
|
|
1296 |
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
|
|
|
1297 |
};
|
|
|
1298 |
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
|
|
|
1299 |
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
|
|
|
1300 |
};
|
|
|
1301 |
var ordinaryOwnMetadataKeys = function (target, targetKey) {
|
|
|
1302 |
var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
|
|
|
1303 |
var keys = [];
|
|
|
1304 |
if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
|
|
|
1305 |
return keys;
|
|
|
1306 |
};
|
|
|
1307 |
var toMetaKey = function (it) {
|
|
|
1308 |
return it === undefined || typeof it == 'symbol' ? it : String(it);
|
|
|
1309 |
};
|
|
|
1310 |
var exp = function (O) {
|
|
|
1311 |
$export($export.S, 'Reflect', O);
|
|
|
1312 |
};
|
|
|
1313 |
|
|
|
1314 |
module.exports = {
|
|
|
1315 |
store: store,
|
|
|
1316 |
map: getOrCreateMetadataMap,
|
|
|
1317 |
has: ordinaryHasOwnMetadata,
|
|
|
1318 |
get: ordinaryGetOwnMetadata,
|
|
|
1319 |
set: ordinaryDefineOwnMetadata,
|
|
|
1320 |
keys: ordinaryOwnMetadataKeys,
|
|
|
1321 |
key: toMetaKey,
|
|
|
1322 |
exp: exp
|
|
|
1323 |
};
|
|
|
1324 |
|
|
|
1325 |
|
|
|
1326 |
/***/ }),
|
|
|
1327 |
|
|
|
1328 |
/***/ "./node_modules/core-js/modules/_object-assign.js":
|
|
|
1329 |
/*!********************************************************!*\
|
|
|
1330 |
!*** ./node_modules/core-js/modules/_object-assign.js ***!
|
|
|
1331 |
\********************************************************/
|
|
|
1332 |
/*! no static exports found */
|
|
|
1333 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1334 |
|
|
|
1335 |
"use strict";
|
|
|
1336 |
|
|
|
1337 |
// 19.1.2.1 Object.assign(target, source, ...)
|
|
|
1338 |
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
|
|
|
1339 |
var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
|
|
|
1340 |
var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
|
|
|
1341 |
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
|
|
|
1342 |
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
|
|
|
1343 |
var $assign = Object.assign;
|
|
|
1344 |
|
|
|
1345 |
// should work with symbols and should have deterministic property order (V8 bug)
|
|
|
1346 |
module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
|
|
|
1347 |
var A = {};
|
|
|
1348 |
var B = {};
|
|
|
1349 |
// eslint-disable-next-line no-undef
|
|
|
1350 |
var S = Symbol();
|
|
|
1351 |
var K = 'abcdefghijklmnopqrst';
|
|
|
1352 |
A[S] = 7;
|
|
|
1353 |
K.split('').forEach(function (k) { B[k] = k; });
|
|
|
1354 |
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
|
|
1355 |
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
|
|
1356 |
var T = toObject(target);
|
|
|
1357 |
var aLen = arguments.length;
|
|
|
1358 |
var index = 1;
|
|
|
1359 |
var getSymbols = gOPS.f;
|
|
|
1360 |
var isEnum = pIE.f;
|
|
|
1361 |
while (aLen > index) {
|
|
|
1362 |
var S = IObject(arguments[index++]);
|
|
|
1363 |
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
|
|
1364 |
var length = keys.length;
|
|
|
1365 |
var j = 0;
|
|
|
1366 |
var key;
|
|
|
1367 |
while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
|
|
|
1368 |
} return T;
|
|
|
1369 |
} : $assign;
|
|
|
1370 |
|
|
|
1371 |
|
|
|
1372 |
/***/ }),
|
|
|
1373 |
|
|
|
1374 |
/***/ "./node_modules/core-js/modules/_object-create.js":
|
|
|
1375 |
/*!********************************************************!*\
|
|
|
1376 |
!*** ./node_modules/core-js/modules/_object-create.js ***!
|
|
|
1377 |
\********************************************************/
|
|
|
1378 |
/*! no static exports found */
|
|
|
1379 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1380 |
|
|
|
1381 |
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
|
1382 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
1383 |
var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js");
|
|
|
1384 |
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");
|
|
|
1385 |
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
|
|
|
1386 |
var Empty = function () { /* empty */ };
|
|
|
1387 |
var PROTOTYPE = 'prototype';
|
|
|
1388 |
|
|
|
1389 |
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
|
1390 |
var createDict = function () {
|
|
|
1391 |
// Thrash, waste and sodomy: IE GC bug
|
|
|
1392 |
var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('iframe');
|
|
|
1393 |
var i = enumBugKeys.length;
|
|
|
1394 |
var lt = '<';
|
|
|
1395 |
var gt = '>';
|
|
|
1396 |
var iframeDocument;
|
|
|
1397 |
iframe.style.display = 'none';
|
|
|
1398 |
__webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js").appendChild(iframe);
|
|
|
1399 |
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
|
1400 |
// createDict = iframe.contentWindow.Object;
|
|
|
1401 |
// html.removeChild(iframe);
|
|
|
1402 |
iframeDocument = iframe.contentWindow.document;
|
|
|
1403 |
iframeDocument.open();
|
|
|
1404 |
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
|
1405 |
iframeDocument.close();
|
|
|
1406 |
createDict = iframeDocument.F;
|
|
|
1407 |
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
|
1408 |
return createDict();
|
|
|
1409 |
};
|
|
|
1410 |
|
|
|
1411 |
module.exports = Object.create || function create(O, Properties) {
|
|
|
1412 |
var result;
|
|
|
1413 |
if (O !== null) {
|
|
|
1414 |
Empty[PROTOTYPE] = anObject(O);
|
|
|
1415 |
result = new Empty();
|
|
|
1416 |
Empty[PROTOTYPE] = null;
|
|
|
1417 |
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
|
1418 |
result[IE_PROTO] = O;
|
|
|
1419 |
} else result = createDict();
|
|
|
1420 |
return Properties === undefined ? result : dPs(result, Properties);
|
|
|
1421 |
};
|
|
|
1422 |
|
|
|
1423 |
|
|
|
1424 |
/***/ }),
|
|
|
1425 |
|
|
|
1426 |
/***/ "./node_modules/core-js/modules/_object-dp.js":
|
|
|
1427 |
/*!****************************************************!*\
|
|
|
1428 |
!*** ./node_modules/core-js/modules/_object-dp.js ***!
|
|
|
1429 |
\****************************************************/
|
|
|
1430 |
/*! no static exports found */
|
|
|
1431 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1432 |
|
|
|
1433 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
1434 |
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
|
|
|
1435 |
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
|
|
|
1436 |
var dP = Object.defineProperty;
|
|
|
1437 |
|
|
|
1438 |
exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
|
1439 |
anObject(O);
|
|
|
1440 |
P = toPrimitive(P, true);
|
|
|
1441 |
anObject(Attributes);
|
|
|
1442 |
if (IE8_DOM_DEFINE) try {
|
|
|
1443 |
return dP(O, P, Attributes);
|
|
|
1444 |
} catch (e) { /* empty */ }
|
|
|
1445 |
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
|
1446 |
if ('value' in Attributes) O[P] = Attributes.value;
|
|
|
1447 |
return O;
|
|
|
1448 |
};
|
|
|
1449 |
|
|
|
1450 |
|
|
|
1451 |
/***/ }),
|
|
|
1452 |
|
|
|
1453 |
/***/ "./node_modules/core-js/modules/_object-dps.js":
|
|
|
1454 |
/*!*****************************************************!*\
|
|
|
1455 |
!*** ./node_modules/core-js/modules/_object-dps.js ***!
|
|
|
1456 |
\*****************************************************/
|
|
|
1457 |
/*! no static exports found */
|
|
|
1458 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1459 |
|
|
|
1460 |
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
|
|
|
1461 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
1462 |
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
|
|
|
1463 |
|
|
|
1464 |
module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
|
1465 |
anObject(O);
|
|
|
1466 |
var keys = getKeys(Properties);
|
|
|
1467 |
var length = keys.length;
|
|
|
1468 |
var i = 0;
|
|
|
1469 |
var P;
|
|
|
1470 |
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
|
1471 |
return O;
|
|
|
1472 |
};
|
|
|
1473 |
|
|
|
1474 |
|
|
|
1475 |
/***/ }),
|
|
|
1476 |
|
|
|
1477 |
/***/ "./node_modules/core-js/modules/_object-gopd.js":
|
|
|
1478 |
/*!******************************************************!*\
|
|
|
1479 |
!*** ./node_modules/core-js/modules/_object-gopd.js ***!
|
|
|
1480 |
\******************************************************/
|
|
|
1481 |
/*! no static exports found */
|
|
|
1482 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1483 |
|
|
|
1484 |
var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
|
|
|
1485 |
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
|
|
|
1486 |
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
|
|
|
1487 |
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
|
|
|
1488 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1489 |
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
|
|
|
1490 |
var gOPD = Object.getOwnPropertyDescriptor;
|
|
|
1491 |
|
|
|
1492 |
exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
|
|
1493 |
O = toIObject(O);
|
|
|
1494 |
P = toPrimitive(P, true);
|
|
|
1495 |
if (IE8_DOM_DEFINE) try {
|
|
|
1496 |
return gOPD(O, P);
|
|
|
1497 |
} catch (e) { /* empty */ }
|
|
|
1498 |
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
|
|
1499 |
};
|
|
|
1500 |
|
|
|
1501 |
|
|
|
1502 |
/***/ }),
|
|
|
1503 |
|
|
|
1504 |
/***/ "./node_modules/core-js/modules/_object-gops.js":
|
|
|
1505 |
/*!******************************************************!*\
|
|
|
1506 |
!*** ./node_modules/core-js/modules/_object-gops.js ***!
|
|
|
1507 |
\******************************************************/
|
|
|
1508 |
/*! no static exports found */
|
|
|
1509 |
/***/ (function(module, exports) {
|
|
|
1510 |
|
|
|
1511 |
exports.f = Object.getOwnPropertySymbols;
|
|
|
1512 |
|
|
|
1513 |
|
|
|
1514 |
/***/ }),
|
|
|
1515 |
|
|
|
1516 |
/***/ "./node_modules/core-js/modules/_object-gpo.js":
|
|
|
1517 |
/*!*****************************************************!*\
|
|
|
1518 |
!*** ./node_modules/core-js/modules/_object-gpo.js ***!
|
|
|
1519 |
\*****************************************************/
|
|
|
1520 |
/*! no static exports found */
|
|
|
1521 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1522 |
|
|
|
1523 |
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
|
|
1524 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1525 |
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
|
|
|
1526 |
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
|
|
|
1527 |
var ObjectProto = Object.prototype;
|
|
|
1528 |
|
|
|
1529 |
module.exports = Object.getPrototypeOf || function (O) {
|
|
|
1530 |
O = toObject(O);
|
|
|
1531 |
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
|
1532 |
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
|
1533 |
return O.constructor.prototype;
|
|
|
1534 |
} return O instanceof Object ? ObjectProto : null;
|
|
|
1535 |
};
|
|
|
1536 |
|
|
|
1537 |
|
|
|
1538 |
/***/ }),
|
|
|
1539 |
|
|
|
1540 |
/***/ "./node_modules/core-js/modules/_object-keys-internal.js":
|
|
|
1541 |
/*!***************************************************************!*\
|
|
|
1542 |
!*** ./node_modules/core-js/modules/_object-keys-internal.js ***!
|
|
|
1543 |
\***************************************************************/
|
|
|
1544 |
/*! no static exports found */
|
|
|
1545 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1546 |
|
|
|
1547 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1548 |
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
|
|
|
1549 |
var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false);
|
|
|
1550 |
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
|
|
|
1551 |
|
|
|
1552 |
module.exports = function (object, names) {
|
|
|
1553 |
var O = toIObject(object);
|
|
|
1554 |
var i = 0;
|
|
|
1555 |
var result = [];
|
|
|
1556 |
var key;
|
|
|
1557 |
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
|
|
1558 |
// Don't enum bug & hidden keys
|
|
|
1559 |
while (names.length > i) if (has(O, key = names[i++])) {
|
|
|
1560 |
~arrayIndexOf(result, key) || result.push(key);
|
|
|
1561 |
}
|
|
|
1562 |
return result;
|
|
|
1563 |
};
|
|
|
1564 |
|
|
|
1565 |
|
|
|
1566 |
/***/ }),
|
|
|
1567 |
|
|
|
1568 |
/***/ "./node_modules/core-js/modules/_object-keys.js":
|
|
|
1569 |
/*!******************************************************!*\
|
|
|
1570 |
!*** ./node_modules/core-js/modules/_object-keys.js ***!
|
|
|
1571 |
\******************************************************/
|
|
|
1572 |
/*! no static exports found */
|
|
|
1573 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1574 |
|
|
|
1575 |
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
|
1576 |
var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js");
|
|
|
1577 |
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");
|
|
|
1578 |
|
|
|
1579 |
module.exports = Object.keys || function keys(O) {
|
|
|
1580 |
return $keys(O, enumBugKeys);
|
|
|
1581 |
};
|
|
|
1582 |
|
|
|
1583 |
|
|
|
1584 |
/***/ }),
|
|
|
1585 |
|
|
|
1586 |
/***/ "./node_modules/core-js/modules/_object-pie.js":
|
|
|
1587 |
/*!*****************************************************!*\
|
|
|
1588 |
!*** ./node_modules/core-js/modules/_object-pie.js ***!
|
|
|
1589 |
\*****************************************************/
|
|
|
1590 |
/*! no static exports found */
|
|
|
1591 |
/***/ (function(module, exports) {
|
|
|
1592 |
|
|
|
1593 |
exports.f = {}.propertyIsEnumerable;
|
|
|
1594 |
|
|
|
1595 |
|
|
|
1596 |
/***/ }),
|
|
|
1597 |
|
|
|
1598 |
/***/ "./node_modules/core-js/modules/_property-desc.js":
|
|
|
1599 |
/*!********************************************************!*\
|
|
|
1600 |
!*** ./node_modules/core-js/modules/_property-desc.js ***!
|
|
|
1601 |
\********************************************************/
|
|
|
1602 |
/*! no static exports found */
|
|
|
1603 |
/***/ (function(module, exports) {
|
|
|
1604 |
|
|
|
1605 |
module.exports = function (bitmap, value) {
|
|
|
1606 |
return {
|
|
|
1607 |
enumerable: !(bitmap & 1),
|
|
|
1608 |
configurable: !(bitmap & 2),
|
|
|
1609 |
writable: !(bitmap & 4),
|
|
|
1610 |
value: value
|
|
|
1611 |
};
|
|
|
1612 |
};
|
|
|
1613 |
|
|
|
1614 |
|
|
|
1615 |
/***/ }),
|
|
|
1616 |
|
|
|
1617 |
/***/ "./node_modules/core-js/modules/_redefine-all.js":
|
|
|
1618 |
/*!*******************************************************!*\
|
|
|
1619 |
!*** ./node_modules/core-js/modules/_redefine-all.js ***!
|
|
|
1620 |
\*******************************************************/
|
|
|
1621 |
/*! no static exports found */
|
|
|
1622 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1623 |
|
|
|
1624 |
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
|
|
|
1625 |
module.exports = function (target, src, safe) {
|
|
|
1626 |
for (var key in src) redefine(target, key, src[key], safe);
|
|
|
1627 |
return target;
|
|
|
1628 |
};
|
|
|
1629 |
|
|
|
1630 |
|
|
|
1631 |
/***/ }),
|
|
|
1632 |
|
|
|
1633 |
/***/ "./node_modules/core-js/modules/_redefine.js":
|
|
|
1634 |
/*!***************************************************!*\
|
|
|
1635 |
!*** ./node_modules/core-js/modules/_redefine.js ***!
|
|
|
1636 |
\***************************************************/
|
|
|
1637 |
/*! no static exports found */
|
|
|
1638 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1639 |
|
|
|
1640 |
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
|
|
|
1641 |
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
|
|
|
1642 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1643 |
var SRC = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('src');
|
|
|
1644 |
var TO_STRING = 'toString';
|
|
|
1645 |
var $toString = Function[TO_STRING];
|
|
|
1646 |
var TPL = ('' + $toString).split(TO_STRING);
|
|
|
1647 |
|
|
|
1648 |
__webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").inspectSource = function (it) {
|
|
|
1649 |
return $toString.call(it);
|
|
|
1650 |
};
|
|
|
1651 |
|
|
|
1652 |
(module.exports = function (O, key, val, safe) {
|
|
|
1653 |
var isFunction = typeof val == 'function';
|
|
|
1654 |
if (isFunction) has(val, 'name') || hide(val, 'name', key);
|
|
|
1655 |
if (O[key] === val) return;
|
|
|
1656 |
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
|
|
|
1657 |
if (O === global) {
|
|
|
1658 |
O[key] = val;
|
|
|
1659 |
} else if (!safe) {
|
|
|
1660 |
delete O[key];
|
|
|
1661 |
hide(O, key, val);
|
|
|
1662 |
} else if (O[key]) {
|
|
|
1663 |
O[key] = val;
|
|
|
1664 |
} else {
|
|
|
1665 |
hide(O, key, val);
|
|
|
1666 |
}
|
|
|
1667 |
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
|
1668 |
})(Function.prototype, TO_STRING, function toString() {
|
|
|
1669 |
return typeof this == 'function' && this[SRC] || $toString.call(this);
|
|
|
1670 |
});
|
|
|
1671 |
|
|
|
1672 |
|
|
|
1673 |
/***/ }),
|
|
|
1674 |
|
|
|
1675 |
/***/ "./node_modules/core-js/modules/_set-proto.js":
|
|
|
1676 |
/*!****************************************************!*\
|
|
|
1677 |
!*** ./node_modules/core-js/modules/_set-proto.js ***!
|
|
|
1678 |
\****************************************************/
|
|
|
1679 |
/*! no static exports found */
|
|
|
1680 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1681 |
|
|
|
1682 |
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
|
1683 |
/* eslint-disable no-proto */
|
|
|
1684 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
1685 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
1686 |
var check = function (O, proto) {
|
|
|
1687 |
anObject(O);
|
|
|
1688 |
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
|
|
|
1689 |
};
|
|
|
1690 |
module.exports = {
|
|
|
1691 |
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
|
|
|
1692 |
function (test, buggy, set) {
|
|
|
1693 |
try {
|
|
|
1694 |
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);
|
|
|
1695 |
set(test, []);
|
|
|
1696 |
buggy = !(test instanceof Array);
|
|
|
1697 |
} catch (e) { buggy = true; }
|
|
|
1698 |
return function setPrototypeOf(O, proto) {
|
|
|
1699 |
check(O, proto);
|
|
|
1700 |
if (buggy) O.__proto__ = proto;
|
|
|
1701 |
else set(O, proto);
|
|
|
1702 |
return O;
|
|
|
1703 |
};
|
|
|
1704 |
}({}, false) : undefined),
|
|
|
1705 |
check: check
|
|
|
1706 |
};
|
|
|
1707 |
|
|
|
1708 |
|
|
|
1709 |
/***/ }),
|
|
|
1710 |
|
|
|
1711 |
/***/ "./node_modules/core-js/modules/_set-species.js":
|
|
|
1712 |
/*!******************************************************!*\
|
|
|
1713 |
!*** ./node_modules/core-js/modules/_set-species.js ***!
|
|
|
1714 |
\******************************************************/
|
|
|
1715 |
/*! no static exports found */
|
|
|
1716 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1717 |
|
|
|
1718 |
"use strict";
|
|
|
1719 |
|
|
|
1720 |
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
|
|
|
1721 |
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
|
|
|
1722 |
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
|
|
|
1723 |
var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species');
|
|
|
1724 |
|
|
|
1725 |
module.exports = function (KEY) {
|
|
|
1726 |
var C = global[KEY];
|
|
|
1727 |
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
|
|
|
1728 |
configurable: true,
|
|
|
1729 |
get: function () { return this; }
|
|
|
1730 |
});
|
|
|
1731 |
};
|
|
|
1732 |
|
|
|
1733 |
|
|
|
1734 |
/***/ }),
|
|
|
1735 |
|
|
|
1736 |
/***/ "./node_modules/core-js/modules/_set-to-string-tag.js":
|
|
|
1737 |
/*!************************************************************!*\
|
|
|
1738 |
!*** ./node_modules/core-js/modules/_set-to-string-tag.js ***!
|
|
|
1739 |
\************************************************************/
|
|
|
1740 |
/*! no static exports found */
|
|
|
1741 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1742 |
|
|
|
1743 |
var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
|
|
|
1744 |
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
|
|
|
1745 |
var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag');
|
|
|
1746 |
|
|
|
1747 |
module.exports = function (it, tag, stat) {
|
|
|
1748 |
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
|
|
1749 |
};
|
|
|
1750 |
|
|
|
1751 |
|
|
|
1752 |
/***/ }),
|
|
|
1753 |
|
|
|
1754 |
/***/ "./node_modules/core-js/modules/_shared-key.js":
|
|
|
1755 |
/*!*****************************************************!*\
|
|
|
1756 |
!*** ./node_modules/core-js/modules/_shared-key.js ***!
|
|
|
1757 |
\*****************************************************/
|
|
|
1758 |
/*! no static exports found */
|
|
|
1759 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1760 |
|
|
|
1761 |
var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('keys');
|
|
|
1762 |
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
|
|
|
1763 |
module.exports = function (key) {
|
|
|
1764 |
return shared[key] || (shared[key] = uid(key));
|
|
|
1765 |
};
|
|
|
1766 |
|
|
|
1767 |
|
|
|
1768 |
/***/ }),
|
|
|
1769 |
|
|
|
1770 |
/***/ "./node_modules/core-js/modules/_shared.js":
|
|
|
1771 |
/*!*************************************************!*\
|
|
|
1772 |
!*** ./node_modules/core-js/modules/_shared.js ***!
|
|
|
1773 |
\*************************************************/
|
|
|
1774 |
/*! no static exports found */
|
|
|
1775 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1776 |
|
|
|
1777 |
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
|
|
|
1778 |
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
|
|
|
1779 |
var SHARED = '__core-js_shared__';
|
|
|
1780 |
var store = global[SHARED] || (global[SHARED] = {});
|
|
|
1781 |
|
|
|
1782 |
(module.exports = function (key, value) {
|
|
|
1783 |
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
|
1784 |
})('versions', []).push({
|
|
|
1785 |
version: core.version,
|
|
|
1786 |
mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js") ? 'pure' : 'global',
|
|
|
1787 |
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
|
|
|
1788 |
});
|
|
|
1789 |
|
|
|
1790 |
|
|
|
1791 |
/***/ }),
|
|
|
1792 |
|
|
|
1793 |
/***/ "./node_modules/core-js/modules/_to-absolute-index.js":
|
|
|
1794 |
/*!************************************************************!*\
|
|
|
1795 |
!*** ./node_modules/core-js/modules/_to-absolute-index.js ***!
|
|
|
1796 |
\************************************************************/
|
|
|
1797 |
/*! no static exports found */
|
|
|
1798 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1799 |
|
|
|
1800 |
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
|
|
|
1801 |
var max = Math.max;
|
|
|
1802 |
var min = Math.min;
|
|
|
1803 |
module.exports = function (index, length) {
|
|
|
1804 |
index = toInteger(index);
|
|
|
1805 |
return index < 0 ? max(index + length, 0) : min(index, length);
|
|
|
1806 |
};
|
|
|
1807 |
|
|
|
1808 |
|
|
|
1809 |
/***/ }),
|
|
|
1810 |
|
|
|
1811 |
/***/ "./node_modules/core-js/modules/_to-integer.js":
|
|
|
1812 |
/*!*****************************************************!*\
|
|
|
1813 |
!*** ./node_modules/core-js/modules/_to-integer.js ***!
|
|
|
1814 |
\*****************************************************/
|
|
|
1815 |
/*! no static exports found */
|
|
|
1816 |
/***/ (function(module, exports) {
|
|
|
1817 |
|
|
|
1818 |
// 7.1.4 ToInteger
|
|
|
1819 |
var ceil = Math.ceil;
|
|
|
1820 |
var floor = Math.floor;
|
|
|
1821 |
module.exports = function (it) {
|
|
|
1822 |
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
|
|
1823 |
};
|
|
|
1824 |
|
|
|
1825 |
|
|
|
1826 |
/***/ }),
|
|
|
1827 |
|
|
|
1828 |
/***/ "./node_modules/core-js/modules/_to-iobject.js":
|
|
|
1829 |
/*!*****************************************************!*\
|
|
|
1830 |
!*** ./node_modules/core-js/modules/_to-iobject.js ***!
|
|
|
1831 |
\*****************************************************/
|
|
|
1832 |
/*! no static exports found */
|
|
|
1833 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1834 |
|
|
|
1835 |
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
|
1836 |
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
|
|
|
1837 |
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
|
|
|
1838 |
module.exports = function (it) {
|
|
|
1839 |
return IObject(defined(it));
|
|
|
1840 |
};
|
|
|
1841 |
|
|
|
1842 |
|
|
|
1843 |
/***/ }),
|
|
|
1844 |
|
|
|
1845 |
/***/ "./node_modules/core-js/modules/_to-length.js":
|
|
|
1846 |
/*!****************************************************!*\
|
|
|
1847 |
!*** ./node_modules/core-js/modules/_to-length.js ***!
|
|
|
1848 |
\****************************************************/
|
|
|
1849 |
/*! no static exports found */
|
|
|
1850 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1851 |
|
|
|
1852 |
// 7.1.15 ToLength
|
|
|
1853 |
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
|
|
|
1854 |
var min = Math.min;
|
|
|
1855 |
module.exports = function (it) {
|
|
|
1856 |
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
|
|
1857 |
};
|
|
|
1858 |
|
|
|
1859 |
|
|
|
1860 |
/***/ }),
|
|
|
1861 |
|
|
|
1862 |
/***/ "./node_modules/core-js/modules/_to-object.js":
|
|
|
1863 |
/*!****************************************************!*\
|
|
|
1864 |
!*** ./node_modules/core-js/modules/_to-object.js ***!
|
|
|
1865 |
\****************************************************/
|
|
|
1866 |
/*! no static exports found */
|
|
|
1867 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1868 |
|
|
|
1869 |
// 7.1.13 ToObject(argument)
|
|
|
1870 |
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
|
|
|
1871 |
module.exports = function (it) {
|
|
|
1872 |
return Object(defined(it));
|
|
|
1873 |
};
|
|
|
1874 |
|
|
|
1875 |
|
|
|
1876 |
/***/ }),
|
|
|
1877 |
|
|
|
1878 |
/***/ "./node_modules/core-js/modules/_to-primitive.js":
|
|
|
1879 |
/*!*******************************************************!*\
|
|
|
1880 |
!*** ./node_modules/core-js/modules/_to-primitive.js ***!
|
|
|
1881 |
\*******************************************************/
|
|
|
1882 |
/*! no static exports found */
|
|
|
1883 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1884 |
|
|
|
1885 |
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
|
1886 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
1887 |
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
|
1888 |
// and the second argument - flag - preferred type is a string
|
|
|
1889 |
module.exports = function (it, S) {
|
|
|
1890 |
if (!isObject(it)) return it;
|
|
|
1891 |
var fn, val;
|
|
|
1892 |
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
|
1893 |
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
|
1894 |
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
|
1895 |
throw TypeError("Can't convert object to primitive value");
|
|
|
1896 |
};
|
|
|
1897 |
|
|
|
1898 |
|
|
|
1899 |
/***/ }),
|
|
|
1900 |
|
|
|
1901 |
/***/ "./node_modules/core-js/modules/_uid.js":
|
|
|
1902 |
/*!**********************************************!*\
|
|
|
1903 |
!*** ./node_modules/core-js/modules/_uid.js ***!
|
|
|
1904 |
\**********************************************/
|
|
|
1905 |
/*! no static exports found */
|
|
|
1906 |
/***/ (function(module, exports) {
|
|
|
1907 |
|
|
|
1908 |
var id = 0;
|
|
|
1909 |
var px = Math.random();
|
|
|
1910 |
module.exports = function (key) {
|
|
|
1911 |
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
|
|
1912 |
};
|
|
|
1913 |
|
|
|
1914 |
|
|
|
1915 |
/***/ }),
|
|
|
1916 |
|
|
|
1917 |
/***/ "./node_modules/core-js/modules/_validate-collection.js":
|
|
|
1918 |
/*!**************************************************************!*\
|
|
|
1919 |
!*** ./node_modules/core-js/modules/_validate-collection.js ***!
|
|
|
1920 |
\**************************************************************/
|
|
|
1921 |
/*! no static exports found */
|
|
|
1922 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1923 |
|
|
|
1924 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
1925 |
module.exports = function (it, TYPE) {
|
|
|
1926 |
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
|
|
|
1927 |
return it;
|
|
|
1928 |
};
|
|
|
1929 |
|
|
|
1930 |
|
|
|
1931 |
/***/ }),
|
|
|
1932 |
|
|
|
1933 |
/***/ "./node_modules/core-js/modules/_wks.js":
|
|
|
1934 |
/*!**********************************************!*\
|
|
|
1935 |
!*** ./node_modules/core-js/modules/_wks.js ***!
|
|
|
1936 |
\**********************************************/
|
|
|
1937 |
/*! no static exports found */
|
|
|
1938 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1939 |
|
|
|
1940 |
var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('wks');
|
|
|
1941 |
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
|
|
|
1942 |
var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Symbol;
|
|
|
1943 |
var USE_SYMBOL = typeof Symbol == 'function';
|
|
|
1944 |
|
|
|
1945 |
var $exports = module.exports = function (name) {
|
|
|
1946 |
return store[name] || (store[name] =
|
|
|
1947 |
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
|
|
1948 |
};
|
|
|
1949 |
|
|
|
1950 |
$exports.store = store;
|
|
|
1951 |
|
|
|
1952 |
|
|
|
1953 |
/***/ }),
|
|
|
1954 |
|
|
|
1955 |
/***/ "./node_modules/core-js/modules/core.get-iterator-method.js":
|
|
|
1956 |
/*!******************************************************************!*\
|
|
|
1957 |
!*** ./node_modules/core-js/modules/core.get-iterator-method.js ***!
|
|
|
1958 |
\******************************************************************/
|
|
|
1959 |
/*! no static exports found */
|
|
|
1960 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1961 |
|
|
|
1962 |
var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
|
|
|
1963 |
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
|
|
|
1964 |
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
|
|
|
1965 |
module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) {
|
|
|
1966 |
if (it != undefined) return it[ITERATOR]
|
|
|
1967 |
|| it['@@iterator']
|
|
|
1968 |
|| Iterators[classof(it)];
|
|
|
1969 |
};
|
|
|
1970 |
|
|
|
1971 |
|
|
|
1972 |
/***/ }),
|
|
|
1973 |
|
|
|
1974 |
/***/ "./node_modules/core-js/modules/es6.map.js":
|
|
|
1975 |
/*!*************************************************!*\
|
|
|
1976 |
!*** ./node_modules/core-js/modules/es6.map.js ***!
|
|
|
1977 |
\*************************************************/
|
|
|
1978 |
/*! no static exports found */
|
|
|
1979 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1980 |
|
|
|
1981 |
"use strict";
|
|
|
1982 |
|
|
|
1983 |
var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js");
|
|
|
1984 |
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
|
|
|
1985 |
var MAP = 'Map';
|
|
|
1986 |
|
|
|
1987 |
// 23.1 Map Objects
|
|
|
1988 |
module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(MAP, function (get) {
|
|
|
1989 |
return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
|
1990 |
}, {
|
|
|
1991 |
// 23.1.3.6 Map.prototype.get(key)
|
|
|
1992 |
get: function get(key) {
|
|
|
1993 |
var entry = strong.getEntry(validate(this, MAP), key);
|
|
|
1994 |
return entry && entry.v;
|
|
|
1995 |
},
|
|
|
1996 |
// 23.1.3.9 Map.prototype.set(key, value)
|
|
|
1997 |
set: function set(key, value) {
|
|
|
1998 |
return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
|
|
|
1999 |
}
|
|
|
2000 |
}, strong, true);
|
|
|
2001 |
|
|
|
2002 |
|
|
|
2003 |
/***/ }),
|
|
|
2004 |
|
|
|
2005 |
/***/ "./node_modules/core-js/modules/es6.set.js":
|
|
|
2006 |
/*!*************************************************!*\
|
|
|
2007 |
!*** ./node_modules/core-js/modules/es6.set.js ***!
|
|
|
2008 |
\*************************************************/
|
|
|
2009 |
/*! no static exports found */
|
|
|
2010 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2011 |
|
|
|
2012 |
"use strict";
|
|
|
2013 |
|
|
|
2014 |
var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js");
|
|
|
2015 |
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
|
|
|
2016 |
var SET = 'Set';
|
|
|
2017 |
|
|
|
2018 |
// 23.2 Set Objects
|
|
|
2019 |
module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(SET, function (get) {
|
|
|
2020 |
return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
|
2021 |
}, {
|
|
|
2022 |
// 23.2.3.1 Set.prototype.add(value)
|
|
|
2023 |
add: function add(value) {
|
|
|
2024 |
return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
|
|
|
2025 |
}
|
|
|
2026 |
}, strong);
|
|
|
2027 |
|
|
|
2028 |
|
|
|
2029 |
/***/ }),
|
|
|
2030 |
|
|
|
2031 |
/***/ "./node_modules/core-js/modules/es6.weak-map.js":
|
|
|
2032 |
/*!******************************************************!*\
|
|
|
2033 |
!*** ./node_modules/core-js/modules/es6.weak-map.js ***!
|
|
|
2034 |
\******************************************************/
|
|
|
2035 |
/*! no static exports found */
|
|
|
2036 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2037 |
|
|
|
2038 |
"use strict";
|
|
|
2039 |
|
|
|
2040 |
var each = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(0);
|
|
|
2041 |
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
|
|
|
2042 |
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js");
|
|
|
2043 |
var assign = __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/modules/_object-assign.js");
|
|
|
2044 |
var weak = __webpack_require__(/*! ./_collection-weak */ "./node_modules/core-js/modules/_collection-weak.js");
|
|
|
2045 |
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
|
|
|
2046 |
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
|
|
|
2047 |
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
|
|
|
2048 |
var WEAK_MAP = 'WeakMap';
|
|
|
2049 |
var getWeak = meta.getWeak;
|
|
|
2050 |
var isExtensible = Object.isExtensible;
|
|
|
2051 |
var uncaughtFrozenStore = weak.ufstore;
|
|
|
2052 |
var tmp = {};
|
|
|
2053 |
var InternalMap;
|
|
|
2054 |
|
|
|
2055 |
var wrapper = function (get) {
|
|
|
2056 |
return function WeakMap() {
|
|
|
2057 |
return get(this, arguments.length > 0 ? arguments[0] : undefined);
|
|
|
2058 |
};
|
|
|
2059 |
};
|
|
|
2060 |
|
|
|
2061 |
var methods = {
|
|
|
2062 |
// 23.3.3.3 WeakMap.prototype.get(key)
|
|
|
2063 |
get: function get(key) {
|
|
|
2064 |
if (isObject(key)) {
|
|
|
2065 |
var data = getWeak(key);
|
|
|
2066 |
if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
|
|
|
2067 |
return data ? data[this._i] : undefined;
|
|
|
2068 |
}
|
|
|
2069 |
},
|
|
|
2070 |
// 23.3.3.5 WeakMap.prototype.set(key, value)
|
|
|
2071 |
set: function set(key, value) {
|
|
|
2072 |
return weak.def(validate(this, WEAK_MAP), key, value);
|
|
|
2073 |
}
|
|
|
2074 |
};
|
|
|
2075 |
|
|
|
2076 |
// 23.3 WeakMap Objects
|
|
|
2077 |
var $WeakMap = module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true);
|
|
|
2078 |
|
|
|
2079 |
// IE11 WeakMap frozen keys fix
|
|
|
2080 |
if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
|
|
|
2081 |
InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
|
|
|
2082 |
assign(InternalMap.prototype, methods);
|
|
|
2083 |
meta.NEED = true;
|
|
|
2084 |
each(['delete', 'has', 'get', 'set'], function (key) {
|
|
|
2085 |
var proto = $WeakMap.prototype;
|
|
|
2086 |
var method = proto[key];
|
|
|
2087 |
redefine(proto, key, function (a, b) {
|
|
|
2088 |
// store frozen objects on internal weakmap shim
|
|
|
2089 |
if (isObject(a) && !isExtensible(a)) {
|
|
|
2090 |
if (!this._f) this._f = new InternalMap();
|
|
|
2091 |
var result = this._f[key](a, b);
|
|
|
2092 |
return key == 'set' ? this : result;
|
|
|
2093 |
// store all the rest on native weakmap
|
|
|
2094 |
} return method.call(this, a, b);
|
|
|
2095 |
});
|
|
|
2096 |
});
|
|
|
2097 |
}
|
|
|
2098 |
|
|
|
2099 |
|
|
|
2100 |
/***/ }),
|
|
|
2101 |
|
|
|
2102 |
/***/ "./node_modules/core-js/modules/es7.reflect.define-metadata.js":
|
|
|
2103 |
/*!*********************************************************************!*\
|
|
|
2104 |
!*** ./node_modules/core-js/modules/es7.reflect.define-metadata.js ***!
|
|
|
2105 |
\*********************************************************************/
|
|
|
2106 |
/*! no static exports found */
|
|
|
2107 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2108 |
|
|
|
2109 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2110 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2111 |
var toMetaKey = metadata.key;
|
|
|
2112 |
var ordinaryDefineOwnMetadata = metadata.set;
|
|
|
2113 |
|
|
|
2114 |
metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
|
|
|
2115 |
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
|
|
|
2116 |
} });
|
|
|
2117 |
|
|
|
2118 |
|
|
|
2119 |
/***/ }),
|
|
|
2120 |
|
|
|
2121 |
/***/ "./node_modules/core-js/modules/es7.reflect.delete-metadata.js":
|
|
|
2122 |
/*!*********************************************************************!*\
|
|
|
2123 |
!*** ./node_modules/core-js/modules/es7.reflect.delete-metadata.js ***!
|
|
|
2124 |
\*********************************************************************/
|
|
|
2125 |
/*! no static exports found */
|
|
|
2126 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2127 |
|
|
|
2128 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2129 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2130 |
var toMetaKey = metadata.key;
|
|
|
2131 |
var getOrCreateMetadataMap = metadata.map;
|
|
|
2132 |
var store = metadata.store;
|
|
|
2133 |
|
|
|
2134 |
metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
|
|
|
2135 |
var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
|
|
|
2136 |
var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
|
|
|
2137 |
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
|
|
|
2138 |
if (metadataMap.size) return true;
|
|
|
2139 |
var targetMetadata = store.get(target);
|
|
|
2140 |
targetMetadata['delete'](targetKey);
|
|
|
2141 |
return !!targetMetadata.size || store['delete'](target);
|
|
|
2142 |
} });
|
|
|
2143 |
|
|
|
2144 |
|
|
|
2145 |
/***/ }),
|
|
|
2146 |
|
|
|
2147 |
/***/ "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js":
|
|
|
2148 |
/*!***********************************************************************!*\
|
|
|
2149 |
!*** ./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js ***!
|
|
|
2150 |
\***********************************************************************/
|
|
|
2151 |
/*! no static exports found */
|
|
|
2152 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2153 |
|
|
|
2154 |
var Set = __webpack_require__(/*! ./es6.set */ "./node_modules/core-js/modules/es6.set.js");
|
|
|
2155 |
var from = __webpack_require__(/*! ./_array-from-iterable */ "./node_modules/core-js/modules/_array-from-iterable.js");
|
|
|
2156 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2157 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2158 |
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
|
|
|
2159 |
var ordinaryOwnMetadataKeys = metadata.keys;
|
|
|
2160 |
var toMetaKey = metadata.key;
|
|
|
2161 |
|
|
|
2162 |
var ordinaryMetadataKeys = function (O, P) {
|
|
|
2163 |
var oKeys = ordinaryOwnMetadataKeys(O, P);
|
|
|
2164 |
var parent = getPrototypeOf(O);
|
|
|
2165 |
if (parent === null) return oKeys;
|
|
|
2166 |
var pKeys = ordinaryMetadataKeys(parent, P);
|
|
|
2167 |
return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
|
|
|
2168 |
};
|
|
|
2169 |
|
|
|
2170 |
metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
|
|
|
2171 |
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
|
|
|
2172 |
} });
|
|
|
2173 |
|
|
|
2174 |
|
|
|
2175 |
/***/ }),
|
|
|
2176 |
|
|
|
2177 |
/***/ "./node_modules/core-js/modules/es7.reflect.get-metadata.js":
|
|
|
2178 |
/*!******************************************************************!*\
|
|
|
2179 |
!*** ./node_modules/core-js/modules/es7.reflect.get-metadata.js ***!
|
|
|
2180 |
\******************************************************************/
|
|
|
2181 |
/*! no static exports found */
|
|
|
2182 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2183 |
|
|
|
2184 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2185 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2186 |
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
|
|
|
2187 |
var ordinaryHasOwnMetadata = metadata.has;
|
|
|
2188 |
var ordinaryGetOwnMetadata = metadata.get;
|
|
|
2189 |
var toMetaKey = metadata.key;
|
|
|
2190 |
|
|
|
2191 |
var ordinaryGetMetadata = function (MetadataKey, O, P) {
|
|
|
2192 |
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
|
|
|
2193 |
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
|
|
|
2194 |
var parent = getPrototypeOf(O);
|
|
|
2195 |
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
|
|
|
2196 |
};
|
|
|
2197 |
|
|
|
2198 |
metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
|
|
|
2199 |
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
|
2200 |
} });
|
|
|
2201 |
|
|
|
2202 |
|
|
|
2203 |
/***/ }),
|
|
|
2204 |
|
|
|
2205 |
/***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js":
|
|
|
2206 |
/*!***************************************************************************!*\
|
|
|
2207 |
!*** ./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js ***!
|
|
|
2208 |
\***************************************************************************/
|
|
|
2209 |
/*! no static exports found */
|
|
|
2210 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2211 |
|
|
|
2212 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2213 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2214 |
var ordinaryOwnMetadataKeys = metadata.keys;
|
|
|
2215 |
var toMetaKey = metadata.key;
|
|
|
2216 |
|
|
|
2217 |
metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
|
|
|
2218 |
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
|
|
|
2219 |
} });
|
|
|
2220 |
|
|
|
2221 |
|
|
|
2222 |
/***/ }),
|
|
|
2223 |
|
|
|
2224 |
/***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata.js":
|
|
|
2225 |
/*!**********************************************************************!*\
|
|
|
2226 |
!*** ./node_modules/core-js/modules/es7.reflect.get-own-metadata.js ***!
|
|
|
2227 |
\**********************************************************************/
|
|
|
2228 |
/*! no static exports found */
|
|
|
2229 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2230 |
|
|
|
2231 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2232 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2233 |
var ordinaryGetOwnMetadata = metadata.get;
|
|
|
2234 |
var toMetaKey = metadata.key;
|
|
|
2235 |
|
|
|
2236 |
metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
|
|
|
2237 |
return ordinaryGetOwnMetadata(metadataKey, anObject(target)
|
|
|
2238 |
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
|
2239 |
} });
|
|
|
2240 |
|
|
|
2241 |
|
|
|
2242 |
/***/ }),
|
|
|
2243 |
|
|
|
2244 |
/***/ "./node_modules/core-js/modules/es7.reflect.has-metadata.js":
|
|
|
2245 |
/*!******************************************************************!*\
|
|
|
2246 |
!*** ./node_modules/core-js/modules/es7.reflect.has-metadata.js ***!
|
|
|
2247 |
\******************************************************************/
|
|
|
2248 |
/*! no static exports found */
|
|
|
2249 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2250 |
|
|
|
2251 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2252 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2253 |
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
|
|
|
2254 |
var ordinaryHasOwnMetadata = metadata.has;
|
|
|
2255 |
var toMetaKey = metadata.key;
|
|
|
2256 |
|
|
|
2257 |
var ordinaryHasMetadata = function (MetadataKey, O, P) {
|
|
|
2258 |
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
|
|
|
2259 |
if (hasOwn) return true;
|
|
|
2260 |
var parent = getPrototypeOf(O);
|
|
|
2261 |
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
|
|
|
2262 |
};
|
|
|
2263 |
|
|
|
2264 |
metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
|
|
|
2265 |
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
|
2266 |
} });
|
|
|
2267 |
|
|
|
2268 |
|
|
|
2269 |
/***/ }),
|
|
|
2270 |
|
|
|
2271 |
/***/ "./node_modules/core-js/modules/es7.reflect.has-own-metadata.js":
|
|
|
2272 |
/*!**********************************************************************!*\
|
|
|
2273 |
!*** ./node_modules/core-js/modules/es7.reflect.has-own-metadata.js ***!
|
|
|
2274 |
\**********************************************************************/
|
|
|
2275 |
/*! no static exports found */
|
|
|
2276 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2277 |
|
|
|
2278 |
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2279 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2280 |
var ordinaryHasOwnMetadata = metadata.has;
|
|
|
2281 |
var toMetaKey = metadata.key;
|
|
|
2282 |
|
|
|
2283 |
metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
|
|
|
2284 |
return ordinaryHasOwnMetadata(metadataKey, anObject(target)
|
|
|
2285 |
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
|
2286 |
} });
|
|
|
2287 |
|
|
|
2288 |
|
|
|
2289 |
/***/ }),
|
|
|
2290 |
|
|
|
2291 |
/***/ "./node_modules/core-js/modules/es7.reflect.metadata.js":
|
|
|
2292 |
/*!**************************************************************!*\
|
|
|
2293 |
!*** ./node_modules/core-js/modules/es7.reflect.metadata.js ***!
|
|
|
2294 |
\**************************************************************/
|
|
|
2295 |
/*! no static exports found */
|
|
|
2296 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2297 |
|
|
|
2298 |
var $metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
|
|
|
2299 |
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
|
|
|
2300 |
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
|
|
|
2301 |
var toMetaKey = $metadata.key;
|
|
|
2302 |
var ordinaryDefineOwnMetadata = $metadata.set;
|
|
|
2303 |
|
|
|
2304 |
$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
|
|
|
2305 |
return function decorator(target, targetKey) {
|
|
|
2306 |
ordinaryDefineOwnMetadata(
|
|
|
2307 |
metadataKey, metadataValue,
|
|
|
2308 |
(targetKey !== undefined ? anObject : aFunction)(target),
|
|
|
2309 |
toMetaKey(targetKey)
|
|
|
2310 |
);
|
|
|
2311 |
};
|
|
|
2312 |
} });
|
|
|
2313 |
|
|
|
2314 |
|
|
|
2315 |
/***/ }),
|
|
|
2316 |
|
|
|
2317 |
/***/ "./node_modules/zone.js/dist/zone.js":
|
|
|
2318 |
/*!*******************************************!*\
|
|
|
2319 |
!*** ./node_modules/zone.js/dist/zone.js ***!
|
|
|
2320 |
\*******************************************/
|
|
|
2321 |
/*! no static exports found */
|
|
|
2322 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
2323 |
|
|
|
2324 |
/**
|
|
|
2325 |
* @license
|
|
|
2326 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
2327 |
*
|
|
|
2328 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
2329 |
* found in the LICENSE file at https://angular.io/license
|
|
|
2330 |
*/
|
|
|
2331 |
(function (global, factory) {
|
|
|
2332 |
true ? factory() :
|
|
|
2333 |
undefined;
|
|
|
2334 |
}(this, (function () { 'use strict';
|
|
|
2335 |
|
|
|
2336 |
/**
|
|
|
2337 |
* @license
|
|
|
2338 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
2339 |
*
|
|
|
2340 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
2341 |
* found in the LICENSE file at https://angular.io/license
|
|
|
2342 |
*/
|
|
|
2343 |
var Zone$1 = (function (global) {
|
|
|
2344 |
var FUNCTION = 'function';
|
|
|
2345 |
var performance = global['performance'];
|
|
|
2346 |
function mark(name) {
|
|
|
2347 |
performance && performance['mark'] && performance['mark'](name);
|
|
|
2348 |
}
|
|
|
2349 |
function performanceMeasure(name, label) {
|
|
|
2350 |
performance && performance['measure'] && performance['measure'](name, label);
|
|
|
2351 |
}
|
|
|
2352 |
mark('Zone');
|
|
|
2353 |
if (global['Zone']) {
|
|
|
2354 |
throw new Error('Zone already loaded.');
|
|
|
2355 |
}
|
|
|
2356 |
var Zone = /** @class */ (function () {
|
|
|
2357 |
function Zone(parent, zoneSpec) {
|
|
|
2358 |
this._properties = null;
|
|
|
2359 |
this._parent = parent;
|
|
|
2360 |
this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';
|
|
|
2361 |
this._properties = zoneSpec && zoneSpec.properties || {};
|
|
|
2362 |
this._zoneDelegate =
|
|
|
2363 |
new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
|
|
|
2364 |
}
|
|
|
2365 |
Zone.assertZonePatched = function () {
|
|
|
2366 |
if (global['Promise'] !== patches['ZoneAwarePromise']) {
|
|
|
2367 |
throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +
|
|
|
2368 |
'has been overwritten.\n' +
|
|
|
2369 |
'Most likely cause is that a Promise polyfill has been loaded ' +
|
|
|
2370 |
'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +
|
|
|
2371 |
'If you must load one, do so before loading zone.js.)');
|
|
|
2372 |
}
|
|
|
2373 |
};
|
|
|
2374 |
Object.defineProperty(Zone, "root", {
|
|
|
2375 |
get: function () {
|
|
|
2376 |
var zone = Zone.current;
|
|
|
2377 |
while (zone.parent) {
|
|
|
2378 |
zone = zone.parent;
|
|
|
2379 |
}
|
|
|
2380 |
return zone;
|
|
|
2381 |
},
|
|
|
2382 |
enumerable: true,
|
|
|
2383 |
configurable: true
|
|
|
2384 |
});
|
|
|
2385 |
Object.defineProperty(Zone, "current", {
|
|
|
2386 |
get: function () {
|
|
|
2387 |
return _currentZoneFrame.zone;
|
|
|
2388 |
},
|
|
|
2389 |
enumerable: true,
|
|
|
2390 |
configurable: true
|
|
|
2391 |
});
|
|
|
2392 |
Object.defineProperty(Zone, "currentTask", {
|
|
|
2393 |
get: function () {
|
|
|
2394 |
return _currentTask;
|
|
|
2395 |
},
|
|
|
2396 |
enumerable: true,
|
|
|
2397 |
configurable: true
|
|
|
2398 |
});
|
|
|
2399 |
Zone.__load_patch = function (name, fn) {
|
|
|
2400 |
if (patches.hasOwnProperty(name)) {
|
|
|
2401 |
throw Error('Already loaded patch: ' + name);
|
|
|
2402 |
}
|
|
|
2403 |
else if (!global['__Zone_disable_' + name]) {
|
|
|
2404 |
var perfName = 'Zone:' + name;
|
|
|
2405 |
mark(perfName);
|
|
|
2406 |
patches[name] = fn(global, Zone, _api);
|
|
|
2407 |
performanceMeasure(perfName, perfName);
|
|
|
2408 |
}
|
|
|
2409 |
};
|
|
|
2410 |
Object.defineProperty(Zone.prototype, "parent", {
|
|
|
2411 |
get: function () {
|
|
|
2412 |
return this._parent;
|
|
|
2413 |
},
|
|
|
2414 |
enumerable: true,
|
|
|
2415 |
configurable: true
|
|
|
2416 |
});
|
|
|
2417 |
Object.defineProperty(Zone.prototype, "name", {
|
|
|
2418 |
get: function () {
|
|
|
2419 |
return this._name;
|
|
|
2420 |
},
|
|
|
2421 |
enumerable: true,
|
|
|
2422 |
configurable: true
|
|
|
2423 |
});
|
|
|
2424 |
Zone.prototype.get = function (key) {
|
|
|
2425 |
var zone = this.getZoneWith(key);
|
|
|
2426 |
if (zone)
|
|
|
2427 |
return zone._properties[key];
|
|
|
2428 |
};
|
|
|
2429 |
Zone.prototype.getZoneWith = function (key) {
|
|
|
2430 |
var current = this;
|
|
|
2431 |
while (current) {
|
|
|
2432 |
if (current._properties.hasOwnProperty(key)) {
|
|
|
2433 |
return current;
|
|
|
2434 |
}
|
|
|
2435 |
current = current._parent;
|
|
|
2436 |
}
|
|
|
2437 |
return null;
|
|
|
2438 |
};
|
|
|
2439 |
Zone.prototype.fork = function (zoneSpec) {
|
|
|
2440 |
if (!zoneSpec)
|
|
|
2441 |
throw new Error('ZoneSpec required!');
|
|
|
2442 |
return this._zoneDelegate.fork(this, zoneSpec);
|
|
|
2443 |
};
|
|
|
2444 |
Zone.prototype.wrap = function (callback, source) {
|
|
|
2445 |
if (typeof callback !== FUNCTION) {
|
|
|
2446 |
throw new Error('Expecting function got: ' + callback);
|
|
|
2447 |
}
|
|
|
2448 |
var _callback = this._zoneDelegate.intercept(this, callback, source);
|
|
|
2449 |
var zone = this;
|
|
|
2450 |
return function () {
|
|
|
2451 |
return zone.runGuarded(_callback, this, arguments, source);
|
|
|
2452 |
};
|
|
|
2453 |
};
|
|
|
2454 |
Zone.prototype.run = function (callback, applyThis, applyArgs, source) {
|
|
|
2455 |
if (applyThis === void 0) { applyThis = undefined; }
|
|
|
2456 |
if (applyArgs === void 0) { applyArgs = null; }
|
|
|
2457 |
if (source === void 0) { source = null; }
|
|
|
2458 |
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
|
2459 |
try {
|
|
|
2460 |
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
|
|
|
2461 |
}
|
|
|
2462 |
finally {
|
|
|
2463 |
_currentZoneFrame = _currentZoneFrame.parent;
|
|
|
2464 |
}
|
|
|
2465 |
};
|
|
|
2466 |
Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {
|
|
|
2467 |
if (applyThis === void 0) { applyThis = null; }
|
|
|
2468 |
if (applyArgs === void 0) { applyArgs = null; }
|
|
|
2469 |
if (source === void 0) { source = null; }
|
|
|
2470 |
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
|
2471 |
try {
|
|
|
2472 |
try {
|
|
|
2473 |
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
|
|
|
2474 |
}
|
|
|
2475 |
catch (error) {
|
|
|
2476 |
if (this._zoneDelegate.handleError(this, error)) {
|
|
|
2477 |
throw error;
|
|
|
2478 |
}
|
|
|
2479 |
}
|
|
|
2480 |
}
|
|
|
2481 |
finally {
|
|
|
2482 |
_currentZoneFrame = _currentZoneFrame.parent;
|
|
|
2483 |
}
|
|
|
2484 |
};
|
|
|
2485 |
Zone.prototype.runTask = function (task, applyThis, applyArgs) {
|
|
|
2486 |
if (task.zone != this) {
|
|
|
2487 |
throw new Error('A task can only be run in the zone of creation! (Creation: ' +
|
|
|
2488 |
(task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
|
|
|
2489 |
}
|
|
|
2490 |
// https://github.com/angular/zone.js/issues/778, sometimes eventTask
|
|
|
2491 |
// will run in notScheduled(canceled) state, we should not try to
|
|
|
2492 |
// run such kind of task but just return
|
|
|
2493 |
// we have to define an variable here, if not
|
|
|
2494 |
// typescript compiler will complain below
|
|
|
2495 |
var isNotScheduled = task.state === notScheduled;
|
|
|
2496 |
if (isNotScheduled && task.type === eventTask) {
|
|
|
2497 |
return;
|
|
|
2498 |
}
|
|
|
2499 |
var reEntryGuard = task.state != running;
|
|
|
2500 |
reEntryGuard && task._transitionTo(running, scheduled);
|
|
|
2501 |
task.runCount++;
|
|
|
2502 |
var previousTask = _currentTask;
|
|
|
2503 |
_currentTask = task;
|
|
|
2504 |
_currentZoneFrame = { parent: _currentZoneFrame, zone: this };
|
|
|
2505 |
try {
|
|
|
2506 |
if (task.type == macroTask && task.data && !task.data.isPeriodic) {
|
|
|
2507 |
task.cancelFn = null;
|
|
|
2508 |
}
|
|
|
2509 |
try {
|
|
|
2510 |
return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
|
|
|
2511 |
}
|
|
|
2512 |
catch (error) {
|
|
|
2513 |
if (this._zoneDelegate.handleError(this, error)) {
|
|
|
2514 |
throw error;
|
|
|
2515 |
}
|
|
|
2516 |
}
|
|
|
2517 |
}
|
|
|
2518 |
finally {
|
|
|
2519 |
// if the task's state is notScheduled or unknown, then it has already been cancelled
|
|
|
2520 |
// we should not reset the state to scheduled
|
|
|
2521 |
if (task.state !== notScheduled && task.state !== unknown) {
|
|
|
2522 |
if (task.type == eventTask || (task.data && task.data.isPeriodic)) {
|
|
|
2523 |
reEntryGuard && task._transitionTo(scheduled, running);
|
|
|
2524 |
}
|
|
|
2525 |
else {
|
|
|
2526 |
task.runCount = 0;
|
|
|
2527 |
this._updateTaskCount(task, -1);
|
|
|
2528 |
reEntryGuard &&
|
|
|
2529 |
task._transitionTo(notScheduled, running, notScheduled);
|
|
|
2530 |
}
|
|
|
2531 |
}
|
|
|
2532 |
_currentZoneFrame = _currentZoneFrame.parent;
|
|
|
2533 |
_currentTask = previousTask;
|
|
|
2534 |
}
|
|
|
2535 |
};
|
|
|
2536 |
Zone.prototype.scheduleTask = function (task) {
|
|
|
2537 |
if (task.zone && task.zone !== this) {
|
|
|
2538 |
// check if the task was rescheduled, the newZone
|
|
|
2539 |
// should not be the children of the original zone
|
|
|
2540 |
var newZone = this;
|
|
|
2541 |
while (newZone) {
|
|
|
2542 |
if (newZone === task.zone) {
|
|
|
2543 |
throw Error("can not reschedule task to " + this
|
|
|
2544 |
.name + " which is descendants of the original zone " + task.zone.name);
|
|
|
2545 |
}
|
|
|
2546 |
newZone = newZone.parent;
|
|
|
2547 |
}
|
|
|
2548 |
}
|
|
|
2549 |
task._transitionTo(scheduling, notScheduled);
|
|
|
2550 |
var zoneDelegates = [];
|
|
|
2551 |
task._zoneDelegates = zoneDelegates;
|
|
|
2552 |
task._zone = this;
|
|
|
2553 |
try {
|
|
|
2554 |
task = this._zoneDelegate.scheduleTask(this, task);
|
|
|
2555 |
}
|
|
|
2556 |
catch (err) {
|
|
|
2557 |
// should set task's state to unknown when scheduleTask throw error
|
|
|
2558 |
// because the err may from reschedule, so the fromState maybe notScheduled
|
|
|
2559 |
task._transitionTo(unknown, scheduling, notScheduled);
|
|
|
2560 |
// TODO: @JiaLiPassion, should we check the result from handleError?
|
|
|
2561 |
this._zoneDelegate.handleError(this, err);
|
|
|
2562 |
throw err;
|
|
|
2563 |
}
|
|
|
2564 |
if (task._zoneDelegates === zoneDelegates) {
|
|
|
2565 |
// we have to check because internally the delegate can reschedule the task.
|
|
|
2566 |
this._updateTaskCount(task, 1);
|
|
|
2567 |
}
|
|
|
2568 |
if (task.state == scheduling) {
|
|
|
2569 |
task._transitionTo(scheduled, scheduling);
|
|
|
2570 |
}
|
|
|
2571 |
return task;
|
|
|
2572 |
};
|
|
|
2573 |
Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {
|
|
|
2574 |
return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, null));
|
|
|
2575 |
};
|
|
|
2576 |
Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {
|
|
|
2577 |
return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));
|
|
|
2578 |
};
|
|
|
2579 |
Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {
|
|
|
2580 |
return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));
|
|
|
2581 |
};
|
|
|
2582 |
Zone.prototype.cancelTask = function (task) {
|
|
|
2583 |
if (task.zone != this)
|
|
|
2584 |
throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +
|
|
|
2585 |
(task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
|
|
|
2586 |
task._transitionTo(canceling, scheduled, running);
|
|
|
2587 |
try {
|
|
|
2588 |
this._zoneDelegate.cancelTask(this, task);
|
|
|
2589 |
}
|
|
|
2590 |
catch (err) {
|
|
|
2591 |
// if error occurs when cancelTask, transit the state to unknown
|
|
|
2592 |
task._transitionTo(unknown, canceling);
|
|
|
2593 |
this._zoneDelegate.handleError(this, err);
|
|
|
2594 |
throw err;
|
|
|
2595 |
}
|
|
|
2596 |
this._updateTaskCount(task, -1);
|
|
|
2597 |
task._transitionTo(notScheduled, canceling);
|
|
|
2598 |
task.runCount = 0;
|
|
|
2599 |
return task;
|
|
|
2600 |
};
|
|
|
2601 |
Zone.prototype._updateTaskCount = function (task, count) {
|
|
|
2602 |
var zoneDelegates = task._zoneDelegates;
|
|
|
2603 |
if (count == -1) {
|
|
|
2604 |
task._zoneDelegates = null;
|
|
|
2605 |
}
|
|
|
2606 |
for (var i = 0; i < zoneDelegates.length; i++) {
|
|
|
2607 |
zoneDelegates[i]._updateTaskCount(task.type, count);
|
|
|
2608 |
}
|
|
|
2609 |
};
|
|
|
2610 |
Zone.__symbol__ = __symbol__;
|
|
|
2611 |
return Zone;
|
|
|
2612 |
}());
|
|
|
2613 |
var DELEGATE_ZS = {
|
|
|
2614 |
name: '',
|
|
|
2615 |
onHasTask: function (delegate, _, target, hasTaskState) {
|
|
|
2616 |
return delegate.hasTask(target, hasTaskState);
|
|
|
2617 |
},
|
|
|
2618 |
onScheduleTask: function (delegate, _, target, task) {
|
|
|
2619 |
return delegate.scheduleTask(target, task);
|
|
|
2620 |
},
|
|
|
2621 |
onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },
|
|
|
2622 |
onCancelTask: function (delegate, _, target, task) {
|
|
|
2623 |
return delegate.cancelTask(target, task);
|
|
|
2624 |
}
|
|
|
2625 |
};
|
|
|
2626 |
var ZoneDelegate = /** @class */ (function () {
|
|
|
2627 |
function ZoneDelegate(zone, parentDelegate, zoneSpec) {
|
|
|
2628 |
this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };
|
|
|
2629 |
this.zone = zone;
|
|
|
2630 |
this._parentDelegate = parentDelegate;
|
|
|
2631 |
this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
|
|
|
2632 |
this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
|
|
|
2633 |
this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone);
|
|
|
2634 |
this._interceptZS =
|
|
|
2635 |
zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
|
|
|
2636 |
this._interceptDlgt =
|
|
|
2637 |
zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
|
|
|
2638 |
this._interceptCurrZone =
|
|
|
2639 |
zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone);
|
|
|
2640 |
this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
|
|
|
2641 |
this._invokeDlgt =
|
|
|
2642 |
zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
|
|
|
2643 |
this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone);
|
|
|
2644 |
this._handleErrorZS =
|
|
|
2645 |
zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
|
|
|
2646 |
this._handleErrorDlgt =
|
|
|
2647 |
zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
|
|
|
2648 |
this._handleErrorCurrZone =
|
|
|
2649 |
zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone);
|
|
|
2650 |
this._scheduleTaskZS =
|
|
|
2651 |
zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
|
|
|
2652 |
this._scheduleTaskDlgt =
|
|
|
2653 |
zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
|
|
|
2654 |
this._scheduleTaskCurrZone =
|
|
|
2655 |
zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone);
|
|
|
2656 |
this._invokeTaskZS =
|
|
|
2657 |
zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
|
|
|
2658 |
this._invokeTaskDlgt =
|
|
|
2659 |
zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
|
|
|
2660 |
this._invokeTaskCurrZone =
|
|
|
2661 |
zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone);
|
|
|
2662 |
this._cancelTaskZS =
|
|
|
2663 |
zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
|
|
|
2664 |
this._cancelTaskDlgt =
|
|
|
2665 |
zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
|
|
|
2666 |
this._cancelTaskCurrZone =
|
|
|
2667 |
zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone);
|
|
|
2668 |
this._hasTaskZS = null;
|
|
|
2669 |
this._hasTaskDlgt = null;
|
|
|
2670 |
this._hasTaskDlgtOwner = null;
|
|
|
2671 |
this._hasTaskCurrZone = null;
|
|
|
2672 |
var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
|
|
|
2673 |
var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
|
|
|
2674 |
if (zoneSpecHasTask || parentHasTask) {
|
|
|
2675 |
// If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such
|
|
|
2676 |
// a case all task related interceptors must go through this ZD. We can't short circuit it.
|
|
|
2677 |
this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
|
|
|
2678 |
this._hasTaskDlgt = parentDelegate;
|
|
|
2679 |
this._hasTaskDlgtOwner = this;
|
|
|
2680 |
this._hasTaskCurrZone = zone;
|
|
|
2681 |
if (!zoneSpec.onScheduleTask) {
|
|
|
2682 |
this._scheduleTaskZS = DELEGATE_ZS;
|
|
|
2683 |
this._scheduleTaskDlgt = parentDelegate;
|
|
|
2684 |
this._scheduleTaskCurrZone = this.zone;
|
|
|
2685 |
}
|
|
|
2686 |
if (!zoneSpec.onInvokeTask) {
|
|
|
2687 |
this._invokeTaskZS = DELEGATE_ZS;
|
|
|
2688 |
this._invokeTaskDlgt = parentDelegate;
|
|
|
2689 |
this._invokeTaskCurrZone = this.zone;
|
|
|
2690 |
}
|
|
|
2691 |
if (!zoneSpec.onCancelTask) {
|
|
|
2692 |
this._cancelTaskZS = DELEGATE_ZS;
|
|
|
2693 |
this._cancelTaskDlgt = parentDelegate;
|
|
|
2694 |
this._cancelTaskCurrZone = this.zone;
|
|
|
2695 |
}
|
|
|
2696 |
}
|
|
|
2697 |
}
|
|
|
2698 |
ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {
|
|
|
2699 |
return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :
|
|
|
2700 |
new Zone(targetZone, zoneSpec);
|
|
|
2701 |
};
|
|
|
2702 |
ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {
|
|
|
2703 |
return this._interceptZS ?
|
|
|
2704 |
this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :
|
|
|
2705 |
callback;
|
|
|
2706 |
};
|
|
|
2707 |
ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {
|
|
|
2708 |
return this._invokeZS ?
|
|
|
2709 |
this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :
|
|
|
2710 |
callback.apply(applyThis, applyArgs);
|
|
|
2711 |
};
|
|
|
2712 |
ZoneDelegate.prototype.handleError = function (targetZone, error) {
|
|
|
2713 |
return this._handleErrorZS ?
|
|
|
2714 |
this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :
|
|
|
2715 |
true;
|
|
|
2716 |
};
|
|
|
2717 |
ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {
|
|
|
2718 |
var returnTask = task;
|
|
|
2719 |
if (this._scheduleTaskZS) {
|
|
|
2720 |
if (this._hasTaskZS) {
|
|
|
2721 |
returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
|
|
|
2722 |
}
|
|
|
2723 |
returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);
|
|
|
2724 |
if (!returnTask)
|
|
|
2725 |
returnTask = task;
|
|
|
2726 |
}
|
|
|
2727 |
else {
|
|
|
2728 |
if (task.scheduleFn) {
|
|
|
2729 |
task.scheduleFn(task);
|
|
|
2730 |
}
|
|
|
2731 |
else if (task.type == microTask) {
|
|
|
2732 |
scheduleMicroTask(task);
|
|
|
2733 |
}
|
|
|
2734 |
else {
|
|
|
2735 |
throw new Error('Task is missing scheduleFn.');
|
|
|
2736 |
}
|
|
|
2737 |
}
|
|
|
2738 |
return returnTask;
|
|
|
2739 |
};
|
|
|
2740 |
ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
|
|
|
2741 |
return this._invokeTaskZS ?
|
|
|
2742 |
this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :
|
|
|
2743 |
task.callback.apply(applyThis, applyArgs);
|
|
|
2744 |
};
|
|
|
2745 |
ZoneDelegate.prototype.cancelTask = function (targetZone, task) {
|
|
|
2746 |
var value;
|
|
|
2747 |
if (this._cancelTaskZS) {
|
|
|
2748 |
value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);
|
|
|
2749 |
}
|
|
|
2750 |
else {
|
|
|
2751 |
if (!task.cancelFn) {
|
|
|
2752 |
throw Error('Task is not cancelable');
|
|
|
2753 |
}
|
|
|
2754 |
value = task.cancelFn(task);
|
|
|
2755 |
}
|
|
|
2756 |
return value;
|
|
|
2757 |
};
|
|
|
2758 |
ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
|
|
|
2759 |
// hasTask should not throw error so other ZoneDelegate
|
|
|
2760 |
// can still trigger hasTask callback
|
|
|
2761 |
try {
|
|
|
2762 |
return this._hasTaskZS &&
|
|
|
2763 |
this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
|
|
|
2764 |
}
|
|
|
2765 |
catch (err) {
|
|
|
2766 |
this.handleError(targetZone, err);
|
|
|
2767 |
}
|
|
|
2768 |
};
|
|
|
2769 |
ZoneDelegate.prototype._updateTaskCount = function (type, count) {
|
|
|
2770 |
var counts = this._taskCounts;
|
|
|
2771 |
var prev = counts[type];
|
|
|
2772 |
var next = counts[type] = prev + count;
|
|
|
2773 |
if (next < 0) {
|
|
|
2774 |
throw new Error('More tasks executed then were scheduled.');
|
|
|
2775 |
}
|
|
|
2776 |
if (prev == 0 || next == 0) {
|
|
|
2777 |
var isEmpty = {
|
|
|
2778 |
microTask: counts['microTask'] > 0,
|
|
|
2779 |
macroTask: counts['macroTask'] > 0,
|
|
|
2780 |
eventTask: counts['eventTask'] > 0,
|
|
|
2781 |
change: type
|
|
|
2782 |
};
|
|
|
2783 |
this.hasTask(this.zone, isEmpty);
|
|
|
2784 |
}
|
|
|
2785 |
};
|
|
|
2786 |
return ZoneDelegate;
|
|
|
2787 |
}());
|
|
|
2788 |
var ZoneTask = /** @class */ (function () {
|
|
|
2789 |
function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {
|
|
|
2790 |
this._zone = null;
|
|
|
2791 |
this.runCount = 0;
|
|
|
2792 |
this._zoneDelegates = null;
|
|
|
2793 |
this._state = 'notScheduled';
|
|
|
2794 |
this.type = type;
|
|
|
2795 |
this.source = source;
|
|
|
2796 |
this.data = options;
|
|
|
2797 |
this.scheduleFn = scheduleFn;
|
|
|
2798 |
this.cancelFn = cancelFn;
|
|
|
2799 |
this.callback = callback;
|
|
|
2800 |
var self = this;
|
|
|
2801 |
// TODO: @JiaLiPassion options should have interface
|
|
|
2802 |
if (type === eventTask && options && options.useG) {
|
|
|
2803 |
this.invoke = ZoneTask.invokeTask;
|
|
|
2804 |
}
|
|
|
2805 |
else {
|
|
|
2806 |
this.invoke = function () {
|
|
|
2807 |
return ZoneTask.invokeTask.call(global, self, this, arguments);
|
|
|
2808 |
};
|
|
|
2809 |
}
|
|
|
2810 |
}
|
|
|
2811 |
ZoneTask.invokeTask = function (task, target, args) {
|
|
|
2812 |
if (!task) {
|
|
|
2813 |
task = this;
|
|
|
2814 |
}
|
|
|
2815 |
_numberOfNestedTaskFrames++;
|
|
|
2816 |
try {
|
|
|
2817 |
task.runCount++;
|
|
|
2818 |
return task.zone.runTask(task, target, args);
|
|
|
2819 |
}
|
|
|
2820 |
finally {
|
|
|
2821 |
if (_numberOfNestedTaskFrames == 1) {
|
|
|
2822 |
drainMicroTaskQueue();
|
|
|
2823 |
}
|
|
|
2824 |
_numberOfNestedTaskFrames--;
|
|
|
2825 |
}
|
|
|
2826 |
};
|
|
|
2827 |
Object.defineProperty(ZoneTask.prototype, "zone", {
|
|
|
2828 |
get: function () {
|
|
|
2829 |
return this._zone;
|
|
|
2830 |
},
|
|
|
2831 |
enumerable: true,
|
|
|
2832 |
configurable: true
|
|
|
2833 |
});
|
|
|
2834 |
Object.defineProperty(ZoneTask.prototype, "state", {
|
|
|
2835 |
get: function () {
|
|
|
2836 |
return this._state;
|
|
|
2837 |
},
|
|
|
2838 |
enumerable: true,
|
|
|
2839 |
configurable: true
|
|
|
2840 |
});
|
|
|
2841 |
ZoneTask.prototype.cancelScheduleRequest = function () {
|
|
|
2842 |
this._transitionTo(notScheduled, scheduling);
|
|
|
2843 |
};
|
|
|
2844 |
ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {
|
|
|
2845 |
if (this._state === fromState1 || this._state === fromState2) {
|
|
|
2846 |
this._state = toState;
|
|
|
2847 |
if (toState == notScheduled) {
|
|
|
2848 |
this._zoneDelegates = null;
|
|
|
2849 |
}
|
|
|
2850 |
}
|
|
|
2851 |
else {
|
|
|
2852 |
throw new Error(this.type + " '" + this.source + "': can not transition to '" + toState + "', expecting state '" + fromState1 + "'" + (fromState2 ?
|
|
|
2853 |
' or \'' + fromState2 + '\'' :
|
|
|
2854 |
'') + ", was '" + this._state + "'.");
|
|
|
2855 |
}
|
|
|
2856 |
};
|
|
|
2857 |
ZoneTask.prototype.toString = function () {
|
|
|
2858 |
if (this.data && typeof this.data.handleId !== 'undefined') {
|
|
|
2859 |
return this.data.handleId;
|
|
|
2860 |
}
|
|
|
2861 |
else {
|
|
|
2862 |
return Object.prototype.toString.call(this);
|
|
|
2863 |
}
|
|
|
2864 |
};
|
|
|
2865 |
// add toJSON method to prevent cyclic error when
|
|
|
2866 |
// call JSON.stringify(zoneTask)
|
|
|
2867 |
ZoneTask.prototype.toJSON = function () {
|
|
|
2868 |
return {
|
|
|
2869 |
type: this.type,
|
|
|
2870 |
state: this.state,
|
|
|
2871 |
source: this.source,
|
|
|
2872 |
zone: this.zone.name,
|
|
|
2873 |
runCount: this.runCount
|
|
|
2874 |
};
|
|
|
2875 |
};
|
|
|
2876 |
return ZoneTask;
|
|
|
2877 |
}());
|
|
|
2878 |
//////////////////////////////////////////////////////
|
|
|
2879 |
//////////////////////////////////////////////////////
|
|
|
2880 |
/// MICROTASK QUEUE
|
|
|
2881 |
//////////////////////////////////////////////////////
|
|
|
2882 |
//////////////////////////////////////////////////////
|
|
|
2883 |
var symbolSetTimeout = __symbol__('setTimeout');
|
|
|
2884 |
var symbolPromise = __symbol__('Promise');
|
|
|
2885 |
var symbolThen = __symbol__('then');
|
|
|
2886 |
var _microTaskQueue = [];
|
|
|
2887 |
var _isDrainingMicrotaskQueue = false;
|
|
|
2888 |
var nativeMicroTaskQueuePromise;
|
|
|
2889 |
function scheduleMicroTask(task) {
|
|
|
2890 |
// if we are not running in any task, and there has not been anything scheduled
|
|
|
2891 |
// we must bootstrap the initial task creation by manually scheduling the drain
|
|
|
2892 |
if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {
|
|
|
2893 |
// We are not running in Task, so we need to kickstart the microtask queue.
|
|
|
2894 |
if (!nativeMicroTaskQueuePromise) {
|
|
|
2895 |
if (global[symbolPromise]) {
|
|
|
2896 |
nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
|
|
|
2897 |
}
|
|
|
2898 |
}
|
|
|
2899 |
if (nativeMicroTaskQueuePromise) {
|
|
|
2900 |
nativeMicroTaskQueuePromise[symbolThen](drainMicroTaskQueue);
|
|
|
2901 |
}
|
|
|
2902 |
else {
|
|
|
2903 |
global[symbolSetTimeout](drainMicroTaskQueue, 0);
|
|
|
2904 |
}
|
|
|
2905 |
}
|
|
|
2906 |
task && _microTaskQueue.push(task);
|
|
|
2907 |
}
|
|
|
2908 |
function drainMicroTaskQueue() {
|
|
|
2909 |
if (!_isDrainingMicrotaskQueue) {
|
|
|
2910 |
_isDrainingMicrotaskQueue = true;
|
|
|
2911 |
while (_microTaskQueue.length) {
|
|
|
2912 |
var queue = _microTaskQueue;
|
|
|
2913 |
_microTaskQueue = [];
|
|
|
2914 |
for (var i = 0; i < queue.length; i++) {
|
|
|
2915 |
var task = queue[i];
|
|
|
2916 |
try {
|
|
|
2917 |
task.zone.runTask(task, null, null);
|
|
|
2918 |
}
|
|
|
2919 |
catch (error) {
|
|
|
2920 |
_api.onUnhandledError(error);
|
|
|
2921 |
}
|
|
|
2922 |
}
|
|
|
2923 |
}
|
|
|
2924 |
_api.microtaskDrainDone();
|
|
|
2925 |
_isDrainingMicrotaskQueue = false;
|
|
|
2926 |
}
|
|
|
2927 |
}
|
|
|
2928 |
//////////////////////////////////////////////////////
|
|
|
2929 |
//////////////////////////////////////////////////////
|
|
|
2930 |
/// BOOTSTRAP
|
|
|
2931 |
//////////////////////////////////////////////////////
|
|
|
2932 |
//////////////////////////////////////////////////////
|
|
|
2933 |
var NO_ZONE = { name: 'NO ZONE' };
|
|
|
2934 |
var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';
|
|
|
2935 |
var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';
|
|
|
2936 |
var patches = {};
|
|
|
2937 |
var _api = {
|
|
|
2938 |
symbol: __symbol__,
|
|
|
2939 |
currentZoneFrame: function () { return _currentZoneFrame; },
|
|
|
2940 |
onUnhandledError: noop,
|
|
|
2941 |
microtaskDrainDone: noop,
|
|
|
2942 |
scheduleMicroTask: scheduleMicroTask,
|
|
|
2943 |
showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; },
|
|
|
2944 |
patchEventTarget: function () { return []; },
|
|
|
2945 |
patchOnProperties: noop,
|
|
|
2946 |
patchMethod: function () { return noop; },
|
|
|
2947 |
bindArguments: function () { return null; },
|
|
|
2948 |
setNativePromise: function (NativePromise) {
|
|
|
2949 |
// sometimes NativePromise.resolve static function
|
|
|
2950 |
// is not ready yet, (such as core-js/es6.promise)
|
|
|
2951 |
// so we need to check here.
|
|
|
2952 |
if (NativePromise && typeof NativePromise.resolve === FUNCTION) {
|
|
|
2953 |
nativeMicroTaskQueuePromise = NativePromise.resolve(0);
|
|
|
2954 |
}
|
|
|
2955 |
},
|
|
|
2956 |
};
|
|
|
2957 |
var _currentZoneFrame = { parent: null, zone: new Zone(null, null) };
|
|
|
2958 |
var _currentTask = null;
|
|
|
2959 |
var _numberOfNestedTaskFrames = 0;
|
|
|
2960 |
function noop() { }
|
|
|
2961 |
function __symbol__(name) {
|
|
|
2962 |
return '__zone_symbol__' + name;
|
|
|
2963 |
}
|
|
|
2964 |
performanceMeasure('Zone', 'Zone');
|
|
|
2965 |
return global['Zone'] = Zone;
|
|
|
2966 |
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
|
|
|
2967 |
|
|
|
2968 |
Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {
|
|
|
2969 |
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
2970 |
var ObjectDefineProperty = Object.defineProperty;
|
|
|
2971 |
function readableObjectToString(obj) {
|
|
|
2972 |
if (obj && obj.toString === Object.prototype.toString) {
|
|
|
2973 |
var className = obj.constructor && obj.constructor.name;
|
|
|
2974 |
return (className ? className : '') + ': ' + JSON.stringify(obj);
|
|
|
2975 |
}
|
|
|
2976 |
return obj ? obj.toString() : Object.prototype.toString.call(obj);
|
|
|
2977 |
}
|
|
|
2978 |
var __symbol__ = api.symbol;
|
|
|
2979 |
var _uncaughtPromiseErrors = [];
|
|
|
2980 |
var symbolPromise = __symbol__('Promise');
|
|
|
2981 |
var symbolThen = __symbol__('then');
|
|
|
2982 |
var creationTrace = '__creationTrace__';
|
|
|
2983 |
api.onUnhandledError = function (e) {
|
|
|
2984 |
if (api.showUncaughtError()) {
|
|
|
2985 |
var rejection = e && e.rejection;
|
|
|
2986 |
if (rejection) {
|
|
|
2987 |
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);
|
|
|
2988 |
}
|
|
|
2989 |
else {
|
|
|
2990 |
console.error(e);
|
|
|
2991 |
}
|
|
|
2992 |
}
|
|
|
2993 |
};
|
|
|
2994 |
api.microtaskDrainDone = function () {
|
|
|
2995 |
while (_uncaughtPromiseErrors.length) {
|
|
|
2996 |
var _loop_1 = function () {
|
|
|
2997 |
var uncaughtPromiseError = _uncaughtPromiseErrors.shift();
|
|
|
2998 |
try {
|
|
|
2999 |
uncaughtPromiseError.zone.runGuarded(function () {
|
|
|
3000 |
throw uncaughtPromiseError;
|
|
|
3001 |
});
|
|
|
3002 |
}
|
|
|
3003 |
catch (error) {
|
|
|
3004 |
handleUnhandledRejection(error);
|
|
|
3005 |
}
|
|
|
3006 |
};
|
|
|
3007 |
while (_uncaughtPromiseErrors.length) {
|
|
|
3008 |
_loop_1();
|
|
|
3009 |
}
|
|
|
3010 |
}
|
|
|
3011 |
};
|
|
|
3012 |
var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');
|
|
|
3013 |
function handleUnhandledRejection(e) {
|
|
|
3014 |
api.onUnhandledError(e);
|
|
|
3015 |
try {
|
|
|
3016 |
var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
|
|
|
3017 |
if (handler && typeof handler === 'function') {
|
|
|
3018 |
handler.call(this, e);
|
|
|
3019 |
}
|
|
|
3020 |
}
|
|
|
3021 |
catch (err) {
|
|
|
3022 |
}
|
|
|
3023 |
}
|
|
|
3024 |
function isThenable(value) {
|
|
|
3025 |
return value && value.then;
|
|
|
3026 |
}
|
|
|
3027 |
function forwardResolution(value) {
|
|
|
3028 |
return value;
|
|
|
3029 |
}
|
|
|
3030 |
function forwardRejection(rejection) {
|
|
|
3031 |
return ZoneAwarePromise.reject(rejection);
|
|
|
3032 |
}
|
|
|
3033 |
var symbolState = __symbol__('state');
|
|
|
3034 |
var symbolValue = __symbol__('value');
|
|
|
3035 |
var symbolFinally = __symbol__('finally');
|
|
|
3036 |
var symbolParentPromiseValue = __symbol__('parentPromiseValue');
|
|
|
3037 |
var symbolParentPromiseState = __symbol__('parentPromiseState');
|
|
|
3038 |
var source = 'Promise.then';
|
|
|
3039 |
var UNRESOLVED = null;
|
|
|
3040 |
var RESOLVED = true;
|
|
|
3041 |
var REJECTED = false;
|
|
|
3042 |
var REJECTED_NO_CATCH = 0;
|
|
|
3043 |
function makeResolver(promise, state) {
|
|
|
3044 |
return function (v) {
|
|
|
3045 |
try {
|
|
|
3046 |
resolvePromise(promise, state, v);
|
|
|
3047 |
}
|
|
|
3048 |
catch (err) {
|
|
|
3049 |
resolvePromise(promise, false, err);
|
|
|
3050 |
}
|
|
|
3051 |
// Do not return value or you will break the Promise spec.
|
|
|
3052 |
};
|
|
|
3053 |
}
|
|
|
3054 |
var once = function () {
|
|
|
3055 |
var wasCalled = false;
|
|
|
3056 |
return function wrapper(wrappedFunction) {
|
|
|
3057 |
return function () {
|
|
|
3058 |
if (wasCalled) {
|
|
|
3059 |
return;
|
|
|
3060 |
}
|
|
|
3061 |
wasCalled = true;
|
|
|
3062 |
wrappedFunction.apply(null, arguments);
|
|
|
3063 |
};
|
|
|
3064 |
};
|
|
|
3065 |
};
|
|
|
3066 |
var TYPE_ERROR = 'Promise resolved with itself';
|
|
|
3067 |
var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');
|
|
|
3068 |
// Promise Resolution
|
|
|
3069 |
function resolvePromise(promise, state, value) {
|
|
|
3070 |
var onceWrapper = once();
|
|
|
3071 |
if (promise === value) {
|
|
|
3072 |
throw new TypeError(TYPE_ERROR);
|
|
|
3073 |
}
|
|
|
3074 |
if (promise[symbolState] === UNRESOLVED) {
|
|
|
3075 |
// should only get value.then once based on promise spec.
|
|
|
3076 |
var then = null;
|
|
|
3077 |
try {
|
|
|
3078 |
if (typeof value === 'object' || typeof value === 'function') {
|
|
|
3079 |
then = value && value.then;
|
|
|
3080 |
}
|
|
|
3081 |
}
|
|
|
3082 |
catch (err) {
|
|
|
3083 |
onceWrapper(function () {
|
|
|
3084 |
resolvePromise(promise, false, err);
|
|
|
3085 |
})();
|
|
|
3086 |
return promise;
|
|
|
3087 |
}
|
|
|
3088 |
// if (value instanceof ZoneAwarePromise) {
|
|
|
3089 |
if (state !== REJECTED && value instanceof ZoneAwarePromise &&
|
|
|
3090 |
value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&
|
|
|
3091 |
value[symbolState] !== UNRESOLVED) {
|
|
|
3092 |
clearRejectedNoCatch(value);
|
|
|
3093 |
resolvePromise(promise, value[symbolState], value[symbolValue]);
|
|
|
3094 |
}
|
|
|
3095 |
else if (state !== REJECTED && typeof then === 'function') {
|
|
|
3096 |
try {
|
|
|
3097 |
then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
|
|
|
3098 |
}
|
|
|
3099 |
catch (err) {
|
|
|
3100 |
onceWrapper(function () {
|
|
|
3101 |
resolvePromise(promise, false, err);
|
|
|
3102 |
})();
|
|
|
3103 |
}
|
|
|
3104 |
}
|
|
|
3105 |
else {
|
|
|
3106 |
promise[symbolState] = state;
|
|
|
3107 |
var queue = promise[symbolValue];
|
|
|
3108 |
promise[symbolValue] = value;
|
|
|
3109 |
if (promise[symbolFinally] === symbolFinally) {
|
|
|
3110 |
// the promise is generated by Promise.prototype.finally
|
|
|
3111 |
if (state === RESOLVED) {
|
|
|
3112 |
// the state is resolved, should ignore the value
|
|
|
3113 |
// and use parent promise value
|
|
|
3114 |
promise[symbolState] = promise[symbolParentPromiseState];
|
|
|
3115 |
promise[symbolValue] = promise[symbolParentPromiseValue];
|
|
|
3116 |
}
|
|
|
3117 |
}
|
|
|
3118 |
// record task information in value when error occurs, so we can
|
|
|
3119 |
// do some additional work such as render longStackTrace
|
|
|
3120 |
if (state === REJECTED && value instanceof Error) {
|
|
|
3121 |
// check if longStackTraceZone is here
|
|
|
3122 |
var trace = Zone.currentTask && Zone.currentTask.data &&
|
|
|
3123 |
Zone.currentTask.data[creationTrace];
|
|
|
3124 |
if (trace) {
|
|
|
3125 |
// only keep the long stack trace into error when in longStackTraceZone
|
|
|
3126 |
ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });
|
|
|
3127 |
}
|
|
|
3128 |
}
|
|
|
3129 |
for (var i = 0; i < queue.length;) {
|
|
|
3130 |
scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
|
|
|
3131 |
}
|
|
|
3132 |
if (queue.length == 0 && state == REJECTED) {
|
|
|
3133 |
promise[symbolState] = REJECTED_NO_CATCH;
|
|
|
3134 |
try {
|
|
|
3135 |
// try to print more readable error log
|
|
|
3136 |
throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +
|
|
|
3137 |
(value && value.stack ? '\n' + value.stack : ''));
|
|
|
3138 |
}
|
|
|
3139 |
catch (err) {
|
|
|
3140 |
var error_1 = err;
|
|
|
3141 |
error_1.rejection = value;
|
|
|
3142 |
error_1.promise = promise;
|
|
|
3143 |
error_1.zone = Zone.current;
|
|
|
3144 |
error_1.task = Zone.currentTask;
|
|
|
3145 |
_uncaughtPromiseErrors.push(error_1);
|
|
|
3146 |
api.scheduleMicroTask(); // to make sure that it is running
|
|
|
3147 |
}
|
|
|
3148 |
}
|
|
|
3149 |
}
|
|
|
3150 |
}
|
|
|
3151 |
// Resolving an already resolved promise is a noop.
|
|
|
3152 |
return promise;
|
|
|
3153 |
}
|
|
|
3154 |
var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');
|
|
|
3155 |
function clearRejectedNoCatch(promise) {
|
|
|
3156 |
if (promise[symbolState] === REJECTED_NO_CATCH) {
|
|
|
3157 |
// if the promise is rejected no catch status
|
|
|
3158 |
// and queue.length > 0, means there is a error handler
|
|
|
3159 |
// here to handle the rejected promise, we should trigger
|
|
|
3160 |
// windows.rejectionhandled eventHandler or nodejs rejectionHandled
|
|
|
3161 |
// eventHandler
|
|
|
3162 |
try {
|
|
|
3163 |
var handler = Zone[REJECTION_HANDLED_HANDLER];
|
|
|
3164 |
if (handler && typeof handler === 'function') {
|
|
|
3165 |
handler.call(this, { rejection: promise[symbolValue], promise: promise });
|
|
|
3166 |
}
|
|
|
3167 |
}
|
|
|
3168 |
catch (err) {
|
|
|
3169 |
}
|
|
|
3170 |
promise[symbolState] = REJECTED;
|
|
|
3171 |
for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {
|
|
|
3172 |
if (promise === _uncaughtPromiseErrors[i].promise) {
|
|
|
3173 |
_uncaughtPromiseErrors.splice(i, 1);
|
|
|
3174 |
}
|
|
|
3175 |
}
|
|
|
3176 |
}
|
|
|
3177 |
}
|
|
|
3178 |
function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
|
|
|
3179 |
clearRejectedNoCatch(promise);
|
|
|
3180 |
var promiseState = promise[symbolState];
|
|
|
3181 |
var delegate = promiseState ?
|
|
|
3182 |
(typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :
|
|
|
3183 |
(typeof onRejected === 'function') ? onRejected : forwardRejection;
|
|
|
3184 |
zone.scheduleMicroTask(source, function () {
|
|
|
3185 |
try {
|
|
|
3186 |
var parentPromiseValue = promise[symbolValue];
|
|
|
3187 |
var isFinallyPromise = chainPromise && symbolFinally === chainPromise[symbolFinally];
|
|
|
3188 |
if (isFinallyPromise) {
|
|
|
3189 |
// if the promise is generated from finally call, keep parent promise's state and value
|
|
|
3190 |
chainPromise[symbolParentPromiseValue] = parentPromiseValue;
|
|
|
3191 |
chainPromise[symbolParentPromiseState] = promiseState;
|
|
|
3192 |
}
|
|
|
3193 |
// should not pass value to finally callback
|
|
|
3194 |
var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]);
|
|
|
3195 |
resolvePromise(chainPromise, true, value);
|
|
|
3196 |
}
|
|
|
3197 |
catch (error) {
|
|
|
3198 |
// if error occurs, should always return this error
|
|
|
3199 |
resolvePromise(chainPromise, false, error);
|
|
|
3200 |
}
|
|
|
3201 |
}, chainPromise);
|
|
|
3202 |
}
|
|
|
3203 |
var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';
|
|
|
3204 |
var ZoneAwarePromise = /** @class */ (function () {
|
|
|
3205 |
function ZoneAwarePromise(executor) {
|
|
|
3206 |
var promise = this;
|
|
|
3207 |
if (!(promise instanceof ZoneAwarePromise)) {
|
|
|
3208 |
throw new Error('Must be an instanceof Promise.');
|
|
|
3209 |
}
|
|
|
3210 |
promise[symbolState] = UNRESOLVED;
|
|
|
3211 |
promise[symbolValue] = []; // queue;
|
|
|
3212 |
try {
|
|
|
3213 |
executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));
|
|
|
3214 |
}
|
|
|
3215 |
catch (error) {
|
|
|
3216 |
resolvePromise(promise, false, error);
|
|
|
3217 |
}
|
|
|
3218 |
}
|
|
|
3219 |
ZoneAwarePromise.toString = function () {
|
|
|
3220 |
return ZONE_AWARE_PROMISE_TO_STRING;
|
|
|
3221 |
};
|
|
|
3222 |
ZoneAwarePromise.resolve = function (value) {
|
|
|
3223 |
return resolvePromise(new this(null), RESOLVED, value);
|
|
|
3224 |
};
|
|
|
3225 |
ZoneAwarePromise.reject = function (error) {
|
|
|
3226 |
return resolvePromise(new this(null), REJECTED, error);
|
|
|
3227 |
};
|
|
|
3228 |
ZoneAwarePromise.race = function (values) {
|
|
|
3229 |
var resolve;
|
|
|
3230 |
var reject;
|
|
|
3231 |
var promise = new this(function (res, rej) {
|
|
|
3232 |
resolve = res;
|
|
|
3233 |
reject = rej;
|
|
|
3234 |
});
|
|
|
3235 |
function onResolve(value) {
|
|
|
3236 |
promise && (promise = null || resolve(value));
|
|
|
3237 |
}
|
|
|
3238 |
function onReject(error) {
|
|
|
3239 |
promise && (promise = null || reject(error));
|
|
|
3240 |
}
|
|
|
3241 |
for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
|
|
|
3242 |
var value = values_1[_i];
|
|
|
3243 |
if (!isThenable(value)) {
|
|
|
3244 |
value = this.resolve(value);
|
|
|
3245 |
}
|
|
|
3246 |
value.then(onResolve, onReject);
|
|
|
3247 |
}
|
|
|
3248 |
return promise;
|
|
|
3249 |
};
|
|
|
3250 |
ZoneAwarePromise.all = function (values) {
|
|
|
3251 |
var resolve;
|
|
|
3252 |
var reject;
|
|
|
3253 |
var promise = new this(function (res, rej) {
|
|
|
3254 |
resolve = res;
|
|
|
3255 |
reject = rej;
|
|
|
3256 |
});
|
|
|
3257 |
var count = 0;
|
|
|
3258 |
var resolvedValues = [];
|
|
|
3259 |
for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {
|
|
|
3260 |
var value = values_2[_i];
|
|
|
3261 |
if (!isThenable(value)) {
|
|
|
3262 |
value = this.resolve(value);
|
|
|
3263 |
}
|
|
|
3264 |
value.then((function (index) { return function (value) {
|
|
|
3265 |
resolvedValues[index] = value;
|
|
|
3266 |
count--;
|
|
|
3267 |
if (!count) {
|
|
|
3268 |
resolve(resolvedValues);
|
|
|
3269 |
}
|
|
|
3270 |
}; })(count), reject);
|
|
|
3271 |
count++;
|
|
|
3272 |
}
|
|
|
3273 |
if (!count)
|
|
|
3274 |
resolve(resolvedValues);
|
|
|
3275 |
return promise;
|
|
|
3276 |
};
|
|
|
3277 |
ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {
|
|
|
3278 |
var chainPromise = new this.constructor(null);
|
|
|
3279 |
var zone = Zone.current;
|
|
|
3280 |
if (this[symbolState] == UNRESOLVED) {
|
|
|
3281 |
this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
|
|
|
3282 |
}
|
|
|
3283 |
else {
|
|
|
3284 |
scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
|
|
|
3285 |
}
|
|
|
3286 |
return chainPromise;
|
|
|
3287 |
};
|
|
|
3288 |
ZoneAwarePromise.prototype.catch = function (onRejected) {
|
|
|
3289 |
return this.then(null, onRejected);
|
|
|
3290 |
};
|
|
|
3291 |
ZoneAwarePromise.prototype.finally = function (onFinally) {
|
|
|
3292 |
var chainPromise = new this.constructor(null);
|
|
|
3293 |
chainPromise[symbolFinally] = symbolFinally;
|
|
|
3294 |
var zone = Zone.current;
|
|
|
3295 |
if (this[symbolState] == UNRESOLVED) {
|
|
|
3296 |
this[symbolValue].push(zone, chainPromise, onFinally, onFinally);
|
|
|
3297 |
}
|
|
|
3298 |
else {
|
|
|
3299 |
scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);
|
|
|
3300 |
}
|
|
|
3301 |
return chainPromise;
|
|
|
3302 |
};
|
|
|
3303 |
return ZoneAwarePromise;
|
|
|
3304 |
}());
|
|
|
3305 |
// Protect against aggressive optimizers dropping seemingly unused properties.
|
|
|
3306 |
// E.g. Closure Compiler in advanced mode.
|
|
|
3307 |
ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
|
|
|
3308 |
ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
|
|
|
3309 |
ZoneAwarePromise['race'] = ZoneAwarePromise.race;
|
|
|
3310 |
ZoneAwarePromise['all'] = ZoneAwarePromise.all;
|
|
|
3311 |
var NativePromise = global[symbolPromise] = global['Promise'];
|
|
|
3312 |
var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');
|
|
|
3313 |
var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');
|
|
|
3314 |
if (!desc || desc.configurable) {
|
|
|
3315 |
desc && delete desc.writable;
|
|
|
3316 |
desc && delete desc.value;
|
|
|
3317 |
if (!desc) {
|
|
|
3318 |
desc = { configurable: true, enumerable: true };
|
|
|
3319 |
}
|
|
|
3320 |
desc.get = function () {
|
|
|
3321 |
// if we already set ZoneAwarePromise, use patched one
|
|
|
3322 |
// otherwise return native one.
|
|
|
3323 |
return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];
|
|
|
3324 |
};
|
|
|
3325 |
desc.set = function (NewNativePromise) {
|
|
|
3326 |
if (NewNativePromise === ZoneAwarePromise) {
|
|
|
3327 |
// if the NewNativePromise is ZoneAwarePromise
|
|
|
3328 |
// save to global
|
|
|
3329 |
global[ZONE_AWARE_PROMISE] = NewNativePromise;
|
|
|
3330 |
}
|
|
|
3331 |
else {
|
|
|
3332 |
// if the NewNativePromise is not ZoneAwarePromise
|
|
|
3333 |
// for example: after load zone.js, some library just
|
|
|
3334 |
// set es6-promise to global, if we set it to global
|
|
|
3335 |
// directly, assertZonePatched will fail and angular
|
|
|
3336 |
// will not loaded, so we just set the NewNativePromise
|
|
|
3337 |
// to global[symbolPromise], so the result is just like
|
|
|
3338 |
// we load ES6 Promise before zone.js
|
|
|
3339 |
global[symbolPromise] = NewNativePromise;
|
|
|
3340 |
if (!NewNativePromise.prototype[symbolThen]) {
|
|
|
3341 |
patchThen(NewNativePromise);
|
|
|
3342 |
}
|
|
|
3343 |
api.setNativePromise(NewNativePromise);
|
|
|
3344 |
}
|
|
|
3345 |
};
|
|
|
3346 |
ObjectDefineProperty(global, 'Promise', desc);
|
|
|
3347 |
}
|
|
|
3348 |
global['Promise'] = ZoneAwarePromise;
|
|
|
3349 |
var symbolThenPatched = __symbol__('thenPatched');
|
|
|
3350 |
function patchThen(Ctor) {
|
|
|
3351 |
var proto = Ctor.prototype;
|
|
|
3352 |
var prop = ObjectGetOwnPropertyDescriptor(proto, 'then');
|
|
|
3353 |
if (prop && (prop.writable === false || !prop.configurable)) {
|
|
|
3354 |
// check Ctor.prototype.then propertyDescriptor is writable or not
|
|
|
3355 |
// in meteor env, writable is false, we should ignore such case
|
|
|
3356 |
return;
|
|
|
3357 |
}
|
|
|
3358 |
var originalThen = proto.then;
|
|
|
3359 |
// Keep a reference to the original method.
|
|
|
3360 |
proto[symbolThen] = originalThen;
|
|
|
3361 |
Ctor.prototype.then = function (onResolve, onReject) {
|
|
|
3362 |
var _this = this;
|
|
|
3363 |
var wrapped = new ZoneAwarePromise(function (resolve, reject) {
|
|
|
3364 |
originalThen.call(_this, resolve, reject);
|
|
|
3365 |
});
|
|
|
3366 |
return wrapped.then(onResolve, onReject);
|
|
|
3367 |
};
|
|
|
3368 |
Ctor[symbolThenPatched] = true;
|
|
|
3369 |
}
|
|
|
3370 |
function zoneify(fn) {
|
|
|
3371 |
return function () {
|
|
|
3372 |
var resultPromise = fn.apply(this, arguments);
|
|
|
3373 |
if (resultPromise instanceof ZoneAwarePromise) {
|
|
|
3374 |
return resultPromise;
|
|
|
3375 |
}
|
|
|
3376 |
var ctor = resultPromise.constructor;
|
|
|
3377 |
if (!ctor[symbolThenPatched]) {
|
|
|
3378 |
patchThen(ctor);
|
|
|
3379 |
}
|
|
|
3380 |
return resultPromise;
|
|
|
3381 |
};
|
|
|
3382 |
}
|
|
|
3383 |
if (NativePromise) {
|
|
|
3384 |
patchThen(NativePromise);
|
|
|
3385 |
var fetch_1 = global['fetch'];
|
|
|
3386 |
if (typeof fetch_1 == 'function') {
|
|
|
3387 |
global['fetch'] = zoneify(fetch_1);
|
|
|
3388 |
}
|
|
|
3389 |
}
|
|
|
3390 |
// This is not part of public API, but it is useful for tests, so we expose it.
|
|
|
3391 |
Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;
|
|
|
3392 |
return ZoneAwarePromise;
|
|
|
3393 |
});
|
|
|
3394 |
|
|
|
3395 |
/**
|
|
|
3396 |
* @license
|
|
|
3397 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
3398 |
*
|
|
|
3399 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
3400 |
* found in the LICENSE file at https://angular.io/license
|
|
|
3401 |
*/
|
|
|
3402 |
/**
|
|
|
3403 |
* Suppress closure compiler errors about unknown 'Zone' variable
|
|
|
3404 |
* @fileoverview
|
|
|
3405 |
* @suppress {undefinedVars,globalThis,missingRequire}
|
|
|
3406 |
*/
|
|
|
3407 |
// issue #989, to reduce bundle size, use short name
|
|
|
3408 |
/** Object.getOwnPropertyDescriptor */
|
|
|
3409 |
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
3410 |
/** Object.defineProperty */
|
|
|
3411 |
var ObjectDefineProperty = Object.defineProperty;
|
|
|
3412 |
/** Object.getPrototypeOf */
|
|
|
3413 |
var ObjectGetPrototypeOf = Object.getPrototypeOf;
|
|
|
3414 |
/** Object.create */
|
|
|
3415 |
var ObjectCreate = Object.create;
|
|
|
3416 |
/** Array.prototype.slice */
|
|
|
3417 |
var ArraySlice = Array.prototype.slice;
|
|
|
3418 |
/** addEventListener string const */
|
|
|
3419 |
var ADD_EVENT_LISTENER_STR = 'addEventListener';
|
|
|
3420 |
/** removeEventListener string const */
|
|
|
3421 |
var REMOVE_EVENT_LISTENER_STR = 'removeEventListener';
|
|
|
3422 |
/** zoneSymbol addEventListener */
|
|
|
3423 |
var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);
|
|
|
3424 |
/** zoneSymbol removeEventListener */
|
|
|
3425 |
var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);
|
|
|
3426 |
/** true string const */
|
|
|
3427 |
var TRUE_STR = 'true';
|
|
|
3428 |
/** false string const */
|
|
|
3429 |
var FALSE_STR = 'false';
|
|
|
3430 |
/** __zone_symbol__ string const */
|
|
|
3431 |
var ZONE_SYMBOL_PREFIX = '__zone_symbol__';
|
|
|
3432 |
function wrapWithCurrentZone(callback, source) {
|
|
|
3433 |
return Zone.current.wrap(callback, source);
|
|
|
3434 |
}
|
|
|
3435 |
function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {
|
|
|
3436 |
return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);
|
|
|
3437 |
}
|
|
|
3438 |
var zoneSymbol = Zone.__symbol__;
|
|
|
3439 |
var isWindowExists = typeof window !== 'undefined';
|
|
|
3440 |
var internalWindow = isWindowExists ? window : undefined;
|
|
|
3441 |
var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;
|
|
|
3442 |
var REMOVE_ATTRIBUTE = 'removeAttribute';
|
|
|
3443 |
var NULL_ON_PROP_VALUE = [null];
|
|
|
3444 |
function bindArguments(args, source) {
|
|
|
3445 |
for (var i = args.length - 1; i >= 0; i--) {
|
|
|
3446 |
if (typeof args[i] === 'function') {
|
|
|
3447 |
args[i] = wrapWithCurrentZone(args[i], source + '_' + i);
|
|
|
3448 |
}
|
|
|
3449 |
}
|
|
|
3450 |
return args;
|
|
|
3451 |
}
|
|
|
3452 |
function patchPrototype(prototype, fnNames) {
|
|
|
3453 |
var source = prototype.constructor['name'];
|
|
|
3454 |
var _loop_1 = function (i) {
|
|
|
3455 |
var name_1 = fnNames[i];
|
|
|
3456 |
var delegate = prototype[name_1];
|
|
|
3457 |
if (delegate) {
|
|
|
3458 |
var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);
|
|
|
3459 |
if (!isPropertyWritable(prototypeDesc)) {
|
|
|
3460 |
return "continue";
|
|
|
3461 |
}
|
|
|
3462 |
prototype[name_1] = (function (delegate) {
|
|
|
3463 |
var patched = function () {
|
|
|
3464 |
return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));
|
|
|
3465 |
};
|
|
|
3466 |
attachOriginToPatched(patched, delegate);
|
|
|
3467 |
return patched;
|
|
|
3468 |
})(delegate);
|
|
|
3469 |
}
|
|
|
3470 |
};
|
|
|
3471 |
for (var i = 0; i < fnNames.length; i++) {
|
|
|
3472 |
_loop_1(i);
|
|
|
3473 |
}
|
|
|
3474 |
}
|
|
|
3475 |
function isPropertyWritable(propertyDesc) {
|
|
|
3476 |
if (!propertyDesc) {
|
|
|
3477 |
return true;
|
|
|
3478 |
}
|
|
|
3479 |
if (propertyDesc.writable === false) {
|
|
|
3480 |
return false;
|
|
|
3481 |
}
|
|
|
3482 |
return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');
|
|
|
3483 |
}
|
|
|
3484 |
var isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);
|
|
|
3485 |
// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
|
|
|
3486 |
// this code.
|
|
|
3487 |
var isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&
|
|
|
3488 |
{}.toString.call(_global.process) === '[object process]');
|
|
|
3489 |
var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);
|
|
|
3490 |
// we are in electron of nw, so we are both browser and nodejs
|
|
|
3491 |
// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
|
|
|
3492 |
// this code.
|
|
|
3493 |
var isMix = typeof _global.process !== 'undefined' &&
|
|
|
3494 |
{}.toString.call(_global.process) === '[object process]' && !isWebWorker &&
|
|
|
3495 |
!!(isWindowExists && internalWindow['HTMLElement']);
|
|
|
3496 |
var zoneSymbolEventNames = {};
|
|
|
3497 |
var wrapFn = function (event) {
|
|
|
3498 |
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
|
|
|
3499 |
// event will be undefined, so we need to use window.event
|
|
|
3500 |
event = event || _global.event;
|
|
|
3501 |
if (!event) {
|
|
|
3502 |
return;
|
|
|
3503 |
}
|
|
|
3504 |
var eventNameSymbol = zoneSymbolEventNames[event.type];
|
|
|
3505 |
if (!eventNameSymbol) {
|
|
|
3506 |
eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);
|
|
|
3507 |
}
|
|
|
3508 |
var target = this || event.target || _global;
|
|
|
3509 |
var listener = target[eventNameSymbol];
|
|
|
3510 |
var result = listener && listener.apply(this, arguments);
|
|
|
3511 |
if (result != undefined && !result) {
|
|
|
3512 |
event.preventDefault();
|
|
|
3513 |
}
|
|
|
3514 |
return result;
|
|
|
3515 |
};
|
|
|
3516 |
function patchProperty(obj, prop, prototype) {
|
|
|
3517 |
var desc = ObjectGetOwnPropertyDescriptor(obj, prop);
|
|
|
3518 |
if (!desc && prototype) {
|
|
|
3519 |
// when patch window object, use prototype to check prop exist or not
|
|
|
3520 |
var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);
|
|
|
3521 |
if (prototypeDesc) {
|
|
|
3522 |
desc = { enumerable: true, configurable: true };
|
|
|
3523 |
}
|
|
|
3524 |
}
|
|
|
3525 |
// if the descriptor not exists or is not configurable
|
|
|
3526 |
// just return
|
|
|
3527 |
if (!desc || !desc.configurable) {
|
|
|
3528 |
return;
|
|
|
3529 |
}
|
|
|
3530 |
// A property descriptor cannot have getter/setter and be writable
|
|
|
3531 |
// deleting the writable and value properties avoids this error:
|
|
|
3532 |
//
|
|
|
3533 |
// TypeError: property descriptors must not specify a value or be writable when a
|
|
|
3534 |
// getter or setter has been specified
|
|
|
3535 |
delete desc.writable;
|
|
|
3536 |
delete desc.value;
|
|
|
3537 |
var originalDescGet = desc.get;
|
|
|
3538 |
var originalDescSet = desc.set;
|
|
|
3539 |
// substr(2) cuz 'onclick' -> 'click', etc
|
|
|
3540 |
var eventName = prop.substr(2);
|
|
|
3541 |
var eventNameSymbol = zoneSymbolEventNames[eventName];
|
|
|
3542 |
if (!eventNameSymbol) {
|
|
|
3543 |
eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);
|
|
|
3544 |
}
|
|
|
3545 |
desc.set = function (newValue) {
|
|
|
3546 |
// in some of windows's onproperty callback, this is undefined
|
|
|
3547 |
// so we need to check it
|
|
|
3548 |
var target = this;
|
|
|
3549 |
if (!target && obj === _global) {
|
|
|
3550 |
target = _global;
|
|
|
3551 |
}
|
|
|
3552 |
if (!target) {
|
|
|
3553 |
return;
|
|
|
3554 |
}
|
|
|
3555 |
var previousValue = target[eventNameSymbol];
|
|
|
3556 |
if (previousValue) {
|
|
|
3557 |
target.removeEventListener(eventName, wrapFn);
|
|
|
3558 |
}
|
|
|
3559 |
// issue #978, when onload handler was added before loading zone.js
|
|
|
3560 |
// we should remove it with originalDescSet
|
|
|
3561 |
if (originalDescSet) {
|
|
|
3562 |
originalDescSet.apply(target, NULL_ON_PROP_VALUE);
|
|
|
3563 |
}
|
|
|
3564 |
if (typeof newValue === 'function') {
|
|
|
3565 |
target[eventNameSymbol] = newValue;
|
|
|
3566 |
target.addEventListener(eventName, wrapFn, false);
|
|
|
3567 |
}
|
|
|
3568 |
else {
|
|
|
3569 |
target[eventNameSymbol] = null;
|
|
|
3570 |
}
|
|
|
3571 |
};
|
|
|
3572 |
// The getter would return undefined for unassigned properties but the default value of an
|
|
|
3573 |
// unassigned property is null
|
|
|
3574 |
desc.get = function () {
|
|
|
3575 |
// in some of windows's onproperty callback, this is undefined
|
|
|
3576 |
// so we need to check it
|
|
|
3577 |
var target = this;
|
|
|
3578 |
if (!target && obj === _global) {
|
|
|
3579 |
target = _global;
|
|
|
3580 |
}
|
|
|
3581 |
if (!target) {
|
|
|
3582 |
return null;
|
|
|
3583 |
}
|
|
|
3584 |
var listener = target[eventNameSymbol];
|
|
|
3585 |
if (listener) {
|
|
|
3586 |
return listener;
|
|
|
3587 |
}
|
|
|
3588 |
else if (originalDescGet) {
|
|
|
3589 |
// result will be null when use inline event attribute,
|
|
|
3590 |
// such as <button onclick="func();">OK</button>
|
|
|
3591 |
// because the onclick function is internal raw uncompiled handler
|
|
|
3592 |
// the onclick will be evaluated when first time event was triggered or
|
|
|
3593 |
// the property is accessed, https://github.com/angular/zone.js/issues/525
|
|
|
3594 |
// so we should use original native get to retrieve the handler
|
|
|
3595 |
var value = originalDescGet && originalDescGet.call(this);
|
|
|
3596 |
if (value) {
|
|
|
3597 |
desc.set.call(this, value);
|
|
|
3598 |
if (typeof target[REMOVE_ATTRIBUTE] === 'function') {
|
|
|
3599 |
target.removeAttribute(prop);
|
|
|
3600 |
}
|
|
|
3601 |
return value;
|
|
|
3602 |
}
|
|
|
3603 |
}
|
|
|
3604 |
return null;
|
|
|
3605 |
};
|
|
|
3606 |
ObjectDefineProperty(obj, prop, desc);
|
|
|
3607 |
}
|
|
|
3608 |
function patchOnProperties(obj, properties, prototype) {
|
|
|
3609 |
if (properties) {
|
|
|
3610 |
for (var i = 0; i < properties.length; i++) {
|
|
|
3611 |
patchProperty(obj, 'on' + properties[i], prototype);
|
|
|
3612 |
}
|
|
|
3613 |
}
|
|
|
3614 |
else {
|
|
|
3615 |
var onProperties = [];
|
|
|
3616 |
for (var prop in obj) {
|
|
|
3617 |
if (prop.substr(0, 2) == 'on') {
|
|
|
3618 |
onProperties.push(prop);
|
|
|
3619 |
}
|
|
|
3620 |
}
|
|
|
3621 |
for (var j = 0; j < onProperties.length; j++) {
|
|
|
3622 |
patchProperty(obj, onProperties[j], prototype);
|
|
|
3623 |
}
|
|
|
3624 |
}
|
|
|
3625 |
}
|
|
|
3626 |
var originalInstanceKey = zoneSymbol('originalInstance');
|
|
|
3627 |
// wrap some native API on `window`
|
|
|
3628 |
function patchClass(className) {
|
|
|
3629 |
var OriginalClass = _global[className];
|
|
|
3630 |
if (!OriginalClass)
|
|
|
3631 |
return;
|
|
|
3632 |
// keep original class in global
|
|
|
3633 |
_global[zoneSymbol(className)] = OriginalClass;
|
|
|
3634 |
_global[className] = function () {
|
|
|
3635 |
var a = bindArguments(arguments, className);
|
|
|
3636 |
switch (a.length) {
|
|
|
3637 |
case 0:
|
|
|
3638 |
this[originalInstanceKey] = new OriginalClass();
|
|
|
3639 |
break;
|
|
|
3640 |
case 1:
|
|
|
3641 |
this[originalInstanceKey] = new OriginalClass(a[0]);
|
|
|
3642 |
break;
|
|
|
3643 |
case 2:
|
|
|
3644 |
this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
|
|
|
3645 |
break;
|
|
|
3646 |
case 3:
|
|
|
3647 |
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
|
|
|
3648 |
break;
|
|
|
3649 |
case 4:
|
|
|
3650 |
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
|
|
|
3651 |
break;
|
|
|
3652 |
default:
|
|
|
3653 |
throw new Error('Arg list too long.');
|
|
|
3654 |
}
|
|
|
3655 |
};
|
|
|
3656 |
// attach original delegate to patched function
|
|
|
3657 |
attachOriginToPatched(_global[className], OriginalClass);
|
|
|
3658 |
var instance = new OriginalClass(function () { });
|
|
|
3659 |
var prop;
|
|
|
3660 |
for (prop in instance) {
|
|
|
3661 |
// https://bugs.webkit.org/show_bug.cgi?id=44721
|
|
|
3662 |
if (className === 'XMLHttpRequest' && prop === 'responseBlob')
|
|
|
3663 |
continue;
|
|
|
3664 |
(function (prop) {
|
|
|
3665 |
if (typeof instance[prop] === 'function') {
|
|
|
3666 |
_global[className].prototype[prop] = function () {
|
|
|
3667 |
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
|
|
|
3668 |
};
|
|
|
3669 |
}
|
|
|
3670 |
else {
|
|
|
3671 |
ObjectDefineProperty(_global[className].prototype, prop, {
|
|
|
3672 |
set: function (fn) {
|
|
|
3673 |
if (typeof fn === 'function') {
|
|
|
3674 |
this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);
|
|
|
3675 |
// keep callback in wrapped function so we can
|
|
|
3676 |
// use it in Function.prototype.toString to return
|
|
|
3677 |
// the native one.
|
|
|
3678 |
attachOriginToPatched(this[originalInstanceKey][prop], fn);
|
|
|
3679 |
}
|
|
|
3680 |
else {
|
|
|
3681 |
this[originalInstanceKey][prop] = fn;
|
|
|
3682 |
}
|
|
|
3683 |
},
|
|
|
3684 |
get: function () {
|
|
|
3685 |
return this[originalInstanceKey][prop];
|
|
|
3686 |
}
|
|
|
3687 |
});
|
|
|
3688 |
}
|
|
|
3689 |
}(prop));
|
|
|
3690 |
}
|
|
|
3691 |
for (prop in OriginalClass) {
|
|
|
3692 |
if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {
|
|
|
3693 |
_global[className][prop] = OriginalClass[prop];
|
|
|
3694 |
}
|
|
|
3695 |
}
|
|
|
3696 |
}
|
|
|
3697 |
function patchMethod(target, name, patchFn) {
|
|
|
3698 |
var proto = target;
|
|
|
3699 |
while (proto && !proto.hasOwnProperty(name)) {
|
|
|
3700 |
proto = ObjectGetPrototypeOf(proto);
|
|
|
3701 |
}
|
|
|
3702 |
if (!proto && target[name]) {
|
|
|
3703 |
// somehow we did not find it, but we can see it. This happens on IE for Window properties.
|
|
|
3704 |
proto = target;
|
|
|
3705 |
}
|
|
|
3706 |
var delegateName = zoneSymbol(name);
|
|
|
3707 |
var delegate;
|
|
|
3708 |
if (proto && !(delegate = proto[delegateName])) {
|
|
|
3709 |
delegate = proto[delegateName] = proto[name];
|
|
|
3710 |
// check whether proto[name] is writable
|
|
|
3711 |
// some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob
|
|
|
3712 |
var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
|
|
|
3713 |
if (isPropertyWritable(desc)) {
|
|
|
3714 |
var patchDelegate_1 = patchFn(delegate, delegateName, name);
|
|
|
3715 |
proto[name] = function () {
|
|
|
3716 |
return patchDelegate_1(this, arguments);
|
|
|
3717 |
};
|
|
|
3718 |
attachOriginToPatched(proto[name], delegate);
|
|
|
3719 |
}
|
|
|
3720 |
}
|
|
|
3721 |
return delegate;
|
|
|
3722 |
}
|
|
|
3723 |
// TODO: @JiaLiPassion, support cancel task later if necessary
|
|
|
3724 |
function patchMacroTask(obj, funcName, metaCreator) {
|
|
|
3725 |
var setNative = null;
|
|
|
3726 |
function scheduleTask(task) {
|
|
|
3727 |
var data = task.data;
|
|
|
3728 |
data.args[data.cbIdx] = function () {
|
|
|
3729 |
task.invoke.apply(this, arguments);
|
|
|
3730 |
};
|
|
|
3731 |
setNative.apply(data.target, data.args);
|
|
|
3732 |
return task;
|
|
|
3733 |
}
|
|
|
3734 |
setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) {
|
|
|
3735 |
var meta = metaCreator(self, args);
|
|
|
3736 |
if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {
|
|
|
3737 |
return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask, null);
|
|
|
3738 |
}
|
|
|
3739 |
else {
|
|
|
3740 |
// cause an error by calling it directly.
|
|
|
3741 |
return delegate.apply(self, args);
|
|
|
3742 |
}
|
|
|
3743 |
}; });
|
|
|
3744 |
}
|
|
|
3745 |
|
|
|
3746 |
function attachOriginToPatched(patched, original) {
|
|
|
3747 |
patched[zoneSymbol('OriginalDelegate')] = original;
|
|
|
3748 |
}
|
|
|
3749 |
var isDetectedIEOrEdge = false;
|
|
|
3750 |
var ieOrEdge = false;
|
|
|
3751 |
function isIEOrEdge() {
|
|
|
3752 |
if (isDetectedIEOrEdge) {
|
|
|
3753 |
return ieOrEdge;
|
|
|
3754 |
}
|
|
|
3755 |
isDetectedIEOrEdge = true;
|
|
|
3756 |
try {
|
|
|
3757 |
var ua = internalWindow.navigator.userAgent;
|
|
|
3758 |
if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {
|
|
|
3759 |
ieOrEdge = true;
|
|
|
3760 |
}
|
|
|
3761 |
return ieOrEdge;
|
|
|
3762 |
}
|
|
|
3763 |
catch (error) {
|
|
|
3764 |
}
|
|
|
3765 |
}
|
|
|
3766 |
|
|
|
3767 |
/**
|
|
|
3768 |
* @license
|
|
|
3769 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
3770 |
*
|
|
|
3771 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
3772 |
* found in the LICENSE file at https://angular.io/license
|
|
|
3773 |
*/
|
|
|
3774 |
// override Function.prototype.toString to make zone.js patched function
|
|
|
3775 |
// look like native function
|
|
|
3776 |
Zone.__load_patch('toString', function (global) {
|
|
|
3777 |
// patch Func.prototype.toString to let them look like native
|
|
|
3778 |
var originalFunctionToString = Function.prototype.toString;
|
|
|
3779 |
var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');
|
|
|
3780 |
var PROMISE_SYMBOL = zoneSymbol('Promise');
|
|
|
3781 |
var ERROR_SYMBOL = zoneSymbol('Error');
|
|
|
3782 |
var newFunctionToString = function toString() {
|
|
|
3783 |
if (typeof this === 'function') {
|
|
|
3784 |
var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
|
|
|
3785 |
if (originalDelegate) {
|
|
|
3786 |
if (typeof originalDelegate === 'function') {
|
|
|
3787 |
return originalFunctionToString.apply(this[ORIGINAL_DELEGATE_SYMBOL], arguments);
|
|
|
3788 |
}
|
|
|
3789 |
else {
|
|
|
3790 |
return Object.prototype.toString.call(originalDelegate);
|
|
|
3791 |
}
|
|
|
3792 |
}
|
|
|
3793 |
if (this === Promise) {
|
|
|
3794 |
var nativePromise = global[PROMISE_SYMBOL];
|
|
|
3795 |
if (nativePromise) {
|
|
|
3796 |
return originalFunctionToString.apply(nativePromise, arguments);
|
|
|
3797 |
}
|
|
|
3798 |
}
|
|
|
3799 |
if (this === Error) {
|
|
|
3800 |
var nativeError = global[ERROR_SYMBOL];
|
|
|
3801 |
if (nativeError) {
|
|
|
3802 |
return originalFunctionToString.apply(nativeError, arguments);
|
|
|
3803 |
}
|
|
|
3804 |
}
|
|
|
3805 |
}
|
|
|
3806 |
return originalFunctionToString.apply(this, arguments);
|
|
|
3807 |
};
|
|
|
3808 |
newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;
|
|
|
3809 |
Function.prototype.toString = newFunctionToString;
|
|
|
3810 |
// patch Object.prototype.toString to let them look like native
|
|
|
3811 |
var originalObjectToString = Object.prototype.toString;
|
|
|
3812 |
var PROMISE_OBJECT_TO_STRING = '[object Promise]';
|
|
|
3813 |
Object.prototype.toString = function () {
|
|
|
3814 |
if (this instanceof Promise) {
|
|
|
3815 |
return PROMISE_OBJECT_TO_STRING;
|
|
|
3816 |
}
|
|
|
3817 |
return originalObjectToString.apply(this, arguments);
|
|
|
3818 |
};
|
|
|
3819 |
});
|
|
|
3820 |
|
|
|
3821 |
/**
|
|
|
3822 |
* @license
|
|
|
3823 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
3824 |
*
|
|
|
3825 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
3826 |
* found in the LICENSE file at https://angular.io/license
|
|
|
3827 |
*/
|
|
|
3828 |
/**
|
|
|
3829 |
* @fileoverview
|
|
|
3830 |
* @suppress {missingRequire}
|
|
|
3831 |
*/
|
|
|
3832 |
// an identifier to tell ZoneTask do not create a new invoke closure
|
|
|
3833 |
var OPTIMIZED_ZONE_EVENT_TASK_DATA = {
|
|
|
3834 |
useG: true
|
|
|
3835 |
};
|
|
|
3836 |
var zoneSymbolEventNames$1 = {};
|
|
|
3837 |
var globalSources = {};
|
|
|
3838 |
var EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/;
|
|
|
3839 |
var IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped');
|
|
|
3840 |
function patchEventTarget(_global, apis, patchOptions) {
|
|
|
3841 |
var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;
|
|
|
3842 |
var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;
|
|
|
3843 |
var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';
|
|
|
3844 |
var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';
|
|
|
3845 |
var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
|
|
|
3846 |
var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';
|
|
|
3847 |
var PREPEND_EVENT_LISTENER = 'prependListener';
|
|
|
3848 |
var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';
|
|
|
3849 |
var invokeTask = function (task, target, event) {
|
|
|
3850 |
// for better performance, check isRemoved which is set
|
|
|
3851 |
// by removeEventListener
|
|
|
3852 |
if (task.isRemoved) {
|
|
|
3853 |
return;
|
|
|
3854 |
}
|
|
|
3855 |
var delegate = task.callback;
|
|
|
3856 |
if (typeof delegate === 'object' && delegate.handleEvent) {
|
|
|
3857 |
// create the bind version of handleEvent when invoke
|
|
|
3858 |
task.callback = function (event) { return delegate.handleEvent(event); };
|
|
|
3859 |
task.originalDelegate = delegate;
|
|
|
3860 |
}
|
|
|
3861 |
// invoke static task.invoke
|
|
|
3862 |
task.invoke(task, target, [event]);
|
|
|
3863 |
var options = task.options;
|
|
|
3864 |
if (options && typeof options === 'object' && options.once) {
|
|
|
3865 |
// if options.once is true, after invoke once remove listener here
|
|
|
3866 |
// only browser need to do this, nodejs eventEmitter will cal removeListener
|
|
|
3867 |
// inside EventEmitter.once
|
|
|
3868 |
var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
|
3869 |
target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);
|
|
|
3870 |
}
|
|
|
3871 |
};
|
|
|
3872 |
// global shared zoneAwareCallback to handle all event callback with capture = false
|
|
|
3873 |
var globalZoneAwareCallback = function (event) {
|
|
|
3874 |
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
|
|
|
3875 |
// event will be undefined, so we need to use window.event
|
|
|
3876 |
event = event || _global.event;
|
|
|
3877 |
if (!event) {
|
|
|
3878 |
return;
|
|
|
3879 |
}
|
|
|
3880 |
// event.target is needed for Samsung TV and SourceBuffer
|
|
|
3881 |
// || global is needed https://github.com/angular/zone.js/issues/190
|
|
|
3882 |
var target = this || event.target || _global;
|
|
|
3883 |
var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];
|
|
|
3884 |
if (tasks) {
|
|
|
3885 |
// invoke all tasks which attached to current target with given event.type and capture = false
|
|
|
3886 |
// for performance concern, if task.length === 1, just invoke
|
|
|
3887 |
if (tasks.length === 1) {
|
|
|
3888 |
invokeTask(tasks[0], target, event);
|
|
|
3889 |
}
|
|
|
3890 |
else {
|
|
|
3891 |
// https://github.com/angular/zone.js/issues/836
|
|
|
3892 |
// copy the tasks array before invoke, to avoid
|
|
|
3893 |
// the callback will remove itself or other listener
|
|
|
3894 |
var copyTasks = tasks.slice();
|
|
|
3895 |
for (var i = 0; i < copyTasks.length; i++) {
|
|
|
3896 |
if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
|
|
|
3897 |
break;
|
|
|
3898 |
}
|
|
|
3899 |
invokeTask(copyTasks[i], target, event);
|
|
|
3900 |
}
|
|
|
3901 |
}
|
|
|
3902 |
}
|
|
|
3903 |
};
|
|
|
3904 |
// global shared zoneAwareCallback to handle all event callback with capture = true
|
|
|
3905 |
var globalZoneAwareCaptureCallback = function (event) {
|
|
|
3906 |
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
|
|
|
3907 |
// event will be undefined, so we need to use window.event
|
|
|
3908 |
event = event || _global.event;
|
|
|
3909 |
if (!event) {
|
|
|
3910 |
return;
|
|
|
3911 |
}
|
|
|
3912 |
// event.target is needed for Samsung TV and SourceBuffer
|
|
|
3913 |
// || global is needed https://github.com/angular/zone.js/issues/190
|
|
|
3914 |
var target = this || event.target || _global;
|
|
|
3915 |
var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];
|
|
|
3916 |
if (tasks) {
|
|
|
3917 |
// invoke all tasks which attached to current target with given event.type and capture = false
|
|
|
3918 |
// for performance concern, if task.length === 1, just invoke
|
|
|
3919 |
if (tasks.length === 1) {
|
|
|
3920 |
invokeTask(tasks[0], target, event);
|
|
|
3921 |
}
|
|
|
3922 |
else {
|
|
|
3923 |
// https://github.com/angular/zone.js/issues/836
|
|
|
3924 |
// copy the tasks array before invoke, to avoid
|
|
|
3925 |
// the callback will remove itself or other listener
|
|
|
3926 |
var copyTasks = tasks.slice();
|
|
|
3927 |
for (var i = 0; i < copyTasks.length; i++) {
|
|
|
3928 |
if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
|
|
|
3929 |
break;
|
|
|
3930 |
}
|
|
|
3931 |
invokeTask(copyTasks[i], target, event);
|
|
|
3932 |
}
|
|
|
3933 |
}
|
|
|
3934 |
}
|
|
|
3935 |
};
|
|
|
3936 |
function patchEventTargetMethods(obj, patchOptions) {
|
|
|
3937 |
if (!obj) {
|
|
|
3938 |
return false;
|
|
|
3939 |
}
|
|
|
3940 |
var useGlobalCallback = true;
|
|
|
3941 |
if (patchOptions && patchOptions.useG !== undefined) {
|
|
|
3942 |
useGlobalCallback = patchOptions.useG;
|
|
|
3943 |
}
|
|
|
3944 |
var validateHandler = patchOptions && patchOptions.vh;
|
|
|
3945 |
var checkDuplicate = true;
|
|
|
3946 |
if (patchOptions && patchOptions.chkDup !== undefined) {
|
|
|
3947 |
checkDuplicate = patchOptions.chkDup;
|
|
|
3948 |
}
|
|
|
3949 |
var returnTarget = false;
|
|
|
3950 |
if (patchOptions && patchOptions.rt !== undefined) {
|
|
|
3951 |
returnTarget = patchOptions.rt;
|
|
|
3952 |
}
|
|
|
3953 |
var proto = obj;
|
|
|
3954 |
while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
|
|
|
3955 |
proto = ObjectGetPrototypeOf(proto);
|
|
|
3956 |
}
|
|
|
3957 |
if (!proto && obj[ADD_EVENT_LISTENER]) {
|
|
|
3958 |
// somehow we did not find it, but we can see it. This happens on IE for Window properties.
|
|
|
3959 |
proto = obj;
|
|
|
3960 |
}
|
|
|
3961 |
if (!proto) {
|
|
|
3962 |
return false;
|
|
|
3963 |
}
|
|
|
3964 |
if (proto[zoneSymbolAddEventListener]) {
|
|
|
3965 |
return false;
|
|
|
3966 |
}
|
|
|
3967 |
// a shared global taskData to pass data for scheduleEventTask
|
|
|
3968 |
// so we do not need to create a new object just for pass some data
|
|
|
3969 |
var taskData = {};
|
|
|
3970 |
var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];
|
|
|
3971 |
var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =
|
|
|
3972 |
proto[REMOVE_EVENT_LISTENER];
|
|
|
3973 |
var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =
|
|
|
3974 |
proto[LISTENERS_EVENT_LISTENER];
|
|
|
3975 |
var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =
|
|
|
3976 |
proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];
|
|
|
3977 |
var nativePrependEventListener;
|
|
|
3978 |
if (patchOptions && patchOptions.prepend) {
|
|
|
3979 |
nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =
|
|
|
3980 |
proto[patchOptions.prepend];
|
|
|
3981 |
}
|
|
|
3982 |
var customScheduleGlobal = function () {
|
|
|
3983 |
// if there is already a task for the eventName + capture,
|
|
|
3984 |
// just return, because we use the shared globalZoneAwareCallback here.
|
|
|
3985 |
if (taskData.isExisting) {
|
|
|
3986 |
return;
|
|
|
3987 |
}
|
|
|
3988 |
return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);
|
|
|
3989 |
};
|
|
|
3990 |
var customCancelGlobal = function (task) {
|
|
|
3991 |
// if task is not marked as isRemoved, this call is directly
|
|
|
3992 |
// from Zone.prototype.cancelTask, we should remove the task
|
|
|
3993 |
// from tasksList of target first
|
|
|
3994 |
if (!task.isRemoved) {
|
|
|
3995 |
var symbolEventNames = zoneSymbolEventNames$1[task.eventName];
|
|
|
3996 |
var symbolEventName = void 0;
|
|
|
3997 |
if (symbolEventNames) {
|
|
|
3998 |
symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
|
|
|
3999 |
}
|
|
|
4000 |
var existingTasks = symbolEventName && task.target[symbolEventName];
|
|
|
4001 |
if (existingTasks) {
|
|
|
4002 |
for (var i = 0; i < existingTasks.length; i++) {
|
|
|
4003 |
var existingTask = existingTasks[i];
|
|
|
4004 |
if (existingTask === task) {
|
|
|
4005 |
existingTasks.splice(i, 1);
|
|
|
4006 |
// set isRemoved to data for faster invokeTask check
|
|
|
4007 |
task.isRemoved = true;
|
|
|
4008 |
if (existingTasks.length === 0) {
|
|
|
4009 |
// all tasks for the eventName + capture have gone,
|
|
|
4010 |
// remove globalZoneAwareCallback and remove the task cache from target
|
|
|
4011 |
task.allRemoved = true;
|
|
|
4012 |
task.target[symbolEventName] = null;
|
|
|
4013 |
}
|
|
|
4014 |
break;
|
|
|
4015 |
}
|
|
|
4016 |
}
|
|
|
4017 |
}
|
|
|
4018 |
}
|
|
|
4019 |
// if all tasks for the eventName + capture have gone,
|
|
|
4020 |
// we will really remove the global event callback,
|
|
|
4021 |
// if not, return
|
|
|
4022 |
if (!task.allRemoved) {
|
|
|
4023 |
return;
|
|
|
4024 |
}
|
|
|
4025 |
return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);
|
|
|
4026 |
};
|
|
|
4027 |
var customScheduleNonGlobal = function (task) {
|
|
|
4028 |
return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
|
|
|
4029 |
};
|
|
|
4030 |
var customSchedulePrepend = function (task) {
|
|
|
4031 |
return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
|
|
|
4032 |
};
|
|
|
4033 |
var customCancelNonGlobal = function (task) {
|
|
|
4034 |
return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);
|
|
|
4035 |
};
|
|
|
4036 |
var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;
|
|
|
4037 |
var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;
|
|
|
4038 |
var compareTaskCallbackVsDelegate = function (task, delegate) {
|
|
|
4039 |
var typeOfDelegate = typeof delegate;
|
|
|
4040 |
return (typeOfDelegate === 'function' && task.callback === delegate) ||
|
|
|
4041 |
(typeOfDelegate === 'object' && task.originalDelegate === delegate);
|
|
|
4042 |
};
|
|
|
4043 |
var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;
|
|
|
4044 |
var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')];
|
|
|
4045 |
var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {
|
|
|
4046 |
if (returnTarget === void 0) { returnTarget = false; }
|
|
|
4047 |
if (prepend === void 0) { prepend = false; }
|
|
|
4048 |
return function () {
|
|
|
4049 |
var target = this || _global;
|
|
|
4050 |
var delegate = arguments[1];
|
|
|
4051 |
if (!delegate) {
|
|
|
4052 |
return nativeListener.apply(this, arguments);
|
|
|
4053 |
}
|
|
|
4054 |
// don't create the bind delegate function for handleEvent
|
|
|
4055 |
// case here to improve addEventListener performance
|
|
|
4056 |
// we will create the bind delegate when invoke
|
|
|
4057 |
var isHandleEvent = false;
|
|
|
4058 |
if (typeof delegate !== 'function') {
|
|
|
4059 |
if (!delegate.handleEvent) {
|
|
|
4060 |
return nativeListener.apply(this, arguments);
|
|
|
4061 |
}
|
|
|
4062 |
isHandleEvent = true;
|
|
|
4063 |
}
|
|
|
4064 |
if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {
|
|
|
4065 |
return;
|
|
|
4066 |
}
|
|
|
4067 |
var eventName = arguments[0];
|
|
|
4068 |
var options = arguments[2];
|
|
|
4069 |
if (blackListedEvents) {
|
|
|
4070 |
// check black list
|
|
|
4071 |
for (var i = 0; i < blackListedEvents.length; i++) {
|
|
|
4072 |
if (eventName === blackListedEvents[i]) {
|
|
|
4073 |
return nativeListener.apply(this, arguments);
|
|
|
4074 |
}
|
|
|
4075 |
}
|
|
|
4076 |
}
|
|
|
4077 |
var capture;
|
|
|
4078 |
var once = false;
|
|
|
4079 |
if (options === undefined) {
|
|
|
4080 |
capture = false;
|
|
|
4081 |
}
|
|
|
4082 |
else if (options === true) {
|
|
|
4083 |
capture = true;
|
|
|
4084 |
}
|
|
|
4085 |
else if (options === false) {
|
|
|
4086 |
capture = false;
|
|
|
4087 |
}
|
|
|
4088 |
else {
|
|
|
4089 |
capture = options ? !!options.capture : false;
|
|
|
4090 |
once = options ? !!options.once : false;
|
|
|
4091 |
}
|
|
|
4092 |
var zone = Zone.current;
|
|
|
4093 |
var symbolEventNames = zoneSymbolEventNames$1[eventName];
|
|
|
4094 |
var symbolEventName;
|
|
|
4095 |
if (!symbolEventNames) {
|
|
|
4096 |
// the code is duplicate, but I just want to get some better performance
|
|
|
4097 |
var falseEventName = eventName + FALSE_STR;
|
|
|
4098 |
var trueEventName = eventName + TRUE_STR;
|
|
|
4099 |
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
|
|
|
4100 |
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
|
|
|
4101 |
zoneSymbolEventNames$1[eventName] = {};
|
|
|
4102 |
zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
|
|
|
4103 |
zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
|
|
|
4104 |
symbolEventName = capture ? symbolCapture : symbol;
|
|
|
4105 |
}
|
|
|
4106 |
else {
|
|
|
4107 |
symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
|
|
|
4108 |
}
|
|
|
4109 |
var existingTasks = target[symbolEventName];
|
|
|
4110 |
var isExisting = false;
|
|
|
4111 |
if (existingTasks) {
|
|
|
4112 |
// already have task registered
|
|
|
4113 |
isExisting = true;
|
|
|
4114 |
if (checkDuplicate) {
|
|
|
4115 |
for (var i = 0; i < existingTasks.length; i++) {
|
|
|
4116 |
if (compare(existingTasks[i], delegate)) {
|
|
|
4117 |
// same callback, same capture, same event name, just return
|
|
|
4118 |
return;
|
|
|
4119 |
}
|
|
|
4120 |
}
|
|
|
4121 |
}
|
|
|
4122 |
}
|
|
|
4123 |
else {
|
|
|
4124 |
existingTasks = target[symbolEventName] = [];
|
|
|
4125 |
}
|
|
|
4126 |
var source;
|
|
|
4127 |
var constructorName = target.constructor['name'];
|
|
|
4128 |
var targetSource = globalSources[constructorName];
|
|
|
4129 |
if (targetSource) {
|
|
|
4130 |
source = targetSource[eventName];
|
|
|
4131 |
}
|
|
|
4132 |
if (!source) {
|
|
|
4133 |
source = constructorName + addSource + eventName;
|
|
|
4134 |
}
|
|
|
4135 |
// do not create a new object as task.data to pass those things
|
|
|
4136 |
// just use the global shared one
|
|
|
4137 |
taskData.options = options;
|
|
|
4138 |
if (once) {
|
|
|
4139 |
// if addEventListener with once options, we don't pass it to
|
|
|
4140 |
// native addEventListener, instead we keep the once setting
|
|
|
4141 |
// and handle ourselves.
|
|
|
4142 |
taskData.options.once = false;
|
|
|
4143 |
}
|
|
|
4144 |
taskData.target = target;
|
|
|
4145 |
taskData.capture = capture;
|
|
|
4146 |
taskData.eventName = eventName;
|
|
|
4147 |
taskData.isExisting = isExisting;
|
|
|
4148 |
var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : null;
|
|
|
4149 |
// keep taskData into data to allow onScheduleEventTask to access the task information
|
|
|
4150 |
if (data) {
|
|
|
4151 |
data.taskData = taskData;
|
|
|
4152 |
}
|
|
|
4153 |
var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);
|
|
|
4154 |
// should clear taskData.target to avoid memory leak
|
|
|
4155 |
// issue, https://github.com/angular/angular/issues/20442
|
|
|
4156 |
taskData.target = null;
|
|
|
4157 |
// need to clear up taskData because it is a global object
|
|
|
4158 |
if (data) {
|
|
|
4159 |
data.taskData = null;
|
|
|
4160 |
}
|
|
|
4161 |
// have to save those information to task in case
|
|
|
4162 |
// application may call task.zone.cancelTask() directly
|
|
|
4163 |
if (once) {
|
|
|
4164 |
options.once = true;
|
|
|
4165 |
}
|
|
|
4166 |
task.options = options;
|
|
|
4167 |
task.target = target;
|
|
|
4168 |
task.capture = capture;
|
|
|
4169 |
task.eventName = eventName;
|
|
|
4170 |
if (isHandleEvent) {
|
|
|
4171 |
// save original delegate for compare to check duplicate
|
|
|
4172 |
task.originalDelegate = delegate;
|
|
|
4173 |
}
|
|
|
4174 |
if (!prepend) {
|
|
|
4175 |
existingTasks.push(task);
|
|
|
4176 |
}
|
|
|
4177 |
else {
|
|
|
4178 |
existingTasks.unshift(task);
|
|
|
4179 |
}
|
|
|
4180 |
if (returnTarget) {
|
|
|
4181 |
return target;
|
|
|
4182 |
}
|
|
|
4183 |
};
|
|
|
4184 |
};
|
|
|
4185 |
proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);
|
|
|
4186 |
if (nativePrependEventListener) {
|
|
|
4187 |
proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);
|
|
|
4188 |
}
|
|
|
4189 |
proto[REMOVE_EVENT_LISTENER] = function () {
|
|
|
4190 |
var target = this || _global;
|
|
|
4191 |
var eventName = arguments[0];
|
|
|
4192 |
var options = arguments[2];
|
|
|
4193 |
var capture;
|
|
|
4194 |
if (options === undefined) {
|
|
|
4195 |
capture = false;
|
|
|
4196 |
}
|
|
|
4197 |
else if (options === true) {
|
|
|
4198 |
capture = true;
|
|
|
4199 |
}
|
|
|
4200 |
else if (options === false) {
|
|
|
4201 |
capture = false;
|
|
|
4202 |
}
|
|
|
4203 |
else {
|
|
|
4204 |
capture = options ? !!options.capture : false;
|
|
|
4205 |
}
|
|
|
4206 |
var delegate = arguments[1];
|
|
|
4207 |
if (!delegate) {
|
|
|
4208 |
return nativeRemoveEventListener.apply(this, arguments);
|
|
|
4209 |
}
|
|
|
4210 |
if (validateHandler &&
|
|
|
4211 |
!validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {
|
|
|
4212 |
return;
|
|
|
4213 |
}
|
|
|
4214 |
var symbolEventNames = zoneSymbolEventNames$1[eventName];
|
|
|
4215 |
var symbolEventName;
|
|
|
4216 |
if (symbolEventNames) {
|
|
|
4217 |
symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
|
|
|
4218 |
}
|
|
|
4219 |
var existingTasks = symbolEventName && target[symbolEventName];
|
|
|
4220 |
if (existingTasks) {
|
|
|
4221 |
for (var i = 0; i < existingTasks.length; i++) {
|
|
|
4222 |
var existingTask = existingTasks[i];
|
|
|
4223 |
if (compare(existingTask, delegate)) {
|
|
|
4224 |
existingTasks.splice(i, 1);
|
|
|
4225 |
// set isRemoved to data for faster invokeTask check
|
|
|
4226 |
existingTask.isRemoved = true;
|
|
|
4227 |
if (existingTasks.length === 0) {
|
|
|
4228 |
// all tasks for the eventName + capture have gone,
|
|
|
4229 |
// remove globalZoneAwareCallback and remove the task cache from target
|
|
|
4230 |
existingTask.allRemoved = true;
|
|
|
4231 |
target[symbolEventName] = null;
|
|
|
4232 |
}
|
|
|
4233 |
existingTask.zone.cancelTask(existingTask);
|
|
|
4234 |
if (returnTarget) {
|
|
|
4235 |
return target;
|
|
|
4236 |
}
|
|
|
4237 |
return;
|
|
|
4238 |
}
|
|
|
4239 |
}
|
|
|
4240 |
}
|
|
|
4241 |
// issue 930, didn't find the event name or callback
|
|
|
4242 |
// from zone kept existingTasks, the callback maybe
|
|
|
4243 |
// added outside of zone, we need to call native removeEventListener
|
|
|
4244 |
// to try to remove it.
|
|
|
4245 |
return nativeRemoveEventListener.apply(this, arguments);
|
|
|
4246 |
};
|
|
|
4247 |
proto[LISTENERS_EVENT_LISTENER] = function () {
|
|
|
4248 |
var target = this || _global;
|
|
|
4249 |
var eventName = arguments[0];
|
|
|
4250 |
var listeners = [];
|
|
|
4251 |
var tasks = findEventTasks(target, eventName);
|
|
|
4252 |
for (var i = 0; i < tasks.length; i++) {
|
|
|
4253 |
var task = tasks[i];
|
|
|
4254 |
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
|
4255 |
listeners.push(delegate);
|
|
|
4256 |
}
|
|
|
4257 |
return listeners;
|
|
|
4258 |
};
|
|
|
4259 |
proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {
|
|
|
4260 |
var target = this || _global;
|
|
|
4261 |
var eventName = arguments[0];
|
|
|
4262 |
if (!eventName) {
|
|
|
4263 |
var keys = Object.keys(target);
|
|
|
4264 |
for (var i = 0; i < keys.length; i++) {
|
|
|
4265 |
var prop = keys[i];
|
|
|
4266 |
var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
|
|
|
4267 |
var evtName = match && match[1];
|
|
|
4268 |
// in nodejs EventEmitter, removeListener event is
|
|
|
4269 |
// used for monitoring the removeListener call,
|
|
|
4270 |
// so just keep removeListener eventListener until
|
|
|
4271 |
// all other eventListeners are removed
|
|
|
4272 |
if (evtName && evtName !== 'removeListener') {
|
|
|
4273 |
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);
|
|
|
4274 |
}
|
|
|
4275 |
}
|
|
|
4276 |
// remove removeListener listener finally
|
|
|
4277 |
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');
|
|
|
4278 |
}
|
|
|
4279 |
else {
|
|
|
4280 |
var symbolEventNames = zoneSymbolEventNames$1[eventName];
|
|
|
4281 |
if (symbolEventNames) {
|
|
|
4282 |
var symbolEventName = symbolEventNames[FALSE_STR];
|
|
|
4283 |
var symbolCaptureEventName = symbolEventNames[TRUE_STR];
|
|
|
4284 |
var tasks = target[symbolEventName];
|
|
|
4285 |
var captureTasks = target[symbolCaptureEventName];
|
|
|
4286 |
if (tasks) {
|
|
|
4287 |
var removeTasks = tasks.slice();
|
|
|
4288 |
for (var i = 0; i < removeTasks.length; i++) {
|
|
|
4289 |
var task = removeTasks[i];
|
|
|
4290 |
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
|
4291 |
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
|
|
|
4292 |
}
|
|
|
4293 |
}
|
|
|
4294 |
if (captureTasks) {
|
|
|
4295 |
var removeTasks = captureTasks.slice();
|
|
|
4296 |
for (var i = 0; i < removeTasks.length; i++) {
|
|
|
4297 |
var task = removeTasks[i];
|
|
|
4298 |
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
|
|
|
4299 |
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
|
|
|
4300 |
}
|
|
|
4301 |
}
|
|
|
4302 |
}
|
|
|
4303 |
}
|
|
|
4304 |
if (returnTarget) {
|
|
|
4305 |
return this;
|
|
|
4306 |
}
|
|
|
4307 |
};
|
|
|
4308 |
// for native toString patch
|
|
|
4309 |
attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);
|
|
|
4310 |
attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);
|
|
|
4311 |
if (nativeRemoveAllListeners) {
|
|
|
4312 |
attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);
|
|
|
4313 |
}
|
|
|
4314 |
if (nativeListeners) {
|
|
|
4315 |
attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);
|
|
|
4316 |
}
|
|
|
4317 |
return true;
|
|
|
4318 |
}
|
|
|
4319 |
var results = [];
|
|
|
4320 |
for (var i = 0; i < apis.length; i++) {
|
|
|
4321 |
results[i] = patchEventTargetMethods(apis[i], patchOptions);
|
|
|
4322 |
}
|
|
|
4323 |
return results;
|
|
|
4324 |
}
|
|
|
4325 |
function findEventTasks(target, eventName) {
|
|
|
4326 |
var foundTasks = [];
|
|
|
4327 |
for (var prop in target) {
|
|
|
4328 |
var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
|
|
|
4329 |
var evtName = match && match[1];
|
|
|
4330 |
if (evtName && (!eventName || evtName === eventName)) {
|
|
|
4331 |
var tasks = target[prop];
|
|
|
4332 |
if (tasks) {
|
|
|
4333 |
for (var i = 0; i < tasks.length; i++) {
|
|
|
4334 |
foundTasks.push(tasks[i]);
|
|
|
4335 |
}
|
|
|
4336 |
}
|
|
|
4337 |
}
|
|
|
4338 |
}
|
|
|
4339 |
return foundTasks;
|
|
|
4340 |
}
|
|
|
4341 |
function patchEventPrototype(global, api) {
|
|
|
4342 |
var Event = global['Event'];
|
|
|
4343 |
if (Event && Event.prototype) {
|
|
|
4344 |
api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) {
|
|
|
4345 |
self[IMMEDIATE_PROPAGATION_SYMBOL] = true;
|
|
|
4346 |
// we need to call the native stopImmediatePropagation
|
|
|
4347 |
// in case in some hybrid application, some part of
|
|
|
4348 |
// application will be controlled by zone, some are not
|
|
|
4349 |
delegate && delegate.apply(self, args);
|
|
|
4350 |
}; });
|
|
|
4351 |
}
|
|
|
4352 |
}
|
|
|
4353 |
|
|
|
4354 |
/**
|
|
|
4355 |
* @license
|
|
|
4356 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
4357 |
*
|
|
|
4358 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
4359 |
* found in the LICENSE file at https://angular.io/license
|
|
|
4360 |
*/
|
|
|
4361 |
/**
|
|
|
4362 |
* @fileoverview
|
|
|
4363 |
* @suppress {missingRequire}
|
|
|
4364 |
*/
|
|
|
4365 |
var taskSymbol = zoneSymbol('zoneTask');
|
|
|
4366 |
function patchTimer(window, setName, cancelName, nameSuffix) {
|
|
|
4367 |
var setNative = null;
|
|
|
4368 |
var clearNative = null;
|
|
|
4369 |
setName += nameSuffix;
|
|
|
4370 |
cancelName += nameSuffix;
|
|
|
4371 |
var tasksByHandleId = {};
|
|
|
4372 |
function scheduleTask(task) {
|
|
|
4373 |
var data = task.data;
|
|
|
4374 |
function timer() {
|
|
|
4375 |
try {
|
|
|
4376 |
task.invoke.apply(this, arguments);
|
|
|
4377 |
}
|
|
|
4378 |
finally {
|
|
|
4379 |
// issue-934, task will be cancelled
|
|
|
4380 |
// even it is a periodic task such as
|
|
|
4381 |
// setInterval
|
|
|
4382 |
if (!(task.data && task.data.isPeriodic)) {
|
|
|
4383 |
if (typeof data.handleId === 'number') {
|
|
|
4384 |
// in non-nodejs env, we remove timerId
|
|
|
4385 |
// from local cache
|
|
|
4386 |
delete tasksByHandleId[data.handleId];
|
|
|
4387 |
}
|
|
|
4388 |
else if (data.handleId) {
|
|
|
4389 |
// Node returns complex objects as handleIds
|
|
|
4390 |
// we remove task reference from timer object
|
|
|
4391 |
data.handleId[taskSymbol] = null;
|
|
|
4392 |
}
|
|
|
4393 |
}
|
|
|
4394 |
}
|
|
|
4395 |
}
|
|
|
4396 |
data.args[0] = timer;
|
|
|
4397 |
data.handleId = setNative.apply(window, data.args);
|
|
|
4398 |
return task;
|
|
|
4399 |
}
|
|
|
4400 |
function clearTask(task) {
|
|
|
4401 |
return clearNative(task.data.handleId);
|
|
|
4402 |
}
|
|
|
4403 |
setNative =
|
|
|
4404 |
patchMethod(window, setName, function (delegate) { return function (self, args) {
|
|
|
4405 |
if (typeof args[0] === 'function') {
|
|
|
4406 |
var options = {
|
|
|
4407 |
handleId: null,
|
|
|
4408 |
isPeriodic: nameSuffix === 'Interval',
|
|
|
4409 |
delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null,
|
|
|
4410 |
args: args
|
|
|
4411 |
};
|
|
|
4412 |
var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);
|
|
|
4413 |
if (!task) {
|
|
|
4414 |
return task;
|
|
|
4415 |
}
|
|
|
4416 |
// Node.js must additionally support the ref and unref functions.
|
|
|
4417 |
var handle = task.data.handleId;
|
|
|
4418 |
if (typeof handle === 'number') {
|
|
|
4419 |
// for non nodejs env, we save handleId: task
|
|
|
4420 |
// mapping in local cache for clearTimeout
|
|
|
4421 |
tasksByHandleId[handle] = task;
|
|
|
4422 |
}
|
|
|
4423 |
else if (handle) {
|
|
|
4424 |
// for nodejs env, we save task
|
|
|
4425 |
// reference in timerId Object for clearTimeout
|
|
|
4426 |
handle[taskSymbol] = task;
|
|
|
4427 |
}
|
|
|
4428 |
// check whether handle is null, because some polyfill or browser
|
|
|
4429 |
// may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame
|
|
|
4430 |
if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&
|
|
|
4431 |
typeof handle.unref === 'function') {
|
|
|
4432 |
task.ref = handle.ref.bind(handle);
|
|
|
4433 |
task.unref = handle.unref.bind(handle);
|
|
|
4434 |
}
|
|
|
4435 |
if (typeof handle === 'number' || handle) {
|
|
|
4436 |
return handle;
|
|
|
4437 |
}
|
|
|
4438 |
return task;
|
|
|
4439 |
}
|
|
|
4440 |
else {
|
|
|
4441 |
// cause an error by calling it directly.
|
|
|
4442 |
return delegate.apply(window, args);
|
|
|
4443 |
}
|
|
|
4444 |
}; });
|
|
|
4445 |
clearNative =
|
|
|
4446 |
patchMethod(window, cancelName, function (delegate) { return function (self, args) {
|
|
|
4447 |
var id = args[0];
|
|
|
4448 |
var task;
|
|
|
4449 |
if (typeof id === 'number') {
|
|
|
4450 |
// non nodejs env.
|
|
|
4451 |
task = tasksByHandleId[id];
|
|
|
4452 |
}
|
|
|
4453 |
else {
|
|
|
4454 |
// nodejs env.
|
|
|
4455 |
task = id && id[taskSymbol];
|
|
|
4456 |
// other environments.
|
|
|
4457 |
if (!task) {
|
|
|
4458 |
task = id;
|
|
|
4459 |
}
|
|
|
4460 |
}
|
|
|
4461 |
if (task && typeof task.type === 'string') {
|
|
|
4462 |
if (task.state !== 'notScheduled' &&
|
|
|
4463 |
(task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {
|
|
|
4464 |
if (typeof id === 'number') {
|
|
|
4465 |
delete tasksByHandleId[id];
|
|
|
4466 |
}
|
|
|
4467 |
else if (id) {
|
|
|
4468 |
id[taskSymbol] = null;
|
|
|
4469 |
}
|
|
|
4470 |
// Do not cancel already canceled functions
|
|
|
4471 |
task.zone.cancelTask(task);
|
|
|
4472 |
}
|
|
|
4473 |
}
|
|
|
4474 |
else {
|
|
|
4475 |
// cause an error by calling it directly.
|
|
|
4476 |
delegate.apply(window, args);
|
|
|
4477 |
}
|
|
|
4478 |
}; });
|
|
|
4479 |
}
|
|
|
4480 |
|
|
|
4481 |
/**
|
|
|
4482 |
* @license
|
|
|
4483 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
4484 |
*
|
|
|
4485 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
4486 |
* found in the LICENSE file at https://angular.io/license
|
|
|
4487 |
*/
|
|
|
4488 |
/*
|
|
|
4489 |
* This is necessary for Chrome and Chrome mobile, to enable
|
|
|
4490 |
* things like redefining `createdCallback` on an element.
|
|
|
4491 |
*/
|
|
|
4492 |
var _defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;
|
|
|
4493 |
var _getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =
|
|
|
4494 |
Object.getOwnPropertyDescriptor;
|
|
|
4495 |
var _create = Object.create;
|
|
|
4496 |
var unconfigurablesKey = zoneSymbol('unconfigurables');
|
|
|
4497 |
function propertyPatch() {
|
|
|
4498 |
Object.defineProperty = function (obj, prop, desc) {
|
|
|
4499 |
if (isUnconfigurable(obj, prop)) {
|
|
|
4500 |
throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
|
|
|
4501 |
}
|
|
|
4502 |
var originalConfigurableFlag = desc.configurable;
|
|
|
4503 |
if (prop !== 'prototype') {
|
|
|
4504 |
desc = rewriteDescriptor(obj, prop, desc);
|
|
|
4505 |
}
|
|
|
4506 |
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
|
|
|
4507 |
};
|
|
|
4508 |
Object.defineProperties = function (obj, props) {
|
|
|
4509 |
Object.keys(props).forEach(function (prop) {
|
|
|
4510 |
Object.defineProperty(obj, prop, props[prop]);
|
|
|
4511 |
});
|
|
|
4512 |
return obj;
|
|
|
4513 |
};
|
|
|
4514 |
Object.create = function (obj, proto) {
|
|
|
4515 |
if (typeof proto === 'object' && !Object.isFrozen(proto)) {
|
|
|
4516 |
Object.keys(proto).forEach(function (prop) {
|
|
|
4517 |
proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
|
|
|
4518 |
});
|
|
|
4519 |
}
|
|
|
4520 |
return _create(obj, proto);
|
|
|
4521 |
};
|
|
|
4522 |
Object.getOwnPropertyDescriptor = function (obj, prop) {
|
|
|
4523 |
var desc = _getOwnPropertyDescriptor(obj, prop);
|
|
|
4524 |
if (isUnconfigurable(obj, prop)) {
|
|
|
4525 |
desc.configurable = false;
|
|
|
4526 |
}
|
|
|
4527 |
return desc;
|
|
|
4528 |
};
|
|
|
4529 |
}
|
|
|
4530 |
function _redefineProperty(obj, prop, desc) {
|
|
|
4531 |
var originalConfigurableFlag = desc.configurable;
|
|
|
4532 |
desc = rewriteDescriptor(obj, prop, desc);
|
|
|
4533 |
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
|
|
|
4534 |
}
|
|
|
4535 |
function isUnconfigurable(obj, prop) {
|
|
|
4536 |
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
|
|
|
4537 |
}
|
|
|
4538 |
function rewriteDescriptor(obj, prop, desc) {
|
|
|
4539 |
// issue-927, if the desc is frozen, don't try to change the desc
|
|
|
4540 |
if (!Object.isFrozen(desc)) {
|
|
|
4541 |
desc.configurable = true;
|
|
|
4542 |
}
|
|
|
4543 |
if (!desc.configurable) {
|
|
|
4544 |
// issue-927, if the obj is frozen, don't try to set the desc to obj
|
|
|
4545 |
if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
|
|
|
4546 |
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
|
|
|
4547 |
}
|
|
|
4548 |
if (obj[unconfigurablesKey]) {
|
|
|
4549 |
obj[unconfigurablesKey][prop] = true;
|
|
|
4550 |
}
|
|
|
4551 |
}
|
|
|
4552 |
return desc;
|
|
|
4553 |
}
|
|
|
4554 |
function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
|
|
|
4555 |
try {
|
|
|
4556 |
return _defineProperty(obj, prop, desc);
|
|
|
4557 |
}
|
|
|
4558 |
catch (error) {
|
|
|
4559 |
if (desc.configurable) {
|
|
|
4560 |
// In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's
|
|
|
4561 |
// retry with the original flag value
|
|
|
4562 |
if (typeof originalConfigurableFlag == 'undefined') {
|
|
|
4563 |
delete desc.configurable;
|
|
|
4564 |
}
|
|
|
4565 |
else {
|
|
|
4566 |
desc.configurable = originalConfigurableFlag;
|
|
|
4567 |
}
|
|
|
4568 |
try {
|
|
|
4569 |
return _defineProperty(obj, prop, desc);
|
|
|
4570 |
}
|
|
|
4571 |
catch (error) {
|
|
|
4572 |
var descJson = null;
|
|
|
4573 |
try {
|
|
|
4574 |
descJson = JSON.stringify(desc);
|
|
|
4575 |
}
|
|
|
4576 |
catch (error) {
|
|
|
4577 |
descJson = desc.toString();
|
|
|
4578 |
}
|
|
|
4579 |
console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error);
|
|
|
4580 |
}
|
|
|
4581 |
}
|
|
|
4582 |
else {
|
|
|
4583 |
throw error;
|
|
|
4584 |
}
|
|
|
4585 |
}
|
|
|
4586 |
}
|
|
|
4587 |
|
|
|
4588 |
/**
|
|
|
4589 |
* @license
|
|
|
4590 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
4591 |
*
|
|
|
4592 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
4593 |
* found in the LICENSE file at https://angular.io/license
|
|
|
4594 |
*/
|
|
|
4595 |
// we have to patch the instance since the proto is non-configurable
|
|
|
4596 |
function apply(api, _global) {
|
|
|
4597 |
var WS = _global.WebSocket;
|
|
|
4598 |
// On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
|
|
|
4599 |
// On older Chrome, no need since EventTarget was already patched
|
|
|
4600 |
if (!_global.EventTarget) {
|
|
|
4601 |
patchEventTarget(_global, [WS.prototype]);
|
|
|
4602 |
}
|
|
|
4603 |
_global.WebSocket = function (x, y) {
|
|
|
4604 |
var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
|
|
|
4605 |
var proxySocket;
|
|
|
4606 |
var proxySocketProto;
|
|
|
4607 |
// Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
|
|
|
4608 |
var onmessageDesc = ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
|
|
|
4609 |
if (onmessageDesc && onmessageDesc.configurable === false) {
|
|
|
4610 |
proxySocket = ObjectCreate(socket);
|
|
|
4611 |
// socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
|
|
|
4612 |
// but proxySocket not, so we will keep socket as prototype and pass it to
|
|
|
4613 |
// patchOnProperties method
|
|
|
4614 |
proxySocketProto = socket;
|
|
|
4615 |
[ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
|
|
|
4616 |
proxySocket[propName] = function () {
|
|
|
4617 |
var args = ArraySlice.call(arguments);
|
|
|
4618 |
if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
|
|
|
4619 |
var eventName = args.length > 0 ? args[0] : undefined;
|
|
|
4620 |
if (eventName) {
|
|
|
4621 |
var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
|
|
|
4622 |
socket[propertySymbol] = proxySocket[propertySymbol];
|
|
|
4623 |
}
|
|
|
4624 |
}
|
|
|
4625 |
return socket[propName].apply(socket, args);
|
|
|
4626 |
};
|
|
|
4627 |
});
|
|
|
4628 |
}
|
|
|
4629 |
else {
|
|
|
4630 |
// we can patch the real socket
|
|
|
4631 |
proxySocket = socket;
|
|
|
4632 |
}
|
|
|
4633 |
patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
|
|
|
4634 |
return proxySocket;
|
|
|
4635 |
};
|
|
|
4636 |
var globalWebSocket = _global['WebSocket'];
|
|
|
4637 |
for (var prop in WS) {
|
|
|
4638 |
globalWebSocket[prop] = WS[prop];
|
|
|
4639 |
}
|
|
|
4640 |
}
|
|
|
4641 |
|
|
|
4642 |
/**
|
|
|
4643 |
* @license
|
|
|
4644 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
4645 |
*
|
|
|
4646 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
4647 |
* found in the LICENSE file at https://angular.io/license
|
|
|
4648 |
*/
|
|
|
4649 |
/**
|
|
|
4650 |
* @fileoverview
|
|
|
4651 |
* @suppress {globalThis}
|
|
|
4652 |
*/
|
|
|
4653 |
var globalEventHandlersEventNames = [
|
|
|
4654 |
'abort',
|
|
|
4655 |
'animationcancel',
|
|
|
4656 |
'animationend',
|
|
|
4657 |
'animationiteration',
|
|
|
4658 |
'auxclick',
|
|
|
4659 |
'beforeinput',
|
|
|
4660 |
'blur',
|
|
|
4661 |
'cancel',
|
|
|
4662 |
'canplay',
|
|
|
4663 |
'canplaythrough',
|
|
|
4664 |
'change',
|
|
|
4665 |
'compositionstart',
|
|
|
4666 |
'compositionupdate',
|
|
|
4667 |
'compositionend',
|
|
|
4668 |
'cuechange',
|
|
|
4669 |
'click',
|
|
|
4670 |
'close',
|
|
|
4671 |
'contextmenu',
|
|
|
4672 |
'curechange',
|
|
|
4673 |
'dblclick',
|
|
|
4674 |
'drag',
|
|
|
4675 |
'dragend',
|
|
|
4676 |
'dragenter',
|
|
|
4677 |
'dragexit',
|
|
|
4678 |
'dragleave',
|
|
|
4679 |
'dragover',
|
|
|
4680 |
'drop',
|
|
|
4681 |
'durationchange',
|
|
|
4682 |
'emptied',
|
|
|
4683 |
'ended',
|
|
|
4684 |
'error',
|
|
|
4685 |
'focus',
|
|
|
4686 |
'focusin',
|
|
|
4687 |
'focusout',
|
|
|
4688 |
'gotpointercapture',
|
|
|
4689 |
'input',
|
|
|
4690 |
'invalid',
|
|
|
4691 |
'keydown',
|
|
|
4692 |
'keypress',
|
|
|
4693 |
'keyup',
|
|
|
4694 |
'load',
|
|
|
4695 |
'loadstart',
|
|
|
4696 |
'loadeddata',
|
|
|
4697 |
'loadedmetadata',
|
|
|
4698 |
'lostpointercapture',
|
|
|
4699 |
'mousedown',
|
|
|
4700 |
'mouseenter',
|
|
|
4701 |
'mouseleave',
|
|
|
4702 |
'mousemove',
|
|
|
4703 |
'mouseout',
|
|
|
4704 |
'mouseover',
|
|
|
4705 |
'mouseup',
|
|
|
4706 |
'mousewheel',
|
|
|
4707 |
'orientationchange',
|
|
|
4708 |
'pause',
|
|
|
4709 |
'play',
|
|
|
4710 |
'playing',
|
|
|
4711 |
'pointercancel',
|
|
|
4712 |
'pointerdown',
|
|
|
4713 |
'pointerenter',
|
|
|
4714 |
'pointerleave',
|
|
|
4715 |
'pointerlockchange',
|
|
|
4716 |
'mozpointerlockchange',
|
|
|
4717 |
'webkitpointerlockerchange',
|
|
|
4718 |
'pointerlockerror',
|
|
|
4719 |
'mozpointerlockerror',
|
|
|
4720 |
'webkitpointerlockerror',
|
|
|
4721 |
'pointermove',
|
|
|
4722 |
'pointout',
|
|
|
4723 |
'pointerover',
|
|
|
4724 |
'pointerup',
|
|
|
4725 |
'progress',
|
|
|
4726 |
'ratechange',
|
|
|
4727 |
'reset',
|
|
|
4728 |
'resize',
|
|
|
4729 |
'scroll',
|
|
|
4730 |
'seeked',
|
|
|
4731 |
'seeking',
|
|
|
4732 |
'select',
|
|
|
4733 |
'selectionchange',
|
|
|
4734 |
'selectstart',
|
|
|
4735 |
'show',
|
|
|
4736 |
'sort',
|
|
|
4737 |
'stalled',
|
|
|
4738 |
'submit',
|
|
|
4739 |
'suspend',
|
|
|
4740 |
'timeupdate',
|
|
|
4741 |
'volumechange',
|
|
|
4742 |
'touchcancel',
|
|
|
4743 |
'touchmove',
|
|
|
4744 |
'touchstart',
|
|
|
4745 |
'touchend',
|
|
|
4746 |
'transitioncancel',
|
|
|
4747 |
'transitionend',
|
|
|
4748 |
'waiting',
|
|
|
4749 |
'wheel'
|
|
|
4750 |
];
|
|
|
4751 |
var documentEventNames = [
|
|
|
4752 |
'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'fullscreenchange',
|
|
|
4753 |
'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
|
|
|
4754 |
'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
|
|
|
4755 |
'visibilitychange'
|
|
|
4756 |
];
|
|
|
4757 |
var windowEventNames = [
|
|
|
4758 |
'absolutedeviceorientation',
|
|
|
4759 |
'afterinput',
|
|
|
4760 |
'afterprint',
|
|
|
4761 |
'appinstalled',
|
|
|
4762 |
'beforeinstallprompt',
|
|
|
4763 |
'beforeprint',
|
|
|
4764 |
'beforeunload',
|
|
|
4765 |
'devicelight',
|
|
|
4766 |
'devicemotion',
|
|
|
4767 |
'deviceorientation',
|
|
|
4768 |
'deviceorientationabsolute',
|
|
|
4769 |
'deviceproximity',
|
|
|
4770 |
'hashchange',
|
|
|
4771 |
'languagechange',
|
|
|
4772 |
'message',
|
|
|
4773 |
'mozbeforepaint',
|
|
|
4774 |
'offline',
|
|
|
4775 |
'online',
|
|
|
4776 |
'paint',
|
|
|
4777 |
'pageshow',
|
|
|
4778 |
'pagehide',
|
|
|
4779 |
'popstate',
|
|
|
4780 |
'rejectionhandled',
|
|
|
4781 |
'storage',
|
|
|
4782 |
'unhandledrejection',
|
|
|
4783 |
'unload',
|
|
|
4784 |
'userproximity',
|
|
|
4785 |
'vrdisplyconnected',
|
|
|
4786 |
'vrdisplaydisconnected',
|
|
|
4787 |
'vrdisplaypresentchange'
|
|
|
4788 |
];
|
|
|
4789 |
var htmlElementEventNames = [
|
|
|
4790 |
'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
|
|
|
4791 |
'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
|
|
|
4792 |
'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
|
|
|
4793 |
];
|
|
|
4794 |
var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];
|
|
|
4795 |
var ieElementEventNames = [
|
|
|
4796 |
'activate',
|
|
|
4797 |
'afterupdate',
|
|
|
4798 |
'ariarequest',
|
|
|
4799 |
'beforeactivate',
|
|
|
4800 |
'beforedeactivate',
|
|
|
4801 |
'beforeeditfocus',
|
|
|
4802 |
'beforeupdate',
|
|
|
4803 |
'cellchange',
|
|
|
4804 |
'controlselect',
|
|
|
4805 |
'dataavailable',
|
|
|
4806 |
'datasetchanged',
|
|
|
4807 |
'datasetcomplete',
|
|
|
4808 |
'errorupdate',
|
|
|
4809 |
'filterchange',
|
|
|
4810 |
'layoutcomplete',
|
|
|
4811 |
'losecapture',
|
|
|
4812 |
'move',
|
|
|
4813 |
'moveend',
|
|
|
4814 |
'movestart',
|
|
|
4815 |
'propertychange',
|
|
|
4816 |
'resizeend',
|
|
|
4817 |
'resizestart',
|
|
|
4818 |
'rowenter',
|
|
|
4819 |
'rowexit',
|
|
|
4820 |
'rowsdelete',
|
|
|
4821 |
'rowsinserted',
|
|
|
4822 |
'command',
|
|
|
4823 |
'compassneedscalibration',
|
|
|
4824 |
'deactivate',
|
|
|
4825 |
'help',
|
|
|
4826 |
'mscontentzoom',
|
|
|
4827 |
'msmanipulationstatechanged',
|
|
|
4828 |
'msgesturechange',
|
|
|
4829 |
'msgesturedoubletap',
|
|
|
4830 |
'msgestureend',
|
|
|
4831 |
'msgesturehold',
|
|
|
4832 |
'msgesturestart',
|
|
|
4833 |
'msgesturetap',
|
|
|
4834 |
'msgotpointercapture',
|
|
|
4835 |
'msinertiastart',
|
|
|
4836 |
'mslostpointercapture',
|
|
|
4837 |
'mspointercancel',
|
|
|
4838 |
'mspointerdown',
|
|
|
4839 |
'mspointerenter',
|
|
|
4840 |
'mspointerhover',
|
|
|
4841 |
'mspointerleave',
|
|
|
4842 |
'mspointermove',
|
|
|
4843 |
'mspointerout',
|
|
|
4844 |
'mspointerover',
|
|
|
4845 |
'mspointerup',
|
|
|
4846 |
'pointerout',
|
|
|
4847 |
'mssitemodejumplistitemremoved',
|
|
|
4848 |
'msthumbnailclick',
|
|
|
4849 |
'stop',
|
|
|
4850 |
'storagecommit'
|
|
|
4851 |
];
|
|
|
4852 |
var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
|
|
|
4853 |
var formEventNames = ['autocomplete', 'autocompleteerror'];
|
|
|
4854 |
var detailEventNames = ['toggle'];
|
|
|
4855 |
var frameEventNames = ['load'];
|
|
|
4856 |
var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];
|
|
|
4857 |
var marqueeEventNames = ['bounce', 'finish', 'start'];
|
|
|
4858 |
var XMLHttpRequestEventNames = [
|
|
|
4859 |
'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',
|
|
|
4860 |
'readystatechange'
|
|
|
4861 |
];
|
|
|
4862 |
var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];
|
|
|
4863 |
var websocketEventNames = ['close', 'error', 'open', 'message'];
|
|
|
4864 |
var workerEventNames = ['error', 'message'];
|
|
|
4865 |
var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);
|
|
|
4866 |
function filterProperties(target, onProperties, ignoreProperties) {
|
|
|
4867 |
if (!ignoreProperties) {
|
|
|
4868 |
return onProperties;
|
|
|
4869 |
}
|
|
|
4870 |
var tip = ignoreProperties.filter(function (ip) { return ip.target === target; });
|
|
|
4871 |
if (!tip || tip.length === 0) {
|
|
|
4872 |
return onProperties;
|
|
|
4873 |
}
|
|
|
4874 |
var targetIgnoreProperties = tip[0].ignoreProperties;
|
|
|
4875 |
return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; });
|
|
|
4876 |
}
|
|
|
4877 |
function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {
|
|
|
4878 |
// check whether target is available, sometimes target will be undefined
|
|
|
4879 |
// because different browser or some 3rd party plugin.
|
|
|
4880 |
if (!target) {
|
|
|
4881 |
return;
|
|
|
4882 |
}
|
|
|
4883 |
var filteredProperties = filterProperties(target, onProperties, ignoreProperties);
|
|
|
4884 |
patchOnProperties(target, filteredProperties, prototype);
|
|
|
4885 |
}
|
|
|
4886 |
function propertyDescriptorPatch(api, _global) {
|
|
|
4887 |
if (isNode && !isMix) {
|
|
|
4888 |
return;
|
|
|
4889 |
}
|
|
|
4890 |
var supportsWebSocket = typeof WebSocket !== 'undefined';
|
|
|
4891 |
if (canPatchViaPropertyDescriptor()) {
|
|
|
4892 |
var ignoreProperties = _global.__Zone_ignore_on_properties;
|
|
|
4893 |
// for browsers that we can patch the descriptor: Chrome & Firefox
|
|
|
4894 |
if (isBrowser) {
|
|
|
4895 |
var internalWindow = window;
|
|
|
4896 |
// in IE/Edge, onProp not exist in window object, but in WindowPrototype
|
|
|
4897 |
// so we need to pass WindowPrototype to check onProp exist or not
|
|
|
4898 |
patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties, ObjectGetPrototypeOf(internalWindow));
|
|
|
4899 |
patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);
|
|
|
4900 |
if (typeof internalWindow['SVGElement'] !== 'undefined') {
|
|
|
4901 |
patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);
|
|
|
4902 |
}
|
|
|
4903 |
patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);
|
|
|
4904 |
patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);
|
|
|
4905 |
patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);
|
|
|
4906 |
patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
|
|
|
4907 |
patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
|
|
|
4908 |
patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);
|
|
|
4909 |
patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);
|
|
|
4910 |
var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement'];
|
|
|
4911 |
if (HTMLMarqueeElement_1) {
|
|
|
4912 |
patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);
|
|
|
4913 |
}
|
|
|
4914 |
var Worker_1 = internalWindow['Worker'];
|
|
|
4915 |
if (Worker_1) {
|
|
|
4916 |
patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);
|
|
|
4917 |
}
|
|
|
4918 |
}
|
|
|
4919 |
patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);
|
|
|
4920 |
var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];
|
|
|
4921 |
if (XMLHttpRequestEventTarget) {
|
|
|
4922 |
patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);
|
|
|
4923 |
}
|
|
|
4924 |
if (typeof IDBIndex !== 'undefined') {
|
|
|
4925 |
patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4926 |
patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4927 |
patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4928 |
patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4929 |
patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4930 |
patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);
|
|
|
4931 |
}
|
|
|
4932 |
if (supportsWebSocket) {
|
|
|
4933 |
patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);
|
|
|
4934 |
}
|
|
|
4935 |
}
|
|
|
4936 |
else {
|
|
|
4937 |
// Safari, Android browsers (Jelly Bean)
|
|
|
4938 |
patchViaCapturingAllTheEvents();
|
|
|
4939 |
patchClass('XMLHttpRequest');
|
|
|
4940 |
if (supportsWebSocket) {
|
|
|
4941 |
apply(api, _global);
|
|
|
4942 |
}
|
|
|
4943 |
}
|
|
|
4944 |
}
|
|
|
4945 |
function canPatchViaPropertyDescriptor() {
|
|
|
4946 |
if ((isBrowser || isMix) && !ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
|
|
|
4947 |
typeof Element !== 'undefined') {
|
|
|
4948 |
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
|
|
|
4949 |
// IDL interface attributes are not configurable
|
|
|
4950 |
var desc = ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
|
|
|
4951 |
if (desc && !desc.configurable)
|
|
|
4952 |
return false;
|
|
|
4953 |
}
|
|
|
4954 |
var ON_READY_STATE_CHANGE = 'onreadystatechange';
|
|
|
4955 |
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
|
|
|
4956 |
var xhrDesc = ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);
|
|
|
4957 |
// add enumerable and configurable here because in opera
|
|
|
4958 |
// by default XMLHttpRequest.prototype.onreadystatechange is undefined
|
|
|
4959 |
// without adding enumerable and configurable will cause onreadystatechange
|
|
|
4960 |
// non-configurable
|
|
|
4961 |
// and if XMLHttpRequest.prototype.onreadystatechange is undefined,
|
|
|
4962 |
// we should set a real desc instead a fake one
|
|
|
4963 |
if (xhrDesc) {
|
|
|
4964 |
ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
|
|
|
4965 |
enumerable: true,
|
|
|
4966 |
configurable: true,
|
|
|
4967 |
get: function () {
|
|
|
4968 |
return true;
|
|
|
4969 |
}
|
|
|
4970 |
});
|
|
|
4971 |
var req = new XMLHttpRequest();
|
|
|
4972 |
var result = !!req.onreadystatechange;
|
|
|
4973 |
// restore original desc
|
|
|
4974 |
ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
|
|
|
4975 |
return result;
|
|
|
4976 |
}
|
|
|
4977 |
else {
|
|
|
4978 |
var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = zoneSymbol('fake');
|
|
|
4979 |
ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
|
|
|
4980 |
enumerable: true,
|
|
|
4981 |
configurable: true,
|
|
|
4982 |
get: function () {
|
|
|
4983 |
return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];
|
|
|
4984 |
},
|
|
|
4985 |
set: function (value) {
|
|
|
4986 |
this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
|
|
|
4987 |
}
|
|
|
4988 |
});
|
|
|
4989 |
var req = new XMLHttpRequest();
|
|
|
4990 |
var detectFunc = function () { };
|
|
|
4991 |
req.onreadystatechange = detectFunc;
|
|
|
4992 |
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
|
|
|
4993 |
req.onreadystatechange = null;
|
|
|
4994 |
return result;
|
|
|
4995 |
}
|
|
|
4996 |
}
|
|
|
4997 |
var unboundKey = zoneSymbol('unbound');
|
|
|
4998 |
// Whenever any eventListener fires, we check the eventListener target and all parents
|
|
|
4999 |
// for `onwhatever` properties and replace them with zone-bound functions
|
|
|
5000 |
// - Chrome (for now)
|
|
|
5001 |
function patchViaCapturingAllTheEvents() {
|
|
|
5002 |
var _loop_1 = function (i) {
|
|
|
5003 |
var property = eventNames[i];
|
|
|
5004 |
var onproperty = 'on' + property;
|
|
|
5005 |
self.addEventListener(property, function (event) {
|
|
|
5006 |
var elt = event.target, bound, source;
|
|
|
5007 |
if (elt) {
|
|
|
5008 |
source = elt.constructor['name'] + '.' + onproperty;
|
|
|
5009 |
}
|
|
|
5010 |
else {
|
|
|
5011 |
source = 'unknown.' + onproperty;
|
|
|
5012 |
}
|
|
|
5013 |
while (elt) {
|
|
|
5014 |
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
|
|
|
5015 |
bound = wrapWithCurrentZone(elt[onproperty], source);
|
|
|
5016 |
bound[unboundKey] = elt[onproperty];
|
|
|
5017 |
elt[onproperty] = bound;
|
|
|
5018 |
}
|
|
|
5019 |
elt = elt.parentElement;
|
|
|
5020 |
}
|
|
|
5021 |
}, true);
|
|
|
5022 |
};
|
|
|
5023 |
for (var i = 0; i < eventNames.length; i++) {
|
|
|
5024 |
_loop_1(i);
|
|
|
5025 |
}
|
|
|
5026 |
}
|
|
|
5027 |
|
|
|
5028 |
/**
|
|
|
5029 |
* @license
|
|
|
5030 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
5031 |
*
|
|
|
5032 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
5033 |
* found in the LICENSE file at https://angular.io/license
|
|
|
5034 |
*/
|
|
|
5035 |
function eventTargetPatch(_global, api) {
|
|
|
5036 |
var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
|
|
|
5037 |
var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'
|
|
|
5038 |
.split(',');
|
|
|
5039 |
var EVENT_TARGET = 'EventTarget';
|
|
|
5040 |
var apis = [];
|
|
|
5041 |
var isWtf = _global['wtf'];
|
|
|
5042 |
var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
|
|
|
5043 |
if (isWtf) {
|
|
|
5044 |
// Workaround for: https://github.com/google/tracing-framework/issues/555
|
|
|
5045 |
apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
|
|
|
5046 |
}
|
|
|
5047 |
else if (_global[EVENT_TARGET]) {
|
|
|
5048 |
apis.push(EVENT_TARGET);
|
|
|
5049 |
}
|
|
|
5050 |
else {
|
|
|
5051 |
// Note: EventTarget is not available in all browsers,
|
|
|
5052 |
// if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
|
|
|
5053 |
apis = NO_EVENT_TARGET;
|
|
|
5054 |
}
|
|
|
5055 |
var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
|
|
|
5056 |
var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
|
|
|
5057 |
var ieOrEdge = isIEOrEdge();
|
|
|
5058 |
var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
|
|
|
5059 |
var FUNCTION_WRAPPER = '[object FunctionWrapper]';
|
|
|
5060 |
var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
|
|
|
5061 |
// predefine all __zone_symbol__ + eventName + true/false string
|
|
|
5062 |
for (var i = 0; i < eventNames.length; i++) {
|
|
|
5063 |
var eventName = eventNames[i];
|
|
|
5064 |
var falseEventName = eventName + FALSE_STR;
|
|
|
5065 |
var trueEventName = eventName + TRUE_STR;
|
|
|
5066 |
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
|
|
|
5067 |
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
|
|
|
5068 |
zoneSymbolEventNames$1[eventName] = {};
|
|
|
5069 |
zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
|
|
|
5070 |
zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
|
|
|
5071 |
}
|
|
|
5072 |
// predefine all task.source string
|
|
|
5073 |
for (var i = 0; i < WTF_ISSUE_555.length; i++) {
|
|
|
5074 |
var target = WTF_ISSUE_555_ARRAY[i];
|
|
|
5075 |
var targets = globalSources[target] = {};
|
|
|
5076 |
for (var j = 0; j < eventNames.length; j++) {
|
|
|
5077 |
var eventName = eventNames[j];
|
|
|
5078 |
targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
|
|
|
5079 |
}
|
|
|
5080 |
}
|
|
|
5081 |
var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
|
|
|
5082 |
if (!isDisableIECheck && ieOrEdge) {
|
|
|
5083 |
if (isEnableCrossContextCheck) {
|
|
|
5084 |
try {
|
|
|
5085 |
var testString = delegate.toString();
|
|
|
5086 |
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
|
|
|
5087 |
nativeDelegate.apply(target, args);
|
|
|
5088 |
return false;
|
|
|
5089 |
}
|
|
|
5090 |
}
|
|
|
5091 |
catch (error) {
|
|
|
5092 |
nativeDelegate.apply(target, args);
|
|
|
5093 |
return false;
|
|
|
5094 |
}
|
|
|
5095 |
}
|
|
|
5096 |
else {
|
|
|
5097 |
var testString = delegate.toString();
|
|
|
5098 |
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
|
|
|
5099 |
nativeDelegate.apply(target, args);
|
|
|
5100 |
return false;
|
|
|
5101 |
}
|
|
|
5102 |
}
|
|
|
5103 |
}
|
|
|
5104 |
else if (isEnableCrossContextCheck) {
|
|
|
5105 |
try {
|
|
|
5106 |
delegate.toString();
|
|
|
5107 |
}
|
|
|
5108 |
catch (error) {
|
|
|
5109 |
nativeDelegate.apply(target, args);
|
|
|
5110 |
return false;
|
|
|
5111 |
}
|
|
|
5112 |
}
|
|
|
5113 |
return true;
|
|
|
5114 |
};
|
|
|
5115 |
var apiTypes = [];
|
|
|
5116 |
for (var i = 0; i < apis.length; i++) {
|
|
|
5117 |
var type = _global[apis[i]];
|
|
|
5118 |
apiTypes.push(type && type.prototype);
|
|
|
5119 |
}
|
|
|
5120 |
// vh is validateHandler to check event handler
|
|
|
5121 |
// is valid or not(for security check)
|
|
|
5122 |
patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext });
|
|
|
5123 |
api.patchEventTarget = patchEventTarget;
|
|
|
5124 |
return true;
|
|
|
5125 |
}
|
|
|
5126 |
function patchEvent(global, api) {
|
|
|
5127 |
patchEventPrototype(global, api);
|
|
|
5128 |
}
|
|
|
5129 |
|
|
|
5130 |
/**
|
|
|
5131 |
* @license
|
|
|
5132 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
5133 |
*
|
|
|
5134 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
5135 |
* found in the LICENSE file at https://angular.io/license
|
|
|
5136 |
*/
|
|
|
5137 |
function registerElementPatch(_global) {
|
|
|
5138 |
if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
|
|
|
5139 |
return;
|
|
|
5140 |
}
|
|
|
5141 |
var _registerElement = document.registerElement;
|
|
|
5142 |
var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
|
|
|
5143 |
document.registerElement = function (name, opts) {
|
|
|
5144 |
if (opts && opts.prototype) {
|
|
|
5145 |
callbacks.forEach(function (callback) {
|
|
|
5146 |
var source = 'Document.registerElement::' + callback;
|
|
|
5147 |
var prototype = opts.prototype;
|
|
|
5148 |
if (prototype.hasOwnProperty(callback)) {
|
|
|
5149 |
var descriptor = ObjectGetOwnPropertyDescriptor(prototype, callback);
|
|
|
5150 |
if (descriptor && descriptor.value) {
|
|
|
5151 |
descriptor.value = wrapWithCurrentZone(descriptor.value, source);
|
|
|
5152 |
_redefineProperty(opts.prototype, callback, descriptor);
|
|
|
5153 |
}
|
|
|
5154 |
else {
|
|
|
5155 |
prototype[callback] = wrapWithCurrentZone(prototype[callback], source);
|
|
|
5156 |
}
|
|
|
5157 |
}
|
|
|
5158 |
else if (prototype[callback]) {
|
|
|
5159 |
prototype[callback] = wrapWithCurrentZone(prototype[callback], source);
|
|
|
5160 |
}
|
|
|
5161 |
});
|
|
|
5162 |
}
|
|
|
5163 |
return _registerElement.call(document, name, opts);
|
|
|
5164 |
};
|
|
|
5165 |
attachOriginToPatched(document.registerElement, _registerElement);
|
|
|
5166 |
}
|
|
|
5167 |
|
|
|
5168 |
/**
|
|
|
5169 |
* @license
|
|
|
5170 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
5171 |
*
|
|
|
5172 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
5173 |
* found in the LICENSE file at https://angular.io/license
|
|
|
5174 |
*/
|
|
|
5175 |
/**
|
|
|
5176 |
* @fileoverview
|
|
|
5177 |
* @suppress {missingRequire}
|
|
|
5178 |
*/
|
|
|
5179 |
Zone.__load_patch('util', function (global, Zone, api) {
|
|
|
5180 |
api.patchOnProperties = patchOnProperties;
|
|
|
5181 |
api.patchMethod = patchMethod;
|
|
|
5182 |
api.bindArguments = bindArguments;
|
|
|
5183 |
});
|
|
|
5184 |
Zone.__load_patch('timers', function (global) {
|
|
|
5185 |
var set = 'set';
|
|
|
5186 |
var clear = 'clear';
|
|
|
5187 |
patchTimer(global, set, clear, 'Timeout');
|
|
|
5188 |
patchTimer(global, set, clear, 'Interval');
|
|
|
5189 |
patchTimer(global, set, clear, 'Immediate');
|
|
|
5190 |
});
|
|
|
5191 |
Zone.__load_patch('requestAnimationFrame', function (global) {
|
|
|
5192 |
patchTimer(global, 'request', 'cancel', 'AnimationFrame');
|
|
|
5193 |
patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');
|
|
|
5194 |
patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');
|
|
|
5195 |
});
|
|
|
5196 |
Zone.__load_patch('blocking', function (global, Zone) {
|
|
|
5197 |
var blockingMethods = ['alert', 'prompt', 'confirm'];
|
|
|
5198 |
for (var i = 0; i < blockingMethods.length; i++) {
|
|
|
5199 |
var name_1 = blockingMethods[i];
|
|
|
5200 |
patchMethod(global, name_1, function (delegate, symbol, name) {
|
|
|
5201 |
return function (s, args) {
|
|
|
5202 |
return Zone.current.run(delegate, global, args, name);
|
|
|
5203 |
};
|
|
|
5204 |
});
|
|
|
5205 |
}
|
|
|
5206 |
});
|
|
|
5207 |
Zone.__load_patch('EventTarget', function (global, Zone, api) {
|
|
|
5208 |
// load blackListEvents from global
|
|
|
5209 |
var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');
|
|
|
5210 |
if (global[SYMBOL_BLACK_LISTED_EVENTS]) {
|
|
|
5211 |
Zone[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS];
|
|
|
5212 |
}
|
|
|
5213 |
patchEvent(global, api);
|
|
|
5214 |
eventTargetPatch(global, api);
|
|
|
5215 |
// patch XMLHttpRequestEventTarget's addEventListener/removeEventListener
|
|
|
5216 |
var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];
|
|
|
5217 |
if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {
|
|
|
5218 |
api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);
|
|
|
5219 |
}
|
|
|
5220 |
patchClass('MutationObserver');
|
|
|
5221 |
patchClass('WebKitMutationObserver');
|
|
|
5222 |
patchClass('IntersectionObserver');
|
|
|
5223 |
patchClass('FileReader');
|
|
|
5224 |
});
|
|
|
5225 |
Zone.__load_patch('on_property', function (global, Zone, api) {
|
|
|
5226 |
propertyDescriptorPatch(api, global);
|
|
|
5227 |
propertyPatch();
|
|
|
5228 |
registerElementPatch(global);
|
|
|
5229 |
});
|
|
|
5230 |
Zone.__load_patch('canvas', function (global) {
|
|
|
5231 |
var HTMLCanvasElement = global['HTMLCanvasElement'];
|
|
|
5232 |
if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
|
|
|
5233 |
HTMLCanvasElement.prototype.toBlob) {
|
|
|
5234 |
patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
|
|
|
5235 |
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
|
|
|
5236 |
});
|
|
|
5237 |
}
|
|
|
5238 |
});
|
|
|
5239 |
Zone.__load_patch('XHR', function (global, Zone) {
|
|
|
5240 |
// Treat XMLHttpRequest as a macrotask.
|
|
|
5241 |
patchXHR(global);
|
|
|
5242 |
var XHR_TASK = zoneSymbol('xhrTask');
|
|
|
5243 |
var XHR_SYNC = zoneSymbol('xhrSync');
|
|
|
5244 |
var XHR_LISTENER = zoneSymbol('xhrListener');
|
|
|
5245 |
var XHR_SCHEDULED = zoneSymbol('xhrScheduled');
|
|
|
5246 |
var XHR_URL = zoneSymbol('xhrURL');
|
|
|
5247 |
function patchXHR(window) {
|
|
|
5248 |
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
|
|
|
5249 |
function findPendingTask(target) {
|
|
|
5250 |
return target[XHR_TASK];
|
|
|
5251 |
}
|
|
|
5252 |
var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
|
5253 |
var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
|
5254 |
if (!oriAddListener) {
|
|
|
5255 |
var XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];
|
|
|
5256 |
if (XMLHttpRequestEventTarget) {
|
|
|
5257 |
var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;
|
|
|
5258 |
oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
|
5259 |
oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
|
5260 |
}
|
|
|
5261 |
}
|
|
|
5262 |
var READY_STATE_CHANGE = 'readystatechange';
|
|
|
5263 |
var SCHEDULED = 'scheduled';
|
|
|
5264 |
function scheduleTask(task) {
|
|
|
5265 |
XMLHttpRequest[XHR_SCHEDULED] = false;
|
|
|
5266 |
var data = task.data;
|
|
|
5267 |
var target = data.target;
|
|
|
5268 |
// remove existing event listener
|
|
|
5269 |
var listener = target[XHR_LISTENER];
|
|
|
5270 |
if (!oriAddListener) {
|
|
|
5271 |
oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
|
|
|
5272 |
oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
|
|
|
5273 |
}
|
|
|
5274 |
if (listener) {
|
|
|
5275 |
oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
|
|
|
5276 |
}
|
|
|
5277 |
var newListener = target[XHR_LISTENER] = function () {
|
|
|
5278 |
if (target.readyState === target.DONE) {
|
|
|
5279 |
// sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
|
|
|
5280 |
// readyState=4 multiple times, so we need to check task state here
|
|
|
5281 |
if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === SCHEDULED) {
|
|
|
5282 |
task.invoke();
|
|
|
5283 |
}
|
|
|
5284 |
}
|
|
|
5285 |
};
|
|
|
5286 |
oriAddListener.call(target, READY_STATE_CHANGE, newListener);
|
|
|
5287 |
var storedTask = target[XHR_TASK];
|
|
|
5288 |
if (!storedTask) {
|
|
|
5289 |
target[XHR_TASK] = task;
|
|
|
5290 |
}
|
|
|
5291 |
sendNative.apply(target, data.args);
|
|
|
5292 |
XMLHttpRequest[XHR_SCHEDULED] = true;
|
|
|
5293 |
return task;
|
|
|
5294 |
}
|
|
|
5295 |
function placeholderCallback() { }
|
|
|
5296 |
function clearTask(task) {
|
|
|
5297 |
var data = task.data;
|
|
|
5298 |
// Note - ideally, we would call data.target.removeEventListener here, but it's too late
|
|
|
5299 |
// to prevent it from firing. So instead, we store info for the event listener.
|
|
|
5300 |
data.aborted = true;
|
|
|
5301 |
return abortNative.apply(data.target, data.args);
|
|
|
5302 |
}
|
|
|
5303 |
var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) {
|
|
|
5304 |
self[XHR_SYNC] = args[2] == false;
|
|
|
5305 |
self[XHR_URL] = args[1];
|
|
|
5306 |
return openNative.apply(self, args);
|
|
|
5307 |
}; });
|
|
|
5308 |
var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';
|
|
|
5309 |
var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) {
|
|
|
5310 |
if (self[XHR_SYNC]) {
|
|
|
5311 |
// if the XHR is sync there is no task to schedule, just execute the code.
|
|
|
5312 |
return sendNative.apply(self, args);
|
|
|
5313 |
}
|
|
|
5314 |
else {
|
|
|
5315 |
var options = {
|
|
|
5316 |
target: self,
|
|
|
5317 |
url: self[XHR_URL],
|
|
|
5318 |
isPeriodic: false,
|
|
|
5319 |
delay: null,
|
|
|
5320 |
args: args,
|
|
|
5321 |
aborted: false
|
|
|
5322 |
};
|
|
|
5323 |
return scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);
|
|
|
5324 |
}
|
|
|
5325 |
}; });
|
|
|
5326 |
var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self) {
|
|
|
5327 |
var task = findPendingTask(self);
|
|
|
5328 |
if (task && typeof task.type == 'string') {
|
|
|
5329 |
// If the XHR has already completed, do nothing.
|
|
|
5330 |
// If the XHR has already been aborted, do nothing.
|
|
|
5331 |
// Fix #569, call abort multiple times before done will cause
|
|
|
5332 |
// macroTask task count be negative number
|
|
|
5333 |
if (task.cancelFn == null || (task.data && task.data.aborted)) {
|
|
|
5334 |
return;
|
|
|
5335 |
}
|
|
|
5336 |
task.zone.cancelTask(task);
|
|
|
5337 |
}
|
|
|
5338 |
// Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
|
|
|
5339 |
// task
|
|
|
5340 |
// to cancel. Do nothing.
|
|
|
5341 |
}; });
|
|
|
5342 |
}
|
|
|
5343 |
});
|
|
|
5344 |
Zone.__load_patch('geolocation', function (global) {
|
|
|
5345 |
/// GEO_LOCATION
|
|
|
5346 |
if (global['navigator'] && global['navigator'].geolocation) {
|
|
|
5347 |
patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);
|
|
|
5348 |
}
|
|
|
5349 |
});
|
|
|
5350 |
Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) {
|
|
|
5351 |
// handle unhandled promise rejection
|
|
|
5352 |
function findPromiseRejectionHandler(evtName) {
|
|
|
5353 |
return function (e) {
|
|
|
5354 |
var eventTasks = findEventTasks(global, evtName);
|
|
|
5355 |
eventTasks.forEach(function (eventTask) {
|
|
|
5356 |
// windows has added unhandledrejection event listener
|
|
|
5357 |
// trigger the event listener
|
|
|
5358 |
var PromiseRejectionEvent = global['PromiseRejectionEvent'];
|
|
|
5359 |
if (PromiseRejectionEvent) {
|
|
|
5360 |
var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });
|
|
|
5361 |
eventTask.invoke(evt);
|
|
|
5362 |
}
|
|
|
5363 |
});
|
|
|
5364 |
};
|
|
|
5365 |
}
|
|
|
5366 |
if (global['PromiseRejectionEvent']) {
|
|
|
5367 |
Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =
|
|
|
5368 |
findPromiseRejectionHandler('unhandledrejection');
|
|
|
5369 |
Zone[zoneSymbol('rejectionHandledHandler')] =
|
|
|
5370 |
findPromiseRejectionHandler('rejectionhandled');
|
|
|
5371 |
}
|
|
|
5372 |
});
|
|
|
5373 |
|
|
|
5374 |
/**
|
|
|
5375 |
* @license
|
|
|
5376 |
* Copyright Google Inc. All Rights Reserved.
|
|
|
5377 |
*
|
|
|
5378 |
* Use of this source code is governed by an MIT-style license that can be
|
|
|
5379 |
* found in the LICENSE file at https://angular.io/license
|
|
|
5380 |
*/
|
|
|
5381 |
|
|
|
5382 |
})));
|
|
|
5383 |
|
|
|
5384 |
|
|
|
5385 |
/***/ }),
|
|
|
5386 |
|
|
|
5387 |
/***/ "./src/polyfills.ts":
|
|
|
5388 |
/*!**************************!*\
|
|
|
5389 |
!*** ./src/polyfills.ts ***!
|
|
|
5390 |
\**************************/
|
|
|
5391 |
/*! no exports provided */
|
|
|
5392 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
5393 |
|
|
|
5394 |
"use strict";
|
|
|
5395 |
__webpack_require__.r(__webpack_exports__);
|
|
|
5396 |
/* harmony import */ var core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/es7/reflect */ "./node_modules/core-js/es7/reflect.js");
|
|
|
5397 |
/* harmony import */ var core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
5398 |
/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zone.js/dist/zone */ "./node_modules/zone.js/dist/zone.js");
|
|
|
5399 |
/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
5400 |
/**
|
|
|
5401 |
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
|
5402 |
* You can add your own extra polyfills to this file.
|
|
|
5403 |
*
|
|
|
5404 |
* This file is divided into 2 sections:
|
|
|
5405 |
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
|
5406 |
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
|
5407 |
* file.
|
|
|
5408 |
*
|
|
|
5409 |
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
|
5410 |
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
|
5411 |
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
|
5412 |
*
|
|
|
5413 |
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
|
5414 |
*/
|
|
|
5415 |
/***************************************************************************************************
|
|
|
5416 |
* BROWSER POLYFILLS
|
|
|
5417 |
*/
|
|
|
5418 |
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
|
5419 |
// import 'core-js/es6/symbol';
|
|
|
5420 |
// import 'core-js/es6/object';
|
|
|
5421 |
// import 'core-js/es6/function';
|
|
|
5422 |
// import 'core-js/es6/parse-int';
|
|
|
5423 |
// import 'core-js/es6/parse-float';
|
|
|
5424 |
// import 'core-js/es6/number';
|
|
|
5425 |
// import 'core-js/es6/math';
|
|
|
5426 |
// import 'core-js/es6/string';
|
|
|
5427 |
// import 'core-js/es6/date';
|
|
|
5428 |
// import 'core-js/es6/array';
|
|
|
5429 |
// import 'core-js/es6/regexp';
|
|
|
5430 |
// import 'core-js/es6/map';
|
|
|
5431 |
// import 'core-js/es6/weak-map';
|
|
|
5432 |
// import 'core-js/es6/set';
|
|
|
5433 |
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
|
5434 |
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
|
5435 |
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
|
5436 |
// import 'core-js/es6/reflect';
|
|
|
5437 |
/** Evergreen browsers require these. **/
|
|
|
5438 |
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
|
|
5439 |
|
|
|
5440 |
/**
|
|
|
5441 |
* Web Animations `@angular/platform-browser/animations`
|
|
|
5442 |
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
|
5443 |
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
|
5444 |
**/
|
|
|
5445 |
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
|
5446 |
/**
|
|
|
5447 |
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
|
5448 |
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
|
5449 |
*/
|
|
|
5450 |
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
|
5451 |
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
|
5452 |
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
|
5453 |
/*
|
|
|
5454 |
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
|
5455 |
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
|
5456 |
*/
|
|
|
5457 |
// (window as any).__Zone_enable_cross_context_check = true;
|
|
|
5458 |
/***************************************************************************************************
|
|
|
5459 |
* Zone JS is required by default for Angular itself.
|
|
|
5460 |
*/
|
|
|
5461 |
// Included with Angular CLI.
|
|
|
5462 |
/***************************************************************************************************
|
|
|
5463 |
* APPLICATION IMPORTS
|
|
|
5464 |
*/
|
|
|
5465 |
|
|
|
5466 |
|
|
|
5467 |
/***/ }),
|
|
|
5468 |
|
|
|
5469 |
/***/ 1:
|
|
|
5470 |
/*!********************************!*\
|
|
|
5471 |
!*** multi ./src/polyfills.ts ***!
|
|
|
5472 |
\********************************/
|
|
|
5473 |
/*! no static exports found */
|
|
|
5474 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
5475 |
|
|
|
5476 |
module.exports = __webpack_require__(/*! /home/stephane/dev/tb-geoloc-lib/src/polyfills.ts */"./src/polyfills.ts");
|
|
|
5477 |
|
|
|
5478 |
|
|
|
5479 |
/***/ })
|
|
|
5480 |
|
|
|
5481 |
},[[1,"runtime"]]]);
|
|
|
5482 |
//# sourceMappingURL=polyfills.js.map
|