@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
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'biggive';
|
|
24
|
-
const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges:
|
|
24
|
+
const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, 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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -89,6 +89,7 @@ var CONTENT_REF_ID = "r";
|
|
|
89
89
|
var ORG_LOCATION_ID = "o";
|
|
90
90
|
var SLOT_NODE_ID = "s";
|
|
91
91
|
var TEXT_NODE_ID = "t";
|
|
92
|
+
var COMMENT_NODE_ID = "c";
|
|
92
93
|
var HYDRATE_ID = "s-id";
|
|
93
94
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
94
95
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -107,7 +108,6 @@ var plt = {
|
|
|
107
108
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
108
109
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
109
110
|
};
|
|
110
|
-
var supportsShadow = BUILD.shadowDom;
|
|
111
111
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
112
112
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
113
113
|
try {
|
|
@@ -225,20 +225,6 @@ var unwrapErr = (result) => {
|
|
|
225
225
|
throw result.value;
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
var createTime = (fnName, tagName = "") => {
|
|
229
|
-
{
|
|
230
|
-
return () => {
|
|
231
|
-
return;
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
var uniqueTime = (key, measureText) => {
|
|
236
|
-
{
|
|
237
|
-
return () => {
|
|
238
|
-
return;
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
228
|
var h = (nodeName, vnodeData, ...children) => {
|
|
243
229
|
let child = null;
|
|
244
230
|
let key = null;
|
|
@@ -350,436 +336,117 @@ var convertToPrivate = (node) => {
|
|
|
350
336
|
vnode.$name$ = node.vname;
|
|
351
337
|
return vnode;
|
|
352
338
|
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
364
|
-
}
|
|
365
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
366
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
367
|
-
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
368
|
-
childRenderNodes.map((c) => {
|
|
369
|
-
const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
|
|
370
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
371
|
-
const node = c.$elm$;
|
|
372
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
373
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
374
|
-
}
|
|
375
|
-
if (!shadowRoot) {
|
|
376
|
-
node["s-hn"] = tagName;
|
|
377
|
-
if (orgLocationNode) {
|
|
378
|
-
node["s-ol"] = orgLocationNode;
|
|
379
|
-
node["s-ol"]["s-nr"] = node;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
383
|
-
});
|
|
384
|
-
if (shadowRoot) {
|
|
385
|
-
shadowRootNodes.map((shadowRootNode) => {
|
|
386
|
-
if (shadowRootNode) {
|
|
387
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
339
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
340
|
+
if (oldValue !== newValue) {
|
|
341
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
342
|
+
let ln = memberName.toLowerCase();
|
|
343
|
+
if (memberName === "class") {
|
|
344
|
+
const classList = elm.classList;
|
|
345
|
+
const oldClasses = parseClassList(oldValue);
|
|
346
|
+
const newClasses = parseClassList(newValue);
|
|
347
|
+
if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
|
|
348
|
+
newClasses.push(elm["s-si"]);
|
|
388
349
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
childIdSplt = childNodeType.split(".");
|
|
402
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
403
|
-
childVNode = {
|
|
404
|
-
$flags$: 0,
|
|
405
|
-
$hostId$: childIdSplt[0],
|
|
406
|
-
$nodeId$: childIdSplt[1],
|
|
407
|
-
$depth$: childIdSplt[2],
|
|
408
|
-
$index$: childIdSplt[3],
|
|
409
|
-
$tag$: node.tagName.toLowerCase(),
|
|
410
|
-
$elm$: node,
|
|
411
|
-
$attrs$: null,
|
|
412
|
-
$children$: null,
|
|
413
|
-
$key$: null,
|
|
414
|
-
$name$: null,
|
|
415
|
-
$text$: null
|
|
416
|
-
};
|
|
417
|
-
childRenderNodes.push(childVNode);
|
|
418
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
419
|
-
if (!parentVNode.$children$) {
|
|
420
|
-
parentVNode.$children$ = [];
|
|
350
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
351
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
352
|
+
} else if (memberName === "style") {
|
|
353
|
+
{
|
|
354
|
+
for (const prop in oldValue) {
|
|
355
|
+
if (!newValue || newValue[prop] == null) {
|
|
356
|
+
if (prop.includes("-")) {
|
|
357
|
+
elm.style.removeProperty(prop);
|
|
358
|
+
} else {
|
|
359
|
+
elm.style[prop] = "";
|
|
360
|
+
}
|
|
361
|
+
}
|
|
421
362
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
if (
|
|
425
|
-
|
|
363
|
+
}
|
|
364
|
+
for (const prop in newValue) {
|
|
365
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
366
|
+
if (prop.includes("-")) {
|
|
367
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
368
|
+
} else {
|
|
369
|
+
elm.style[prop] = newValue[prop];
|
|
370
|
+
}
|
|
426
371
|
}
|
|
427
372
|
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
clientHydrate(
|
|
432
|
-
parentVNode,
|
|
433
|
-
childRenderNodes,
|
|
434
|
-
slotNodes,
|
|
435
|
-
shadowRootNodes,
|
|
436
|
-
hostElm,
|
|
437
|
-
node.shadowRoot.childNodes[i2],
|
|
438
|
-
hostId
|
|
439
|
-
);
|
|
373
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
374
|
+
if (newValue) {
|
|
375
|
+
newValue(elm);
|
|
440
376
|
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
childIdSplt = node.nodeValue.split(".");
|
|
455
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
456
|
-
childNodeType = childIdSplt[0];
|
|
457
|
-
childVNode = {
|
|
458
|
-
$flags$: 0,
|
|
459
|
-
$hostId$: childIdSplt[1],
|
|
460
|
-
$nodeId$: childIdSplt[2],
|
|
461
|
-
$depth$: childIdSplt[3],
|
|
462
|
-
$index$: childIdSplt[4],
|
|
463
|
-
$elm$: node,
|
|
464
|
-
$attrs$: null,
|
|
465
|
-
$children$: null,
|
|
466
|
-
$key$: null,
|
|
467
|
-
$name$: null,
|
|
468
|
-
$tag$: null,
|
|
469
|
-
$text$: null
|
|
470
|
-
};
|
|
471
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
472
|
-
childVNode.$elm$ = node.nextSibling;
|
|
473
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
474
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
475
|
-
childRenderNodes.push(childVNode);
|
|
476
|
-
node.remove();
|
|
477
|
-
if (!parentVNode.$children$) {
|
|
478
|
-
parentVNode.$children$ = [];
|
|
479
|
-
}
|
|
480
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
481
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
482
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
483
|
-
}
|
|
377
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
378
|
+
if (memberName[2] === "-") {
|
|
379
|
+
memberName = memberName.slice(3);
|
|
380
|
+
} else if (isMemberInElement(win, ln)) {
|
|
381
|
+
memberName = ln.slice(2);
|
|
382
|
+
} else {
|
|
383
|
+
memberName = ln[2] + memberName.slice(3);
|
|
384
|
+
}
|
|
385
|
+
if (oldValue || newValue) {
|
|
386
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
387
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
388
|
+
if (oldValue) {
|
|
389
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
484
390
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
391
|
+
if (newValue) {
|
|
392
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
const isComplex = isComplexType(newValue);
|
|
397
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
398
|
+
try {
|
|
399
|
+
if (!elm.tagName.includes("-")) {
|
|
400
|
+
const n = newValue == null ? "" : newValue;
|
|
401
|
+
if (memberName === "list") {
|
|
402
|
+
isProp = false;
|
|
403
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
404
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
405
|
+
elm[memberName] = n;
|
|
406
|
+
} else {
|
|
407
|
+
elm.setAttribute(memberName, n);
|
|
408
|
+
}
|
|
503
409
|
}
|
|
504
|
-
}
|
|
505
|
-
slotNodes.push(childVNode);
|
|
506
|
-
if (!parentVNode.$children$) {
|
|
507
|
-
parentVNode.$children$ = [];
|
|
508
|
-
}
|
|
509
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
510
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
511
|
-
if (shadowRootNodes) {
|
|
512
|
-
node.remove();
|
|
513
410
|
} else {
|
|
514
|
-
|
|
515
|
-
|
|
411
|
+
elm[memberName] = newValue;
|
|
412
|
+
}
|
|
413
|
+
} catch (e) {
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
if (newValue == null || newValue === false) {
|
|
417
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
418
|
+
{
|
|
419
|
+
elm.removeAttribute(memberName);
|
|
516
420
|
}
|
|
517
421
|
}
|
|
422
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
423
|
+
newValue = newValue === true ? "" : newValue;
|
|
424
|
+
{
|
|
425
|
+
elm.setAttribute(memberName, newValue);
|
|
426
|
+
}
|
|
518
427
|
}
|
|
519
428
|
}
|
|
520
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
521
|
-
const vnode = newVNode(null, node.textContent);
|
|
522
|
-
vnode.$elm$ = node;
|
|
523
|
-
vnode.$index$ = "0";
|
|
524
|
-
parentVNode.$children$ = [vnode];
|
|
525
429
|
}
|
|
526
430
|
};
|
|
527
|
-
var
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
431
|
+
var parseClassListRegex = /\s/;
|
|
432
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
433
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
434
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
435
|
+
|
|
436
|
+
// src/runtime/vdom/update-element.ts
|
|
437
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
438
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
439
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
440
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
441
|
+
{
|
|
442
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
443
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
444
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
533
445
|
}
|
|
534
446
|
}
|
|
535
|
-
for (i2 = 0; i2 < node.childNodes.length; i2++) {
|
|
536
|
-
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
537
|
-
}
|
|
538
|
-
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
539
|
-
const childIdSplt = node.nodeValue.split(".");
|
|
540
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
541
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
542
|
-
node.nodeValue = "";
|
|
543
|
-
node["s-en"] = childIdSplt[3];
|
|
544
|
-
}
|
|
545
447
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
549
|
-
if (propType & 4 /* Boolean */) {
|
|
550
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
551
|
-
}
|
|
552
|
-
if (propType & 2 /* Number */) {
|
|
553
|
-
return parseFloat(propValue);
|
|
554
|
-
}
|
|
555
|
-
if (propType & 1 /* String */) {
|
|
556
|
-
return String(propValue);
|
|
557
|
-
}
|
|
558
|
-
return propValue;
|
|
559
|
-
}
|
|
560
|
-
return propValue;
|
|
561
|
-
};
|
|
562
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
563
|
-
|
|
564
|
-
// src/runtime/event-emitter.ts
|
|
565
|
-
var createEvent = (ref, name, flags) => {
|
|
566
|
-
const elm = getElement(ref);
|
|
567
|
-
return {
|
|
568
|
-
emit: (detail) => {
|
|
569
|
-
return emitEvent(elm, name, {
|
|
570
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
571
|
-
composed: !!(flags & 2 /* Composed */),
|
|
572
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
573
|
-
detail
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
};
|
|
578
|
-
var emitEvent = (elm, name, opts) => {
|
|
579
|
-
const ev = plt.ce(name, opts);
|
|
580
|
-
elm.dispatchEvent(ev);
|
|
581
|
-
return ev;
|
|
582
|
-
};
|
|
583
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
584
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
585
|
-
let style = styles.get(scopeId2);
|
|
586
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
587
|
-
style = style || new CSSStyleSheet();
|
|
588
|
-
if (typeof style === "string") {
|
|
589
|
-
style = cssText;
|
|
590
|
-
} else {
|
|
591
|
-
style.replaceSync(cssText);
|
|
592
|
-
}
|
|
593
|
-
} else {
|
|
594
|
-
style = cssText;
|
|
595
|
-
}
|
|
596
|
-
styles.set(scopeId2, style);
|
|
597
|
-
};
|
|
598
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
599
|
-
var _a;
|
|
600
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
601
|
-
const style = styles.get(scopeId2);
|
|
602
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
603
|
-
if (style) {
|
|
604
|
-
if (typeof style === "string") {
|
|
605
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
606
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
607
|
-
let styleElm;
|
|
608
|
-
if (!appliedStyles) {
|
|
609
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
610
|
-
}
|
|
611
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
612
|
-
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
613
|
-
styleElm.innerHTML = style;
|
|
614
|
-
} else {
|
|
615
|
-
styleElm = doc.createElement("style");
|
|
616
|
-
styleElm.innerHTML = style;
|
|
617
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
618
|
-
if (nonce != null) {
|
|
619
|
-
styleElm.setAttribute("nonce", nonce);
|
|
620
|
-
}
|
|
621
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
622
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
623
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
624
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
625
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
626
|
-
} else if ("host" in styleContainerNode) {
|
|
627
|
-
if (supportsConstructableStylesheets) {
|
|
628
|
-
const stylesheet = new CSSStyleSheet();
|
|
629
|
-
stylesheet.replaceSync(style);
|
|
630
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
631
|
-
} else {
|
|
632
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
633
|
-
if (existingStyleContainer) {
|
|
634
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
635
|
-
} else {
|
|
636
|
-
styleContainerNode.prepend(styleElm);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
} else {
|
|
640
|
-
styleContainerNode.append(styleElm);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
644
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
648
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
649
|
-
}
|
|
650
|
-
if (appliedStyles) {
|
|
651
|
-
appliedStyles.add(scopeId2);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
655
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
return scopeId2;
|
|
659
|
-
};
|
|
660
|
-
var attachStyles = (hostRef) => {
|
|
661
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
662
|
-
const elm = hostRef.$hostElement$;
|
|
663
|
-
const flags = cmpMeta.$flags$;
|
|
664
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
665
|
-
const scopeId2 = addStyle(
|
|
666
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
667
|
-
cmpMeta);
|
|
668
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
669
|
-
elm["s-sc"] = scopeId2;
|
|
670
|
-
elm.classList.add(scopeId2 + "-h");
|
|
671
|
-
}
|
|
672
|
-
endAttachStyles();
|
|
673
|
-
};
|
|
674
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
675
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
676
|
-
if (oldValue !== newValue) {
|
|
677
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
678
|
-
let ln = memberName.toLowerCase();
|
|
679
|
-
if (memberName === "class") {
|
|
680
|
-
const classList = elm.classList;
|
|
681
|
-
const oldClasses = parseClassList(oldValue);
|
|
682
|
-
const newClasses = parseClassList(newValue);
|
|
683
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
684
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
685
|
-
} else if (memberName === "style") {
|
|
686
|
-
{
|
|
687
|
-
for (const prop in oldValue) {
|
|
688
|
-
if (!newValue || newValue[prop] == null) {
|
|
689
|
-
if (prop.includes("-")) {
|
|
690
|
-
elm.style.removeProperty(prop);
|
|
691
|
-
} else {
|
|
692
|
-
elm.style[prop] = "";
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
for (const prop in newValue) {
|
|
698
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
699
|
-
if (prop.includes("-")) {
|
|
700
|
-
elm.style.setProperty(prop, newValue[prop]);
|
|
701
|
-
} else {
|
|
702
|
-
elm.style[prop] = newValue[prop];
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
707
|
-
if (newValue) {
|
|
708
|
-
newValue(elm);
|
|
709
|
-
}
|
|
710
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
711
|
-
if (memberName[2] === "-") {
|
|
712
|
-
memberName = memberName.slice(3);
|
|
713
|
-
} else if (isMemberInElement(win, ln)) {
|
|
714
|
-
memberName = ln.slice(2);
|
|
715
|
-
} else {
|
|
716
|
-
memberName = ln[2] + memberName.slice(3);
|
|
717
|
-
}
|
|
718
|
-
if (oldValue || newValue) {
|
|
719
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
720
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
721
|
-
if (oldValue) {
|
|
722
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
723
|
-
}
|
|
724
|
-
if (newValue) {
|
|
725
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
} else {
|
|
729
|
-
const isComplex = isComplexType(newValue);
|
|
730
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
731
|
-
try {
|
|
732
|
-
if (!elm.tagName.includes("-")) {
|
|
733
|
-
const n = newValue == null ? "" : newValue;
|
|
734
|
-
if (memberName === "list") {
|
|
735
|
-
isProp = false;
|
|
736
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
737
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
738
|
-
elm[memberName] = n;
|
|
739
|
-
} else {
|
|
740
|
-
elm.setAttribute(memberName, n);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
} else {
|
|
744
|
-
elm[memberName] = newValue;
|
|
745
|
-
}
|
|
746
|
-
} catch (e) {
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
if (newValue == null || newValue === false) {
|
|
750
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
751
|
-
{
|
|
752
|
-
elm.removeAttribute(memberName);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
756
|
-
newValue = newValue === true ? "" : newValue;
|
|
757
|
-
{
|
|
758
|
-
elm.setAttribute(memberName, newValue);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
};
|
|
764
|
-
var parseClassListRegex = /\s/;
|
|
765
|
-
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
766
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
767
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
768
|
-
|
|
769
|
-
// src/runtime/vdom/update-element.ts
|
|
770
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
771
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
772
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
773
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
774
|
-
{
|
|
775
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
776
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
777
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
782
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
448
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
449
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
783
450
|
}
|
|
784
451
|
};
|
|
785
452
|
function sortedAttrNames(attrNames) {
|
|
@@ -885,8 +552,12 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
885
552
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
886
553
|
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
887
554
|
if (host != null) {
|
|
888
|
-
const contentRefNode = Array.from(host.childNodes).find(
|
|
889
|
-
|
|
555
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
556
|
+
(ref) => ref["s-cr"]
|
|
557
|
+
);
|
|
558
|
+
const childNodeArray = Array.from(
|
|
559
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
560
|
+
);
|
|
890
561
|
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
891
562
|
if (childNode["s-sh"] != null) {
|
|
892
563
|
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
@@ -899,7 +570,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
899
570
|
};
|
|
900
571
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
901
572
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
902
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
573
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
903
574
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
904
575
|
let node = parentElm;
|
|
905
576
|
while (node = node.nextSibling) {
|
|
@@ -1118,7 +789,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1118
789
|
}
|
|
1119
790
|
};
|
|
1120
791
|
var updateFallbackSlotVisibility = (elm) => {
|
|
1121
|
-
const childNodes = elm.childNodes;
|
|
792
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
1122
793
|
for (const childNode of childNodes) {
|
|
1123
794
|
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1124
795
|
if (childNode["s-sr"]) {
|
|
@@ -1131,7 +802,7 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
1131
802
|
childNode.hidden = true;
|
|
1132
803
|
break;
|
|
1133
804
|
}
|
|
1134
|
-
} else {
|
|
805
|
+
} else if (slotName === siblingNode["s-sn"]) {
|
|
1135
806
|
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1136
807
|
childNode.hidden = true;
|
|
1137
808
|
break;
|
|
@@ -1149,9 +820,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1149
820
|
let node;
|
|
1150
821
|
let hostContentNodes;
|
|
1151
822
|
let j;
|
|
1152
|
-
|
|
823
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
824
|
+
for (const childNode of children) {
|
|
1153
825
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1154
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
826
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1155
827
|
const slotName = childNode["s-sn"];
|
|
1156
828
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1157
829
|
node = hostContentNodes[j];
|
|
@@ -1188,125 +860,649 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1188
860
|
}
|
|
1189
861
|
}
|
|
1190
862
|
}
|
|
1191
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1192
|
-
markSlotContentForRelocation(childNode);
|
|
863
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
864
|
+
markSlotContentForRelocation(childNode);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
869
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
870
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
871
|
+
return true;
|
|
872
|
+
}
|
|
873
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
874
|
+
return true;
|
|
875
|
+
}
|
|
876
|
+
return false;
|
|
877
|
+
}
|
|
878
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
return slotName === "";
|
|
882
|
+
};
|
|
883
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
884
|
+
{
|
|
885
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
886
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
890
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
891
|
+
return inserted;
|
|
892
|
+
};
|
|
893
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
894
|
+
var _a, _b, _c, _d, _e;
|
|
895
|
+
const hostElm = hostRef.$hostElement$;
|
|
896
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
897
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
898
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
899
|
+
hostTagName = hostElm.tagName;
|
|
900
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
901
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
902
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
903
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
rootVnode.$tag$ = null;
|
|
908
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
909
|
+
hostRef.$vnode$ = rootVnode;
|
|
910
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
911
|
+
{
|
|
912
|
+
scopeId = hostElm["s-sc"];
|
|
913
|
+
}
|
|
914
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
915
|
+
{
|
|
916
|
+
contentRef = hostElm["s-cr"];
|
|
917
|
+
checkSlotFallbackVisibility = false;
|
|
918
|
+
}
|
|
919
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
920
|
+
{
|
|
921
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
922
|
+
if (checkSlotRelocate) {
|
|
923
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
924
|
+
for (const relocateData of relocateNodes) {
|
|
925
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
926
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
927
|
+
const orgLocationNode = doc.createTextNode("");
|
|
928
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
929
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
for (const relocateData of relocateNodes) {
|
|
933
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
934
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
935
|
+
if (slotRefNode) {
|
|
936
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
937
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
938
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
939
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
940
|
+
while (orgLocationNode) {
|
|
941
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
942
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
943
|
+
refNode = refNode.nextSibling;
|
|
944
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
945
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
946
|
+
}
|
|
947
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
948
|
+
insertBeforeNode = refNode;
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
956
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
957
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
958
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
959
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
|
|
964
|
+
} else {
|
|
965
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
966
|
+
if (isInitialLoad) {
|
|
967
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
968
|
+
}
|
|
969
|
+
nodeToRelocate.hidden = true;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (checkSlotFallbackVisibility) {
|
|
975
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
976
|
+
}
|
|
977
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
978
|
+
relocateNodes.length = 0;
|
|
979
|
+
}
|
|
980
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
981
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
982
|
+
for (const childNode of children) {
|
|
983
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
984
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
985
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
986
|
+
}
|
|
987
|
+
childNode.hidden = true;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
contentRef = void 0;
|
|
992
|
+
};
|
|
993
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
994
|
+
let slottedNodeLocation;
|
|
995
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
996
|
+
slottedNodeLocation = newChild["s-ol"];
|
|
997
|
+
} else {
|
|
998
|
+
slottedNodeLocation = document.createTextNode("");
|
|
999
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
1000
|
+
}
|
|
1001
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
1002
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
1003
|
+
const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
|
|
1004
|
+
if (typeof position !== "undefined") {
|
|
1005
|
+
{
|
|
1006
|
+
slottedNodeLocation["s-oo"] = position;
|
|
1007
|
+
const childNodes = parent.__childNodes || parent.childNodes;
|
|
1008
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
1009
|
+
childNodes.forEach((n) => {
|
|
1010
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
1011
|
+
});
|
|
1012
|
+
slotRelocateNodes.sort((a, b) => {
|
|
1013
|
+
if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
|
|
1014
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
1015
|
+
return 0;
|
|
1016
|
+
});
|
|
1017
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
1018
|
+
}
|
|
1019
|
+
} else {
|
|
1020
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
1021
|
+
}
|
|
1022
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
1023
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
1024
|
+
};
|
|
1025
|
+
var createTime = (fnName, tagName = "") => {
|
|
1026
|
+
{
|
|
1027
|
+
return () => {
|
|
1028
|
+
return;
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
var uniqueTime = (key, measureText) => {
|
|
1033
|
+
{
|
|
1034
|
+
return () => {
|
|
1035
|
+
return;
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
// src/runtime/client-hydrate.ts
|
|
1041
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1042
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
1043
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
1044
|
+
const childRenderNodes = [];
|
|
1045
|
+
const slotNodes = [];
|
|
1046
|
+
const slottedNodes = [];
|
|
1047
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
1048
|
+
const vnode = newVNode(tagName, null);
|
|
1049
|
+
vnode.$elm$ = hostElm;
|
|
1050
|
+
if (!plt.$orgLocNodes$) {
|
|
1051
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1052
|
+
}
|
|
1053
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
1054
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
1055
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1056
|
+
vnode,
|
|
1057
|
+
childRenderNodes,
|
|
1058
|
+
slotNodes,
|
|
1059
|
+
shadowRootNodes,
|
|
1060
|
+
hostElm,
|
|
1061
|
+
hostElm,
|
|
1062
|
+
hostId,
|
|
1063
|
+
slottedNodes
|
|
1064
|
+
);
|
|
1065
|
+
let crIndex = 0;
|
|
1066
|
+
const crLength = childRenderNodes.length;
|
|
1067
|
+
let childRenderNode;
|
|
1068
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1069
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1070
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
1071
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1072
|
+
const node = childRenderNode.$elm$;
|
|
1073
|
+
if (!shadowRoot) {
|
|
1074
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1075
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1076
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1080
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1081
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1082
|
+
}
|
|
1083
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1084
|
+
if (!shadowRoot) {
|
|
1085
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1089
|
+
}
|
|
1090
|
+
const hosts = [];
|
|
1091
|
+
let snIndex = 0;
|
|
1092
|
+
const snLen = slottedNodes.length;
|
|
1093
|
+
let slotGroup;
|
|
1094
|
+
let snGroupIdx;
|
|
1095
|
+
let snGroupLen;
|
|
1096
|
+
let slottedItem;
|
|
1097
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1098
|
+
slotGroup = slottedNodes[snIndex];
|
|
1099
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1100
|
+
snGroupLen = slotGroup.length;
|
|
1101
|
+
snGroupIdx = 0;
|
|
1102
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1103
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1104
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1105
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1106
|
+
}
|
|
1107
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1108
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1109
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1110
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1111
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1112
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1113
|
+
} else {
|
|
1114
|
+
const hostChildren = hostEle.__childNodes || hostEle.childNodes;
|
|
1115
|
+
slottedItem.slot["s-cr"] = hostChildren[0];
|
|
1116
|
+
}
|
|
1117
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1118
|
+
}
|
|
1119
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1120
|
+
hostEle.appendChild(slottedItem.node);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
if (shadowRoot) {
|
|
1125
|
+
let rnIdex = 0;
|
|
1126
|
+
const rnLen = shadowRootNodes.length;
|
|
1127
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1128
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1129
|
+
}
|
|
1130
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1131
|
+
if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
|
|
1132
|
+
node.parentNode.removeChild(node);
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
hostRef.$hostElement$ = hostElm;
|
|
1137
|
+
endHydrate();
|
|
1138
|
+
};
|
|
1139
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
1140
|
+
let childNodeType;
|
|
1141
|
+
let childIdSplt;
|
|
1142
|
+
let childVNode;
|
|
1143
|
+
let i2;
|
|
1144
|
+
const scopeId2 = hostElm["s-sc"];
|
|
1145
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1146
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1147
|
+
if (childNodeType) {
|
|
1148
|
+
childIdSplt = childNodeType.split(".");
|
|
1149
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
1150
|
+
childVNode = createSimpleVNode({
|
|
1151
|
+
$flags$: 0,
|
|
1152
|
+
$hostId$: childIdSplt[0],
|
|
1153
|
+
$nodeId$: childIdSplt[1],
|
|
1154
|
+
$depth$: childIdSplt[2],
|
|
1155
|
+
$index$: childIdSplt[3],
|
|
1156
|
+
$tag$: node.tagName.toLowerCase(),
|
|
1157
|
+
$elm$: node,
|
|
1158
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
|
|
1159
|
+
// client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
|
|
1160
|
+
$attrs$: { class: node.className }
|
|
1161
|
+
});
|
|
1162
|
+
childRenderNodes.push(childVNode);
|
|
1163
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1164
|
+
if (!parentVNode.$children$) {
|
|
1165
|
+
parentVNode.$children$ = [];
|
|
1166
|
+
}
|
|
1167
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1168
|
+
if (typeof slotName === "string") {
|
|
1169
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
1170
|
+
addSlot(
|
|
1171
|
+
slotName,
|
|
1172
|
+
childIdSplt[2],
|
|
1173
|
+
childVNode,
|
|
1174
|
+
node,
|
|
1175
|
+
parentVNode,
|
|
1176
|
+
childRenderNodes,
|
|
1177
|
+
slotNodes,
|
|
1178
|
+
shadowRootNodes,
|
|
1179
|
+
slottedNodes
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
1183
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
1184
|
+
}
|
|
1185
|
+
if (childVNode.$index$ !== void 0) {
|
|
1186
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1187
|
+
}
|
|
1188
|
+
if (scopeId2) node["s-si"] = scopeId2;
|
|
1189
|
+
parentVNode = childVNode;
|
|
1190
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1191
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
if (node.shadowRoot) {
|
|
1196
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1197
|
+
clientHydrate(
|
|
1198
|
+
parentVNode,
|
|
1199
|
+
childRenderNodes,
|
|
1200
|
+
slotNodes,
|
|
1201
|
+
shadowRootNodes,
|
|
1202
|
+
hostElm,
|
|
1203
|
+
node.shadowRoot.childNodes[i2],
|
|
1204
|
+
hostId,
|
|
1205
|
+
slottedNodes
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1210
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
1211
|
+
clientHydrate(
|
|
1212
|
+
parentVNode,
|
|
1213
|
+
childRenderNodes,
|
|
1214
|
+
slotNodes,
|
|
1215
|
+
shadowRootNodes,
|
|
1216
|
+
hostElm,
|
|
1217
|
+
nonShadowNodes[i2],
|
|
1218
|
+
hostId,
|
|
1219
|
+
slottedNodes
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1223
|
+
childIdSplt = node.nodeValue.split(".");
|
|
1224
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1225
|
+
childNodeType = childIdSplt[0];
|
|
1226
|
+
childVNode = createSimpleVNode({
|
|
1227
|
+
$hostId$: childIdSplt[1],
|
|
1228
|
+
$nodeId$: childIdSplt[2],
|
|
1229
|
+
$depth$: childIdSplt[3],
|
|
1230
|
+
$index$: childIdSplt[4] || "0",
|
|
1231
|
+
$elm$: node,
|
|
1232
|
+
$attrs$: null,
|
|
1233
|
+
$children$: null,
|
|
1234
|
+
$key$: null,
|
|
1235
|
+
$name$: null,
|
|
1236
|
+
$tag$: null,
|
|
1237
|
+
$text$: null
|
|
1238
|
+
});
|
|
1239
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
1240
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1241
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1242
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1243
|
+
childRenderNodes.push(childVNode);
|
|
1244
|
+
node.remove();
|
|
1245
|
+
if (hostId === childVNode.$hostId$) {
|
|
1246
|
+
if (!parentVNode.$children$) {
|
|
1247
|
+
parentVNode.$children$ = [];
|
|
1248
|
+
}
|
|
1249
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1250
|
+
}
|
|
1251
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1252
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1256
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1257
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1258
|
+
childRenderNodes.push(childVNode);
|
|
1259
|
+
node.remove();
|
|
1260
|
+
}
|
|
1261
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
1262
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
1263
|
+
childVNode.$tag$ = "slot";
|
|
1264
|
+
const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
|
|
1265
|
+
addSlot(
|
|
1266
|
+
slotName,
|
|
1267
|
+
childIdSplt[2],
|
|
1268
|
+
childVNode,
|
|
1269
|
+
node,
|
|
1270
|
+
parentVNode,
|
|
1271
|
+
childRenderNodes,
|
|
1272
|
+
slotNodes,
|
|
1273
|
+
shadowRootNodes,
|
|
1274
|
+
slottedNodes
|
|
1275
|
+
);
|
|
1276
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1277
|
+
if (shadowRootNodes) {
|
|
1278
|
+
node.remove();
|
|
1279
|
+
} else {
|
|
1280
|
+
hostElm["s-cr"] = node;
|
|
1281
|
+
node["s-cn"] = true;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1287
|
+
const vnode = newVNode(null, node.textContent);
|
|
1288
|
+
vnode.$elm$ = node;
|
|
1289
|
+
vnode.$index$ = "0";
|
|
1290
|
+
parentVNode.$children$ = [vnode];
|
|
1291
|
+
}
|
|
1292
|
+
return parentVNode;
|
|
1293
|
+
};
|
|
1294
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1295
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1296
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1297
|
+
if (componentId) {
|
|
1298
|
+
orgLocNodes.set(componentId, node);
|
|
1299
|
+
}
|
|
1300
|
+
let i2 = 0;
|
|
1301
|
+
if (node.shadowRoot) {
|
|
1302
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1303
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1307
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1308
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1309
|
+
}
|
|
1310
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1311
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1312
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1313
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1314
|
+
node.nodeValue = "";
|
|
1315
|
+
node["s-en"] = childIdSplt[3];
|
|
1193
1316
|
}
|
|
1194
1317
|
}
|
|
1195
1318
|
};
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1319
|
+
var createSimpleVNode = (vnode) => {
|
|
1320
|
+
const defaultVNode = {
|
|
1321
|
+
$flags$: 0,
|
|
1322
|
+
$hostId$: null,
|
|
1323
|
+
$nodeId$: null,
|
|
1324
|
+
$depth$: null,
|
|
1325
|
+
$index$: "0",
|
|
1326
|
+
$elm$: null,
|
|
1327
|
+
$attrs$: null,
|
|
1328
|
+
$children$: null,
|
|
1329
|
+
$key$: null,
|
|
1330
|
+
$name$: null,
|
|
1331
|
+
$tag$: null,
|
|
1332
|
+
$text$: null
|
|
1333
|
+
};
|
|
1334
|
+
return { ...defaultVNode, ...vnode };
|
|
1335
|
+
};
|
|
1336
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1337
|
+
node["s-sr"] = true;
|
|
1338
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1339
|
+
if (shadowRootNodes) {
|
|
1340
|
+
const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
1341
|
+
if (childVNode.$name$) {
|
|
1342
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1343
|
+
}
|
|
1344
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1345
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1346
|
+
} else {
|
|
1347
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1200
1348
|
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1349
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1350
|
+
node.remove();
|
|
1351
|
+
if (childVNode.$depth$ === "0") {
|
|
1352
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1203
1353
|
}
|
|
1204
|
-
|
|
1354
|
+
} else {
|
|
1355
|
+
const slot = childVNode.$elm$;
|
|
1356
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1357
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1358
|
+
if (shouldMove) {
|
|
1359
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1360
|
+
}
|
|
1361
|
+
childRenderNodes.push(childVNode);
|
|
1205
1362
|
}
|
|
1206
|
-
|
|
1207
|
-
|
|
1363
|
+
slotNodes.push(childVNode);
|
|
1364
|
+
if (!parentVNode.$children$) {
|
|
1365
|
+
parentVNode.$children$ = [];
|
|
1366
|
+
}
|
|
1367
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1368
|
+
}
|
|
1369
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1370
|
+
let slottedNode = slotNode.nextSibling;
|
|
1371
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1372
|
+
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 */))) {
|
|
1373
|
+
slottedNode["s-sn"] = slotName;
|
|
1374
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1375
|
+
slottedNode = slottedNode.nextSibling;
|
|
1208
1376
|
}
|
|
1209
|
-
return slotName === "";
|
|
1210
1377
|
};
|
|
1211
|
-
var
|
|
1212
|
-
{
|
|
1213
|
-
|
|
1214
|
-
|
|
1378
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
1379
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1380
|
+
if (propType & 4 /* Boolean */) {
|
|
1381
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1382
|
+
}
|
|
1383
|
+
if (propType & 2 /* Number */) {
|
|
1384
|
+
return parseFloat(propValue);
|
|
1385
|
+
}
|
|
1386
|
+
if (propType & 1 /* String */) {
|
|
1387
|
+
return String(propValue);
|
|
1388
|
+
}
|
|
1389
|
+
return propValue;
|
|
1215
1390
|
}
|
|
1391
|
+
return propValue;
|
|
1216
1392
|
};
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1219
|
-
|
|
1393
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1394
|
+
|
|
1395
|
+
// src/runtime/event-emitter.ts
|
|
1396
|
+
var createEvent = (ref, name, flags) => {
|
|
1397
|
+
const elm = getElement(ref);
|
|
1398
|
+
return {
|
|
1399
|
+
emit: (detail) => {
|
|
1400
|
+
return emitEvent(elm, name, {
|
|
1401
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1402
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1403
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1404
|
+
detail
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
};
|
|
1220
1408
|
};
|
|
1221
|
-
var
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1409
|
+
var emitEvent = (elm, name, opts) => {
|
|
1410
|
+
const ev = plt.ce(name, opts);
|
|
1411
|
+
elm.dispatchEvent(ev);
|
|
1412
|
+
return ev;
|
|
1413
|
+
};
|
|
1414
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1415
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1416
|
+
let style = styles.get(scopeId2);
|
|
1417
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1418
|
+
style = style || new CSSStyleSheet();
|
|
1419
|
+
if (typeof style === "string") {
|
|
1420
|
+
style = cssText;
|
|
1421
|
+
} else {
|
|
1422
|
+
style.replaceSync(cssText);
|
|
1233
1423
|
}
|
|
1424
|
+
} else {
|
|
1425
|
+
style = cssText;
|
|
1234
1426
|
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1250
|
-
if (checkSlotRelocate) {
|
|
1251
|
-
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1252
|
-
for (const relocateData of relocateNodes) {
|
|
1253
|
-
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1254
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1255
|
-
const orgLocationNode = doc.createTextNode("");
|
|
1256
|
-
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1257
|
-
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1258
|
-
}
|
|
1427
|
+
styles.set(scopeId2, style);
|
|
1428
|
+
};
|
|
1429
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1430
|
+
var _a;
|
|
1431
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1432
|
+
const style = styles.get(scopeId2);
|
|
1433
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
1434
|
+
if (style) {
|
|
1435
|
+
if (typeof style === "string") {
|
|
1436
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1437
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1438
|
+
let styleElm;
|
|
1439
|
+
if (!appliedStyles) {
|
|
1440
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1259
1441
|
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1270
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1271
|
-
refNode = refNode.nextSibling;
|
|
1272
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1273
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1274
|
-
}
|
|
1275
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
1276
|
-
insertBeforeNode = refNode;
|
|
1277
|
-
break;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
1281
|
-
}
|
|
1442
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1443
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1444
|
+
styleElm.innerHTML = style;
|
|
1445
|
+
} else {
|
|
1446
|
+
styleElm = doc.createElement("style");
|
|
1447
|
+
styleElm.innerHTML = style;
|
|
1448
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
1449
|
+
if (nonce != null) {
|
|
1450
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1282
1451
|
}
|
|
1283
|
-
if (!
|
|
1284
|
-
if (
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1452
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1453
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1454
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1455
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1456
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
1457
|
+
} else if ("host" in styleContainerNode) {
|
|
1458
|
+
if (supportsConstructableStylesheets) {
|
|
1459
|
+
const stylesheet = new CSSStyleSheet();
|
|
1460
|
+
stylesheet.replaceSync(style);
|
|
1461
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1462
|
+
} else {
|
|
1463
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1464
|
+
if (existingStyleContainer) {
|
|
1465
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1466
|
+
} else {
|
|
1467
|
+
styleContainerNode.prepend(styleElm);
|
|
1468
|
+
}
|
|
1288
1469
|
}
|
|
1470
|
+
} else {
|
|
1471
|
+
styleContainerNode.append(styleElm);
|
|
1289
1472
|
}
|
|
1290
1473
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1294
|
-
if (isInitialLoad) {
|
|
1295
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1296
|
-
}
|
|
1297
|
-
nodeToRelocate.hidden = true;
|
|
1474
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
1475
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1298
1476
|
}
|
|
1299
1477
|
}
|
|
1478
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1479
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1480
|
+
}
|
|
1481
|
+
if (appliedStyles) {
|
|
1482
|
+
appliedStyles.add(scopeId2);
|
|
1483
|
+
}
|
|
1300
1484
|
}
|
|
1485
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1486
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1301
1487
|
}
|
|
1302
|
-
if (checkSlotFallbackVisibility) {
|
|
1303
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1304
|
-
}
|
|
1305
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1306
|
-
relocateNodes.length = 0;
|
|
1307
1488
|
}
|
|
1308
|
-
|
|
1489
|
+
return scopeId2;
|
|
1490
|
+
};
|
|
1491
|
+
var attachStyles = (hostRef) => {
|
|
1492
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1493
|
+
const elm = hostRef.$hostElement$;
|
|
1494
|
+
const flags = cmpMeta.$flags$;
|
|
1495
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1496
|
+
const scopeId2 = addStyle(
|
|
1497
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1498
|
+
cmpMeta);
|
|
1499
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
1500
|
+
elm["s-sc"] = scopeId2;
|
|
1501
|
+
elm.classList.add(scopeId2 + "-h");
|
|
1502
|
+
}
|
|
1503
|
+
endAttachStyles();
|
|
1309
1504
|
};
|
|
1505
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1310
1506
|
|
|
1311
1507
|
// src/runtime/update-component.ts
|
|
1312
1508
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -1514,16 +1710,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1514
1710
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1515
1711
|
members.map(([memberName, [memberFlags]]) => {
|
|
1516
1712
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1713
|
+
if ((memberFlags & 2048 /* Getter */) === 0) {
|
|
1714
|
+
Object.defineProperty(prototype, memberName, {
|
|
1715
|
+
get() {
|
|
1716
|
+
return getValue(this, memberName);
|
|
1717
|
+
},
|
|
1718
|
+
set(newValue) {
|
|
1719
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1720
|
+
},
|
|
1721
|
+
configurable: true,
|
|
1722
|
+
enumerable: true
|
|
1723
|
+
});
|
|
1724
|
+
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1725
|
+
{
|
|
1726
|
+
Object.defineProperty(prototype, memberName, {
|
|
1727
|
+
get() {
|
|
1728
|
+
const ref = getHostRef(this);
|
|
1729
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1730
|
+
if (!instance) return;
|
|
1731
|
+
return instance[memberName];
|
|
1732
|
+
},
|
|
1733
|
+
configurable: true,
|
|
1734
|
+
enumerable: true
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
if (memberFlags & 4096 /* Setter */) {
|
|
1738
|
+
const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
|
|
1739
|
+
Object.defineProperty(prototype, memberName, {
|
|
1740
|
+
set(newValue) {
|
|
1741
|
+
const ref = getHostRef(this);
|
|
1742
|
+
if (origSetter) {
|
|
1743
|
+
const currentValue = ref.$hostElement$[memberName];
|
|
1744
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1745
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1746
|
+
}
|
|
1747
|
+
origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
|
|
1748
|
+
setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
if (!ref) return;
|
|
1752
|
+
const setterSetVal = () => {
|
|
1753
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1754
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1755
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1756
|
+
}
|
|
1757
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1758
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1759
|
+
};
|
|
1760
|
+
if (ref.$lazyInstance$) {
|
|
1761
|
+
setterSetVal();
|
|
1762
|
+
} else {
|
|
1763
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1527
1769
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1528
1770
|
Object.defineProperty(prototype, memberName, {
|
|
1529
1771
|
value(...args) {
|
|
@@ -1563,7 +1805,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1563
1805
|
}
|
|
1564
1806
|
return;
|
|
1565
1807
|
}
|
|
1566
|
-
|
|
1808
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1809
|
+
if (!propDesc.get || !!propDesc.set) {
|
|
1810
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1811
|
+
}
|
|
1567
1812
|
});
|
|
1568
1813
|
};
|
|
1569
1814
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1857,4 +2102,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
1857
2102
|
exports.registerInstance = registerInstance;
|
|
1858
2103
|
exports.setNonce = setNonce;
|
|
1859
2104
|
|
|
1860
|
-
//# sourceMappingURL=index-
|
|
2105
|
+
//# sourceMappingURL=index-c0a19159.js.map
|