@everymatrix/casino-tournament-duration 1.31.2 → 1.32.4

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