@stencil/core 4.35.3-dev.1752123834.56fe6e3 → 4.35.3-dev.1752161791.11e6f9d

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.
@@ -638,7 +638,7 @@ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") ||
638
638
  var import_app_data18 = require("@stencil/core/internal/app-data");
639
639
 
640
640
  // src/runtime/client-hydrate.ts
641
- var import_app_data7 = require("@stencil/core/internal/app-data");
641
+ var import_app_data6 = require("@stencil/core/internal/app-data");
642
642
 
643
643
  // src/runtime/dom-extras.ts
644
644
  var import_app_data3 = require("@stencil/core/internal/app-data");
@@ -1272,133 +1272,8 @@ var installDevTools = () => {
1272
1272
  }
1273
1273
  };
1274
1274
 
1275
- // src/runtime/styles.ts
1276
- var import_app_data5 = require("@stencil/core/internal/app-data");
1277
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1278
- var registerStyle = (scopeId2, cssText, allowCS) => {
1279
- let style = styles.get(scopeId2);
1280
- if (supportsConstructableStylesheets && allowCS) {
1281
- style = style || new CSSStyleSheet();
1282
- if (typeof style === "string") {
1283
- style = cssText;
1284
- } else {
1285
- style.replaceSync(cssText);
1286
- }
1287
- } else {
1288
- style = cssText;
1289
- }
1290
- styles.set(scopeId2, style);
1291
- };
1292
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
1293
- var _a;
1294
- const scopeId2 = getScopeId(cmpMeta, mode);
1295
- const style = styles.get(scopeId2);
1296
- if (!import_app_data5.BUILD.attachStyles || !win.document) {
1297
- return scopeId2;
1298
- }
1299
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
1300
- if (style) {
1301
- if (typeof style === "string") {
1302
- styleContainerNode = styleContainerNode.head || styleContainerNode;
1303
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1304
- let styleElm;
1305
- if (!appliedStyles) {
1306
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1307
- }
1308
- if (!appliedStyles.has(scopeId2)) {
1309
- if (import_app_data5.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1310
- styleElm.innerHTML = style;
1311
- } else {
1312
- styleElm = win.document.createElement("style");
1313
- styleElm.innerHTML = style;
1314
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1315
- if (nonce != null) {
1316
- styleElm.setAttribute("nonce", nonce);
1317
- }
1318
- if ((import_app_data5.BUILD.hydrateServerSide || import_app_data5.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
1319
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1320
- }
1321
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1322
- if (styleContainerNode.nodeName === "HEAD") {
1323
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1324
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1325
- styleContainerNode.insertBefore(
1326
- styleElm,
1327
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1328
- );
1329
- } else if ("host" in styleContainerNode) {
1330
- if (supportsConstructableStylesheets) {
1331
- const stylesheet = new CSSStyleSheet();
1332
- stylesheet.replaceSync(style);
1333
- if (supportsMutableAdoptedStyleSheets) {
1334
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
1335
- } else {
1336
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1337
- }
1338
- } else {
1339
- const existingStyleContainer = styleContainerNode.querySelector("style");
1340
- if (existingStyleContainer) {
1341
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1342
- } else {
1343
- styleContainerNode.prepend(styleElm);
1344
- }
1345
- }
1346
- } else {
1347
- styleContainerNode.append(styleElm);
1348
- }
1349
- }
1350
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1351
- styleContainerNode.insertBefore(styleElm, null);
1352
- }
1353
- }
1354
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1355
- styleElm.innerHTML += SLOT_FB_CSS;
1356
- }
1357
- if (appliedStyles) {
1358
- appliedStyles.add(scopeId2);
1359
- }
1360
- }
1361
- } else if (import_app_data5.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1362
- if (supportsMutableAdoptedStyleSheets) {
1363
- styleContainerNode.adoptedStyleSheets.push(style);
1364
- } else {
1365
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1366
- }
1367
- }
1368
- }
1369
- return scopeId2;
1370
- };
1371
- var attachStyles = (hostRef) => {
1372
- const cmpMeta = hostRef.$cmpMeta$;
1373
- const elm = hostRef.$hostElement$;
1374
- const flags = cmpMeta.$flags$;
1375
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1376
- const scopeId2 = addStyle(
1377
- import_app_data5.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1378
- cmpMeta,
1379
- hostRef.$modeName$
1380
- );
1381
- if ((import_app_data5.BUILD.shadowDom || import_app_data5.BUILD.scoped) && import_app_data5.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
1382
- elm["s-sc"] = scopeId2;
1383
- elm.classList.add(scopeId2 + "-h");
1384
- }
1385
- endAttachStyles();
1386
- };
1387
- var getScopeId = (cmp, mode) => "sc-" + (import_app_data5.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1388
- var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1389
- var hydrateScopedToShadow = () => {
1390
- if (!win.document) {
1391
- return;
1392
- }
1393
- const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1394
- let i2 = 0;
1395
- for (; i2 < styles2.length; i2++) {
1396
- registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1397
- }
1398
- };
1399
-
1400
1275
  // src/runtime/vdom/h.ts
1401
- var import_app_data6 = require("@stencil/core/internal/app-data");
1276
+ var import_app_data5 = require("@stencil/core/internal/app-data");
1402
1277
  var h = (nodeName, vnodeData, ...children) => {
1403
1278
  let child = null;
1404
1279
  let key = null;
@@ -1414,7 +1289,7 @@ var h = (nodeName, vnodeData, ...children) => {
1414
1289
  } else if (child != null && typeof child !== "boolean") {
1415
1290
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
1416
1291
  child = String(child);
1417
- } else if (import_app_data6.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1292
+ } else if (import_app_data5.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1418
1293
  consoleDevError(`vNode passed as children has unexpected type.
1419
1294
  Make sure it's using the correct h() function.
1420
1295
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -1430,28 +1305,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1430
1305
  };
1431
1306
  walk(children);
1432
1307
  if (vnodeData) {
1433
- if (import_app_data6.BUILD.isDev && nodeName === "input") {
1308
+ if (import_app_data5.BUILD.isDev && nodeName === "input") {
1434
1309
  validateInputProperties(vnodeData);
1435
1310
  }
1436
- if (import_app_data6.BUILD.vdomKey && vnodeData.key) {
1311
+ if (import_app_data5.BUILD.vdomKey && vnodeData.key) {
1437
1312
  key = vnodeData.key;
1438
1313
  }
1439
- if (import_app_data6.BUILD.slotRelocation && vnodeData.name) {
1314
+ if (import_app_data5.BUILD.slotRelocation && vnodeData.name) {
1440
1315
  slotName = vnodeData.name;
1441
1316
  }
1442
- if (import_app_data6.BUILD.vdomClass) {
1317
+ if (import_app_data5.BUILD.vdomClass) {
1443
1318
  const classData = vnodeData.className || vnodeData.class;
1444
1319
  if (classData) {
1445
1320
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
1446
1321
  }
1447
1322
  }
1448
1323
  }
1449
- if (import_app_data6.BUILD.isDev && vNodeChildren.some(isHost)) {
1324
+ if (import_app_data5.BUILD.isDev && vNodeChildren.some(isHost)) {
1450
1325
  consoleDevError(`The <Host> must be the single root component. Make sure:
1451
1326
  - You are NOT using hostData() and <Host> in the same component.
1452
1327
  - <Host> is used once, and it's the single root component of the render() function.`);
1453
1328
  }
1454
- if (import_app_data6.BUILD.vdomFunctional && typeof nodeName === "function") {
1329
+ if (import_app_data5.BUILD.vdomFunctional && typeof nodeName === "function") {
1455
1330
  return nodeName(
1456
1331
  vnodeData === null ? {} : vnodeData,
1457
1332
  vNodeChildren,
@@ -1463,10 +1338,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1463
1338
  if (vNodeChildren.length > 0) {
1464
1339
  vnode.$children$ = vNodeChildren;
1465
1340
  }
1466
- if (import_app_data6.BUILD.vdomKey) {
1341
+ if (import_app_data5.BUILD.vdomKey) {
1467
1342
  vnode.$key$ = key;
1468
1343
  }
1469
- if (import_app_data6.BUILD.slotRelocation) {
1344
+ if (import_app_data5.BUILD.slotRelocation) {
1470
1345
  vnode.$name$ = slotName;
1471
1346
  }
1472
1347
  return vnode;
@@ -1479,13 +1354,13 @@ var newVNode = (tag, text) => {
1479
1354
  $elm$: null,
1480
1355
  $children$: null
1481
1356
  };
1482
- if (import_app_data6.BUILD.vdomAttribute) {
1357
+ if (import_app_data5.BUILD.vdomAttribute) {
1483
1358
  vnode.$attrs$ = null;
1484
1359
  }
1485
- if (import_app_data6.BUILD.vdomKey) {
1360
+ if (import_app_data5.BUILD.vdomKey) {
1486
1361
  vnode.$key$ = null;
1487
1362
  }
1488
- if (import_app_data6.BUILD.slotRelocation) {
1363
+ if (import_app_data5.BUILD.slotRelocation) {
1489
1364
  vnode.$name$ = null;
1490
1365
  }
1491
1366
  return vnode;
@@ -1539,18 +1414,18 @@ var validateInputProperties = (inputElm) => {
1539
1414
 
1540
1415
  // src/runtime/client-hydrate.ts
1541
1416
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1542
- var _a, _b;
1417
+ var _a;
1543
1418
  const endHydrate = createTime("hydrateClient", tagName);
1544
1419
  const shadowRoot = hostElm.shadowRoot;
1545
1420
  const childRenderNodes = [];
1546
1421
  const slotNodes = [];
1547
1422
  const slottedNodes = [];
1548
- const shadowRootNodes = import_app_data7.BUILD.shadowDom && shadowRoot ? [] : null;
1423
+ const shadowRootNodes = import_app_data6.BUILD.shadowDom && shadowRoot ? [] : null;
1549
1424
  const vnode = newVNode(tagName, null);
1550
1425
  vnode.$elm$ = hostElm;
1551
1426
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1552
1427
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1553
- var _a2, _b2;
1428
+ var _a2, _b;
1554
1429
  if (!(memberFlags & 31 /* Prop */)) {
1555
1430
  return;
1556
1431
  }
@@ -1560,13 +1435,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1560
1435
  const attrPropVal = parsePropertyValue(
1561
1436
  attrVal,
1562
1437
  memberFlags,
1563
- import_app_data7.BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1438
+ import_app_data6.BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1564
1439
  );
1565
- (_b2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b2.set(memberName, attrPropVal);
1440
+ (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
1566
1441
  }
1567
1442
  });
1568
1443
  let scopeId2;
1569
- if (import_app_data7.BUILD.scoped) {
1444
+ if (import_app_data6.BUILD.scoped) {
1570
1445
  const cmpMeta = hostRef.$cmpMeta$;
1571
1446
  if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1572
1447
  scopeId2 = hostElm["s-sc"];
@@ -1603,16 +1478,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1603
1478
  if (childRenderNode.$tag$ === "slot") {
1604
1479
  node["s-cr"] = hostElm["s-cr"];
1605
1480
  }
1606
- } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1607
- const cmpMeta = getHostRef(childRenderNode.$elm$);
1608
- const scopeId3 = getScopeId(
1609
- cmpMeta.$cmpMeta$,
1610
- import_app_data7.BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1611
- );
1612
- const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1613
- if (styleSheet) {
1614
- hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1615
- }
1616
1481
  }
1617
1482
  if (childRenderNode.$tag$ === "slot") {
1618
1483
  childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
@@ -1628,7 +1493,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1628
1493
  }
1629
1494
  }
1630
1495
  if (orgLocationNode && orgLocationNode.isConnected) {
1631
- if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
1496
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1632
1497
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1633
1498
  }
1634
1499
  orgLocationNode.parentNode.removeChild(orgLocationNode);
@@ -1636,9 +1501,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1636
1501
  node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1637
1502
  }
1638
1503
  }
1639
- if (orgLocationNode && !orgLocationNode["s-id"]) {
1640
- plt.$orgLocNodes$.delete(orgLocationId);
1641
- }
1504
+ plt.$orgLocNodes$.delete(orgLocationId);
1642
1505
  }
1643
1506
  const hosts = [];
1644
1507
  const snLen = slottedNodes.length;
@@ -1660,16 +1523,14 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1660
1523
  if (!hosts[slottedItem.hostId]) continue;
1661
1524
  const hostEle = hosts[slottedItem.hostId];
1662
1525
  if (!hostEle.shadowRoot || !shadowRoot) {
1663
- if (!slottedItem.slot["s-cr"]) {
1664
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
1665
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1666
- slottedItem.slot["s-cr"] = hostEle;
1667
- } else {
1668
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1669
- }
1526
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1527
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1528
+ slottedItem.slot["s-cr"] = hostEle;
1529
+ } else {
1530
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1670
1531
  }
1671
1532
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1672
- if (import_app_data7.BUILD.experimentalSlotFixes) {
1533
+ if (import_app_data6.BUILD.experimentalSlotFixes) {
1673
1534
  patchSlottedNode(slottedItem.node);
1674
1535
  }
1675
1536
  }
@@ -1678,12 +1539,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1678
1539
  }
1679
1540
  }
1680
1541
  }
1681
- if (import_app_data7.BUILD.scoped && scopeId2 && slotNodes.length) {
1542
+ if (import_app_data6.BUILD.scoped && scopeId2 && slotNodes.length) {
1682
1543
  slotNodes.forEach((slot) => {
1683
1544
  slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1684
1545
  });
1685
1546
  }
1686
- if (import_app_data7.BUILD.shadowDom && shadowRoot) {
1547
+ if (import_app_data6.BUILD.shadowDom && shadowRoot && !shadowRoot.childNodes.length) {
1687
1548
  let rnIdex = 0;
1688
1549
  const rnLen = shadowRootNodes.length;
1689
1550
  if (rnLen) {
@@ -1694,13 +1555,14 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1694
1555
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
1695
1556
  if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1696
1557
  node.removeAttribute("hidden");
1697
- } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1558
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1698
1559
  node.parentNode.removeChild(node);
1699
1560
  }
1700
1561
  }
1701
1562
  });
1702
1563
  }
1703
1564
  }
1565
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1704
1566
  hostRef.$hostElement$ = hostElm;
1705
1567
  endHydrate();
1706
1568
  };
