@biggive/components 202401021213.0.0 → 202401021340.0.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 (73) hide show
  1. package/dist/biggive/biggive.esm.js +1 -1
  2. package/dist/biggive/biggive.esm.js.map +1 -1
  3. package/dist/biggive/p-00eb2e50.entry.js +2 -0
  4. package/dist/biggive/{p-b034ff29.entry.js → p-02eace20.entry.js} +2 -2
  5. package/dist/biggive/{p-ac8d8b74.entry.js → p-074c34fd.entry.js} +2 -2
  6. package/dist/biggive/{p-6618d001.entry.js → p-32fefae2.entry.js} +2 -2
  7. package/dist/biggive/{p-20e56ec8.entry.js → p-5778a304.entry.js} +2 -2
  8. package/dist/biggive/{p-08d69498.entry.js → p-5fe4d38a.entry.js} +2 -2
  9. package/dist/biggive/p-8814b5ee.js +3 -0
  10. package/dist/biggive/p-8814b5ee.js.map +1 -0
  11. package/dist/biggive/p-89950399.entry.js +2 -0
  12. package/dist/biggive/{p-e87dac29.entry.js → p-9a6b2534.entry.js} +2 -2
  13. package/dist/biggive/{p-2b7bde3a.entry.js → p-a02ae381.entry.js} +2 -2
  14. package/dist/biggive/{p-874d954b.entry.js → p-a14dec9d.entry.js} +2 -2
  15. package/dist/biggive/{p-9cf0778e.entry.js → p-b2c85e66.entry.js} +2 -2
  16. package/dist/biggive/{p-56928b75.entry.js → p-be942b9a.entry.js} +2 -2
  17. package/dist/biggive/{p-fb7284fa.entry.js → p-faa0dd62.entry.js} +2 -2
  18. package/dist/cjs/biggive-accordion_42.cjs.entry.js +1 -1
  19. package/dist/cjs/biggive-basic-card.cjs.entry.js +1 -1
  20. package/dist/cjs/biggive-beneficiary-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/biggive-boxed-content.cjs.entry.js +1 -1
  22. package/dist/cjs/biggive-category-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
  24. package/dist/cjs/biggive-form.cjs.entry.js +1 -1
  25. package/dist/cjs/biggive-icon-group.cjs.entry.js +1 -1
  26. package/dist/cjs/biggive-image-card.cjs.entry.js +1 -1
  27. package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
  28. package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
  29. package/dist/cjs/biggive-table.cjs.entry.js +1 -1
  30. package/dist/cjs/biggive-video.cjs.entry.js +1 -1
  31. package/dist/cjs/biggive.cjs.js +24 -1
  32. package/dist/cjs/biggive.cjs.js.map +1 -1
  33. package/dist/cjs/{index-91417d6c.js → index-1ad082b4.js} +298 -10
  34. package/dist/cjs/index-1ad082b4.js.map +1 -0
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/esm/biggive-accordion_42.entry.js +1 -1
  37. package/dist/esm/biggive-basic-card.entry.js +1 -1
  38. package/dist/esm/biggive-beneficiary-icon.entry.js +1 -1
  39. package/dist/esm/biggive-boxed-content.entry.js +1 -1
  40. package/dist/esm/biggive-category-icon.entry.js +1 -1
  41. package/dist/esm/biggive-cookie-banner.entry.js +1 -1
  42. package/dist/esm/biggive-form.entry.js +1 -1
  43. package/dist/esm/biggive-icon-group.entry.js +1 -1
  44. package/dist/esm/biggive-image-card.entry.js +1 -1
  45. package/dist/esm/biggive-nav-group.entry.js +1 -1
  46. package/dist/esm/biggive-nav-item.entry.js +1 -1
  47. package/dist/esm/biggive-table.entry.js +1 -1
  48. package/dist/esm/biggive-video.entry.js +1 -1
  49. package/dist/esm/biggive.js +25 -2
  50. package/dist/esm/biggive.js.map +1 -1
  51. package/dist/esm/{index-3ced6448.js → index-3eee9238.js} +298 -11
  52. package/dist/esm/index-3eee9238.js.map +1 -0
  53. package/dist/esm/loader.js +2 -2
  54. package/package.json +1 -1
  55. package/dist/biggive/p-15e42d9a.entry.js +0 -2
  56. package/dist/biggive/p-59f7c74d.entry.js +0 -2
  57. package/dist/biggive/p-f985f9ed.js +0 -3
  58. package/dist/biggive/p-f985f9ed.js.map +0 -1
  59. package/dist/cjs/index-91417d6c.js.map +0 -1
  60. package/dist/esm/index-3ced6448.js.map +0 -1
  61. /package/dist/biggive/{p-59f7c74d.entry.js.map → p-00eb2e50.entry.js.map} +0 -0
  62. /package/dist/biggive/{p-b034ff29.entry.js.map → p-02eace20.entry.js.map} +0 -0
  63. /package/dist/biggive/{p-ac8d8b74.entry.js.map → p-074c34fd.entry.js.map} +0 -0
  64. /package/dist/biggive/{p-6618d001.entry.js.map → p-32fefae2.entry.js.map} +0 -0
  65. /package/dist/biggive/{p-20e56ec8.entry.js.map → p-5778a304.entry.js.map} +0 -0
  66. /package/dist/biggive/{p-08d69498.entry.js.map → p-5fe4d38a.entry.js.map} +0 -0
  67. /package/dist/biggive/{p-15e42d9a.entry.js.map → p-89950399.entry.js.map} +0 -0
  68. /package/dist/biggive/{p-e87dac29.entry.js.map → p-9a6b2534.entry.js.map} +0 -0
  69. /package/dist/biggive/{p-2b7bde3a.entry.js.map → p-a02ae381.entry.js.map} +0 -0
  70. /package/dist/biggive/{p-874d954b.entry.js.map → p-a14dec9d.entry.js.map} +0 -0
  71. /package/dist/biggive/{p-9cf0778e.entry.js.map → p-b2c85e66.entry.js.map} +0 -0
  72. /package/dist/biggive/{p-56928b75.entry.js.map → p-be942b9a.entry.js.map} +0 -0
  73. /package/dist/biggive/{p-fb7284fa.entry.js.map → p-faa0dd62.entry.js.map} +0 -0
