@openremote/manager 1.8.0-snapshot.20250725120000 → 1.8.0-snapshot.20250725120002

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/bundle.f7ad544556328801.js +3678 -0
  2. package/dist/images/Icon-128.png +0 -0
  3. package/dist/images/Icon-144.png +0 -0
  4. package/dist/images/Icon-196.png +0 -0
  5. package/dist/images/Icon-256.png +0 -0
  6. package/dist/images/Icon-48.png +0 -0
  7. package/dist/images/Icon-512.png +0 -0
  8. package/dist/images/Icon-72.png +0 -0
  9. package/dist/images/favicon.ico +0 -0
  10. package/dist/index.html +19 -0
  11. package/dist/modules/@webcomponents/webcomponentsjs/CHANGELOG.md +76 -0
  12. package/dist/modules/@webcomponents/webcomponentsjs/LICENSE.md +19 -0
  13. package/dist/modules/@webcomponents/webcomponentsjs/README.md +259 -0
  14. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +1 -0
  15. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -0
  16. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +1 -0
  17. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -0
  18. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js +1 -0
  19. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -0
  20. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +1 -0
  21. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -0
  22. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +1 -0
  23. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -0
  24. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +1 -0
  25. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -0
  26. package/dist/modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js +1 -0
  27. package/dist/modules/@webcomponents/webcomponentsjs/package.json +51 -0
  28. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +1 -0
  29. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +1 -0
  30. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +1 -0
  31. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +1 -0
  32. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js +1 -0
  33. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +1 -0
  34. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +1 -0
  35. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +1 -0
  36. package/dist/modules/@webcomponents/webcomponentsjs/src/flag-parser.js +1 -0
  37. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/baseuri.js +1 -0
  38. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/after.js +1 -0
  39. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/before.js +1 -0
  40. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/index.js +1 -0
  41. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/remove.js +1 -0
  42. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/replace-with.js +1 -0
  43. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/custom-event.js +1 -0
  44. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/es6-misc.js +1 -0
  45. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/event-listener-options.js +1 -0
  46. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/get-attribute-names.js +1 -0
  47. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/matches.js +1 -0
  48. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/append.js +1 -0
  49. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/index.js +1 -0
  50. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/prepend.js +1 -0
  51. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/replace-children.js +1 -0
  52. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/promise.js +1 -0
  53. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/svg-element-class-list.js +1 -0
  54. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/symbol.js +1 -0
  55. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/toggle-attribute.js +1 -0
  56. package/dist/modules/@webcomponents/webcomponentsjs/src/unresolved.js +1 -0
  57. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +175 -0
  58. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +1 -0
  59. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +1 -0
  60. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +1 -0
  61. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../custom-elements/ts_src/Patch/Native.ts","../../custom-elements/ts_src/Utilities.ts","../../custom-elements/ts_src/CustomElementInternals.ts","../../custom-elements/ts_src/custom-elements.ts","../../custom-elements/ts_src/CustomElementState.ts","../../custom-elements/ts_src/Deferred.ts","../../custom-elements/ts_src/DocumentConstructionObserver.ts","../../custom-elements/ts_src/CustomElementRegistry.ts","../../custom-elements/ts_src/Patch/Interface/ParentNode.ts","../../custom-elements/ts_src/Patch/Document.ts","../../custom-elements/ts_src/Patch/Interface/ChildNode.ts","../../custom-elements/ts_src/Patch/Element.ts","../../custom-elements/ts_src/AlreadyConstructedMarker.ts","../../custom-elements/ts_src/Patch/HTMLElement.ts","../../custom-elements/ts_src/Patch/Node.ts","../../custom-elements/ts_src/Patch/DocumentFragment.ts"],"names":["Document_createElement","window","Document","prototype","createElement","Document_createElementNS","createElementNS","Document_importNode","importNode","Document_prepend","Document_append","DocumentFragment_prepend","DocumentFragment","DocumentFragment_append","Node_cloneNode","Node","cloneNode","Node_appendChild","appendChild","Node_insertBefore","insertBefore","Node_removeChild","removeChild","Node_replaceChild","replaceChild","Node_textContent","Object","getOwnPropertyDescriptor","Element_attachShadow","Element","Element_innerHTML","Element_getAttribute","getAttribute","Element_setAttribute","setAttribute","Element_removeAttribute","removeAttribute","Element_toggleAttribute","toggleAttribute","Element_getAttributeNS","getAttributeNS","Element_setAttributeNS","setAttributeNS","Element_removeAttributeNS","removeAttributeNS","Element_insertAdjacentElement","Element_insertAdjacentHTML","Element_prepend","Element_append","Element_before","Element_after","Element_replaceWith","Element_remove","HTMLElement","HTMLElement_innerHTML","HTMLElement_insertAdjacentElement","HTMLElement_insertAdjacentHTML","reservedElementNameSet","Set","forEach","item","add","isValidCustomElementName","localName","reserved","has","validForm","test","nativeContains","document","contains","bind","documentElement","isConnected","node","nativeValue","undefined","current","__CE_isImportDocument","parentNode","ShadowRoot","host","childrenFromFragment","fragment","nativeChildren","children","Array","slice","call","n","firstChild","nextSibling","nodeType","ELEMENT_NODE","push","nextSiblingOrAncestorSibling","root","start","walkDeepDescendantElements","callback","visitedImports","element","import","child","shadowRoot","__CE_shadowRoot","constructor","CustomElementInternals","noDocumentConstructionObserver","priorCustomElements","shadyDomFastWalk","_patchesNode","_patchesElement","_hasPatches","useDocumentConstructionObserver","forEachElement","sd","querySelectorAll","elements","i","length","addNodePatch","patch","addElementPatch","patchTree","patchElement","__CE_patched","connectTree","custom","__CE_state","connectedCallback","upgradeReaction","disconnectTree","disconnectedCallback","patchAndUpgradeTree","options","upgrade","gatherElements","__CE_registry","readyState","__CE_documentLoadHandled","addEventListener","clonedVisitedImports","delete","ownerDocument","registry","doc","defaultView","internal_localNameToDefinition","definition","constructionStack","result","constructorFunction","Error","pop","e","failed","__CE_definition","attributeChangedCallback","hasAttributes","observedAttributes","name","value","_upgradeAnElement","reportTheException","oldValue","newValue","namespace","indexOf","createAnElement","NS_HTML","namespaceURI","setPrototypeOf","HTMLUnknownElement","arg","message","filename","lineno","colno","sourceURL","fileName","line","lineNumber","column","columnNumber","String","event","ErrorEvent","initErrorEvent","cancelable","error","createEvent","preventDefault","event.preventDefault","defineProperty","configurable","get","enumerable","dispatchEvent","defaultPrevented","console","Deferred","_value","_promise","Promise","resolve","_resolve","DocumentConstructionObserver","internals","_observer","_internals","_document","MutationObserver","_handleMutations","observe","childList","subtree","disconnect","mutations","addedNodes","j","CustomElementRegistry","_localNameToConstructorGetter","Map","_localNameToDefinition","_constructorToDefinition","_elementDefinitionIsRunning","_whenDefinedDeferred","_flushCallback","this._flushCallback","fn","_flushPending","_unflushedLocalNames","_documentConstructionObserver","polyfillDefineLazy","constructorGetter","Function","TypeError","internal_assertCanDefineLocalName","set","_flush","define","internal_reifyDefinition","SyntaxError","getCallback","callbackValue","adoptedCallback","elementsWithStableDefinitions","unflushedLocalNames","elementsWithPendingDefinitions","pendingElements","pendingUpgradableElements","deferred","whenDefined","reject","prior","anyDefinitionExists","definitionHasFlushed","polyfillWrapFlushCallback","outer","inner","flush","existingDefinition","destination","builtIn","appendPrependPatch","builtInMethod","nodes","flattenedNodes","connectedElements","apply","prepend","append","Document.prototype.createElement","Document.prototype.importNode","deep","clone","Document.prototype.createElementNS","PatchParentNode","beforeAfterPatch","before","after","replaceWith","destination.replaceWith","wasConnected","remove","destination.remove","patch_innerHTML","baseDescriptor","htmlString","removedElements","patch_insertAdjacentElement","baseMethod","insertAdjacentElement","destination.insertAdjacentElement","position","insertedElement","patch_insertAdjacentHTML","upgradeNodesInRange","end","insertAdjacentHTML","destination.insertAdjacentHTML","text","strPosition","toLowerCase","marker","previousSibling","lastChild","attachShadow","Element.prototype.attachShadow","init","innerHTML","assignedValue","isTemplate","content","rawElement","childNodes","container","Element.prototype.setAttribute","Element.prototype.setAttributeNS","Element.prototype.removeAttribute","Element.prototype.toggleAttribute","force","hadAttribute","hasAttribute","Element.prototype.removeAttributeNS","PatchChildNode","alreadyConstructedMarker","PatchedHTMLElement","lastIndex","writable","patch_textContent","TEXT_NODE","removedNodes","childNodesLength","Node.prototype.insertBefore","refNode","insertedNodes","nativeResult","nodeWasConnectedElement","Node.prototype.appendChild","Node.prototype.cloneNode","Node.prototype.removeChild","Node.prototype.replaceChild","nodeToInsert","nodeToRemove","nodeToInsertWasConnectedElement","thisIsConnected","parts","COMMENT_NODE","textContent","join","createTextNode","installPolyfill","PatchHTMLElement","PatchDocument","PatchNode","PatchElement","customElements"],"mappings":"A;;;;;;;;;;;;;;;;;;;aAWO,IAAMA,EAAyBC,MAAzBD,CAAgCE,QAAhCF,CAAyCG,SAAzCH,CAAmDI,aAAzD,CACMC,EACXJ,MADWI,CACJH,QADIG,CACKF,SADLE,CACeC,eAFrB,CAGMC,GAAsBN,MAAtBM,CAA6BL,QAA7BK,CAAsCJ,SAAtCI,CAAgDC,UAHtD,CAKMC,GAAmBR,MAAnBQ,CAA0BP,QAA1BO,CAAmCN,SAAnCM,CAA6C,OALnD,CAMMC,GAAkBT,MAAlBS,CAAyBR,QAAzBQ,CAAkCP,SAAlCO,CAA4C,MANlD,CAOMC,GACXV,MADWU,CACJC,gBADID,CACaR,SADbQ,CACuB,OAR7B,CASME,GACXZ,MADWY,CACJD,gBADIC,CACaV,SADbU,CACuB,MAV7B,CAWMC,EAAiBb,MAAjBa,CAAwBC,IAAxBD,CAA6BX,SAA7BW,CAAuCE,SAX7C,CAYMC,EAAmBhB,MAAnBgB,CAA0BF,IAA1BE,CAA+Bd,SAA/Bc,CAAyCC,WAZ/C,CAaMC,EAAoBlB,MAApBkB,CAA2BJ,IAA3BI,CAAgChB,SAAhCgB,CAA0CC,YAbhD,CAcM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AAJ,CAA0Bb,CAA1B,CAGvB3I,SAAA,CAASqE,aAAT,CAAyB4N,CAEzB5U,OAAA,CAAOwK,cAAP,CAAsBjM,MAAtB,CAA8B,gBAA9B,CAAgD,CAC9CkM,aAAc,CAAA,CADgC,CAE9CE,WAAY,CAAA,CAFkC,CAG9CnC,MAAOoM,CAHuC,CAAhD,CA1BsB,CAkCrBzP,CADH,EAEE,CAAAA,CAAA,CAAoB,aAFtB,EAG0C,UAH1C,EAGE,MAAOA,EAAP,CAA2B,MAH7B,EAIuC,UAJvC,EAIE,MAAOA,EAAP,CAA2B,GAJ7B,EAMEoP,EAAA,EAMDhW,OAAA,CAAe,oBAAf,CAAyCgW,E","file":"webcomponents-ce.js","sourcesContent":["/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const Document_createElement = window.Document.prototype.createElement;\nexport const Document_createElementNS =\n window.Document.prototype.createElementNS;\nexport const Document_importNode = window.Document.prototype.importNode;\n\nexport const Document_prepend = window.Document.prototype['prepend'];\nexport const Document_append = window.Document.prototype['append'];\nexport const DocumentFragment_prepend =\n window.DocumentFragment.prototype['prepend'];\nexport const DocumentFragment_append =\n window.DocumentFragment.prototype['append'];\nexport const Node_cloneNode = window.Node.prototype.cloneNode;\nexport const Node_appendChild = window.Node.prototype.appendChild;\nexport const Node_insertBefore = window.Node.prototype.insertBefore;\nexport const Node_removeChild = window.Node.prototype.removeChild;\nexport const Node_replaceChild = window.Node.prototype.replaceChild;\nexport const Node_textContent = Object.getOwnPropertyDescriptor(\n window.Node.prototype,\n 'textContent'\n);\nexport const Element_attachShadow = window.Element.prototype['attachShadow'];\nexport const Element_innerHTML = Object.getOwnPropertyDescriptor(\n window.Element.prototype,\n 'innerHTML'\n);\nexport const Element_getAttribute = window.Element.prototype.getAttribute;\nexport const Element_setAttribute = window.Element.prototype.setAttribute;\nexport const Element_removeAttribute = window.Element.prototype.removeAttribute;\nexport const Element_toggleAttribute = window.Element.prototype.toggleAttribute;\nexport const Element_getAttributeNS = window.Element.prototype.getAttributeNS;\nexport const Element_setAttributeNS = window.Element.prototype.setAttributeNS;\nexport const Element_removeAttributeNS =\n window.Element.prototype.removeAttributeNS;\nexport const Element_insertAdjacentElement =\n window.Element.prototype['insertAdjacentElement'];\nexport const Element_insertAdjacentHTML =\n window.Element.prototype['insertAdjacentHTML'];\nexport const Element_prepend = window.Element.prototype['prepend'];\nexport const Element_append = window.Element.prototype['append'];\nexport const Element_before = window.Element.prototype['before'];\nexport const Element_after = window.Element.prototype['after'];\nexport const Element_replaceWith = window.Element.prototype['replaceWith'];\nexport const Element_remove = window.Element.prototype['remove'];\nexport const HTMLElement = window.HTMLElement;\nexport const HTMLElement_innerHTML = Object.getOwnPropertyDescriptor(\n window.HTMLElement.prototype,\n 'innerHTML'\n);\nexport const HTMLElement_insertAdjacentElement =\n window.HTMLElement.prototype['insertAdjacentElement'];\nexport const HTMLElement_insertAdjacentHTML =\n window.HTMLElement.prototype['insertAdjacentHTML'];\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nconst reservedElementNameSet = new Set<string>();\n// IE11 does not support constructing a set using an iterable.\n[\n 'annotation-xml',\n 'color-profile',\n 'font-face',\n 'font-face-src',\n 'font-face-uri',\n 'font-face-format',\n 'font-face-name',\n 'missing-glyph',\n].forEach((item) => reservedElementNameSet.add(item));\n\nexport function isValidCustomElementName(localName: string) {\n const reserved = reservedElementNameSet.has(localName);\n const validForm = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(localName);\n return !reserved && validForm;\n}\n\n// Note, IE11 doesn't have `document.contains`.\nconst nativeContains = document.contains\n ? document.contains.bind(document)\n : document.documentElement.contains.bind(document.documentElement);\n\nexport function isConnected(node: Node) {\n // Use `Node#isConnected`, if defined.\n const nativeValue = node.isConnected;\n if (nativeValue !== undefined) {\n return nativeValue;\n }\n // Optimization: It's significantly faster here to try to use `contains`,\n // especially on Edge/IE/\n if (nativeContains(node)) {\n return true;\n }\n\n let current: Node | undefined = node;\n while (\n current &&\n !(current.__CE_isImportDocument || current instanceof Document)\n ) {\n current =\n current.parentNode ||\n (window.ShadowRoot && current instanceof ShadowRoot\n ? current.host\n : undefined);\n }\n return !!(\n current &&\n (current.__CE_isImportDocument || current instanceof Document)\n );\n}\n\nexport function childrenFromFragment(\n fragment: DocumentFragment\n): Array<Element> {\n // Note, IE doesn't have `children` on document fragments.\n const nativeChildren = fragment.children;\n if (nativeChildren) {\n return Array.prototype.slice.call(nativeChildren);\n }\n const children: Array<Element> = [];\n for (let n = fragment.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.ELEMENT_NODE) {\n children.push(n as Element);\n }\n }\n return children;\n}\n\nfunction nextSiblingOrAncestorSibling(root: Node, start: Node) {\n let node: Node | null = start;\n while (node && node !== root && !node.nextSibling) {\n node = node.parentNode;\n }\n return !node || node === root ? null : node.nextSibling;\n}\n\nfunction nextNode(root: Node, start: Node) {\n return start.firstChild\n ? start.firstChild\n : nextSiblingOrAncestorSibling(root, start);\n}\n\nexport function walkDeepDescendantElements(\n root: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set<Node>\n) {\n let node: Node | null = root;\n while (node) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n\n callback(element);\n\n const localName = element.localName;\n if (localName === 'link' && element.getAttribute('rel') === 'import') {\n // If this import (polyfilled or not) has its root node available,\n // walk it.\n const importNode = (element as HTMLLinkElement).import;\n if (visitedImports === undefined) {\n visitedImports = new Set();\n }\n if (importNode instanceof Node && !visitedImports.has(importNode)) {\n // Prevent multiple walks of the same import root.\n visitedImports.add(importNode);\n\n for (\n let child = importNode.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n\n // Ignore descendants of import links to prevent attempting to walk the\n // elements created by the HTML Imports polyfill that we just walked\n // above.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n } else if (localName === 'template') {\n // Ignore descendants of templates. There shouldn't be any descendants\n // because they will be moved into `.content` during construction in\n // browsers that support template but, in case they exist and are still\n // waiting to be moved by a polyfill, they will be ignored.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n }\n\n // Walk shadow roots.\n const shadowRoot = element.__CE_shadowRoot;\n if (shadowRoot) {\n for (\n let child = shadowRoot.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n }\n\n node = nextNode(root, node);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport {CustomElementState as CEState} from './CustomElementState.js';\nimport * as Native from './Patch/Native.js';\nimport * as Utilities from './Utilities.js';\n\nconst NS_HTML = 'http://www.w3.org/1999/xhtml';\n\nexport default class CustomElementInternals {\n private readonly _patchesNode: Array<(node: Node) => void> = [];\n private readonly _patchesElement: Array<(elem: Element) => void> = [];\n private _hasPatches = false;\n public readonly shadyDomFastWalk: boolean;\n public readonly useDocumentConstructionObserver: boolean;\n\n constructor(options: {\n shadyDomFastWalk: boolean;\n noDocumentConstructionObserver: boolean;\n }) {\n this.shadyDomFastWalk = options.shadyDomFastWalk;\n this.useDocumentConstructionObserver = !options.noDocumentConstructionObserver;\n }\n\n forEachElement(\n node: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set<Node>\n ) {\n const sd = window['ShadyDOM'];\n if (this.shadyDomFastWalk && sd && sd['inUse']) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n callback(element);\n }\n // most easily gets to document, element, documentFragment\n if ((node as Element).querySelectorAll!) {\n const elements = sd['nativeMethods'].querySelectorAll.call(node, '*');\n for (let i = 0; i < elements.length; i++) {\n callback(elements[i]);\n }\n }\n } else {\n Utilities.walkDeepDescendantElements(node, callback, visitedImports);\n }\n }\n\n addNodePatch(patch: (node: Node) => void) {\n this._hasPatches = true;\n this._patchesNode.push(patch);\n }\n\n addElementPatch(patch: (element: Element) => void) {\n this._hasPatches = true;\n this._patchesElement.push(patch);\n }\n\n patchTree(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n this.forEachElement(node, (element) => this.patchElement(element));\n }\n\n patchNode(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n if (node.__CE_patched) {\n return;\n }\n node.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](node);\n }\n }\n\n patchElement(element: Element) {\n if (!this._hasPatches) {\n return;\n }\n\n if (element.__CE_patched) {\n return;\n }\n element.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](element);\n }\n\n for (let i = 0; i < this._patchesElement.length; i++) {\n this._patchesElement[i](element);\n }\n }\n\n connectTree(root: Node) {\n const elements: Array<Element> = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.connectedCallback(element);\n } else {\n this.upgradeReaction(element as HTMLElement);\n }\n }\n }\n\n disconnectTree(root: Node) {\n const elements: Array<Element> = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.disconnectedCallback(element);\n }\n }\n }\n\n /**\n * Upgrades all uncustomized custom elements at and below a root node for\n * which there is a definition. When custom element reaction callbacks are\n * assumed to be called synchronously (which, by the current DOM / HTML spec\n * definitions, they are *not*), callbacks for both elements customized\n * synchronously by the parser and elements being upgraded occur in the same\n * relative order.\n *\n * NOTE: This function, when used to simulate the construction of a tree\n * that is already created but not customized (i.e. by the parser), does\n * *not* prevent the element from reading the 'final' (true) state of the\n * tree. For example, the element, during truly synchronous parsing /\n * construction would see that it contains no children as they have not yet\n * been inserted. However, this function does not modify the tree, the\n * element will (incorrectly) have children. Additionally, self-modification\n * restrictions for custom element constructors imposed by the DOM spec are\n * *not* enforced.\n *\n *\n * The following nested list shows the steps extending down from the HTML\n * spec's parsing section that cause elements to be synchronously created\n * and upgraded:\n *\n * The \"in body\" insertion mode:\n * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n * - Switch on token:\n * .. other cases ..\n * -> Any other start tag\n * - [Insert an HTML element](below) for the token.\n *\n * Insert an HTML element:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element\n * - Insert a foreign element for the token in the HTML namespace:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element\n * - Create an element for a token:\n * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token\n * - Will execute script flag is true?\n * - (Element queue pushed to the custom element reactions stack.)\n * - Create an element:\n * https://dom.spec.whatwg.org/#concept-create-element\n * - Sync CE flag is true?\n * - Constructor called.\n * - Self-modification restrictions enforced.\n * - Sync CE flag is false?\n * - (Upgrade reaction enqueued.)\n * - Attributes appended to element.\n * (`attributeChangedCallback` reactions enqueued.)\n * - Will execute script flag is true?\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n * - (Element queue pushed to the custom element reactions stack.)\n * - Insert the element:\n * https://dom.spec.whatwg.org/#concept-node-insert\n * - Shadow-including descendants are connected. During parsing\n * construction, there are no shadow-*excluding* descendants.\n * However, the constructor may have validly attached a shadow\n * tree to itself and added descendants to that shadow tree.\n * (`connectedCallback` reactions enqueued.)\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n */\n patchAndUpgradeTree(\n root: Node,\n options: {\n visitedImports?: Set<Node>;\n upgrade?: (elem: HTMLElement) => void;\n } = {}\n ) {\n const visitedImports = options.visitedImports;\n const upgrade =\n options.upgrade || ((element) => this.upgradeReaction(element));\n\n const elements: Array<Element> = [];\n\n const gatherElements = (element: Element) => {\n if (this._hasPatches) {\n this.patchElement(element);\n }\n if (\n element.localName === 'link' &&\n element.getAttribute('rel') === 'import'\n ) {\n const importElem = element as HTMLLinkElement;\n // The HTML Imports polyfill sets a descendant element of the link to\n // the `import` property, specifically this is *not* a Document.\n const importNode = importElem.import;\n\n if (importNode instanceof Node) {\n importNode.__CE_isImportDocument = true;\n // Connected links are associated with the global registry.\n importNode.__CE_registry = document.__CE_registry;\n }\n\n if (importNode && importNode.readyState === 'complete') {\n importNode.__CE_documentLoadHandled = true;\n } else {\n // If this link's import root is not available, its contents can't\n // be walked. Wait for 'load' and walk it when it's ready.\n element.addEventListener('load', () => {\n const importNode = importElem.import!;\n\n if (importNode.__CE_documentLoadHandled) {\n return;\n }\n importNode.__CE_documentLoadHandled = true;\n\n // Clone the `visitedImports` set that was populated sync during\n // the `patchAndUpgradeTree` call that caused this 'load' handler\n // to be added. Then, remove *this* link's import node so that we\n // can walk that import again, even if it was partially walked\n // later during the same `patchAndUpgradeTree` call.\n const clonedVisitedImports = new Set<Node>();\n if (visitedImports) {\n // IE11 does not support constructing a set using an iterable.\n visitedImports.forEach((item) => clonedVisitedImports.add(item));\n clonedVisitedImports.delete(importNode);\n }\n this.patchAndUpgradeTree(importNode, {\n visitedImports: clonedVisitedImports,\n upgrade,\n });\n });\n }\n } else {\n elements.push(element);\n }\n };\n\n // `forEachElement` populates (and internally checks against)\n // `visitedImports` when traversing a loaded import.\n this.forEachElement(root, gatherElements, visitedImports);\n\n for (let i = 0; i < elements.length; i++) {\n upgrade(elements[i] as HTMLElement);\n }\n }\n\n upgradeReaction(element: HTMLElement) {\n try {\n const definition = this._lookupACustomElementDefinition(\n element.ownerDocument!,\n element.localName\n );\n if (definition) {\n this._upgradeAnElement(element, definition);\n }\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element\n */\n private _upgradeAnElement(\n element: HTMLElement,\n definition: CustomElementDefinition\n ) {\n const currentState = element.__CE_state;\n if (currentState !== undefined) {\n return;\n }\n\n definition.constructionStack.push(element);\n\n try {\n try {\n const result = new definition.constructorFunction();\n if (result !== element) {\n throw new Error(\n 'The custom element constructor did not produce the element being upgraded.'\n );\n }\n } finally {\n definition.constructionStack.pop();\n }\n } catch (e) {\n element.__CE_state = CEState.failed;\n throw e;\n }\n\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n\n // Check `hasAttributes` here to avoid iterating when it's not necessary.\n if (definition.attributeChangedCallback && element.hasAttributes()) {\n const observedAttributes = definition.observedAttributes;\n for (let i = 0; i < observedAttributes.length; i++) {\n const name = observedAttributes[i];\n const value = element.getAttribute(name);\n if (value !== null) {\n this.attributeChangedCallback(element, name, null, value, null);\n }\n }\n }\n\n if (Utilities.isConnected(element)) {\n this.connectedCallback(element);\n }\n }\n\n connectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.connectedCallback) {\n try {\n definition.connectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n disconnectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.disconnectedCallback) {\n try {\n definition.disconnectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n attributeChangedCallback(\n element: Element,\n name: string,\n oldValue?: string | null,\n newValue?: string | null,\n namespace?: string | null\n ) {\n const definition = element.__CE_definition!;\n if (\n definition.attributeChangedCallback &&\n definition.observedAttributes.indexOf(name) > -1\n ) {\n try {\n definition.attributeChangedCallback.call(\n element,\n name,\n oldValue,\n newValue,\n namespace\n );\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n /**\n * Runs HTML's 'look up a custom element definition', excluding the namespace\n * check.\n *\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n */\n private _lookupACustomElementDefinition(\n doc: Document,\n localName: string\n ): CustomElementDefinition | undefined {\n // The document must be associated with a registry.\n const registry = doc.__CE_registry;\n if (!registry) {\n return;\n }\n\n // Prevent elements created in documents without a browsing context from\n // upgrading.\n //\n // https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n // \"If document does not have a browsing context, return null.\"\n //\n // https://html.spec.whatwg.org/multipage/window-object.html#dom-document-defaultview\n // \"The defaultView IDL attribute of the Document interface, on getting,\n // must return this Document's browsing context's WindowProxy object, if\n // this Document has an associated browsing context, or null otherwise.\"\n if (!doc.defaultView && !doc.__CE_isImportDocument) {\n return;\n }\n\n return registry.internal_localNameToDefinition(localName);\n }\n\n /**\n * Runs the DOM's 'create an element'. If namespace is not null, then the\n * native `createElementNS` is used. Otherwise, `createElement` is used.\n *\n * Note, the template polyfill only wraps `createElement`, preventing this\n * function from using `createElementNS` in all cases.\n *\n * @see https://dom.spec.whatwg.org/#concept-create-element\n */\n createAnElement(\n doc: Document,\n localName: string,\n namespace: string | null\n ): Element {\n const registry = doc.__CE_registry;\n // Only create custom elements if the document is associated with a\n // registry.\n if (registry && (namespace === null || namespace === NS_HTML)) {\n const definition = ((registry as unknown) as CustomElementRegistry).internal_localNameToDefinition(\n localName\n );\n if (definition) {\n try {\n const result = new definition.constructorFunction();\n\n // These conformance checks can't be performed when the user calls\n // the element's constructor themselves. However, this also true in\n // native implementations.\n\n if (\n result.__CE_state === undefined ||\n result.__CE_definition === undefined\n ) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The returned value was not constructed with the HTMLElement ' +\n 'constructor.'\n );\n }\n\n if (result.namespaceURI !== NS_HTML) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's namespace must be the HTML \" +\n 'namespace.'\n );\n }\n\n // The following Errors should be DOMExceptions but DOMException\n // isn't constructible in all browsers.\n\n if (result.hasAttributes()) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any attributes.'\n );\n }\n\n // ShadyDOM doesn't wrap `#hasChildNodes`, so we check `#firstChild`\n // instead.\n if (result.firstChild !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any children.'\n );\n }\n\n if (result.parentNode !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have a parent node.'\n );\n }\n\n if (result.ownerDocument !== doc) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's owner document is incorrect.\"\n );\n }\n\n if (result.localName !== localName) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's local name is incorrect.\"\n );\n }\n\n return result;\n } catch (e: unknown) {\n this.reportTheException(e);\n\n // When construction fails, a new HTMLUnknownElement is produced.\n // However, there's no direct way to create one, so we create a\n // regular HTMLElement and replace its prototype.\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n Object.setPrototypeOf(result, HTMLUnknownElement.prototype);\n result.__CE_state = CEState.failed;\n result.__CE_definition = undefined;\n this.patchElement(result);\n return result;\n }\n }\n }\n\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n this.patchElement(result);\n return result;\n }\n\n /**\n * Runs the DOM's 'report the exception' algorithm.\n *\n * @see https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception\n */\n reportTheException(arg: unknown) {\n interface ExtendedError extends Error {\n // Non-standard Safari properties.\n sourceURL?: string;\n line?: number;\n column?: number;\n\n // Non-standard Firefox properties.\n fileName?: string;\n lineNumber?: number;\n columnNumber?: number;\n }\n\n let message = '';\n let filename = '';\n let lineno = 0;\n let colno = 0;\n\n if (arg instanceof Error) {\n const error = arg as ExtendedError;\n message = error.message;\n filename = error.sourceURL || error.fileName || '';\n lineno = error.line || error.lineNumber || 0;\n colno = error.column || error.columnNumber || 0;\n } else {\n message = `Uncaught ${String(arg)}`;\n }\n\n let event: ErrorEvent | undefined = undefined;\n if (ErrorEvent.prototype.initErrorEvent === undefined) {\n event = new ErrorEvent('error', {\n cancelable: true,\n message,\n filename,\n lineno,\n colno,\n error: arg,\n });\n } else {\n event = document.createEvent('ErrorEvent') as ErrorEvent;\n // initErrorEvent(type, bubbles, cancelable, message, filename, line)\n event.initErrorEvent!('error', false, true, message, filename, lineno);\n // Hack for IE, where ErrorEvent#preventDefault does not set\n // #defaultPrevented to true.\n event.preventDefault = function (this: ErrorEvent) {\n Object.defineProperty(this, 'defaultPrevented', {\n configurable: true,\n get: function (this: ErrorEvent) {\n return true;\n },\n });\n };\n }\n\n if (event.error === undefined) {\n Object.defineProperty(event, 'error', {\n configurable: true,\n enumerable: true,\n get: function () {\n return arg;\n },\n });\n }\n\n window.dispatchEvent(event);\n if (!event.defaultPrevented) {\n // In 'report the exception', UAs may optionally write errors to the\n // console if their associated ErrorEvent isn't handled during dispatch\n // (indicated by calling `preventDefault`). In practice, these errors are\n // always displayed.\n console.error(arg);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport PatchDocument from './Patch/Document.js';\nimport PatchDocumentFragment from './Patch/DocumentFragment.js';\nimport PatchElement from './Patch/Element.js';\nimport PatchHTMLElement from './Patch/HTMLElement.js';\nimport PatchNode from './Patch/Node.js';\n\nconst priorCustomElements = window['customElements'];\n\nfunction installPolyfill() {\n const noDocumentConstructionObserver = !!priorCustomElements?.[\n 'noDocumentConstructionObserver'\n ];\n const shadyDomFastWalk = !!priorCustomElements?.['shadyDomFastWalk'];\n\n const internals = new CustomElementInternals({\n noDocumentConstructionObserver,\n shadyDomFastWalk,\n });\n\n PatchHTMLElement(internals);\n PatchDocument(internals);\n PatchDocumentFragment(internals);\n PatchNode(internals);\n PatchElement(internals);\n\n window[\n 'CustomElementRegistry'\n ] = (CustomElementRegistry as unknown) as typeof window['CustomElementRegistry'];\n\n const customElements = new CustomElementRegistry(internals);\n\n // The main document is associated with the global registry.\n document.__CE_registry = customElements;\n\n Object.defineProperty(window, 'customElements', {\n configurable: true,\n enumerable: true,\n value: customElements,\n });\n}\n\nif (\n !priorCustomElements ||\n priorCustomElements['forcePolyfill'] ||\n typeof priorCustomElements['define'] != 'function' ||\n typeof priorCustomElements['get'] != 'function'\n) {\n installPolyfill();\n}\n\n// This is NOT public API and is only meant to work around a GC bug in older\n// versions of Safari that randomly removes the polyfill during tests.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(window as any)['__CE_installPolyfill'] = installPolyfill;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const CustomElementState = {\n custom: 1,\n failed: 2,\n} as const;\nexport type CustomElementState =\n | typeof CustomElementState.custom\n | typeof CustomElementState.failed;\n\nexport default CustomElementState;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport default class Deferred<T> {\n private _value: T | undefined = undefined;\n\n private _resolve!: (val: T) => void;\n\n private readonly _promise: Promise<T>;\n constructor() {\n this._promise = new Promise((resolve) => {\n this._resolve = resolve;\n });\n }\n\n resolve(value: T) {\n if (this._value) {\n throw new Error('Already resolved.');\n }\n\n this._value = value;\n this._resolve(value);\n }\n\n toPromise() {\n return this._promise;\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\n\nexport default class DocumentConstructionObserver {\n private readonly _internals: CustomElementInternals;\n private readonly _document: Document;\n private _observer: MutationObserver | undefined = undefined;\n constructor(internals: CustomElementInternals, doc: Document) {\n this._internals = internals;\n this._document = doc;\n\n // Simulate tree construction for all currently accessible nodes in the\n // document.\n this._internals.patchAndUpgradeTree(this._document);\n\n if (this._document.readyState === 'loading') {\n this._observer = new MutationObserver(this._handleMutations.bind(this));\n\n // Nodes created by the parser are given to the observer *before* the next\n // task runs. Inline scripts are run in a new task. This means that the\n // observer will be able to handle the newly parsed nodes before the\n // inline script is run.\n this._observer.observe(this._document, {\n childList: true,\n subtree: true,\n });\n }\n }\n\n disconnect() {\n if (this._observer) {\n this._observer.disconnect();\n }\n }\n\n private _handleMutations(mutations: ReadonlyArray<MutationRecord>) {\n // Once the document's `readyState` is 'interactive' or 'complete', all new\n // nodes created within that document will be the result of script and\n // should be handled by patching.\n const readyState = this._document.readyState;\n if (readyState === 'interactive' || readyState === 'complete') {\n this.disconnect();\n }\n\n for (let i = 0; i < mutations.length; i++) {\n const addedNodes = mutations[i].addedNodes;\n for (let j = 0; j < addedNodes.length; j++) {\n const node = addedNodes[j];\n this._internals.patchAndUpgradeTree(node);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport {AlreadyConstructedMarkerType} from './AlreadyConstructedMarker.js';\nimport CustomElementInternals from './CustomElementInternals.js';\nimport Deferred from './Deferred.js';\nimport DocumentConstructionObserver from './DocumentConstructionObserver.js';\nimport * as Utilities from './Utilities.js';\n\ninterface ElementConstructor {\n new (): HTMLElement;\n observedAttributes?: Array<string>;\n}\ntype ConstructorGetter = () => ElementConstructor;\n\n/**\n * @unrestricted\n */\nexport default class CustomElementRegistry {\n private readonly _localNameToConstructorGetter = new Map<\n string,\n ConstructorGetter\n >();\n private readonly _localNameToDefinition = new Map<\n string,\n CustomElementDefinition\n >();\n private readonly _constructorToDefinition = new Map<\n ElementConstructor,\n CustomElementDefinition\n >();\n private _elementDefinitionIsRunning = false;\n private readonly _internals: CustomElementInternals;\n private readonly _whenDefinedDeferred = new Map<\n string,\n Deferred<undefined>\n >();\n\n /**\n * The default flush callback triggers the document walk synchronously.\n */\n private _flushCallback: (fn: () => void) => void = (fn) => fn();\n private _flushPending = false;\n\n /**\n * A map from `localName`s of definitions that were defined *after* the\n * last flush to unupgraded elements matching that definition, in document\n * order. Entries are added to this map when a definition is registered,\n * but the list of elements is only populated during a flush after which\n * all of the entries are removed. DO NOT edit outside of `#_flush`.\n */\n private readonly _unflushedLocalNames: Array<string> = [];\n\n private readonly _documentConstructionObserver:\n | DocumentConstructionObserver\n | undefined;\n\n constructor(internals: CustomElementInternals) {\n this._internals = internals;\n this._documentConstructionObserver = internals.useDocumentConstructionObserver\n ? new DocumentConstructionObserver(internals, document)\n : undefined;\n }\n\n polyfillDefineLazy(localName: string, constructorGetter: ConstructorGetter) {\n if (!(constructorGetter instanceof Function)) {\n throw new TypeError(\n 'Custom element constructor getters must be functions.'\n );\n }\n this.internal_assertCanDefineLocalName(localName);\n this._localNameToConstructorGetter.set(localName, constructorGetter);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n define(localName: string, constructor: Function) {\n if (!(constructor instanceof Function)) {\n throw new TypeError('Custom element constructors must be functions.');\n }\n\n this.internal_assertCanDefineLocalName(localName);\n\n this.internal_reifyDefinition(localName, constructor as ElementConstructor);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n internal_assertCanDefineLocalName(localName: string) {\n if (!Utilities.isValidCustomElementName(localName)) {\n throw new SyntaxError(`The element name '${localName}' is not valid.`);\n }\n\n if (this.internal_localNameToDefinition(localName)) {\n throw new Error(\n `A custom element with name ` +\n `'${localName}' has already been defined.`\n );\n }\n\n if (this._elementDefinitionIsRunning) {\n throw new Error('A custom element is already being defined.');\n }\n }\n\n internal_reifyDefinition(localName: string, constructor: ElementConstructor) {\n this._elementDefinitionIsRunning = true;\n\n let connectedCallback: CustomElementDefinition['connectedCallback'];\n let disconnectedCallback: CustomElementDefinition['disconnectedCallback'];\n let adoptedCallback: CustomElementDefinition['adoptedCallback'];\n let attributeChangedCallback: CustomElementDefinition['attributeChangedCallback'];\n let observedAttributes: CustomElementDefinition['observedAttributes'];\n try {\n const prototype = constructor.prototype;\n if (!(prototype instanceof Object)) {\n throw new TypeError(\n \"The custom element constructor's prototype is not an object.\"\n );\n }\n\n type CEReactionCallback =\n | 'connectedCallback'\n | 'disconnectedCallback'\n | 'adoptedCallback'\n | 'attributeChangedCallback';\n const getCallback = function getCallback(name: CEReactionCallback) {\n const callbackValue = prototype[name];\n if (\n callbackValue !== undefined &&\n !(callbackValue instanceof Function)\n ) {\n throw new Error(`The '${name}' callback must be a function.`);\n }\n return callbackValue;\n };\n\n connectedCallback = getCallback('connectedCallback');\n disconnectedCallback = getCallback('disconnectedCallback');\n adoptedCallback = getCallback('adoptedCallback');\n attributeChangedCallback = getCallback('attributeChangedCallback');\n // `observedAttributes` should not be read unless an\n // `attributesChangedCallback` exists\n observedAttributes =\n (attributeChangedCallback && constructor['observedAttributes']) || [];\n // eslint-disable-next-line no-useless-catch\n } catch (e) {\n throw e;\n } finally {\n this._elementDefinitionIsRunning = false;\n }\n\n const definition = {\n localName,\n constructorFunction: constructor,\n connectedCallback,\n disconnectedCallback,\n adoptedCallback,\n attributeChangedCallback,\n observedAttributes,\n constructionStack: [] as Array<\n HTMLElement | AlreadyConstructedMarkerType\n >,\n };\n\n this._localNameToDefinition.set(localName, definition);\n this._constructorToDefinition.set(\n definition.constructorFunction,\n definition\n );\n\n return definition;\n }\n\n upgrade(node: Node): void {\n this._internals.patchAndUpgradeTree(node);\n }\n\n private _flush() {\n // If no new definitions were defined, don't attempt to flush. This could\n // happen if a flush callback keeps the function it is given and calls it\n // multiple times.\n if (this._flushPending === false) {\n return;\n }\n this._flushPending = false;\n\n /**\n * Unupgraded elements with definitions that were defined *before* the last\n * flush, in document order.\n */\n const elementsWithStableDefinitions: Array<HTMLElement> = [];\n\n const unflushedLocalNames = this._unflushedLocalNames;\n const elementsWithPendingDefinitions = new Map<\n string,\n Array<HTMLElement>\n >();\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n elementsWithPendingDefinitions.set(unflushedLocalNames[i], []);\n }\n\n this._internals.patchAndUpgradeTree(document, {\n upgrade: (element) => {\n // Ignore the element if it has already upgraded or failed to upgrade.\n if (element.__CE_state !== undefined) {\n return;\n }\n\n const localName = element.localName;\n\n // If there is an applicable pending definition for the element, add the\n // element to the list of elements to be upgraded with that definition.\n const pendingElements = elementsWithPendingDefinitions.get(localName);\n if (pendingElements) {\n pendingElements.push(element);\n // If there is *any other* applicable definition for the element, add\n // it to the list of elements with stable definitions that need to be\n // upgraded.\n } else if (this._localNameToDefinition.has(localName)) {\n elementsWithStableDefinitions.push(element);\n }\n },\n });\n\n // Upgrade elements with 'stable' definitions first.\n for (let i = 0; i < elementsWithStableDefinitions.length; i++) {\n this._internals.upgradeReaction(elementsWithStableDefinitions[i]);\n }\n\n // Upgrade elements with 'pending' definitions in the order they were\n // defined.\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n const localName = unflushedLocalNames[i];\n const pendingUpgradableElements = elementsWithPendingDefinitions.get(\n localName\n )!;\n\n // Attempt to upgrade all applicable elements.\n for (let i = 0; i < pendingUpgradableElements.length; i++) {\n this._internals.upgradeReaction(pendingUpgradableElements[i]);\n }\n\n // Resolve any promises created by `whenDefined` for the definition.\n const deferred = this._whenDefinedDeferred.get(localName);\n if (deferred) {\n deferred.resolve(undefined);\n }\n }\n\n unflushedLocalNames.length = 0;\n }\n\n get(localName: string): undefined | {new (): HTMLElement} {\n const definition = this.internal_localNameToDefinition(localName);\n if (definition) {\n return definition.constructorFunction;\n }\n\n return undefined;\n }\n\n whenDefined(localName: string): Promise<void> {\n if (!Utilities.isValidCustomElementName(localName)) {\n return Promise.reject(\n new SyntaxError(`'${localName}' is not a valid custom element name.`)\n );\n }\n\n const prior = this._whenDefinedDeferred.get(localName);\n if (prior) {\n return prior.toPromise();\n }\n\n const deferred = new Deferred<undefined>();\n this._whenDefinedDeferred.set(localName, deferred);\n\n // Resolve immediately if the given local name has a regular or lazy\n // definition *and* the full document walk to upgrade elements with that\n // local name has already happened.\n //\n // The behavior of the returned promise differs between the lazy and the\n // non-lazy cases if the definition fails. Normally, the definition would\n // fail synchronously and no pending promises would resolve. However, if\n // the definition is lazy but has not yet been reified, the promise is\n // resolved early here even though it might fail later when reified.\n const anyDefinitionExists =\n this._localNameToDefinition.has(localName) ||\n this._localNameToConstructorGetter.has(localName);\n const definitionHasFlushed =\n this._unflushedLocalNames.indexOf(localName) === -1;\n if (anyDefinitionExists && definitionHasFlushed) {\n deferred.resolve(undefined);\n }\n\n return deferred.toPromise();\n }\n\n polyfillWrapFlushCallback(outer: (fn: () => void) => void) {\n if (this._documentConstructionObserver) {\n this._documentConstructionObserver.disconnect();\n }\n const inner = this._flushCallback;\n this._flushCallback = (flush) => outer(() => inner(flush));\n }\n\n internal_localNameToDefinition(\n localName: string\n ): CustomElementDefinition | undefined {\n const existingDefinition = this._localNameToDefinition.get(localName);\n if (existingDefinition) {\n return existingDefinition;\n }\n\n const constructorGetter = this._localNameToConstructorGetter.get(localName);\n if (constructorGetter) {\n this._localNameToConstructorGetter.delete(localName);\n try {\n return this.internal_reifyDefinition(localName, constructorGetter());\n } catch (e: unknown) {\n this._internals.reportTheException(e);\n }\n }\n\n return undefined;\n }\n\n internal_constructorToDefinition(\n constructor: ElementConstructor\n ): CustomElementDefinition | undefined {\n return this._constructorToDefinition.get(constructor);\n }\n}\n\n// Closure compiler exports.\n/* eslint-disable no-self-assign */\nCustomElementRegistry.prototype['define'] =\n CustomElementRegistry.prototype.define;\nCustomElementRegistry.prototype['upgrade'] =\n CustomElementRegistry.prototype.upgrade;\nCustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;\nCustomElementRegistry.prototype['whenDefined'] =\n CustomElementRegistry.prototype.whenDefined;\nCustomElementRegistry.prototype['polyfillDefineLazy'] =\n CustomElementRegistry.prototype.polyfillDefineLazy;\nCustomElementRegistry.prototype['polyfillWrapFlushCallback'] =\n CustomElementRegistry.prototype.polyfillWrapFlushCallback;\n/* eslint-enable no-self-assign */\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: Node, ...args: Array<Node | string>) => void;\n\ninterface ParentNodeNativeMethods {\n prepend: NativeMethod;\n append: NativeMethod;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ParentNode,\n builtIn: ParentNodeNativeMethods\n) {\n function appendPrependPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: Node, ...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array<Node | string> = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.prepend !== undefined) {\n destination.prepend = appendPrependPatch(builtIn.prepend);\n }\n\n if (builtIn.append !== undefined) {\n destination.append = appendPrependPatch(builtIn.append);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n Document.prototype.createElement = function (\n this: Document,\n localName: string\n ) {\n return internals.createAnElement(this, localName, null);\n } as typeof Document.prototype.createElement;\n\n Document.prototype.importNode = function <T extends Node>(\n this: Document,\n node: T,\n deep?: boolean\n ): T {\n const clone = Native.Document_importNode.call(this, node, !!deep) as T;\n // Only create custom elements if this document is associated with the\n // registry.\n if (!this.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Document.prototype.createElementNS = function (\n this: Document,\n namespace: string | null,\n localName: string\n ) {\n return internals.createAnElement(this, localName, namespace);\n } as typeof Document.prototype.createElementNS;\n\n PatchParentNode(internals, Document.prototype, {\n prepend: Native.Document_prepend,\n append: Native.Document_append,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: ChildNode, ...args: Array<Node | string>) => void;\n\ninterface ChildNodeNativeMethods {\n before: NativeMethod;\n after: NativeMethod;\n replaceWith: NativeMethod;\n remove: (this: ChildNode) => void;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ChildNode,\n builtIn: ChildNodeNativeMethods\n) {\n function beforeAfterPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: ChildNode, ...nodes) {\n const flattenedNodes: Array<string | Node> = [];\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.before !== undefined) {\n destination.before = beforeAfterPatch(builtIn.before);\n }\n\n if (builtIn.after !== undefined) {\n destination.after = beforeAfterPatch(builtIn.after);\n }\n\n if (builtIn.replaceWith !== undefined) {\n destination.replaceWith = function (\n this: ChildNode,\n ...nodes: Array<Node | string>\n ) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array<Node | string> = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array<Node> = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.replaceWith.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (wasConnected) {\n internals.disconnectTree(this);\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.remove !== undefined) {\n destination.remove = function (this: ChildNode) {\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.remove.call(this);\n\n if (wasConnected) {\n internals.disconnectTree(this);\n }\n };\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Utilities from '../Utilities.js';\n\nimport PatchChildNode from './Interface/ChildNode.js';\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n if (Native.Element_attachShadow) {\n Element.prototype.attachShadow = function (\n this: Element,\n init: ShadowRootInit\n ) {\n const shadowRoot = Native.Element_attachShadow.call(this, init);\n internals.patchNode(shadowRoot);\n this.__CE_shadowRoot = shadowRoot;\n return shadowRoot;\n };\n }\n\n function patch_innerHTML(\n destination: Element,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'innerHTML', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Element, htmlString) {\n const isConnected = Utilities.isConnected(this);\n\n // NOTE: In IE11, when using the native `innerHTML` setter, all nodes\n // that were previously descendants of the context element have all of\n // their children removed as part of the set - the entire subtree is\n // 'disassembled'. This work around walks the subtree *before* using the\n // native setter.\n let removedElements: undefined | Array<Element> = undefined;\n if (isConnected) {\n removedElements = [];\n internals.forEachElement(this, (element) => {\n if (element !== this) {\n removedElements!.push(element);\n }\n });\n }\n\n baseDescriptor.set!.call(this, htmlString);\n\n if (removedElements) {\n for (let i = 0; i < removedElements.length; i++) {\n const element = removedElements[i];\n if (element.__CE_state === CEState.custom) {\n internals.disconnectedCallback(element);\n }\n }\n }\n\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(this);\n } else {\n internals.patchAndUpgradeTree(this);\n }\n return htmlString;\n },\n });\n }\n\n if (Native.Element_innerHTML && Native.Element_innerHTML.get) {\n patch_innerHTML(Element.prototype, Native.Element_innerHTML);\n } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {\n patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);\n } else {\n internals.addElementPatch(function (element) {\n patch_innerHTML(element, {\n enumerable: true,\n configurable: true,\n // Implements getting `innerHTML` by performing an unpatched `cloneNode`\n // of the element and returning the resulting element's `innerHTML`.\n // TODO: Is this too expensive?\n get: function (this: Element) {\n return (Native.Node_cloneNode.call(this, true) as Element).innerHTML;\n },\n // Implements setting `innerHTML` by creating an unpatched element,\n // setting `innerHTML` of that element and replacing the target\n // element's children with those of the unpatched element.\n set: function (this: Element, assignedValue) {\n // NOTE: re-route to `content` for `template` elements.\n // We need to do this because `template.appendChild` does not\n // route into `template.content`.\n const isTemplate = this.localName === 'template';\n const content = isTemplate\n ? (this as HTMLTemplateElement).content\n : this;\n const rawElement = Native.Document_createElementNS.call(\n document,\n this.namespaceURI,\n this.localName\n );\n rawElement.innerHTML = assignedValue;\n\n while (content.childNodes.length > 0) {\n Native.Node_removeChild.call(content, content.childNodes[0]);\n }\n const container = isTemplate\n ? (rawElement as HTMLTemplateElement).content\n : rawElement;\n while (container.childNodes.length > 0) {\n Native.Node_appendChild.call(content, container.childNodes[0]);\n }\n },\n });\n });\n }\n\n Element.prototype.setAttribute = function (this: Element, name, newValue) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttribute.call(this, name, newValue);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_setAttribute.call(this, name, newValue);\n newValue = Native.Element_getAttribute.call(this, name)!;\n internals.attributeChangedCallback(this, name, oldValue, newValue, null);\n };\n\n Element.prototype.setAttributeNS = function (\n this: Element,\n namespace,\n name,\n newValue\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttributeNS.call(\n this,\n namespace,\n name,\n newValue\n );\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_setAttributeNS.call(this, namespace, name, newValue);\n newValue = Native.Element_getAttributeNS.call(this, namespace, name)!;\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n };\n\n Element.prototype.removeAttribute = function (this: Element, name) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttribute.call(this, name);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_removeAttribute.call(this, name);\n if (oldValue !== null) {\n internals.attributeChangedCallback(this, name, oldValue, null, null);\n }\n };\n\n if (Native.Element_toggleAttribute) {\n Element.prototype.toggleAttribute = function (\n this: Element,\n name,\n force?: boolean | undefined\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_toggleAttribute.call(this, name, force);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n const hadAttribute = oldValue !== null;\n const hasAttribute = Native.Element_toggleAttribute.call(\n this,\n name,\n force\n );\n if (hadAttribute !== hasAttribute) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n hasAttribute ? '' : null,\n null\n );\n }\n return hasAttribute;\n };\n }\n\n Element.prototype.removeAttributeNS = function (\n this: Element,\n namespace,\n name\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttributeNS.call(this, namespace, name);\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_removeAttributeNS.call(this, namespace, name);\n // In older browsers, `Element#getAttributeNS` may return the empty string\n // instead of null if the attribute does not exist. For details, see;\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes\n const newValue = Native.Element_getAttributeNS.call(this, namespace, name);\n if (oldValue !== newValue) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n }\n };\n\n function patch_insertAdjacentElement(\n destination: Element,\n baseMethod: Element['insertAdjacentElement']\n ) {\n destination.insertAdjacentElement = function (\n this: Element,\n position,\n element\n ) {\n const wasConnected = Utilities.isConnected(element);\n const insertedElement = baseMethod.call(this, position, element)!;\n\n if (wasConnected) {\n internals.disconnectTree(element);\n }\n\n if (Utilities.isConnected(insertedElement)) {\n internals.connectTree(element);\n }\n return insertedElement;\n };\n }\n\n if (Native.HTMLElement_insertAdjacentElement) {\n patch_insertAdjacentElement(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentElement\n );\n } else if (Native.Element_insertAdjacentElement) {\n patch_insertAdjacentElement(\n Element.prototype,\n Native.Element_insertAdjacentElement\n );\n }\n\n function patch_insertAdjacentHTML(\n destination: Element,\n baseMethod: Element['insertAdjacentHTML']\n ) {\n /**\n * Patches and upgrades all nodes which are siblings between `start`\n * (inclusive) and `end` (exclusive). If `end` is `null`, then all siblings\n * following `start` will be patched and upgraded.\n */\n function upgradeNodesInRange(start: Node, end: Node | null) {\n const nodes = [];\n for (let node: Node = start; node !== end; node = node.nextSibling!) {\n nodes.push(node);\n }\n for (let i = 0; i < nodes.length; i++) {\n internals.patchAndUpgradeTree(nodes[i]);\n }\n }\n\n destination.insertAdjacentHTML = function (this: Element, position, text) {\n const strPosition = position.toLowerCase();\n\n if (strPosition === 'beforebegin') {\n const marker = this.previousSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.parentNode!.firstChild!, this);\n } else if (strPosition === 'afterbegin') {\n const marker = this.firstChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.firstChild!, marker);\n } else if (strPosition === 'beforeend') {\n const marker = this.lastChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.firstChild!, null);\n } else if (strPosition === 'afterend') {\n const marker = this.nextSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.nextSibling!, marker);\n } else {\n throw new SyntaxError(\n `The value provided (${String(strPosition)}) is ` +\n \"not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.\"\n );\n }\n };\n }\n\n if (Native.HTMLElement_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentHTML\n );\n } else if (Native.Element_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n Element.prototype,\n Native.Element_insertAdjacentHTML\n );\n }\n\n PatchParentNode(internals, Element.prototype, {\n prepend: Native.Element_prepend,\n append: Native.Element_append,\n });\n\n PatchChildNode(internals, Element.prototype, {\n before: Native.Element_before,\n after: Native.Element_after,\n replaceWith: Native.Element_replaceWith,\n remove: Native.Element_remove,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Represents the 'already constructed marker' used in custom\n * element construction stacks.\n *\n * https://html.spec.whatwg.org/#concept-already-constructed-marker\n */\nconst alreadyConstructedMarker = {} as {_alreadyConstructedMarker: never};\n\nexport default alreadyConstructedMarker;\nexport type AlreadyConstructedMarkerType = typeof alreadyConstructedMarker;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport AlreadyConstructedMarker from '../AlreadyConstructedMarker.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n const PatchedHTMLElement = function HTMLElement(this: HTMLElement) {\n // This should really be `new.target` but `new.target` can't be\n // emulated in ES5. Assuming the user keeps the default value of the\n // constructor's prototype's `constructor` property, this is\n // equivalent.\n const constructor = this.constructor as {new (): HTMLElement};\n\n // Always look up the definition from the global registry.\n const registry = document.__CE_registry!;\n const definition = registry.internal_constructorToDefinition(constructor);\n if (!definition) {\n throw new Error(\n 'Failed to construct a custom element: ' +\n 'The constructor was not registered with `customElements`.'\n );\n }\n\n const constructionStack = definition.constructionStack;\n\n if (constructionStack.length === 0) {\n const element = Native.Document_createElement.call(\n document,\n definition.localName\n ) as HTMLElement;\n Object.setPrototypeOf(element, constructor.prototype as typeof element);\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n internals.patchElement(element);\n return element;\n }\n\n const lastIndex = constructionStack.length - 1;\n const element = constructionStack[lastIndex];\n if (element === AlreadyConstructedMarker) {\n const localName = definition.localName;\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'This element was already constructed.'\n );\n }\n const toConstructElement = element as HTMLElement;\n constructionStack[lastIndex] = AlreadyConstructedMarker;\n\n Object.setPrototypeOf(\n toConstructElement,\n constructor.prototype as typeof toConstructElement\n );\n internals.patchElement(toConstructElement);\n\n return toConstructElement;\n };\n\n PatchedHTMLElement.prototype = Native.HTMLElement.prototype;\n // Safari 9 has `writable: false` on the propertyDescriptor\n // Make it writable so that TypeScript can patch up the\n // constructor in the ES5 compiled code.\n Object.defineProperty(HTMLElement.prototype, 'constructor', {\n writable: true,\n configurable: true,\n enumerable: false,\n value: PatchedHTMLElement,\n });\n\n window['HTMLElement'] = (PatchedHTMLElement as unknown) as typeof HTMLElement;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport * as Utilities from '../Utilities.js';\n\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n // `Node#nodeValue` is implemented on `Attr`.\n // `Node#textContent` is implemented on `Attr`, `Element`.\n\n Node.prototype.insertBefore = function <T extends Node>(\n this: Node,\n node: T,\n refNode: Node | null\n ) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_insertBefore.call(this, node, refNode);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult as T;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_insertBefore.call(\n this,\n node,\n refNode\n ) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.appendChild = function <T extends Node>(this: Node, node: T) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.cloneNode = function (this: Node, deep) {\n const clone = Native.Node_cloneNode.call(this, !!deep);\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Node.prototype.removeChild = function <T extends Node>(this: Node, node: T) {\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_removeChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.replaceChild = function <T extends Node>(\n this: Node,\n nodeToInsert: Node,\n nodeToRemove: T\n ) {\n if (nodeToInsert instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n internals.disconnectTree(nodeToRemove);\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeToInsertWasConnectedElement =\n nodeToInsert instanceof Element && Utilities.isConnected(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n const thisIsConnected = Utilities.isConnected(this);\n\n if (thisIsConnected) {\n internals.disconnectTree(nodeToRemove);\n }\n\n if (nodeToInsertWasConnectedElement) {\n internals.disconnectTree(nodeToInsert);\n }\n\n if (thisIsConnected) {\n internals.connectTree(nodeToInsert);\n }\n\n return nativeResult;\n };\n\n function patch_textContent(\n destination: Node,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'textContent', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Node, assignedValue) {\n // If this is a text node then there are no nodes to disconnect.\n if (this.nodeType === Node.TEXT_NODE) {\n baseDescriptor.set!.call(this, assignedValue);\n return;\n }\n\n let removedNodes = undefined;\n // Checking for `firstChild` is faster than reading `childNodes.length`\n // to compare with 0.\n if (this.firstChild) {\n // Using `childNodes` is faster than `children`, even though we only\n // care about elements.\n const childNodes = this.childNodes;\n const childNodesLength = childNodes.length;\n if (childNodesLength > 0 && Utilities.isConnected(this)) {\n // Copying an array by iterating is faster than using slice.\n removedNodes = new Array(childNodesLength);\n for (let i = 0; i < childNodesLength; i++) {\n removedNodes[i] = childNodes[i];\n }\n }\n }\n\n baseDescriptor.set!.call(this, assignedValue);\n\n if (removedNodes) {\n for (let i = 0; i < removedNodes.length; i++) {\n internals.disconnectTree(removedNodes[i]);\n }\n }\n },\n });\n }\n\n if (Native.Node_textContent && Native.Node_textContent.get) {\n patch_textContent(Node.prototype, Native.Node_textContent);\n } else {\n internals.addNodePatch(function (element) {\n patch_textContent(element, {\n enumerable: true,\n configurable: true,\n // NOTE: This implementation of the `textContent` getter assumes that\n // text nodes' `textContent` getter will not be patched.\n get: function (this: Node) {\n const parts: Array<string | null> = [];\n\n for (let n = this.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.COMMENT_NODE) {\n continue;\n }\n parts.push(n.textContent);\n }\n\n return parts.join('');\n },\n set: function (this: Node, assignedValue) {\n while (this.firstChild) {\n Native.Node_removeChild.call(this, this.firstChild);\n }\n // `textContent = null | undefined | ''` does not result in\n // a TextNode childNode\n if (assignedValue != null && assignedValue !== '') {\n Native.Node_appendChild.call(\n this,\n document.createTextNode(assignedValue)\n );\n }\n },\n });\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n PatchParentNode(internals, DocumentFragment.prototype, {\n prepend: Native.DocumentFragment_prepend,\n append: Native.DocumentFragment_append,\n });\n}\n"]}
