;\nconst _polyfillHostRe = \u002F-shadowcsshost\u002Fgim;\nconst _colonHostRe = \u002F:host\u002Fgim;\nconst _colonSlottedRe = \u002F::slotted\u002Fgim;\nconst _colonHostContextRe = \u002F:host-context\u002Fgim;\nconst _commentRe = \u002F\\\u002F\\*\\s*[\\s\\S]*?\\*\\\u002F\u002Fg;\nconst stripComments = (input) =\u003E {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = \u002F\\\u002F\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\\u002F\u002Fg;\nconst extractCommentsWithHash = (input) =\u003E {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = \u002F(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))\u002Fg;\nconst _curlyRe = \u002F([{}])\u002Fg;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) =\u003E {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) =\u003E {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content,\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = (input) =\u003E {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex \u003C inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount \u003E 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length \u003E 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length \u003E 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks,\n };\n return strEscapedBlocks;\n};\nconst insertPolyfillHostInCssText = (selector) =\u003E {\n selector = selector\n .replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost)\n .replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) =\u003E {\n \u002F\u002F m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) =\u003E {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i \u003C parts.length; i++) {\n const p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) =\u003E {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = (cssText) =\u003E {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) =\u003E {\n if (part.indexOf(_polyfillHost) \u003E -1) {\n return colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) =\u003E {\n const slotClass = '.' + slotScopeId + ' \u003E ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) =\u003E {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i \u003E= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = prefixSelector + slottedSelector;\n const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;\n if (orgSelector.trim() !== addedSelector.trim()) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector,\n });\n }\n return slottedSelector;\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText,\n };\n};\nconst convertColonHostContext = (cssText) =\u003E {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = (cssText) =\u003E {\n return _shadowDOMSelectorsRe.reduce((result, pattern) =\u003E result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = (scopeSelector) =\u003E {\n const lre = \u002F\\[\u002Fg;\n const rre = \u002F\\]\u002Fg;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) =\u003E {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) =\u003E {\n \u002F\u002F In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (_, selector) =\u003E {\n return selector.replace(\u002F([^:]*)(:*)(.*)\u002F, (_, before, colon, after) =\u003E {\n return before + replaceBy + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) =\u003E {\n const isRe = \u002F\\[is=([^\\]]*)\\]\u002Fg;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) =\u003E parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = (p) =\u003E {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) \u003E -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n \u002F\u002F remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length \u003E 0) {\n const matches = t.match(\u002F([^:]*)(:*)(.*)\u002F);\n if (matches) {\n scopedP = matches[1] + className + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = \u002F( |\u003E|\\+|~(?!=))\\s*\u002Fg;\n \u002F\u002F If a selector appears before :host it should not be shimmed as it\n \u002F\u002F matches on ancestor elements and not on elements in the host's shadow\n \u002F\u002F `:host-context(div)` is transformed to\n \u002F\u002F `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n \u002F\u002F the `div` is not part of the component in the 2nd selectors and should not be scoped.\n \u002F\u002F Historically `component-tag:host` was matching the component so we also want to preserve\n \u002F\u002F this behavior to avoid breaking legacy apps (it should not match).\n \u002F\u002F The behavior should be:\n \u002F\u002F - `tag:host` -\u003E `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n \u002F\u002F - `tag :host` -\u003E `tag [h]` (`tag` is not scoped because it's considered part of a\n \u002F\u002F `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) \u003E -1;\n \u002F\u002F Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) \u003E -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) \u003E -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n \u002F\u002F replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =\u003E {\n return selector\n .split(',')\n .map(shallowPart =\u003E {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) \u003E -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n }\n else {\n return shallowPart.trim();\n }\n })\n .join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) =\u003E {\n return processRules(cssText, (rule) =\u003E {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(\u002F\\s{2,}\u002Fg, ' ').trim(),\n content,\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) =\u003E {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = cssText.replace(\u002F-shadowcsshost-no-combinator\u002Fg, `.${hostScopeId}`);\n cssText = cssText.replace(\u002F\u003E\\s*\\*\\s+([^{, ]+)\u002Fgm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors,\n };\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) =\u003E {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = (rule) =\u003E {\n const placeholder = `\u002F*!@___${orgSelectors.length}___*\u002F`;\n const comment = `\u002F*!@${rule.selector}*\u002F`;\n orgSelectors.push({ placeholder, comment });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, rule =\u003E {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({ placeholder, comment }) =\u003E {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach(slottedSelector =\u003E {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport { scopeCss };\n","directory_shortid":"HkldwVBszI","id":"4504b2de-ddd2-442f-8575-d1bda1c71937","inserted_at":"2020-10-30T22:01:40","is_binary":null,"sha":null,"shortid":"oQWN","source_id":"bb851a23-60af-4f39-afb2-3e39d1f4f9db","title":"shadow-css-fb1c6168.js","updated_at":"2020-11-01T13:52:48","upload_id":null},{"code":"import { r as registerInstance, h } from '.\u002Findex-1831826d.js';\n\nconst myComponentCss = \"@import url(\\\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss?family=Roboto+Slab|Open+Sans:400italic\\\", 700italic, 400, 700);:host{font-family:\\\"Open Sans\\\", sans-serif;font-weight:normal}h1,h2,h3,h4,h5,h6{font-family:\\\"Roboto Slab\\\", serif;font-weight:normal}button{padding:5px 20px}\";\n\nconst MyComponent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.items = [{ title: \"Item 1\" }];\n this.fetchMore = () =\u003E {\n this.items = [...this.items, { title: \"Fetched item\" }];\n };\n }\n render() {\n return (h(\"div\", null, this.items.length \u003E 0 && (h(\"ul\", null, this.items.map(item =\u003E (h(\"li\", null, item.title))))), h(\"button\", { onClick: this.fetchMore }, \"Fetch More\")));\n }\n};\nMyComponent.style = myComponentCss;\n\nexport { MyComponent as my_component };\n","directory_shortid":"HkldwVBszI","id":"2d2d5c60-a4e7-414f-8818-207a644c93e1","inserted_at":"2020-05-24T07:52:43","is_binary":null,"sha":null,"shortid":"rywOwVSoM8","source_id":"bb851a23-60af-4f39-afb2-3e39d1f4f9db","title":"my-component.entry.js","updated_at":"2020-11-01T13:52:48","upload_id":null},{"code":"const NAMESPACE = 'codesandbox-stenciljs';\nconst BUILD = \u002F* codesandbox-stenciljs *\u002F { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: true, devTools: true, disconnectedCallback: false, dynamicImportShim: true, element: false, event: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: false, profile: true, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: false, reflect: false, safari10: true, scoped: false, scriptDataOpts: true, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: false, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: false, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };\n\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet i = 0;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet renderingRef = null;\nlet queueCongestion = 0;\nlet queuePending = false;\nconst win = typeof window !== 'undefined' ? window : {};\nconst CSS = BUILD.cssVarShim ? win.CSS : null;\nconst doc = win.document || { head: {} };\nconst H = (win.HTMLElement || class {\n});\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: h =\u003E h(),\n raf: h =\u003E requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) =\u003E el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) =\u003E el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) =\u003E new CustomEvent(eventName, opts),\n};\nconst supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom ? \u002F*@__PURE__*\u002F (() =\u003E (doc.head.attachShadow + '').indexOf('[native') \u003E -1)() : true;\nconst supportsListenerOptions = \u002F*@__PURE__*\u002F (() =\u003E {\n let supportsListenerOptions = false;\n try {\n doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {\n get() {\n supportsListenerOptions = true;\n },\n }));\n }\n catch (e) { }\n return supportsListenerOptions;\n})();\nconst promiseResolve = (v) =\u003E Promise.resolve(v);\nconst supportsConstructibleStylesheets = BUILD.constructableCSS\n ? \u002F*@__PURE__*\u002F (() =\u003E {\n try {\n new CSSStyleSheet();\n return true;\n }\n catch (e) { }\n return false;\n })()\n : false;\nconst Context = {};\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =\u003E {\n if (BUILD.hostListener && listeners) {\n \u002F\u002F this is called immediately within the element's constructor\n \u002F\u002F initialize our event listeners on the host element\n \u002F\u002F we do this now so that we can listen to events that may\n \u002F\u002F have fired even before the instance is ready\n if (BUILD.hostListenerTargetParent) {\n \u002F\u002F this component may have event listeners that should be attached to the parent\n if (attachParentListeners) {\n \u002F\u002F this is being ran from within the connectedCallback\n \u002F\u002F which is important so that we know the host element actually has a parent element\n \u002F\u002F filter out the listeners to only have the ones that ARE being attached to the parent\n listeners = listeners.filter(([flags]) =\u003E flags & 16 \u002F* TargetParent *\u002F);\n }\n else {\n \u002F\u002F this is being ran from within the component constructor\n \u002F\u002F everything BUT the parent element listeners should be attached at this time\n \u002F\u002F filter out the listeners that are NOT being attached to the parent\n listeners = listeners.filter(([flags]) =\u003E !(flags & 16 \u002F* TargetParent *\u002F));\n }\n }\n listeners.map(([flags, name, method]) =\u003E {\n const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() =\u003E plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) =\u003E (ev) =\u003E {\n if (BUILD.lazyLoad) {\n if (hostRef.$flags$ & 256 \u002F* isListenReady *\u002F) {\n \u002F\u002F instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n }\n else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n else {\n hostRef.$hostElement$[methodName](ev);\n }\n};\nconst getHostListenerTarget = (elm, flags) =\u003E {\n if (BUILD.hostListenerTargetDocument && flags & 4 \u002F* TargetDocument *\u002F)\n return doc;\n if (BUILD.hostListenerTargetWindow && flags & 8 \u002F* TargetWindow *\u002F)\n return win;\n if (BUILD.hostListenerTargetBody && flags & 32 \u002F* TargetBody *\u002F)\n return doc.body;\n if (BUILD.hostListenerTargetParent && flags & 16 \u002F* TargetParent *\u002F)\n return elm.parentElement;\n return elm;\n};\n\u002F\u002F prettier-ignore\nconst hostListenerOpts = (flags) =\u003E supportsListenerOptions\n ? ({\n passive: (flags & 1 \u002F* Passive *\u002F) !== 0,\n capture: (flags & 2 \u002F* Capture *\u002F) !== 0,\n })\n : (flags & 2 \u002F* Capture *\u002F) !== 0;\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\nconst XLINK_NS = 'http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxlink';\nconst createTime = (fnName, tagName = '') =\u003E {\n if (BUILD.profile && performance.mark) {\n const key = `st:${fnName}:${tagName}:${i++}`;\n \u002F\u002F Start\n performance.mark(key);\n \u002F\u002F End\n return () =\u003E performance.measure(`[Stencil] ${fnName}() \u003C${tagName}\u003E`, key);\n }\n else {\n return () =\u003E {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) =\u003E {\n if (BUILD.profile && performance.mark) {\n if (performance.getEntriesByName(key).length === 0) {\n performance.mark(key);\n }\n return () =\u003E {\n if (performance.getEntriesByName(measureText).length === 0) {\n performance.measure(measureText, key);\n }\n };\n }\n else {\n return () =\u003E {\n return;\n };\n }\n};\nconst inspect = (ref) =\u003E {\n const hostRef = getHostRef(ref);\n if (!hostRef) {\n return undefined;\n }\n const flags = hostRef.$flags$;\n const hostElement = hostRef.$hostElement$;\n return {\n renderCount: hostRef.$renderCount$,\n flags: {\n hasRendered: !!(flags & 2 \u002F* hasRendered *\u002F),\n hasConnected: !!(flags & 1 \u002F* hasConnected *\u002F),\n isWaitingForChildren: !!(flags & 4 \u002F* isWaitingForChildren *\u002F),\n isConstructingInstance: !!(flags & 8 \u002F* isConstructingInstance *\u002F),\n isQueuedForUpdate: !!(flags & 16 \u002F* isQueuedForUpdate *\u002F),\n hasInitializedComponent: !!(flags & 32 \u002F* hasInitializedComponent *\u002F),\n hasLoadedComponent: !!(flags & 64 \u002F* hasLoadedComponent *\u002F),\n isWatchReady: !!(flags & 128 \u002F* isWatchReady *\u002F),\n isListenReady: !!(flags & 256 \u002F* isListenReady *\u002F),\n needsRerender: !!(flags & 512 \u002F* needsRerender *\u002F),\n },\n instanceValues: hostRef.$instanceValues$,\n ancestorComponent: hostRef.$ancestorComponent$,\n hostElement,\n lazyInstance: hostRef.$lazyInstance$,\n vnode: hostRef.$vnode$,\n modeName: hostRef.$modeName$,\n onReadyPromise: hostRef.$onReadyPromise$,\n onReadyResolve: hostRef.$onReadyResolve$,\n onInstancePromise: hostRef.$onInstancePromise$,\n onInstanceResolve: hostRef.$onInstanceResolve$,\n onRenderResolve: hostRef.$onRenderResolve$,\n queuedListeners: hostRef.$queuedListeners$,\n rmListeners: hostRef.$rmListeners$,\n ['s-id']: hostElement['s-id'],\n ['s-cr']: hostElement['s-cr'],\n ['s-lr']: hostElement['s-lr'],\n ['s-p']: hostElement['s-p'],\n ['s-rc']: hostElement['s-rc'],\n ['s-sc']: hostElement['s-sc'],\n };\n};\nconst installDevTools = () =\u003E {\n if (BUILD.devTools) {\n const stencil = (win.stencil = win.stencil || {});\n const originalInspect = stencil.inspect;\n stencil.inspect = (ref) =\u003E {\n let result = inspect(ref);\n if (!result && typeof originalInspect === 'function') {\n result = originalInspect(ref);\n }\n return result;\n };\n }\n};\nconst rootAppliedStyles = new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) =\u003E {\n let style = styles.get(scopeId);\n if (supportsConstructibleStylesheets && allowCS) {\n style = (style || new CSSStyleSheet());\n style.replace(cssText);\n }\n else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode, hostElm) =\u003E {\n let scopeId = getScopeId(cmpMeta, mode);\n let style = styles.get(scopeId);\n if (!BUILD.attachStyles) {\n return scopeId;\n }\n \u002F\u002F if an element is NOT connected then getRootNode() will return the wrong root node\n \u002F\u002F so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 \u002F* DocumentFragment *\u002F ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));\n }\n if (!appliedStyles.has(scopeId)) {\n if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n \u002F\u002F This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n }\n else {\n if (BUILD.cssVarShim && plt.$cssShim$) {\n styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 \u002F* needsScopedEncapsulation *\u002F));\n const newScopeId = styleElm['s-sc'];\n if (newScopeId) {\n scopeId = newScopeId;\n \u002F\u002F we don't want to add this styleID to the appliedStyles Set\n \u002F\u002F since the cssVarShim might need to apply several different\n \u002F\u002F stylesheets for the same component\n appliedStyles = null;\n }\n }\n else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n }\n if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {\n styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n }\n else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = (hostRef) =\u003E {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);\n if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 \u002F* needsScopedEncapsulation *\u002F) {\n \u002F\u002F only required when we're NOT using native shadow dom (slot)\n \u002F\u002F or this browser doesn't support native shadow dom\n \u002F\u002F and this host element was NOT created with SSR\n \u002F\u002F let's pick out the inner content for slot projection\n \u002F\u002F create a node to represent where the original\n \u002F\u002F content was first placed, which is useful later on\n \u002F\u002F DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (BUILD.scoped && flags & 2 \u002F* scopedCssEncapsulation *\u002F) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) =\u003E 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 \u002F* hasMode *\u002F ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = (css) =\u003E css.replace(\u002F\\\u002F\\*!@([^\\\u002F]+)\\*\\\u002F[^\\{]+\\{\u002Fg, '$1{');\n\u002F\u002F Private\nconst computeMode = (elm) =\u003E modeResolutionChain.map(h =\u003E h(elm)).find(m =\u003E !!m);\n\u002F\u002F Public\nconst setMode = (handler) =\u003E modeResolutionChain.push(handler);\nconst getMode = (ref) =\u003E getHostRef(ref).$modeName$;\n\u002F**\n * Default style mode id\n *\u002F\n\u002F**\n * Reusable empty obj\u002Farray\n * Don't add values to these!!\n *\u002F\nconst EMPTY_OBJ = {};\n\u002F**\n * Namespaces\n *\u002F\nconst SVG_NS = 'http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg';\nconst HTML_NS = 'http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml';\nconst isDef = (v) =\u003E v != null;\nconst noop = () =\u003E {\n \u002F* noop*\u002F\n};\nconst isComplexType = (o) =\u003E {\n \u002F\u002F https:\u002F\u002Fjsperf.com\u002Ftypeof-fn-object\u002F5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\nconst IS_DENO_ENV = typeof Deno !== 'undefined';\nconst IS_NODE_ENV = !IS_DENO_ENV &&\n typeof global !== 'undefined' &&\n typeof require === 'function' &&\n !!global.process &&\n typeof __filename === 'string' &&\n (!global.origin || typeof global.origin !== 'string');\nconst IS_DENO_WINDOWS_ENV = IS_DENO_ENV && Deno.build.os === 'windows';\nconst getCurrentDirectory = IS_NODE_ENV ? process.cwd : IS_DENO_ENV ? Deno.cwd : () =\u003E '\u002F';\nconst exit = IS_NODE_ENV ? process.exit : IS_DENO_ENV ? Deno.exit : noop;\n\u002F**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https:\u002F\u002Fgithub.com\u002Fdevelopit\u002Fpreact\u002Fblob\u002Fmaster\u002FLICENSE\n *\n * Modified for Stencil's compiler and vdom\n *\u002F\n\u002F\u002F const stack: any[] = [];\n\u002F\u002F export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n\u002F\u002F export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) =\u003E {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n let vNodeChildren = [];\n const walk = (c) =\u003E {\n for (let i = 0; i \u003C c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n }\n else if (child != null && typeof child !== 'boolean') {\n if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {\n child = String(child);\n }\n else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {\n consoleDevError(`vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects.`);\n }\n if (simple && lastSimple) {\n \u002F\u002F If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n }\n else {\n \u002F\u002F Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (BUILD.isDev && nodeName === 'input') {\n validateInputProperties(vnodeData);\n }\n \u002F\u002F normalize class \u002F classname attributes\n if (BUILD.vdomKey && vnodeData.key) {\n key = vnodeData.key;\n }\n if (BUILD.slotRelocation && vnodeData.name) {\n slotName = vnodeData.name;\n }\n if (BUILD.vdomClass) {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class =\n typeof classData !== 'object'\n ? classData\n : Object.keys(classData)\n .filter(k =\u003E classData[k])\n .join(' ');\n }\n }\n }\n if (BUILD.isDev && vNodeChildren.some(isHost)) {\n consoleDevError(`The \u003CHost\u003E must be the single root component. Make sure:\n- You are NOT using hostData() and \u003CHost\u003E in the same component.\n- \u003CHost\u003E is used once, and it's the single root component of the render() function.`);\n }\n if (BUILD.vdomFunctional && typeof nodeName === 'function') {\n \u002F\u002F nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length \u003E 0) {\n vnode.$children$ = vNodeChildren;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = key;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\nconst newVNode = (tag, text) =\u003E {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null,\n };\n if (BUILD.vdomAttribute) {\n vnode.$attrs$ = null;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = null;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\nconst isHost = (node) =\u003E node && node.$tag$ === Host;\nconst vdomFnUtils = {\n forEach: (children, cb) =\u003E children.map(convertToPublic).forEach(cb),\n map: (children, cb) =\u003E children\n .map(convertToPublic)\n .map(cb)\n .map(convertToPrivate),\n};\nconst convertToPublic = (node) =\u003E ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$,\n});\nconst convertToPrivate = (node) =\u003E {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...node.vchildren || []);\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\nconst validateInputProperties = (vnodeData) =\u003E {\n const props = Object.keys(vnodeData);\n const typeIndex = props.indexOf('type');\n const minIndex = props.indexOf('min');\n const maxIndex = props.indexOf('max');\n const stepIndex = props.indexOf('min');\n const value = props.indexOf('value');\n if (value === -1) {\n return;\n }\n if (value \u003C typeIndex || value \u003C minIndex || value \u003C maxIndex || value \u003C stepIndex) {\n consoleDevWarn(`The \"value\" prop of \u003Cinput\u003E should be set after \"min\", \"max\", \"type\" and \"step\"`);\n }\n};\n\u002F**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https:\u002F\u002Fgithub.com\u002Fdevelopit\u002Fpreact\u002Fblob\u002Fmaster\u002FLICENSE\n *\n * Modified for Stencil's compiler and vdom\n *\u002F\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) =\u003E {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (BUILD.vdomClass && memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter(c =\u003E c && !newClasses.includes(c)));\n classList.add(...newClasses.filter(c =\u003E c && !oldClasses.includes(c)));\n }\n else if (BUILD.vdomStyle && memberName === 'style') {\n \u002F\u002F update style attribute, css properties and values\n if (BUILD.updatable) {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.removeProperty(prop);\n }\n else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n }\n else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n }\n else if (BUILD.vdomKey && memberName === 'key')\n ;\n else if (BUILD.vdomRef && memberName === 'ref') {\n \u002F\u002F minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n }\n else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === 'o' && memberName[1] === 'n') {\n \u002F\u002F Event Handlers\n \u002F\u002F so if the member name starts with \"on\" and the 3rd characters is\n \u002F\u002F a capital letter, and it's not already a member on the element,\n \u002F\u002F then we're assuming it's an event listener\n if (memberName[2] === '-') {\n \u002F\u002F on- prefixed events\n \u002F\u002F allows to be explicit about the dom event to listen without any magic\n \u002F\u002F under the hood:\n \u002F\u002F \u003Cmy-cmp on-click\u003E \u002F\u002F listens for \"click\"\n \u002F\u002F \u003Cmy-cmp on-Click\u003E \u002F\u002F listens for \"Click\"\n \u002F\u002F \u003Cmy-cmp on-ionChange\u003E \u002F\u002F listens for \"ionChange\"\n \u002F\u002F \u003Cmy-cmp on-EVENTS\u003E \u002F\u002F listens for \"EVENTS\"\n memberName = memberName.slice(3);\n }\n else if (isMemberInElement(win, ln)) {\n \u002F\u002F standard event\n \u002F\u002F the JSX attribute could have been \"onMouseOver\" and the\n \u002F\u002F member name \"onmouseover\" is on the window's prototype\n \u002F\u002F so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n }\n else {\n \u002F\u002F custom event\n \u002F\u002F the JSX attribute could have been \"onMyCustomEvent\"\n \u002F\u002F so let's trim off the \"on\" prefix and lowercase the first character\n \u002F\u002F and add the listener \"myCustomEvent\"\n \u002F\u002F except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, false);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, false);\n }\n }\n else if (BUILD.vdomPropOrAttr) {\n \u002F\u002F Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || (isComplex && newValue !== null)) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n let n = newValue == null ? '' : newValue;\n \u002F\u002F Workaround for Safari, moving the \u003Cinput\u003E caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n \u002F\u002F tslint:disable-next-line: triple-equals\n }\n else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n }\n else {\n elm[memberName] = newValue;\n }\n }\n catch (e) { }\n }\n \u002F**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in \u003Csvg\u003E\n * - if the newValue is null\u002Fundefined or 'false'.\n *\u002F\n let xlink = false;\n if (BUILD.vdomXlink) {\n if (ln !== (ln = ln.replace(\u002F^xlink\\:?\u002F, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (BUILD.vdomXlink && xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n }\n else {\n elm.removeAttribute(memberName);\n }\n }\n }\n else if ((!isProp || flags & 4 \u002F* isHost *\u002F || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (BUILD.vdomXlink && xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n }\n else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = \u002F\\s\u002F;\nconst parseClassList = (value) =\u003E (!value ? [] : value.split(parseClassListRegex));\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) =\u003E {\n \u002F\u002F if the element passed in is a shadow root, which is a document fragment\n \u002F\u002F then we want to be adding attrs\u002Fprops to the shadow root's \"host\" element\n \u002F\u002F if it's not a shadow root, then we add attrs\u002Fprops to the same element\n const elm = newVnode.$elm$.nodeType === 11 \u002F* DocumentFragment *\u002F && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;\n const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n if (BUILD.updatable) {\n \u002F\u002F remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n \u002F\u002F add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) =\u003E {\n \u002F\u002F tslint:disable-next-line: prefer-const\n let newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (BUILD.slotRelocation && !useNativeShadowDom) {\n \u002F\u002F remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n \u002F\u002F scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$\n ? \u002F\u002F slot element has fallback content\n 2 \u002F* isSlotFallback *\u002F\n : \u002F\u002F slot element does not have fallback content\n 1 \u002F* isSlotReference *\u002F;\n }\n }\n if (BUILD.isDev && newVNode.$elm$) {\n consoleError(`The JSX ${newVNode.$text$ !== null ? `\"${newVNode.$text$}\" text` : `\"${newVNode.$tag$}\" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https:\u002F\u002Fstenciljs.com\u002Fdocs\u002Ftemplating-jsx#avoid-shared-jsx-nodes`);\n }\n if (BUILD.vdomText && newVNode.$text$ !== null) {\n \u002F\u002F create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n }\n else if (BUILD.slotRelocation && newVNode.$flags$ & 1 \u002F* isSlotReference *\u002F) {\n \u002F\u002F create a slot reference node\n elm = newVNode.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');\n }\n else {\n if (BUILD.svg && !isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n \u002F\u002F create element\n elm = newVNode.$elm$ = (BUILD.svg\n ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 \u002F* isSlotFallback *\u002F ? 'slot-fb' : newVNode.$tag$)\n : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 \u002F* isSlotFallback *\u002F ? 'slot-fb' : newVNode.$tag$));\n if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n \u002F\u002F add css classes, attrs, props, listeners, etc.\n if (BUILD.vdomAttribute) {\n updateElement(null, newVNode, isSvgMode);\n }\n if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) {\n \u002F\u002F if there is a scopeId and this is the initial render\n \u002F\u002F then let's add the scopeId as a css class\n elm.classList.add((elm['s-si'] = scopeId));\n }\n if (newVNode.$children$) {\n for (i = 0; i \u003C newVNode.$children$.length; ++i) {\n \u002F\u002F create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n \u002F\u002F return node could have been null\n if (childNode) {\n \u002F\u002F append our new node\n elm.appendChild(childNode);\n }\n }\n }\n if (BUILD.svg) {\n if (newVNode.$tag$ === 'svg') {\n \u002F\u002F Only reset the SVG context when we're exiting \u003Csvg\u003E element\n isSvgMode = false;\n }\n else if (elm.tagName === 'foreignObject') {\n \u002F\u002F Reenter SVG context when we're exiting \u003CforeignObject\u003E element\n isSvgMode = true;\n }\n }\n }\n if (BUILD.slotRelocation) {\n elm['s-hn'] = hostTagName;\n if (newVNode.$flags$ & (2 \u002F* isSlotFallback *\u002F | 1 \u002F* isSlotReference *\u002F)) {\n \u002F\u002F remember the content reference comment\n elm['s-sr'] = true;\n \u002F\u002F remember the content reference comment\n elm['s-cr'] = contentRef;\n \u002F\u002F remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n \u002F\u002F check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n \u002F\u002F we've got an old slot vnode and the wrapper is being replaced\n \u002F\u002F so let's move the old slot content back to it's original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n return elm;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) =\u003E {\n plt.$flags$ |= 1 \u002F* isTmpDisconnected *\u002F;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i \u003E= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n \u002F\u002F \u002F\u002F this child node in the old element is from another component\n \u002F\u002F \u002F\u002F remove this node from the old slot's parent\n \u002F\u002F childNode.remove();\n \u002F\u002F and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n \u002F\u002F remove the old original location comment entirely\n \u002F\u002F later on the patch function will know what to do\n \u002F\u002F and move this to the correct spot in need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 \u002F* isTmpDisconnected *\u002F;\n};\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =\u003E {\n let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);\n let childNode;\n if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx \u003C= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before);\n }\n }\n }\n};\nconst removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) =\u003E {\n for (; startIdx \u003C= endIdx; ++startIdx) {\n if ((vnode = vnodes[startIdx])) {\n elm = vnode.$elm$;\n callNodeRefs(vnode);\n if (BUILD.slotRelocation) {\n \u002F\u002F we're removing this element\n \u002F\u002F so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n \u002F\u002F remove the original location comment\n elm['s-ol'].remove();\n }\n else {\n \u002F\u002F it's possible that child nodes of the node\n \u002F\u002F that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n \u002F\u002F remove the vnode's element from the dom\n elm.remove();\n }\n }\n};\nconst updateChildren = (parentElm, oldCh, newVNode, newCh) =\u003E {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx \u003C= oldEndIdx && newStartIdx \u003C= newEndIdx) {\n if (oldStartVnode == null) {\n \u002F\u002F Vnode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newStartVnode)) {\n patch(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (isSameVnode(oldEndVnode, newEndVnode)) {\n patch(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newEndVnode)) {\n \u002F\u002F Vnode moved right\n if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode);\n parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldEndVnode, newStartVnode)) {\n \u002F\u002F Vnode moved left\n if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);\n }\n patch(oldEndVnode, newStartVnode);\n parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n \u002F\u002F createKeyToOldIdx\n idxInOld = -1;\n if (BUILD.vdomKey) {\n for (i = oldStartIdx; i \u003C= oldEndIdx; ++i) {\n if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {\n idxInOld = i;\n break;\n }\n }\n }\n if (BUILD.vdomKey && idxInOld \u003E= 0) {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.$tag$ !== newStartVnode.$tag$) {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);\n }\n else {\n patch(elmToMove, newStartVnode);\n oldCh[idxInOld] = undefined;\n node = elmToMove.$elm$;\n }\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n \u002F\u002F new element\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);\n newStartVnode = newCh[++newStartIdx];\n }\n if (node) {\n if (BUILD.slotRelocation) {\n parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));\n }\n else {\n oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);\n }\n }\n }\n }\n if (oldStartIdx \u003E oldEndIdx) {\n addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);\n }\n else if (BUILD.updatable && newStartIdx \u003E newEndIdx) {\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n }\n};\nconst isSameVnode = (vnode1, vnode2) =\u003E {\n \u002F\u002F compare if two vnode to see if they're \"technically\" the same\n \u002F\u002F need to have the same element tag, and same key to be the same\n if (vnode1.$tag$ === vnode2.$tag$) {\n if (BUILD.slotRelocation && vnode1.$tag$ === 'slot') {\n return vnode1.$name$ === vnode2.$name$;\n }\n if (BUILD.vdomKey) {\n return vnode1.$key$ === vnode2.$key$;\n }\n return true;\n }\n return false;\n};\nconst referenceNode = (node) =\u003E {\n \u002F\u002F this node was relocated to a new location in the dom\n \u002F\u002F because of some other component's slot\n \u002F\u002F but we still have an html comment in place of where\n \u002F\u002F it's original location was according to it's original vdom\n return (node && node['s-ol']) || node;\n};\nconst parentReferenceNode = (node) =\u003E (node['s-ol'] ? node['s-ol'] : node).parentNode;\nconst patch = (oldVNode, newVNode) =\u003E {\n const elm = (newVNode.$elm$ = oldVNode.$elm$);\n const oldChildren = oldVNode.$children$;\n const newChildren = newVNode.$children$;\n const tag = newVNode.$tag$;\n const text = newVNode.$text$;\n let defaultHolder;\n if (!BUILD.vdomText || text === null) {\n if (BUILD.svg) {\n \u002F\u002F test if we're rendering an svg element, or still rendering nodes inside of one\n \u002F\u002F only add this to the when the compiler sees we're using an svg somewhere\n isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;\n }\n \u002F\u002F element node\n if (BUILD.vdomAttribute || BUILD.reflect) {\n if (BUILD.slot && tag === 'slot')\n ;\n else {\n \u002F\u002F either this is the first render of an element OR it's an update\n \u002F\u002F AND we already know it's possible it could have changed\n \u002F\u002F this updates the element's css classes, attrs, props, listeners, etc.\n updateElement(oldVNode, newVNode, isSvgMode);\n }\n }\n if (BUILD.updatable && oldChildren !== null && newChildren !== null) {\n \u002F\u002F looks like there's child vnodes for both the old and new vnodes\n updateChildren(elm, oldChildren, newVNode, newChildren);\n }\n else if (newChildren !== null) {\n \u002F\u002F no old child vnodes, but there are new child vnodes to add\n if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) {\n \u002F\u002F the old vnode was text, so be sure to clear it out\n elm.textContent = '';\n }\n \u002F\u002F add the new vnode children\n addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);\n }\n else if (BUILD.updatable && oldChildren !== null) {\n \u002F\u002F no new child vnodes, but there are old child vnodes to remove\n removeVnodes(oldChildren, 0, oldChildren.length - 1);\n }\n if (BUILD.svg && isSvgMode && tag === 'svg') {\n isSvgMode = false;\n }\n }\n else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm['s-cr'])) {\n \u002F\u002F this element has slotted content\n defaultHolder.parentNode.textContent = text;\n }\n else if (BUILD.vdomText && oldVNode.$text$ !== text) {\n \u002F\u002F update the text content for the text only vnode\n \u002F\u002F and also only if the text is different than before\n elm.data = text;\n }\n};\nconst updateFallbackSlotVisibility = (elm) =\u003E {\n \u002F\u002F tslint:disable-next-line: prefer-const\n let childNodes = elm.childNodes;\n let childNode;\n let i;\n let ilen;\n let j;\n let slotNameAttr;\n let nodeType;\n for (i = 0, ilen = childNodes.length; i \u003C ilen; i++) {\n childNode = childNodes[i];\n if (childNode.nodeType === 1 \u002F* ElementNode *\u002F) {\n if (childNode['s-sr']) {\n \u002F\u002F this is a slot fallback node\n \u002F\u002F get the slot name for this slot reference node\n slotNameAttr = childNode['s-sn'];\n \u002F\u002F by default always show a fallback slot node\n \u002F\u002F then hide it if there are other slots in the light dom\n childNode.hidden = false;\n for (j = 0; j \u003C ilen; j++) {\n if (childNodes[j]['s-hn'] !== childNode['s-hn']) {\n \u002F\u002F this sibling node is from a different component\n nodeType = childNodes[j].nodeType;\n if (slotNameAttr !== '') {\n \u002F\u002F this is a named fallback slot node\n if (nodeType === 1 \u002F* ElementNode *\u002F && slotNameAttr === childNodes[j].getAttribute('slot')) {\n childNode.hidden = true;\n break;\n }\n }\n else {\n \u002F\u002F this is a default fallback slot node\n \u002F\u002F any element or text node (with content)\n \u002F\u002F should hide the default fallback slot node\n if (nodeType === 1 \u002F* ElementNode *\u002F || (nodeType === 3 \u002F* TextNode *\u002F && childNodes[j].textContent.trim() !== '')) {\n childNode.hidden = true;\n break;\n }\n }\n }\n }\n }\n \u002F\u002F keep drilling down\n updateFallbackSlotVisibility(childNode);\n }\n }\n};\nconst relocateNodes = [];\nconst relocateSlotContent = (elm) =\u003E {\n \u002F\u002F tslint:disable-next-line: prefer-const\n let childNode;\n let node;\n let hostContentNodes;\n let slotNameAttr;\n let relocateNodeData;\n let j;\n let i = 0;\n let childNodes = elm.childNodes;\n let ilen = childNodes.length;\n for (; i \u003C ilen; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && (node = childNode['s-cr'])) {\n \u002F\u002F first got the content reference comment node\n \u002F\u002F then we got it's parent, which is where all the host content is in now\n hostContentNodes = node.parentNode.childNodes;\n slotNameAttr = childNode['s-sn'];\n for (j = hostContentNodes.length - 1; j \u003E= 0; j--) {\n node = hostContentNodes[j];\n if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {\n \u002F\u002F let's do some relocating to its new home\n \u002F\u002F but never relocate a content reference node\n \u002F\u002F that is suppose to always represent the original content location\n if (isNodeLocatedInSlot(node, slotNameAttr)) {\n \u002F\u002F it's possible we've already decided to relocate this node\n relocateNodeData = relocateNodes.find(r =\u003E r.$nodeToRelocate$ === node);\n \u002F\u002F made some changes to slots\n \u002F\u002F let's make sure we also double check\n \u002F\u002F fallbacks are correctly hidden or shown\n checkSlotFallbackVisibility = true;\n node['s-sn'] = node['s-sn'] || slotNameAttr;\n if (relocateNodeData) {\n \u002F\u002F previously we never found a slot home for this node\n \u002F\u002F but turns out we did, so let's remember it now\n relocateNodeData.$slotRefNode$ = childNode;\n }\n else {\n \u002F\u002F add to our list of nodes to relocate\n relocateNodes.push({\n $slotRefNode$: childNode,\n $nodeToRelocate$: node,\n });\n }\n if (node['s-sr']) {\n relocateNodes.map(relocateNode =\u003E {\n if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {\n relocateNodeData = relocateNodes.find(r =\u003E r.$nodeToRelocate$ === node);\n if (relocateNodeData && !relocateNode.$slotRefNode$) {\n relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;\n }\n }\n });\n }\n }\n else if (!relocateNodes.some(r =\u003E r.$nodeToRelocate$ === node)) {\n \u002F\u002F so far this element does not have a slot home, not setting slotRefNode on purpose\n \u002F\u002F if we never find a home for this element then we'll need to hide it\n relocateNodes.push({\n $nodeToRelocate$: node,\n });\n }\n }\n }\n }\n if (childNode.nodeType === 1 \u002F* ElementNode *\u002F) {\n relocateSlotContent(childNode);\n }\n }\n};\nconst isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) =\u003E {\n if (nodeToRelocate.nodeType === 1 \u002F* ElementNode *\u002F) {\n if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {\n return true;\n }\n if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {\n return true;\n }\n return false;\n }\n if (nodeToRelocate['s-sn'] === slotNameAttr) {\n return true;\n }\n return slotNameAttr === '';\n};\nconst callNodeRefs = (vNode) =\u003E {\n if (BUILD.vdomRef) {\n vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);\n vNode.$children$ && vNode.$children$.map(callNodeRefs);\n }\n};\nconst renderVdom = (hostRef, renderFnResults) =\u003E {\n const hostElm = hostRef.$hostElement$;\n const cmpMeta = hostRef.$cmpMeta$;\n const oldVNode = hostRef.$vnode$ || newVNode(null, null);\n const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);\n hostTagName = hostElm.tagName;\n \u002F\u002F \u003CHost\u003E runtime check\n if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {\n throw new Error(`The \u003CHost\u003E must be the single root component.\nLooks like the render() function of \"${hostTagName.toLowerCase()}\" is returning an array that contains the \u003CHost\u003E.\n\nThe render() function should look like this instead:\n\nrender() {\n \u002F\u002F Do not return an array\n return (\n \u003CHost\u003E{content}\u003C\u002FHost\u003E\n );\n}\n `);\n }\n if (BUILD.reflect && cmpMeta.$attrsToReflect$) {\n rootVnode.$attrs$ = rootVnode.$attrs$ || {};\n cmpMeta.$attrsToReflect$.map(([propName, attribute]) =\u003E (rootVnode.$attrs$[attribute] = hostElm[propName]));\n }\n rootVnode.$tag$ = null;\n rootVnode.$flags$ |= 4 \u002F* isHost *\u002F;\n hostRef.$vnode$ = rootVnode;\n rootVnode.$elm$ = oldVNode.$elm$ = (BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm);\n if (BUILD.scoped || BUILD.shadowDom) {\n scopeId = hostElm['s-sc'];\n }\n if (BUILD.slotRelocation) {\n contentRef = hostElm['s-cr'];\n useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) !== 0;\n \u002F\u002F always reset\n checkSlotFallbackVisibility = false;\n }\n \u002F\u002F synchronous patch\n patch(oldVNode, rootVnode);\n if (BUILD.slotRelocation) {\n \u002F\u002F while we're moving nodes around existing nodes, temporarily disable\n \u002F\u002F the disconnectCallback from working\n plt.$flags$ |= 1 \u002F* isTmpDisconnected *\u002F;\n if (checkSlotRelocate) {\n relocateSlotContent(rootVnode.$elm$);\n let relocateData;\n let nodeToRelocate;\n let orgLocationNode;\n let parentNodeRef;\n let insertBeforeNode;\n let refNode;\n let i = 0;\n for (; i \u003C relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (!nodeToRelocate['s-ol']) {\n \u002F\u002F add a reference node marking this node's original location\n \u002F\u002F keep a reference to this node for later lookups\n orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode('');\n orgLocationNode['s-nr'] = nodeToRelocate;\n nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);\n }\n }\n for (i = 0; i \u003C relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (relocateData.$slotRefNode$) {\n \u002F\u002F by default we're just going to insert it directly\n \u002F\u002F after the slot reference node\n parentNodeRef = relocateData.$slotRefNode$.parentNode;\n insertBeforeNode = relocateData.$slotRefNode$.nextSibling;\n orgLocationNode = nodeToRelocate['s-ol'];\n while ((orgLocationNode = orgLocationNode.previousSibling)) {\n refNode = orgLocationNode['s-nr'];\n if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {\n refNode = refNode.nextSibling;\n if (!refNode || !refNode['s-nr']) {\n insertBeforeNode = refNode;\n break;\n }\n }\n }\n if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {\n \u002F\u002F we've checked that it's worth while to relocate\n \u002F\u002F since that the node to relocate\n \u002F\u002F has a different next sibling or parent relocated\n if (nodeToRelocate !== insertBeforeNode) {\n if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {\n \u002F\u002F probably a component in the index.html that doesn't have it's hostname set\n nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;\n }\n \u002F\u002F add it back to the dom but in its new home\n parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);\n }\n }\n }\n else {\n \u002F\u002F this node doesn't have a slot home to go to, so let's hide it\n if (nodeToRelocate.nodeType === 1 \u002F* ElementNode *\u002F) {\n nodeToRelocate.hidden = true;\n }\n }\n }\n }\n if (checkSlotFallbackVisibility) {\n updateFallbackSlotVisibility(rootVnode.$elm$);\n }\n \u002F\u002F done moving nodes around\n \u002F\u002F allow the disconnect callback to work again\n plt.$flags$ &= ~1 \u002F* isTmpDisconnected *\u002F;\n \u002F\u002F always reset\n relocateNodes.length = 0;\n }\n};\n\u002F\u002F slot comment debug nodes only created with the `--debug` flag\n\u002F\u002F otherwise these nodes are text nodes w\u002Fout content\nconst slotReferenceDebugNode = (slotVNode) =\u003E doc.createComment(`\u003Cslot${slotVNode.$name$ ? ' name=\"' + slotVNode.$name$ + '\"' : ''}\u003E (host=${hostTagName.toLowerCase()})`);\nconst originalLocationDebugNode = (nodeToRelocate) =\u003E doc.createComment(`org-location for ` + (nodeToRelocate.localName ? `\u003C${nodeToRelocate.localName}\u003E (host=${nodeToRelocate['s-hn']})` : `[${nodeToRelocate.textContent}]`));\nconst getElement = (ref) =\u003E (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);\nconst createEvent = (ref, name, flags) =\u003E {\n const elm = getElement(ref);\n return {\n emit: (detail) =\u003E {\n if (BUILD.isDev && !elm.isConnected) {\n consoleDevWarn(`The \"${name}\" event was emitted, but the dispatcher node is no longer connected to the dom.`);\n }\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 \u002F* Bubbles *\u002F),\n composed: !!(flags & 2 \u002F* Composed *\u002F),\n cancelable: !!(flags & 1 \u002F* Cancellable *\u002F),\n detail,\n });\n },\n };\n};\nconst emitEvent = (elm, name, opts) =\u003E {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst attachToAncestor = (hostRef, ancestorComponent) =\u003E {\n if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {\n ancestorComponent['s-p'].push(new Promise(r =\u003E (hostRef.$onRenderResolve$ = r)));\n }\n};\nconst scheduleUpdate = (hostRef, isInitialLoad) =\u003E {\n if (BUILD.taskQueue && BUILD.updatable) {\n hostRef.$flags$ |= 16 \u002F* isQueuedForUpdate *\u002F;\n }\n if (BUILD.asyncLoading && hostRef.$flags$ & 4 \u002F* isWaitingForChildren *\u002F) {\n hostRef.$flags$ |= 512 \u002F* needsRerender *\u002F;\n return;\n }\n attachToAncestor(hostRef, hostRef.$ancestorComponent$);\n \u002F\u002F there is no ancestorc omponent or the ancestor component\n \u002F\u002F has already fired off its lifecycle update then\n \u002F\u002F fire off the initial update\n const dispatch = () =\u003E dispatchHooks(hostRef, isInitialLoad);\n return BUILD.taskQueue ? writeTask(dispatch) : dispatch;\n};\nconst dispatchHooks = (hostRef, isInitialLoad) =\u003E {\n const elm = hostRef.$hostElement$;\n const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n let promise;\n if (isInitialLoad) {\n if (BUILD.lazyLoad && BUILD.hostListener) {\n hostRef.$flags$ |= 256 \u002F* isListenReady *\u002F;\n if (hostRef.$queuedListeners$) {\n hostRef.$queuedListeners$.map(([methodName, event]) =\u003E safeCall(instance, methodName, event));\n hostRef.$queuedListeners$ = null;\n }\n }\n emitLifecycleEvent(elm, 'componentWillLoad');\n if (BUILD.cmpWillLoad) {\n promise = safeCall(instance, 'componentWillLoad');\n }\n }\n else {\n emitLifecycleEvent(elm, 'componentWillUpdate');\n if (BUILD.cmpWillUpdate) {\n promise = safeCall(instance, 'componentWillUpdate');\n }\n }\n emitLifecycleEvent(elm, 'componentWillRender');\n if (BUILD.cmpWillRender) {\n promise = then(promise, () =\u003E safeCall(instance, 'componentWillRender'));\n }\n endSchedule();\n return then(promise, () =\u003E updateComponent(hostRef, instance, isInitialLoad));\n};\nconst updateComponent = (hostRef, instance, isInitialLoad) =\u003E {\n \u002F\u002F updateComponent\n const elm = hostRef.$hostElement$;\n const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);\n const rc = elm['s-rc'];\n if (BUILD.style && isInitialLoad) {\n \u002F\u002F DOM WRITE!\n attachStyles(hostRef);\n }\n const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);\n if (BUILD.isDev) {\n hostRef.$flags$ |= 1024 \u002F* devOnRender *\u002F;\n }\n if (BUILD.hasRenderFn || BUILD.reflect) {\n if (BUILD.vdomRender || BUILD.reflect) {\n \u002F\u002F looks like we've got child nodes to render into this host element\n \u002F\u002F or we need to update the css class\u002Fattrs on the host element\n \u002F\u002F DOM WRITE!\n renderVdom(hostRef, callRender(hostRef, instance));\n }\n else {\n elm.textContent = callRender(hostRef, instance);\n }\n }\n if (BUILD.cssVarShim && plt.$cssShim$) {\n plt.$cssShim$.updateHost(elm);\n }\n if (BUILD.isDev) {\n hostRef.$renderCount$++;\n hostRef.$flags$ &= ~1024 \u002F* devOnRender *\u002F;\n }\n if (BUILD.hydrateServerSide) {\n try {\n \u002F\u002F manually connected child components during server-side hydrate\n serverSideConnected(elm);\n if (isInitialLoad) {\n \u002F\u002F using only during server-side hydrate\n if (hostRef.$cmpMeta$.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) {\n elm['s-en'] = '';\n }\n else if (hostRef.$cmpMeta$.$flags$ & 2 \u002F* scopedCssEncapsulation *\u002F) {\n elm['s-en'] = 'c';\n }\n }\n }\n catch (e) {\n consoleError(e);\n }\n }\n if (BUILD.asyncLoading && rc) {\n \u002F\u002F ok, so turns out there are some child host elements\n \u002F\u002F waiting on this parent element to load\n \u002F\u002F let's fire off all update callbacks waiting\n rc.map(cb =\u003E cb());\n elm['s-rc'] = undefined;\n }\n endRender();\n endUpdate();\n if (BUILD.asyncLoading) {\n const childrenPromises = elm['s-p'];\n const postUpdate = () =\u003E postUpdateComponent(hostRef);\n if (childrenPromises.length === 0) {\n postUpdate();\n }\n else {\n Promise.all(childrenPromises).then(postUpdate);\n hostRef.$flags$ |= 4 \u002F* isWaitingForChildren *\u002F;\n childrenPromises.length = 0;\n }\n }\n else {\n postUpdateComponent(hostRef);\n }\n};\nconst callRender = (hostRef, instance) =\u003E {\n \u002F\u002F in order for bundlers to correctly treeshake the BUILD object\n \u002F\u002F we need to ensure BUILD is not deoptimized within a try\u002Fcatch\n \u002F\u002F https:\u002F\u002Frollupjs.org\u002Fguide\u002Fen\u002F#treeshake tryCatchDeoptimization\n const allRenderFn = BUILD.allRenderFn ? true : false;\n const lazyLoad = BUILD.lazyLoad ? true : false;\n const taskQueue = BUILD.taskQueue ? true : false;\n const updatable = BUILD.updatable ? true : false;\n try {\n renderingRef = instance;\n instance = allRenderFn ? instance.render() : instance.render && instance.render();\n if (updatable && taskQueue) {\n hostRef.$flags$ &= ~16 \u002F* isQueuedForUpdate *\u002F;\n }\n if (updatable || lazyLoad) {\n hostRef.$flags$ |= 2 \u002F* hasRendered *\u002F;\n }\n }\n catch (e) {\n consoleError(e);\n }\n renderingRef = null;\n return instance;\n};\nconst getRenderingRef = () =\u003E renderingRef;\nconst postUpdateComponent = (hostRef) =\u003E {\n const tagName = hostRef.$cmpMeta$.$tagName$;\n const elm = hostRef.$hostElement$;\n const endPostUpdate = createTime('postUpdate', tagName);\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n const ancestorComponent = hostRef.$ancestorComponent$;\n if (BUILD.cmpDidRender) {\n if (BUILD.isDev) {\n hostRef.$flags$ |= 1024 \u002F* devOnRender *\u002F;\n }\n safeCall(instance, 'componentDidRender');\n if (BUILD.isDev) {\n hostRef.$flags$ &= ~1024 \u002F* devOnRender *\u002F;\n }\n }\n emitLifecycleEvent(elm, 'componentDidRender');\n if (!(hostRef.$flags$ & 64 \u002F* hasLoadedComponent *\u002F)) {\n hostRef.$flags$ |= 64 \u002F* hasLoadedComponent *\u002F;\n if (BUILD.asyncLoading && BUILD.cssAnnotations) {\n \u002F\u002F DOM WRITE!\n addHydratedFlag(elm);\n }\n if (BUILD.cmpDidLoad) {\n if (BUILD.isDev) {\n hostRef.$flags$ |= 2048 \u002F* devOnDidLoad *\u002F;\n }\n safeCall(instance, 'componentDidLoad');\n if (BUILD.isDev) {\n hostRef.$flags$ &= ~2048 \u002F* devOnDidLoad *\u002F;\n }\n }\n emitLifecycleEvent(elm, 'componentDidLoad');\n endPostUpdate();\n if (BUILD.asyncLoading) {\n hostRef.$onReadyResolve$(elm);\n if (!ancestorComponent) {\n appDidLoad(tagName);\n }\n }\n }\n else {\n if (BUILD.cmpDidUpdate) {\n \u002F\u002F we've already loaded this component\n \u002F\u002F fire off the user's componentDidUpdate method (if one was provided)\n \u002F\u002F componentDidUpdate runs AFTER render() has been called\n \u002F\u002F and all child components have finished updating\n if (BUILD.isDev) {\n hostRef.$flags$ |= 1024 \u002F* devOnRender *\u002F;\n }\n safeCall(instance, 'componentDidUpdate');\n if (BUILD.isDev) {\n hostRef.$flags$ &= ~1024 \u002F* devOnRender *\u002F;\n }\n }\n emitLifecycleEvent(elm, 'componentDidUpdate');\n endPostUpdate();\n }\n if (BUILD.hotModuleReplacement) {\n elm['s-hmr-load'] && elm['s-hmr-load']();\n }\n if (BUILD.method && BUILD.lazyLoad) {\n hostRef.$onInstanceResolve$(elm);\n }\n \u002F\u002F load events fire from bottom to top\n \u002F\u002F the deepest elements load first then bubbles up\n if (BUILD.asyncLoading) {\n if (hostRef.$onRenderResolve$) {\n hostRef.$onRenderResolve$();\n hostRef.$onRenderResolve$ = undefined;\n }\n if (hostRef.$flags$ & 512 \u002F* needsRerender *\u002F) {\n nextTick(() =\u003E scheduleUpdate(hostRef, false));\n }\n hostRef.$flags$ &= ~(4 \u002F* isWaitingForChildren *\u002F | 512 \u002F* needsRerender *\u002F);\n }\n \u002F\u002F ( •_•)\n \u002F\u002F ( •_•)\u003E⌐■-■\n \u002F\u002F (⌐■_■)\n};\nconst forceUpdate = (ref) =\u003E {\n if (BUILD.updatable) {\n const hostRef = getHostRef(ref);\n const isConnected = hostRef.$hostElement$.isConnected;\n if (isConnected && (hostRef.$flags$ & (2 \u002F* hasRendered *\u002F | 16 \u002F* isQueuedForUpdate *\u002F)) === 2 \u002F* hasRendered *\u002F) {\n scheduleUpdate(hostRef, false);\n }\n \u002F\u002F Returns \"true\" when the forced update was successfully scheduled\n return isConnected;\n }\n return false;\n};\nconst appDidLoad = (who) =\u003E {\n \u002F\u002F on appload\n \u002F\u002F we have finish the first big initial render\n if (BUILD.cssAnnotations) {\n addHydratedFlag(doc.documentElement);\n }\n if (BUILD.asyncQueue) {\n plt.$flags$ |= 2 \u002F* appLoaded *\u002F;\n }\n nextTick(() =\u003E emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));\n if (BUILD.profile && performance.measure) {\n performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, 'st:app:start');\n }\n};\nconst safeCall = (instance, method, arg) =\u003E {\n if (instance && instance[method]) {\n try {\n return instance[method](arg);\n }\n catch (e) {\n consoleError(e);\n }\n }\n return undefined;\n};\nconst then = (promise, thenFn) =\u003E {\n return promise && promise.then ? promise.then(thenFn) : thenFn();\n};\nconst emitLifecycleEvent = (elm, lifecycleName) =\u003E {\n if (BUILD.lifecycleDOMEvents) {\n emitEvent(elm, 'stencil_' + lifecycleName, {\n bubbles: true,\n composed: true,\n detail: {\n namespace: NAMESPACE,\n },\n });\n }\n};\nconst addHydratedFlag = (elm) =\u003E (BUILD.hydratedClass ? elm.classList.add('hydrated') : BUILD.hydratedAttribute ? elm.setAttribute('hydrated', '') : undefined);\nconst serverSideConnected = (elm) =\u003E {\n const children = elm.children;\n if (children != null) {\n for (let i = 0, ii = children.length; i \u003C ii; i++) {\n const childElm = children[i];\n if (typeof childElm.connectedCallback === 'function') {\n childElm.connectedCallback();\n }\n serverSideConnected(childElm);\n }\n }\n};\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) =\u003E {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;\n const vnode = (hostRef.$vnode$ = newVNode(tagName, null));\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map(c =\u003E {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (BUILD.shadowDom && shadowRoot) {\n shadowRootNodes.map(shadowRootNode =\u003E {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) =\u003E {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 \u002F* ElementNode *\u002F) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n \u002F\u002F got the node data from the element's attribute\n \u002F\u002F `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null,\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n \u002F\u002F this is a new child vnode\n \u002F\u002F so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n \u002F\u002F add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n \u002F\u002F this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n \u002F\u002F recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i \u003E= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n \u002F\u002F keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i \u003E= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n }\n else if (node.nodeType === 8 \u002F* CommentNode *\u002F) {\n \u002F\u002F `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n \u002F\u002F comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null,\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 \u002F* TextNode *\u002F) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n \u002F\u002F remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n else if (childVNode.$hostId$ === hostId) {\n \u002F\u002F this comment node is specifcally for this host id\n if (childNodeType === SLOT_NODE_ID) {\n \u002F\u002F `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n }\n else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (BUILD.shadowDom && shadowRootNodes) {\n \u002F\u002F browser support shadowRoot and this is a shadow dom component\n \u002F\u002F create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n \u002F\u002F add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n \u002F\u002F insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n \u002F\u002F remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n }\n else if (childNodeType === CONTENT_REF_ID) {\n \u002F\u002F `${CONTENT_REF_ID}.${hostId}`;\n if (BUILD.shadowDom && shadowRootNodes) {\n \u002F\u002F remove the content ref comment since it's not needed for shadow\n node.remove();\n }\n else if (BUILD.slotRelocation) {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n }\n else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\nconst initializeDocumentHydrate = (node, orgLocNodes) =\u003E {\n if (node.nodeType === 1 \u002F* ElementNode *\u002F) {\n let i = 0;\n for (; i \u003C node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i \u003C node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n }\n else if (node.nodeType === 8 \u002F* CommentNode *\u002F) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n \u002F\u002F useful to know if the original location is\n \u002F\u002F the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\nconst parsePropertyValue = (propValue, propType) =\u003E {\n \u002F\u002F ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (BUILD.propBoolean && propType & 4 \u002F* Boolean *\u002F) {\n \u002F\u002F per the HTML spec, any string value means it is a boolean true value\n \u002F\u002F but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (BUILD.propNumber && propType & 2 \u002F* Number *\u002F) {\n \u002F\u002F force it to be a number\n return parseFloat(propValue);\n }\n if (BUILD.propString && propType & 1 \u002F* String *\u002F) {\n \u002F\u002F could have been passed as a number or boolean\n \u002F\u002F but we still want it as a string\n return String(propValue);\n }\n \u002F\u002F redundant return here for better minification\n return propValue;\n }\n \u002F\u002F not sure exactly what type we want\n \u002F\u002F so no need to change to a different type\n return propValue;\n};\nconst getValue = (ref, propName) =\u003E getHostRef(ref).$instanceValues$.get(propName);\nconst setValue = (ref, propName, newVal, cmpMeta) =\u003E {\n \u002F\u002F check our new property value against our internal value\n const hostRef = getHostRef(ref);\n const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;\n const oldVal = hostRef.$instanceValues$.get(propName);\n const flags = hostRef.$flags$;\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);\n if ((!BUILD.lazyLoad || !(flags & 8 \u002F* isConstructingInstance *\u002F) || oldVal === undefined) && newVal !== oldVal) {\n \u002F\u002F gadzooks! the property's value has changed!!\n \u002F\u002F set our new value!\n hostRef.$instanceValues$.set(propName, newVal);\n if (BUILD.isDev) {\n if (hostRef.$flags$ & 1024 \u002F* devOnRender *\u002F) {\n consoleDevWarn(`The state\u002Fprop \"${propName}\" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, '\\nElement', elm, '\\nNew value', newVal, '\\nOld value', oldVal);\n }\n else if (hostRef.$flags$ & 2048 \u002F* devOnDidLoad *\u002F) {\n consoleDevWarn(`The state\u002Fprop \"${propName}\" changed during \"componentDidLoad()\", this triggers extra re-renders, try to setup on \"componentWillLoad()\"`, '\\nElement', elm, '\\nNew value', newVal, '\\nOld value', oldVal);\n }\n }\n if (!BUILD.lazyLoad || instance) {\n \u002F\u002F get an array of method names of watch functions to call\n if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 \u002F* isWatchReady *\u002F) {\n const watchMethods = cmpMeta.$watchers$[propName];\n if (watchMethods) {\n \u002F\u002F this instance is watching for when this property changed\n watchMethods.map(watchMethodName =\u003E {\n try {\n \u002F\u002F fire off each of the watch methods that are watching this property\n instance[watchMethodName](newVal, oldVal, propName);\n }\n catch (e) {\n consoleError(e);\n }\n });\n }\n }\n if (BUILD.updatable && (flags & (2 \u002F* hasRendered *\u002F | 16 \u002F* isQueuedForUpdate *\u002F)) === 2 \u002F* hasRendered *\u002F) {\n if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {\n if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {\n return;\n }\n }\n \u002F\u002F looks like this value actually changed, so we've got work to do!\n \u002F\u002F but only if we've already rendered, otherwise just chill out\n \u002F\u002F queue that we need to do an update, but don't worry about queuing\n \u002F\u002F up millions cuz this function ensures it only runs once\n scheduleUpdate(hostRef, false);\n }\n }\n }\n};\nconst proxyComponent = (Cstr, cmpMeta, flags) =\u003E {\n if (BUILD.member && cmpMeta.$members$) {\n if (BUILD.watchCallback && Cstr.watchers) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n \u002F\u002F It's better to have a const than two Object.entries()\n const members = Object.entries(cmpMeta.$members$);\n const prototype = Cstr.prototype;\n members.map(([memberName, [memberFlags]]) =\u003E {\n if ((BUILD.prop || BUILD.state) && (memberFlags & 31 \u002F* Prop *\u002F || ((!BUILD.lazyLoad || flags & 2 \u002F* proxyState *\u002F) && memberFlags & 32 \u002F* State *\u002F))) {\n \u002F\u002F proxyComponent - prop\n Object.defineProperty(prototype, memberName, {\n get() {\n \u002F\u002F proxyComponent, get value\n return getValue(this, memberName);\n },\n set(newValue) {\n if (\n \u002F\u002F only during dev time\n BUILD.isDev &&\n \u002F\u002F we are proxing the instance (not element)\n (flags & 1 \u002F* isElementConstructor *\u002F) === 0 &&\n \u002F\u002F the member is a non-mutable prop\n (memberFlags & (31 \u002F* Prop *\u002F | 1024 \u002F* Mutable *\u002F)) === 31 \u002F* Prop *\u002F) {\n consoleDevWarn(`@Prop() \"${memberName}\" on \"${cmpMeta.$tagName$}\" cannot be modified.\\nFurther information: https:\u002F\u002Fstenciljs.com\u002Fdocs\u002Fproperties#prop-mutability`);\n }\n \u002F\u002F proxyComponent, set value\n setValue(this, memberName, newValue, cmpMeta);\n },\n configurable: true,\n enumerable: true,\n });\n }\n else if (BUILD.lazyLoad && BUILD.method && flags & 1 \u002F* isElementConstructor *\u002F && memberFlags & 64 \u002F* Method *\u002F) {\n \u002F\u002F proxyComponent - method\n Object.defineProperty(prototype, memberName, {\n value(...args) {\n const ref = getHostRef(this);\n return ref.$onInstancePromise$.then(() =\u003E ref.$lazyInstance$[memberName](...args));\n },\n });\n }\n });\n if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 \u002F* isElementConstructor *\u002F)) {\n const attrNameToPropName = new Map();\n prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {\n plt.jmp(() =\u003E {\n const propName = attrNameToPropName.get(attrName);\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n \u002F\u002F create an array of attributes to observe\n \u002F\u002F and also create a map of html attribute name to js property name\n Cstr.observedAttributes = members\n .filter(([_, m]) =\u003E m[0] & 15 \u002F* HasAttribute *\u002F) \u002F\u002F filter to only keep props that should match attributes\n .map(([propName, m]) =\u003E {\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (BUILD.reflect && m[0] & 512 \u002F* ReflectAttr *\u002F) {\n cmpMeta.$attrsToReflect$.push([propName, attrName]);\n }\n return attrName;\n });\n }\n }\n return Cstr;\n};\nconst initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =\u003E {\n \u002F\u002F initializeComponent\n if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && (hostRef.$flags$ & 32 \u002F* hasInitializedComponent *\u002F) === 0) {\n if (BUILD.lazyLoad || BUILD.hydrateClientSide) {\n \u002F\u002F we haven't initialized this element yet\n hostRef.$flags$ |= 32 \u002F* hasInitializedComponent *\u002F;\n \u002F\u002F lazy loaded components\n \u002F\u002F request the component's implementation to be\n \u002F\u002F wired up with the host element\n Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);\n if (Cstr.then) {\n \u002F\u002F Await creates a micro-task avoid if possible\n const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for \u003C${cmpMeta.$tagName$}\u003E`);\n Cstr = await Cstr;\n endLoad();\n }\n if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {\n throw new Error(`Constructor for \"${cmpMeta.$tagName$}#${hostRef.$modeName$}\" was not found`);\n }\n if (BUILD.member && !Cstr.isProxied) {\n \u002F\u002F we'eve never proxied this Constructor before\n \u002F\u002F let's add the getters\u002Fsetters to its prototype before\n \u002F\u002F the first time we create an instance of the implementation\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 \u002F* proxyState *\u002F);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n \u002F\u002F ok, time to construct the instance\n \u002F\u002F but let's keep track of when we start and stop\n \u002F\u002F so that the getters\u002Fsetters don't incorrectly step on data\n if (BUILD.member) {\n hostRef.$flags$ |= 8 \u002F* isConstructingInstance *\u002F;\n }\n \u002F\u002F construct the lazy-loaded component implementation\n \u002F\u002F passing the hostRef is very important during\n \u002F\u002F construction in order to directly wire together the\n \u002F\u002F host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n }\n catch (e) {\n consoleError(e);\n }\n if (BUILD.member) {\n hostRef.$flags$ &= ~8 \u002F* isConstructingInstance *\u002F;\n }\n if (BUILD.watchCallback) {\n hostRef.$flags$ |= 128 \u002F* isWatchReady *\u002F;\n }\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else {\n \u002F\u002F sync constructor component\n Cstr = elm.constructor;\n hostRef.$flags$ |= 128 \u002F* isWatchReady *\u002F | 32 \u002F* hasInitializedComponent *\u002F;\n }\n if (BUILD.style && Cstr.style) {\n \u002F\u002F this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (BUILD.mode && typeof style !== 'string') {\n style = style[(hostRef.$modeName$ = computeMode(elm))];\n if (BUILD.hydrateServerSide && hostRef.$modeName$) {\n elm.setAttribute('s-mode', hostRef.$modeName$);\n }\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 \u002F* needsShadowDomShim *\u002F) {\n style = await __sc_import_codesandbox_stenciljs('.\u002Fshadow-css-fb1c6168.js').then(m =\u003E m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F));\n endRegisterStyles();\n }\n }\n }\n \u002F\u002F we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () =\u003E scheduleUpdate(hostRef, true);\n if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {\n \u002F\u002F this is the intial load and this component it has an ancestor component\n \u002F\u002F but the ancestor component has NOT fired its will update lifecycle yet\n \u002F\u002F so let's just cool our jets and wait for the ancestor to continue first\n \u002F\u002F this will get fired off when the ancestor component\n \u002F\u002F finally gets around to rendering its lazy self\n \u002F\u002F fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n }\n else {\n schedule();\n }\n};\nconst fireConnectedCallback = (instance) =\u003E {\n if (BUILD.lazyLoad && BUILD.connectedCallback) {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = (elm) =\u003E {\n if ((plt.$flags$ & 1 \u002F* isTmpDisconnected *\u002F) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (BUILD.hostListenerTargetParent) {\n \u002F\u002F only run if we have listeners being attached to a parent\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);\n }\n if (!(hostRef.$flags$ & 1 \u002F* hasConnected *\u002F)) {\n \u002F\u002F first time this component has connected\n hostRef.$flags$ |= 1 \u002F* hasConnected *\u002F;\n let hostId;\n if (BUILD.hydrateClientSide) {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) {\n const scopeId = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) : addStyle(elm.shadowRoot, cmpMeta);\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (BUILD.slotRelocation && !hostId) {\n \u002F\u002F initUpdate\n \u002F\u002F if the slot polyfill is required we'll need to put some nodes\n \u002F\u002F in here to act as original content anchors as we move nodes around\n \u002F\u002F host element has been connected to the DOM\n if (BUILD.hydrateServerSide || ((BUILD.slot || BUILD.shadowDom) && cmpMeta.$flags$ & (4 \u002F* hasSlotRelocation *\u002F | 8 \u002F* needsShadowDomShim *\u002F))) {\n setContentReference(elm);\n }\n }\n if (BUILD.asyncLoading) {\n \u002F\u002F find the first ancestor component (if there is one) and register\n \u002F\u002F this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {\n \u002F\u002F climb up the ancestors looking for the first\n \u002F\u002F component that hasn't finished its lifecycle update yet\n if ((BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 \u002F* ElementNode *\u002F && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p']) ||\n ancestorComponent['s-p']) {\n \u002F\u002F we found this components first ancestor component\n \u002F\u002F keep a reference to this component's ancestor component\n attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));\n break;\n }\n }\n }\n \u002F\u002F Lazy properties\n \u002F\u002F https:\u002F\u002Fdevelopers.google.com\u002Fweb\u002Ffundamentals\u002Fweb-components\u002Fbest-practices#lazy-properties\n if (BUILD.prop && BUILD.lazyLoad && !BUILD.hydrateServerSide && cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) =\u003E {\n if (memberFlags & 31 \u002F* Prop *\u002F && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n \u002F\u002F connectedCallback, taskQueue, initialLoad\n \u002F\u002F angular sets attribute AFTER connectCallback\n \u002F\u002F https:\u002F\u002Fgithub.com\u002Fangular\u002Fangular\u002Fissues\u002F18909\n \u002F\u002F https:\u002F\u002Fgithub.com\u002Fangular\u002Fangular\u002Fissues\u002F19940\n nextTick(() =\u003E initializeComponent(elm, hostRef, cmpMeta));\n }\n else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n }\n else {\n \u002F\u002F not the first time this has connected\n \u002F\u002F reattach any event listeners to the host\n \u002F\u002F since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n \u002F\u002F fire off connectedCallback() on component instance\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n endConnected();\n }\n};\nconst setContentReference = (elm) =\u003E {\n \u002F\u002F only required when we're NOT using native shadow dom (slot)\n \u002F\u002F or this browser doesn't support native shadow dom\n \u002F\u002F and this host element was NOT created with SSR\n \u002F\u002F let's pick out the inner content for slot projection\n \u002F\u002F create a node to represent where the original\n \u002F\u002F content was first placed, which is useful later on\n const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : ''));\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectedCallback = (elm) =\u003E {\n if ((plt.$flags$ & 1 \u002F* isTmpDisconnected *\u002F) === 0) {\n const hostRef = getHostRef(elm);\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n if (BUILD.hostListener) {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map(rmListener =\u003E rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n \u002F\u002F clear CSS var-shim tracking\n if (BUILD.cssVarShim && plt.$cssShim$) {\n plt.$cssShim$.removeHost(elm);\n }\n if (BUILD.lazyLoad && BUILD.disconnectedCallback) {\n safeCall(instance, 'disconnectedCallback');\n }\n if (BUILD.cmpDidUnload) {\n safeCall(instance, 'componentDidUnload');\n }\n }\n};\nconst defineCustomElement = (Cstr, compactMeta) =\u003E {\n customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));\n};\nconst proxyCustomElement = (Cstr, compactMeta) =\u003E {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) {\n cmpMeta.$flags$ |= 8 \u002F* needsShadowDomShim *\u002F;\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n connectedCallback(this);\n if (BUILD.connectedCallback && originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (BUILD.disconnectedCallback && originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta, 1 \u002F* isElementConstructor *\u002F | 2 \u002F* proxyState *\u002F);\n};\nconst forceModeUpdate = (elm) =\u003E {\n if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {\n const mode = computeMode(elm);\n const hostRef = getHostRef(elm);\n if (hostRef.$modeName$ !== mode) {\n const cmpMeta = hostRef.$cmpMeta$;\n const oldScopeId = elm['s-sc'];\n const scopeId = getScopeId(cmpMeta, mode);\n const style = elm.constructor.style[mode];\n const flags = cmpMeta.$flags$;\n if (style) {\n if (!styles.has(scopeId)) {\n registerStyle(scopeId, style, !!(flags & 1 \u002F* shadowDomEncapsulation *\u002F));\n }\n hostRef.$modeName$ = mode;\n elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');\n attachStyles(hostRef);\n forceUpdate(elm);\n }\n }\n }\n};\nconst attachShadow = (el) =\u003E {\n if (supportsShadow) {\n el.attachShadow({ mode: 'open' });\n }\n else {\n el.shadowRoot = el;\n }\n};\nconst hmrStart = (elm, cmpMeta, hmrVersionId) =\u003E {\n \u002F\u002F ¯\\_(ツ)_\u002F¯\n const hostRef = getHostRef(elm);\n \u002F\u002F reset state flags to only have been connected\n hostRef.$flags$ = 1 \u002F* hasConnected *\u002F;\n \u002F\u002F TODO\n \u002F\u002F detatch any event listeners that may have been added\n \u002F\u002F because we're not passing an exact event name it'll\n \u002F\u002F remove all of this element's event, which is good\n \u002F\u002F create a callback for when this component finishes hmr\n elm['s-hmr-load'] = () =\u003E {\n \u002F\u002F finished hmr for this element\n delete elm['s-hmr-load'];\n };\n \u002F\u002F re-initialize the component\n initializeComponent(elm, hostRef, cmpMeta, hmrVersionId);\n};\nconst patchCloneNode = (HostElementPrototype) =\u003E {\n const orgCloneNode = HostElementPrototype.cloneNode;\n HostElementPrototype.cloneNode = function (deep) {\n const srcNode = this;\n const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;\n const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);\n if (BUILD.slot && !isShadowDom && deep) {\n let i = 0;\n let slotted, nonStencilNode;\n let stencilPrivates = ['s-id', 's-cr', 's-lr', 's-rc', 's-sc', 's-p', 's-cn', 's-sr', 's-sn', 's-hn', 's-ol', 's-nr', 's-si'];\n for (; i \u003C srcNode.childNodes.length; i++) {\n slotted = srcNode.childNodes[i]['s-nr'];\n nonStencilNode = stencilPrivates.every((privateField) =\u003E !srcNode.childNodes[i][privateField]);\n if (slotted) {\n if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {\n clonedNode.__appendChild(slotted.cloneNode(true));\n }\n else {\n clonedNode.appendChild(slotted.cloneNode(true));\n }\n }\n if (nonStencilNode) {\n clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nconst patchSlotAppendChild = (HostElementPrototype) =\u003E {\n HostElementPrototype.__appendChild = HostElementPrototype.appendChild;\n HostElementPrototype.appendChild = function (newChild) {\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[slotChildNodes.length - 1];\n return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n }\n return this.__appendChild(newChild);\n };\n};\nconst patchChildSlotNodes = (elm, cmpMeta) =\u003E {\n class FakeNodeList extends Array {\n item(n) {\n return this[n];\n }\n }\n if (cmpMeta.$flags$ & 8 \u002F* needsShadowDomShim *\u002F) {\n const childNodesFn = elm.__lookupGetter__('childNodes');\n Object.defineProperty(elm, 'children', {\n get() {\n return this.childNodes.map((n) =\u003E n.nodeType === 1);\n },\n });\n Object.defineProperty(elm, 'childElementCount', {\n get() {\n return elm.children.length;\n },\n });\n Object.defineProperty(elm, 'childNodes', {\n get() {\n const childNodes = childNodesFn.call(this);\n if ((plt.$flags$ & 1 \u002F* isTmpDisconnected *\u002F) === 0 && getHostRef(this).$flags$ & 2 \u002F* hasRendered *\u002F) {\n const result = new FakeNodeList();\n for (let i = 0; i \u003C childNodes.length; i++) {\n const slot = childNodes[i]['s-nr'];\n if (slot) {\n result.push(slot);\n }\n }\n return result;\n }\n return FakeNodeList.from(childNodes);\n },\n });\n }\n};\nconst getSlotName = (node) =\u003E node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';\nconst getHostSlotNode = (childNodes, slotName) =\u003E {\n let i = 0;\n let childNode;\n for (; i \u003C childNodes.length; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && childNode['s-sn'] === slotName) {\n return childNode;\n }\n childNode = getHostSlotNode(childNode.childNodes, slotName);\n if (childNode) {\n return childNode;\n }\n }\n return null;\n};\nconst getHostSlotChildNodes = (n, slotName) =\u003E {\n const childNodes = [n];\n while ((n = n.nextSibling) && n['s-sn'] === slotName) {\n childNodes.push(n);\n }\n return childNodes;\n};\nconst bootstrapLazy = (lazyBundles, options = {}) =\u003E {\n if (BUILD.profile && performance.mark) {\n performance.mark('st:app:start');\n }\n installDevTools();\n const endBootstrap = createTime('bootstrapLazy');\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = \u002F*@__PURE__*\u002F head.querySelector('meta[charset]');\n const visibilityStyle = \u002F*@__PURE__*\u002F doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = \u002F*@__PURE__*\u002F doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || '.\u002F', doc.baseURI).href;\n if (BUILD.asyncQueue) {\n if (options.syncQueue) {\n plt.$flags$ |= 4 \u002F* queueSync *\u002F;\n }\n }\n if (BUILD.hydrateClientSide) {\n \u002F\u002F If the app is already hydrated there is not point to disable the\n \u002F\u002F async queue. This will improve the first input delay\n plt.$flags$ |= 2 \u002F* appLoaded *\u002F;\n }\n if (BUILD.hydrateClientSide && BUILD.shadowDom) {\n for (; i \u003C styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n lazyBundles.map(lazyBundle =\u003E lazyBundle[1].map(compactMeta =\u003E {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = {};\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) {\n cmpMeta.$flags$ |= 8 \u002F* needsShadowDomShim *\u002F;\n }\n const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n \u002F\u002F StencilLazyHost\n constructor(self) {\n \u002F\u002F @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (BUILD.shadowDom && cmpMeta.$flags$ & 1 \u002F* shadowDomEncapsulation *\u002F) {\n \u002F\u002F this component is using shadow dom\n \u002F\u002F and this browser supports shadow dom\n \u002F\u002F add the read-only property \"shadowRoot\" to the host element\n \u002F\u002F adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 \u002F* shadowDelegatesFocus *\u002F),\n });\n }\n else {\n self.attachShadow({ mode: 'open' });\n }\n }\n else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(self, cmpMeta);\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n \u002F\u002F connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n }\n else {\n plt.jmp(() =\u003E connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() =\u003E disconnectedCallback(this));\n }\n forceUpdate() {\n if (BUILD.isDev) {\n consoleDevWarn(`element.forceUpdate() is deprecated, use the \"forceUpdate\" function from \"@stencil\u002Fcore\" instead:\n\n import { forceUpdate } from ‘@stencil\u002Fcore’;\n\n forceUpdate(this);\n forceUpdate(element);`);\n }\n forceUpdate(this);\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n if (BUILD.cloneNodeFix) {\n patchCloneNode(HostElement.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(HostElement.prototype);\n }\n if (BUILD.hotModuleReplacement) {\n HostElement.prototype['s-hmr'] = function (hmrVersionId) {\n hmrStart(this, cmpMeta, hmrVersionId);\n };\n }\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 \u002F* isElementConstructor *\u002F));\n }\n }));\n if (BUILD.hydratedClass || BUILD.hydratedAttribute) {\n visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;\n visibilityStyle.setAttribute('data-styles', '');\n head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n \u002F\u002F Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map(host =\u003E host.connectedCallback());\n }\n else {\n if (BUILD.profile) {\n plt.jmp(() =\u003E (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));\n }\n else {\n plt.jmp(() =\u003E (appLoadFallback = setTimeout(appDidLoad, 30)));\n }\n }\n \u002F\u002F Fallback appLoad event\n endBootstrap();\n};\nconst getAssetPath = (path) =\u003E {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst setAssetPath = (path) =\u003E (plt.$resourcesUrl$ = path);\nconst getConnect = (_ref, tagName) =\u003E {\n const componentOnReady = () =\u003E {\n let elm = doc.querySelector(tagName);\n if (!elm) {\n elm = doc.createElement(tagName);\n doc.body.appendChild(elm);\n }\n return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);\n };\n const create = (...args) =\u003E {\n return componentOnReady().then(el =\u003E el.create(...args));\n };\n return {\n create,\n componentOnReady,\n };\n};\nconst getContext = (_elm, context) =\u003E {\n if (context in Context) {\n return Context[context];\n }\n else if (context === 'window') {\n return win;\n }\n else if (context === 'document') {\n return doc;\n }\n else if (context === 'isServer' || context === 'isPrerender') {\n return BUILD.hydrateServerSide ? true : false;\n }\n else if (context === 'isClient') {\n return BUILD.hydrateServerSide ? false : true;\n }\n else if (context === 'resourcesUrl' || context === 'publicPath') {\n return getAssetPath('.');\n }\n else if (context === 'queue') {\n return {\n write: writeTask,\n read: readTask,\n tick: {\n then(cb) {\n return nextTick(cb);\n },\n },\n };\n }\n return undefined;\n};\nconst insertVdomAnnotations = (doc, staticComponents) =\u003E {\n if (doc != null) {\n const docData = {\n hostIds: 0,\n rootLevelIds: 0,\n staticComponents: new Set(staticComponents),\n };\n const orgLocationNodes = [];\n parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);\n orgLocationNodes.forEach(orgLocationNode =\u003E {\n if (orgLocationNode != null) {\n const nodeRef = orgLocationNode['s-nr'];\n let hostId = nodeRef['s-host-id'];\n let nodeId = nodeRef['s-node-id'];\n let childId = `${hostId}.${nodeId}`;\n if (hostId == null) {\n hostId = 0;\n docData.rootLevelIds++;\n nodeId = docData.rootLevelIds;\n childId = `${hostId}.${nodeId}`;\n if (nodeRef.nodeType === 1 \u002F* ElementNode *\u002F) {\n nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (nodeRef.nodeType === 3 \u002F* TextNode *\u002F) {\n if (hostId === 0) {\n const textContent = nodeRef.nodeValue.trim();\n if (textContent === '') {\n \u002F\u002F useless whitespace node at the document root\n orgLocationNode.remove();\n return;\n }\n }\n const commentBeforeTextNode = doc.createComment(childId);\n commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;\n nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);\n }\n }\n let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;\n const orgLocationParentNode = orgLocationNode.parentElement;\n if (orgLocationParentNode) {\n if (orgLocationParentNode['s-en'] === '') {\n \u002F\u002F ending with a \".\" means that the parent element\n \u002F\u002F of this node's original location is a SHADOW dom element\n \u002F\u002F and this node is apart of the root level light dom\n orgLocationNodeId += `.`;\n }\n else if (orgLocationParentNode['s-en'] === 'c') {\n \u002F\u002F ending with a \".c\" means that the parent element\n \u002F\u002F of this node's original location is a SCOPED element\n \u002F\u002F and this node is apart of the root level light dom\n orgLocationNodeId += `.c`;\n }\n }\n orgLocationNode.nodeValue = orgLocationNodeId;\n }\n });\n }\n};\nconst parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) =\u003E {\n if (node == null) {\n return;\n }\n if (node['s-nr'] != null) {\n orgLocationNodes.push(node);\n }\n if (node.nodeType === 1 \u002F* ElementNode *\u002F) {\n node.childNodes.forEach(childNode =\u003E {\n const hostRef = getHostRef(childNode);\n if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {\n const cmpData = {\n nodeIds: 0,\n };\n insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);\n }\n parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);\n });\n }\n};\nconst insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) =\u003E {\n if (vnode != null) {\n const hostId = ++docData.hostIds;\n hostElm.setAttribute(HYDRATE_ID, hostId);\n if (hostElm['s-cr'] != null) {\n hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;\n }\n if (vnode.$children$ != null) {\n const depth = 0;\n vnode.$children$.forEach((vnodeChild, index) =\u003E {\n insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);\n });\n }\n if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute('c-id')) {\n const parent = hostElm.parentElement;\n if (parent && parent.childNodes) {\n const parentChildNodes = Array.from(parent.childNodes);\n const comment = parentChildNodes.find(node =\u003E node.nodeType === 8 \u002F* CommentNode *\u002F && node['s-sr']);\n if (comment) {\n const index = parentChildNodes.indexOf(hostElm) - 1;\n vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);\n }\n }\n }\n }\n};\nconst insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) =\u003E {\n const childElm = vnodeChild.$elm$;\n if (childElm == null) {\n return;\n }\n const nodeId = cmpData.nodeIds++;\n const childId = `${hostId}.${nodeId}.${depth}.${index}`;\n childElm['s-host-id'] = hostId;\n childElm['s-node-id'] = nodeId;\n if (childElm.nodeType === 1 \u002F* ElementNode *\u002F) {\n childElm.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (childElm.nodeType === 3 \u002F* TextNode *\u002F) {\n const parentNode = childElm.parentNode;\n if (parentNode.nodeName !== 'STYLE') {\n const textNodeId = `${TEXT_NODE_ID}.${childId}`;\n const commentBeforeTextNode = doc.createComment(textNodeId);\n parentNode.insertBefore(commentBeforeTextNode, childElm);\n }\n }\n else if (childElm.nodeType === 8 \u002F* CommentNode *\u002F) {\n if (childElm['s-sr']) {\n const slotName = childElm['s-sn'] || '';\n const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;\n childElm.nodeValue = slotNodeId;\n }\n }\n if (vnodeChild.$children$ != null) {\n const childDepth = depth + 1;\n vnodeChild.$children$.forEach((vnode, index) =\u003E {\n insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);\n });\n }\n};\nconst hostRefs = new WeakMap();\nconst getHostRef = (ref) =\u003E hostRefs.get(ref);\nconst registerInstance = (lazyInstance, hostRef) =\u003E hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);\nconst registerHost = (elm, cmpMeta) =\u003E {\n const hostRef = {\n $flags$: 0,\n $hostElement$: elm,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map(),\n };\n if (BUILD.isDev) {\n hostRef.$renderCount$ = 0;\n }\n if (BUILD.method && BUILD.lazyLoad) {\n hostRef.$onInstancePromise$ = new Promise(r =\u003E (hostRef.$onInstanceResolve$ = r));\n }\n if (BUILD.asyncLoading) {\n hostRef.$onReadyPromise$ = new Promise(r =\u003E (hostRef.$onReadyResolve$ = r));\n elm['s-p'] = [];\n elm['s-rc'] = [];\n }\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n return hostRefs.set(elm, hostRef);\n};\nconst isMemberInElement = (elm, memberName) =\u003E memberName in elm;\nconst STENCIL_DEV_MODE = BUILD.isTesting\n ? ['STENCIL:'] \u002F\u002F E2E testing\n : ['%cstencil', 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px'];\nconst consoleDevError = (...m) =\u003E console.error(...STENCIL_DEV_MODE, ...m);\nconst consoleDevWarn = (...m) =\u003E console.warn(...STENCIL_DEV_MODE, ...m);\nconst consoleDevInfo = (...m) =\u003E console.info(...STENCIL_DEV_MODE, ...m);\nconst consoleError = (e) =\u003E console.error(e);\nconst cmpModules = \u002F*@__PURE__*\u002F new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) =\u003E {\n \u002F\u002F loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(\u002F-\u002Fg, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n if (BUILD.isDev && typeof bundleId !== 'string') {\n consoleDevError(`Trying to lazily load component \u003C${cmpMeta.$tagName$}\u003E with style mode \"${hostRef.$modeName$}\", but it does not exist.`);\n return undefined;\n }\n const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;\n if (module) {\n return module[exportName];\n }\n return __sc_import_codesandbox_stenciljs(\n \u002F* webpackInclude: \u002F\\.entry\\.js$\u002F *\u002F\n \u002F* webpackExclude: \u002F\\.system\\.entry\\.js$\u002F *\u002F\n \u002F* webpackMode: \"lazy\" *\u002F\n `.\u002F${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then(importedModule =\u003E {\n if (!BUILD.hotModuleReplacement) {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = new Map();\nconst modeResolutionChain = [];\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueDomWritesLow = [];\nconst queueTask = (queue, write) =\u003E (cb) =\u003E {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 \u002F* queueSync *\u002F) {\n nextTick(flush);\n }\n else {\n plt.raf(flush);\n }\n }\n};\nconst consume = (queue) =\u003E {\n for (let i = 0; i \u003C queue.length; i++) {\n try {\n queue[i](performance.now());\n }\n catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst consumeTimeout = (queue, timeout) =\u003E {\n let i = 0;\n let ts = 0;\n while (i \u003C queue.length && (ts = performance.now()) \u003C timeout) {\n try {\n queue[i++](ts);\n }\n catch (e) {\n consoleError(e);\n }\n }\n if (i === queue.length) {\n queue.length = 0;\n }\n else if (i !== 0) {\n queue.splice(0, i);\n }\n};\nconst flush = () =\u003E {\n if (BUILD.asyncQueue) {\n queueCongestion++;\n }\n \u002F\u002F always force a bunch of medium callbacks to run, but still have\n \u002F\u002F a throttle on how many can run in a certain time\n \u002F\u002F DOM READS!!!\n consume(queueDomReads);\n \u002F\u002F DOM WRITES!!!\n if (BUILD.asyncQueue) {\n const timeout = (plt.$flags$ & 6 \u002F* queueMask *\u002F) === 2 \u002F* appLoaded *\u002F ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 \u002F 10.0)) : Infinity;\n consumeTimeout(queueDomWrites, timeout);\n consumeTimeout(queueDomWritesLow, timeout);\n if (queueDomWrites.length \u003E 0) {\n queueDomWritesLow.push(...queueDomWrites);\n queueDomWrites.length = 0;\n }\n if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length \u003E 0)) {\n \u002F\u002F still more to do yet, but we've run out of time\n \u002F\u002F let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n else {\n queueCongestion = 0;\n }\n }\n else {\n consume(queueDomWrites);\n if ((queuePending = queueDomReads.length \u003E 0)) {\n \u002F\u002F still more to do yet, but we've run out of time\n \u002F\u002F let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = \u002F*@__PURE__*\u002F (cb) =\u003E promiseResolve().then(cb);\nconst readTask = \u002F*@__PURE__*\u002F queueTask(queueDomReads, false);\nconst writeTask = \u002F*@__PURE__*\u002F queueTask(queueDomWrites, true);\nconst Build = {\n isDev: BUILD.isDev ? true : false,\n isBrowser: true,\n isServer: false,\n isTesting: BUILD.isTesting ? true : false,\n};\n\nexport { BUILD as B, CSS as C, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, h, plt as p, registerInstance as r, win as w };\n","directory_shortid":"HkldwVBszI","id":"fb7d67b9-12b4-4024-8594-acf2feac1e7e","inserted_at":"2020-10-30T22:01:40","is_binary":null,"sha":null,"shortid":"m6XPp","source_id":"bb851a23-60af-4f39-afb2-3e39d1f4f9db","title":"index-1831826d.js","updated_at":"2020-11-01T13:52:47","upload_id":null}],"room_id":null,"base_git":null,"updated_at":"2020-05-24T15:20:04","external_resources":[],"privacy":0,"is_frozen":false,"forked_template_sandbox":{"alias":"codesandbox-stenciljs-44t8v","custom_template":{"color":"#c4198b","icon_url":"TypeScriptIcon","id":"d451f017-69f4-4d41-bd2e-a0e646939f51","official":false,"published":true,"title":"codesandbox-stenciljs","url":null},"git":null,"id":"44t8v","inserted_at":"2020-02-07T20:06:12","privacy":0,"template":"node","title":"codesandbox-stenciljs","updated_at":"2020-10-22T07:27:47"},"fork_count":2,"user_liked":false,"preview_secret":null,"is_sse":true,"picks":[],"forked_from_sandbox":null,"like_count":0,"tags":[],"authorization":"read","screenshot_url":"https:\u002F\u002Fcodesandbox.io\u002Fstatic\u002Fimg\u002Fbanner.png","team":{"avatar_url":"https:\u002F\u002Favatars2.githubusercontent.com\u002Fu\u002F639189?v=4","id":"accadf8a-f3d0-46f2-a39b-e56317b0c9c5","name":"ngduc"},"title":"Stencil Example","git":null,"pr_number":null,"original_git_commit_sha":null,"version":44,"template":"node","custom_template":null};