@@ -1,5 +1,4 @@
1
1
  const NAMESPACE = 'biggive';
2
- const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
3
2
 
4
3
  /**
5
4
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -928,14 +927,46 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
928
927
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
929
928
  {
930
929
  // we've got an old slot vnode and the wrapper is being replaced
931
- // so let's move the old slot content back to its original location
932
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
930
+ // so let's move the old slot content to the root of the element currently being rendered
931
+ relocateToHostRoot(oldParentVNode.$elm$);
933
932
  }
934
933
  }
935
934
  }
936
935
  }
937
936
  return elm;
938
937
  };
938
+ /**
939
+ * Relocates all child nodes of an element that were a part of a previous slot relocation
940
+ * to the root of the Stencil component currently being rendered. This happens when a parent
941
+ * element of a slot reference node dynamically changes and triggers a re-render. We cannot use
942
+ * `putBackInOriginalLocation()` because that may relocate nodes to elements that will not be re-rendered
943
+ * and so they will not be relocated again.
944
+ *
945
+ * @param parentElm The element potentially containing relocated nodes.
946
+ */
947
+ const relocateToHostRoot = (parentElm) => {
948
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
949
+ const host = parentElm.closest(hostTagName.toLowerCase());
950
+ if (host != null) {
951
+ for (const childNode of Array.from(parentElm.childNodes)) {
952
+ // Only relocate nodes that were slotted in
953
+ if (childNode['s-sh'] != null) {
954
+ host.insertBefore(childNode, null);
955
+ // Reset so we can correctly move the node around again.
956
+ childNode['s-sh'] = undefined;
957
+ // When putting an element node back in its original location,
958
+ // we need to reset the `slot` attribute back to the value it originally had
959
+ // so we can correctly relocate it again in the future
960
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */ && !!childNode['s-sn']) {
961
+ childNode.setAttribute('slot', childNode['s-sn']);
962
+ }
963
+ // Need to tell the render pipeline to check to relocate slot content again
964
+ checkSlotRelocate = true;
965
+ }
966
+ }
967
+ }
968
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
969
+ };
939
970
  const putBackInOriginalLocation = (parentElm, recursive) => {
940
971
  var _a;
941
972
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
@@ -1439,7 +1470,7 @@ const markSlotContentForRelocation = (elm) => {
1439
1470
  if (!node['s-cn'] &&
1440
1471
  !node['s-nr'] &&
1441
1472
  node['s-hn'] !== childNode['s-hn'] &&
1442
- (!BUILD.experimentalSlotFixes )) {
1473
+ (!node['s-sh'] || node['s-sh'] !== childNode['s-hn'])) {
1443
1474
  // if `node` is located in the slot that `childNode` refers to (via the
1444
1475
  // `'s-sn'` property) then we need to relocate it from it's current spot
1445
1476
  // (under the host element parent) to the right slot location
@@ -1548,7 +1579,7 @@ const nullifyVNodeRefs = (vNode) => {
1548
1579
  * @param isInitialLoad whether or not this is the first call after page load
1549
1580
  */
1550
1581
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1551
- var _a, _b, _c, _d;
1582
+ var _a, _b, _c, _d, _e;
1552
1583
  const hostElm = hostRef.$hostElement$;
1553
1584
  const cmpMeta = hostRef.$cmpMeta$;
1554
1585
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1630,7 +1661,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1630
1661
  // to make sure they get inserted into their new how in the same order they were declared in their original location.
1631
1662
  //
1632
1663
  // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1633
- {
1664
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* NODE_TYPE.ElementNode */)) {
1634
1665
  let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1635
1666
  while (orgLocationNode) {
1636
1667
  let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
@@ -1650,9 +1681,22 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1650
1681
  // since that the node to relocate
1651
1682
  // has a different next sibling or parent relocated
1652
1683
  if (nodeToRelocate !== insertBeforeNode) {
1653
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1654
- // probably a component in the index.html that doesn't have its hostname set
1655
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1684
+ // Handle a use-case where we relocate a slot where
1685
+ // the slot name changes along the way (for instance, a default to a named slot).
1686
+ // In this case, we need to update the relocated node's slot attribute to match
1687
+ // the slot name it is being relocated into.
1688
+ //
1689
+ // There is a very niche use case where we may be relocating a text node. For now,
1690
+ // we ignore anything that is not an element node since non-element nodes cannot have
1691
+ // attributes to specify the slot. We'll deal with this if it becomes a problem... but super edge-case-y
1692
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1693
+ slotRefNode['s-fs'] !== nodeToRelocate.getAttribute('slot')) {
1694
+ if (!slotRefNode['s-fs']) {
1695
+ nodeToRelocate.removeAttribute('slot');
1696
+ }
1697
+ else {
1698
+ nodeToRelocate.setAttribute('slot', slotRefNode['s-fs']);
1699
+ }
1656
1700
  }
1657
1701
  // Add it back to the dom but in its new home
1658
1702
  // If we get to this point and `insertBeforeNode` is `null`, that means
@@ -1691,6 +1735,21 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1691
1735
  // always reset
1692
1736
  relocateNodes.length = 0;
1693
1737
  }
1738
+ // Hide any elements that were projected through, but don't have a slot to go to.
1739
+ // Only an issue if there were no "slots" rendered. Otherwise, nodes are hidden correctly.
1740
+ // This _only_ happens for `scoped` components!
1741
+ if (cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
1742
+ for (const childNode of rootVnode.$elm$.childNodes) {
1743
+ if (childNode['s-hn'] !== hostTagName && !childNode['s-sh']) {
1744
+ // Store the initial value of `hidden` so we can reset it later when
1745
+ // moving nodes around.
1746
+ if (isInitialLoad && childNode['s-ih'] == null) {
1747
+ childNode['s-ih'] = (_e = childNode.hidden) !== null && _e !== void 0 ? _e : false;
1748
+ }
1749
+ childNode.hidden = true;
1750
+ }
1751
+ }
1752
+ }
1694
1753
  };
1695
1754
  const attachToAncestor = (hostRef, ancestorComponent) => {
1696
1755
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -2291,6 +2350,217 @@ const disconnectedCallback = async (elm) => {
2291
2350
  }
2292
2351
  }
2293
2352
  };
2353
+ const patchCloneNode = (HostElementPrototype) => {
2354
+ const orgCloneNode = HostElementPrototype.cloneNode;
2355
+ HostElementPrototype.cloneNode = function (deep) {
2356
+ const srcNode = this;
2357
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
2358
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
2359
+ if (!isShadowDom && deep) {
2360
+ let i = 0;
2361
+ let slotted, nonStencilNode;
2362
+ const stencilPrivates = [
2363
+ 's-id',
2364
+ 's-cr',
2365
+ 's-lr',
2366
+ 's-rc',
2367
+ 's-sc',
2368
+ 's-p',
2369
+ 's-cn',
2370
+ 's-sr',
2371
+ 's-sn',
2372
+ 's-hn',
2373
+ 's-ol',
2374
+ 's-nr',
2375
+ 's-si',
2376
+ ];
2377
+ for (; i < srcNode.childNodes.length; i++) {
2378
+ slotted = srcNode.childNodes[i]['s-nr'];
2379
+ nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
2380
+ if (slotted) {
2381
+ if (clonedNode.__appendChild) {
2382
+ clonedNode.__appendChild(slotted.cloneNode(true));
2383
+ }
2384
+ else {
2385
+ clonedNode.appendChild(slotted.cloneNode(true));
2386
+ }
2387
+ }
2388
+ if (nonStencilNode) {
2389
+ clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));
2390
+ }
2391
+ }
2392
+ }
2393
+ return clonedNode;
2394
+ };
2395
+ };
2396
+ /**
2397
+ * Patches the `appendChild` method on a `scoped` Stencil component.
2398
+ * The patch will attempt to find a slot with the same name as the node being appended
2399
+ * and insert it into the slot reference if found. Otherwise, it falls-back to the original
2400
+ * `appendChild` method.
2401
+ *
2402
+ * @param HostElementPrototype The Stencil component to be patched
2403
+ */
2404
+ const patchSlotAppendChild = (HostElementPrototype) => {
2405
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
2406
+ HostElementPrototype.appendChild = function (newChild) {
2407
+ const slotName = (newChild['s-sn'] = getSlotName(newChild));
2408
+ const slotNode = getHostSlotNode(this.childNodes, slotName);
2409
+ if (slotNode) {
2410
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2411
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2412
+ appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2413
+ // Check if there is fallback content that should be hidden
2414
+ updateFallbackSlotVisibility(this);
2415
+ return;
2416
+ }
2417
+ return this.__appendChild(newChild);
2418
+ };
2419
+ };
2420
+ /**
2421
+ * Patches the text content of an unnamed slotted node inside a scoped component
2422
+ * @param hostElementPrototype the `Element` to be patched
2423
+ */
2424
+ const patchTextContent = (hostElementPrototype) => {
2425
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
2426
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
2427
+ {
2428
+ // Patch `textContent` to mimic shadow root behavior
2429
+ Object.defineProperty(hostElementPrototype, 'textContent', {
2430
+ // To mimic shadow root behavior, we need to return the text content of all
2431
+ // nodes in a slot reference node
2432
+ get() {
2433
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2434
+ const textContent = slotRefNodes
2435
+ .map((node) => {
2436
+ var _a, _b;
2437
+ const text = [];
2438
+ // Need to get the text content of all nodes in the slot reference node
2439
+ let slotContent = node.nextSibling;
2440
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
2441
+ if (slotContent.nodeType === 3 /* NODE_TYPES.TEXT_NODE */ || slotContent.nodeType === 1 /* NODE_TYPES.ELEMENT_NODE */) {
2442
+ text.push((_b = (_a = slotContent.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '');
2443
+ }
2444
+ slotContent = slotContent.nextSibling;
2445
+ }
2446
+ return text.filter((ref) => ref !== '').join(' ');
2447
+ })
2448
+ .filter((text) => text !== '')
2449
+ .join(' ');
2450
+ // Pad the string to return
2451
+ return ' ' + textContent + ' ';
2452
+ },
2453
+ // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2454
+ // reference node. If a default slot reference node exists, the text content will be
2455
+ // placed there. Otherwise, the new text node will be hidden
2456
+ set(value) {
2457
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2458
+ slotRefNodes.forEach((node) => {
2459
+ // Remove the existing content of the slot
2460
+ let slotContent = node.nextSibling;
2461
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
2462
+ const tmp = slotContent;
2463
+ slotContent = slotContent.nextSibling;
2464
+ tmp.remove();
2465
+ }
2466
+ // If this is a default slot, add the text node in the slot location.
2467
+ // Otherwise, destroy the slot reference node
2468
+ if (node['s-sn'] === '') {
2469
+ const textNode = this.ownerDocument.createTextNode(value);
2470
+ textNode['s-sn'] = '';
2471
+ node.parentElement.insertBefore(textNode, node.nextSibling);
2472
+ }
2473
+ else {
2474
+ node.remove();
2475
+ }
2476
+ });
2477
+ },
2478
+ });
2479
+ }
2480
+ };
2481
+ const patchChildSlotNodes = (elm, cmpMeta) => {
2482
+ class FakeNodeList extends Array {
2483
+ item(n) {
2484
+ return this[n];
2485
+ }
2486
+ }
2487
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2488
+ if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
2489
+ const childNodesFn = elm.__lookupGetter__('childNodes');
2490
+ Object.defineProperty(elm, 'children', {
2491
+ get() {
2492
+ return this.childNodes.map((n) => n.nodeType === 1);
2493
+ },
2494
+ });
2495
+ Object.defineProperty(elm, 'childElementCount', {
2496
+ get() {
2497
+ return elm.children.length;
2498
+ },
2499
+ });
2500
+ Object.defineProperty(elm, 'childNodes', {
2501
+ get() {
2502
+ const childNodes = childNodesFn.call(this);
2503
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&
2504
+ getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {
2505
+ const result = new FakeNodeList();
2506
+ for (let i = 0; i < childNodes.length; i++) {
2507
+ const slot = childNodes[i]['s-nr'];
2508
+ if (slot) {
2509
+ result.push(slot);
2510
+ }
2511
+ }
2512
+ return result;
2513
+ }
2514
+ return FakeNodeList.from(childNodes);
2515
+ },
2516
+ });
2517
+ }
2518
+ };
2519
+ /**
2520
+ * Recursively finds all slot reference nodes ('s-sr') in a series of child nodes.
2521
+ *
2522
+ * @param childNodes The set of child nodes to search for slot reference nodes.
2523
+ * @returns An array of slot reference nodes.
2524
+ */
2525
+ const getAllChildSlotNodes = (childNodes) => {
2526
+ const slotRefNodes = [];
2527
+ for (const childNode of Array.from(childNodes)) {
2528
+ if (childNode['s-sr']) {
2529
+ slotRefNodes.push(childNode);
2530
+ }
2531
+ slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2532
+ }
2533
+ return slotRefNodes;
2534
+ };
2535
+ const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
2536
+ /**
2537
+ * Recursively searches a series of child nodes for a slot with the provided name.
2538
+ * @param childNodes the nodes to search for a slot with a specific name.
2539
+ * @param slotName the name of the slot to match on.
2540
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
2541
+ */
2542
+ const getHostSlotNode = (childNodes, slotName) => {
2543
+ let i = 0;
2544
+ let childNode;
2545
+ for (; i < childNodes.length; i++) {
2546
+ childNode = childNodes[i];
2547
+ if (childNode['s-sr'] && childNode['s-sn'] === slotName) {
2548
+ return childNode;
2549
+ }
2550
+ childNode = getHostSlotNode(childNode.childNodes, slotName);
2551
+ if (childNode) {
2552
+ return childNode;
2553
+ }
2554
+ }
2555
+ return null;
2556
+ };
2557
+ const getHostSlotChildNodes = (n, slotName) => {
2558
+ const childNodes = [n];
2559
+ while ((n = n.nextSibling) && n['s-sn'] === slotName) {
2560
+ childNodes.push(n);
2561
+ }
2562
+ return childNodes;
2563
+ };
2294
2564
  const bootstrapLazy = (lazyBundles, options = {}) => {
2295
2565
  var _a;
2296
2566
  const endBootstrap = createTime();
@@ -2374,6 +2644,21 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2374
2644
  return getHostRef(this).$onReadyPromise$;
2375
2645
  }
