Anonymous 3D Imageboard http://cyberia.digital/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5781 lines
235KB

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