@@ -1732,7 +1594,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1732
1594
  if (!parentVNode.$children$) {
1733
1595
  parentVNode.$children$ = [];
1734
1596
  }
1735
- if (import_app_data7.BUILD.scoped && scopeId2 && childIdSplt[0] === hostId) {
1597
+ if (import_app_data6.BUILD.scoped && scopeId2) {
1736
1598
  node["s-si"] = scopeId2;
1737
1599
  childVNode.$attrs$.class += " " + scopeId2;
1738
1600
  }
@@ -1750,7 +1612,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1750
1612
  shadowRootNodes,
1751
1613
  slottedNodes
1752
1614
  );
1753
- if (import_app_data7.BUILD.scoped && scopeId2) {
1615
+ if (import_app_data6.BUILD.scoped && scopeId2) {
1754
1616
  node.classList.add(scopeId2);
1755
1617
  }
1756
1618
  }
@@ -1847,9 +1709,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1847
1709
  slottedNodes
1848
1710
  );
1849
1711
  } else if (childNodeType === CONTENT_REF_ID) {
1850
- if (import_app_data7.BUILD.shadowDom && shadowRootNodes) {
1712
+ if (import_app_data6.BUILD.shadowDom && shadowRootNodes) {
1851
1713
  node.remove();
1852
- } else if (import_app_data7.BUILD.slotRelocation) {
1714
+ } else if (import_app_data6.BUILD.slotRelocation) {
1853
1715
  hostElm["s-cr"] = node;
1854
1716
  node["s-cn"] = true;
1855
1717
  }
@@ -1862,7 +1724,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1862
1724
  vnode.$index$ = "0";
1863
1725
  parentVNode.$children$ = [vnode];
1864
1726
  } else {
1865
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
1727
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1866
1728
  node.remove();
1867
1729
  }
1868
1730
  }