2376
2646
  };
2647
+ // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check
2648
+ {
2649
+ {
2650
+ patchChildSlotNodes(HostElement.prototype, cmpMeta);
2651
+ }
2652
+ {
2653
+ patchCloneNode(HostElement.prototype);
2654
+ }
2655
+ {
2656
+ patchSlotAppendChild(HostElement.prototype);
2657
+ }
2658
+ if (cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
2659
+ patchTextContent(HostElement.prototype);
2660
+ }
2661
+ }
2377
2662
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
2378
2663
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2379
2664
  cmpTags.push(tagName);
@@ -2495,6 +2780,8 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2495
2780
  const styles = /*@__PURE__*/ new Map();
2496
2781
  const win = typeof window !== 'undefined' ? window : {};
2497
2782
  const doc = win.document || { head: {} };
2783
+ const H = (win.HTMLElement || class {
2784
+ });
2498
2785
  const plt = {
2499
2786
  $flags$: 0,
2500
2787
  $resourcesUrl$: '',
@@ -2560,6 +2847,6 @@ const flush = () => {
2560
2847
  const nextTick = (cb) => promiseResolve().then(cb);
2561
2848
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2562
2849
 
2563
- export { Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2850
+ export { H, getAssetPath as a, bootstrapLazy as b, createEvent as c, Host as d, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2564
2851
 
2565
- //# sourceMappingURL=index-3ced6448.js.map
2852
+ //# sourceMappingURL=index-3eee9238.js.map