@stencil/core 2.18.0 → 2.19.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/cli/index.cjs +275 -218
- package/cli/index.d.ts +3 -0
- package/cli/index.js +275 -218
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.d.ts +2 -2
- package/compiler/stencil.js +49510 -47947
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +1 -1
- package/dev-server/client/index.d.ts +2 -2
- package/dev-server/client/index.js +241 -241
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +1 -1
- package/dev-server/index.js +2 -2
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1230 -1199
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +619 -601
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +119 -119
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +1 -1
- package/internal/hydrate/runner.js +100 -100
- package/internal/package.json +1 -1
- package/internal/stencil-core/index.d.ts +8 -10
- package/internal/stencil-private.d.ts +104 -42
- package/internal/stencil-public-compiler.d.ts +12 -2
- package/internal/stencil-public-docs.d.ts +20 -0
- package/internal/stencil-public-runtime.d.ts +20 -4
- package/internal/testing/index.js +148 -148
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +655 -645
- package/mock-doc/index.js +655 -645
- package/mock-doc/package.json +1 -1
- package/package.json +29 -37
- package/readme.md +27 -33
- package/screenshot/index.d.ts +1 -1
- package/screenshot/index.js +3 -3
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +983 -849
- package/sys/node/autoprefixer.js +5 -5
- package/sys/node/glob.js +1 -1
- package/sys/node/graceful-fs.js +1 -1
- package/sys/node/index.d.ts +4 -0
- package/sys/node/index.js +373 -374
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +6 -6
- package/testing/index.js +468 -467
- package/testing/jest/jest-config.d.ts +1 -1
- package/testing/matchers/index.d.ts +3 -3
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +2 -2
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-element.d.ts +2 -2
- package/testing/puppeteer/puppeteer-events.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Patch Browser v2.
|
|
2
|
+
Stencil Client Patch Browser v2.19.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
import { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';
|
|
5
5
|
import { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Patch Esm v2.
|
|
2
|
+
Stencil Client Patch Esm v2.19.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
import { BUILD } from '@stencil/core/internal/app-data';
|
|
5
5
|
import { CSS, plt, win, promiseResolve } from '@stencil/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
@@ -184,19 +184,10 @@ export { BUILD, Env, NAMESPACE } from "@stencil/core/internal/app-data";
|
|
|
184
184
|
|
|
185
185
|
import { globalScripts } from "@stencil/core/internal/app-globals";
|
|
186
186
|
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
plt.ael(l, n, a, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(l, n, a, r)));
|
|
192
|
-
})));
|
|
193
|
-
}, hostListenerProxy = (e, t) => o => {
|
|
194
|
-
try {
|
|
195
|
-
BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](o) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, o ]) : e.$hostElement$[t](o);
|
|
196
|
-
} catch (e) {
|
|
197
|
-
consoleError(e);
|
|
198
|
-
}
|
|
199
|
-
}, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
187
|
+
const getAssetPath = e => {
|
|
188
|
+
const t = new URL(e, plt.$resourcesUrl$);
|
|
189
|
+
return t.origin !== win.location.origin ? t.href : t.pathname;
|
|
190
|
+
}, setAssetPath = e => plt.$resourcesUrl$ = e;
|
|
200
191
|
|
|
201
192
|
let i = 0;
|
|
202
193
|
|
|
@@ -206,36 +197,7 @@ const createTime = (e, t = "") => {
|
|
|
206
197
|
return performance.mark(o), () => performance.measure(`[Stencil] ${e}() <${t}>`, o);
|
|
207
198
|
}
|
|
208
199
|
return () => {};
|
|
209
|
-
},
|
|
210
|
-
let n = styles.get(e);
|
|
211
|
-
n = t, styles.set(e, n);
|
|
212
|
-
}, addStyle = (e, t, o, n) => {
|
|
213
|
-
let s = getScopeId(t, o);
|
|
214
|
-
const l = styles.get(s);
|
|
215
|
-
if (!BUILD.attachStyles) return s;
|
|
216
|
-
if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
|
|
217
|
-
e = e.head || e;
|
|
218
|
-
let o, a = rootAppliedStyles.get(e);
|
|
219
|
-
if (a || rootAppliedStyles.set(e, a = new Set), !a.has(s)) {
|
|
220
|
-
if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${s}"]`))) o.innerHTML = l; else {
|
|
221
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
222
|
-
o = plt.$cssShim$.createHostStyle(n, s, l, !!(10 & t.$flags$));
|
|
223
|
-
const e = o["s-sc"];
|
|
224
|
-
e && (s = e, a = null);
|
|
225
|
-
} else o = doc.createElement("style"), o.innerHTML = l;
|
|
226
|
-
(BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && o.setAttribute("sty-id", s),
|
|
227
|
-
e.insertBefore(o, e.querySelector("link"));
|
|
228
|
-
}
|
|
229
|
-
a && a.add(s);
|
|
230
|
-
}
|
|
231
|
-
} else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
|
|
232
|
-
return s;
|
|
233
|
-
}, attachStyles = e => {
|
|
234
|
-
const t = e.$cmpMeta$, o = e.$hostElement$, n = t.$flags$, s = createTime("attachStyles", t.$tagName$), l = addStyle(BUILD.shadowDom && supportsShadow && o.shadowRoot ? o.shadowRoot : o.getRootNode(), t, e.$modeName$, o);
|
|
235
|
-
(BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && 10 & n && (o["s-sc"] = l,
|
|
236
|
-
o.classList.add(l + "-h"), BUILD.scoped && 2 & n && o.classList.add(l + "-s")),
|
|
237
|
-
s();
|
|
238
|
-
}, getScopeId = (e, t) => "sc-" + (BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), setMode = e => modeResolutionChain.push(e), getMode = e => getHostRef(e).$modeName$, EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, h = (e, t, ...o) => {
|
|
200
|
+
}, XLINK_NS = "http://www.w3.org/1999/xlink", EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, h = (e, t, ...o) => {
|
|
239
201
|
let n = null, s = null, l = null, a = !1, r = !1;
|
|
240
202
|
const i = [], d = t => {
|
|
241
203
|
for (let o = 0; o < t.length; o++) n = t[o], Array.isArray(n) ? d(n) : null != n && "boolean" != typeof n && ((a = "function" != typeof e && !isComplexType(n)) ? n = String(n) : BUILD.isDev && "function" != typeof e && n.$flags$,
|
|
@@ -284,7 +246,102 @@ const createTime = (e, t = "") => {
|
|
|
284
246
|
const t = Object.keys(e);
|
|
285
247
|
-1 !== t.indexOf("value") && (t.indexOf("type"), t.indexOf("min"), t.indexOf("max"),
|
|
286
248
|
t.indexOf("step"));
|
|
287
|
-
},
|
|
249
|
+
}, clientHydrate = (e, t, o, n, s, l, a) => {
|
|
250
|
+
let r, i, d, c;
|
|
251
|
+
if (1 === l.nodeType) {
|
|
252
|
+
for (r = l.getAttribute("c-id"), r && (i = r.split("."), i[0] !== a && "0" !== i[0] || (d = {
|
|
253
|
+
$flags$: 0,
|
|
254
|
+
$hostId$: i[0],
|
|
255
|
+
$nodeId$: i[1],
|
|
256
|
+
$depth$: i[2],
|
|
257
|
+
$index$: i[3],
|
|
258
|
+
$tag$: l.tagName.toLowerCase(),
|
|
259
|
+
$elm$: l,
|
|
260
|
+
$attrs$: null,
|
|
261
|
+
$children$: null,
|
|
262
|
+
$key$: null,
|
|
263
|
+
$name$: null,
|
|
264
|
+
$text$: null
|
|
265
|
+
}, t.push(d), l.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
|
|
266
|
+
e = d, n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))), c = l.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.childNodes[c], a);
|
|
267
|
+
if (l.shadowRoot) for (c = l.shadowRoot.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.shadowRoot.childNodes[c], a);
|
|
268
|
+
} else if (8 === l.nodeType) i = l.nodeValue.split("."), i[1] !== a && "0" !== i[1] || (r = i[0],
|
|
269
|
+
d = {
|
|
270
|
+
$flags$: 0,
|
|
271
|
+
$hostId$: i[1],
|
|
272
|
+
$nodeId$: i[2],
|
|
273
|
+
$depth$: i[3],
|
|
274
|
+
$index$: i[4],
|
|
275
|
+
$elm$: l,
|
|
276
|
+
$attrs$: null,
|
|
277
|
+
$children$: null,
|
|
278
|
+
$key$: null,
|
|
279
|
+
$name$: null,
|
|
280
|
+
$tag$: null,
|
|
281
|
+
$text$: null
|
|
282
|
+
}, "t" === r ? (d.$elm$ = l.nextSibling, d.$elm$ && 3 === d.$elm$.nodeType && (d.$text$ = d.$elm$.textContent,
|
|
283
|
+
t.push(d), l.remove(), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
|
|
284
|
+
n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))) : d.$hostId$ === a && ("s" === r ? (d.$tag$ = "slot",
|
|
285
|
+
i[5] ? l["s-sn"] = d.$name$ = i[5] : l["s-sn"] = "", l["s-sr"] = !0, BUILD.shadowDom && n && (d.$elm$ = doc.createElement(d.$tag$),
|
|
286
|
+
d.$name$ && d.$elm$.setAttribute("name", d.$name$), l.parentNode.insertBefore(d.$elm$, l),
|
|
287
|
+
l.remove(), "0" === d.$depth$ && (n[d.$index$] = d.$elm$)), o.push(d), e.$children$ || (e.$children$ = []),
|
|
288
|
+
e.$children$[d.$index$] = d) : "r" === r && (BUILD.shadowDom && n ? l.remove() : BUILD.slotRelocation && (s["s-cr"] = l,
|
|
289
|
+
l["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
|
|
290
|
+
const t = newVNode(null, l.textContent);
|
|
291
|
+
t.$elm$ = l, t.$index$ = "0", e.$children$ = [ t ];
|
|
292
|
+
}
|
|
293
|
+
}, initializeDocumentHydrate = (e, t) => {
|
|
294
|
+
if (1 === e.nodeType) {
|
|
295
|
+
let o = 0;
|
|
296
|
+
for (;o < e.childNodes.length; o++) initializeDocumentHydrate(e.childNodes[o], t);
|
|
297
|
+
if (e.shadowRoot) for (o = 0; o < e.shadowRoot.childNodes.length; o++) initializeDocumentHydrate(e.shadowRoot.childNodes[o], t);
|
|
298
|
+
} else if (8 === e.nodeType) {
|
|
299
|
+
const o = e.nodeValue.split(".");
|
|
300
|
+
"o" === o[0] && (t.set(o[1] + "." + o[2], e), e.nodeValue = "", e["s-en"] = o[3]);
|
|
301
|
+
}
|
|
302
|
+
}, computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), setMode = e => modeResolutionChain.push(e), getMode = e => getHostRef(e).$modeName$, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : BUILD.propNumber && 2 & t ? parseFloat(e) : BUILD.propString && 1 & t ? String(e) : e, getElement = e => BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, createEvent = (e, t, o) => {
|
|
303
|
+
const n = getElement(e);
|
|
304
|
+
return {
|
|
305
|
+
emit: e => (BUILD.isDev && n.isConnected, emitEvent(n, t, {
|
|
306
|
+
bubbles: !!(4 & o),
|
|
307
|
+
composed: !!(2 & o),
|
|
308
|
+
cancelable: !!(1 & o),
|
|
309
|
+
detail: e
|
|
310
|
+
}))
|
|
311
|
+
};
|
|
312
|
+
}, emitEvent = (e, t, o) => {
|
|
313
|
+
const n = plt.ce(t, o);
|
|
314
|
+
return e.dispatchEvent(n), n;
|
|
315
|
+
}, rootAppliedStyles = new WeakMap, registerStyle = (e, t, o) => {
|
|
316
|
+
let n = styles.get(e);
|
|
317
|
+
n = t, styles.set(e, n);
|
|
318
|
+
}, addStyle = (e, t, o, n) => {
|
|
319
|
+
let s = getScopeId(t, o);
|
|
320
|
+
const l = styles.get(s);
|
|
321
|
+
if (!BUILD.attachStyles) return s;
|
|
322
|
+
if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
|
|
323
|
+
e = e.head || e;
|
|
324
|
+
let o, a = rootAppliedStyles.get(e);
|
|
325
|
+
if (a || rootAppliedStyles.set(e, a = new Set), !a.has(s)) {
|
|
326
|
+
if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${s}"]`))) o.innerHTML = l; else {
|
|
327
|
+
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
328
|
+
o = plt.$cssShim$.createHostStyle(n, s, l, !!(10 & t.$flags$));
|
|
329
|
+
const e = o["s-sc"];
|
|
330
|
+
e && (s = e, a = null);
|
|
331
|
+
} else o = doc.createElement("style"), o.innerHTML = l;
|
|
332
|
+
(BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && o.setAttribute("sty-id", s),
|
|
333
|
+
e.insertBefore(o, e.querySelector("link"));
|
|
334
|
+
}
|
|
335
|
+
a && a.add(s);
|
|
336
|
+
}
|
|
337
|
+
} else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
|
|
338
|
+
return s;
|
|
339
|
+
}, attachStyles = e => {
|
|
340
|
+
const t = e.$cmpMeta$, o = e.$hostElement$, n = t.$flags$, s = createTime("attachStyles", t.$tagName$), l = addStyle(BUILD.shadowDom && supportsShadow && o.shadowRoot ? o.shadowRoot : o.getRootNode(), t, e.$modeName$, o);
|
|
341
|
+
(BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && 10 & n && (o["s-sc"] = l,
|
|
342
|
+
o.classList.add(l + "-h"), BUILD.scoped && 2 & n && o.classList.add(l + "-s")),
|
|
343
|
+
s();
|
|
344
|
+
}, getScopeId = (e, t) => "sc-" + (BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), setAccessor = (e, t, o, n, s, l) => {
|
|
288
345
|
if (o !== n) {
|
|
289
346
|
let a = isMemberInElement(e, t), r = t.toLowerCase();
|
|
290
347
|
if (BUILD.vdomClass && "class" === t) {
|
|
@@ -437,20 +494,7 @@ const createElm = (e, t, o, n) => {
|
|
|
437
494
|
checkSlotFallbackVisibility && updateFallbackSlotVisibility(l.$elm$), plt.$flags$ &= -2,
|
|
438
495
|
relocateNodes.length = 0;
|
|
439
496
|
}
|
|
440
|
-
}, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)),
|
|
441
|
-
const n = getElement(e);
|
|
442
|
-
return {
|
|
443
|
-
emit: e => (BUILD.isDev && n.isConnected, emitEvent(n, t, {
|
|
444
|
-
bubbles: !!(4 & o),
|
|
445
|
-
composed: !!(2 & o),
|
|
446
|
-
cancelable: !!(1 & o),
|
|
447
|
-
detail: e
|
|
448
|
-
}))
|
|
449
|
-
};
|
|
450
|
-
}, emitEvent = (e, t, o) => {
|
|
451
|
-
const n = plt.ce(t, o);
|
|
452
|
-
return e.dispatchEvent(n), n;
|
|
453
|
-
}, attachToAncestor = (e, t) => {
|
|
497
|
+
}, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), attachToAncestor = (e, t) => {
|
|
454
498
|
BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
|
|
455
499
|
}, scheduleUpdate = (e, t) => {
|
|
456
500
|
if (BUILD.taskQueue && BUILD.updatable && (e.$flags$ |= 16), BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
|
|
@@ -543,60 +587,7 @@ const callRender = (e, t, o) => {
|
|
|
543
587
|
const o = t[e];
|
|
544
588
|
"function" == typeof o.connectedCallback && o.connectedCallback(), serverSideConnected(o);
|
|
545
589
|
}
|
|
546
|
-
},
|
|
547
|
-
let r, i, d, c;
|
|
548
|
-
if (1 === l.nodeType) {
|
|
549
|
-
for (r = l.getAttribute("c-id"), r && (i = r.split("."), i[0] !== a && "0" !== i[0] || (d = {
|
|
550
|
-
$flags$: 0,
|
|
551
|
-
$hostId$: i[0],
|
|
552
|
-
$nodeId$: i[1],
|
|
553
|
-
$depth$: i[2],
|
|
554
|
-
$index$: i[3],
|
|
555
|
-
$tag$: l.tagName.toLowerCase(),
|
|
556
|
-
$elm$: l,
|
|
557
|
-
$attrs$: null,
|
|
558
|
-
$children$: null,
|
|
559
|
-
$key$: null,
|
|
560
|
-
$name$: null,
|
|
561
|
-
$text$: null
|
|
562
|
-
}, t.push(d), l.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
|
|
563
|
-
e = d, n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))), c = l.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.childNodes[c], a);
|
|
564
|
-
if (l.shadowRoot) for (c = l.shadowRoot.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.shadowRoot.childNodes[c], a);
|
|
565
|
-
} else if (8 === l.nodeType) i = l.nodeValue.split("."), i[1] !== a && "0" !== i[1] || (r = i[0],
|
|
566
|
-
d = {
|
|
567
|
-
$flags$: 0,
|
|
568
|
-
$hostId$: i[1],
|
|
569
|
-
$nodeId$: i[2],
|
|
570
|
-
$depth$: i[3],
|
|
571
|
-
$index$: i[4],
|
|
572
|
-
$elm$: l,
|
|
573
|
-
$attrs$: null,
|
|
574
|
-
$children$: null,
|
|
575
|
-
$key$: null,
|
|
576
|
-
$name$: null,
|
|
577
|
-
$tag$: null,
|
|
578
|
-
$text$: null
|
|
579
|
-
}, "t" === r ? (d.$elm$ = l.nextSibling, d.$elm$ && 3 === d.$elm$.nodeType && (d.$text$ = d.$elm$.textContent,
|
|
580
|
-
t.push(d), l.remove(), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
|
|
581
|
-
n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))) : d.$hostId$ === a && ("s" === r ? (d.$tag$ = "slot",
|
|
582
|
-
i[5] ? l["s-sn"] = d.$name$ = i[5] : l["s-sn"] = "", l["s-sr"] = !0, BUILD.shadowDom && n && (d.$elm$ = doc.createElement(d.$tag$),
|
|
583
|
-
d.$name$ && d.$elm$.setAttribute("name", d.$name$), l.parentNode.insertBefore(d.$elm$, l),
|
|
584
|
-
l.remove(), "0" === d.$depth$ && (n[d.$index$] = d.$elm$)), o.push(d), e.$children$ || (e.$children$ = []),
|
|
585
|
-
e.$children$[d.$index$] = d) : "r" === r && (BUILD.shadowDom && n ? l.remove() : BUILD.slotRelocation && (s["s-cr"] = l,
|
|
586
|
-
l["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
|
|
587
|
-
const t = newVNode(null, l.textContent);
|
|
588
|
-
t.$elm$ = l, t.$index$ = "0", e.$children$ = [ t ];
|
|
589
|
-
}
|
|
590
|
-
}, initializeDocumentHydrate = (e, t) => {
|
|
591
|
-
if (1 === e.nodeType) {
|
|
592
|
-
let o = 0;
|
|
593
|
-
for (;o < e.childNodes.length; o++) initializeDocumentHydrate(e.childNodes[o], t);
|
|
594
|
-
if (e.shadowRoot) for (o = 0; o < e.shadowRoot.childNodes.length; o++) initializeDocumentHydrate(e.shadowRoot.childNodes[o], t);
|
|
595
|
-
} else if (8 === e.nodeType) {
|
|
596
|
-
const o = e.nodeValue.split(".");
|
|
597
|
-
"o" === o[0] && (t.set(o[1] + "." + o[2], e), e.nodeValue = "", e["s-en"] = o[3]);
|
|
598
|
-
}
|
|
599
|
-
}, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : BUILD.propNumber && 2 & t ? parseFloat(e) : BUILD.propString && 1 & t ? String(e) : e, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, o, n) => {
|
|
590
|
+
}, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, o, n) => {
|
|
600
591
|
const s = getHostRef(e), l = BUILD.lazyLoad ? s.$hostElement$ : e, a = s.$instanceValues$.get(t), r = s.$flags$, i = BUILD.lazyLoad ? s.$lazyInstance$ : l;
|
|
601
592
|
o = parsePropertyValue(o, n.$members$[t][0]);
|
|
602
593
|
const d = Number.isNaN(a) && Number.isNaN(o), c = o !== a && !d;
|
|
@@ -957,10 +948,7 @@ const callRender = (e, t, o) => {
|
|
|
957
948
|
i.setAttribute("data-styles", ""), a.insertBefore(i, r ? r.nextSibling : a.firstChild)),
|
|
958
949
|
m = !1, d.length ? d.map((e => e.connectedCallback())) : BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
|
|
959
950
|
o();
|
|
960
|
-
},
|
|
961
|
-
const t = new URL(e, plt.$resourcesUrl$);
|
|
962
|
-
return t.origin !== win.location.origin ? t.href : t.pathname;
|
|
963
|
-
}, setAssetPath = e => plt.$resourcesUrl$ = e, getConnect = (e, t) => {
|
|
951
|
+
}, getConnect = (e, t) => {
|
|
964
952
|
const o = () => {
|
|
965
953
|
let e = doc.querySelector(t);
|
|
966
954
|
return e || (e = doc.createElement(t), doc.body.appendChild(e)), "function" == typeof e.componentOnReady ? e.componentOnReady() : Promise.resolve(e);
|
|
@@ -975,7 +963,19 @@ const callRender = (e, t, o) => {
|
|
|
975
963
|
tick: {
|
|
976
964
|
then: e => nextTick(e)
|
|
977
965
|
}
|
|
978
|
-
} : void 0,
|
|
966
|
+
} : void 0, Fragment = (e, t) => t, addHostEventListeners = (e, t, o, n) => {
|
|
967
|
+
BUILD.hostListener && o && (BUILD.hostListenerTargetParent && (o = n ? o.filter((([e]) => 32 & e)) : o.filter((([e]) => !(32 & e)))),
|
|
968
|
+
o.map((([o, n, s]) => {
|
|
969
|
+
const l = BUILD.hostListenerTarget ? getHostListenerTarget(e, o) : e, a = hostListenerProxy(t, s), r = hostListenerOpts(o);
|
|
970
|
+
plt.ael(l, n, a, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(l, n, a, r)));
|
|
971
|
+
})));
|
|
972
|
+
}, hostListenerProxy = (e, t) => o => {
|
|
973
|
+
try {
|
|
974
|
+
BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](o) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, o ]) : e.$hostElement$[t](o);
|
|
975
|
+
} catch (e) {
|
|
976
|
+
consoleError(e);
|
|
977
|
+
}
|
|
978
|
+
}, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), insertVdomAnnotations = (e, t) => {
|
|
979
979
|
if (null != e) {
|
|
980
980
|
const o = {
|
|
981
981
|
hostIds: 0,
|
|
@@ -1050,13 +1050,13 @@ const callRender = (e, t, o) => {
|
|
|
1050
1050
|
insertChildVNodeAnnotations(e, t, o, n, l, s);
|
|
1051
1051
|
}));
|
|
1052
1052
|
}
|
|
1053
|
-
},
|
|
1053
|
+
}, hAsync = (e, t, ...o) => {
|
|
1054
1054
|
if (Array.isArray(o) && o.length > 0) {
|
|
1055
1055
|
const n = o.flat(1 / 0);
|
|
1056
1056
|
return n.some(isPromise) ? Promise.all(n).then((o => h(e, t, ...o))).catch((o => h(e, t))) : h(e, t, ...o);
|
|
1057
1057
|
}
|
|
1058
1058
|
return h(e, t);
|
|
1059
|
-
};
|
|
1059
|
+
}, NO_HYDRATE_TAGS = new Set([ "CODE", "HEAD", "IFRAME", "INPUT", "OBJECT", "OUTPUT", "NOSCRIPT", "PRE", "SCRIPT", "SELECT", "STYLE", "TEMPLATE", "TEXTAREA" ]);
|
|
1060
1060
|
|
|
1061
1061
|
let customError;
|
|
1062
1062
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
|
@@ -3,6 +3,85 @@ function createWindowFromHtml(e, t) {
|
|
|
3
3
|
return null == r && (r = new MockWindow(e), templateWindows.set(t, r)), cloneWindow(r);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
function inspectElement(e, t, r) {
|
|
7
|
+
const s = t.children;
|
|
8
|
+
for (let t = 0, n = s.length; t < n; t++) {
|
|
9
|
+
const n = s[t], o = n.nodeName.toLowerCase();
|
|
10
|
+
if (o.includes("-")) {
|
|
11
|
+
const t = e.components.find((e => e.tag === o));
|
|
12
|
+
null != t && (t.count++, r > t.depth && (t.depth = r));
|
|
13
|
+
} else switch (o) {
|
|
14
|
+
case "a":
|
|
15
|
+
const t = collectAttributes(n);
|
|
16
|
+
t.href = n.href, "string" == typeof t.href && (e.anchors.some((e => e.href === t.href)) || e.anchors.push(t));
|
|
17
|
+
break;
|
|
18
|
+
|
|
19
|
+
case "img":
|
|
20
|
+
const r = collectAttributes(n);
|
|
21
|
+
r.src = n.src, "string" == typeof r.src && (e.imgs.some((e => e.src === r.src)) || e.imgs.push(r));
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
case "link":
|
|
25
|
+
const s = collectAttributes(n);
|
|
26
|
+
s.href = n.href, "string" == typeof s.rel && "stylesheet" === s.rel.toLowerCase() && "string" == typeof s.href && (e.styles.some((e => e.link === s.href)) || (delete s.rel,
|
|
27
|
+
delete s.type, e.styles.push(s)));
|
|
28
|
+
break;
|
|
29
|
+
|
|
30
|
+
case "script":
|
|
31
|
+
const o = collectAttributes(n);
|
|
32
|
+
if (n.hasAttribute("src")) o.src = n.src, "string" == typeof o.src && (e.scripts.some((e => e.src === o.src)) || e.scripts.push(o)); else {
|
|
33
|
+
const t = n.getAttribute("data-stencil-static");
|
|
34
|
+
t && e.staticData.push({
|
|
35
|
+
id: t,
|
|
36
|
+
type: n.getAttribute("type"),
|
|
37
|
+
content: n.textContent
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
inspectElement(e, n, ++r);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function collectAttributes(e) {
|
|
46
|
+
const t = {}, r = e.attributes;
|
|
47
|
+
for (let e = 0, s = r.length; e < s; e++) {
|
|
48
|
+
const s = r.item(e), n = s.nodeName.toLowerCase();
|
|
49
|
+
if (SKIP_ATTRS.has(n)) continue;
|
|
50
|
+
const o = s.nodeValue;
|
|
51
|
+
"class" === n && "" === o || (t[n] = o);
|
|
52
|
+
}
|
|
53
|
+
return t;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function patchDomImplementation(e, t) {
|
|
57
|
+
let r;
|
|
58
|
+
if (null != e.defaultView ? (t.destroyWindow = !0, patchWindow(e.defaultView), r = e.defaultView) : (t.destroyWindow = !0,
|
|
59
|
+
t.destroyDocument = !1, r = new MockWindow(!1)), r.document !== e && (r.document = e),
|
|
60
|
+
e.defaultView !== r && (e.defaultView = r), "function" != typeof e.documentElement.constructor.prototype.getRootNode && (e.createElement("unknown-element").constructor.prototype.getRootNode = getRootNode),
|
|
61
|
+
"function" == typeof e.createEvent) {
|
|
62
|
+
const t = e.createEvent("CustomEvent").constructor;
|
|
63
|
+
r.CustomEvent !== t && (r.CustomEvent = t);
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
e.baseURI;
|
|
67
|
+
} catch (t) {
|
|
68
|
+
Object.defineProperty(e, "baseURI", {
|
|
69
|
+
get() {
|
|
70
|
+
const t = e.querySelector("base[href]");
|
|
71
|
+
return t ? new URL(t.getAttribute("href"), r.location.href).href : r.location.href;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return r;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getRootNode(e) {
|
|
79
|
+
const t = null != e && !0 === e.composed;
|
|
80
|
+
let r = this;
|
|
81
|
+
for (;null != r.parentNode; ) r = r.parentNode, !0 === t && null == r.parentNode && null != r.host && (r = r.host);
|
|
82
|
+
return r;
|
|
83
|
+
}
|
|
84
|
+
|
|
6
85
|
function normalizeHydrateOptions(e) {
|
|
7
86
|
const t = Object.assign({
|
|
8
87
|
serializeToHtml: !1,
|
|
@@ -87,85 +166,6 @@ function runtimeLog(e, t, r) {
|
|
|
87
166
|
global.console[t].apply(global.console, [ `[ ${e} ${t} ] `, ...r ]);
|
|
88
167
|
}
|
|
89
168
|
|
|
90
|
-
function inspectElement(e, t, r) {
|
|
91
|
-
const s = t.children;
|
|
92
|
-
for (let t = 0, n = s.length; t < n; t++) {
|
|
93
|
-
const n = s[t], o = n.nodeName.toLowerCase();
|
|
94
|
-
if (o.includes("-")) {
|
|
95
|
-
const t = e.components.find((e => e.tag === o));
|
|
96
|
-
null != t && (t.count++, r > t.depth && (t.depth = r));
|
|
97
|
-
} else switch (o) {
|
|
98
|
-
case "a":
|
|
99
|
-
const t = collectAttributes(n);
|
|
100
|
-
t.href = n.href, "string" == typeof t.href && (e.anchors.some((e => e.href === t.href)) || e.anchors.push(t));
|
|
101
|
-
break;
|
|
102
|
-
|
|
103
|
-
case "img":
|
|
104
|
-
const r = collectAttributes(n);
|
|
105
|
-
r.src = n.src, "string" == typeof r.src && (e.imgs.some((e => e.src === r.src)) || e.imgs.push(r));
|
|
106
|
-
break;
|
|
107
|
-
|
|
108
|
-
case "link":
|
|
109
|
-
const s = collectAttributes(n);
|
|
110
|
-
s.href = n.href, "string" == typeof s.rel && "stylesheet" === s.rel.toLowerCase() && "string" == typeof s.href && (e.styles.some((e => e.link === s.href)) || (delete s.rel,
|
|
111
|
-
delete s.type, e.styles.push(s)));
|
|
112
|
-
break;
|
|
113
|
-
|
|
114
|
-
case "script":
|
|
115
|
-
const o = collectAttributes(n);
|
|
116
|
-
if (n.hasAttribute("src")) o.src = n.src, "string" == typeof o.src && (e.scripts.some((e => e.src === o.src)) || e.scripts.push(o)); else {
|
|
117
|
-
const t = n.getAttribute("data-stencil-static");
|
|
118
|
-
t && e.staticData.push({
|
|
119
|
-
id: t,
|
|
120
|
-
type: n.getAttribute("type"),
|
|
121
|
-
content: n.textContent
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
inspectElement(e, n, ++r);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function collectAttributes(e) {
|
|
130
|
-
const t = {}, r = e.attributes;
|
|
131
|
-
for (let e = 0, s = r.length; e < s; e++) {
|
|
132
|
-
const s = r.item(e), n = s.nodeName.toLowerCase();
|
|
133
|
-
if (SKIP_ATTRS.has(n)) continue;
|
|
134
|
-
const o = s.nodeValue;
|
|
135
|
-
"class" === n && "" === o || (t[n] = o);
|
|
136
|
-
}
|
|
137
|
-
return t;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function patchDomImplementation(e, t) {
|
|
141
|
-
let r;
|
|
142
|
-
if (null != e.defaultView ? (t.destroyWindow = !0, patchWindow(e.defaultView), r = e.defaultView) : (t.destroyWindow = !0,
|
|
143
|
-
t.destroyDocument = !1, r = new MockWindow(!1)), r.document !== e && (r.document = e),
|
|
144
|
-
e.defaultView !== r && (e.defaultView = r), "function" != typeof e.documentElement.constructor.prototype.getRootNode && (e.createElement("unknown-element").constructor.prototype.getRootNode = getRootNode),
|
|
145
|
-
"function" == typeof e.createEvent) {
|
|
146
|
-
const t = e.createEvent("CustomEvent").constructor;
|
|
147
|
-
r.CustomEvent !== t && (r.CustomEvent = t);
|
|
148
|
-
}
|
|
149
|
-
try {
|
|
150
|
-
e.baseURI;
|
|
151
|
-
} catch (t) {
|
|
152
|
-
Object.defineProperty(e, "baseURI", {
|
|
153
|
-
get() {
|
|
154
|
-
const t = e.querySelector("base[href]");
|
|
155
|
-
return t ? new URL(t.getAttribute("href"), r.location.href).href : r.location.href;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
return r;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function getRootNode(e) {
|
|
163
|
-
const t = null != e && !0 === e.composed;
|
|
164
|
-
let r = this;
|
|
165
|
-
for (;null != r.parentNode; ) r = r.parentNode, !0 === t && null == r.parentNode && null != r.host && (r = r.host);
|
|
166
|
-
return r;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
169
|
function renderToString(e, t) {
|
|
170
170
|
const r = normalizeHydrateOptions(t);
|
|
171
171
|
return r.serializeToHtml = !0, new Promise((t => {
|
|
@@ -381,29 +381,11 @@ function removeScripts(e) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
import { MockWindow, cloneWindow,
|
|
384
|
+
import { MockWindow, cloneWindow, patchWindow, constrainTimeouts, serializeNodeToHtml } from "@stencil/core/mock-doc";
|
|
385
385
|
|
|
386
386
|
import { hydrateFactory } from "@stencil/core/hydrate-factory";
|
|
387
387
|
|
|
388
|
-
const templateWindows = new Map,
|
|
389
|
-
let e = "abcdefghijklmnopqrstuvwxyz", t = "";
|
|
390
|
-
for (;t.length < 8; ) t += e[Math.floor(Math.random() * e.length)], 1 === t.length && (e += "0123456789");
|
|
391
|
-
return t;
|
|
392
|
-
}, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, hasError = e => null != e && 0 !== e.length && e.some((e => "error" === e.level && "runtime" !== e.type)), shouldIgnoreError = e => e === TASK_CANCELED_MSG, TASK_CANCELED_MSG = "task canceled", SKIP_ATTRS = new Set([ "s-id", "c-id" ]), collectUsedSelectors = (e, t) => {
|
|
393
|
-
if (null != t && 1 === t.nodeType) {
|
|
394
|
-
const r = t.children, s = t.nodeName.toLowerCase();
|
|
395
|
-
e.tags.add(s);
|
|
396
|
-
const n = t.attributes;
|
|
397
|
-
for (let r = 0, s = n.length; r < s; r++) {
|
|
398
|
-
const s = n.item(r), o = s.name.toLowerCase();
|
|
399
|
-
if (e.attrs.add(o), "class" === o) {
|
|
400
|
-
const r = t.classList;
|
|
401
|
-
for (let t = 0, s = r.length; t < s; t++) e.classNames.add(r.item(t));
|
|
402
|
-
} else "id" === o && e.ids.add(s.value);
|
|
403
|
-
}
|
|
404
|
-
if (r) for (let t = 0, s = r.length; t < s; t++) collectUsedSelectors(e, r[t]);
|
|
405
|
-
}
|
|
406
|
-
}, parseCss = (e, t) => {
|
|
388
|
+
const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, hasError = e => null != e && 0 !== e.length && e.some((e => "error" === e.level && "runtime" !== e.type)), shouldIgnoreError = e => e === TASK_CANCELED_MSG, TASK_CANCELED_MSG = "task canceled", parseCss = (e, t) => {
|
|
407
389
|
let r = 1, s = 1;
|
|
408
390
|
const n = [], o = e => {
|
|
409
391
|
const t = e.match(/\n/g);
|
|
@@ -736,7 +718,21 @@ const templateWindows = new Map, createHydrateBuildId = () => {
|
|
|
736
718
|
t += " ";
|
|
737
719
|
} else t += r;
|
|
738
720
|
return t;
|
|
739
|
-
}, CSS_WS_REG = /\s/, CSS_NEXT_CHAR_REG = /[>\(\)\~\,\+\s]/, CSS_PREV_CHAR_REG = /[>\(\~\,\+]/,
|
|
721
|
+
}, CSS_WS_REG = /\s/, CSS_NEXT_CHAR_REG = /[>\(\)\~\,\+\s]/, CSS_PREV_CHAR_REG = /[>\(\~\,\+]/, collectUsedSelectors = (e, t) => {
|
|
722
|
+
if (null != t && 1 === t.nodeType) {
|
|
723
|
+
const r = t.children, s = t.nodeName.toLowerCase();
|
|
724
|
+
e.tags.add(s);
|
|
725
|
+
const n = t.attributes;
|
|
726
|
+
for (let r = 0, s = n.length; r < s; r++) {
|
|
727
|
+
const s = n.item(r), o = s.name.toLowerCase();
|
|
728
|
+
if (e.attrs.add(o), "class" === o) {
|
|
729
|
+
const r = t.classList;
|
|
730
|
+
for (let t = 0, s = r.length; t < s; t++) e.classNames.add(r.item(t));
|
|
731
|
+
} else "id" === o && e.ids.add(s.value);
|
|
732
|
+
}
|
|
733
|
+
if (r) for (let t = 0, s = r.length; t < s; t++) collectUsedSelectors(e, r[t]);
|
|
734
|
+
}
|
|
735
|
+
}, removeUnusedStyleText = (e, t, r) => {
|
|
740
736
|
try {
|
|
741
737
|
const s = parseCss(r.innerHTML);
|
|
742
738
|
if (t.push(...s.diagnostics), hasError(t)) return;
|
|
@@ -772,6 +768,10 @@ const templateWindows = new Map, createHydrateBuildId = () => {
|
|
|
772
768
|
messageText: e
|
|
773
769
|
});
|
|
774
770
|
}
|
|
771
|
+
}, SKIP_ATTRS = new Set([ "s-id", "c-id" ]), createHydrateBuildId = () => {
|
|
772
|
+
let e = "abcdefghijklmnopqrstuvwxyz", t = "";
|
|
773
|
+
for (;t.length < 8; ) t += e[Math.floor(Math.random() * e.length)], 1 === t.length && (e += "0123456789");
|
|
774
|
+
return t;
|
|
775
775
|
};
|
|
776
776
|
|
|
777
777
|
export { createWindowFromHtml, hydrateDocument, renderToString, serializeDocumentToString };
|
package/internal/package.json
CHANGED