@everymatrix/casino-engagement-suite-challenges-details 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.esm.js +1 -0
  2. package/dist/casino-engagement-suite-challenges-details/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-challenges-details/p-27926b27.entry.js +1 -0
  4. package/dist/casino-engagement-suite-challenges-details/p-764c820d.js +1 -0
  5. package/dist/cjs/casino-engagement-suite-challenges-details.cjs.entry.js +190 -0
  6. package/dist/cjs/casino-engagement-suite-challenges-details.cjs.js +19 -0
  7. package/dist/cjs/index-ec28d374.js +1198 -0
  8. package/dist/cjs/index.cjs.js +2 -0
  9. package/dist/cjs/loader.cjs.js +21 -0
  10. package/dist/collection/collection-manifest.json +12 -0
  11. package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.css +270 -0
  12. package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.js +319 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/models/casino-challenges-details.js +15 -0
  15. package/dist/collection/utils/locale.utils.js +20 -0
  16. package/dist/components/casino-engagement-suite-challenges-details.d.ts +11 -0
  17. package/dist/components/casino-engagement-suite-challenges-details.js +215 -0
  18. package/dist/components/index.d.ts +26 -0
  19. package/dist/components/index.js +1 -0
  20. package/dist/esm/casino-engagement-suite-challenges-details.entry.js +186 -0
  21. package/dist/esm/casino-engagement-suite-challenges-details.js +17 -0
  22. package/dist/esm/index-13f457d0.js +1171 -0
  23. package/dist/esm/index.js +1 -0
  24. package/dist/esm/loader.js +17 -0
  25. package/dist/esm/polyfills/core-js.js +11 -0
  26. package/dist/esm/polyfills/css-shim.js +1 -0
  27. package/dist/esm/polyfills/dom.js +79 -0
  28. package/dist/esm/polyfills/es5-html-element.js +1 -0
  29. package/dist/esm/polyfills/index.js +34 -0
  30. package/dist/esm/polyfills/system.js +6 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/stencil.config.js +22 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-challenges-details/.stencil/packages/casino-engagement-suite-challenges-details/stencil.config.d.ts +2 -0
  35. package/dist/types/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.d.ts +53 -0
  36. package/dist/types/components.d.ts +87 -0
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/models/casino-challenges-details.d.ts +58 -0
  39. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  40. package/dist/types/utils/locale.utils.d.ts +1 -0
  41. package/loader/cdn.js +3 -0
  42. package/loader/index.cjs.js +3 -0
  43. package/loader/index.d.ts +12 -0
  44. package/loader/index.es2017.js +3 -0
  45. package/loader/index.js +4 -0
  46. package/loader/package.json +10 -0
  47. package/package.json +19 -0
