Aucune description

polyfills-dom.js 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. (self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["polyfills-dom"],{
  2. /***/ 3314:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@ionic/core/dist/esm/polyfills/dom.js ***!
  5. \************************************************************/
  6. /***/ (() => {
  7. (function () {
  8. /*
  9. Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
  10. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  11. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  12. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  13. Code distributed by Google as part of the polymer project is also
  14. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  15. */
  16. 'use strict';
  17. var aa = new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));
  18. function g(a) {
  19. var b = aa.has(a);
  20. a = /^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);
  21. return !b && a;
  22. }
  23. function l(a) {
  24. var b = a.isConnected;
  25. if (void 0 !== b) return b;
  26. for (; a && !(a.__CE_isImportDocument || a instanceof Document);) a = a.parentNode || (window.ShadowRoot && a instanceof ShadowRoot ? a.host : void 0);
  27. return !(!a || !(a.__CE_isImportDocument || a instanceof Document));
  28. }
  29. function n(a, b) {
  30. for (; b && b !== a && !b.nextSibling;) b = b.parentNode;
  31. return b && b !== a ? b.nextSibling : null;
  32. }
  33. function p(a, b, d) {
  34. d = void 0 === d ? new Set() : d;
  35. for (var c = a; c;) {
  36. if (c.nodeType === Node.ELEMENT_NODE) {
  37. var e = c;
  38. b(e);
  39. var f = e.localName;
  40. if ("link" === f && "import" === e.getAttribute("rel")) {
  41. c = e.import;
  42. if (c instanceof Node && !d.has(c)) for (d.add(c), c = c.firstChild; c; c = c.nextSibling) p(c, b, d);
  43. c = n(a, e);
  44. continue;
  45. } else if ("template" === f) {
  46. c = n(a, e);
  47. continue;
  48. }
  49. if (e = e.__CE_shadowRoot) for (e = e.firstChild; e; e = e.nextSibling) p(e, b, d);
  50. }
  51. c = c.firstChild ? c.firstChild : n(a, c);
  52. }
  53. }
  54. function r(a, b, d) {
  55. a[b] = d;
  56. }
  57. ;
  58. function u() {
  59. this.a = new Map();
  60. this.g = new Map();
  61. this.c = [];
  62. this.f = [];
  63. this.b = !1;
  64. }
  65. function ba(a, b, d) {
  66. a.a.set(b, d);
  67. a.g.set(d.constructorFunction, d);
  68. }
  69. function ca(a, b) {
  70. a.b = !0;
  71. a.c.push(b);
  72. }
  73. function da(a, b) {
  74. a.b = !0;
  75. a.f.push(b);
  76. }
  77. function v(a, b) {
  78. a.b && p(b, function (b) {
  79. return w(a, b);
  80. });
  81. }
  82. function w(a, b) {
  83. if (a.b && !b.__CE_patched) {
  84. b.__CE_patched = !0;
  85. for (var d = 0; d < a.c.length; d++) a.c[d](b);
  86. for (d = 0; d < a.f.length; d++) a.f[d](b);
  87. }
  88. }
  89. function x(a, b) {
  90. var d = [];
  91. p(b, function (b) {
  92. return d.push(b);
  93. });
  94. for (b = 0; b < d.length; b++) {
  95. var c = d[b];
  96. 1 === c.__CE_state ? a.connectedCallback(c) : y(a, c);
  97. }
  98. }
  99. function z(a, b) {
  100. var d = [];
  101. p(b, function (b) {
  102. return d.push(b);
  103. });
  104. for (b = 0; b < d.length; b++) {
  105. var c = d[b];
  106. 1 === c.__CE_state && a.disconnectedCallback(c);
  107. }
  108. }
  109. function A(a, b, d) {
  110. d = void 0 === d ? {} : d;
  111. var c = d.u || new Set(),
  112. e = d.i || function (b) {
  113. return y(a, b);
  114. },
  115. f = [];
  116. p(b, function (b) {
  117. if ("link" === b.localName && "import" === b.getAttribute("rel")) {
  118. var d = b.import;
  119. d instanceof Node && (d.__CE_isImportDocument = !0, d.__CE_hasRegistry = !0);
  120. d && "complete" === d.readyState ? d.__CE_documentLoadHandled = !0 : b.addEventListener("load", function () {
  121. var d = b.import;
  122. if (!d.__CE_documentLoadHandled) {
  123. d.__CE_documentLoadHandled = !0;
  124. var f = new Set(c);
  125. f.delete(d);
  126. A(a, d, {
  127. u: f,
  128. i: e
  129. });
  130. }
  131. });
  132. } else f.push(b);
  133. }, c);
  134. if (a.b) for (b = 0; b < f.length; b++) w(a, f[b]);
  135. for (b = 0; b < f.length; b++) e(f[b]);
  136. }
  137. function y(a, b) {
  138. if (void 0 === b.__CE_state) {
  139. var d = b.ownerDocument;
  140. if (d.defaultView || d.__CE_isImportDocument && d.__CE_hasRegistry) if (d = a.a.get(b.localName)) {
  141. d.constructionStack.push(b);
  142. var c = d.constructorFunction;
  143. try {
  144. try {
  145. if (new c() !== b) throw Error("The custom element constructor did not produce the element being upgraded.");
  146. } finally {
  147. d.constructionStack.pop();
  148. }
  149. } catch (t) {
  150. throw b.__CE_state = 2, t;
  151. }
  152. b.__CE_state = 1;
  153. b.__CE_definition = d;
  154. if (d.attributeChangedCallback) for (d = d.observedAttributes, c = 0; c < d.length; c++) {
  155. var e = d[c],
  156. f = b.getAttribute(e);
  157. null !== f && a.attributeChangedCallback(b, e, null, f, null);
  158. }
  159. l(b) && a.connectedCallback(b);
  160. }
  161. }
  162. }
  163. u.prototype.connectedCallback = function (a) {
  164. var b = a.__CE_definition;
  165. b.connectedCallback && b.connectedCallback.call(a);
  166. };
  167. u.prototype.disconnectedCallback = function (a) {
  168. var b = a.__CE_definition;
  169. b.disconnectedCallback && b.disconnectedCallback.call(a);
  170. };
  171. u.prototype.attributeChangedCallback = function (a, b, d, c, e) {
  172. var f = a.__CE_definition;
  173. f.attributeChangedCallback && -1 < f.observedAttributes.indexOf(b) && f.attributeChangedCallback.call(a, b, d, c, e);
  174. };
  175. function B(a) {
  176. var b = document;
  177. this.c = a;
  178. this.a = b;
  179. this.b = void 0;
  180. A(this.c, this.a);
  181. "loading" === this.a.readyState && (this.b = new MutationObserver(this.f.bind(this)), this.b.observe(this.a, {
  182. childList: !0,
  183. subtree: !0
  184. }));
  185. }
  186. function C(a) {
  187. a.b && a.b.disconnect();
  188. }
  189. B.prototype.f = function (a) {
  190. var b = this.a.readyState;
  191. "interactive" !== b && "complete" !== b || C(this);
  192. for (b = 0; b < a.length; b++) for (var d = a[b].addedNodes, c = 0; c < d.length; c++) A(this.c, d[c]);
  193. };
  194. function ea() {
  195. var a = this;
  196. this.b = this.a = void 0;
  197. this.c = new Promise(function (b) {
  198. a.b = b;
  199. a.a && b(a.a);
  200. });
  201. }
  202. function D(a) {
  203. if (a.a) throw Error("Already resolved.");
  204. a.a = void 0;
  205. a.b && a.b(void 0);
  206. }
  207. ;
  208. function E(a) {
  209. this.c = !1;
  210. this.a = a;
  211. this.j = new Map();
  212. this.f = function (b) {
  213. return b();
  214. };
  215. this.b = !1;
  216. this.g = [];
  217. this.o = new B(a);
  218. }
  219. E.prototype.l = function (a, b) {
  220. var d = this;
  221. if (!(b instanceof Function)) throw new TypeError("Custom element constructors must be functions.");
  222. if (!g(a)) throw new SyntaxError("The element name '" + a + "' is not valid.");
  223. if (this.a.a.get(a)) throw Error("A custom element with name '" + a + "' has already been defined.");
  224. if (this.c) throw Error("A custom element is already being defined.");
  225. this.c = !0;
  226. try {
  227. var c = function (b) {
  228. var a = e[b];
  229. if (void 0 !== a && !(a instanceof Function)) throw Error("The '" + b + "' callback must be a function.");
  230. return a;
  231. },
  232. e = b.prototype;
  233. if (!(e instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object.");
  234. var f = c("connectedCallback");
  235. var t = c("disconnectedCallback");
  236. var k = c("adoptedCallback");
  237. var h = c("attributeChangedCallback");
  238. var m = b.observedAttributes || [];
  239. } catch (q) {
  240. return;
  241. } finally {
  242. this.c = !1;
  243. }
  244. b = {
  245. localName: a,
  246. constructorFunction: b,
  247. connectedCallback: f,
  248. disconnectedCallback: t,
  249. adoptedCallback: k,
  250. attributeChangedCallback: h,
  251. observedAttributes: m,
  252. constructionStack: []
  253. };
  254. ba(this.a, a, b);
  255. this.g.push(b);
  256. this.b || (this.b = !0, this.f(function () {
  257. return fa(d);
  258. }));
  259. };
  260. E.prototype.i = function (a) {
  261. A(this.a, a);
  262. };
  263. function fa(a) {
  264. if (!1 !== a.b) {
  265. a.b = !1;
  266. for (var b = a.g, d = [], c = new Map(), e = 0; e < b.length; e++) c.set(b[e].localName, []);
  267. A(a.a, document, {
  268. i: function (b) {
  269. if (void 0 === b.__CE_state) {
  270. var e = b.localName,
  271. f = c.get(e);
  272. f ? f.push(b) : a.a.a.get(e) && d.push(b);
  273. }
  274. }
  275. });
  276. for (e = 0; e < d.length; e++) y(a.a, d[e]);
  277. for (; 0 < b.length;) {
  278. var f = b.shift();
  279. e = f.localName;
  280. f = c.get(f.localName);
  281. for (var t = 0; t < f.length; t++) y(a.a, f[t]);
  282. (e = a.j.get(e)) && D(e);
  283. }
  284. }
  285. }
  286. E.prototype.get = function (a) {
  287. if (a = this.a.a.get(a)) return a.constructorFunction;
  288. };
  289. E.prototype.m = function (a) {
  290. if (!g(a)) return Promise.reject(new SyntaxError("'" + a + "' is not a valid custom element name."));
  291. var b = this.j.get(a);
  292. if (b) return b.c;
  293. b = new ea();
  294. this.j.set(a, b);
  295. this.a.a.get(a) && !this.g.some(function (b) {
  296. return b.localName === a;
  297. }) && D(b);
  298. return b.c;
  299. };
  300. E.prototype.s = function (a) {
  301. C(this.o);
  302. var b = this.f;
  303. this.f = function (d) {
  304. return a(function () {
  305. return b(d);
  306. });
  307. };
  308. };
  309. window.CustomElementRegistry = E;
  310. E.prototype.define = E.prototype.l;
  311. E.prototype.upgrade = E.prototype.i;
  312. E.prototype.get = E.prototype.get;
  313. E.prototype.whenDefined = E.prototype.m;
  314. E.prototype.polyfillWrapFlushCallback = E.prototype.s;
  315. var F = window.Document.prototype.createElement,
  316. G = window.Document.prototype.createElementNS,
  317. ha = window.Document.prototype.importNode,
  318. ia = window.Document.prototype.prepend,
  319. ja = window.Document.prototype.append,
  320. ka = window.DocumentFragment.prototype.prepend,
  321. la = window.DocumentFragment.prototype.append,
  322. H = window.Node.prototype.cloneNode,
  323. I = window.Node.prototype.appendChild,
  324. J = window.Node.prototype.insertBefore,
  325. K = window.Node.prototype.removeChild,
  326. L = window.Node.prototype.replaceChild,
  327. M = Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"),
  328. N = window.Element.prototype.attachShadow,
  329. O = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"),
  330. P = window.Element.prototype.getAttribute,
  331. Q = window.Element.prototype.setAttribute,
  332. R = window.Element.prototype.removeAttribute,
  333. S = window.Element.prototype.getAttributeNS,
  334. T = window.Element.prototype.setAttributeNS,
  335. U = window.Element.prototype.removeAttributeNS,
  336. ma = window.Element.prototype.insertAdjacentElement,
  337. na = window.Element.prototype.insertAdjacentHTML,
  338. oa = window.Element.prototype.prepend,
  339. pa = window.Element.prototype.append,
  340. V = window.Element.prototype.before,
  341. qa = window.Element.prototype.after,
  342. ra = window.Element.prototype.replaceWith,
  343. sa = window.Element.prototype.remove,
  344. ta = window.HTMLElement,
  345. W = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"),
  346. ua = window.HTMLElement.prototype.insertAdjacentElement,
  347. va = window.HTMLElement.prototype.insertAdjacentHTML;
  348. var wa = new function () {}();
  349. function xa() {
  350. var a = X;
  351. window.HTMLElement = function () {
  352. function b() {
  353. var b = this.constructor,
  354. c = a.g.get(b);
  355. if (!c) throw Error("The custom element being constructed was not registered with `customElements`.");
  356. var e = c.constructionStack;
  357. if (0 === e.length) return e = F.call(document, c.localName), Object.setPrototypeOf(e, b.prototype), e.__CE_state = 1, e.__CE_definition = c, w(a, e), e;
  358. c = e.length - 1;
  359. var f = e[c];
  360. if (f === wa) throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
  361. e[c] = wa;
  362. Object.setPrototypeOf(f, b.prototype);
  363. w(a, f);
  364. return f;
  365. }
  366. b.prototype = ta.prototype;
  367. Object.defineProperty(b.prototype, "constructor", {
  368. writable: !0,
  369. configurable: !0,
  370. enumerable: !1,
  371. value: b
  372. });
  373. return b;
  374. }();
  375. }
  376. ;
  377. function Y(a, b, d) {
  378. function c(b) {
  379. return function (d) {
  380. for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c];
  381. c = [];
  382. for (var f = [], m = 0; m < e.length; m++) {
  383. var q = e[m];
  384. q instanceof Element && l(q) && f.push(q);
  385. if (q instanceof DocumentFragment) for (q = q.firstChild; q; q = q.nextSibling) c.push(q);else c.push(q);
  386. }
  387. b.apply(this, e);
  388. for (e = 0; e < f.length; e++) z(a, f[e]);
  389. if (l(this)) for (e = 0; e < c.length; e++) f = c[e], f instanceof Element && x(a, f);
  390. };
  391. }
  392. void 0 !== d.h && (b.prepend = c(d.h));
  393. void 0 !== d.append && (b.append = c(d.append));
  394. }
  395. ;
  396. function ya() {
  397. var a = X;
  398. r(Document.prototype, "createElement", function (b) {
  399. if (this.__CE_hasRegistry) {
  400. var d = a.a.get(b);
  401. if (d) return new d.constructorFunction();
  402. }
  403. b = F.call(this, b);
  404. w(a, b);
  405. return b;
  406. });
  407. r(Document.prototype, "importNode", function (b, d) {
  408. b = ha.call(this, b, !!d);
  409. this.__CE_hasRegistry ? A(a, b) : v(a, b);
  410. return b;
  411. });
  412. r(Document.prototype, "createElementNS", function (b, d) {
  413. if (this.__CE_hasRegistry && (null === b || "http://www.w3.org/1999/xhtml" === b)) {
  414. var c = a.a.get(d);
  415. if (c) return new c.constructorFunction();
  416. }
  417. b = G.call(this, b, d);
  418. w(a, b);
  419. return b;
  420. });
  421. Y(a, Document.prototype, {
  422. h: ia,
  423. append: ja
  424. });
  425. }
  426. ;
  427. function za() {
  428. function a(a, c) {
  429. Object.defineProperty(a, "textContent", {
  430. enumerable: c.enumerable,
  431. configurable: !0,
  432. get: c.get,
  433. set: function (a) {
  434. if (this.nodeType === Node.TEXT_NODE) c.set.call(this, a);else {
  435. var d = void 0;
  436. if (this.firstChild) {
  437. var e = this.childNodes,
  438. k = e.length;
  439. if (0 < k && l(this)) {
  440. d = Array(k);
  441. for (var h = 0; h < k; h++) d[h] = e[h];
  442. }
  443. }
  444. c.set.call(this, a);
  445. if (d) for (a = 0; a < d.length; a++) z(b, d[a]);
  446. }
  447. }
  448. });
  449. }
  450. var b = X;
  451. r(Node.prototype, "insertBefore", function (a, c) {
  452. if (a instanceof DocumentFragment) {
  453. var e = Array.prototype.slice.apply(a.childNodes);
  454. a = J.call(this, a, c);
  455. if (l(this)) for (c = 0; c < e.length; c++) x(b, e[c]);
  456. return a;
  457. }
  458. e = l(a);
  459. c = J.call(this, a, c);
  460. e && z(b, a);
  461. l(this) && x(b, a);
  462. return c;
  463. });
  464. r(Node.prototype, "appendChild", function (a) {
  465. if (a instanceof DocumentFragment) {
  466. var c = Array.prototype.slice.apply(a.childNodes);
  467. a = I.call(this, a);
  468. if (l(this)) for (var e = 0; e < c.length; e++) x(b, c[e]);
  469. return a;
  470. }
  471. c = l(a);
  472. e = I.call(this, a);
  473. c && z(b, a);
  474. l(this) && x(b, a);
  475. return e;
  476. });
  477. r(Node.prototype, "cloneNode", function (a) {
  478. a = H.call(this, !!a);
  479. this.ownerDocument.__CE_hasRegistry ? A(b, a) : v(b, a);
  480. return a;
  481. });
  482. r(Node.prototype, "removeChild", function (a) {
  483. var c = l(a),
  484. e = K.call(this, a);
  485. c && z(b, a);
  486. return e;
  487. });
  488. r(Node.prototype, "replaceChild", function (a, c) {
  489. if (a instanceof DocumentFragment) {
  490. var e = Array.prototype.slice.apply(a.childNodes);
  491. a = L.call(this, a, c);
  492. if (l(this)) for (z(b, c), c = 0; c < e.length; c++) x(b, e[c]);
  493. return a;
  494. }
  495. e = l(a);
  496. var f = L.call(this, a, c),
  497. d = l(this);
  498. d && z(b, c);
  499. e && z(b, a);
  500. d && x(b, a);
  501. return f;
  502. });
  503. M && M.get ? a(Node.prototype, M) : ca(b, function (b) {
  504. a(b, {
  505. enumerable: !0,
  506. configurable: !0,
  507. get: function () {
  508. for (var a = [], b = 0; b < this.childNodes.length; b++) {
  509. var f = this.childNodes[b];
  510. f.nodeType !== Node.COMMENT_NODE && a.push(f.textContent);
  511. }
  512. return a.join("");
  513. },
  514. set: function (a) {
  515. for (; this.firstChild;) K.call(this, this.firstChild);
  516. null != a && "" !== a && I.call(this, document.createTextNode(a));
  517. }
  518. });
  519. });
  520. }
  521. ;
  522. function Aa(a) {
  523. function b(b) {
  524. return function (e) {
  525. for (var c = [], d = 0; d < arguments.length; ++d) c[d] = arguments[d];
  526. d = [];
  527. for (var k = [], h = 0; h < c.length; h++) {
  528. var m = c[h];
  529. m instanceof Element && l(m) && k.push(m);
  530. if (m instanceof DocumentFragment) for (m = m.firstChild; m; m = m.nextSibling) d.push(m);else d.push(m);
  531. }
  532. b.apply(this, c);
  533. for (c = 0; c < k.length; c++) z(a, k[c]);
  534. if (l(this)) for (c = 0; c < d.length; c++) k = d[c], k instanceof Element && x(a, k);
  535. };
  536. }
  537. var d = Element.prototype;
  538. void 0 !== V && (d.before = b(V));
  539. void 0 !== V && (d.after = b(qa));
  540. void 0 !== ra && r(d, "replaceWith", function (b) {
  541. for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c];
  542. c = [];
  543. for (var d = [], k = 0; k < e.length; k++) {
  544. var h = e[k];
  545. h instanceof Element && l(h) && d.push(h);
  546. if (h instanceof DocumentFragment) for (h = h.firstChild; h; h = h.nextSibling) c.push(h);else c.push(h);
  547. }
  548. k = l(this);
  549. ra.apply(this, e);
  550. for (e = 0; e < d.length; e++) z(a, d[e]);
  551. if (k) for (z(a, this), e = 0; e < c.length; e++) d = c[e], d instanceof Element && x(a, d);
  552. });
  553. void 0 !== sa && r(d, "remove", function () {
  554. var b = l(this);
  555. sa.call(this);
  556. b && z(a, this);
  557. });
  558. }
  559. ;
  560. function Ba() {
  561. function a(a, b) {
  562. Object.defineProperty(a, "innerHTML", {
  563. enumerable: b.enumerable,
  564. configurable: !0,
  565. get: b.get,
  566. set: function (a) {
  567. var e = this,
  568. d = void 0;
  569. l(this) && (d = [], p(this, function (a) {
  570. a !== e && d.push(a);
  571. }));
  572. b.set.call(this, a);
  573. if (d) for (var f = 0; f < d.length; f++) {
  574. var t = d[f];
  575. 1 === t.__CE_state && c.disconnectedCallback(t);
  576. }
  577. this.ownerDocument.__CE_hasRegistry ? A(c, this) : v(c, this);
  578. return a;
  579. }
  580. });
  581. }
  582. function b(a, b) {
  583. r(a, "insertAdjacentElement", function (a, e) {
  584. var d = l(e);
  585. a = b.call(this, a, e);
  586. d && z(c, e);
  587. l(a) && x(c, e);
  588. return a;
  589. });
  590. }
  591. function d(a, b) {
  592. function e(a, b) {
  593. for (var e = []; a !== b; a = a.nextSibling) e.push(a);
  594. for (b = 0; b < e.length; b++) A(c, e[b]);
  595. }
  596. r(a, "insertAdjacentHTML", function (a, c) {
  597. a = a.toLowerCase();
  598. if ("beforebegin" === a) {
  599. var d = this.previousSibling;
  600. b.call(this, a, c);
  601. e(d || this.parentNode.firstChild, this);
  602. } else if ("afterbegin" === a) d = this.firstChild, b.call(this, a, c), e(this.firstChild, d);else if ("beforeend" === a) d = this.lastChild, b.call(this, a, c), e(d || this.firstChild, null);else if ("afterend" === a) d = this.nextSibling, b.call(this, a, c), e(this.nextSibling, d);else throw new SyntaxError("The value provided (" + String(a) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");
  603. });
  604. }
  605. var c = X;
  606. N && r(Element.prototype, "attachShadow", function (a) {
  607. a = N.call(this, a);
  608. var b = c;
  609. if (b.b && !a.__CE_patched) {
  610. a.__CE_patched = !0;
  611. for (var e = 0; e < b.c.length; e++) b.c[e](a);
  612. }
  613. return this.__CE_shadowRoot = a;
  614. });
  615. O && O.get ? a(Element.prototype, O) : W && W.get ? a(HTMLElement.prototype, W) : da(c, function (b) {
  616. a(b, {
  617. enumerable: !0,
  618. configurable: !0,
  619. get: function () {
  620. return H.call(this, !0).innerHTML;
  621. },
  622. set: function (a) {
  623. var b = "template" === this.localName,
  624. c = b ? this.content : this,
  625. e = G.call(document, this.namespaceURI, this.localName);
  626. for (e.innerHTML = a; 0 < c.childNodes.length;) K.call(c, c.childNodes[0]);
  627. for (a = b ? e.content : e; 0 < a.childNodes.length;) I.call(c, a.childNodes[0]);
  628. }
  629. });
  630. });
  631. r(Element.prototype, "setAttribute", function (a, b) {
  632. if (1 !== this.__CE_state) return Q.call(this, a, b);
  633. var e = P.call(this, a);
  634. Q.call(this, a, b);
  635. b = P.call(this, a);
  636. c.attributeChangedCallback(this, a, e, b, null);
  637. });
  638. r(Element.prototype, "setAttributeNS", function (a, b, d) {
  639. if (1 !== this.__CE_state) return T.call(this, a, b, d);
  640. var e = S.call(this, a, b);
  641. T.call(this, a, b, d);
  642. d = S.call(this, a, b);
  643. c.attributeChangedCallback(this, b, e, d, a);
  644. });
  645. r(Element.prototype, "removeAttribute", function (a) {
  646. if (1 !== this.__CE_state) return R.call(this, a);
  647. var b = P.call(this, a);
  648. R.call(this, a);
  649. null !== b && c.attributeChangedCallback(this, a, b, null, null);
  650. });
  651. r(Element.prototype, "removeAttributeNS", function (a, b) {
  652. if (1 !== this.__CE_state) return U.call(this, a, b);
  653. var d = S.call(this, a, b);
  654. U.call(this, a, b);
  655. var e = S.call(this, a, b);
  656. d !== e && c.attributeChangedCallback(this, b, d, e, a);
  657. });
  658. ua ? b(HTMLElement.prototype, ua) : ma ? b(Element.prototype, ma) : console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");
  659. va ? d(HTMLElement.prototype, va) : na ? d(Element.prototype, na) : console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");
  660. Y(c, Element.prototype, {
  661. h: oa,
  662. append: pa
  663. });
  664. Aa(c);
  665. }
  666. ;
  667. var Z = window.customElements;
  668. if (!Z || Z.forcePolyfill || "function" != typeof Z.define || "function" != typeof Z.get) {
  669. var X = new u();
  670. xa();
  671. ya();
  672. Y(X, DocumentFragment.prototype, {
  673. h: ka,
  674. append: la
  675. });
  676. za();
  677. Ba();
  678. document.__CE_hasRegistry = !0;
  679. var customElements = new E(X);
  680. Object.defineProperty(window, "customElements", {
  681. configurable: !0,
  682. enumerable: !0,
  683. value: customElements
  684. });
  685. }
  686. ;
  687. }).call(self); // Polyfill document.baseURI
  688. "string" !== typeof document.baseURI && Object.defineProperty(Document.prototype, "baseURI", {
  689. enumerable: !0,
  690. configurable: !0,
  691. get: function () {
  692. var a = document.querySelector("base");
  693. return a && a.href ? a.href : document.URL;
  694. }
  695. }); // Polyfill CustomEvent
  696. "function" !== typeof window.CustomEvent && (window.CustomEvent = function (c, a) {
  697. a = a || {
  698. bubbles: !1,
  699. cancelable: !1,
  700. detail: void 0
  701. };
  702. var b = document.createEvent("CustomEvent");
  703. b.initCustomEvent(c, a.bubbles, a.cancelable, a.detail);
  704. return b;
  705. }, window.CustomEvent.prototype = window.Event.prototype); // Event.composedPath
  706. (function (b, c, d) {
  707. b.composedPath || (b.composedPath = function () {
  708. if (this.path) return this.path;
  709. var a = this.target;
  710. for (this.path = []; null !== a.parentNode;) this.path.push(a), a = a.parentNode;
  711. this.path.push(c, d);
  712. return this.path;
  713. });
  714. })(Event.prototype, document, window);
  715. /*!
  716. Element.closest and Element.matches
  717. https://github.com/jonathantneal/closest
  718. Creative Commons Zero v1.0 Universal
  719. */
  720. (function (a) {
  721. "function" !== typeof a.matches && (a.matches = a.msMatchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || function (a) {
  722. a = (this.document || this.ownerDocument).querySelectorAll(a);
  723. for (var b = 0; a[b] && a[b] !== this;) ++b;
  724. return !!a[b];
  725. });
  726. "function" !== typeof a.closest && (a.closest = function (a) {
  727. for (var b = this; b && 1 === b.nodeType;) {
  728. if (b.matches(a)) return b;
  729. b = b.parentNode;
  730. }
  731. return null;
  732. });
  733. })(window.Element.prototype);
  734. /*!
  735. Element.getRootNode()
  736. */
  737. (function (c) {
  738. function d(a) {
  739. a = b(a);
  740. return a && 11 === a.nodeType ? d(a.host) : a;
  741. }
  742. function b(a) {
  743. return a && a.parentNode ? b(a.parentNode) : a;
  744. }
  745. "function" !== typeof c.getRootNode && (c.getRootNode = function (a) {
  746. return a && a.composed ? d(this) : b(this);
  747. });
  748. })(Element.prototype);
  749. /*!
  750. Element.isConnected()
  751. */
  752. (function (a) {
  753. "isConnected" in a || Object.defineProperty(a, "isConnected", {
  754. configurable: !0,
  755. enumerable: !0,
  756. get: function () {
  757. var a = this.getRootNode({
  758. composed: !0
  759. });
  760. return a && 9 === a.nodeType;
  761. }
  762. });
  763. })(Element.prototype);
  764. /*!
  765. Element.remove()
  766. */
  767. (function (b) {
  768. b.forEach(function (a) {
  769. a.hasOwnProperty("remove") || Object.defineProperty(a, "remove", {
  770. configurable: !0,
  771. enumerable: !0,
  772. writable: !0,
  773. value: function () {
  774. null !== this.parentNode && this.parentNode.removeChild(this);
  775. }
  776. });
  777. });
  778. })([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
  779. /*!
  780. Element.classList
  781. */
  782. !function (e) {
  783. 'classList' in e || Object.defineProperty(e, "classList", {
  784. get: function () {
  785. var e = this,
  786. t = (e.getAttribute("class") || "").replace(/^\s+|\s$/g, "").split(/\s+/g);
  787. function n() {
  788. t.length > 0 ? e.setAttribute("class", t.join(" ")) : e.removeAttribute("class");
  789. }
  790. return "" === t[0] && t.splice(0, 1), t.toggle = function (e, i) {
  791. void 0 !== i ? i ? t.add(e) : t.remove(e) : -1 !== t.indexOf(e) ? t.splice(t.indexOf(e), 1) : t.push(e), n();
  792. }, t.add = function () {
  793. for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 === t.indexOf(e[i]) && t.push(e[i]);
  794. n();
  795. }, t.remove = function () {
  796. for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 !== t.indexOf(e[i]) && t.splice(t.indexOf(e[i]), 1);
  797. n();
  798. }, t.item = function (e) {
  799. return t[e];
  800. }, t.contains = function (e) {
  801. return -1 !== t.indexOf(e);
  802. }, t.replace = function (e, i) {
  803. -1 !== t.indexOf(e) && t.splice(t.indexOf(e), 1, i), n();
  804. }, t.value = e.getAttribute("class") || "", t;
  805. }
  806. });
  807. }(Element.prototype);
  808. /*!
  809. DOMTokenList
  810. */
  811. (function (b) {
  812. try {
  813. document.body.classList.add();
  814. } catch (e) {
  815. var c = b.add,
  816. d = b.remove;
  817. b.add = function () {
  818. for (var a = 0; a < arguments.length; a++) c.call(this, arguments[a]);
  819. };
  820. b.remove = function () {
  821. for (var a = 0; a < arguments.length; a++) d.call(this, arguments[a]);
  822. };
  823. }
  824. })(DOMTokenList.prototype);
  825. /***/ })
  826. }]);
  827. //# sourceMappingURL=polyfills-dom.js.map