@everymatrix/lottery-bullet 0.0.1

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