@@ -0,0 +1,1171 @@
1
+ const NAMESPACE = 'casino-engagement-suite-challenges-details';
2
+
3
+ let scopeId;
4
+ let hostTagName;
5
+ let isSvgMode = false;
6
+ let queuePending = false;
7
+ const win = typeof window !== 'undefined' ? window : {};
8
+ const doc = win.document || { head: {} };
9
+ const plt = {
10
+ $flags$: 0,
11
+ $resourcesUrl$: '',
12
+ jmp: (h) => h(),
13
+ raf: (h) => requestAnimationFrame(h),
14
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
15
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
16
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
17
+ };
18
+ const promiseResolve = (v) => Promise.resolve(v);
19
+ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
20
+ try {
21
+ new CSSStyleSheet();
22
+ return typeof new CSSStyleSheet().replace === 'function';
23
+ }
24
+ catch (e) { }
25
+ return false;
26
+ })()
27
+ ;
28
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
29
+ const createTime = (fnName, tagName = '') => {
30
+ {
31
+ return () => {
32
+ return;
33
+ };
34
+ }
35
+ };
36
+ const uniqueTime = (key, measureText) => {
37
+ {
38
+ return () => {
39
+ return;
40
+ };
41
+ }
42
+ };
43
+ const rootAppliedStyles = new WeakMap();
44
+ const registerStyle = (scopeId, cssText, allowCS) => {
45
+ let style = styles.get(scopeId);
46
+ if (supportsConstructibleStylesheets && allowCS) {
47
+ style = (style || new CSSStyleSheet());
48
+ style.replace(cssText);
49
+ }
50
+ else {
51
+ style = cssText;
52
+ }
53
+ styles.set(scopeId, style);
54
+ };
55
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
56
+ let scopeId = getScopeId(cmpMeta);
57
+ let style = styles.get(scopeId);
58
+ // if an element is NOT connected then getRootNode() will return the wrong root node
59
+ // so the fallback is to always use the document for the root node in those cases
60
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
61
+ if (style) {
62
+ if (typeof style === 'string') {
63
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
64
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
65
+ let styleElm;
66
+ if (!appliedStyles) {
67
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
68
+ }
69
+ if (!appliedStyles.has(scopeId)) {
70
+ {
71
+ {
72
+ styleElm = doc.createElement('style');
73
+ styleElm.innerHTML = style;
74
+ }
75
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
76
+ }
77
+ if (appliedStyles) {
78
+ appliedStyles.add(scopeId);
79
+ }
80
+ }
81
+ }
82
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
83
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
84
+ }
85
+ }
86
+ return scopeId;
87
+ };
88
+ const attachStyles = (hostRef) => {
89
+ const cmpMeta = hostRef.$cmpMeta$;
90
+ const elm = hostRef.$hostElement$;
91
+ const flags = cmpMeta.$flags$;
92
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
93
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
94
+ if (flags & 10 /* needsScopedEncapsulation */) {
95
+ // only required when we're NOT using native shadow dom (slot)
96
+ // or this browser doesn't support native shadow dom
97
+ // and this host element was NOT created with SSR
98
+ // let's pick out the inner content for slot projection
99
+ // create a node to represent where the original
100
+ // content was first placed, which is useful later on
101
+ // DOM WRITE!!
102
+ elm['s-sc'] = scopeId;
103
+ elm.classList.add(scopeId + '-h');
104
+ }
105
+ endAttachStyles();
106
+ };
107
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
108
+ /**
109
+ * Default style mode id
110
+ */
111
+ /**
112
+ * Reusable empty obj/array
113
+ * Don't add values to these!!
114
+ */
115
+ const EMPTY_OBJ = {};
116
+ const isDef = (v) => v != null;
117
+ const isComplexType = (o) => {
118
+ // https://jsperf.com/typeof-fn-object/5
119
+ o = typeof o;
120
+ return o === 'object' || o === 'function';
121
+ };
122
+ /**
123
+ * Production h() function based on Preact by
124
+ * Jason Miller (@developit)
125
+ * Licensed under the MIT License
126
+ * https://github.com/developit/preact/blob/master/LICENSE
127
+ *
128
+ * Modified for Stencil's compiler and vdom
129
+ */
130
+ // const stack: any[] = [];
131
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
132
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
133
+ const h = (nodeName, vnodeData, ...children) => {
134
+ let child = null;
135
+ let simple = false;
136
+ let lastSimple = false;
137
+ let vNodeChildren = [];
138
+ const walk = (c) => {
139
+ for (let i = 0; i < c.length; i++) {
140
+ child = c[i];
141
+ if (Array.isArray(child)) {
142
+ walk(child);
143
+ }
144
+ else if (child != null && typeof child !== 'boolean') {
145
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
146
+ child = String(child);
147
+ }
148
+ if (simple && lastSimple) {
149
+ // If the previous child was simple (string), we merge both
150
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
151
+ }
152
+ else {
153
+ // Append a new vNode, if it's text, we create a text vNode
154
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
155
+ }
156
+ lastSimple = simple;
157
+ }
158
+ }
159
+ };
160
+ walk(children);
161
+ if (vnodeData) {
162
+ {
163
+ const classData = vnodeData.className || vnodeData.class;
164
+ if (classData) {
165
+ vnodeData.class =
166
+ typeof classData !== 'object'
167
+ ? classData
168
+ : Object.keys(classData)
169
+ .filter((k) => classData[k])
170
+ .join(' ');
171
+ }
172
+ }
173
+ }
174
+ const vnode = newVNode(nodeName, null);
175
+ vnode.$attrs$ = vnodeData;
176
+ if (vNodeChildren.length > 0) {
177
+ vnode.$children$ = vNodeChildren;
178
+ }
179
+ return vnode;
180
+ };
181
+ const newVNode = (tag, text) => {
182
+ const vnode = {
183
+ $flags$: 0,
184
+ $tag$: tag,
185
+ $text$: text,
186
+ $elm$: null,
187
+ $children$: null,
188
+ };
189
+ {
190
+ vnode.$attrs$ = null;
191
+ }
192
+ return vnode;
193
+ };
194
+ const Host = {};
195
+ const isHost = (node) => node && node.$tag$ === Host;
196
+ /**
197
+ * Production setAccessor() function based on Preact by
198
+ * Jason Miller (@developit)
199
+ * Licensed under the MIT License
200
+ * https://github.com/developit/preact/blob/master/LICENSE
201
+ *
202
+ * Modified for Stencil's compiler and vdom
203
+ */
204
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
205
+ if (oldValue !== newValue) {
206
+ let isProp = isMemberInElement(elm, memberName);
207
+ let ln = memberName.toLowerCase();
208
+ if (memberName === 'class') {
209
+ const classList = elm.classList;
210
+ const oldClasses = parseClassList(oldValue);
211
+ const newClasses = parseClassList(newValue);
212
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
+ }
215
+ else if ((!isProp ) &&
216
+ memberName[0] === 'o' &&
217
+ memberName[1] === 'n') {
218
+ // Event Handlers
219
+ // so if the member name starts with "on" and the 3rd characters is
220
+ // a capital letter, and it's not already a member on the element,
221
+ // then we're assuming it's an event listener
222
+ if (memberName[2] === '-') {
223
+ // on- prefixed events
224
+ // allows to be explicit about the dom event to listen without any magic
225
+ // under the hood:
226
+ // <my-cmp on-click> // listens for "click"
227
+ // <my-cmp on-Click> // listens for "Click"
228
+ // <my-cmp on-ionChange> // listens for "ionChange"
229
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
230
+ memberName = memberName.slice(3);
231
+ }
232
+ else if (isMemberInElement(win, ln)) {
233
+ // standard event
234
+ // the JSX attribute could have been "onMouseOver" and the
235
+ // member name "onmouseover" is on the window's prototype
236
+ // so let's add the listener "mouseover", which is all lowercased
237
+ memberName = ln.slice(2);
238
+ }
239
+ else {
240
+ // custom event
241
+ // the JSX attribute could have been "onMyCustomEvent"
242
+ // so let's trim off the "on" prefix and lowercase the first character
243
+ // and add the listener "myCustomEvent"
244
+ // except for the first character, we keep the event name case
245
+ memberName = ln[2] + memberName.slice(3);
246
+ }
247
+ if (oldValue) {
248
+ plt.rel(elm, memberName, oldValue, false);
249
+ }
250
+ if (newValue) {
251
+ plt.ael(elm, memberName, newValue, false);
252
+ }
253
+ }
254
+ else {
255
+ // Set property if it exists and it's not a SVG
256
+ const isComplex = isComplexType(newValue);
257
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
258
+ try {
259
+ if (!elm.tagName.includes('-')) {
260
+ let n = newValue == null ? '' : newValue;
261
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
262
+ if (memberName === 'list') {
263
+ isProp = false;
264
+ }
265
+ else if (oldValue == null || elm[memberName] != n) {
266
+ elm[memberName] = n;
267
+ }
268
+ }
269
+ else {
270
+ elm[memberName] = newValue;
271
+ }
272
+ }
273
+ catch (e) { }
274
+ }
275
+ if (newValue == null || newValue === false) {
276
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
277
+ {
278
+ elm.removeAttribute(memberName);
279
+ }
280
+ }
281
+ }
282
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
283
+ newValue = newValue === true ? '' : newValue;
284
+ {
285
+ elm.setAttribute(memberName, newValue);
286
+ }
287
+ }
288
+ }
289
+ }
290
+ };
291
+ const parseClassListRegex = /\s/;
292
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
293
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
294
+ // if the element passed in is a shadow root, which is a document fragment
295
+ // then we want to be adding attrs/props to the shadow root's "host" element
296
+ // if it's not a shadow root, then we add attrs/props to the same element
297
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
298
+ ? newVnode.$elm$.host
299
+ : newVnode.$elm$;
300
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
301
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
302
+ {
303
+ // remove attributes no longer present on the vnode by setting them to undefined
304
+ for (memberName in oldVnodeAttrs) {
305
+ if (!(memberName in newVnodeAttrs)) {
306
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
307
+ }
308
+ }
309
+ }
310
+ // add new & update changed attributes
311
+ for (memberName in newVnodeAttrs) {
312
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
313
+ }
314
+ };
315
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
316
+ // tslint:disable-next-line: prefer-const
317
+ let newVNode = newParentVNode.$children$[childIndex];
318
+ let i = 0;
319
+ let elm;
320
+ let childNode;
321
+ if (newVNode.$text$ !== null) {
322
+ // create text node
323
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
324
+ }
325
+ else {
326
+ // create element
327
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
328
+ // add css classes, attrs, props, listeners, etc.
329
+ {
330
+ updateElement(null, newVNode, isSvgMode);
331
+ }
332
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
333
+ // if there is a scopeId and this is the initial render
334
+ // then let's add the scopeId as a css class
335
+ elm.classList.add((elm['s-si'] = scopeId));
336
+ }
337
+ if (newVNode.$children$) {
338
+ for (i = 0; i < newVNode.$children$.length; ++i) {
339
+ // create the node
340
+ childNode = createElm(oldParentVNode, newVNode, i);
341
+ // return node could have been null
342
+ if (childNode) {
343
+ // append our new node
344
+ elm.appendChild(childNode);
345
+ }
346
+ }
347
+ }
348
+ }
349
+ return elm;
350
+ };
351
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
352
+ let containerElm = (parentElm);
353
+ let childNode;
354
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
355
+ containerElm = containerElm.shadowRoot;
356
+ }
357
+ for (; startIdx <= endIdx; ++startIdx) {
358
+ if (vnodes[startIdx]) {
359
+ childNode = createElm(null, parentVNode, startIdx);
360
+ if (childNode) {
361
+ vnodes[startIdx].$elm$ = childNode;
362
+ containerElm.insertBefore(childNode, before);
363
+ }
364
+ }
365
+ }
366
+ };
367
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
368
+ for (; startIdx <= endIdx; ++startIdx) {
369
+ if ((vnode = vnodes[startIdx])) {
370
+ elm = vnode.$elm$;
371
+ // remove the vnode's element from the dom
372
+ elm.remove();
373
+ }
374
+ }
375
+ };
376
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
377
+ let oldStartIdx = 0;
378
+ let newStartIdx = 0;
379
+ let oldEndIdx = oldCh.length - 1;
380
+ let oldStartVnode = oldCh[0];
381
+ let oldEndVnode = oldCh[oldEndIdx];
382
+ let newEndIdx = newCh.length - 1;
383
+ let newStartVnode = newCh[0];
384
+ let newEndVnode = newCh[newEndIdx];
385
+ let node;
386
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
387
+ if (oldStartVnode == null) {
388
+ // Vnode might have been moved left
389
+ oldStartVnode = oldCh[++oldStartIdx];
390
+ }
391
+ else if (oldEndVnode == null) {
392
+ oldEndVnode = oldCh[--oldEndIdx];
393
+ }
394
+ else if (newStartVnode == null) {
395
+ newStartVnode = newCh[++newStartIdx];
396
+ }
397
+ else if (newEndVnode == null) {
398
+ newEndVnode = newCh[--newEndIdx];
399
+ }
400
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
401
+ patch(oldStartVnode, newStartVnode);
402
+ oldStartVnode = oldCh[++oldStartIdx];
403
+ newStartVnode = newCh[++newStartIdx];
404
+ }
405
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
406
+ patch(oldEndVnode, newEndVnode);
407
+ oldEndVnode = oldCh[--oldEndIdx];
408
+ newEndVnode = newCh[--newEndIdx];
409
+ }
410
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
411
+ patch(oldStartVnode, newEndVnode);
412
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
413
+ oldStartVnode = oldCh[++oldStartIdx];
414
+ newEndVnode = newCh[--newEndIdx];
415
+ }
416
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
417
+ patch(oldEndVnode, newStartVnode);
418
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
419
+ oldEndVnode = oldCh[--oldEndIdx];
420
+ newStartVnode = newCh[++newStartIdx];
421
+ }
422
+ else {
423
+ {
424
+ // new element
425
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
426
+ newStartVnode = newCh[++newStartIdx];
427
+ }
428
+ if (node) {
429
+ {
430
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
431
+ }
432
+ }
433
+ }
434
+ }
435
+ if (oldStartIdx > oldEndIdx) {
436
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
437
+ }
438
+ else if (newStartIdx > newEndIdx) {
439
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
440
+ }
441
+ };
442
+ const isSameVnode = (vnode1, vnode2) => {
443
+ // compare if two vnode to see if they're "technically" the same
444
+ // need to have the same element tag, and same key to be the same
445
+ if (vnode1.$tag$ === vnode2.$tag$) {
446
+ return true;
447
+ }
448
+ return false;
449
+ };
450
+ const patch = (oldVNode, newVNode) => {
451
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
452
+ const oldChildren = oldVNode.$children$;
453
+ const newChildren = newVNode.$children$;
454
+ const text = newVNode.$text$;
455
+ if (text === null) {
456
+ // element node
457
+ {
458
+ {
459
+ // either this is the first render of an element OR it's an update
460
+ // AND we already know it's possible it could have changed
461
+ // this updates the element's css classes, attrs, props, listeners, etc.
462
+ updateElement(oldVNode, newVNode, isSvgMode);
463
+ }
464
+ }
465
+ if (oldChildren !== null && newChildren !== null) {
466
+ // looks like there's child vnodes for both the old and new vnodes
467
+ updateChildren(elm, oldChildren, newVNode, newChildren);
468
+ }
469
+ else if (newChildren !== null) {
470
+ // no old child vnodes, but there are new child vnodes to add
471
+ if (oldVNode.$text$ !== null) {
472
+ // the old vnode was text, so be sure to clear it out
473
+ elm.textContent = '';
474
+ }
475
+ // add the new vnode children
476
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
477
+ }
478
+ else if (oldChildren !== null) {
479
+ // no new child vnodes, but there are old child vnodes to remove
480
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
481
+ }
482
+ }
483
+ else if (oldVNode.$text$ !== text) {
484
+ // update the text content for the text only vnode
485
+ // and also only if the text is different than before
486
+ elm.data = text;
487
+ }
488
+ };
489
+ const renderVdom = (hostRef, renderFnResults) => {
490
+ const hostElm = hostRef.$hostElement$;
491
+ const cmpMeta = hostRef.$cmpMeta$;
492
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
493
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
494
+ hostTagName = hostElm.tagName;
495
+ if (cmpMeta.$attrsToReflect$) {
496
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
497
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
498
+ }
499
+ rootVnode.$tag$ = null;
500
+ rootVnode.$flags$ |= 4 /* isHost */;
501
+ hostRef.$vnode$ = rootVnode;
502
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
503
+ {
504
+ scopeId = hostElm['s-sc'];
505
+ }
506
+ // synchronous patch
507
+ patch(oldVNode, rootVnode);
508
+ };
509
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
510
+ const createEvent = (ref, name, flags) => {
511
+ const elm = getElement(ref);
512
+ return {
513
+ emit: (detail) => {
514
+ return emitEvent(elm, name, {
515
+ bubbles: !!(flags & 4 /* Bubbles */),
516
+ composed: !!(flags & 2 /* Composed */),
517
+ cancelable: !!(flags & 1 /* Cancellable */),
518
+ detail,
519
+ });
520
+ },
521
+ };
522
+ };
523
+ /**
524
+ * Helper function to create & dispatch a custom Event on a provided target
525
+ * @param elm the target of the Event
526
+ * @param name the name to give the custom Event
527
+ * @param opts options for configuring a custom Event
528
+ * @returns the custom Event
529
+ */
530
+ const emitEvent = (elm, name, opts) => {
531
+ const ev = plt.ce(name, opts);
532
+ elm.dispatchEvent(ev);
533
+ return ev;
534
+ };
535
+ const attachToAncestor = (hostRef, ancestorComponent) => {
536
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
537
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
538
+ }
539
+ };
540
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
541
+ {
542
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
543
+ }
544
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
545
+ hostRef.$flags$ |= 512 /* needsRerender */;
546
+ return;
547
+ }
548
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
549
+ // there is no ancestor component or the ancestor component
550
+ // has already fired off its lifecycle update then
551
+ // fire off the initial update
552
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
553
+ return writeTask(dispatch) ;
554
+ };
555
+ const dispatchHooks = (hostRef, isInitialLoad) => {
556
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
557
+ const instance = hostRef.$lazyInstance$ ;
558
+ let promise;
559
+ if (isInitialLoad) {
560
+ {
561
+ promise = safeCall(instance, 'componentWillLoad');
562
+ }
563
+ }
564
+ endSchedule();
565
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
566
+ };
567
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
568
+ // updateComponent
569
+ const elm = hostRef.$hostElement$;
570
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
571
+ const rc = elm['s-rc'];
572
+ if (isInitialLoad) {
573
+ // DOM WRITE!
574
+ attachStyles(hostRef);
575
+ }
576
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
577
+ {
578
+ callRender(hostRef, instance);
579
+ }
580
+ if (rc) {
581
+ // ok, so turns out there are some child host elements
582
+ // waiting on this parent element to load
583
+ // let's fire off all update callbacks waiting
584
+ rc.map((cb) => cb());
585
+ elm['s-rc'] = undefined;
586
+ }
587
+ endRender();
588
+ endUpdate();
589
+ {
590
+ const childrenPromises = elm['s-p'];
591
+ const postUpdate = () => postUpdateComponent(hostRef);
592
+ if (childrenPromises.length === 0) {
593
+ postUpdate();
594
+ }
595
+ else {
596
+ Promise.all(childrenPromises).then(postUpdate);
597
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
598
+ childrenPromises.length = 0;
599
+ }
600
+ }
601
+ };
602
+ const callRender = (hostRef, instance, elm) => {
603
+ try {
604
+ instance = instance.render() ;
605
+ {
606
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
607
+ }
608
+ {
609
+ hostRef.$flags$ |= 2 /* hasRendered */;
610
+ }
611
+ {
612
+ {
613
+ // looks like we've got child nodes to render into this host element
614
+ // or we need to update the css class/attrs on the host element
615
+ // DOM WRITE!
616
+ {
617
+ renderVdom(hostRef, instance);
618
+ }
619
+ }
620
+ }
621
+ }
622
+ catch (e) {
623
+ consoleError(e, hostRef.$hostElement$);
624
+ }
625
+ return null;
626
+ };
627
+ const postUpdateComponent = (hostRef) => {
628
+ const tagName = hostRef.$cmpMeta$.$tagName$;
629
+ const elm = hostRef.$hostElement$;
630
+ const endPostUpdate = createTime('postUpdate', tagName);
631
+ const instance = hostRef.$lazyInstance$ ;
632
+ const ancestorComponent = hostRef.$ancestorComponent$;
633
+ {
634
+ safeCall(instance, 'componentDidRender');
635
+ }
636
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
637
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
638
+ {
639
+ // DOM WRITE!
640
+ addHydratedFlag(elm);
641
+ }
642
+ endPostUpdate();
643
+ {
644
+ hostRef.$onReadyResolve$(elm);
645
+ if (!ancestorComponent) {
646
+ appDidLoad();
647
+ }
648
+ }
649
+ }
650
+ else {
651
+ endPostUpdate();
652
+ }
653
+ // load events fire from bottom to top
654
+ // the deepest elements load first then bubbles up
655
+ {
656
+ if (hostRef.$onRenderResolve$) {
657
+ hostRef.$onRenderResolve$();
658
+ hostRef.$onRenderResolve$ = undefined;
659
+ }
660
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
661
+ nextTick(() => scheduleUpdate(hostRef, false));
662
+ }
663
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
664
+ }
665
+ // ( •_•)
666
+ // ( •_•)>⌐■-■
667
+ // (⌐■_■)
668
+ };
669
+ const appDidLoad = (who) => {
670
+ // on appload
671
+ // we have finish the first big initial render
672
+ {
673
+ addHydratedFlag(doc.documentElement);
674
+ }
675
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
676
+ };
677
+ const safeCall = (instance, method, arg) => {
678
+ if (instance && instance[method]) {
679
+ try {
680
+ return instance[method](arg);
681
+ }
682
+ catch (e) {
683
+ consoleError(e);
684
+ }
685
+ }
686
+ return undefined;
687
+ };
688
+ const then = (promise, thenFn) => {
689
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
690
+ };
691
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
692
+ ;
693
+ /**
694
+ * Parse a new property value for a given property type.
695
+ *
696
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
697
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
698
+ * 1. `any`, the type given to `propValue` in the function signature
699
+ * 2. the type stored from `propType`.
700
+ *
701
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
702
+ *
703
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
704
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
705
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
706
+ * ```tsx
707
+ * <my-cmp prop-val={0}></my-cmp>
708
+ * ```
709
+ *
710
+ * HTML prop values on the other hand, will always a string
711
+ *
712
+ * @param propValue the new value to coerce to some type
713
+ * @param propType the type of the prop, expressed as a binary number
714
+ * @returns the parsed/coerced value
715
+ */
716
+ const parsePropertyValue = (propValue, propType) => {
717
+ // ensure this value is of the correct prop type
718
+ if (propValue != null && !isComplexType(propValue)) {
719
+ if (propType & 1 /* String */) {
720
+ // could have been passed as a number or boolean
721
+ // but we still want it as a string
722
+ return String(propValue);
723
+ }
724
+ // redundant return here for better minification
725
+ return propValue;
726
+ }
727
+ // not sure exactly what type we want
728
+ // so no need to change to a different type
729
+ return propValue;
730
+ };
731
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
732
+ const setValue = (ref, propName, newVal, cmpMeta) => {
733
+ // check our new property value against our internal value
734
+ const hostRef = getHostRef(ref);
735
+ const elm = hostRef.$hostElement$ ;
736
+ const oldVal = hostRef.$instanceValues$.get(propName);
737
+ const flags = hostRef.$flags$;
738
+ const instance = hostRef.$lazyInstance$ ;
739
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
740
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
741
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
742
+ const didValueChange = newVal !== oldVal && !areBothNaN;
743
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
744
+ // gadzooks! the property's value has changed!!
745
+ // set our new value!
746
+ hostRef.$instanceValues$.set(propName, newVal);
747
+ if (instance) {
748
+ // get an array of method names of watch functions to call
749
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
750
+ const watchMethods = cmpMeta.$watchers$[propName];
751
+ if (watchMethods) {
752
+ // this instance is watching for when this property changed
753
+ watchMethods.map((watchMethodName) => {
754
+ try {
755
+ // fire off each of the watch methods that are watching this property
756
+ instance[watchMethodName](newVal, oldVal, propName);
757
+ }
758
+ catch (e) {
759
+ consoleError(e, elm);
760
+ }
761
+ });
762
+ }
763
+ }
764
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
765
+ // looks like this value actually changed, so we've got work to do!
766
+ // but only if we've already rendered, otherwise just chill out
767
+ // queue that we need to do an update, but don't worry about queuing
768
+ // up millions cuz this function ensures it only runs once
769
+ scheduleUpdate(hostRef, false);
770
+ }
771
+ }
772
+ }
773
+ };
774
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
775
+ if (cmpMeta.$members$) {
776
+ if (Cstr.watchers) {
777
+ cmpMeta.$watchers$ = Cstr.watchers;
778
+ }
779
+ // It's better to have a const than two Object.entries()
780
+ const members = Object.entries(cmpMeta.$members$);
781
+ const prototype = Cstr.prototype;
782
+ members.map(([memberName, [memberFlags]]) => {
783
+ if ((memberFlags & 31 /* Prop */ ||
784
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
785
+ // proxyComponent - prop
786
+ Object.defineProperty(prototype, memberName, {
787
+ get() {
788
+ // proxyComponent, get value
789
+ return getValue(this, memberName);
790
+ },
791
+ set(newValue) {
792
+ // proxyComponent, set value
793
+ setValue(this, memberName, newValue, cmpMeta);
794
+ },
795
+ configurable: true,
796
+ enumerable: true,
797
+ });
798
+ }
799
+ });
800
+ if ((flags & 1 /* isElementConstructor */)) {
801
+ const attrNameToPropName = new Map();
802
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
803
+ plt.jmp(() => {
804
+ const propName = attrNameToPropName.get(attrName);
805
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
806
+ // in the case where an attribute was set inline.
807
+ // ```html
808
+ // <my-component some-attribute="some-value"></my-component>
809
+ // ```
810
+ //
811
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
812
+ // programmatically changes it before it has been upgraded as shown below:
813
+ //
814
+ // ```html
815
+ // <!-- this component has _not_ been upgraded yet -->
816
+ // <my-component id="test" some-attribute="some-value"></my-component>
817
+ // <script>
818
+ // // grab non-upgraded component
819
+ // el = document.querySelector("#test");
820
+ // el.someAttribute = "another-value";
821
+ // // upgrade component
822
+ // customElements.define('my-component', MyComponent);
823
+ // </script>
824
+ // ```
825
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
826
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
827
+ // to the value that was set inline i.e. "some-value" from above example. When
828
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
829
+ //
830
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
831
+ // by connectedCallback as this attributeChangedCallback will not fire.
832
+ //
833
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
834
+ //
835
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
836
+ // properties here given that this goes against best practices outlined here
837
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
838
+ if (this.hasOwnProperty(propName)) {
839
+ newValue = this[propName];
840
+ delete this[propName];
841
+ }
842
+ else if (prototype.hasOwnProperty(propName) &&
843
+ typeof this[propName] === 'number' &&
844
+ this[propName] == newValue) {
845
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
846
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
847
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
848
+ return;
849
+ }
850
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
851
+ });
852
+ };
853
+ // create an array of attributes to observe
854
+ // and also create a map of html attribute name to js property name
855
+ Cstr.observedAttributes = members
856
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
857
+ .map(([propName, m]) => {
858
+ const attrName = m[1] || propName;
859
+ attrNameToPropName.set(attrName, propName);
860
+ if (m[0] & 512 /* ReflectAttr */) {
861
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
862
+ }
863
+ return attrName;
864
+ });
865
+ }
866
+ }
867
+ return Cstr;
868
+ };
869
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
870
+ // initializeComponent
871
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
872
+ {
873
+ // we haven't initialized this element yet
874
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
875
+ // lazy loaded components
876
+ // request the component's implementation to be
877
+ // wired up with the host element
878
+ Cstr = loadModule(cmpMeta);
879
+ if (Cstr.then) {
880
+ // Await creates a micro-task avoid if possible
881
+ const endLoad = uniqueTime();
882
+ Cstr = await Cstr;
883
+ endLoad();
884
+ }
885
+ if (!Cstr.isProxied) {
886
+ // we've never proxied this Constructor before
887
+ // let's add the getters/setters to its prototype before
888
+ // the first time we create an instance of the implementation
889
+ {
890
+ cmpMeta.$watchers$ = Cstr.watchers;
891
+ }
892
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
893
+ Cstr.isProxied = true;
894
+ }
895
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
896
+ // ok, time to construct the instance
897
+ // but let's keep track of when we start and stop
898
+ // so that the getters/setters don't incorrectly step on data
899
+ {
900
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
901
+ }
902
+ // construct the lazy-loaded component implementation
903
+ // passing the hostRef is very important during
904
+ // construction in order to directly wire together the
905
+ // host element and the lazy-loaded instance
906
+ try {
907
+ new Cstr(hostRef);
908
+ }
909
+ catch (e) {
910
+ consoleError(e);
911
+ }
912
+ {
913
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
914
+ }
915
+ {
916
+ hostRef.$flags$ |= 128 /* isWatchReady */;
917
+ }
918
+ endNewInstance();
919
+ }
920
+ if (Cstr.style) {
921
+ // this component has styles but we haven't registered them yet
922
+ let style = Cstr.style;
923
+ const scopeId = getScopeId(cmpMeta);
924
+ if (!styles.has(scopeId)) {
925
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
926
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
927
+ endRegisterStyles();
928
+ }
929
+ }
930
+ }
931
+ // we've successfully created a lazy instance
932
+ const ancestorComponent = hostRef.$ancestorComponent$;
933
+ const schedule = () => scheduleUpdate(hostRef, true);
934
+ if (ancestorComponent && ancestorComponent['s-rc']) {
935
+ // this is the initial load and this component it has an ancestor component
936
+ // but the ancestor component has NOT fired its will update lifecycle yet
937
+ // so let's just cool our jets and wait for the ancestor to continue first
938
+ // this will get fired off when the ancestor component
939
+ // finally gets around to rendering its lazy self
940
+ // fire off the initial update
941
+ ancestorComponent['s-rc'].push(schedule);
942
+ }
943
+ else {
944
+ schedule();
945
+ }
946
+ };
947
+ const connectedCallback = (elm) => {
948
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
949
+ const hostRef = getHostRef(elm);
950
+ const cmpMeta = hostRef.$cmpMeta$;
951
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
952
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
953
+ // first time this component has connected
954
+ hostRef.$flags$ |= 1 /* hasConnected */;
955
+ {
956
+ // find the first ancestor component (if there is one) and register
957
+ // this component as one of the actively loading child components for its ancestor
958
+ let ancestorComponent = elm;
959
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
960
+ // climb up the ancestors looking for the first
961
+ // component that hasn't finished its lifecycle update yet
962
+ if (ancestorComponent['s-p']) {
963
+ // we found this components first ancestor component
964
+ // keep a reference to this component's ancestor component
965
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
966
+ break;
967
+ }
968
+ }
969
+ }
970
+ // Lazy properties
971
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
972
+ if (cmpMeta.$members$) {
973
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
974
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
975
+ const value = elm[memberName];
976
+ delete elm[memberName];
977
+ elm[memberName] = value;
978
+ }
979
+ });
980
+ }
981
+ {
982
+ initializeComponent(elm, hostRef, cmpMeta);
983
+ }
984
+ }
985
+ endConnected();
986
+ }
987
+ };
988
+ const disconnectedCallback = (elm) => {
989
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
990
+ getHostRef(elm);
991
+ }
992
+ };
993
+ const bootstrapLazy = (lazyBundles, options = {}) => {
994
+ const endBootstrap = createTime();
995
+ const cmpTags = [];
996
+ const exclude = options.exclude || [];
997
+ const customElements = win.customElements;
998
+ const head = doc.head;
999
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1000
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1001
+ const deferredConnectedCallbacks = [];
1002
+ let appLoadFallback;
1003
+ let isBootstrapping = true;
1004
+ Object.assign(plt, options);
1005
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1006
+ lazyBundles.map((lazyBundle) => {
1007
+ lazyBundle[1].map((compactMeta) => {
1008
+ const cmpMeta = {
1009
+ $flags$: compactMeta[0],
1010
+ $tagName$: compactMeta[1],
1011
+ $members$: compactMeta[2],
1012
+ $listeners$: compactMeta[3],
1013
+ };
1014
+ {
1015
+ cmpMeta.$members$ = compactMeta[2];
1016
+ }
1017
+ {
1018
+ cmpMeta.$attrsToReflect$ = [];
1019
+ }
1020
+ {
1021
+ cmpMeta.$watchers$ = {};
1022
+ }
1023
+ const tagName = cmpMeta.$tagName$;
1024
+ const HostElement = class extends HTMLElement {
1025
+ // StencilLazyHost
1026
+ constructor(self) {
1027
+ // @ts-ignore
1028
+ super(self);
1029
+ self = this;
1030
+ registerHost(self, cmpMeta);
1031
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1032
+ // this component is using shadow dom
1033
+ // and this browser supports shadow dom
1034
+ // add the read-only property "shadowRoot" to the host element
1035
+ // adding the shadow root build conditionals to minimize runtime
1036
+ {
1037
+ {
1038
+ self.attachShadow({ mode: 'open' });
1039
+ }
1040
+ }
1041
+ }
1042
+ }
1043
+ connectedCallback() {
1044
+ if (appLoadFallback) {
1045
+ clearTimeout(appLoadFallback);
1046
+ appLoadFallback = null;
1047
+ }
1048
+ if (isBootstrapping) {
1049
+ // connectedCallback will be processed once all components have been registered
1050
+ deferredConnectedCallbacks.push(this);
1051
+ }
1052
+ else {
1053
+ plt.jmp(() => connectedCallback(this));
1054
+ }
1055
+ }
1056
+ disconnectedCallback() {
1057
+ plt.jmp(() => disconnectedCallback(this));
1058
+ }
1059
+ componentOnReady() {
1060
+ return getHostRef(this).$onReadyPromise$;
1061
+ }
1062
+ };
1063
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1064
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1065
+ cmpTags.push(tagName);
1066
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1067
+ }
1068
+ });
1069
+ });
1070
+ {
1071
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1072
+ visibilityStyle.setAttribute('data-styles', '');
1073
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1074
+ }
1075
+ // Process deferred connectedCallbacks now all components have been registered
1076
+ isBootstrapping = false;
1077
+ if (deferredConnectedCallbacks.length) {
1078
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1079
+ }
1080
+ else {
1081
+ {
1082
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1083
+ }
1084
+ }
1085
+ // Fallback appLoad event
1086
+ endBootstrap();
1087
+ };
1088
+ const hostRefs = new WeakMap();
1089
+ const getHostRef = (ref) => hostRefs.get(ref);
1090
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1091
+ const registerHost = (elm, cmpMeta) => {
1092
+ const hostRef = {
1093
+ $flags$: 0,
1094
+ $hostElement$: elm,
1095
+ $cmpMeta$: cmpMeta,
1096
+ $instanceValues$: new Map(),
1097
+ };
1098
+ {
1099
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1100
+ elm['s-p'] = [];
1101
+ elm['s-rc'] = [];
1102
+ }
1103
+ return hostRefs.set(elm, hostRef);
1104
+ };
1105
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1106
+ const consoleError = (e, el) => (0, console.error)(e, el);
1107
+ const cmpModules = /*@__PURE__*/ new Map();
1108
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1109
+ // loadModuleImport
1110
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1111
+ const bundleId = cmpMeta.$lazyBundleId$;
1112
+ const module = cmpModules.get(bundleId) ;
1113
+ if (module) {
1114
+ return module[exportName];
1115
+ }
1116
+ return import(
1117
+ /* webpackInclude: /\.entry\.js$/ */
1118
+ /* webpackExclude: /\.system\.entry\.js$/ */
1119
+ /* webpackMode: "lazy" */
1120
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
1121
+ {
1122
+ cmpModules.set(bundleId, importedModule);
1123
+ }
1124
+ return importedModule[exportName];
1125
+ }, consoleError);
1126
+ };
1127
+ const styles = new Map();
1128
+ const queueDomReads = [];
1129
+ const queueDomWrites = [];
1130
+ const queueTask = (queue, write) => (cb) => {
1131
+ queue.push(cb);
1132
+ if (!queuePending) {
1133
+ queuePending = true;
1134
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1135
+ nextTick(flush);
1136
+ }
1137
+ else {
1138
+ plt.raf(flush);
1139
+ }
1140
+ }
1141
+ };
1142
+ const consume = (queue) => {
1143
+ for (let i = 0; i < queue.length; i++) {
1144
+ try {
1145
+ queue[i](performance.now());
1146
+ }
1147
+ catch (e) {
1148
+ consoleError(e);
1149
+ }
1150
+ }
1151
+ queue.length = 0;
1152
+ };
1153
+ const flush = () => {
1154
+ // always force a bunch of medium callbacks to run, but still have
1155
+ // a throttle on how many can run in a certain time
1156
+ // DOM READS!!!
1157
+ consume(queueDomReads);
1158
+ // DOM WRITES!!!
1159
+ {
1160
+ consume(queueDomWrites);
1161
+ if ((queuePending = queueDomReads.length > 0)) {
1162
+ // still more to do yet, but we've run out of time
1163
+ // let's let this thing cool off and try again in the next tick
1164
+ plt.raf(flush);
1165
+ }
1166
+ }
1167
+ };
1168
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1169
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1170
+
1171
+ export { bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };