@devschile/chucao 1.5.3 → 1.7.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/README.md +5 -3
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/p-0305f2eb.entry.js +2 -0
- package/dist/chucao/{p-117c93d3.entry.js.map → p-0305f2eb.entry.js.map} +1 -1
- package/dist/chucao/{p-b07c23e1.entry.js → p-053d58a4.entry.js} +2 -2
- package/dist/chucao/{p-bb82aaf8.entry.js → p-20492b73.entry.js} +2 -2
- package/dist/chucao/p-488c7838.entry.js +2 -0
- package/dist/chucao/{p-061ffcf3.entry.js → p-9a614e82.entry.js} +2 -2
- package/dist/chucao/{p-14d8a79c.entry.js → p-ad3206a2.entry.js} +2 -2
- package/dist/chucao/p-c598f978.entry.js +2 -0
- package/dist/chucao/p-c598f978.entry.js.map +1 -0
- package/dist/chucao/{p-c0c5522f.entry.js → p-fe8e9537.entry.js} +2 -2
- package/dist/chucao/p-pfWAsOzE.js +3 -0
- package/dist/chucao/p-pfWAsOzE.js.map +1 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/chucao.cjs.js +3 -3
- package/dist/cjs/chucao.cjs.js.map +1 -1
- package/dist/cjs/{index-D7ZSLrHc.js → index-ls4U227d.js} +715 -16
- package/dist/cjs/index-ls4U227d.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ch-alert/ch-alert.css +77 -0
- package/dist/collection/components/ch-alert/ch-alert.js +118 -0
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js.map +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/tokens/tokens.js +5 -1
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.d.ts +11 -0
- package/dist/components/ch-alert.js +2 -0
- package/dist/components/ch-alert.js.map +1 -0
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-button.js.map +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-card.js.map +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.d.ts +11 -0
- package/dist/components/ch-spinner.js +2 -0
- package/dist/components/ch-spinner.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-ONE3uKkF.js +2 -0
- package/dist/components/p-ONE3uKkF.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -0
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-B0AkgfgP.js → index-pfWAsOzE.js} +715 -16
- package/dist/esm/index-pfWAsOzE.js.map +1 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
- package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
- package/dist/types/components.d.ts +153 -0
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/tokens/tokens.d.ts +4 -0
- package/dist/types/tokens/types.d.ts +2 -2
- package/dist-react/components.d.ts +9 -1
- package/dist-react/components.js +18 -0
- package/dist-react/components.ts +25 -1
- package/dist-vue/index.d.ts +2 -0
- package/dist-vue/index.js +13 -0
- package/dist-vue/index.ts +17 -0
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +24405 -0
- package/hydrate/index.mjs +24395 -0
- package/hydrate/package.json +12 -0
- package/package.json +12 -2
- package/dist/chucao/p-117c93d3.entry.js +0 -2
- package/dist/chucao/p-B0AkgfgP.js +0 -3
- package/dist/chucao/p-B0AkgfgP.js.map +0 -1
- package/dist/chucao/p-c1edf460.entry.js +0 -2
- package/dist/chucao/p-fa56821f.entry.js +0 -2
- package/dist/chucao/p-fa56821f.entry.js.map +0 -1
- package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
- package/dist/cjs/index-D7ZSLrHc.js.map +0 -1
- package/dist/components/p-W-iJXblk.js +0 -2
- package/dist/components/p-W-iJXblk.js.map +0 -1
- package/dist/esm/ch-badge_6.entry.js.map +0 -1
- package/dist/esm/index-B0AkgfgP.js.map +0 -1
- /package/dist/chucao/{p-b07c23e1.entry.js.map → p-053d58a4.entry.js.map} +0 -0
- /package/dist/chucao/{p-bb82aaf8.entry.js.map → p-20492b73.entry.js.map} +0 -0
- /package/dist/chucao/{p-c1edf460.entry.js.map → p-488c7838.entry.js.map} +0 -0
- /package/dist/chucao/{p-061ffcf3.entry.js.map → p-9a614e82.entry.js.map} +0 -0
- /package/dist/chucao/{p-14d8a79c.entry.js.map → p-ad3206a2.entry.js.map} +0 -0
- /package/dist/chucao/{p-c0c5522f.entry.js.map → p-fe8e9537.entry.js.map} +0 -0
|
@@ -2,12 +2,36 @@ const NAMESPACE = 'chucao';
|
|
|
2
2
|
const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--easing-default:ease;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
5
|
+
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--duration-spin:800ms;--easing-default:ease;--easing-linear:linear;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
12
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
13
|
+
PrimitiveType2["Null"] = "null";
|
|
14
|
+
PrimitiveType2["String"] = "string";
|
|
15
|
+
PrimitiveType2["Number"] = "number";
|
|
16
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
17
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
18
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
19
|
+
return PrimitiveType2;
|
|
20
|
+
})(PrimitiveType || {});
|
|
21
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
22
|
+
NonPrimitiveType2["Array"] = "array";
|
|
23
|
+
NonPrimitiveType2["Date"] = "date";
|
|
24
|
+
NonPrimitiveType2["Map"] = "map";
|
|
25
|
+
NonPrimitiveType2["Object"] = "object";
|
|
26
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
27
|
+
NonPrimitiveType2["Set"] = "set";
|
|
28
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
29
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
30
|
+
return NonPrimitiveType2;
|
|
31
|
+
})(NonPrimitiveType || {});
|
|
32
|
+
var TYPE_CONSTANT = "type";
|
|
33
|
+
var VALUE_CONSTANT = "value";
|
|
34
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
11
35
|
|
|
12
36
|
// src/utils/get-prop-descriptor.ts
|
|
13
37
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
@@ -90,7 +114,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
90
114
|
|
|
91
115
|
// src/client/client-load-module.ts
|
|
92
116
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
117
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
93
118
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
119
|
+
var _a;
|
|
94
120
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
95
121
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
96
122
|
if (!bundleId) {
|
|
@@ -100,21 +126,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
100
126
|
if (module) {
|
|
101
127
|
return module[exportName];
|
|
102
128
|
}
|
|
129
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
130
|
+
const cacheBustParams = [
|
|
131
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
132
|
+
""
|
|
133
|
+
].filter(Boolean).join("&");
|
|
103
134
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
104
135
|
return import(
|
|
105
136
|
/* @vite-ignore */
|
|
106
137
|
/* webpackInclude: /\.entry\.js$/ */
|
|
107
138
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
108
139
|
/* webpackMode: "lazy" */
|
|
109
|
-
`./${bundleId}.entry.js${""}`
|
|
140
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
110
141
|
).then(
|
|
111
142
|
(importedModule) => {
|
|
112
143
|
{
|
|
144
|
+
failedLoadAttempts.delete(bundleId);
|
|
113
145
|
cmpModules.set(bundleId, importedModule);
|
|
114
146
|
}
|
|
115
147
|
return importedModule[exportName];
|
|
116
148
|
},
|
|
117
149
|
(e) => {
|
|
150
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
118
151
|
consoleError(e, hostRef.$hostElement$);
|
|
119
152
|
}
|
|
120
153
|
);
|
|
@@ -122,7 +155,19 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
122
155
|
|
|
123
156
|
// src/client/client-style.ts
|
|
124
157
|
var styles = /* @__PURE__ */ new Map();
|
|
158
|
+
|
|
159
|
+
// src/runtime/runtime-constants.ts
|
|
160
|
+
var CONTENT_REF_ID = "r";
|
|
161
|
+
var ORG_LOCATION_ID = "o";
|
|
162
|
+
var SLOT_NODE_ID = "s";
|
|
163
|
+
var TEXT_NODE_ID = "t";
|
|
164
|
+
var COMMENT_NODE_ID = "c";
|
|
165
|
+
var HYDRATE_ID = "s-id";
|
|
166
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
167
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
125
168
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
169
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
170
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
126
171
|
var win = typeof window !== "undefined" ? window : {};
|
|
127
172
|
var plt = {
|
|
128
173
|
$flags$: 0,
|
|
@@ -149,6 +194,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
149
194
|
var queuePending = false;
|
|
150
195
|
var queueDomReads = [];
|
|
151
196
|
var queueDomWrites = [];
|
|
197
|
+
var scheduleFlush = () => {
|
|
198
|
+
var _a;
|
|
199
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
200
|
+
};
|
|
152
201
|
var queueTask = (queue, write) => (cb) => {
|
|
153
202
|
queue.push(cb);
|
|
154
203
|
if (!queuePending) {
|
|
@@ -156,7 +205,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
156
205
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
157
206
|
nextTick(flush);
|
|
158
207
|
} else {
|
|
159
|
-
|
|
208
|
+
scheduleFlush();
|
|
160
209
|
}
|
|
161
210
|
}
|
|
162
211
|
};
|
|
@@ -175,7 +224,7 @@ var flush = () => {
|
|
|
175
224
|
{
|
|
176
225
|
consume(queueDomWrites);
|
|
177
226
|
if (queuePending = queueDomReads.length > 0) {
|
|
178
|
-
|
|
227
|
+
scheduleFlush();
|
|
179
228
|
}
|
|
180
229
|
}
|
|
181
230
|
};
|
|
@@ -209,6 +258,82 @@ function createShadowRoot(cmpMeta) {
|
|
|
209
258
|
shadowRoot.prepend(styleElm);
|
|
210
259
|
}
|
|
211
260
|
}
|
|
261
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
262
|
+
const result = [];
|
|
263
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
264
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
265
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
266
|
+
result.push(slottedNode);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return result;
|
|
270
|
+
};
|
|
271
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
272
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
276
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
277
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
278
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
279
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
280
|
+
if (typeof position !== "undefined") {
|
|
281
|
+
slottedNodeLocation["s-oo"] = position;
|
|
282
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
283
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
284
|
+
childNodes.forEach((n) => {
|
|
285
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
286
|
+
});
|
|
287
|
+
slotRelocateNodes.sort((a, b) => {
|
|
288
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
289
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
290
|
+
return 0;
|
|
291
|
+
});
|
|
292
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
293
|
+
} else {
|
|
294
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
295
|
+
}
|
|
296
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
297
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
298
|
+
};
|
|
299
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
300
|
+
function patchSlotNode(node) {
|
|
301
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
302
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
303
|
+
const toReturn = [];
|
|
304
|
+
const slotName = this["s-sn"];
|
|
305
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
306
|
+
console.error(`
|
|
307
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
308
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
309
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
310
|
+
`);
|
|
311
|
+
}
|
|
312
|
+
const parent = this["s-cr"].parentElement;
|
|
313
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
314
|
+
slottedNodes.forEach((n) => {
|
|
315
|
+
if (slotName === getSlotName(n)) {
|
|
316
|
+
toReturn.push(n);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
if (elementsOnly) {
|
|
320
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
321
|
+
}
|
|
322
|
+
return toReturn;
|
|
323
|
+
}).bind(node);
|
|
324
|
+
node.assignedElements = assignedFactory(true);
|
|
325
|
+
node.assignedNodes = assignedFactory(false);
|
|
326
|
+
}
|
|
327
|
+
function internalCall(node, method) {
|
|
328
|
+
if ("__" + method in node) {
|
|
329
|
+
const toReturn = node["__" + method];
|
|
330
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
331
|
+
return toReturn.bind(node);
|
|
332
|
+
} else {
|
|
333
|
+
if (typeof node[method] !== "function") return node[method];
|
|
334
|
+
return node[method].bind(node);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
212
337
|
var createTime = (fnName, tagName = "") => {
|
|
213
338
|
{
|
|
214
339
|
return () => {
|
|
@@ -262,7 +387,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
262
387
|
if (!appliedStyles) {
|
|
263
388
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
264
389
|
}
|
|
265
|
-
|
|
390
|
+
const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
391
|
+
if (existingStyleElm) {
|
|
392
|
+
existingStyleElm.textContent = style;
|
|
393
|
+
} else if (!appliedStyles.has(scopeId2)) {
|
|
266
394
|
styleElm = win.document.createElement("style");
|
|
267
395
|
styleElm.textContent = style;
|
|
268
396
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
@@ -331,6 +459,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
331
459
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
|
|
332
460
|
}
|
|
333
461
|
appliedStyles.add(scopeId2);
|
|
462
|
+
if ("host" in styleContainerNode) {
|
|
463
|
+
const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
464
|
+
if (ssrStyleElm) {
|
|
465
|
+
writeTask(() => ssrStyleElm.remove());
|
|
466
|
+
}
|
|
467
|
+
}
|
|
334
468
|
}
|
|
335
469
|
}
|
|
336
470
|
}
|
|
@@ -351,6 +485,17 @@ var attachStyles = (hostRef) => {
|
|
|
351
485
|
endAttachStyles();
|
|
352
486
|
};
|
|
353
487
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
488
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
489
|
+
var hydrateScopedToShadow = () => {
|
|
490
|
+
if (!win.document) {
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
494
|
+
let i2 = 0;
|
|
495
|
+
for (; i2 < styles2.length; i2++) {
|
|
496
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
354
499
|
var isComplexType = (o) => {
|
|
355
500
|
o = typeof o;
|
|
356
501
|
return o === "object" || o === "function";
|
|
@@ -374,6 +519,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
374
519
|
} else if (child != null && typeof child !== "boolean") {
|
|
375
520
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
376
521
|
child = String(child);
|
|
522
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
523
|
+
{
|
|
524
|
+
consoleError("Invalid vNode child");
|
|
525
|
+
}
|
|
526
|
+
continue;
|
|
377
527
|
}
|
|
378
528
|
if (simple && lastSimple) {
|
|
379
529
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -426,8 +576,511 @@ var newVNode = (tag, text) => {
|
|
|
426
576
|
var Host = {};
|
|
427
577
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
428
578
|
|
|
579
|
+
// src/runtime/client-hydrate.ts
|
|
580
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
581
|
+
var _a, _b, _c, _d;
|
|
582
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
583
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
584
|
+
const childRenderNodes = [];
|
|
585
|
+
const slotNodes = [];
|
|
586
|
+
const slottedNodes = [];
|
|
587
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
588
|
+
const vnode = newVNode(tagName, null);
|
|
589
|
+
vnode.$elm$ = hostElm;
|
|
590
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
591
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
592
|
+
}
|
|
593
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
594
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
595
|
+
hostRef.$vnode$ = clientHydrate(
|
|
596
|
+
vnode,
|
|
597
|
+
childRenderNodes,
|
|
598
|
+
slotNodes,
|
|
599
|
+
shadowRootNodes,
|
|
600
|
+
hostElm,
|
|
601
|
+
hostElm,
|
|
602
|
+
hostId,
|
|
603
|
+
slottedNodes
|
|
604
|
+
);
|
|
605
|
+
let crIndex = 0;
|
|
606
|
+
const crLength = childRenderNodes.length;
|
|
607
|
+
let childRenderNode;
|
|
608
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
609
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
610
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
611
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
612
|
+
const node = childRenderNode.$elm$;
|
|
613
|
+
if (!shadowRoot) {
|
|
614
|
+
node["s-hn"] = transformTag(tagName).toUpperCase();
|
|
615
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
616
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
617
|
+
}
|
|
618
|
+
} else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
619
|
+
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
620
|
+
if (cmpMeta) {
|
|
621
|
+
const scopeId3 = getScopeId(
|
|
622
|
+
cmpMeta.$cmpMeta$);
|
|
623
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
624
|
+
if (styleSheet) {
|
|
625
|
+
shadowRootNodes.unshift(styleSheet.cloneNode(true));
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
630
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
631
|
+
if (childRenderNode.$children$) {
|
|
632
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
633
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
634
|
+
childRenderNode.$children$.forEach((c) => {
|
|
635
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
} else {
|
|
639
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
643
|
+
if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
|
|
644
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
645
|
+
}
|
|
646
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
647
|
+
if (!shadowRoot) {
|
|
648
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (orgLocationNode && !orgLocationNode["s-id"]) {
|
|
652
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
const hosts = [];
|
|
656
|
+
const snLen = slottedNodes.length;
|
|
657
|
+
let snIndex = 0;
|
|
658
|
+
let slotGroup;
|
|
659
|
+
let snGroupIdx;
|
|
660
|
+
let snGroupLen;
|
|
661
|
+
let slottedItem;
|
|
662
|
+
let currentPos = 0;
|
|
663
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
664
|
+
slotGroup = slottedNodes[snIndex];
|
|
665
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
666
|
+
snGroupLen = slotGroup.length;
|
|
667
|
+
snGroupIdx = 0;
|
|
668
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
669
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
670
|
+
if (!hosts[slottedItem.hostId]) {
|
|
671
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
672
|
+
}
|
|
673
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
674
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
675
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
676
|
+
hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
|
|
677
|
+
}
|
|
678
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
679
|
+
if (!slottedItem.slot["s-cr"]) {
|
|
680
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
681
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
682
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
683
|
+
} else {
|
|
684
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
|
|
688
|
+
if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
689
|
+
slottedItem.node.removeAttribute("slot");
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
696
|
+
let rnIdex = 0;
|
|
697
|
+
const rnLen = shadowRootNodes.length;
|
|
698
|
+
if (rnLen) {
|
|
699
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
700
|
+
const node = shadowRootNodes[rnIdex];
|
|
701
|
+
if (node) {
|
|
702
|
+
shadowRoot.appendChild(node);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
706
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
707
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
708
|
+
node.removeAttribute("hidden");
|
|
709
|
+
} else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
|
|
710
|
+
node.parentNode.removeChild(node);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
hostRef.$hostElement$ = hostElm;
|
|
717
|
+
endHydrate();
|
|
718
|
+
};
|
|
719
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
720
|
+
let childNodeType;
|
|
721
|
+
let childIdSplt;
|
|
722
|
+
let childVNode;
|
|
723
|
+
let i2;
|
|
724
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
725
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
726
|
+
if (childNodeType) {
|
|
727
|
+
childIdSplt = childNodeType.split(".");
|
|
728
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
729
|
+
childVNode = createSimpleVNode({
|
|
730
|
+
$flags$: 0,
|
|
731
|
+
$hostId$: childIdSplt[0],
|
|
732
|
+
$nodeId$: childIdSplt[1],
|
|
733
|
+
$depth$: childIdSplt[2],
|
|
734
|
+
$index$: childIdSplt[3],
|
|
735
|
+
$tag$: node.tagName.toLowerCase(),
|
|
736
|
+
$elm$: node,
|
|
737
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
738
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
739
|
+
$attrs$: { class: node.className || "" }
|
|
740
|
+
});
|
|
741
|
+
childRenderNodes.push(childVNode);
|
|
742
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
743
|
+
if (!parentVNode.$children$) {
|
|
744
|
+
parentVNode.$children$ = [];
|
|
745
|
+
}
|
|
746
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
747
|
+
if (typeof slotName === "string") {
|
|
748
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
749
|
+
addSlot(
|
|
750
|
+
slotName,
|
|
751
|
+
childIdSplt[2],
|
|
752
|
+
childVNode,
|
|
753
|
+
node,
|
|
754
|
+
parentVNode,
|
|
755
|
+
childRenderNodes,
|
|
756
|
+
slotNodes,
|
|
757
|
+
shadowRootNodes,
|
|
758
|
+
slottedNodes
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
762
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
763
|
+
}
|
|
764
|
+
if (childVNode.$index$ !== void 0) {
|
|
765
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
766
|
+
}
|
|
767
|
+
parentVNode = childVNode;
|
|
768
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
769
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
if (node.shadowRoot) {
|
|
774
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
775
|
+
clientHydrate(
|
|
776
|
+
parentVNode,
|
|
777
|
+
childRenderNodes,
|
|
778
|
+
slotNodes,
|
|
779
|
+
shadowRootNodes,
|
|
780
|
+
hostElm,
|
|
781
|
+
node.shadowRoot.childNodes[i2],
|
|
782
|
+
hostId,
|
|
783
|
+
slottedNodes
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
788
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
789
|
+
clientHydrate(
|
|
790
|
+
parentVNode,
|
|
791
|
+
childRenderNodes,
|
|
792
|
+
slotNodes,
|
|
793
|
+
shadowRootNodes,
|
|
794
|
+
hostElm,
|
|
795
|
+
nonShadowNodes[i2],
|
|
796
|
+
hostId,
|
|
797
|
+
slottedNodes
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
801
|
+
childIdSplt = node.nodeValue.split(".");
|
|
802
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
803
|
+
childNodeType = childIdSplt[0];
|
|
804
|
+
childVNode = createSimpleVNode({
|
|
805
|
+
$hostId$: childIdSplt[1],
|
|
806
|
+
$nodeId$: childIdSplt[2],
|
|
807
|
+
$depth$: childIdSplt[3],
|
|
808
|
+
$index$: childIdSplt[4] || "0",
|
|
809
|
+
$elm$: node,
|
|
810
|
+
$attrs$: null,
|
|
811
|
+
$children$: null,
|
|
812
|
+
$key$: null,
|
|
813
|
+
$name$: null,
|
|
814
|
+
$tag$: null,
|
|
815
|
+
$text$: null
|
|
816
|
+
});
|
|
817
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
818
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
819
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
820
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
821
|
+
childRenderNodes.push(childVNode);
|
|
822
|
+
node.remove();
|
|
823
|
+
if (hostId === childVNode.$hostId$) {
|
|
824
|
+
if (!parentVNode.$children$) {
|
|
825
|
+
parentVNode.$children$ = [];
|
|
826
|
+
}
|
|
827
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
828
|
+
}
|
|
829
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
830
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
834
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
835
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
836
|
+
childRenderNodes.push(childVNode);
|
|
837
|
+
node.remove();
|
|
838
|
+
}
|
|
839
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
840
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
841
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
842
|
+
addSlot(
|
|
843
|
+
slotName,
|
|
844
|
+
childIdSplt[2],
|
|
845
|
+
childVNode,
|
|
846
|
+
node,
|
|
847
|
+
parentVNode,
|
|
848
|
+
childRenderNodes,
|
|
849
|
+
slotNodes,
|
|
850
|
+
shadowRootNodes,
|
|
851
|
+
slottedNodes
|
|
852
|
+
);
|
|
853
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
854
|
+
if (shadowRootNodes) {
|
|
855
|
+
node.remove();
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
861
|
+
const vnode = newVNode(null, node.textContent);
|
|
862
|
+
vnode.$elm$ = node;
|
|
863
|
+
vnode.$index$ = "0";
|
|
864
|
+
parentVNode.$children$ = [vnode];
|
|
865
|
+
}
|
|
866
|
+
return parentVNode;
|
|
867
|
+
};
|
|
868
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
869
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
870
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
871
|
+
if (componentId) {
|
|
872
|
+
orgLocNodes.set(componentId, node);
|
|
873
|
+
}
|
|
874
|
+
let i2 = 0;
|
|
875
|
+
if (node.shadowRoot) {
|
|
876
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
877
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
881
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
882
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
883
|
+
}
|
|
884
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
885
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
886
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
887
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
888
|
+
node.nodeValue = "";
|
|
889
|
+
node["s-en"] = childIdSplt[3];
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
var createSimpleVNode = (vnode) => {
|
|
894
|
+
const defaultVNode = {
|
|
895
|
+
$flags$: 0,
|
|
896
|
+
$hostId$: null,
|
|
897
|
+
$nodeId$: null,
|
|
898
|
+
$depth$: null,
|
|
899
|
+
$index$: "0",
|
|
900
|
+
$elm$: null,
|
|
901
|
+
$attrs$: null,
|
|
902
|
+
$children$: null,
|
|
903
|
+
$key$: null,
|
|
904
|
+
$name$: null,
|
|
905
|
+
$tag$: null,
|
|
906
|
+
$text$: null
|
|
907
|
+
};
|
|
908
|
+
return { ...defaultVNode, ...vnode };
|
|
909
|
+
};
|
|
910
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
911
|
+
node["s-sr"] = true;
|
|
912
|
+
childVNode.$name$ = slotName || null;
|
|
913
|
+
childVNode.$tag$ = "slot";
|
|
914
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
915
|
+
if (shadowRootNodes && win.document) {
|
|
916
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
917
|
+
if (childVNode.$name$) {
|
|
918
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
919
|
+
}
|
|
920
|
+
if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
921
|
+
internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
|
|
922
|
+
} else {
|
|
923
|
+
internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
|
|
924
|
+
}
|
|
925
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
926
|
+
node.remove();
|
|
927
|
+
if (childVNode.$depth$ === "0") {
|
|
928
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
929
|
+
}
|
|
930
|
+
} else {
|
|
931
|
+
const slot = childVNode.$elm$;
|
|
932
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
933
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
934
|
+
patchSlotNode(node);
|
|
935
|
+
if (shouldMove) {
|
|
936
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
childRenderNodes.push(childVNode);
|
|
940
|
+
slotNodes.push(childVNode);
|
|
941
|
+
if (!parentVNode.$children$) {
|
|
942
|
+
parentVNode.$children$ = [];
|
|
943
|
+
}
|
|
944
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
945
|
+
}
|
|
946
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
947
|
+
var _a, _b;
|
|
948
|
+
let slottedNode = slotNode.nextSibling;
|
|
949
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
950
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
951
|
+
do {
|
|
952
|
+
if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
953
|
+
slottedNode["s-sn"] = slotName;
|
|
954
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
955
|
+
}
|
|
956
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
957
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
958
|
+
};
|
|
959
|
+
var findCorrespondingNode = (node, type) => {
|
|
960
|
+
let sibling = node;
|
|
961
|
+
do {
|
|
962
|
+
sibling = sibling.nextSibling;
|
|
963
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
964
|
+
return sibling;
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
// src/utils/remote-value.ts
|
|
968
|
+
var RemoteValue = class _RemoteValue {
|
|
969
|
+
/**
|
|
970
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
971
|
+
*
|
|
972
|
+
* @param serialized The serialized LocalValue object
|
|
973
|
+
* @returns The original JavaScript value/object
|
|
974
|
+
*/
|
|
975
|
+
static fromLocalValue(serialized) {
|
|
976
|
+
const type = serialized[TYPE_CONSTANT];
|
|
977
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
978
|
+
switch (type) {
|
|
979
|
+
case "string" /* String */:
|
|
980
|
+
return value;
|
|
981
|
+
case "boolean" /* Boolean */:
|
|
982
|
+
return value;
|
|
983
|
+
case "bigint" /* BigInt */:
|
|
984
|
+
return BigInt(value);
|
|
985
|
+
case "undefined" /* Undefined */:
|
|
986
|
+
return void 0;
|
|
987
|
+
case "null" /* Null */:
|
|
988
|
+
return null;
|
|
989
|
+
case "number" /* Number */:
|
|
990
|
+
if (value === "NaN") return NaN;
|
|
991
|
+
if (value === "-0") return -0;
|
|
992
|
+
if (value === "Infinity") return Infinity;
|
|
993
|
+
if (value === "-Infinity") return -Infinity;
|
|
994
|
+
return value;
|
|
995
|
+
case "array" /* Array */:
|
|
996
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
997
|
+
case "date" /* Date */:
|
|
998
|
+
return new Date(value);
|
|
999
|
+
case "map" /* Map */:
|
|
1000
|
+
const map = /* @__PURE__ */ new Map();
|
|
1001
|
+
for (const [key, val] of value) {
|
|
1002
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
1003
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
1004
|
+
map.set(deserializedKey, deserializedValue);
|
|
1005
|
+
}
|
|
1006
|
+
return map;
|
|
1007
|
+
case "object" /* Object */:
|
|
1008
|
+
const obj = {};
|
|
1009
|
+
for (const [key, val] of value) {
|
|
1010
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
1011
|
+
}
|
|
1012
|
+
return obj;
|
|
1013
|
+
case "regexp" /* RegularExpression */:
|
|
1014
|
+
const { pattern, flags } = value;
|
|
1015
|
+
return new RegExp(pattern, flags);
|
|
1016
|
+
case "set" /* Set */:
|
|
1017
|
+
const set = /* @__PURE__ */ new Set();
|
|
1018
|
+
for (const item of value) {
|
|
1019
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
1020
|
+
}
|
|
1021
|
+
return set;
|
|
1022
|
+
case "symbol" /* Symbol */:
|
|
1023
|
+
return Symbol(value);
|
|
1024
|
+
default:
|
|
1025
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
1030
|
+
*
|
|
1031
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
1032
|
+
* @returns Array of deserialized JavaScript values
|
|
1033
|
+
*/
|
|
1034
|
+
static fromLocalValueArray(serializedValues) {
|
|
1035
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
1039
|
+
*
|
|
1040
|
+
* @param obj Object to verify
|
|
1041
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
1042
|
+
*/
|
|
1043
|
+
static isLocalValueObject(obj) {
|
|
1044
|
+
if (typeof obj !== "object" || obj === null) {
|
|
1045
|
+
return false;
|
|
1046
|
+
}
|
|
1047
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
1048
|
+
return false;
|
|
1049
|
+
}
|
|
1050
|
+
const type = obj[TYPE_CONSTANT];
|
|
1051
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
1052
|
+
if (!hasTypeProperty) {
|
|
1053
|
+
return false;
|
|
1054
|
+
}
|
|
1055
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
1056
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
1057
|
+
}
|
|
1058
|
+
return true;
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
// src/utils/serialize.ts
|
|
1063
|
+
function decodeBase64Unicode(base64) {
|
|
1064
|
+
const binary = atob(base64);
|
|
1065
|
+
const bytes = new Uint8Array(binary.length);
|
|
1066
|
+
for (let i2 = 0; i2 < binary.length; i2++) {
|
|
1067
|
+
bytes[i2] = binary.charCodeAt(i2);
|
|
1068
|
+
}
|
|
1069
|
+
return new TextDecoder().decode(bytes);
|
|
1070
|
+
}
|
|
1071
|
+
function deserializeProperty(value) {
|
|
1072
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
1073
|
+
return value;
|
|
1074
|
+
}
|
|
1075
|
+
return RemoteValue.fromLocalValue(JSON.parse(decodeBase64Unicode(value.slice(SERIALIZED_PREFIX.length))));
|
|
1076
|
+
}
|
|
1077
|
+
|
|
429
1078
|
// src/runtime/parse-property-value.ts
|
|
430
1079
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1080
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1081
|
+
propValue = deserializeProperty(propValue);
|
|
1082
|
+
return propValue;
|
|
1083
|
+
}
|
|
431
1084
|
if (propValue != null && !isComplexType(propValue)) {
|
|
432
1085
|
if (propType & 4 /* Boolean */) {
|
|
433
1086
|
{
|
|
@@ -478,7 +1131,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
478
1131
|
const classList = elm.classList;
|
|
479
1132
|
const oldClasses = parseClassList(oldValue);
|
|
480
1133
|
let newClasses = parseClassList(newValue);
|
|
481
|
-
{
|
|
1134
|
+
if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
|
|
1135
|
+
const scopeId2 = elm["s-sc"] || elm["s-si"];
|
|
1136
|
+
newClasses.push(scopeId2);
|
|
1137
|
+
oldClasses.forEach((c) => {
|
|
1138
|
+
if (c.startsWith(scopeId2)) newClasses.push(c);
|
|
1139
|
+
});
|
|
1140
|
+
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
1141
|
+
classList.add(...newClasses);
|
|
1142
|
+
} else {
|
|
482
1143
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
483
1144
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
484
1145
|
}
|
|
@@ -596,7 +1257,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
596
1257
|
oldVnodeAttrs[memberName],
|
|
597
1258
|
void 0,
|
|
598
1259
|
isSvgMode2,
|
|
599
|
-
newVnode.$flags
|
|
1260
|
+
newVnode.$flags$,
|
|
1261
|
+
isInitialRender
|
|
1262
|
+
);
|
|
600
1263
|
}
|
|
601
1264
|
}
|
|
602
1265
|
}
|
|
@@ -607,7 +1270,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
607
1270
|
oldVnodeAttrs[memberName],
|
|
608
1271
|
newVnodeAttrs[memberName],
|
|
609
1272
|
isSvgMode2,
|
|
610
|
-
newVnode.$flags
|
|
1273
|
+
newVnode.$flags$,
|
|
1274
|
+
isInitialRender
|
|
1275
|
+
);
|
|
611
1276
|
}
|
|
612
1277
|
};
|
|
613
1278
|
function sortedAttrNames(attrNames) {
|
|
@@ -815,7 +1480,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
815
1480
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
816
1481
|
}
|
|
817
1482
|
}
|
|
818
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1483
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
819
1484
|
}
|
|
820
1485
|
if (oldChildren !== null && newChildren !== null) {
|
|
821
1486
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -829,7 +1494,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
829
1494
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
830
1495
|
) {
|
|
831
1496
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
832
|
-
} else
|
|
1497
|
+
} else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
|
|
1498
|
+
newVNode2.$children$ = oldChildren;
|
|
1499
|
+
}
|
|
833
1500
|
} else if (oldVNode.$text$ !== text) {
|
|
834
1501
|
elm.data = text;
|
|
835
1502
|
}
|
|
@@ -1029,7 +1696,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1029
1696
|
}
|
|
1030
1697
|
};
|
|
1031
1698
|
var appDidLoad = (who) => {
|
|
1699
|
+
var _a;
|
|
1032
1700
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1701
|
+
{
|
|
1702
|
+
if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
|
|
1703
|
+
plt.$orgLocNodes$.clear();
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1033
1706
|
};
|
|
1034
1707
|
var safeCall = (instance, method, arg, elm) => {
|
|
1035
1708
|
if (instance && instance[method]) {
|
|
@@ -1217,10 +1890,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1217
1890
|
|
|
1218
1891
|
// src/runtime/initialize-component.ts
|
|
1219
1892
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1893
|
+
var _a;
|
|
1220
1894
|
let Cstr;
|
|
1221
1895
|
try {
|
|
1222
1896
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1223
1897
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1898
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1224
1899
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1225
1900
|
if (bundleId) {
|
|
1226
1901
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
@@ -1232,6 +1907,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1232
1907
|
Cstr = CstrImport;
|
|
1233
1908
|
}
|
|
1234
1909
|
if (!Cstr) {
|
|
1910
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1911
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1912
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1913
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1914
|
+
}
|
|
1235
1915
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1236
1916
|
}
|
|
1237
1917
|
if (!Cstr.isProxied) {
|
|
@@ -1285,7 +1965,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1285
1965
|
hostRef.$onRenderResolve$();
|
|
1286
1966
|
hostRef.$onRenderResolve$ = void 0;
|
|
1287
1967
|
}
|
|
1288
|
-
if (hostRef.$onReadyResolve$) {
|
|
1968
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1289
1969
|
hostRef.$onReadyResolve$(elm);
|
|
1290
1970
|
}
|
|
1291
1971
|
}
|
|
@@ -1307,10 +1987,21 @@ var connectedCallback = (elm) => {
|
|
|
1307
1987
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1308
1988
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1309
1989
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1990
|
+
let hostId;
|
|
1991
|
+
{
|
|
1992
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1993
|
+
if (hostId) {
|
|
1994
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1995
|
+
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
|
|
1996
|
+
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
1997
|
+
}
|
|
1998
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
1310
2001
|
{
|
|
1311
2002
|
let ancestorComponent = elm;
|
|
1312
2003
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1313
|
-
if (ancestorComponent["s-p"]) {
|
|
2004
|
+
if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
1314
2005
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1315
2006
|
break;
|
|
1316
2007
|
}
|
|
@@ -1331,6 +2022,8 @@ var connectedCallback = (elm) => {
|
|
|
1331
2022
|
} else {
|
|
1332
2023
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1333
2024
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2025
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2026
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
1334
2027
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1335
2028
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1336
2029
|
}
|
|
@@ -1379,6 +2072,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1379
2072
|
let isBootstrapping = true;
|
|
1380
2073
|
Object.assign(plt, options);
|
|
1381
2074
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2075
|
+
{
|
|
2076
|
+
plt.$flags$ |= 2 /* appLoaded */;
|
|
2077
|
+
}
|
|
2078
|
+
{
|
|
2079
|
+
hydrateScopedToShadow();
|
|
2080
|
+
}
|
|
1382
2081
|
lazyBundles.map((lazyBundle) => {
|
|
1383
2082
|
lazyBundle[1].map((compactMeta) => {
|
|
1384
2083
|
const cmpMeta = {
|
|
@@ -1434,7 +2133,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1434
2133
|
}
|
|
1435
2134
|
disconnectedCallback() {
|
|
1436
2135
|
plt.jmp(() => disconnectedCallback(this));
|
|
1437
|
-
|
|
2136
|
+
nextTick(() => {
|
|
1438
2137
|
var _a3;
|
|
1439
2138
|
const hostRef = getHostRef(this);
|
|
1440
2139
|
if (!hostRef) {
|
|
@@ -1492,6 +2191,6 @@ function transformTag(tag) {
|
|
|
1492
2191
|
}
|
|
1493
2192
|
|
|
1494
2193
|
export { Host as H, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1495
|
-
//# sourceMappingURL=index-
|
|
2194
|
+
//# sourceMappingURL=index-pfWAsOzE.js.map
|
|
1496
2195
|
|
|
1497
|
-
//# sourceMappingURL=index-
|
|
2196
|
+
//# sourceMappingURL=index-pfWAsOzE.js.map
|