@biggive/components 202412181555.0.0 → 202412311320.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.
- package/dist/biggive/biggive.esm.js +1 -1
- package/dist/biggive/biggive.esm.js.map +1 -1
- package/dist/biggive/{p-bdf27c6e.entry.js → p-0eda1345.entry.js} +2 -2
- package/dist/biggive/{p-8f87813f.entry.js → p-16da1da1.entry.js} +2 -2
- package/dist/biggive/{p-ff386daf.entry.js → p-2eb2b970.entry.js} +2 -2
- package/dist/biggive/{p-c9dca099.entry.js → p-5262507c.entry.js} +2 -2
- package/dist/biggive/{p-294ca479.entry.js → p-6a812c8a.entry.js} +2 -2
- package/dist/biggive/p-753c50c5.js +3 -0
- package/dist/biggive/p-753c50c5.js.map +1 -0
- package/dist/biggive/{p-e3517299.entry.js → p-87562be2.entry.js} +2 -2
- package/dist/biggive/{p-1605c6ed.entry.js → p-b1d82c2f.entry.js} +2 -2
- package/dist/biggive/{p-8a90290c.entry.js → p-bfaa8a6d.entry.js} +2 -2
- package/dist/biggive/{p-a6b12da2.entry.js → p-cf7446f9.entry.js} +2 -2
- package/dist/biggive/{p-748e33b0.entry.js → p-e3b4412e.entry.js} +2 -2
- package/dist/biggive/{p-e0832635.entry.js → p-ea8d01ca.entry.js} +2 -2
- package/dist/biggive/{p-963a065a.entry.js → p-f0bb3912.entry.js} +2 -2
- package/dist/biggive/{p-10c21815.entry.js → p-f3246097.entry.js} +2 -2
- package/dist/biggive/p-f6b8aae2.entry.js +2 -0
- package/dist/cjs/biggive-accordion_40.cjs.entry.js +1 -1
- package/dist/cjs/biggive-basic-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-beneficiary-icon.cjs.entry.js +1 -1
- package/dist/cjs/biggive-boxed-content.cjs.entry.js +1 -1
- package/dist/cjs/biggive-category-icon.cjs.entry.js +1 -1
- package/dist/cjs/biggive-container-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
- package/dist/cjs/biggive-form.cjs.entry.js +1 -1
- package/dist/cjs/biggive-icon-group.cjs.entry.js +1 -1
- package/dist/cjs/biggive-image-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
- package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/biggive-table.cjs.entry.js +1 -1
- package/dist/cjs/biggive-video.cjs.entry.js +1 -1
- package/dist/cjs/biggive.cjs.js +2 -2
- package/dist/cjs/biggive.cjs.js.map +1 -1
- package/dist/cjs/{index-6a8f5d99.js → index-c0a19159.js} +789 -544
- package/dist/cjs/index-c0a19159.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/biggive-accordion/biggive-accordion.js +6 -0
- package/dist/collection/components/biggive-accordion/biggive-accordion.js.map +1 -1
- package/dist/collection/components/biggive-accordion-entry/biggive-accordion-entry.js +2 -0
- package/dist/collection/components/biggive-accordion-entry/biggive-accordion-entry.js.map +1 -1
- package/dist/collection/components/biggive-article-card/biggive-article-card.js +44 -0
- package/dist/collection/components/biggive-article-card/biggive-article-card.js.map +1 -1
- package/dist/collection/components/biggive-basic-card/biggive-basic-card.js +42 -0
- package/dist/collection/components/biggive-basic-card/biggive-basic-card.js.map +1 -1
- package/dist/collection/components/biggive-beneficiary-icon/biggive-beneficiary-icon.js +10 -0
- package/dist/collection/components/biggive-beneficiary-icon/biggive-beneficiary-icon.js.map +1 -1
- package/dist/collection/components/biggive-biography-card/biggive-biography-card.js +28 -0
- package/dist/collection/components/biggive-biography-card/biggive-biography-card.js.map +1 -1
- package/dist/collection/components/biggive-boxed-content/biggive-boxed-content.js +10 -0
- package/dist/collection/components/biggive-boxed-content/biggive-boxed-content.js.map +1 -1
- package/dist/collection/components/biggive-branded-image/biggive-branded-image.js +14 -0
- package/dist/collection/components/biggive-branded-image/biggive-branded-image.js.map +1 -1
- package/dist/collection/components/biggive-button/biggive-button.js +20 -0
- package/dist/collection/components/biggive-button/biggive-button.js.map +1 -1
- package/dist/collection/components/biggive-call-to-action/biggive-call-to-action.js +40 -0
- package/dist/collection/components/biggive-call-to-action/biggive-call-to-action.js.map +1 -1
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +38 -0
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js.map +1 -1
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +24 -0
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js.map +1 -1
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.js +28 -0
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.js.map +1 -1
- package/dist/collection/components/biggive-category-icon/biggive-category-icon.js +10 -0
- package/dist/collection/components/biggive-category-icon/biggive-category-icon.js.map +1 -1
- package/dist/collection/components/biggive-container-card/biggive-container-card.js +16 -0
- package/dist/collection/components/biggive-container-card/biggive-container-card.js.map +1 -1
- package/dist/collection/components/biggive-cookie-banner/biggive-cookie-banner.js +6 -0
- package/dist/collection/components/biggive-cookie-banner/biggive-cookie-banner.js.map +1 -1
- package/dist/collection/components/biggive-footer/biggive-footer.js +10 -0
- package/dist/collection/components/biggive-footer/biggive-footer.js.map +1 -1
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +21 -1
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js.map +1 -1
- package/dist/collection/components/biggive-formatted-text/biggive-formatted-text.js +6 -0
- package/dist/collection/components/biggive-formatted-text/biggive-formatted-text.js.map +1 -1
- package/dist/collection/components/biggive-generic-icon/biggive-generic-icon.js +10 -0
- package/dist/collection/components/biggive-generic-icon/biggive-generic-icon.js.map +1 -1
- package/dist/collection/components/biggive-grid/biggive-grid.js +8 -0
- package/dist/collection/components/biggive-grid/biggive-grid.js.map +1 -1
- package/dist/collection/components/biggive-heading/biggive-heading.js +18 -0
- package/dist/collection/components/biggive-heading/biggive-heading.js.map +1 -1
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +36 -0
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js.map +1 -1
- package/dist/collection/components/biggive-icon-button/biggive-icon-button.js +34 -0
- package/dist/collection/components/biggive-icon-button/biggive-icon-button.js.map +1 -1
- package/dist/collection/components/biggive-icon-group/biggive-icon-group.js +4 -0
- package/dist/collection/components/biggive-icon-group/biggive-icon-group.js.map +1 -1
- package/dist/collection/components/biggive-image/biggive-image.js +14 -0
- package/dist/collection/components/biggive-image/biggive-image.js.map +1 -1
- package/dist/collection/components/biggive-image-button/biggive-image-button.js +34 -0
- package/dist/collection/components/biggive-image-button/biggive-image-button.js.map +1 -1
- package/dist/collection/components/biggive-image-card/biggive-image-card.js +30 -0
- package/dist/collection/components/biggive-image-card/biggive-image-card.js.map +1 -1
- package/dist/collection/components/biggive-image-feature/biggive-image-feature.js +26 -0
- package/dist/collection/components/biggive-image-feature/biggive-image-feature.js.map +1 -1
- package/dist/collection/components/biggive-main-menu/biggive-main-menu.js +10 -0
- package/dist/collection/components/biggive-main-menu/biggive-main-menu.js.map +1 -1
- package/dist/collection/components/biggive-misc-icon/biggive-misc-icon.js +8 -0
- package/dist/collection/components/biggive-misc-icon/biggive-misc-icon.js.map +1 -1
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js +2 -0
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js.map +1 -1
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js +6 -0
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js.map +1 -1
- package/dist/collection/components/biggive-page-columns/biggive-page-columns.js +2 -0
- package/dist/collection/components/biggive-page-columns/biggive-page-columns.js.map +1 -1
- package/dist/collection/components/biggive-page-section/biggive-page-section.js +12 -0
- package/dist/collection/components/biggive-page-section/biggive-page-section.js.map +1 -1
- package/dist/collection/components/biggive-popup/biggive-popup.js +2 -0
- package/dist/collection/components/biggive-popup/biggive-popup.js.map +1 -1
- package/dist/collection/components/biggive-progress-bar/biggive-progress-bar.js +6 -0
- package/dist/collection/components/biggive-progress-bar/biggive-progress-bar.js.map +1 -1
- package/dist/collection/components/biggive-quote/biggive-quote.js +10 -0
- package/dist/collection/components/biggive-quote/biggive-quote.js.map +1 -1
- package/dist/collection/components/biggive-sheet/biggive-sheet.js +6 -0
- package/dist/collection/components/biggive-sheet/biggive-sheet.js.map +1 -1
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js +12 -0
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js.map +1 -1
- package/dist/collection/components/biggive-tab/biggive-tab.js +2 -0
- package/dist/collection/components/biggive-tab/biggive-tab.js.map +1 -1
- package/dist/collection/components/biggive-tabbed-content/biggive-tabbed-content.js +14 -0
- package/dist/collection/components/biggive-tabbed-content/biggive-tabbed-content.js.map +1 -1
- package/dist/collection/components/biggive-table/biggive-table.js +10 -0
- package/dist/collection/components/biggive-table/biggive-table.js.map +1 -1
- package/dist/collection/components/biggive-text-input/biggive-text-input.js +8 -0
- package/dist/collection/components/biggive-text-input/biggive-text-input.js.map +1 -1
- package/dist/collection/components/biggive-timeline/biggive-timeline.js +24 -0
- package/dist/collection/components/biggive-timeline/biggive-timeline.js.map +1 -1
- package/dist/collection/components/biggive-timeline-entry/biggive-timeline-entry.js +4 -0
- package/dist/collection/components/biggive-timeline-entry/biggive-timeline-entry.js.map +1 -1
- package/dist/collection/components/biggive-totalizer/biggive-totalizer.js +12 -0
- package/dist/collection/components/biggive-totalizer/biggive-totalizer.js.map +1 -1
- package/dist/collection/components/biggive-totalizer-ticker-item/biggive-totalizer-ticker-item.js +4 -0
- package/dist/collection/components/biggive-totalizer-ticker-item/biggive-totalizer-ticker-item.js.map +1 -1
- package/dist/collection/components/biggive-video/biggive-video.js +6 -0
- package/dist/collection/components/biggive-video/biggive-video.js.map +1 -1
- package/dist/collection/components/biggive-video-feature/biggive-video-feature.js +26 -0
- package/dist/collection/components/biggive-video-feature/biggive-video-feature.js.map +1 -1
- package/dist/esm/biggive-accordion_40.entry.js +1 -1
- package/dist/esm/biggive-basic-card.entry.js +1 -1
- package/dist/esm/biggive-beneficiary-icon.entry.js +1 -1
- package/dist/esm/biggive-boxed-content.entry.js +1 -1
- package/dist/esm/biggive-category-icon.entry.js +1 -1
- package/dist/esm/biggive-container-card.entry.js +1 -1
- package/dist/esm/biggive-cookie-banner.entry.js +1 -1
- package/dist/esm/biggive-form.entry.js +1 -1
- package/dist/esm/biggive-icon-group.entry.js +1 -1
- package/dist/esm/biggive-image-card.entry.js +1 -1
- package/dist/esm/biggive-nav-group.entry.js +1 -1
- package/dist/esm/biggive-nav-item.entry.js +1 -1
- package/dist/esm/biggive-table.entry.js +1 -1
- package/dist/esm/biggive-video.entry.js +1 -1
- package/dist/esm/biggive.js +3 -3
- package/dist/esm/biggive.js.map +1 -1
- package/dist/esm/{index-e697836a.js → index-bf4df57a.js} +789 -544
- package/dist/esm/index-bf4df57a.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/hydrate/index.js +799 -553
- package/hydrate/index.mjs +799 -553
- package/package.json +4 -4
- package/dist/biggive/p-4836d838.entry.js +0 -2
- package/dist/biggive/p-b6a2fb47.js +0 -3
- package/dist/biggive/p-b6a2fb47.js.map +0 -1
- package/dist/cjs/index-6a8f5d99.js.map +0 -1
- package/dist/esm/index-e697836a.js.map +0 -1
- /package/dist/biggive/{p-bdf27c6e.entry.js.map → p-0eda1345.entry.js.map} +0 -0
- /package/dist/biggive/{p-8f87813f.entry.js.map → p-16da1da1.entry.js.map} +0 -0
- /package/dist/biggive/{p-ff386daf.entry.js.map → p-2eb2b970.entry.js.map} +0 -0
- /package/dist/biggive/{p-c9dca099.entry.js.map → p-5262507c.entry.js.map} +0 -0
- /package/dist/biggive/{p-294ca479.entry.js.map → p-6a812c8a.entry.js.map} +0 -0
- /package/dist/biggive/{p-e3517299.entry.js.map → p-87562be2.entry.js.map} +0 -0
- /package/dist/biggive/{p-1605c6ed.entry.js.map → p-b1d82c2f.entry.js.map} +0 -0
- /package/dist/biggive/{p-8a90290c.entry.js.map → p-bfaa8a6d.entry.js.map} +0 -0
- /package/dist/biggive/{p-a6b12da2.entry.js.map → p-cf7446f9.entry.js.map} +0 -0
- /package/dist/biggive/{p-748e33b0.entry.js.map → p-e3b4412e.entry.js.map} +0 -0
- /package/dist/biggive/{p-e0832635.entry.js.map → p-ea8d01ca.entry.js.map} +0 -0
- /package/dist/biggive/{p-963a065a.entry.js.map → p-f0bb3912.entry.js.map} +0 -0
- /package/dist/biggive/{p-10c21815.entry.js.map → p-f3246097.entry.js.map} +0 -0
- /package/dist/biggive/{p-4836d838.entry.js.map → p-f6b8aae2.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const NAMESPACE = 'biggive';
|
|
|
131
131
|
const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", 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: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
132
132
|
|
|
133
133
|
/*
|
|
134
|
-
Stencil Hydrate Platform v4.
|
|
134
|
+
Stencil Hydrate Platform v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
135
135
|
*/
|
|
136
136
|
var __defProp = Object.defineProperty;
|
|
137
137
|
var __export = (target, all) => {
|
|
@@ -211,26 +211,13 @@ var unwrapErr = (result) => {
|
|
|
211
211
|
throw result.value;
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
|
-
var createTime = (fnName, tagName = "") => {
|
|
215
|
-
{
|
|
216
|
-
return () => {
|
|
217
|
-
return;
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
var uniqueTime = (key, measureText) => {
|
|
222
|
-
{
|
|
223
|
-
return () => {
|
|
224
|
-
return;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
214
|
|
|
229
215
|
// src/runtime/runtime-constants.ts
|
|
230
216
|
var CONTENT_REF_ID = "r";
|
|
231
217
|
var ORG_LOCATION_ID = "o";
|
|
232
218
|
var SLOT_NODE_ID = "s";
|
|
233
219
|
var TEXT_NODE_ID = "t";
|
|
220
|
+
var COMMENT_NODE_ID = "c";
|
|
234
221
|
var HYDRATE_ID = "s-id";
|
|
235
222
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
236
223
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -352,433 +339,124 @@ var convertToPrivate = (node) => {
|
|
|
352
339
|
vnode.$name$ = node.vname;
|
|
353
340
|
return vnode;
|
|
354
341
|
};
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
366
|
-
}
|
|
367
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
368
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
369
|
-
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
370
|
-
childRenderNodes.map((c) => {
|
|
371
|
-
const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
|
|
372
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
373
|
-
const node = c.$elm$;
|
|
374
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
375
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
376
|
-
}
|
|
377
|
-
if (!shadowRoot) {
|
|
378
|
-
node["s-hn"] = tagName;
|
|
379
|
-
if (orgLocationNode) {
|
|
380
|
-
node["s-ol"] = orgLocationNode;
|
|
381
|
-
node["s-ol"]["s-nr"] = node;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
385
|
-
});
|
|
386
|
-
if (shadowRoot) {
|
|
387
|
-
shadowRootNodes.map((shadowRootNode) => {
|
|
388
|
-
if (shadowRootNode) {
|
|
389
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
342
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
343
|
+
if (oldValue !== newValue) {
|
|
344
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
345
|
+
let ln = memberName.toLowerCase();
|
|
346
|
+
if (memberName === "class") {
|
|
347
|
+
const classList = elm.classList;
|
|
348
|
+
const oldClasses = parseClassList(oldValue);
|
|
349
|
+
const newClasses = parseClassList(newValue);
|
|
350
|
+
if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
|
|
351
|
+
newClasses.push(elm["s-si"]);
|
|
390
352
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
402
|
-
if (childNodeType) {
|
|
403
|
-
childIdSplt = childNodeType.split(".");
|
|
404
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
405
|
-
childVNode = {
|
|
406
|
-
$flags$: 0,
|
|
407
|
-
$hostId$: childIdSplt[0],
|
|
408
|
-
$nodeId$: childIdSplt[1],
|
|
409
|
-
$depth$: childIdSplt[2],
|
|
410
|
-
$index$: childIdSplt[3],
|
|
411
|
-
$tag$: node.tagName.toLowerCase(),
|
|
412
|
-
$elm$: node,
|
|
413
|
-
$attrs$: null,
|
|
414
|
-
$children$: null,
|
|
415
|
-
$key$: null,
|
|
416
|
-
$name$: null,
|
|
417
|
-
$text$: null
|
|
418
|
-
};
|
|
419
|
-
childRenderNodes.push(childVNode);
|
|
420
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
421
|
-
if (!parentVNode.$children$) {
|
|
422
|
-
parentVNode.$children$ = [];
|
|
353
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
354
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
355
|
+
} else if (memberName === "style") {
|
|
356
|
+
{
|
|
357
|
+
for (const prop in oldValue) {
|
|
358
|
+
if (!newValue || newValue[prop] == null) {
|
|
359
|
+
{
|
|
360
|
+
elm.style[prop] = "";
|
|
361
|
+
}
|
|
362
|
+
}
|
|
423
363
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
if (
|
|
427
|
-
|
|
364
|
+
}
|
|
365
|
+
for (const prop in newValue) {
|
|
366
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
367
|
+
{
|
|
368
|
+
elm.style[prop] = newValue[prop];
|
|
369
|
+
}
|
|
428
370
|
}
|
|
429
371
|
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
clientHydrate(
|
|
434
|
-
parentVNode,
|
|
435
|
-
childRenderNodes,
|
|
436
|
-
slotNodes,
|
|
437
|
-
shadowRootNodes,
|
|
438
|
-
hostElm,
|
|
439
|
-
node.shadowRoot.childNodes[i2],
|
|
440
|
-
hostId
|
|
441
|
-
);
|
|
372
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
373
|
+
if (newValue) {
|
|
374
|
+
newValue(elm);
|
|
442
375
|
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
childIdSplt = node.nodeValue.split(".");
|
|
457
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
458
|
-
childNodeType = childIdSplt[0];
|
|
459
|
-
childVNode = {
|
|
460
|
-
$flags$: 0,
|
|
461
|
-
$hostId$: childIdSplt[1],
|
|
462
|
-
$nodeId$: childIdSplt[2],
|
|
463
|
-
$depth$: childIdSplt[3],
|
|
464
|
-
$index$: childIdSplt[4],
|
|
465
|
-
$elm$: node,
|
|
466
|
-
$attrs$: null,
|
|
467
|
-
$children$: null,
|
|
468
|
-
$key$: null,
|
|
469
|
-
$name$: null,
|
|
470
|
-
$tag$: null,
|
|
471
|
-
$text$: null
|
|
472
|
-
};
|
|
473
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
474
|
-
childVNode.$elm$ = node.nextSibling;
|
|
475
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
476
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
477
|
-
childRenderNodes.push(childVNode);
|
|
478
|
-
node.remove();
|
|
479
|
-
if (!parentVNode.$children$) {
|
|
480
|
-
parentVNode.$children$ = [];
|
|
481
|
-
}
|
|
482
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
483
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
484
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
485
|
-
}
|
|
376
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
377
|
+
if (memberName[2] === "-") {
|
|
378
|
+
memberName = memberName.slice(3);
|
|
379
|
+
} else if (isMemberInElement(win, ln)) {
|
|
380
|
+
memberName = ln.slice(2);
|
|
381
|
+
} else {
|
|
382
|
+
memberName = ln[2] + memberName.slice(3);
|
|
383
|
+
}
|
|
384
|
+
if (oldValue || newValue) {
|
|
385
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
386
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
387
|
+
if (oldValue) {
|
|
388
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
486
389
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
390
|
+
if (newValue) {
|
|
391
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
} else {
|
|
395
|
+
const isComplex = isComplexType(newValue);
|
|
396
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
397
|
+
try {
|
|
398
|
+
if (!elm.tagName.includes("-")) {
|
|
399
|
+
const n = newValue == null ? "" : newValue;
|
|
400
|
+
if (memberName === "list") {
|
|
401
|
+
isProp = false;
|
|
402
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
403
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
404
|
+
elm[memberName] = n;
|
|
405
|
+
} else {
|
|
406
|
+
elm.setAttribute(memberName, n);
|
|
407
|
+
}
|
|
505
408
|
}
|
|
506
|
-
}
|
|
507
|
-
slotNodes.push(childVNode);
|
|
508
|
-
if (!parentVNode.$children$) {
|
|
509
|
-
parentVNode.$children$ = [];
|
|
510
|
-
}
|
|
511
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
512
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
513
|
-
if (shadowRootNodes) {
|
|
514
|
-
node.remove();
|
|
515
409
|
} else {
|
|
516
|
-
|
|
517
|
-
|
|
410
|
+
elm[memberName] = newValue;
|
|
411
|
+
}
|
|
412
|
+
} catch (e) {
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
if (newValue == null || newValue === false) {
|
|
416
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
417
|
+
{
|
|
418
|
+
elm.removeAttribute(memberName);
|
|
518
419
|
}
|
|
519
420
|
}
|
|
421
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
422
|
+
newValue = newValue === true ? "" : newValue;
|
|
423
|
+
{
|
|
424
|
+
elm.setAttribute(memberName, newValue);
|
|
425
|
+
}
|
|
520
426
|
}
|
|
521
427
|
}
|
|
522
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
523
|
-
const vnode = newVNode(null, node.textContent);
|
|
524
|
-
vnode.$elm$ = node;
|
|
525
|
-
vnode.$index$ = "0";
|
|
526
|
-
parentVNode.$children$ = [vnode];
|
|
527
428
|
}
|
|
528
429
|
};
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
430
|
+
var parseClassListRegex = /\s/;
|
|
431
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
432
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
433
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
434
|
+
|
|
435
|
+
// src/runtime/vdom/update-element.ts
|
|
436
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
437
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
438
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
439
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
440
|
+
{
|
|
441
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
442
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
443
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
535
444
|
}
|
|
536
445
|
}
|
|
537
|
-
for (i2 = 0; i2 < node.childNodes.length; i2++) {
|
|
538
|
-
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
539
|
-
}
|
|
540
|
-
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
541
|
-
const childIdSplt = node.nodeValue.split(".");
|
|
542
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
543
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
544
|
-
node.nodeValue = "";
|
|
545
|
-
node["s-en"] = childIdSplt[3];
|
|
546
|
-
}
|
|
547
446
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
551
|
-
if (propType & 4 /* Boolean */) {
|
|
552
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
553
|
-
}
|
|
554
|
-
if (propType & 2 /* Number */) {
|
|
555
|
-
return parseFloat(propValue);
|
|
556
|
-
}
|
|
557
|
-
if (propType & 1 /* String */) {
|
|
558
|
-
return String(propValue);
|
|
559
|
-
}
|
|
560
|
-
return propValue;
|
|
447
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
448
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
561
449
|
}
|
|
562
|
-
return propValue;
|
|
563
450
|
};
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
//
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
composed: !!(flags & 2 /* Composed */),
|
|
574
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
575
|
-
detail
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
};
|
|
580
|
-
var emitEvent = (elm, name, opts) => {
|
|
581
|
-
const ev = plt.ce(name, opts);
|
|
582
|
-
elm.dispatchEvent(ev);
|
|
583
|
-
return ev;
|
|
584
|
-
};
|
|
585
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
586
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
587
|
-
let style = styles.get(scopeId2);
|
|
588
|
-
{
|
|
589
|
-
style = cssText;
|
|
590
|
-
}
|
|
591
|
-
styles.set(scopeId2, style);
|
|
592
|
-
};
|
|
593
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
594
|
-
var _a;
|
|
595
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
596
|
-
const style = styles.get(scopeId2);
|
|
597
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
598
|
-
if (style) {
|
|
599
|
-
if (typeof style === "string") {
|
|
600
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
601
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
602
|
-
let styleElm;
|
|
603
|
-
if (!appliedStyles) {
|
|
604
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
605
|
-
}
|
|
606
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
607
|
-
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
608
|
-
styleElm.innerHTML = style;
|
|
609
|
-
} else {
|
|
610
|
-
styleElm = doc.createElement("style");
|
|
611
|
-
styleElm.innerHTML = style;
|
|
612
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
613
|
-
if (nonce != null) {
|
|
614
|
-
styleElm.setAttribute("nonce", nonce);
|
|
615
|
-
}
|
|
616
|
-
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
617
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
618
|
-
}
|
|
619
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
620
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
621
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
622
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
623
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
624
|
-
} else if ("host" in styleContainerNode) {
|
|
625
|
-
{
|
|
626
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
627
|
-
if (existingStyleContainer) {
|
|
628
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
629
|
-
} else {
|
|
630
|
-
styleContainerNode.prepend(styleElm);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
} else {
|
|
634
|
-
styleContainerNode.append(styleElm);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
638
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
642
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
643
|
-
}
|
|
644
|
-
if (appliedStyles) {
|
|
645
|
-
appliedStyles.add(scopeId2);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
return scopeId2;
|
|
651
|
-
};
|
|
652
|
-
var attachStyles = (hostRef) => {
|
|
653
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
654
|
-
const elm = hostRef.$hostElement$;
|
|
655
|
-
const flags = cmpMeta.$flags$;
|
|
656
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
657
|
-
const scopeId2 = addStyle(
|
|
658
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
659
|
-
cmpMeta);
|
|
660
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
661
|
-
elm["s-sc"] = scopeId2;
|
|
662
|
-
elm.classList.add(scopeId2 + "-h");
|
|
663
|
-
}
|
|
664
|
-
endAttachStyles();
|
|
665
|
-
};
|
|
666
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
667
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
668
|
-
if (oldValue !== newValue) {
|
|
669
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
670
|
-
let ln = memberName.toLowerCase();
|
|
671
|
-
if (memberName === "class") {
|
|
672
|
-
const classList = elm.classList;
|
|
673
|
-
const oldClasses = parseClassList(oldValue);
|
|
674
|
-
const newClasses = parseClassList(newValue);
|
|
675
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
676
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
677
|
-
} else if (memberName === "style") {
|
|
678
|
-
{
|
|
679
|
-
for (const prop in oldValue) {
|
|
680
|
-
if (!newValue || newValue[prop] == null) {
|
|
681
|
-
{
|
|
682
|
-
elm.style[prop] = "";
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
for (const prop in newValue) {
|
|
688
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
689
|
-
{
|
|
690
|
-
elm.style[prop] = newValue[prop];
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
695
|
-
if (newValue) {
|
|
696
|
-
newValue(elm);
|
|
697
|
-
}
|
|
698
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
699
|
-
if (memberName[2] === "-") {
|
|
700
|
-
memberName = memberName.slice(3);
|
|
701
|
-
} else if (isMemberInElement(win, ln)) {
|
|
702
|
-
memberName = ln.slice(2);
|
|
703
|
-
} else {
|
|
704
|
-
memberName = ln[2] + memberName.slice(3);
|
|
705
|
-
}
|
|
706
|
-
if (oldValue || newValue) {
|
|
707
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
708
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
709
|
-
if (oldValue) {
|
|
710
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
711
|
-
}
|
|
712
|
-
if (newValue) {
|
|
713
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
} else {
|
|
717
|
-
const isComplex = isComplexType(newValue);
|
|
718
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
719
|
-
try {
|
|
720
|
-
if (!elm.tagName.includes("-")) {
|
|
721
|
-
const n = newValue == null ? "" : newValue;
|
|
722
|
-
if (memberName === "list") {
|
|
723
|
-
isProp = false;
|
|
724
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
725
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
726
|
-
elm[memberName] = n;
|
|
727
|
-
} else {
|
|
728
|
-
elm.setAttribute(memberName, n);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
} else {
|
|
732
|
-
elm[memberName] = newValue;
|
|
733
|
-
}
|
|
734
|
-
} catch (e) {
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
if (newValue == null || newValue === false) {
|
|
738
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
739
|
-
{
|
|
740
|
-
elm.removeAttribute(memberName);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
744
|
-
newValue = newValue === true ? "" : newValue;
|
|
745
|
-
{
|
|
746
|
-
elm.setAttribute(memberName, newValue);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
var parseClassListRegex = /\s/;
|
|
753
|
-
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
754
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
755
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
756
|
-
|
|
757
|
-
// src/runtime/vdom/update-element.ts
|
|
758
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
759
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
760
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
761
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
762
|
-
{
|
|
763
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
764
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
765
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
770
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
771
|
-
}
|
|
772
|
-
};
|
|
773
|
-
function sortedAttrNames(attrNames) {
|
|
774
|
-
return attrNames.includes("ref") ? (
|
|
775
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
|
776
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
777
|
-
) : (
|
|
778
|
-
// no need to sort, return the original array
|
|
779
|
-
attrNames
|
|
780
|
-
);
|
|
781
|
-
}
|
|
451
|
+
function sortedAttrNames(attrNames) {
|
|
452
|
+
return attrNames.includes("ref") ? (
|
|
453
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
454
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
455
|
+
) : (
|
|
456
|
+
// no need to sort, return the original array
|
|
457
|
+
attrNames
|
|
458
|
+
);
|
|
459
|
+
}
|
|
782
460
|
|
|
783
461
|
// src/runtime/vdom/vdom-render.ts
|
|
784
462
|
var scopeId;
|
|
@@ -871,7 +549,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
871
549
|
};
|
|
872
550
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
873
551
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
874
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
552
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
875
553
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
876
554
|
let node = parentElm;
|
|
877
555
|
while (node = node.nextSibling) {
|
|
@@ -1085,7 +763,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1085
763
|
}
|
|
1086
764
|
};
|
|
1087
765
|
var updateFallbackSlotVisibility = (elm) => {
|
|
1088
|
-
const childNodes = elm.childNodes;
|
|
766
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
1089
767
|
for (const childNode of childNodes) {
|
|
1090
768
|
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1091
769
|
if (childNode["s-sr"]) {
|
|
@@ -1098,7 +776,7 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
1098
776
|
childNode.hidden = true;
|
|
1099
777
|
break;
|
|
1100
778
|
}
|
|
1101
|
-
} else {
|
|
779
|
+
} else if (slotName === siblingNode["s-sn"]) {
|
|
1102
780
|
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1103
781
|
childNode.hidden = true;
|
|
1104
782
|
break;
|
|
@@ -1116,9 +794,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1116
794
|
let node;
|
|
1117
795
|
let hostContentNodes;
|
|
1118
796
|
let j;
|
|
1119
|
-
|
|
797
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
798
|
+
for (const childNode of children) {
|
|
1120
799
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1121
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
800
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1122
801
|
const slotName = childNode["s-sn"];
|
|
1123
802
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1124
803
|
node = hostContentNodes[j];
|
|
@@ -1160,129 +839,632 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1160
839
|
}
|
|
1161
840
|
}
|
|
1162
841
|
};
|
|
1163
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1164
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1165
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1166
|
-
return true;
|
|
842
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
843
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
844
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
845
|
+
return true;
|
|
846
|
+
}
|
|
847
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
848
|
+
return true;
|
|
849
|
+
}
|
|
850
|
+
return false;
|
|
851
|
+
}
|
|
852
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
853
|
+
return true;
|
|
854
|
+
}
|
|
855
|
+
return slotName === "";
|
|
856
|
+
};
|
|
857
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
858
|
+
{
|
|
859
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
860
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
864
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
865
|
+
return inserted;
|
|
866
|
+
};
|
|
867
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
868
|
+
var _a, _b, _c, _d;
|
|
869
|
+
const hostElm = hostRef.$hostElement$;
|
|
870
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
871
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
872
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
873
|
+
hostTagName = hostElm.tagName;
|
|
874
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
875
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
876
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
877
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
rootVnode.$tag$ = null;
|
|
882
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
883
|
+
hostRef.$vnode$ = rootVnode;
|
|
884
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
885
|
+
{
|
|
886
|
+
scopeId = hostElm["s-sc"];
|
|
887
|
+
}
|
|
888
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
889
|
+
{
|
|
890
|
+
contentRef = hostElm["s-cr"];
|
|
891
|
+
checkSlotFallbackVisibility = false;
|
|
892
|
+
}
|
|
893
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
894
|
+
{
|
|
895
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
896
|
+
if (checkSlotRelocate) {
|
|
897
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
898
|
+
for (const relocateData of relocateNodes) {
|
|
899
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
900
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
901
|
+
const orgLocationNode = originalLocationDebugNode(nodeToRelocate) ;
|
|
902
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
903
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
for (const relocateData of relocateNodes) {
|
|
907
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
908
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
909
|
+
if (slotRefNode) {
|
|
910
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
911
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
912
|
+
{
|
|
913
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
914
|
+
while (orgLocationNode) {
|
|
915
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
916
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
917
|
+
refNode = refNode.nextSibling;
|
|
918
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
919
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
920
|
+
}
|
|
921
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
922
|
+
insertBeforeNode = refNode;
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
930
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
931
|
+
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
932
|
+
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
933
|
+
}
|
|
934
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
935
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
936
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
|
|
941
|
+
} else {
|
|
942
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
943
|
+
if (isInitialLoad) {
|
|
944
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
945
|
+
}
|
|
946
|
+
nodeToRelocate.hidden = true;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
if (checkSlotFallbackVisibility) {
|
|
952
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
953
|
+
}
|
|
954
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
955
|
+
relocateNodes.length = 0;
|
|
956
|
+
}
|
|
957
|
+
contentRef = void 0;
|
|
958
|
+
};
|
|
959
|
+
var slotReferenceDebugNode = (slotVNode) => doc.createComment(
|
|
960
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
961
|
+
);
|
|
962
|
+
var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
|
|
963
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
964
|
+
);
|
|
965
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
966
|
+
let slottedNodeLocation;
|
|
967
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
968
|
+
slottedNodeLocation = newChild["s-ol"];
|
|
969
|
+
} else {
|
|
970
|
+
slottedNodeLocation = document.createTextNode("");
|
|
971
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
972
|
+
}
|
|
973
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
974
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
975
|
+
const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
|
|
976
|
+
if (typeof position !== "undefined") {
|
|
977
|
+
{
|
|
978
|
+
slottedNodeLocation["s-oo"] = position;
|
|
979
|
+
const childNodes = parent.__childNodes || parent.childNodes;
|
|
980
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
981
|
+
childNodes.forEach((n) => {
|
|
982
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
983
|
+
});
|
|
984
|
+
slotRelocateNodes.sort((a, b) => {
|
|
985
|
+
if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
|
|
986
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
987
|
+
return 0;
|
|
988
|
+
});
|
|
989
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
990
|
+
}
|
|
991
|
+
} else {
|
|
992
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
993
|
+
}
|
|
994
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
995
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
996
|
+
};
|
|
997
|
+
var createTime = (fnName, tagName = "") => {
|
|
998
|
+
{
|
|
999
|
+
return () => {
|
|
1000
|
+
return;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
var uniqueTime = (key, measureText) => {
|
|
1005
|
+
{
|
|
1006
|
+
return () => {
|
|
1007
|
+
return;
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
// src/runtime/client-hydrate.ts
|
|
1013
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1014
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
1015
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
1016
|
+
const childRenderNodes = [];
|
|
1017
|
+
const slotNodes = [];
|
|
1018
|
+
const slottedNodes = [];
|
|
1019
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
1020
|
+
const vnode = newVNode(tagName, null);
|
|
1021
|
+
vnode.$elm$ = hostElm;
|
|
1022
|
+
if (!plt.$orgLocNodes$) {
|
|
1023
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1024
|
+
}
|
|
1025
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
1026
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
1027
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1028
|
+
vnode,
|
|
1029
|
+
childRenderNodes,
|
|
1030
|
+
slotNodes,
|
|
1031
|
+
shadowRootNodes,
|
|
1032
|
+
hostElm,
|
|
1033
|
+
hostElm,
|
|
1034
|
+
hostId,
|
|
1035
|
+
slottedNodes
|
|
1036
|
+
);
|
|
1037
|
+
let crIndex = 0;
|
|
1038
|
+
const crLength = childRenderNodes.length;
|
|
1039
|
+
let childRenderNode;
|
|
1040
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1041
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1042
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
1043
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1044
|
+
const node = childRenderNode.$elm$;
|
|
1045
|
+
if (!shadowRoot) {
|
|
1046
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1047
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1048
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1052
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1053
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1054
|
+
}
|
|
1055
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1056
|
+
if (!shadowRoot) {
|
|
1057
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1061
|
+
}
|
|
1062
|
+
const hosts = [];
|
|
1063
|
+
let snIndex = 0;
|
|
1064
|
+
const snLen = slottedNodes.length;
|
|
1065
|
+
let slotGroup;
|
|
1066
|
+
let snGroupIdx;
|
|
1067
|
+
let snGroupLen;
|
|
1068
|
+
let slottedItem;
|
|
1069
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1070
|
+
slotGroup = slottedNodes[snIndex];
|
|
1071
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1072
|
+
snGroupLen = slotGroup.length;
|
|
1073
|
+
snGroupIdx = 0;
|
|
1074
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1075
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1076
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1077
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1078
|
+
}
|
|
1079
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1080
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1081
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1082
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1083
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1084
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1085
|
+
} else {
|
|
1086
|
+
const hostChildren = hostEle.__childNodes || hostEle.childNodes;
|
|
1087
|
+
slottedItem.slot["s-cr"] = hostChildren[0];
|
|
1088
|
+
}
|
|
1089
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1090
|
+
}
|
|
1091
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1092
|
+
hostEle.appendChild(slottedItem.node);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
if (shadowRoot) {
|
|
1097
|
+
let rnIdex = 0;
|
|
1098
|
+
const rnLen = shadowRootNodes.length;
|
|
1099
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1100
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1101
|
+
}
|
|
1102
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1103
|
+
if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
|
|
1104
|
+
node.parentNode.removeChild(node);
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
hostRef.$hostElement$ = hostElm;
|
|
1109
|
+
endHydrate();
|
|
1110
|
+
};
|
|
1111
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
1112
|
+
let childNodeType;
|
|
1113
|
+
let childIdSplt;
|
|
1114
|
+
let childVNode;
|
|
1115
|
+
let i2;
|
|
1116
|
+
const scopeId2 = hostElm["s-sc"];
|
|
1117
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1118
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1119
|
+
if (childNodeType) {
|
|
1120
|
+
childIdSplt = childNodeType.split(".");
|
|
1121
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
1122
|
+
childVNode = createSimpleVNode({
|
|
1123
|
+
$flags$: 0,
|
|
1124
|
+
$hostId$: childIdSplt[0],
|
|
1125
|
+
$nodeId$: childIdSplt[1],
|
|
1126
|
+
$depth$: childIdSplt[2],
|
|
1127
|
+
$index$: childIdSplt[3],
|
|
1128
|
+
$tag$: node.tagName.toLowerCase(),
|
|
1129
|
+
$elm$: node,
|
|
1130
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
|
|
1131
|
+
// client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
|
|
1132
|
+
$attrs$: { class: node.className }
|
|
1133
|
+
});
|
|
1134
|
+
childRenderNodes.push(childVNode);
|
|
1135
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1136
|
+
if (!parentVNode.$children$) {
|
|
1137
|
+
parentVNode.$children$ = [];
|
|
1138
|
+
}
|
|
1139
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1140
|
+
if (typeof slotName === "string") {
|
|
1141
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
1142
|
+
addSlot(
|
|
1143
|
+
slotName,
|
|
1144
|
+
childIdSplt[2],
|
|
1145
|
+
childVNode,
|
|
1146
|
+
node,
|
|
1147
|
+
parentVNode,
|
|
1148
|
+
childRenderNodes,
|
|
1149
|
+
slotNodes,
|
|
1150
|
+
shadowRootNodes,
|
|
1151
|
+
slottedNodes
|
|
1152
|
+
);
|
|
1153
|
+
}
|
|
1154
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
1155
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
1156
|
+
}
|
|
1157
|
+
if (childVNode.$index$ !== void 0) {
|
|
1158
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1159
|
+
}
|
|
1160
|
+
if (scopeId2) node["s-si"] = scopeId2;
|
|
1161
|
+
parentVNode = childVNode;
|
|
1162
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1163
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
if (node.shadowRoot) {
|
|
1168
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1169
|
+
clientHydrate(
|
|
1170
|
+
parentVNode,
|
|
1171
|
+
childRenderNodes,
|
|
1172
|
+
slotNodes,
|
|
1173
|
+
shadowRootNodes,
|
|
1174
|
+
hostElm,
|
|
1175
|
+
node.shadowRoot.childNodes[i2],
|
|
1176
|
+
hostId,
|
|
1177
|
+
slottedNodes
|
|
1178
|
+
);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1182
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
1183
|
+
clientHydrate(
|
|
1184
|
+
parentVNode,
|
|
1185
|
+
childRenderNodes,
|
|
1186
|
+
slotNodes,
|
|
1187
|
+
shadowRootNodes,
|
|
1188
|
+
hostElm,
|
|
1189
|
+
nonShadowNodes[i2],
|
|
1190
|
+
hostId,
|
|
1191
|
+
slottedNodes
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1195
|
+
childIdSplt = node.nodeValue.split(".");
|
|
1196
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1197
|
+
childNodeType = childIdSplt[0];
|
|
1198
|
+
childVNode = createSimpleVNode({
|
|
1199
|
+
$hostId$: childIdSplt[1],
|
|
1200
|
+
$nodeId$: childIdSplt[2],
|
|
1201
|
+
$depth$: childIdSplt[3],
|
|
1202
|
+
$index$: childIdSplt[4] || "0",
|
|
1203
|
+
$elm$: node,
|
|
1204
|
+
$attrs$: null,
|
|
1205
|
+
$children$: null,
|
|
1206
|
+
$key$: null,
|
|
1207
|
+
$name$: null,
|
|
1208
|
+
$tag$: null,
|
|
1209
|
+
$text$: null
|
|
1210
|
+
});
|
|
1211
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
1212
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1213
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1214
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1215
|
+
childRenderNodes.push(childVNode);
|
|
1216
|
+
node.remove();
|
|
1217
|
+
if (hostId === childVNode.$hostId$) {
|
|
1218
|
+
if (!parentVNode.$children$) {
|
|
1219
|
+
parentVNode.$children$ = [];
|
|
1220
|
+
}
|
|
1221
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1222
|
+
}
|
|
1223
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1224
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1228
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1229
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1230
|
+
childRenderNodes.push(childVNode);
|
|
1231
|
+
node.remove();
|
|
1232
|
+
}
|
|
1233
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
1234
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
1235
|
+
childVNode.$tag$ = "slot";
|
|
1236
|
+
const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
|
|
1237
|
+
addSlot(
|
|
1238
|
+
slotName,
|
|
1239
|
+
childIdSplt[2],
|
|
1240
|
+
childVNode,
|
|
1241
|
+
node,
|
|
1242
|
+
parentVNode,
|
|
1243
|
+
childRenderNodes,
|
|
1244
|
+
slotNodes,
|
|
1245
|
+
shadowRootNodes,
|
|
1246
|
+
slottedNodes
|
|
1247
|
+
);
|
|
1248
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1249
|
+
if (shadowRootNodes) {
|
|
1250
|
+
node.remove();
|
|
1251
|
+
} else {
|
|
1252
|
+
hostElm["s-cr"] = node;
|
|
1253
|
+
node["s-cn"] = true;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1259
|
+
const vnode = newVNode(null, node.textContent);
|
|
1260
|
+
vnode.$elm$ = node;
|
|
1261
|
+
vnode.$index$ = "0";
|
|
1262
|
+
parentVNode.$children$ = [vnode];
|
|
1263
|
+
}
|
|
1264
|
+
return parentVNode;
|
|
1265
|
+
};
|
|
1266
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1267
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1268
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1269
|
+
if (componentId) {
|
|
1270
|
+
orgLocNodes.set(componentId, node);
|
|
1271
|
+
}
|
|
1272
|
+
let i2 = 0;
|
|
1273
|
+
if (node.shadowRoot) {
|
|
1274
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1275
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1279
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1280
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1281
|
+
}
|
|
1282
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1283
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1284
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1285
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1286
|
+
node.nodeValue = "";
|
|
1287
|
+
node["s-en"] = childIdSplt[3];
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
var createSimpleVNode = (vnode) => {
|
|
1292
|
+
const defaultVNode = {
|
|
1293
|
+
$flags$: 0,
|
|
1294
|
+
$hostId$: null,
|
|
1295
|
+
$nodeId$: null,
|
|
1296
|
+
$depth$: null,
|
|
1297
|
+
$index$: "0",
|
|
1298
|
+
$elm$: null,
|
|
1299
|
+
$attrs$: null,
|
|
1300
|
+
$children$: null,
|
|
1301
|
+
$key$: null,
|
|
1302
|
+
$name$: null,
|
|
1303
|
+
$tag$: null,
|
|
1304
|
+
$text$: null
|
|
1305
|
+
};
|
|
1306
|
+
return { ...defaultVNode, ...vnode };
|
|
1307
|
+
};
|
|
1308
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1309
|
+
node["s-sr"] = true;
|
|
1310
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1311
|
+
if (shadowRootNodes) {
|
|
1312
|
+
const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
1313
|
+
if (childVNode.$name$) {
|
|
1314
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1315
|
+
}
|
|
1316
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1317
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1318
|
+
} else {
|
|
1319
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1167
1320
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1321
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1322
|
+
node.remove();
|
|
1323
|
+
if (childVNode.$depth$ === "0") {
|
|
1324
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1170
1325
|
}
|
|
1171
|
-
|
|
1326
|
+
} else {
|
|
1327
|
+
const slot = childVNode.$elm$;
|
|
1328
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1329
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1330
|
+
if (shouldMove) {
|
|
1331
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1332
|
+
}
|
|
1333
|
+
childRenderNodes.push(childVNode);
|
|
1172
1334
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1335
|
+
slotNodes.push(childVNode);
|
|
1336
|
+
if (!parentVNode.$children$) {
|
|
1337
|
+
parentVNode.$children$ = [];
|
|
1175
1338
|
}
|
|
1176
|
-
|
|
1177
|
-
}
|
|
1178
|
-
var
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1339
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1340
|
+
}
|
|
1341
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1342
|
+
let slottedNode = slotNode.nextSibling;
|
|
1343
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1344
|
+
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 */))) {
|
|
1345
|
+
slottedNode["s-sn"] = slotName;
|
|
1346
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1347
|
+
slottedNode = slottedNode.nextSibling;
|
|
1182
1348
|
}
|
|
1183
1349
|
};
|
|
1184
|
-
var
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1189
|
-
var _a, _b, _c, _d;
|
|
1190
|
-
const hostElm = hostRef.$hostElement$;
|
|
1191
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1192
|
-
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1193
|
-
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1194
|
-
hostTagName = hostElm.tagName;
|
|
1195
|
-
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1196
|
-
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1197
|
-
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
1198
|
-
rootVnode.$attrs$[key] = hostElm[key];
|
|
1199
|
-
}
|
|
1350
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
1351
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1352
|
+
if (propType & 4 /* Boolean */) {
|
|
1353
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1200
1354
|
}
|
|
1355
|
+
if (propType & 2 /* Number */) {
|
|
1356
|
+
return parseFloat(propValue);
|
|
1357
|
+
}
|
|
1358
|
+
if (propType & 1 /* String */) {
|
|
1359
|
+
return String(propValue);
|
|
1360
|
+
}
|
|
1361
|
+
return propValue;
|
|
1201
1362
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1363
|
+
return propValue;
|
|
1364
|
+
};
|
|
1365
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1366
|
+
|
|
1367
|
+
// src/runtime/event-emitter.ts
|
|
1368
|
+
var createEvent = (ref, name, flags) => {
|
|
1369
|
+
const elm = getElement(ref);
|
|
1370
|
+
return {
|
|
1371
|
+
emit: (detail) => {
|
|
1372
|
+
return emitEvent(elm, name, {
|
|
1373
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1374
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1375
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1376
|
+
detail
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
var emitEvent = (elm, name, opts) => {
|
|
1382
|
+
const ev = plt.ce(name, opts);
|
|
1383
|
+
elm.dispatchEvent(ev);
|
|
1384
|
+
return ev;
|
|
1385
|
+
};
|
|
1386
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1387
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1388
|
+
let style = styles.get(scopeId2);
|
|
1210
1389
|
{
|
|
1211
|
-
|
|
1212
|
-
checkSlotFallbackVisibility = false;
|
|
1390
|
+
style = cssText;
|
|
1213
1391
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1392
|
+
styles.set(scopeId2, style);
|
|
1393
|
+
};
|
|
1394
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1395
|
+
var _a;
|
|
1396
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1397
|
+
const style = styles.get(scopeId2);
|
|
1398
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
1399
|
+
if (style) {
|
|
1400
|
+
if (typeof style === "string") {
|
|
1401
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1402
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1403
|
+
let styleElm;
|
|
1404
|
+
if (!appliedStyles) {
|
|
1405
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1226
1406
|
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1237
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1238
|
-
refNode = refNode.nextSibling;
|
|
1239
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1240
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1241
|
-
}
|
|
1242
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
1243
|
-
insertBeforeNode = refNode;
|
|
1244
|
-
break;
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
1248
|
-
}
|
|
1407
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1408
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1409
|
+
styleElm.innerHTML = style;
|
|
1410
|
+
} else {
|
|
1411
|
+
styleElm = doc.createElement("style");
|
|
1412
|
+
styleElm.innerHTML = style;
|
|
1413
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
1414
|
+
if (nonce != null) {
|
|
1415
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1249
1416
|
}
|
|
1250
|
-
if (
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1417
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1418
|
+
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1419
|
+
}
|
|
1420
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1421
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1422
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1423
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1424
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
1425
|
+
} else if ("host" in styleContainerNode) {
|
|
1426
|
+
{
|
|
1427
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1428
|
+
if (existingStyleContainer) {
|
|
1429
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1430
|
+
} else {
|
|
1431
|
+
styleContainerNode.prepend(styleElm);
|
|
1432
|
+
}
|
|
1258
1433
|
}
|
|
1434
|
+
} else {
|
|
1435
|
+
styleContainerNode.append(styleElm);
|
|
1259
1436
|
}
|
|
1260
1437
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1264
|
-
if (isInitialLoad) {
|
|
1265
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1266
|
-
}
|
|
1267
|
-
nodeToRelocate.hidden = true;
|
|
1438
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
1439
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1268
1440
|
}
|
|
1269
1441
|
}
|
|
1442
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1443
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1444
|
+
}
|
|
1445
|
+
if (appliedStyles) {
|
|
1446
|
+
appliedStyles.add(scopeId2);
|
|
1447
|
+
}
|
|
1270
1448
|
}
|
|
1271
1449
|
}
|
|
1272
|
-
if (checkSlotFallbackVisibility) {
|
|
1273
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1274
|
-
}
|
|
1275
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1276
|
-
relocateNodes.length = 0;
|
|
1277
1450
|
}
|
|
1278
|
-
|
|
1451
|
+
return scopeId2;
|
|
1279
1452
|
};
|
|
1280
|
-
var
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1453
|
+
var attachStyles = (hostRef) => {
|
|
1454
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1455
|
+
const elm = hostRef.$hostElement$;
|
|
1456
|
+
const flags = cmpMeta.$flags$;
|
|
1457
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1458
|
+
const scopeId2 = addStyle(
|
|
1459
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1460
|
+
cmpMeta);
|
|
1461
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
1462
|
+
elm["s-sc"] = scopeId2;
|
|
1463
|
+
elm.classList.add(scopeId2 + "-h");
|
|
1464
|
+
}
|
|
1465
|
+
endAttachStyles();
|
|
1466
|
+
};
|
|
1467
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1286
1468
|
|
|
1287
1469
|
// src/runtime/update-component.ts
|
|
1288
1470
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -1516,16 +1698,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1516
1698
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1517
1699
|
members.map(([memberName, [memberFlags]]) => {
|
|
1518
1700
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1701
|
+
if ((memberFlags & 2048 /* Getter */) === 0) {
|
|
1702
|
+
Object.defineProperty(prototype, memberName, {
|
|
1703
|
+
get() {
|
|
1704
|
+
return getValue(this, memberName);
|
|
1705
|
+
},
|
|
1706
|
+
set(newValue) {
|
|
1707
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1708
|
+
},
|
|
1709
|
+
configurable: true,
|
|
1710
|
+
enumerable: true
|
|
1711
|
+
});
|
|
1712
|
+
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1713
|
+
{
|
|
1714
|
+
Object.defineProperty(prototype, memberName, {
|
|
1715
|
+
get() {
|
|
1716
|
+
const ref = getHostRef(this);
|
|
1717
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1718
|
+
if (!instance) return;
|
|
1719
|
+
return instance[memberName];
|
|
1720
|
+
},
|
|
1721
|
+
configurable: true,
|
|
1722
|
+
enumerable: true
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
if (memberFlags & 4096 /* Setter */) {
|
|
1726
|
+
const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
|
|
1727
|
+
Object.defineProperty(prototype, memberName, {
|
|
1728
|
+
set(newValue) {
|
|
1729
|
+
const ref = getHostRef(this);
|
|
1730
|
+
if (origSetter) {
|
|
1731
|
+
const currentValue = ref.$hostElement$[memberName];
|
|
1732
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1733
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1734
|
+
}
|
|
1735
|
+
origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
|
|
1736
|
+
setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
|
|
1737
|
+
return;
|
|
1738
|
+
}
|
|
1739
|
+
if (!ref) return;
|
|
1740
|
+
const setterSetVal = () => {
|
|
1741
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1742
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1743
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1744
|
+
}
|
|
1745
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1746
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1747
|
+
};
|
|
1748
|
+
if (ref.$lazyInstance$) {
|
|
1749
|
+
setterSetVal();
|
|
1750
|
+
} else {
|
|
1751
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1529
1757
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1530
1758
|
Object.defineProperty(prototype, memberName, {
|
|
1531
1759
|
value(...args) {
|
|
@@ -1565,7 +1793,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1565
1793
|
}
|
|
1566
1794
|
return;
|
|
1567
1795
|
}
|
|
1568
|
-
|
|
1796
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1797
|
+
if (!propDesc.get || !!propDesc.set) {
|
|
1798
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1799
|
+
}
|
|
1569
1800
|
});
|
|
1570
1801
|
};
|
|
1571
1802
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1726,6 +1957,9 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
1726
1957
|
childId = `${hostId}.${nodeId}`;
|
|
1727
1958
|
if (nodeRef.nodeType === 1 /* ElementNode */) {
|
|
1728
1959
|
nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
1960
|
+
if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
|
|
1961
|
+
nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
|
|
1962
|
+
}
|
|
1729
1963
|
} else if (nodeRef.nodeType === 3 /* TextNode */) {
|
|
1730
1964
|
if (hostId === 0) {
|
|
1731
1965
|
const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
|
|
@@ -1737,6 +1971,10 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
1737
1971
|
const commentBeforeTextNode = doc2.createComment(childId);
|
|
1738
1972
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
1739
1973
|
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
1974
|
+
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
1975
|
+
const commentBeforeTextNode = doc2.createComment(childId);
|
|
1976
|
+
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
1977
|
+
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
1740
1978
|
}
|
|
1741
1979
|
}
|
|
1742
1980
|
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
@@ -1817,6 +2055,9 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
1817
2055
|
childElm["s-node-id"] = nodeId;
|
|
1818
2056
|
if (childElm.nodeType === 1 /* ElementNode */) {
|
|
1819
2057
|
childElm.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
2058
|
+
if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
|
|
2059
|
+
childElm.setAttribute("s-sn", childElm["s-sn"]);
|
|
2060
|
+
}
|
|
1820
2061
|
} else if (childElm.nodeType === 3 /* TextNode */) {
|
|
1821
2062
|
const parentNode = childElm.parentNode;
|
|
1822
2063
|
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
@@ -2228,7 +2469,6 @@ var plt = {
|
|
|
2228
2469
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2229
2470
|
ce: (eventName, opts) => new win.CustomEvent(eventName, opts)
|
|
2230
2471
|
};
|
|
2231
|
-
var supportsShadow = BUILD.shadowDom;
|
|
2232
2472
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
2233
2473
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
2234
2474
|
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
@@ -5849,7 +6089,7 @@ var NAMESPACE = (
|
|
|
5849
6089
|
);
|
|
5850
6090
|
|
|
5851
6091
|
/*
|
|
5852
|
-
Stencil Hydrate Runner v4.
|
|
6092
|
+
Stencil Hydrate Runner v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
5853
6093
|
*/
|
|
5854
6094
|
var __defProp = Object.defineProperty;
|
|
5855
6095
|
var __export = (target, all) => {
|
|
@@ -16279,7 +16519,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
16279
16519
|
text: []
|
|
16280
16520
|
};
|
|
16281
16521
|
let renderedNode = "";
|
|
16282
|
-
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm
|
|
16522
|
+
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
|
|
16283
16523
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
16284
16524
|
const child = children[i];
|
|
16285
16525
|
const chunks = Array.from(streamToHtml(child, opts, output));
|
|
@@ -16312,7 +16552,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
16312
16552
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
16313
16553
|
yield "<" + tag;
|
|
16314
16554
|
output.currentLineWidth += tag.length + 1;
|
|
16315
|
-
if (tag === "template") {
|
|
16555
|
+
if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode"))) {
|
|
16316
16556
|
const mode = ` shadowrootmode="open"`;
|
|
16317
16557
|
yield mode;
|
|
16318
16558
|
output.currentLineWidth += mode.length;
|
|
@@ -16396,7 +16636,8 @@ style="${cssText}">`;
|
|
|
16396
16636
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
16397
16637
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
16398
16638
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
16399
|
-
|
|
16639
|
+
const childNodes = getChildNodes(node);
|
|
16640
|
+
if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
|
|
16400
16641
|
yield "\n";
|
|
16401
16642
|
output.currentLineWidth = 0;
|
|
16402
16643
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -16407,7 +16648,7 @@ style="${cssText}">`;
|
|
|
16407
16648
|
}
|
|
16408
16649
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
16409
16650
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
16410
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
16651
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
16411
16652
|
const childNodeLength = childNodes.length;
|
|
16412
16653
|
if (childNodeLength > 0) {
|
|
16413
16654
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -16580,6 +16821,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
16580
16821
|
}
|
|
16581
16822
|
return false;
|
|
16582
16823
|
}
|
|
16824
|
+
function getChildNodes(node) {
|
|
16825
|
+
return node.__childNodes || node.childNodes;
|
|
16826
|
+
}
|
|
16583
16827
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
16584
16828
|
"STYLE",
|
|
16585
16829
|
"SCRIPT",
|
|
@@ -16849,10 +17093,12 @@ var MockElement = class extends MockNode2 {
|
|
|
16849
17093
|
attachInternals() {
|
|
16850
17094
|
return new Proxy({}, {
|
|
16851
17095
|
get: function(_target, prop, _receiver) {
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
17096
|
+
if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
|
|
17097
|
+
console.error(
|
|
17098
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
17099
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
17100
|
+
);
|
|
17101
|
+
}
|
|
16856
17102
|
}
|
|
16857
17103
|
});
|
|
16858
17104
|
}
|
|
@@ -20059,11 +20305,11 @@ var unwrapErr = (result) => {
|
|
|
20059
20305
|
throw result.value;
|
|
20060
20306
|
}
|
|
20061
20307
|
};
|
|
20308
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20309
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20062
20310
|
|
|
20063
20311
|
// src/runtime/mode.ts
|
|
20064
20312
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
20065
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20066
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20067
20313
|
|
|
20068
20314
|
// src/compiler/html/canonical-link.ts
|
|
20069
20315
|
var updateCanonicalLink = (doc2, href) => {
|