@@ -1915,15 +1777,15 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1915
1777
  childVNode.$name$ = slotName || null;
1916
1778
  childVNode.$tag$ = "slot";
1917
1779
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1918
- if (import_app_data7.BUILD.shadowDom && shadowRootNodes && win.document) {
1780
+ if (import_app_data6.BUILD.shadowDom && shadowRootNodes && win.document) {
1919
1781
  const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1920
1782
  if (childVNode.$name$) {
1921
1783
  childVNode.$elm$.setAttribute("name", slotName);
1922
1784
  }
1923
- if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1924
- internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1785
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1786
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1925
1787
  } else {
1926
- internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1788
+ node.parentNode.insertBefore(slot, node);
1927
1789
  }
1928
1790
  addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1929
1791
  node.remove();
@@ -1949,7 +1811,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1949
1811
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1950
1812
  let slottedNode = slotNode.nextSibling;
1951
1813
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1952
- while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */ || slottedNode.tagName === "SLOT"))) {
1814
+ while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
1953
1815
  slottedNode["s-sn"] = slotName;
1954
1816
  slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1955
1817
  slottedNode = slottedNode.nextSibling;
@@ -2384,31 +2246,31 @@ var import_app_data16 = require("@stencil/core/internal/app-data");
2384
2246
  var import_app_data15 = require("@stencil/core/internal/app-data");
2385
2247
 
2386
2248
  // src/runtime/parse-property-value.ts
2387
- var import_app_data8 = require("@stencil/core/internal/app-data");
2249
+ var import_app_data7 = require("@stencil/core/internal/app-data");
2388
2250
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2389
- if ((import_app_data8.BUILD.hydrateClientSide || import_app_data8.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2251
+ if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2390
2252
  try {
2391
2253
  propValue = JSON.parse(propValue);
2392
2254
  return propValue;
2393
2255
  } catch (e) {
2394
2256
  }
2395
2257
  }
2396
- if ((import_app_data8.BUILD.hydrateClientSide || import_app_data8.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2258
+ if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2397
2259
  propValue = deserializeProperty(propValue);
2398
2260
  return propValue;
2399
2261
  }
2400
2262
  if (propValue != null && !isComplexType(propValue)) {
2401
- if (import_app_data8.BUILD.propBoolean && propType & 4 /* Boolean */) {
2402
- if (import_app_data8.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
2263
+ if (import_app_data7.BUILD.propBoolean && propType & 4 /* Boolean */) {
2264
+ if (import_app_data7.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
2403
2265
  return propValue === "" || !!propValue;
2404
2266
  } else {
2405
2267
  return propValue === "false" ? false : propValue === "" || !!propValue;
2406
2268
  }
2407
2269
  }
2408
- if (import_app_data8.BUILD.propNumber && propType & 2 /* Number */) {
2270
+ if (import_app_data7.BUILD.propNumber && propType & 2 /* Number */) {
2409
2271
  return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2410
2272
  }
2411
- if (import_app_data8.BUILD.propString && propType & 1 /* String */) {
2273
+ if (import_app_data7.BUILD.propString && propType & 1 /* String */) {
2412
2274
  return String(propValue);
2413
2275
  }
2414
2276
  return propValue;
@@ -2420,18 +2282,18 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2420
2282
  var import_app_data14 = require("@stencil/core/internal/app-data");
2421
2283
 
2422
2284
  // src/runtime/event-emitter.ts
2423
- var import_app_data10 = require("@stencil/core/internal/app-data");
2285
+ var import_app_data9 = require("@stencil/core/internal/app-data");
2424
2286
 
2425
2287
  // src/runtime/element.ts
2426
- var import_app_data9 = require("@stencil/core/internal/app-data");
2427
- var getElement = (ref) => import_app_data9.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2288
+ var import_app_data8 = require("@stencil/core/internal/app-data");
2289
+ var getElement = (ref) => import_app_data8.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2428
2290
 
2429
2291
  // src/runtime/event-emitter.ts
2430
2292
  var createEvent = (ref, name, flags) => {
2431
2293
  const elm = getElement(ref);
2432
2294
  return {
2433
2295
  emit: (detail) => {
2434
- if (import_app_data10.BUILD.isDev && !elm.isConnected) {
2296
+ if (import_app_data9.BUILD.isDev && !elm.isConnected) {
2435
2297
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2436
2298
  }
2437
2299
  return emitEvent(elm, name, {
@@ -2449,6 +2311,131 @@ var emitEvent = (elm, name, opts) => {
2449
2311
  return ev;
2450
2312
  };
2451
2313
 
2314
+ // src/runtime/styles.ts
2315
+ var import_app_data10 = require("@stencil/core/internal/app-data");
2316
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2317
+ var registerStyle = (scopeId2, cssText, allowCS) => {
2318
+ let style = styles.get(scopeId2);
2319
+ if (supportsConstructableStylesheets && allowCS) {
2320
+ style = style || new CSSStyleSheet();
2321
+ if (typeof style === "string") {
2322
+ style = cssText;
2323
+ } else {
2324
+ style.replaceSync(cssText);
2325
+ }
2326
+ } else {
2327
+ style = cssText;
2328
+ }
2329
+ styles.set(scopeId2, style);
2330
+ };
2331
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2332
+ var _a;
2333
+ const scopeId2 = getScopeId(cmpMeta, mode);
2334
+ const style = styles.get(scopeId2);
2335
+ if (!import_app_data10.BUILD.attachStyles || !win.document) {
2336
+ return scopeId2;
2337
+ }
2338
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
2339
+ if (style) {
2340
+ if (typeof style === "string") {
2341
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
2342
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2343
+ let styleElm;
2344
+ if (!appliedStyles) {
2345
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2346
+ }
2347
+ if (!appliedStyles.has(scopeId2)) {
2348
+ if (import_app_data10.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2349
+ styleElm.innerHTML = style;
2350
+ } else {
2351
+ styleElm = win.document.createElement("style");
2352
+ styleElm.innerHTML = style;
2353
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2354
+ if (nonce != null) {
2355
+ styleElm.setAttribute("nonce", nonce);
2356
+ }
2357
+ if ((import_app_data10.BUILD.hydrateServerSide || import_app_data10.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
2358
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2359
+ }
2360
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2361
+ if (styleContainerNode.nodeName === "HEAD") {
2362
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2363
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2364
+ styleContainerNode.insertBefore(
2365
+ styleElm,
2366
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2367
+ );
2368
+ } else if ("host" in styleContainerNode) {
2369
+ if (supportsConstructableStylesheets) {
2370
+ const stylesheet = new CSSStyleSheet();
2371
+ stylesheet.replaceSync(style);
2372
+ if (supportsMutableAdoptedStyleSheets) {
2373
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
2374
+ } else {
2375
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2376
+ }
2377
+ } else {
2378
+ const existingStyleContainer = styleContainerNode.querySelector("style");
2379
+ if (existingStyleContainer) {
2380
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2381
+ } else {
2382
+ styleContainerNode.prepend(styleElm);
2383
+ }
2384
+ }
2385
+ } else {
2386
+ styleContainerNode.append(styleElm);
2387
+ }
2388
+ }
2389
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2390
+ styleContainerNode.insertBefore(styleElm, null);
2391
+ }
2392
+ }
2393
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2394
+ styleElm.innerHTML += SLOT_FB_CSS;
2395
+ }
2396
+ if (appliedStyles) {
2397
+ appliedStyles.add(scopeId2);
2398
+ }
2399
+ }
2400
+ } else if (import_app_data10.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2401
+ if (supportsMutableAdoptedStyleSheets) {
2402
+ styleContainerNode.adoptedStyleSheets.push(style);
2403
+ } else {
2404
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2405
+ }
2406
+ }
2407
+ }
2408
+ return scopeId2;
2409
+ };
2410
+ var attachStyles = (hostRef) => {
2411
+ const cmpMeta = hostRef.$cmpMeta$;
2412
+ const elm = hostRef.$hostElement$;
2413
+ const flags = cmpMeta.$flags$;
2414
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2415
+ const scopeId2 = addStyle(
2416
+ import_app_data10.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2417
+ cmpMeta,
2418
+ hostRef.$modeName$
2419
+ );
2420
+ if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && import_app_data10.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
2421
+ elm["s-sc"] = scopeId2;
2422
+ elm.classList.add(scopeId2 + "-h");
2423
+ }
2424
+ endAttachStyles();
2425
+ };
2426
+ var getScopeId = (cmp, mode) => "sc-" + (import_app_data10.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2427
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
2428
+ var hydrateScopedToShadow = () => {
2429
+ if (!win.document) {
2430
+ return;
2431
+ }
2432
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2433
+ let i2 = 0;
2434
+ for (; i2 < styles2.length; i2++) {
2435
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2436
+ }
2437
+ };
2438
+
2452
2439
  // src/runtime/vdom/vdom-render.ts
2453
2440
  var import_app_data13 = require("@stencil/core/internal/app-data");
2454
2441
 
@@ -2467,13 +2454,12 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
2467
2454
  const classList = elm.classList;
2468
2455
  const oldClasses = parseClassList(oldValue);
2469
2456
  let newClasses = parseClassList(newValue);
2470
- if (import_app_data11.BUILD.hydrateClientSide && (elm["s-si"] || elm["s-sc"]) && initialRender) {
2471
- const scopeId2 = elm["s-sc"] || elm["s-si"];
2472
- newClasses.push(scopeId2);
2457
+ if (import_app_data11.BUILD.hydrateClientSide && elm["s-si"] && initialRender) {
2458
+ newClasses.push(elm["s-si"]);
2473
2459
  oldClasses.forEach((c) => {
2474
- if (c.startsWith(scopeId2)) newClasses.push(c);
2460
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
2475
2461
  });
2476
- newClasses = [...new Set(newClasses)].filter((c) => c);
2462
+ newClasses = [...new Set(newClasses)];
2477
2463
  classList.add(...newClasses);
2478
2464
  } else {
2479
2465
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
@@ -3424,16 +3410,10 @@ var forceUpdate = (ref) => {
3424
3410
  return false;
3425
3411
  };
3426
3412
  var appDidLoad = (who) => {
3427
- var _a;
3428
3413
  if (import_app_data14.BUILD.asyncQueue) {
3429
3414
  plt.$flags$ |= 2 /* appLoaded */;
3430
3415
  }
3431
3416
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: import_app_data14.NAMESPACE } }));
3432
- if (import_app_data14.BUILD.hydrateClientSide) {
3433
- if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
3434
- plt.$orgLocNodes$.clear();
3435
- }
3436
- }
3437
3417
  if (import_app_data14.BUILD.profile && performance.measure) {
3438
3418
  performance.measure(`[Stencil] ${import_app_data14.NAMESPACE} initial load (by ${who})`, "st:app:start");
3439
3419
  }
@@ -3865,11 +3845,6 @@ var connectedCallback = (elm) => {
3865
3845
  if (import_app_data18.BUILD.hydrateServerSide || (import_app_data18.BUILD.slot || import_app_data18.BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3866
3846
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
3867
3847
  setContentReference(elm);
3868
- } else if (import_app_data18.BUILD.hydrateClientSide && !(cmpMeta.$flags$ & 4 /* hasSlotRelocation */)) {
3869
- const commendPlaceholder = elm.firstChild;
3870
- if ((commendPlaceholder == null ? void 0 : commendPlaceholder.nodeType) === 8 /* CommentNode */ && !commendPlaceholder["s-cn"] && !commendPlaceholder.nodeValue) {
3871
- elm.removeChild(commendPlaceholder);
3872
- }
3873
3848
  }
3874
3849
  }
3875
3850
  if (import_app_data18.BUILD.asyncLoading) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.35.3-dev.1752123834.56fe6e3",
3
+ "version": "4.35.3-dev.1752161791.11e6f9d",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.35.3-dev.1752123834.56fe6e3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.35.3-dev.1752161791.11e6f9d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;