@@ -0,0 +1 @@
1
+ (function(){"use strict";function e(e){var t,n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return n?n.call(e):{next:(t=0,function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}})}}var t=document.createEvent("Event");if(t.initEvent("foo",!0,!0),t.preventDefault(),!t.defaultPrevented){var n=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if(!window.Event||r&&"function"!=typeof window.Event){var o=window.Event;if(window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,!!t.bubbles,!!t.cancelable),n},o){for(var i in o)window.Event[i]=o[i];window.Event.prototype=o.prototype}}if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.MouseEvent||r&&"function"!=typeof window.MouseEvent){var l=window.MouseEvent;if(window.MouseEvent=function(e,t){t=t||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,!!t.bubbles,!!t.cancelable,t.view||window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),n},l)for(var a in l)window.MouseEvent[a]=l[a];window.MouseEvent.prototype=l.prototype}var c,p=function(){function e(){o++}var t=!1,n=!1,r={get capture(){return t=!0},get once(){return n=!0}},o=0,i=document.createElement("div");i.addEventListener("click",e,r);var l=t&&n;return l&&(i.dispatchEvent(new Event("click")),i.dispatchEvent(new Event("click")),l=1==o),i.removeEventListener("click",e,r),l}(),u=null!=(c=window.EventTarget)?c:window.Node;if(!p&&"addEventListener"in u.prototype){var s=function(e){if(e&&("object"==typeof e||"function"==typeof e))t=!!e.capture,e=!!e.once;else{var t=!!e;e=!1}return{capture:t,once:e}},d=u.prototype.addEventListener,v=u.prototype.removeEventListener,f=new WeakMap,y=new WeakMap,h=function(e,t,n){var r=n?f:y;return void 0===(n=r.get(e))&&r.set(e,n=new Map),void 0===(e=n.get(t))&&n.set(t,e=new WeakMap),e};u.prototype.addEventListener=function(e,t,n){var r=this;if(null!=t){var o=(n=s(n)).capture;n=n.once;var i=h(this,e,o);if(!i.has(t)){var l=n?function(n){return(i.delete(t),v.call(r,e,l,o),"function"==typeof t)?t.call(r,n):"function"==typeof(null==t?void 0:t.handleEvent)?t.handleEvent(n):void 0}:null;i.set(t,l),d.call(this,e,null!=l?l:t,o)}}},u.prototype.removeEventListener=function(e,t,n){if(null!=t){var r=h(this,e,n=s(n).capture),o=r.get(t);void 0!==o&&(r.delete(t),v.call(this,e,null!=o?o:t,n))}}}Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var e=(this.ownerDocument||this).querySelector("base[href]");return e&&e.href||window.location.href},configurable:!0,enumerable:!0});var w,b,m=Element.prototype,g=null!=(w=Object.getOwnPropertyDescriptor(m,"attributes"))?w:Object.getOwnPropertyDescriptor(Node.prototype,"attributes"),E=null!=(b=null==g?void 0:g.get)?b:function(){return this.attributes},O=Array.prototype.map;m.hasOwnProperty("getAttributeNames")||(m.getAttributeNames=function(){return O.call(E.call(this),function(e){return e.name})});var N,P=Element.prototype;P.hasOwnProperty("matches")||(P.matches=null!=(N=P.webkitMatchesSelector)?N:P.msMatchesSelector);var D=Node.prototype.appendChild;function j(t){(t=t.prototype).hasOwnProperty("append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];for(r=(n=e(n)).next();!r.done;r=n.next())r=r.value,D.call(this,"string"==typeof r?document.createTextNode(r):r)}})}j(Document),j(DocumentFragment),j(Element);var x,C,M=Node.prototype.insertBefore,L=null!=(C=null==(x=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))?void 0:x.get)?C:function(){return this.firstChild};function T(t){(t=t.prototype).hasOwnProperty("prepend")||Object.defineProperty(t,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];r=L.call(this),n=e(n);for(var o=n.next();!o.done;o=n.next())o=o.value,M.call(this,"string"==typeof o?document.createTextNode(o):o,r)}})}T(Document),T(DocumentFragment),T(Element);var A,S,k=Node.prototype.appendChild,W=Node.prototype.removeChild,B=null!=(S=null==(A=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))?void 0:A.get)?S:function(){return this.firstChild};function K(t){(t=t.prototype).hasOwnProperty("replaceChildren")||Object.defineProperty(t,"replaceChildren",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];for(;null!==(r=B.call(this));)W.call(this,r);for(r=(n=e(n)).next();!r.done;r=n.next())r=r.value,k.call(this,"string"==typeof r?document.createTextNode(r):r)}})}K(Document),K(DocumentFragment),K(Element);var F,I,R,U,X=Node.prototype.insertBefore,Y=null!=(I=null==(F=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))?void 0:F.get)?I:function(){return this.parentNode},q=null!=(U=null==(R=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling"))?void 0:R.get)?U:function(){return this.nextSibling};function G(t){(t=t.prototype).hasOwnProperty("after")||Object.defineProperty(t,"after",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];if(null!==(r=Y.call(this))){var o=q.call(this);n=e(n);for(var i=n.next();!i.done;i=n.next())i=i.value,X.call(r,"string"==typeof i?document.createTextNode(i):i,o)}}})}G(CharacterData),G(Element);var H,V,z=Node.prototype.insertBefore,J=null!=(V=null==(H=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))?void 0:H.get)?V:function(){return this.parentNode};function Q(t){(t=t.prototype).hasOwnProperty("before")||Object.defineProperty(t,"before",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];if(null!==(r=J.call(this))){n=e(n);for(var o=n.next();!o.done;o=n.next())o=o.value,z.call(r,"string"==typeof o?document.createTextNode(o):o,this)}}})}Q(CharacterData),Q(Element);var Z,$,_=Node.prototype.removeChild,ee=null!=($=null==(Z=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))?void 0:Z.get)?$:function(){return this.parentNode};function et(e){(e=e.prototype).hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=ee.call(this);e&&_.call(e,this)}})}et(CharacterData),et(Element);var en,er,eo=Node.prototype.insertBefore,ei=Node.prototype.removeChild,el=null!=(er=null==(en=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))?void 0:en.get)?er:function(){return this.parentNode};function ea(t){(t=t.prototype).hasOwnProperty("replaceWith")||Object.defineProperty(t,"replaceWith",{configurable:!0,enumerable:!0,writable:!0,value:function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];if(null!==(r=el.call(this))){n=e(n);for(var o=n.next();!o.done;o=n.next())o=o.value,eo.call(r,"string"==typeof o?document.createTextNode(o):o,this);ei.call(r,this)}}})}ea(CharacterData),ea(Element);var ec=window.Element.prototype,ep=window.HTMLElement.prototype,eu=window.SVGElement.prototype;!ep.hasOwnProperty("classList")||ec.hasOwnProperty("classList")||eu.hasOwnProperty("classList")||Object.defineProperty(ec,"classList",Object.getOwnPropertyDescriptor(ep,"classList"));var es=Element.prototype,ed=Element.prototype.hasAttribute,ev=Element.prototype.setAttribute,ef=Element.prototype.removeAttribute;es.hasOwnProperty("toggleAttribute")||(es.toggleAttribute=function(e,t){return void 0===t?ed.call(this,e)?(ef.call(this,e),!1):(ev.call(this,e,""),!0):t?(ed.call(this,e)||ev.call(this,e,""),!0):(ef.call(this,e),!1)})}).call(this);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[" [synthetic:es6/util/arrayiterator] "," [synthetic:es6/util/makeiterator] ","ts_src/platform/custom-event.ts","ts_src/platform/event-listener-options.ts","ts_src/platform/baseuri.ts","ts_src/platform/get-attribute-names.ts","ts_src/platform/matches.ts","ts_src/platform/parent-node/append.ts","ts_src/platform/parent-node/prepend.ts","ts_src/platform/parent-node/replace-children.ts","ts_src/platform/child-node/after.ts","ts_src/platform/child-node/before.ts","ts_src/platform/child-node/remove.ts","ts_src/platform/child-node/replace-with.ts","ts_src/platform/svg-element-class-list.ts","ts_src/platform/toggle-attribute.ts"],"names":["$jscomp.arrayIteratorImpl","e","document","createEvent","initEvent","preventDefault","defaultPrevented","origPreventDefault","Event","prototype","Event.prototype.preventDefault","cancelable","call","Object","defineProperty","get","configurable","isIE","test","navigator","userAgent","window","origEvent","inType","params","bubbles","i","CustomEvent","initCustomEvent","detail","MouseEvent","origMouseEvent","initMouseEvent","view","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","j","_a","supportsEventOptions","listener","callCount","supported","onceSupported","eventOptions","capture","once","d","createElement","addEventListener","fullySupported","dispatchEvent","removeEventListener","nativeEventTarget","EventTarget","Node","parseEventOptions","optionsOrCapture","origAddEventListener","origRemoveEventListener","captureListenerMap","WeakMap","listenerMap","getListenerMap","target","type","elMap","typeMap","undefined","set","Map","listeners","nativeEventTarget.prototype.addEventListener","options","map","has","cachedListener","delete","handleEvent","nativeEventTarget.prototype.removeEventListener","native_baseURI","getOwnPropertyDescriptor","base","ownerDocument","querySelector","href","location","enumerable","_b","Element_prototype","Element","attributesDescriptor","getAttributes","attributes","Array","hasOwnProperty","getAttributeNames","Element_prototype.getAttributeNames","attr","name","matches","webkitMatchesSelector","msMatchesSelector","nativeAppendChild","appendChild","installAppend","constructor","writable","value","append","args","$jscomp.makeIterator","arg","createTextNode","Document","DocumentFragment","nativeInsertBefore","insertBefore","nativeGetFirstChild","firstChild","installPrepend","prepend","newNode","nativeRemoveChild","removeChild","installReplaceChildren","replaceChildren","child","_c","_d","nativeGetParentNode","parentNode","nativeGetNextSibling","nextSibling","installAfter","after","CharacterData","installBefore","before","installRemove","remove","installReplaceWith","replaceWith","HTMLElement_prototype","HTMLElement","SVGElement_prototype","nativeHasAttribute","hasAttribute","nativeSetAttribute","setAttribute","nativeRemoveAttribute","removeAttribute","toggleAttribute","Element_prototype.toggleAttribute","force"],"mappings":"A;;;;;;;;;;;;;;;;;;;aA2B4B,QAAA,GAAQ,CAAC,CAAD,CAAQ,CAC1C,IAAI,EAAQ,CACZ,OAAO,SAAQ,EAAG,CAChB,MAAI,EAAJ,CAAY,CAAZ,CAAkB,MAAlB,C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8B8F,CAA9B,CAAoC,EAApC,CACA,OAAO,CAAA,CANc,CASzB,GAAIuD,CAAJ,CAIE,MAHKR,GAAA,CAAmB7I,IAAnB,CAAwB,IAAxB,CAA8B8F,CAA9B,CAGE,EAFLiD,EAAA,CAAmB/I,IAAnB,CAAwB,IAAxB,CAA8B8F,CAA9B,CAAoC,EAApC,CAEK,CAAA,CAAA,CAGTmD,GAAA,CAAsBjJ,IAAtB,CAA2B,IAA3B,CAAiC8F,CAAjC,CACA,OAAO,CAAA,CAnBQ,CAJnB,C","file":"webcomponents-pf_dom.js","sourcesContent":[null,null,"/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\n// defaultPrevented is broken in IE.\n// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called\nconst workingDefaultPrevented = (() => {\n const e = document.createEvent('Event');\n e.initEvent('foo', true, true);\n e.preventDefault();\n return e.defaultPrevented;\n})();\n\nif (!workingDefaultPrevented) {\n const origPreventDefault = Event.prototype.preventDefault;\n Event.prototype.preventDefault = function (this: Event) {\n if (!this.cancelable) {\n return;\n }\n\n origPreventDefault.call(this);\n\n Object.defineProperty(this, 'defaultPrevented', {\n get() {\n return true;\n },\n configurable: true,\n });\n };\n}\n\nconst isIE = /Trident/.test(navigator.userAgent);\n\n// Event constructor shim\nif (!window.Event || (isIE && typeof window.Event !== 'function')) {\n const origEvent = window.Event as typeof Event;\n window['Event'] = (((inType: string, params?: EventInit) => {\n params = params || {};\n const e = document.createEvent('Event');\n e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));\n return e;\n }) as unknown) as typeof Event;\n if (origEvent) {\n for (const i in origEvent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window['Event'] as any)[i] = (origEvent as any)[i];\n }\n window['Event'].prototype = origEvent.prototype;\n }\n}\n\n// CustomEvent constructor shim\nif (!window.CustomEvent || (isIE && typeof window.CustomEvent !== 'function')) {\n window['CustomEvent'] = ((<T>(\n inType: string,\n params?: CustomEventInit<T>\n ) => {\n params = params || {};\n const e: CustomEvent<T> = document.createEvent('CustomEvent');\n e.initCustomEvent(\n inType,\n Boolean(params.bubbles),\n Boolean(params.cancelable),\n params.detail!\n );\n return e;\n }) as unknown) as typeof CustomEvent;\n window['CustomEvent'].prototype = window.Event.prototype as CustomEvent;\n}\n\nif (!window.MouseEvent || (isIE && typeof window.MouseEvent !== 'function')) {\n const origMouseEvent = window.MouseEvent as typeof MouseEvent;\n window['MouseEvent'] = (((inType: string, params?: MouseEventInit) => {\n params = params || {};\n const e = document.createEvent('MouseEvent');\n e.initMouseEvent(\n inType,\n Boolean(params.bubbles),\n Boolean(params.cancelable),\n params.view || window,\n params.detail!,\n params.screenX!,\n params.screenY!,\n params.clientX!,\n params.clientY!,\n params.ctrlKey!,\n params.altKey!,\n params.shiftKey!,\n params.metaKey!,\n params.button!,\n params.relatedTarget!\n );\n return e;\n }) as unknown) as typeof MouseEvent;\n if (origMouseEvent) {\n for (const j in origMouseEvent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window.MouseEvent as any)[j] = (origMouseEvent as any)[j];\n }\n }\n window['MouseEvent'].prototype = origMouseEvent.prototype;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport {};\n\n// Older browsers like IE do not support an object as the options parameter\n// to add/removeEventListener.\n// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called\nconst supportsEventOptions = (() => {\n let supported = false;\n let onceSupported = false;\n const eventOptions = {\n get capture() {\n supported = true;\n return true;\n },\n\n get once() {\n onceSupported = true;\n return true;\n },\n };\n let callCount = 0;\n const listener = () => {\n callCount++;\n };\n const d = document.createElement('div');\n // NOTE: These will be unpatched at this point.\n d.addEventListener('click', listener, eventOptions);\n let fullySupported = supported && onceSupported;\n // Once + capture broken on Edge >= 17 < 79.\n if (fullySupported) {\n d.dispatchEvent(new Event('click'));\n d.dispatchEvent(new Event('click'));\n fullySupported = callCount == 1;\n }\n d.removeEventListener('click', listener, eventOptions);\n return fullySupported;\n})();\n\nconst nativeEventTarget = window.EventTarget ?? window.Node;\n\nif (\n !supportsEventOptions &&\n 'addEventListener' in nativeEventTarget.prototype\n) {\n const parseEventOptions = (\n optionsOrCapture?: boolean | AddEventListenerOptions\n ) => {\n let capture, once;\n if (\n optionsOrCapture &&\n (typeof optionsOrCapture === 'object' ||\n typeof optionsOrCapture === 'function')\n ) {\n capture = Boolean((optionsOrCapture as AddEventListenerOptions).capture);\n once = Boolean((optionsOrCapture as AddEventListenerOptions).once);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n }\n return {\n capture,\n once,\n };\n };\n\n const origAddEventListener = nativeEventTarget.prototype.addEventListener;\n const origRemoveEventListener =\n nativeEventTarget.prototype.removeEventListener;\n\n type ListenerMap = WeakMap<\n EventListenerOrEventListenerObject,\n EventListenerOrEventListenerObject | null\n >;\n type TypeMap = Map<string, ListenerMap>;\n type ElementListenerMap = WeakMap<EventTarget, TypeMap>;\n\n const captureListenerMap: ElementListenerMap = new WeakMap();\n const listenerMap: ElementListenerMap = new WeakMap();\n\n const getListenerMap = (\n target: EventTarget,\n type: string,\n capture: boolean\n ) => {\n const elMap = capture ? captureListenerMap : listenerMap;\n let typeMap = elMap.get(target);\n if (typeMap === undefined) {\n elMap.set(target, (typeMap = new Map()));\n }\n let listeners = typeMap.get(type);\n if (listeners === undefined) {\n typeMap.set(type, (listeners = new WeakMap()));\n }\n return listeners;\n };\n\n nativeEventTarget.prototype.addEventListener = function (\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions | undefined\n ) {\n if (listener == null) {\n return;\n }\n const {capture, once} = parseEventOptions(options);\n const map = getListenerMap(this, type, capture);\n if (!map.has(listener)) {\n const cachedListener = once\n ? (e: Event) => {\n map.delete(listener);\n origRemoveEventListener.call(this, type, cachedListener, capture);\n if (typeof listener === 'function') {\n return listener.call(this, e);\n }\n\n if (typeof listener?.handleEvent === 'function') {\n return listener.handleEvent(e);\n }\n }\n : null;\n map.set(listener, cachedListener);\n // Note, the cached listener is null if no wrapper is used to avoid\n // a strong ref to it;\n origAddEventListener.call(\n this,\n type,\n cachedListener ?? listener,\n capture\n );\n }\n };\n\n nativeEventTarget.prototype.removeEventListener = function (\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions | undefined\n ) {\n if (listener == null) {\n return;\n }\n const {capture} = parseEventOptions(options);\n const map = getListenerMap(this, type, capture);\n const cachedListener = map.get(listener);\n if (cachedListener !== undefined) {\n map.delete(listener);\n // Note, the cached listener is null if no wrapper was used so that a\n // strong ref to it is not kept.\n origRemoveEventListener.call(\n this,\n type,\n cachedListener ?? listener,\n capture\n );\n }\n };\n}\n","/**\n@license\nCopyright (c) 2018 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// Implement Node.baseURI for IE 11\n// adapted from\n// https://github.com/webcomponents/html-imports/blob/v1.2.0/src/html-imports.js\n\nconst native_baseURI = Object.getOwnPropertyDescriptor(\n Node.prototype,\n 'baseURI'\n);\nif (!native_baseURI) {\n Object.defineProperty(Node.prototype, 'baseURI', {\n get(this: Node): string {\n // this.ownerDocument is `null` for documents\n const doc = this.ownerDocument || (this as Document);\n const base = doc.querySelector('base[href]') as HTMLBaseElement;\n return (base && base.href) || window.location.href;\n },\n configurable: true,\n enumerable: true,\n });\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\n// In IE11, the `attributes` descriptor is on `Node.prototype`.\nconst attributesDescriptor =\n Object.getOwnPropertyDescriptor(Element_prototype, 'attributes') ??\n Object.getOwnPropertyDescriptor(Node.prototype, 'attributes');\n// In Safari 9, the `attributes` descriptor's getter is undefined. In Chrome 41,\n// the `attributes` descriptor is a data descriptor on each Element instance.\nconst getAttributes =\n attributesDescriptor?.get ??\n function (this: Element) {\n return this.attributes;\n };\nconst map = Array.prototype.map;\n\nif (!Element_prototype.hasOwnProperty('getAttributeNames')) {\n Element_prototype.getAttributeNames = function getAttributeNames(\n this: Element\n ): Array<string> {\n return map.call(\n getAttributes.call(this),\n (attr) => attr.name\n ) as Array<string>;\n };\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\n\nif (!Element_prototype.hasOwnProperty('matches')) {\n Element_prototype.matches =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Element_prototype as any).webkitMatchesSelector as Element['matches']) ??\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Element_prototype as any).msMatchesSelector as Element['matches']);\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeAppendChild = Node.prototype.appendChild;\n\nconst installAppend = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('append')) {\n return;\n }\n\n Object.defineProperty(prototype, 'append', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function append(...args: Array<Node | string>) {\n for (const arg of args) {\n nativeAppendChild.call(\n this,\n typeof arg === 'string' ? document.createTextNode(arg) : arg\n );\n }\n },\n });\n};\n\ninstallAppend(Document);\ninstallAppend(DocumentFragment);\ninstallAppend(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetFirstChild =\n // In Chrome 41, `firstChild` is a data descriptor on every instance, not a\n // accessor descriptor on `Node.prototype`.\n Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')?.get ??\n // In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.firstChild;\n };\n\nconst installPrepend = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('prepend')) {\n return;\n }\n\n Object.defineProperty(prototype, 'prepend', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function prepend(...args: Array<Node | string>) {\n const firstChild = nativeGetFirstChild.call(this);\n for (const arg of args) {\n const newNode =\n typeof arg === 'string' ? document.createTextNode(arg) : arg;\n nativeInsertBefore.call(this, newNode, firstChild);\n }\n },\n });\n};\n\ninstallPrepend(Document);\ninstallPrepend(DocumentFragment);\ninstallPrepend(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeAppendChild = Node.prototype.appendChild;\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetFirstChild =\n // In Chrome 41, `firstChild` is a data descriptor on every instance, not a\n // accessor descriptor on `Node.prototype`.\n Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')?.get ??\n // In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.firstChild;\n };\n\nconst installReplaceChildren = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('replaceChildren')) {\n return;\n }\n\n Object.defineProperty(prototype, 'replaceChildren', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function replaceChildren(...args: Array<Node | string>) {\n let child;\n while ((child = nativeGetFirstChild.call(this)) !== null) {\n nativeRemoveChild.call(this, child);\n }\n\n for (const arg of args) {\n nativeAppendChild.call(\n this,\n typeof arg === 'string' ? document.createTextNode(arg) : arg\n );\n }\n },\n });\n};\n\ninstallReplaceChildren(Document);\ninstallReplaceChildren(DocumentFragment);\ninstallReplaceChildren(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\nconst nativeGetNextSibling =\n Object.getOwnPropertyDescriptor(Node.prototype, 'nextSibling')?.get ??\n // In Safari 9, the `nextSibling` descriptor's `get` and `set` are\n // undefined.\n function (this: Node) {\n return this.nextSibling;\n };\n\nconst installAfter = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('after')) {\n return;\n }\n\n Object.defineProperty(prototype, 'after', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function after(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n const nextSibling = nativeGetNextSibling.call(this);\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n nextSibling\n );\n }\n },\n });\n};\n\ninstallAfter(CharacterData);\ninstallAfter(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installBefore = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('before')) {\n return;\n }\n\n Object.defineProperty(prototype, 'before', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function before(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n this\n );\n }\n },\n });\n};\n\ninstallBefore(CharacterData);\ninstallBefore(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installRemove = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('remove')) {\n return;\n }\n\n Object.defineProperty(prototype, 'remove', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function remove() {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode) {\n nativeRemoveChild.call(parentNode, this);\n }\n },\n });\n};\n\ninstallRemove(CharacterData);\ninstallRemove(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Constructor<T> = new (...args: Array<any>) => T;\n\nconst nativeInsertBefore = Node.prototype.insertBefore;\nconst nativeRemoveChild = Node.prototype.removeChild;\nconst nativeGetParentNode =\n Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')?.get ??\n // In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined.\n function (this: Node) {\n return this.parentNode;\n };\n\nconst installReplaceWith = <T>(constructor: Constructor<T>) => {\n const prototype = constructor.prototype;\n if (prototype.hasOwnProperty('replaceWith')) {\n return;\n }\n\n Object.defineProperty(prototype, 'replaceWith', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function replaceWith(...args: Array<Node | string>) {\n const parentNode = nativeGetParentNode.call(this);\n if (parentNode === null) {\n return;\n }\n\n for (const arg of args) {\n nativeInsertBefore.call(\n parentNode,\n typeof arg === 'string' ? document.createTextNode(arg) : arg,\n this\n );\n }\n\n nativeRemoveChild.call(parentNode, this);\n },\n });\n};\n\ninstallReplaceWith(CharacterData);\ninstallReplaceWith(Element);\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = window.Element.prototype;\nconst HTMLElement_prototype = window.HTMLElement.prototype;\nconst SVGElement_prototype = window['SVGElement'].prototype;\n\n// Thanks to @justinfagnani for finding this:\n//\n// In IE11, `classList` is only supported on `HTMLElement` instances: the\n// descriptor is an own property of `HTMLElement.prototype` and is an accessor\n// descriptor with `set` as `undefined` and no `get`. However, it seems to be\n// implemented generically enough such that copying it to something in the\n// prototype chain of `SVGElement` correctly adds support for `classList` (as\n// far as `DOMTokenList` implemented in IE11).\nif (\n HTMLElement_prototype.hasOwnProperty('classList') &&\n !Element_prototype.hasOwnProperty('classList') &&\n !SVGElement_prototype.hasOwnProperty('classList')\n) {\n Object.defineProperty(\n Element_prototype,\n 'classList',\n Object.getOwnPropertyDescriptor(HTMLElement_prototype, 'classList')!\n );\n}\n","/**\n@license\nCopyright (c) 2020 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nexport {};\n\nconst Element_prototype = Element.prototype;\nconst nativeHasAttribute = Element.prototype.hasAttribute;\nconst nativeSetAttribute = Element.prototype.setAttribute;\nconst nativeRemoveAttribute = Element.prototype.removeAttribute;\n\nif (!Element_prototype.hasOwnProperty('toggleAttribute')) {\n Element_prototype.toggleAttribute = function toggleAttribute(\n this: Element,\n name: string,\n force?: boolean\n ): boolean {\n if (force === undefined) {\n if (nativeHasAttribute.call(this, name)) {\n nativeRemoveAttribute.call(this, name);\n return false;\n } else {\n nativeSetAttribute.call(this, name, '');\n return true;\n }\n }\n if (force) {\n if (!nativeHasAttribute.call(this, name)) {\n nativeSetAttribute.call(this, name, '');\n }\n return true;\n }\n // force is falsey\n nativeRemoveAttribute.call(this, name);\n return false;\n };\n}\n"]}
@@ -0,0 +1 @@
1
+ (function(){"use strict";var t,n,r,e,o,i,u,c,a="function"==typeof Object.defineProperties?Object.defineProperty:function(t,n,r){return t==Array.prototype||t==Object.prototype||(t[n]=r.value),t},l=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function f(t,n){if(n)t:{var r=l;t=t.split(".");for(var e=0;e<t.length-1;e++){var o=t[e];if(!(o in r))break t;r=r[o]}(n=n(e=r[t=t[t.length-1]]))!=e&&null!=n&&a(r,t,{configurable:!0,writable:!0,value:n})}}if(f("Symbol",function(t){function n(t,n){this.g=t,a(this,"description",{configurable:!0,writable:!0,value:n})}if(t)return t;n.prototype.toString=function(){return this.g};var r=0;return function t(e){if(this instanceof t)throw TypeError("Symbol is not a constructor");return new n("jscomp_symbol_"+(e||"")+"_"+r++,e)}}),f("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var n="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),r=0;r<n.length;r++){var e=l[n[r]];"function"==typeof e&&"function"!=typeof e.prototype[t]&&a(e.prototype,t,{configurable:!0,writable:!0,value:function(){var t;return(t={next:t=function(t){var n=0;return function(){return n<t.length?{done:!1,value:t[n++]}:{done:!0}}}(this)})[Symbol.iterator]=function(){return this},t}})}return t}),"function"==typeof Object.setPrototypeOf)u=Object.setPrototypeOf;else{t:{var s={};try{s.__proto__={a:!0},c=s.a;break t}catch(t){}c=!1}u=c?function(t,n){if(t.__proto__=n,t.__proto__!==n)throw TypeError(t+" is not extensible");return t}:null}var h=u;function p(){this.o=!1,this.h=null,this.A=void 0,this.g=1,this.v=0,this.m=null}function y(t){if(t.o)throw TypeError("Generator is already running");t.o=!0}function g(t,n){t.m={B:n,C:!0},t.g=t.v}function v(t,n){return t.g=3,{value:n}}function b(t){this.g=new p,this.h=t}function m(t,n,r,e){try{var o=n.call(t.g.h,r);if(!(o instanceof Object))throw TypeError("Iterator result "+o+" is not an object");if(!o.done)return t.g.o=!1,o;var i=o.value}catch(n){return t.g.h=null,g(t.g,n),d(t)}return t.g.h=null,e.call(t.g,i),d(t)}function d(t){for(;t.g.g;)try{var n=t.h(t.g);if(n)return t.g.o=!1,{value:n.value,done:!1}}catch(n){t.g.A=void 0,g(t.g,n)}if(t.g.o=!1,t.g.m){if(n=t.g.m,t.g.m=null,n.C)throw n.B;return{value:n.return,done:!0}}return{value:void 0,done:!0}}function w(t){this.next=function(n){return y(t.g),t.g.h?n=m(t,t.g.h.next,n,t.g.s):(t.g.s(n),n=d(t)),n},this.throw=function(n){return y(t.g),t.g.h?n=m(t,t.g.h.throw,n,t.g.s):(g(t.g,n),n=d(t)),n},this.return=function(n){var r;return y(t.g),(r=t.g.h)?m(t,"return"in r?r.return:function(t){return{value:t,done:!0}},n,t.g.return):(t.g.return(n),d(t))},this[Symbol.iterator]=function(){return this}}function j(t,n){return n=new w(new b(n)),h&&t.prototype&&h(n,t.prototype),n}p.prototype.s=function(t){this.A=t},p.prototype.return=function(t){this.m={return:t},this.g=this.v},Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t){for(var n,r=[].slice.call(arguments,1),e=0;e<r.length;e++)if(n=r[e])for(var o=Object.keys(n),i=0;i<o.length;i++){var u=o[i];t[u]=n[u]}return t});var S=setTimeout;function _(){}function P(t){if(!(this instanceof P))throw TypeError("Promises must be constructed via new");if("function"!=typeof t)throw TypeError("not a function");this.i=0,this.u=!1,this.j=void 0,this.l=[],I(t,this)}function O(t,n){for(;3===t.i;)t=t.j;0===t.i?t.l.push(n):(t.u=!0,D(function(){var r=1===t.i?n.D:n.F;if(null===r)(1===t.i?A:E)(n.promise,t.j);else{try{var e=r(t.j)}catch(t){E(n.promise,t);return}A(n.promise,e)}}))}function A(t,n){try{if(n===t)throw TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var r=n.then;if(n instanceof P){t.i=3,t.j=n,x(t);return}if("function"==typeof r)return void I(function(){r.apply(n,arguments)},t)}t.i=1,t.j=n,x(t)}catch(n){E(t,n)}}function E(t,n){t.i=2,t.j=n,x(t)}function x(t){2===t.i&&0===t.l.length&&D(function(){t.u||"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t.j)});for(var n=0,r=t.l.length;n<r;n++)O(t,t.l[n]);t.l=null}function T(t,n,r){this.D="function"==typeof t?t:null,this.F="function"==typeof n?n:null,this.promise=r}function I(t,n){var r=!1;try{t(function(t){r||(r=!0,A(n,t))},function(t){r||(r=!0,E(n,t))})}catch(t){r||(r=!0,E(n,t))}}function C(t){return t&&"object"==typeof t&&t.constructor===P?t:new P(function(n){n(t)})}P.prototype.catch=function(t){return this.then(null,t)},P.prototype.then=function(t,n){var r=new this.constructor(_);return O(this,new T(t,n,r)),r},P.prototype.finally=function(t){var n=this.constructor;return this.then(function(r){return n.resolve(t()).then(function(){return r})},function(r){return n.resolve(t()).then(function(){return n.reject(r)})})};var D="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){S(t,0)};if(!window.Promise){window.Promise=P,P.prototype.then=P.prototype.then,P.all=function(t){return new P(function(n,r){if(!t||void 0===t.length)return r(TypeError("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);for(var o=e.length,i=0;i<e.length;i++)!function t(i,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,function(n){t(i,n)},r)}e[i]=u,0==--o&&n(e)}catch(t){r(t)}}(i,e[i])})},P.race=function(t){return new P(function(n,r){if(!t||void 0===t.length)return r(TypeError("Promise.race accepts an array"));for(var e=0,o=t.length;e<o;e++)C(t[e]).then(n,r)})},P.resolve=C,P.reject=function(t){return new P(function(n,r){r(t)})};var k=document.createTextNode(""),M=[];new MutationObserver(function(){for(var t=M.length,n=0;n<t;n++)M[n]();M.splice(0,t)}).observe(k,{characterData:!0}),D=function(t){M.push(t),k.textContent=0<k.textContent.length?"":"a"}}!function(t,n){if(!(n in t)){var r=typeof global==typeof r?window:global,e=0,o=String(Math.random()),i="__\x01symbol@@"+o,u=t.getOwnPropertyNames,c=t.getOwnPropertyDescriptor,a=t.create,l=t.keys,f=t.freeze||t,s=t.defineProperty,h=t.defineProperties,p=c(t,"getOwnPropertyNames"),y=t.prototype,g=y.hasOwnProperty,v=y.propertyIsEnumerable,b=y.toString,m=function(t,n,r){g.call(t,i)||s(t,i,{enumerable:!1,configurable:!1,writable:!1,value:{}}),t[i]["@@"+n]=r},d=function(t,n){var r=a(t);return u(n).forEach(function(t){_.call(n,t)&&T(r,t,n[t])}),r},w=function(){},j=function(t){return t!=i&&!g.call(A,t)},S=function(t){return t!=i&&g.call(A,t)},_=function(t){var n=String(t);return S(n)?g.call(this,n)&&!!this[i]&&this[i]["@@"+n]:v.call(this,t)},P=function(n){return s(y,n,{enumerable:!1,configurable:!0,get:w,set:function(t){C(this,n,{enumerable:!1,configurable:!0,writable:!0,value:t}),m(this,n,!0)}}),A[n]=s(t(n),"constructor",E),f(A[n])},O=function t(n){if(this instanceof t)throw TypeError("Symbol is not a constructor");return P("__\x01symbol:".concat(n||"",o,++e))},A=a(null),E={value:O},x=function(t){return A[t]},T=function(t,n,r){var e=String(n);if(S(e)){if(n=C,r.enumerable){var o=a(r);o.enumerable=!1}else o=r;n(t,e,o),m(t,e,!!r.enumerable)}else s(t,n,r);return t},I=function(t){return u(t).filter(S).map(x)};p.value=T,s(t,"defineProperty",p),p.value=I,s(t,n,p),p.value=function(t){return u(t).filter(j)},s(t,"getOwnPropertyNames",p),p.value=function(t,n){var r=I(n);return r.length?l(n).concat(r).forEach(function(r){_.call(n,r)&&T(t,r,n[r])}):h(t,n),t},s(t,"defineProperties",p),p.value=_,s(y,"propertyIsEnumerable",p),p.value=O,s(r,"Symbol",p),p.value=function(t){return(t="__\x01symbol:".concat("__\x01symbol:",t,o))in y?A[t]:P(t)},s(O,"for",p),p.value=function(t){if(j(t))throw TypeError(t+" is not a symbol");if(g.call(A,t)&&"__\x01symbol:"===(t=t.slice(10)).slice(0,10)&&(t=t.slice(10))!==o)return 0<(t=t.slice(0,t.length-o.length)).length?t:void 0},s(O,"keyFor",p),p.value=function(t,n){var r=c(t,n);return r&&S(n)&&(r.enumerable=_.call(t,n)),r},s(t,"getOwnPropertyDescriptor",p),p.value=function(t,n){return 1==arguments.length||void 0===n?a(t):d(t,n)},s(t,"create",p),p.value=function(){var t=b.call(this);return"[object String]"===t&&S(this)?"[object Symbol]":t},s(y,"toString",p);try{if(!0===a(s({},"__\x01symbol:",{get:function(){return s(this,"__\x01symbol:",{value:!0})["__\x01symbol:"]}}))["__\x01symbol:"])var C=s;else throw"IE11"}catch(t){C=function(t,n,r){var e=c(y,n);delete y[n],s(t,n,r),s(y,n,e)}}}}(Object,"getOwnPropertySymbols"),t=Object,n=Symbol,e=t.defineProperty,i=(o=t.prototype).toString,"iterator match replace search split hasInstance isConcatSpreadable unscopables species toPrimitive toStringTag".split(" ").forEach(function(u){u in n||(e(n,u,{value:n(u)}),"toStringTag"===u&&((r=t.getOwnPropertyDescriptor(o,"toString")).value=function(){var t=i.call(this),r=null==this?this:this[n.toStringTag];return null==r?t:"[object "+r+"]"},e(o,"toString",r)))}),function(t,n,r){function e(){return this}n[t]||(n[t]=function(){var n=0,r=this,o={next:function(){var t=r.length<=n;return t?{done:t}:{done:t,value:r[n++]}}};return o[t]=e,o}),r[t]||(r[t]=function(){var n=String.fromCodePoint,r=this,o=0,i=r.length,u={next:function(){var t=i<=o,e=t?"":n(r.codePointAt(o));return o+=e.length,t?{done:t}:{done:t,value:e}}};return u[t]=e,u})}(Symbol.iterator,Array.prototype,String.prototype);var N=Object.prototype.toString;Object.prototype.toString=function(){return void 0===this?"[object Undefined]":null===this?"[object Null]":N.call(this)},Object.keys=function(t){return Object.getOwnPropertyNames(t).filter(function(n){return(n=Object.getOwnPropertyDescriptor(t,n))&&n.enumerable})},String.prototype[Symbol.iterator]&&String.prototype.codePointAt||(String.prototype[Symbol.iterator]=function t(){var n,r=this;return j(t,function(t){if(1==t.g&&(n=0),3!=t.g)return n<r.length?t=v(t,r[n]):(t.g=0,t=void 0),t;n++,t.g=2})}),Set.prototype[Symbol.iterator]||(Set.prototype[Symbol.iterator]=function t(){var n,r,e=this;return j(t,function(t){if(1==t.g&&(n=[],e.forEach(function(t){n.push(t)}),r=0),3!=t.g)return r<n.length?t=v(t,n[r]):(t.g=0,t=void 0),t;r++,t.g=2})}),Map.prototype[Symbol.iterator]||(Map.prototype[Symbol.iterator]=function t(){var n,r,e=this;return j(t,function(t){if(1==t.g&&(n=[],e.forEach(function(t,r){n.push([r,t])}),r=0),3!=t.g)return r<n.length?t=v(t,n[r]):(t.g=0,t=void 0),t;r++,t.g=2})})}).call(this);