index.js 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. function componentOnReady() {
  2. return getHostRef(this).$onReadyPromise$;
  3. }
  4. function forceUpdate() {}
  5. function hydrateApp(e, t, o, n, s) {
  6. function l() {
  7. if (global.clearTimeout(p), i.clear(), r.clear(), !h) {
  8. h = !0;
  9. try {
  10. t.clientHydrateAnnotations && insertVdomAnnotations(e.document, t.staticComponents),
  11. e.dispatchEvent(new e.Event("DOMContentLoaded")), e.document.createElement = c,
  12. e.document.createElementNS = $;
  13. } catch (e) {
  14. renderCatchError(t, o, e);
  15. }
  16. }
  17. n(e, t, o, s);
  18. }
  19. function a(e) {
  20. renderCatchError(t, o, e), l();
  21. }
  22. const r = new Set, i = new Set, d = new Set, c = e.document.createElement, $ = e.document.createElementNS, m = Promise.resolve();
  23. let p, h = !1;
  24. try {
  25. function u() {
  26. return g(this);
  27. }
  28. function f(e) {
  29. if (isValidComponent(e, t) && !getHostRef(e)) {
  30. const t = loadModule({
  31. $tagName$: e.nodeName.toLowerCase(),
  32. $flags$: null
  33. }, null);
  34. null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback = u, registerHost(e, t.cmpMeta),
  35. function o(e, t) {
  36. if ("function" != typeof e.componentOnReady && (e.componentOnReady = componentOnReady),
  37. "function" != typeof e.forceUpdate && (e.forceUpdate = forceUpdate), 1 & t.$flags$ && (e.shadowRoot = e),
  38. null != t.$members$) {
  39. const o = getHostRef(e);
  40. Object.entries(t.$members$).forEach((([n, s]) => {
  41. const l = s[0];
  42. if (31 & l) {
  43. const a = s[1] || n, r = e.getAttribute(a);
  44. if (null != r) {
  45. const e = parsePropertyValue(r, l);
  46. o.$instanceValues$.set(n, e);
  47. }
  48. const i = e[n];
  49. void 0 !== i && (o.$instanceValues$.set(n, i), delete e[n]), Object.defineProperty(e, n, {
  50. get() {
  51. return getValue(this, n);
  52. },
  53. set(e) {
  54. setValue(this, n, e, t);
  55. },
  56. configurable: !0,
  57. enumerable: !0
  58. });
  59. } else 64 & l && Object.defineProperty(e, n, {
  60. value(...e) {
  61. const t = getHostRef(this);
  62. return t.$onInstancePromise$.then((() => t.$lazyInstance$[n](...e))).catch(consoleError);
  63. }
  64. });
  65. }));
  66. }
  67. }(e, t.cmpMeta));
  68. }
  69. }
  70. function g(n) {
  71. return i.delete(n), isValidComponent(n, t) && o.hydratedCount < t.maxHydrateCount && !r.has(n) && shouldHydrate(n) ? (r.add(n),
  72. async function s(e, t, o, n, l) {
  73. o = o.toLowerCase();
  74. const a = loadModule({
  75. $tagName$: o,
  76. $flags$: null
  77. });
  78. if (null != a && null != a.cmpMeta) {
  79. l.add(n);
  80. try {
  81. connectedCallback(n), await n.componentOnReady(), t.hydratedCount++;
  82. const e = getHostRef(n), s = e.$modeName$ ? e.$modeName$ : "$";
  83. t.components.some((e => e.tag === o && e.mode === s)) || t.components.push({
  84. tag: o,
  85. mode: s,
  86. count: 0,
  87. depth: -1
  88. });
  89. } catch (t) {
  90. e.console.error(t);
  91. }
  92. l.delete(n);
  93. }
  94. }(e, o, n.nodeName, n, d)) : m;
  95. }
  96. e.document.createElement = function t(o) {
  97. const n = c.call(e.document, o);
  98. return f(n), n;
  99. }, e.document.createElementNS = function t(o, n) {
  100. const s = $.call(e.document, o, n);
  101. return f(s), s;
  102. }, p = global.setTimeout((function L() {
  103. a(`Hydrate exceeded timeout${function e(t) {
  104. return Array.from(t).map(waitingOnElementMsg);
  105. }(d)}`);
  106. }), t.timeout), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
  107. globalScripts(), function e(t) {
  108. if (null != t && 1 === t.nodeType) {
  109. f(t);
  110. const o = t.children;
  111. for (let t = 0, n = o.length; t < n; t++) e(o[t]);
  112. }
  113. }(e.document.body), function e() {
  114. const t = Array.from(i).filter((e => e.parentElement));
  115. return t.length > 0 ? Promise.all(t.map(g)).then(e) : m;
  116. }().then(l).catch(a);
  117. } catch (e) {
  118. a(e);
  119. }
  120. }
  121. function isValidComponent(e, t) {
  122. if (null != e && 1 === e.nodeType) {
  123. const o = e.nodeName;
  124. if ("string" == typeof o && o.includes("-")) return !t.excludeComponents.includes(o.toLowerCase());
  125. }
  126. return !1;
  127. }
  128. function shouldHydrate(e) {
  129. if (9 === e.nodeType) return !0;
  130. if (NO_HYDRATE_TAGS.has(e.nodeName)) return !1;
  131. if (e.hasAttribute("no-prerender")) return !1;
  132. const t = e.parentNode;
  133. return null == t || shouldHydrate(t);
  134. }
  135. function renderCatchError(e, t, o) {
  136. const n = {
  137. level: "error",
  138. type: "build",
  139. header: "Hydrate Error",
  140. messageText: "",
  141. relFilePath: null,
  142. absFilePath: null,
  143. lines: []
  144. };
  145. if (e.url) try {
  146. const t = new URL(e.url);
  147. "/" !== t.pathname && (n.header += ": " + t.pathname);
  148. } catch (e) {}
  149. null != o && (null != o.stack ? n.messageText = o.stack.toString() : null != o.message ? n.messageText = o.message.toString() : n.messageText = o.toString()),
  150. t.diagnostics.push(n);
  151. }
  152. function printTag(e) {
  153. let t = `<${e.nodeName.toLowerCase()}`;
  154. if (Array.isArray(e.attributes)) for (let o = 0; o < e.attributes.length; o++) {
  155. const n = e.attributes[o];
  156. t += ` ${n.name}`, "" !== n.value && (t += `="${n.value}"`);
  157. }
  158. return t += ">", t;
  159. }
  160. function waitingOnElementMsg(e) {
  161. let t = "";
  162. if (e) {
  163. const o = [];
  164. t = " - waiting on:";
  165. let n = e;
  166. for (;n && 9 !== n.nodeType && "BODY" !== n.nodeName; ) o.unshift(printTag(n)),
  167. n = n.parentElement;
  168. let s = "";
  169. for (const e of o) s += " ", t += `\n${s}${e}`;
  170. }
  171. return t;
  172. }
  173. import { BUILD, NAMESPACE } from "@stencil/core/internal/app-data";
  174. export { BUILD, Env, NAMESPACE } from "@stencil/core/internal/app-data";
  175. import { globalScripts } from "@stencil/core/internal/app-globals";
  176. const getAssetPath = e => {
  177. const t = new URL(e, plt.$resourcesUrl$);
  178. return t.origin !== win.location.origin ? t.href : t.pathname;
  179. }, setAssetPath = e => plt.$resourcesUrl$ = e;
  180. let i = 0;
  181. const createTime = (e, t = "") => {
  182. if (BUILD.profile && performance.mark) {
  183. const o = `st:${e}:${t}:${i++}`;
  184. return performance.mark(o), () => performance.measure(`[Stencil] ${e}() <${t}>`, o);
  185. }
  186. return () => {};
  187. }, XLINK_NS = "http://www.w3.org/1999/xlink", EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, h = (e, t, ...o) => {
  188. let n = null, s = null, l = null, a = !1, r = !1;
  189. const i = [], d = t => {
  190. for (let o = 0; o < t.length; o++) n = t[o], Array.isArray(n) ? d(n) : null != n && "boolean" != typeof n && ((a = "function" != typeof e && !isComplexType(n)) ? n = String(n) : BUILD.isDev && "function" != typeof e && n.$flags$,
  191. a && r ? i[i.length - 1].$text$ += n : i.push(a ? newVNode(null, n) : n), r = a);
  192. };
  193. if (d(o), t && (BUILD.isDev && "input" === e && validateInputProperties(t), BUILD.vdomKey && t.key && (s = t.key),
  194. BUILD.slotRelocation && t.name && (l = t.name), BUILD.vdomClass)) {
  195. const e = t.className || t.class;
  196. e && (t.class = "object" != typeof e ? e : Object.keys(e).filter((t => e[t])).join(" "));
  197. }
  198. if (BUILD.isDev && i.some(isHost), BUILD.vdomFunctional && "function" == typeof e) return e(null === t ? {} : t, i, vdomFnUtils);
  199. const c = newVNode(e, null);
  200. return c.$attrs$ = t, i.length > 0 && (c.$children$ = i), BUILD.vdomKey && (c.$key$ = s),
  201. BUILD.slotRelocation && (c.$name$ = l), c;
  202. }, newVNode = (e, t) => {
  203. const o = {
  204. $flags$: 0,
  205. $tag$: e,
  206. $text$: t,
  207. $elm$: null,
  208. $children$: null
  209. };
  210. return BUILD.vdomAttribute && (o.$attrs$ = null), BUILD.vdomKey && (o.$key$ = null),
  211. BUILD.slotRelocation && (o.$name$ = null), o;
  212. }, Host = {}, isHost = e => e && e.$tag$ === Host, vdomFnUtils = {
  213. forEach: (e, t) => e.map(convertToPublic).forEach(t),
  214. map: (e, t) => e.map(convertToPublic).map(t).map(convertToPrivate)
  215. }, convertToPublic = e => ({
  216. vattrs: e.$attrs$,
  217. vchildren: e.$children$,
  218. vkey: e.$key$,
  219. vname: e.$name$,
  220. vtag: e.$tag$,
  221. vtext: e.$text$
  222. }), convertToPrivate = e => {
  223. if ("function" == typeof e.vtag) {
  224. const t = {
  225. ...e.vattrs
  226. };
  227. return e.vkey && (t.key = e.vkey), e.vname && (t.name = e.vname), h(e.vtag, t, ...e.vchildren || []);
  228. }
  229. const t = newVNode(e.vtag, e.vtext);
  230. return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname,
  231. t;
  232. }, validateInputProperties = e => {
  233. const t = Object.keys(e);
  234. -1 !== t.indexOf("value") && (t.indexOf("type"), t.indexOf("min"), t.indexOf("max"),
  235. t.indexOf("step"));
  236. }, clientHydrate = (e, t, o, n, s, l, a) => {
  237. let r, i, d, c;
  238. if (1 === l.nodeType) {
  239. for (r = l.getAttribute("c-id"), r && (i = r.split("."), i[0] !== a && "0" !== i[0] || (d = {
  240. $flags$: 0,
  241. $hostId$: i[0],
  242. $nodeId$: i[1],
  243. $depth$: i[2],
  244. $index$: i[3],
  245. $tag$: l.tagName.toLowerCase(),
  246. $elm$: l,
  247. $attrs$: null,
  248. $children$: null,
  249. $key$: null,
  250. $name$: null,
  251. $text$: null
  252. }, t.push(d), l.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
  253. e = d, n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))), c = l.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.childNodes[c], a);
  254. if (l.shadowRoot) for (c = l.shadowRoot.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.shadowRoot.childNodes[c], a);
  255. } else if (8 === l.nodeType) i = l.nodeValue.split("."), i[1] !== a && "0" !== i[1] || (r = i[0],
  256. d = {
  257. $flags$: 0,
  258. $hostId$: i[1],
  259. $nodeId$: i[2],
  260. $depth$: i[3],
  261. $index$: i[4],
  262. $elm$: l,
  263. $attrs$: null,
  264. $children$: null,
  265. $key$: null,
  266. $name$: null,
  267. $tag$: null,
  268. $text$: null
  269. }, "t" === r ? (d.$elm$ = l.nextSibling, d.$elm$ && 3 === d.$elm$.nodeType && (d.$text$ = d.$elm$.textContent,
  270. t.push(d), l.remove(), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
  271. n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))) : d.$hostId$ === a && ("s" === r ? (d.$tag$ = "slot",
  272. i[5] ? l["s-sn"] = d.$name$ = i[5] : l["s-sn"] = "", l["s-sr"] = !0, BUILD.shadowDom && n && (d.$elm$ = doc.createElement(d.$tag$),
  273. d.$name$ && d.$elm$.setAttribute("name", d.$name$), l.parentNode.insertBefore(d.$elm$, l),
  274. l.remove(), "0" === d.$depth$ && (n[d.$index$] = d.$elm$)), o.push(d), e.$children$ || (e.$children$ = []),
  275. e.$children$[d.$index$] = d) : "r" === r && (BUILD.shadowDom && n ? l.remove() : BUILD.slotRelocation && (s["s-cr"] = l,
  276. l["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
  277. const t = newVNode(null, l.textContent);
  278. t.$elm$ = l, t.$index$ = "0", e.$children$ = [ t ];
  279. }
  280. }, initializeDocumentHydrate = (e, t) => {
  281. if (1 === e.nodeType) {
  282. let o = 0;
  283. for (;o < e.childNodes.length; o++) initializeDocumentHydrate(e.childNodes[o], t);
  284. if (e.shadowRoot) for (o = 0; o < e.shadowRoot.childNodes.length; o++) initializeDocumentHydrate(e.shadowRoot.childNodes[o], t);
  285. } else if (8 === e.nodeType) {
  286. const o = e.nodeValue.split(".");
  287. "o" === o[0] && (t.set(o[1] + "." + o[2], e), e.nodeValue = "", e["s-en"] = o[3]);
  288. }
  289. }, computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), setMode = e => modeResolutionChain.push(e), getMode = e => getHostRef(e).$modeName$, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : BUILD.propNumber && 2 & t ? parseFloat(e) : BUILD.propString && 1 & t ? String(e) : e, getElement = e => BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, createEvent = (e, t, o) => {
  290. const n = getElement(e);
  291. return {
  292. emit: e => (BUILD.isDev && n.isConnected, emitEvent(n, t, {
  293. bubbles: !!(4 & o),
  294. composed: !!(2 & o),
  295. cancelable: !!(1 & o),
  296. detail: e
  297. }))
  298. };
  299. }, emitEvent = (e, t, o) => {
  300. const n = plt.ce(t, o);
  301. return e.dispatchEvent(n), n;
  302. }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, o) => {
  303. let n = styles.get(e);
  304. n = t, styles.set(e, n);
  305. }, addStyle = (e, t, o, n) => {
  306. let s = getScopeId(t, o);
  307. const l = styles.get(s);
  308. if (!BUILD.attachStyles) return s;
  309. if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
  310. e = e.head || e;
  311. let o, a = rootAppliedStyles.get(e);
  312. if (a || rootAppliedStyles.set(e, a = new Set), !a.has(s)) {
  313. if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${s}"]`))) o.innerHTML = l; else {
  314. if (BUILD.cssVarShim && plt.$cssShim$) {
  315. o = plt.$cssShim$.createHostStyle(n, s, l, !!(10 & t.$flags$));
  316. const e = o["s-sc"];
  317. e && (s = e, a = null);
  318. } else o = doc.createElement("style"), o.innerHTML = l;
  319. (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && o.setAttribute("sty-id", s),
  320. e.insertBefore(o, e.querySelector("link"));
  321. }
  322. a && a.add(s);
  323. }
  324. } else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
  325. return s;
  326. }, attachStyles = e => {
  327. const t = e.$cmpMeta$, o = e.$hostElement$, n = t.$flags$, s = createTime("attachStyles", t.$tagName$), l = addStyle(BUILD.shadowDom && supportsShadow && o.shadowRoot ? o.shadowRoot : o.getRootNode(), t, e.$modeName$, o);
  328. (BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && 10 & n && (o["s-sc"] = l,
  329. o.classList.add(l + "-h"), BUILD.scoped && 2 & n && o.classList.add(l + "-s")),
  330. s();
  331. }, getScopeId = (e, t) => "sc-" + (BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), setAccessor = (e, t, o, n, s, l) => {
  332. if (o !== n) {
  333. let a = isMemberInElement(e, t), r = t.toLowerCase();
  334. if (BUILD.vdomClass && "class" === t) {
  335. const t = e.classList, s = parseClassList(o), l = parseClassList(n);
  336. t.remove(...s.filter((e => e && !l.includes(e)))), t.add(...l.filter((e => e && !s.includes(e))));
  337. } else if (BUILD.vdomStyle && "style" === t) {
  338. if (BUILD.updatable) for (const t in o) n && null != n[t] || (!BUILD.hydrateServerSide && t.includes("-") ? e.style.removeProperty(t) : e.style[t] = "");
  339. for (const t in n) o && n[t] === o[t] || (!BUILD.hydrateServerSide && t.includes("-") ? e.style.setProperty(t, n[t]) : e.style[t] = n[t]);
  340. } else if (BUILD.vdomKey && "key" === t) ; else if (BUILD.vdomRef && "ref" === t) n && n(e); else if (!BUILD.vdomListener || (BUILD.lazyLoad ? a : e.__lookupSetter__(t)) || "o" !== t[0] || "n" !== t[1]) {
  341. if (BUILD.vdomPropOrAttr) {
  342. const i = isComplexType(n);
  343. if ((a || i && null !== n) && !s) try {
  344. if (e.tagName.includes("-")) e[t] = n; else {
  345. const s = null == n ? "" : n;
  346. "list" === t ? a = !1 : null != o && e[t] == s || (e[t] = s);
  347. }
  348. } catch (e) {}
  349. let d = !1;
  350. BUILD.vdomXlink && r !== (r = r.replace(/^xlink\:?/, "")) && (t = r, d = !0), null == n || !1 === n ? !1 === n && "" !== e.getAttribute(t) || (BUILD.vdomXlink && d ? e.removeAttributeNS(XLINK_NS, t) : e.removeAttribute(t)) : (!a || 4 & l || s) && !i && (n = !0 === n ? "" : n,
  351. BUILD.vdomXlink && d ? e.setAttributeNS(XLINK_NS, t, n) : e.setAttribute(t, n));
  352. }
  353. } else t = "-" === t[2] ? t.slice(3) : isMemberInElement(win, r) ? r.slice(2) : r[2] + t.slice(3),
  354. o && plt.rel(e, t, o, !1), n && plt.ael(e, t, n, !1);
  355. }
  356. }, parseClassListRegex = /\s/, parseClassList = e => e ? e.split(parseClassListRegex) : [], updateElement = (e, t, o, n) => {
  357. const s = 11 === t.$elm$.nodeType && t.$elm$.host ? t.$elm$.host : t.$elm$, l = e && e.$attrs$ || EMPTY_OBJ, a = t.$attrs$ || EMPTY_OBJ;
  358. if (BUILD.updatable) for (n in l) n in a || setAccessor(s, n, l[n], void 0, o, t.$flags$);
  359. for (n in a) setAccessor(s, n, l[n], a[n], o, t.$flags$);
  360. };
  361. let scopeId, contentRef, hostTagName, useNativeShadowDom = !1, checkSlotFallbackVisibility = !1, checkSlotRelocate = !1, isSvgMode = !1;
  362. const createElm = (e, t, o, n) => {
  363. const s = t.$children$[o];
  364. let l, a, r, i = 0;
  365. if (BUILD.slotRelocation && !useNativeShadowDom && (checkSlotRelocate = !0, "slot" === s.$tag$ && (scopeId && n.classList.add(scopeId + "-s"),
  366. s.$flags$ |= s.$children$ ? 2 : 1)), BUILD.isDev && s.$elm$ && consoleDevError(`The JSX ${null !== s.$text$ ? `"${s.$text$}" text` : `"${s.$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://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),
  367. BUILD.vdomText && null !== s.$text$) l = s.$elm$ = doc.createTextNode(s.$text$); else if (BUILD.slotRelocation && 1 & s.$flags$) l = s.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(s) : doc.createTextNode(""); else {
  368. if (BUILD.svg && !isSvgMode && (isSvgMode = "svg" === s.$tag$), l = s.$elm$ = BUILD.svg ? doc.createElementNS(isSvgMode ? "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", BUILD.slotRelocation && 2 & s.$flags$ ? "slot-fb" : s.$tag$) : doc.createElement(BUILD.slotRelocation && 2 & s.$flags$ ? "slot-fb" : s.$tag$),
  369. BUILD.svg && isSvgMode && "foreignObject" === s.$tag$ && (isSvgMode = !1), BUILD.vdomAttribute && updateElement(null, s, isSvgMode),
  370. (BUILD.shadowDom || BUILD.scoped) && null != scopeId && l["s-si"] !== scopeId && l.classList.add(l["s-si"] = scopeId),
  371. s.$children$) for (i = 0; i < s.$children$.length; ++i) a = createElm(e, s, i, l),
  372. a && l.appendChild(a);
  373. BUILD.svg && ("svg" === s.$tag$ ? isSvgMode = !1 : "foreignObject" === l.tagName && (isSvgMode = !0));
  374. }
  375. return BUILD.slotRelocation && (l["s-hn"] = hostTagName, 3 & s.$flags$ && (l["s-sr"] = !0,
  376. l["s-cr"] = contentRef, l["s-sn"] = s.$name$ || "", r = e && e.$children$ && e.$children$[o],
  377. r && r.$tag$ === s.$tag$ && e.$elm$ && putBackInOriginalLocation(e.$elm$, !1))),
  378. l;
  379. }, putBackInOriginalLocation = (e, t) => {
  380. plt.$flags$ |= 1;
  381. const o = e.childNodes;
  382. for (let e = o.length - 1; e >= 0; e--) {
  383. const n = o[e];
  384. n["s-hn"] !== hostTagName && n["s-ol"] && (parentReferenceNode(n).insertBefore(n, referenceNode(n)),
  385. n["s-ol"].remove(), n["s-ol"] = void 0, checkSlotRelocate = !0), t && putBackInOriginalLocation(n, t);
  386. }
  387. plt.$flags$ &= -2;
  388. }, addVnodes = (e, t, o, n, s, l) => {
  389. let a, r = BUILD.slotRelocation && e["s-cr"] && e["s-cr"].parentNode || e;
  390. for (BUILD.shadowDom && r.shadowRoot && r.tagName === hostTagName && (r = r.shadowRoot); s <= l; ++s) n[s] && (a = createElm(null, o, s, e),
  391. a && (n[s].$elm$ = a, r.insertBefore(a, BUILD.slotRelocation ? referenceNode(t) : t)));
  392. }, removeVnodes = (e, t, o, n, s) => {
  393. for (;t <= o; ++t) (n = e[t]) && (s = n.$elm$, callNodeRefs(n), BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
  394. s["s-ol"] ? s["s-ol"].remove() : putBackInOriginalLocation(s, !0)), s.remove());
  395. }, isSameVnode = (e, t) => e.$tag$ === t.$tag$ && (BUILD.slotRelocation && "slot" === e.$tag$ ? e.$name$ === t.$name$ : !BUILD.vdomKey || e.$key$ === t.$key$), referenceNode = e => e && e["s-ol"] || e, parentReferenceNode = e => (e["s-ol"] ? e["s-ol"] : e).parentNode, patch = (e, t) => {
  396. const o = t.$elm$ = e.$elm$, n = e.$children$, s = t.$children$, l = t.$tag$, a = t.$text$;
  397. let r;
  398. BUILD.vdomText && null !== a ? BUILD.vdomText && BUILD.slotRelocation && (r = o["s-cr"]) ? r.parentNode.textContent = a : BUILD.vdomText && e.$text$ !== a && (o.data = a) : (BUILD.svg && (isSvgMode = "svg" === l || "foreignObject" !== l && isSvgMode),
  399. (BUILD.vdomAttribute || BUILD.reflect) && (BUILD.slot && "slot" === l || updateElement(e, t, isSvgMode)),
  400. BUILD.updatable && null !== n && null !== s ? ((e, t, o, n) => {
  401. let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1, h = n[0], u = n[p];
  402. for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null == h) h = n[++r]; else if (null == u) u = n[--p]; else if (isSameVnode($, h)) patch($, h),
  403. $ = t[++a], h = n[++r]; else if (isSameVnode(m, u)) patch(m, u), m = t[--c], u = n[--p]; else if (isSameVnode($, u)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation($.$elm$.parentNode, !1),
  404. patch($, u), e.insertBefore($.$elm$, m.$elm$.nextSibling), $ = t[++a], u = n[--p]; else if (isSameVnode(m, h)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation(m.$elm$.parentNode, !1),
  405. patch(m, h), e.insertBefore(m.$elm$, $.$elm$), m = t[--c], h = n[++r]; else {
  406. if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ === h.$key$) {
  407. i = d;
  408. break;
  409. }
  410. BUILD.vdomKey && i >= 0 ? (l = t[i], l.$tag$ !== h.$tag$ ? s = createElm(t && t[r], o, i, e) : (patch(l, h),
  411. t[i] = void 0, s = l.$elm$), h = n[++r]) : (s = createElm(t && t[r], o, r, e), h = n[++r]),
  412. s && (BUILD.slotRelocation ? parentReferenceNode($.$elm$).insertBefore(s, referenceNode($.$elm$)) : $.$elm$.parentNode.insertBefore(s, $.$elm$));
  413. }
  414. a > c ? addVnodes(e, null == n[p + 1] ? null : n[p + 1].$elm$, o, n, r, p) : BUILD.updatable && r > p && removeVnodes(t, a, c);
  415. })(o, n, t, s) : null !== s ? (BUILD.updatable && BUILD.vdomText && null !== e.$text$ && (o.textContent = ""),
  416. addVnodes(o, null, t, s, 0, s.length - 1)) : BUILD.updatable && null !== n && removeVnodes(n, 0, n.length - 1),
  417. BUILD.svg && isSvgMode && "svg" === l && (isSvgMode = !1));
  418. }, updateFallbackSlotVisibility = e => {
  419. const t = e.childNodes;
  420. let o, n, s, l, a, r;
  421. for (n = 0, s = t.length; n < s; n++) if (o = t[n], 1 === o.nodeType) {
  422. if (o["s-sr"]) for (a = o["s-sn"], o.hidden = !1, l = 0; l < s; l++) if (r = t[l].nodeType,
  423. t[l]["s-hn"] !== o["s-hn"] || "" !== a) {
  424. if (1 === r && a === t[l].getAttribute("slot")) {
  425. o.hidden = !0;
  426. break;
  427. }
  428. } else if (1 === r || 3 === r && "" !== t[l].textContent.trim()) {
  429. o.hidden = !0;
  430. break;
  431. }
  432. updateFallbackSlotVisibility(o);
  433. }
  434. }, relocateNodes = [], relocateSlotContent = e => {
  435. let t, o, n, s, l, a, r = 0;
  436. const i = e.childNodes, d = i.length;
  437. for (;r < d; r++) {
  438. if (t = i[r], t["s-sr"] && (o = t["s-cr"]) && o.parentNode) for (n = o.parentNode.childNodes,
  439. s = t["s-sn"], a = n.length - 1; a >= 0; a--) o = n[a], o["s-cn"] || o["s-nr"] || o["s-hn"] === t["s-hn"] || (isNodeLocatedInSlot(o, s) ? (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
  440. checkSlotFallbackVisibility = !0, o["s-sn"] = o["s-sn"] || s, l ? l.$slotRefNode$ = t : relocateNodes.push({
  441. $slotRefNode$: t,
  442. $nodeToRelocate$: o
  443. }), o["s-sr"] && relocateNodes.map((e => {
  444. isNodeLocatedInSlot(e.$nodeToRelocate$, o["s-sn"]) && (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
  445. l && !e.$slotRefNode$ && (e.$slotRefNode$ = l.$slotRefNode$));
  446. }))) : relocateNodes.some((e => e.$nodeToRelocate$ === o)) || relocateNodes.push({
  447. $nodeToRelocate$: o
  448. }));
  449. 1 === t.nodeType && relocateSlotContent(t);
  450. }
  451. }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, callNodeRefs = e => {
  452. BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(callNodeRefs));
  453. }, renderVdom = (e, t) => {
  454. const o = e.$hostElement$, n = e.$cmpMeta$, s = e.$vnode$ || newVNode(null, null), l = isHost(t) ? t : h(null, null, t);
  455. if (hostTagName = o.tagName, BUILD.isDev && Array.isArray(t) && t.some(isHost)) throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);
  456. if (BUILD.reflect && n.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, n.$attrsToReflect$.map((([e, t]) => l.$attrs$[t] = o[e]))),
  457. l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = s.$elm$ = BUILD.shadowDom && o.shadowRoot || o,
  458. (BUILD.scoped || BUILD.shadowDom) && (scopeId = o["s-sc"]), BUILD.slotRelocation && (contentRef = o["s-cr"],
  459. useNativeShadowDom = supportsShadow, checkSlotFallbackVisibility = !1), patch(s, l),
  460. BUILD.slotRelocation) {
  461. if (plt.$flags$ |= 1, checkSlotRelocate) {
  462. let e, t, o, n, s, a;
  463. relocateSlotContent(l.$elm$);
  464. let r = 0;
  465. for (;r < relocateNodes.length; r++) e = relocateNodes[r], t = e.$nodeToRelocate$,
  466. t["s-ol"] || (o = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(t) : doc.createTextNode(""),
  467. o["s-nr"] = t, t.parentNode.insertBefore(t["s-ol"] = o, t));
  468. for (r = 0; r < relocateNodes.length; r++) if (e = relocateNodes[r], t = e.$nodeToRelocate$,
  469. e.$slotRefNode$) {
  470. for (n = e.$slotRefNode$.parentNode, s = e.$slotRefNode$.nextSibling, o = t["s-ol"]; o = o.previousSibling; ) if (a = o["s-nr"],
  471. a && a["s-sn"] === t["s-sn"] && n === a.parentNode && (a = a.nextSibling, !a || !a["s-nr"])) {
  472. s = a;
  473. break;
  474. }
  475. (!s && n !== t.parentNode || t.nextSibling !== s) && t !== s && (!t["s-hn"] && t["s-ol"] && (t["s-hn"] = t["s-ol"].parentNode.nodeName),
  476. n.insertBefore(t, s));
  477. } else 1 === t.nodeType && (t.hidden = !0);
  478. }
  479. checkSlotFallbackVisibility && updateFallbackSlotVisibility(l.$elm$), plt.$flags$ &= -2,
  480. relocateNodes.length = 0;
  481. }
  482. }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), attachToAncestor = (e, t) => {
  483. BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
  484. }, scheduleUpdate = (e, t) => {
  485. if (BUILD.taskQueue && BUILD.updatable && (e.$flags$ |= 16), BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
  486. attachToAncestor(e, e.$ancestorComponent$);
  487. const o = () => dispatchHooks(e, t);
  488. return BUILD.taskQueue ? writeTask(o) : o();
  489. }, dispatchHooks = (e, t) => {
  490. const o = e.$hostElement$, n = createTime("scheduleUpdate", e.$cmpMeta$.$tagName$), s = BUILD.lazyLoad ? e.$lazyInstance$ : o;
  491. let l;
  492. return t ? (BUILD.lazyLoad && BUILD.hostListener && (e.$flags$ |= 256, e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
  493. e.$queuedListeners$ = null)), emitLifecycleEvent(o, "componentWillLoad"), BUILD.cmpWillLoad && (l = safeCall(s, "componentWillLoad"))) : (emitLifecycleEvent(o, "componentWillUpdate"),
  494. BUILD.cmpWillUpdate && (l = safeCall(s, "componentWillUpdate"))), emitLifecycleEvent(o, "componentWillRender"),
  495. BUILD.cmpWillRender && (l = then(l, (() => safeCall(s, "componentWillRender")))),
  496. n(), then(l, (() => updateComponent(e, s, t)));
  497. }, updateComponent = async (e, t, o) => {
  498. const n = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), l = n["s-rc"];
  499. BUILD.style && o && attachStyles(e);
  500. const a = createTime("render", e.$cmpMeta$.$tagName$);
  501. if (BUILD.isDev && (e.$flags$ |= 1024), BUILD.hydrateServerSide ? await callRender(e, t, n) : callRender(e, t, n),
  502. BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.updateHost(n), BUILD.isDev && (e.$renderCount$++,
  503. e.$flags$ &= -1025), BUILD.hydrateServerSide) try {
  504. serverSideConnected(n), o && (1 & e.$cmpMeta$.$flags$ ? n["s-en"] = "" : 2 & e.$cmpMeta$.$flags$ && (n["s-en"] = "c"));
  505. } catch (e) {
  506. consoleError(e, n);
  507. }
  508. if (BUILD.asyncLoading && l && (l.map((e => e())), n["s-rc"] = void 0), a(), s(),
  509. BUILD.asyncLoading) {
  510. const t = n["s-p"], o = () => postUpdateComponent(e);
  511. 0 === t.length ? o() : (Promise.all(t).then(o), e.$flags$ |= 4, t.length = 0);
  512. } else postUpdateComponent(e);
  513. };
  514. let renderingRef = null;
  515. const callRender = (e, t, o) => {
  516. const n = !!BUILD.allRenderFn, s = !!BUILD.lazyLoad, l = !!BUILD.taskQueue, a = !!BUILD.updatable;
  517. try {
  518. if (renderingRef = t, t = (n || t.render) && t.render(), a && l && (e.$flags$ &= -17),
  519. (a || s) && (e.$flags$ |= 2), BUILD.hasRenderFn || BUILD.reflect) if (BUILD.vdomRender || BUILD.reflect) {
  520. if (BUILD.hydrateServerSide) return Promise.resolve(t).then((t => renderVdom(e, t)));
  521. renderVdom(e, t);
  522. } else o.textContent = t;
  523. } catch (t) {
  524. consoleError(t, e.$hostElement$);
  525. }
  526. return renderingRef = null, null;
  527. }, getRenderingRef = () => renderingRef, postUpdateComponent = e => {
  528. const t = e.$cmpMeta$.$tagName$, o = e.$hostElement$, n = createTime("postUpdate", t), s = BUILD.lazyLoad ? e.$lazyInstance$ : o, l = e.$ancestorComponent$;
  529. BUILD.cmpDidRender && (BUILD.isDev && (e.$flags$ |= 1024), safeCall(s, "componentDidRender"),
  530. BUILD.isDev && (e.$flags$ &= -1025)), emitLifecycleEvent(o, "componentDidRender"),
  531. 64 & e.$flags$ ? (BUILD.cmpDidUpdate && (BUILD.isDev && (e.$flags$ |= 1024), safeCall(s, "componentDidUpdate"),
  532. BUILD.isDev && (e.$flags$ &= -1025)), emitLifecycleEvent(o, "componentDidUpdate"),
  533. n()) : (e.$flags$ |= 64, BUILD.asyncLoading && BUILD.cssAnnotations && addHydratedFlag(o),
  534. BUILD.cmpDidLoad && (BUILD.isDev && (e.$flags$ |= 2048), safeCall(s, "componentDidLoad"),
  535. BUILD.isDev && (e.$flags$ &= -2049)), emitLifecycleEvent(o, "componentDidLoad"),
  536. n(), BUILD.asyncLoading && (e.$onReadyResolve$(o), l || appDidLoad(t))), BUILD.hotModuleReplacement && o["s-hmr-load"] && o["s-hmr-load"](),
  537. BUILD.method && BUILD.lazyLoad && e.$onInstanceResolve$(o), BUILD.asyncLoading && (e.$onRenderResolve$ && (e.$onRenderResolve$(),
  538. e.$onRenderResolve$ = void 0), 512 & e.$flags$ && nextTick((() => scheduleUpdate(e, !1))),
  539. e.$flags$ &= -517);
  540. }, forceUpdate$1 = e => {
  541. if (BUILD.updatable) {
  542. const t = getHostRef(e), o = t.$hostElement$.isConnected;
  543. return o && 2 == (18 & t.$flags$) && scheduleUpdate(t, !1), o;
  544. }
  545. return !1;
  546. }, appDidLoad = e => {
  547. BUILD.cssAnnotations && addHydratedFlag(doc.documentElement), BUILD.asyncQueue && (plt.$flags$ |= 2),
  548. nextTick((() => emitEvent(win, "appload", {
  549. detail: {
  550. namespace: NAMESPACE
  551. }
  552. }))), BUILD.profile && performance.measure && performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${e})`, "st:app:start");
  553. }, safeCall = (e, t, o) => {
  554. if (e && e[t]) try {
  555. return e[t](o);
  556. } catch (e) {
  557. consoleError(e);
  558. }
  559. }, then = (e, t) => e && e.then ? e.then(t) : t(), emitLifecycleEvent = (e, t) => {
  560. BUILD.lifecycleDOMEvents && emitEvent(e, "stencil_" + t, {
  561. bubbles: !0,
  562. composed: !0,
  563. detail: {
  564. namespace: NAMESPACE
  565. }
  566. });
  567. }, addHydratedFlag = e => BUILD.hydratedClass ? e.classList.add("hydrated") : BUILD.hydratedAttribute ? e.setAttribute("hydrated", "") : void 0, serverSideConnected = e => {
  568. const t = e.children;
  569. if (null != t) for (let e = 0, o = t.length; e < o; e++) {
  570. const o = t[e];
  571. "function" == typeof o.connectedCallback && o.connectedCallback(), serverSideConnected(o);
  572. }
  573. }, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, o, n) => {
  574. const s = getHostRef(e), l = BUILD.lazyLoad ? s.$hostElement$ : e, a = s.$instanceValues$.get(t), r = s.$flags$, i = BUILD.lazyLoad ? s.$lazyInstance$ : l;
  575. o = parsePropertyValue(o, n.$members$[t][0]);
  576. const d = Number.isNaN(a) && Number.isNaN(o), c = o !== a && !d;
  577. if ((!BUILD.lazyLoad || !(8 & r) || void 0 === a) && c && (s.$instanceValues$.set(t, o),
  578. BUILD.isDev && (1024 & s.$flags$ || s.$flags$), !BUILD.lazyLoad || i)) {
  579. if (BUILD.watchCallback && n.$watchers$ && 128 & r) {
  580. const e = n.$watchers$[t];
  581. e && e.map((e => {
  582. try {
  583. i[e](o, a, t);
  584. } catch (e) {
  585. consoleError(e, l);
  586. }
  587. }));
  588. }
  589. if (BUILD.updatable && 2 == (18 & r)) {
  590. if (BUILD.cmpShouldUpdate && i.componentShouldUpdate && !1 === i.componentShouldUpdate(o, a, t)) return;
  591. scheduleUpdate(s, !1);
  592. }
  593. }
  594. }, proxyComponent = (e, t, o) => {
  595. if (BUILD.member && t.$members$) {
  596. BUILD.watchCallback && e.watchers && (t.$watchers$ = e.watchers);
  597. const n = Object.entries(t.$members$), s = e.prototype;
  598. if (n.map((([e, [n]]) => {
  599. (BUILD.prop || BUILD.state) && (31 & n || (!BUILD.lazyLoad || 2 & o) && 32 & n) ? Object.defineProperty(s, e, {
  600. get() {
  601. return getValue(this, e);
  602. },
  603. set(s) {
  604. if (BUILD.isDev) {
  605. const s = getHostRef(this);
  606. 0 == (1 & o) && 0 == (8 & s.$flags$) && 0 != (31 & n) && 0 == (1024 & n) && consoleDevWarn(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`);
  607. }
  608. setValue(this, e, s, t);
  609. },
  610. configurable: !0,
  611. enumerable: !0
  612. }) : BUILD.lazyLoad && BUILD.method && 1 & o && 64 & n && Object.defineProperty(s, e, {
  613. value(...t) {
  614. const o = getHostRef(this);
  615. return o.$onInstancePromise$.then((() => o.$lazyInstance$[e](...t)));
  616. }
  617. });
  618. })), BUILD.observeAttribute && (!BUILD.lazyLoad || 1 & o)) {
  619. const o = new Map;
  620. s.attributeChangedCallback = function(e, t, n) {
  621. plt.jmp((() => {
  622. const t = o.get(e);
  623. if (this.hasOwnProperty(t)) n = this[t], delete this[t]; else if (s.hasOwnProperty(t) && "number" == typeof this[t] && this[t] == n) return;
  624. this[t] = (null !== n || "boolean" != typeof this[t]) && n;
  625. }));
  626. }, e.observedAttributes = n.filter((([e, t]) => 15 & t[0])).map((([e, n]) => {
  627. const s = n[1] || e;
  628. return o.set(s, e), BUILD.reflect && 512 & n[0] && t.$attrsToReflect$.push([ e, s ]),
  629. s;
  630. }));
  631. }
  632. }
  633. return e;
  634. }, initializeComponent = async (e, t, o, n, s) => {
  635. if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && 0 == (32 & t.$flags$)) {
  636. if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
  637. if (t.$flags$ |= 32, (s = loadModule(o)).then) {
  638. const e = (l = `st:load:${o.$tagName$}:${t.$modeName$}`, a = `[Stencil] Load module for <${o.$tagName$}>`,
  639. BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(l).length && performance.mark(l),
  640. () => {
  641. 0 === performance.getEntriesByName(a).length && performance.measure(a, l);
  642. }) : () => {});
  643. s = await s, e();
  644. }
  645. if ((BUILD.isDev || BUILD.isDebug) && !s) throw new Error(`Constructor for "${o.$tagName$}#${t.$modeName$}" was not found`);
  646. BUILD.member && !s.isProxied && (BUILD.watchCallback && (o.$watchers$ = s.watchers),
  647. proxyComponent(s, o, 2), s.isProxied = !0);
  648. const e = createTime("createInstance", o.$tagName$);
  649. BUILD.member && (t.$flags$ |= 8);
  650. try {
  651. new s(t);
  652. } catch (e) {
  653. consoleError(e);
  654. }
  655. BUILD.member && (t.$flags$ &= -9), BUILD.watchCallback && (t.$flags$ |= 128), e(),
  656. fireConnectedCallback(t.$lazyInstance$);
  657. } else s = e.constructor, t.$flags$ |= 32, customElements.whenDefined(o.$tagName$).then((() => t.$flags$ |= 128));
  658. if (BUILD.style && s.style) {
  659. let n = s.style;
  660. BUILD.mode && "string" != typeof n && (n = n[t.$modeName$ = computeMode(e)], BUILD.hydrateServerSide && t.$modeName$ && e.setAttribute("s-mode", t.$modeName$));
  661. const l = getScopeId(o, t.$modeName$);
  662. if (!styles.has(l)) {
  663. const e = createTime("registerStyles", o.$tagName$);
  664. !BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && 8 & o.$flags$ && (n = await import("./shadow-css.js").then((e => e.scopeCss(n, l, !1)))),
  665. registerStyle(l, n, o.$flags$), e();
  666. }
  667. }
  668. }
  669. var l, a;
  670. const r = t.$ancestorComponent$, i = () => scheduleUpdate(t, !0);
  671. BUILD.asyncLoading && r && r["s-rc"] ? r["s-rc"].push(i) : i();
  672. }, fireConnectedCallback = e => {
  673. BUILD.lazyLoad && BUILD.connectedCallback && safeCall(e, "connectedCallback");
  674. }, connectedCallback = e => {
  675. if (0 == (1 & plt.$flags$)) {
  676. const t = getHostRef(e), o = t.$cmpMeta$, n = createTime("connectedCallback", o.$tagName$);
  677. if (BUILD.hostListenerTargetParent && addHostEventListeners(e, t, o.$listeners$, !0),
  678. 1 & t.$flags$) addHostEventListeners(e, t, o.$listeners$, !1), fireConnectedCallback(t.$lazyInstance$); else {
  679. let n;
  680. if (t.$flags$ |= 1, BUILD.hydrateClientSide && (n = e.getAttribute("s-id"), n)) {
  681. if (BUILD.shadowDom && supportsShadow && 1 & o.$flags$) {
  682. const t = BUILD.mode ? addStyle(e.shadowRoot, o, e.getAttribute("s-mode")) : addStyle(e.shadowRoot, o);
  683. e.classList.remove(t + "-h", t + "-s");
  684. }
  685. ((e, t, o, n) => {
  686. const s = createTime("hydrateClient", t), l = e.shadowRoot, a = [], r = BUILD.shadowDom && l ? [] : null, i = n.$vnode$ = newVNode(t, null);
  687. plt.$orgLocNodes$ || initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = new Map),
  688. e["s-id"] = o, e.removeAttribute("s-id"), clientHydrate(i, a, [], r, e, e, o), a.map((e => {
  689. const o = e.$hostId$ + "." + e.$nodeId$, n = plt.$orgLocNodes$.get(o), s = e.$elm$;
  690. n && supportsShadow && "" === n["s-en"] && n.parentNode.insertBefore(s, n.nextSibling),
  691. l || (s["s-hn"] = t, n && (s["s-ol"] = n, s["s-ol"]["s-nr"] = s)), plt.$orgLocNodes$.delete(o);
  692. })), BUILD.shadowDom && l && r.map((e => {
  693. e && l.appendChild(e);
  694. })), s();
  695. })(e, o.$tagName$, n, t);
  696. }
  697. if (BUILD.slotRelocation && !n && (BUILD.hydrateServerSide || (BUILD.slot || BUILD.shadowDom) && 12 & o.$flags$) && setContentReference(e),
  698. BUILD.asyncLoading) {
  699. let o = e;
  700. for (;o = o.parentNode || o.host; ) if (BUILD.hydrateClientSide && 1 === o.nodeType && o.hasAttribute("s-id") && o["s-p"] || o["s-p"]) {
  701. attachToAncestor(t, t.$ancestorComponent$ = o);
  702. break;
  703. }
  704. }
  705. BUILD.prop && !BUILD.hydrateServerSide && o.$members$ && Object.entries(o.$members$).map((([t, [o]]) => {
  706. if (31 & o && e.hasOwnProperty(t)) {
  707. const o = e[t];
  708. delete e[t], e[t] = o;
  709. }
  710. })), BUILD.initializeNextTick ? nextTick((() => initializeComponent(e, t, o))) : initializeComponent(e, t, o);
  711. }
  712. n();
  713. }
  714. }, setContentReference = e => {
  715. const t = e["s-cr"] = doc.createComment(BUILD.isDebug ? `content-ref (host=${e.localName})` : "");
  716. t["s-cn"] = !0, e.insertBefore(t, e.firstChild);
  717. }, disconnectedCallback = e => {
  718. if (0 == (1 & plt.$flags$)) {
  719. const t = getHostRef(e), o = BUILD.lazyLoad ? t.$lazyInstance$ : e;
  720. BUILD.hostListener && t.$rmListeners$ && (t.$rmListeners$.map((e => e())), t.$rmListeners$ = void 0),
  721. BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.removeHost(e), BUILD.lazyLoad && BUILD.disconnectedCallback && safeCall(o, "disconnectedCallback"),
  722. BUILD.cmpDidUnload && safeCall(o, "componentDidUnload");
  723. }
  724. }, defineCustomElement = (e, t) => {
  725. customElements.define(t[1], proxyCustomElement(e, t));
  726. }, proxyCustomElement = (e, t) => {
  727. const o = {
  728. $flags$: t[0],
  729. $tagName$: t[1]
  730. };
  731. BUILD.member && (o.$members$ = t[2]), BUILD.hostListener && (o.$listeners$ = t[3]),
  732. BUILD.watchCallback && (o.$watchers$ = e.$watchers$), BUILD.reflect && (o.$attrsToReflect$ = []),
  733. BUILD.shadowDom && !supportsShadow && 1 & o.$flags$ && (o.$flags$ |= 8);
  734. const n = e.prototype.connectedCallback, s = e.prototype.disconnectedCallback;
  735. return Object.assign(e.prototype, {
  736. __registerHost() {
  737. registerHost(this, o);
  738. },
  739. connectedCallback() {
  740. connectedCallback(this), BUILD.connectedCallback && n && n.call(this);
  741. },
  742. disconnectedCallback() {
  743. disconnectedCallback(this), BUILD.disconnectedCallback && s && s.call(this);
  744. },
  745. __attachShadow() {
  746. this.shadowRoot = this;
  747. }
  748. }), e.is = o.$tagName$, proxyComponent(e, o, 3);
  749. }, forceModeUpdate = e => {
  750. if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
  751. const t = computeMode(e), o = getHostRef(e);
  752. if (o.$modeName$ !== t) {
  753. const n = o.$cmpMeta$, s = e["s-sc"], l = getScopeId(n, t), a = e.constructor.style[t];
  754. n.$flags$, a && (styles.has(l) || registerStyle(l, a), o.$modeName$ = t, e.classList.remove(s + "-h", s + "-s"),
  755. attachStyles(o), forceUpdate$1(e));
  756. }
  757. }
  758. }, patchCloneNode = e => {
  759. const t = e.cloneNode;
  760. e.cloneNode = function(e) {
  761. const o = this, n = !!BUILD.shadowDom && o.shadowRoot && supportsShadow, s = t.call(o, !!n && e);
  762. if (BUILD.slot && !n && e) {
  763. let e, t, n = 0;
  764. const l = [ "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" ];
  765. for (;n < o.childNodes.length; n++) e = o.childNodes[n]["s-nr"], t = l.every((e => !o.childNodes[n][e])),
  766. e && (BUILD.appendChildSlotFix && s.__appendChild ? s.__appendChild(e.cloneNode(!0)) : s.appendChild(e.cloneNode(!0))),
  767. t && s.appendChild(o.childNodes[n].cloneNode(!0));
  768. }
  769. return s;
  770. };
  771. }, patchSlotAppendChild = e => {
  772. e.__appendChild = e.appendChild, e.appendChild = function(e) {
  773. const t = e["s-sn"] = getSlotName(e), o = getHostSlotNode(this.childNodes, t);
  774. if (o) {
  775. const n = getHostSlotChildNodes(o, t), s = n[n.length - 1];
  776. return s.parentNode.insertBefore(e, s.nextSibling);
  777. }
  778. return this.__appendChild(e);
  779. };
  780. }, patchTextContent = (e, t) => {
  781. if (BUILD.scoped && 2 & t.$flags$) {
  782. const t = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
  783. Object.defineProperty(e, "__textContent", t), Object.defineProperty(e, "textContent", {
  784. get() {
  785. var e;
  786. const t = getHostSlotNode(this.childNodes, "");
  787. return 3 === (null === (e = null == t ? void 0 : t.nextSibling) || void 0 === e ? void 0 : e.nodeType) ? t.nextSibling.textContent : t ? t.textContent : this.__textContent;
  788. },
  789. set(e) {
  790. var t;
  791. const o = getHostSlotNode(this.childNodes, "");
  792. if (3 === (null === (t = null == o ? void 0 : o.nextSibling) || void 0 === t ? void 0 : t.nodeType)) o.nextSibling.textContent = e; else if (o) o.textContent = e; else {
  793. this.__textContent = e;
  794. const t = this["s-cr"];
  795. t && this.insertBefore(t, this.firstChild);
  796. }
  797. }
  798. });
  799. }
  800. }, patchChildSlotNodes = (e, t) => {
  801. class o extends Array {
  802. item(e) {
  803. return this[e];
  804. }
  805. }
  806. if (8 & t.$flags$) {
  807. const t = e.__lookupGetter__("childNodes");
  808. Object.defineProperty(e, "children", {
  809. get() {
  810. return this.childNodes.map((e => 1 === e.nodeType));
  811. }
  812. }), Object.defineProperty(e, "childElementCount", {
  813. get: () => e.children.length
  814. }), Object.defineProperty(e, "childNodes", {
  815. get() {
  816. const e = t.call(this);
  817. if (0 == (1 & plt.$flags$) && 2 & getHostRef(this).$flags$) {
  818. const t = new o;
  819. for (let o = 0; o < e.length; o++) {
  820. const n = e[o]["s-nr"];
  821. n && t.push(n);
  822. }
  823. return t;
  824. }
  825. return o.from(e);
  826. }
  827. });
  828. }
  829. }, getSlotName = e => e["s-sn"] || 1 === e.nodeType && e.getAttribute("slot") || "", getHostSlotNode = (e, t) => {
  830. let o, n = 0;
  831. for (;n < e.length; n++) {
  832. if (o = e[n], o["s-sr"] && o["s-sn"] === t) return o;
  833. if (o = getHostSlotNode(o.childNodes, t), o) return o;
  834. }
  835. return null;
  836. }, getHostSlotChildNodes = (e, t) => {
  837. const o = [ e ];
  838. for (;(e = e.nextSibling) && e["s-sn"] === t; ) o.push(e);
  839. return o;
  840. }, bootstrapLazy = (e, t = {}) => {
  841. BUILD.profile && performance.mark && performance.mark("st:app:start"), (() => {
  842. if (BUILD.devTools) {
  843. const e = win.stencil = win.stencil || {}, t = e.inspect;
  844. e.inspect = e => {
  845. let o = (e => {
  846. const t = getHostRef(e);
  847. if (!t) return;
  848. const o = t.$flags$, n = t.$hostElement$;
  849. return {
  850. renderCount: t.$renderCount$,
  851. flags: {
  852. hasRendered: !!(2 & o),
  853. hasConnected: !!(1 & o),
  854. isWaitingForChildren: !!(4 & o),
  855. isConstructingInstance: !!(8 & o),
  856. isQueuedForUpdate: !!(16 & o),
  857. hasInitializedComponent: !!(32 & o),
  858. hasLoadedComponent: !!(64 & o),
  859. isWatchReady: !!(128 & o),
  860. isListenReady: !!(256 & o),
  861. needsRerender: !!(512 & o)
  862. },
  863. instanceValues: t.$instanceValues$,
  864. ancestorComponent: t.$ancestorComponent$,
  865. hostElement: n,
  866. lazyInstance: t.$lazyInstance$,
  867. vnode: t.$vnode$,
  868. modeName: t.$modeName$,
  869. onReadyPromise: t.$onReadyPromise$,
  870. onReadyResolve: t.$onReadyResolve$,
  871. onInstancePromise: t.$onInstancePromise$,
  872. onInstanceResolve: t.$onInstanceResolve$,
  873. onRenderResolve: t.$onRenderResolve$,
  874. queuedListeners: t.$queuedListeners$,
  875. rmListeners: t.$rmListeners$,
  876. "s-id": n["s-id"],
  877. "s-cr": n["s-cr"],
  878. "s-lr": n["s-lr"],
  879. "s-p": n["s-p"],
  880. "s-rc": n["s-rc"],
  881. "s-sc": n["s-sc"]
  882. };
  883. })(e);
  884. return o || "function" != typeof t || (o = t(e)), o;
  885. };
  886. }
  887. })();
  888. const o = createTime("bootstrapLazy"), n = [], s = t.exclude || [], l = win.customElements, a = doc.head, r = a.querySelector("meta[charset]"), i = doc.createElement("style"), d = [], c = doc.querySelectorAll("[sty-id]");
  889. let $, m = !0, p = 0;
  890. if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
  891. BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), BUILD.hydrateClientSide && (plt.$flags$ |= 2),
  892. BUILD.hydrateClientSide && BUILD.shadowDom) for (;p < c.length; p++) registerStyle(c[p].getAttribute("sty-id"), c[p].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
  893. e.map((e => {
  894. e[1].map((o => {
  895. const a = {
  896. $flags$: o[0],
  897. $tagName$: o[1],
  898. $members$: o[2],
  899. $listeners$: o[3]
  900. };
  901. BUILD.member && (a.$members$ = o[2]), BUILD.hostListener && (a.$listeners$ = o[3]),
  902. BUILD.reflect && (a.$attrsToReflect$ = []), BUILD.watchCallback && (a.$watchers$ = {}),
  903. BUILD.shadowDom && !supportsShadow && 1 & a.$flags$ && (a.$flags$ |= 8);
  904. const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(a.$tagName$) : a.$tagName$, i = class extends HTMLElement {
  905. constructor(e) {
  906. super(e), registerHost(e = this, a), BUILD.shadowDom && 1 & a.$flags$ && (BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
  907. BUILD.slotChildNodesFix && patchChildSlotNodes(e, a);
  908. }
  909. connectedCallback() {
  910. $ && (clearTimeout($), $ = null), m ? d.push(this) : plt.jmp((() => connectedCallback(this)));
  911. }
  912. disconnectedCallback() {
  913. plt.jmp((() => disconnectedCallback(this)));
  914. }
  915. componentOnReady() {
  916. return getHostRef(this).$onReadyPromise$;
  917. }
  918. };
  919. BUILD.cloneNodeFix && patchCloneNode(i.prototype), BUILD.appendChildSlotFix && patchSlotAppendChild(i.prototype),
  920. BUILD.hotModuleReplacement && (i.prototype["s-hmr"] = function(e) {
  921. ((e, t, o) => {
  922. const n = getHostRef(e);
  923. n.$flags$ = 1, e["s-hmr-load"] = () => {
  924. delete e["s-hmr-load"];
  925. }, initializeComponent(e, n, t);
  926. })(this, a);
  927. }), BUILD.scopedSlotTextContentFix && patchTextContent(i.prototype, a), a.$lazyBundleId$ = e[0],
  928. s.includes(r) || l.get(r) || (n.push(r), l.define(r, proxyComponent(i, a, 1)));
  929. }));
  930. })), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute) && (i.innerHTML = n + "{visibility:hidden}.hydrated{visibility:inherit}",
  931. i.setAttribute("data-styles", ""), a.insertBefore(i, r ? r.nextSibling : a.firstChild)),
  932. m = !1, d.length ? d.map((e => e.connectedCallback())) : BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
  933. o();
  934. }, getConnect = (e, t) => {
  935. const o = () => {
  936. let e = doc.querySelector(t);
  937. return e || (e = doc.createElement(t), doc.body.appendChild(e)), "function" == typeof e.componentOnReady ? e.componentOnReady() : Promise.resolve(e);
  938. };
  939. return {
  940. create: (...e) => o().then((t => t.create(...e))),
  941. componentOnReady: o
  942. };
  943. }, getContext = (e, t) => t in Context ? Context[t] : "window" === t ? win : "document" === t ? doc : "isServer" === t || "isPrerender" === t ? !!BUILD.hydrateServerSide : "isClient" === t ? !BUILD.hydrateServerSide : "resourcesUrl" === t || "publicPath" === t ? getAssetPath(".") : "queue" === t ? {
  944. write: writeTask,
  945. read: readTask,
  946. tick: {
  947. then: e => nextTick(e)
  948. }
  949. } : void 0, Fragment = (e, t) => t, addHostEventListeners = (e, t, o, n) => {
  950. BUILD.hostListener && o && (BUILD.hostListenerTargetParent && (o = n ? o.filter((([e]) => 32 & e)) : o.filter((([e]) => !(32 & e)))),
  951. o.map((([o, n, s]) => {
  952. const l = BUILD.hostListenerTarget ? getHostListenerTarget(e, o) : e, a = hostListenerProxy(t, s), r = hostListenerOpts(o);
  953. plt.ael(l, n, a, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(l, n, a, r)));
  954. })));
  955. }, hostListenerProxy = (e, t) => o => {
  956. try {
  957. BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](o) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, o ]) : e.$hostElement$[t](o);
  958. } catch (e) {
  959. consoleError(e);
  960. }
  961. }, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), insertVdomAnnotations = (e, t) => {
  962. if (null != e) {
  963. const o = {
  964. hostIds: 0,
  965. rootLevelIds: 0,
  966. staticComponents: new Set(t)
  967. }, n = [];
  968. parseVNodeAnnotations(e, e.body, o, n), n.forEach((t => {
  969. if (null != t) {
  970. const n = t["s-nr"];
  971. let s = n["s-host-id"], l = n["s-node-id"], a = `${s}.${l}`;
  972. if (null == s) if (s = 0, o.rootLevelIds++, l = o.rootLevelIds, a = `${s}.${l}`,
  973. 1 === n.nodeType) n.setAttribute("c-id", a); else if (3 === n.nodeType) {
  974. if (0 === s && "" === n.nodeValue.trim()) return void t.remove();
  975. const o = e.createComment(a);
  976. o.nodeValue = `t.${a}`, n.parentNode.insertBefore(o, n);
  977. }
  978. let r = `o.${a}`;
  979. const i = t.parentElement;
  980. i && ("" === i["s-en"] ? r += "." : "c" === i["s-en"] && (r += ".c")), t.nodeValue = r;
  981. }
  982. }));
  983. }
  984. }, parseVNodeAnnotations = (e, t, o, n) => {
  985. null != t && (null != t["s-nr"] && n.push(t), 1 === t.nodeType && t.childNodes.forEach((t => {
  986. const s = getHostRef(t);
  987. if (null != s && !o.staticComponents.has(t.nodeName.toLowerCase())) {
  988. const n = {
  989. nodeIds: 0
  990. };
  991. insertVNodeAnnotations(e, t, s.$vnode$, o, n);
  992. }
  993. parseVNodeAnnotations(e, t, o, n);
  994. })));
  995. }, insertVNodeAnnotations = (e, t, o, n, s) => {
  996. if (null != o) {
  997. const l = ++n.hostIds;
  998. if (t.setAttribute("s-id", l), null != t["s-cr"] && (t["s-cr"].nodeValue = `r.${l}`),
  999. null != o.$children$) {
  1000. const t = 0;
  1001. o.$children$.forEach(((o, n) => {
  1002. insertChildVNodeAnnotations(e, o, s, l, t, n);
  1003. }));
  1004. }
  1005. if (t && o && o.$elm$ && !t.hasAttribute("c-id")) {
  1006. const e = t.parentElement;
  1007. if (e && e.childNodes) {
  1008. const n = Array.from(e.childNodes), s = n.find((e => 8 === e.nodeType && e["s-sr"]));
  1009. if (s) {
  1010. const e = n.indexOf(t) - 1;
  1011. o.$elm$.setAttribute("c-id", `${s["s-host-id"]}.${s["s-node-id"]}.0.${e}`);
  1012. }
  1013. }
  1014. }
  1015. }
  1016. }, insertChildVNodeAnnotations = (e, t, o, n, s, l) => {
  1017. const a = t.$elm$;
  1018. if (null == a) return;
  1019. const r = o.nodeIds++, i = `${n}.${r}.${s}.${l}`;
  1020. if (a["s-host-id"] = n, a["s-node-id"] = r, 1 === a.nodeType) a.setAttribute("c-id", i); else if (3 === a.nodeType) {
  1021. const t = a.parentNode, o = t.nodeName;
  1022. if ("STYLE" !== o && "SCRIPT" !== o) {
  1023. const o = `t.${i}`, n = e.createComment(o);
  1024. t.insertBefore(n, a);
  1025. }
  1026. } else if (8 === a.nodeType && a["s-sr"]) {
  1027. const e = `s.${i}.${a["s-sn"] || ""}`;
  1028. a.nodeValue = e;
  1029. }
  1030. if (null != t.$children$) {
  1031. const l = s + 1;
  1032. t.$children$.forEach(((t, s) => {
  1033. insertChildVNodeAnnotations(e, t, o, n, l, s);
  1034. }));
  1035. }
  1036. }, hAsync = (e, t, ...o) => {
  1037. if (Array.isArray(o) && o.length > 0) {
  1038. const n = o.flat(1 / 0);
  1039. return n.some(isPromise) ? Promise.all(n).then((o => h(e, t, ...o))).catch((o => h(e, t))) : h(e, t, ...o);
  1040. }
  1041. return h(e, t);
  1042. }, NO_HYDRATE_TAGS = new Set([ "CODE", "HEAD", "IFRAME", "INPUT", "OBJECT", "OUTPUT", "NOSCRIPT", "PRE", "SCRIPT", "SELECT", "STYLE", "TEMPLATE", "TEXTAREA" ]);
  1043. let customError;
  1044. const cmpModules = new Map, getModule = e => {
  1045. if ("string" == typeof e) {
  1046. e = e.toLowerCase();
  1047. const t = cmpModules.get(e);
  1048. if (null != t) return t[e];
  1049. }
  1050. return null;
  1051. }, loadModule = (e, t, o) => getModule(e.$tagName$), isMemberInElement = (e, t) => {
  1052. if (null != e) {
  1053. if (t in e) return !0;
  1054. const o = getModule(e.nodeName);
  1055. if (null != o) {
  1056. const e = o;
  1057. if (null != e && null != e.cmpMeta && null != e.cmpMeta.$members$) return t in e.cmpMeta.$members$;
  1058. }
  1059. }
  1060. return !1;
  1061. }, registerComponents = e => {
  1062. for (const t of e) {
  1063. const e = t.cmpMeta.$tagName$;
  1064. cmpModules.set(e, {
  1065. [e]: t
  1066. });
  1067. }
  1068. }, win = window, doc = win.document, readTask = e => {
  1069. process.nextTick((() => {
  1070. try {
  1071. e();
  1072. } catch (e) {
  1073. consoleError(e);
  1074. }
  1075. }));
  1076. }, writeTask = e => {
  1077. process.nextTick((() => {
  1078. try {
  1079. e();
  1080. } catch (e) {
  1081. consoleError(e);
  1082. }
  1083. }));
  1084. }, resolved = Promise.resolve(), nextTick = e => resolved.then(e), defaultConsoleError = e => {
  1085. null != e && console.error(e.stack || e.message || e);
  1086. }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {}, consoleDevWarn = (...e) => {}, consoleDevInfo = (...e) => {}, setErrorHandler = e => customError = e, Context = {}, plt = {
  1087. $flags$: 0,
  1088. $resourcesUrl$: "",
  1089. jmp: e => e(),
  1090. raf: e => requestAnimationFrame(e),
  1091. ael: (e, t, o, n) => e.addEventListener(t, o, n),
  1092. rel: (e, t, o, n) => e.removeEventListener(t, o, n),
  1093. ce: (e, t) => new win.CustomEvent(e, t)
  1094. }, setPlatformHelpers = e => {
  1095. Object.assign(plt, e);
  1096. }, supportsShadow = !1, supportsListenerOptions = !1, supportsConstructableStylesheets = !1, hostRefs = new WeakMap, getHostRef = e => hostRefs.get(e), registerInstance = (e, t) => hostRefs.set(t.$lazyInstance$ = e, t), registerHost = (e, t) => {
  1097. const o = {
  1098. $flags$: 0,
  1099. $cmpMeta$: t,
  1100. $hostElement$: e,
  1101. $instanceValues$: new Map,
  1102. $renderCount$: 0
  1103. };
  1104. return o.$onInstancePromise$ = new Promise((e => o.$onInstanceResolve$ = e)), o.$onReadyPromise$ = new Promise((e => o.$onReadyResolve$ = e)),
  1105. e["s-p"] = [], e["s-rc"] = [], addHostEventListeners(e, o, t.$listeners$, !1), hostRefs.set(e, o);
  1106. }, Build = {
  1107. isDev: !1,
  1108. isBrowser: !1,
  1109. isServer: !0,
  1110. isTesting: !1
  1111. }, styles = new Map, modeResolutionChain = [];
  1112. export { Build, Context, Fragment, Host, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };