@stencil/core
Version:
A Compiler for Web Components and Progressive Web Apps
4 lines • 4.56 MB
JavaScript
/*!
Stencil Compiler v2.14.0 | MIT Licensed | https://stenciljs.com
*/
!function(e){"use strict";"undefined"==typeof globalThis&&("undefined"!=typeof self?self.globalThis=self:"undefined"!=typeof window?window.globalThis=window:"undefined"!=typeof global&&(global.globalThis=global));const t=globalThis.Buffer||{},r=globalThis.process||{};r.argv||(r.argv=[""]);let n="/";if(r.cwd||(r.cwd=()=>n),r.chdir||(r.chdir=e=>n=e),!r.nextTick){const e=Promise.resolve();r.nextTick=t=>e.then(t)}function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var r,n="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}r.platform||(r.platform="stencil"),r.version||(r.version="v12.0.0"),r.browser=!!globalThis.location;var o={resolve(){for(var e,t="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=r.cwd()),s=e),i(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=a(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=a(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:e=>(i(e),e.length>0&&47===e.charCodeAt(0)),join(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];i(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":o.normalize(e)},relative(e,t){if(i(e),i(t),e===t)return"";if((e=o.resolve(e))===(t=o.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,a=n-r,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var c=t.length-s,l=a<c?a:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(47===t.charCodeAt(s+d))return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else a>l&&(47===e.charCodeAt(r+d)?u=d:0===d&&(u=0));break}var p=e.charCodeAt(r+d);if(p!==t.charCodeAt(s+d))break;47===p&&(u=d)}var _="";for(d=r+u+1;d<=n;++d)d!==n&&47!==e.charCodeAt(d)||(0===_.length?_+="..":_+="/..");return _.length>0?_+t.slice(s+u):(s+=u,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:e=>e,dirname(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){n=o;break}}else a=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var r,n=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){n=r+1;break}}else-1===c&&(o=!1,c=r+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=c))}return n===a?a=c:-1===a&&(a=e.length),e.slice(n,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){n=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":e.slice(n,a)},extname(e){i(e);for(var t=-1,r=0,n=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===n&&(a=!1,n=s+1),46===c?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){r=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)},format(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return((e,t)=>{var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n})(0,e)},parse(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),a=47===n;a?(t.root="/",r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===n?-1===o?o=u:1!==d&&(d=1):-1!==o&&(d=-1);else if(!l){s=u+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===s+1?-1!==c&&(t.base=t.name=0===s&&a?e.slice(1,c):e.slice(s,c)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o;var s=o;const c=!("undefined"==typeof global||"function"!=typeof require||!global.process||"string"!=typeof __filename||global.origin&&"string"==typeof global.origin),l=!("win32"===(c?r.platform:"")),u="undefined"!=typeof location&&"undefined"!=typeof navigator&&"undefined"!=typeof XMLHttpRequest,d=u&&"undefined"!=typeof self&&"function"==typeof self.importScripts,p=u&&"function"==typeof Worker,_="function"==typeof fetch,f=c?require:()=>{},m=c?r.cwd:()=>"/",g="$",h="collection-manifest.json",y=(e,t)=>{let r=0;"shadow"===e.encapsulation?(r|=1,e.shadowDelegatesFocus&&(r|=16)):"scoped"===e.encapsulation&&(r|=2),"shadow"!==e.encapsulation&&e.htmlTagNames.includes("slot")&&(r|=4),e.hasMode&&(r|=32);const n=b(e,t),i=k(e);return N([r,e.tagName,Object.keys(n).length>0?n:void 0,i.length>0?i:void 0])},v=e=>{const t=JSON.stringify(e);return t.length>1e4?`JSON.parse(${JSON.stringify(t)})`:t},b=(e,t=!0)=>({...x(e.properties),...T(e.states),...t?C(e.methods):{}}),x=e=>{const t={};return e.forEach((e=>{t[e.name]=N([E(e),S(e)])})),t},E=e=>{let t=D(e.type);return e.mutable&&(t|=1024),e.reflect&&(t|=512),t},S=e=>{if("string"==typeof e.attribute){if(e.name===e.attribute)return;return e.attribute}},D=e=>"string"===e?1:"number"===e?2:"boolean"===e?4:"any"===e?8:16,T=e=>{const t={};return e.forEach((e=>{t[e.name]=[32]})),t},C=e=>{const t={};return e.forEach((e=>{t[e.name]=[64]})),t},k=e=>e.listeners.map((e=>[A(e),e.name,e.method])),A=e=>{let t=0;switch(e.capture&&(t|=2),e.passive&&(t|=1),e.target){case"document":t|=4;break;case"window":t|=8;break;case"body":t|=16;break;case"parent":t|=32}return t},N=e=>{const t=e;for(var r=t.length-1;r>=0&&!t[r];r--)t.pop();return t},w=e=>e.toLowerCase(),F=e=>w(e.replace(/([A-Z0-9])/g,(e=>" "+e[0])).trim().replace(/ /g,"-")),P=e=>w(e).split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""),I=e=>e.charAt(0).toUpperCase()+e.slice(1),O=()=>{},M=(e,t)=>e.slice().sort(((e,r)=>{const n=t(e),i=t(r);return n<i?-1:n>i?1:0})),R=e=>e.flat?e.flat(1):e.reduce(((e,t)=>(e.push(...t),e)),[]),L=(e,t=(e=>e))=>{const r=new Set;return e.filter((e=>{const n=t(e);return null==n||!r.has(n)&&(r.add(n),!0)}))},B=(e,t)=>t.reduce(((t,r)=>(e[r]&&(t[r]=e[r]),t)),{}),j=e=>"boolean"==typeof e,U=e=>"function"==typeof e,V=e=>"number"==typeof e,z=e=>null!=e&&"object"==typeof e&&!1===Array.isArray(e),K=e=>"string"==typeof e,W=e=>(e=>null!=e)(e)&&U(e[Symbol.iterator]),H=e=>!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then,J=e=>{const t={"{":"}","(":")","[":"]"},r=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;if(""===e)return!1;let n;for(;n=r.exec(e);){if(n[2])return!0;let r=n.index+n[0].length;const i=n[1],a=i?t[i]:null;if(i&&a){const t=e.indexOf(a,r);-1!==t&&(r=t+1)}e=e.slice(r)}return!1},$=e=>"/"===e||G.test(e),G=/^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?[\\/]$/,q=(e,t)=>{const r=[],n=[],i=new Set;for(let a=0;a<t.length;a++){const o=X(e,t[a]),s=o.absFilePath+o.code+o.messageText+o.type;if(i.has(s))continue;i.add(s);const c=r.length+n.length;"error"===o.level?r.push(o):c<Z&&n.push(o)}return[...r,...n]},X=(e,t)=>{if(t.messageText&&("string"==typeof t.messageText.message?t.messageText=t.messageText.message:"string"==typeof t.messageText&&0===t.messageText.indexOf("Error: ")&&(t.messageText=t.messageText.substr(7))),t.messageText&&t.messageText.includes("Cannot find name 'h'")){t.header='Missing "h" import for JSX types',t.messageText='In order to load accurate JSX types for components, the "h" function must be imported from "@stencil/core" by each component using JSX. For example: import { Component, h } from \'@stencil/core\';';try{const r=e.fs.readFileSync(t.absFilePath),n=Y(r);for(let e=0;e<n.length;e++){const r=n[e];if(r.includes("@stencil/core")){const i=[],a=e-1;if(a>-1){const e={lineIndex:a,lineNumber:a+1,text:n[a],errorCharStart:-1,errorLength:-1};i.push(e)}const o={lineIndex:e,lineNumber:e+1,text:r,errorCharStart:0,errorLength:-1};i.push(o),t.lineNumber=o.lineNumber,t.columnNumber=r.indexOf("}");const s=e+1;if(s<n.length){const e={lineIndex:s,lineNumber:s+1,text:n[s],errorCharStart:-1,errorLength:-1};i.push(e)}t.lines=i;break}}}catch(e){}}return t},Y=e=>"string"!=typeof e?[]:(e=e.replace(/\\r/g,"\n")).split("\n"),Q=e=>void 0===e?"undefined":null===e?"null":("string"!=typeof e&&(e=e.toString()),e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")),Z=25,ee=e=>{const t={level:"error",type:"build",header:"Build Error",messageText:"build error",relFilePath:null,absFilePath:null,lines:[]};return e&&e.push(t),t},te=e=>{const t={level:"warn",type:"build",header:"Build Warn",messageText:"build warn",relFilePath:null,absFilePath:null,lines:[]};return e.push(t),t},re=(e,t,r,n,i)=>{const a=ee(t);if(a.messageText=n,a.absFilePath=r,"string"==typeof i)try{const t=e.fs.readFileSync(r).replace(/\r/g,"\n").split("\n");for(let e=0;e<t.length;e++){const r=t[e],n=r.indexOf(i);if(n>-1){const o={lineIndex:e,lineNumber:e+1,text:r,errorCharStart:n,errorLength:i.length};if(a.lineNumber=o.lineNumber,a.columnNumber=n+1,a.lines.push(o),e>=0){const r={lineIndex:o.lineIndex-1,lineNumber:o.lineNumber-1,text:t[e-1],errorCharStart:-1,errorLength:-1};a.lines.unshift(r)}if(e<t.length){const r={lineIndex:o.lineIndex+1,lineNumber:o.lineNumber+1,text:t[e+1],errorCharStart:-1,errorLength:-1};a.lines.push(r)}break}}}catch(e){}return a},ne=(e,t,r)=>{const n={level:"error",type:"build",header:"Build Error",messageText:"build error",relFilePath:null,absFilePath:null,lines:[]};return K(r)?n.messageText=r.length?r:"UNKNOWN ERROR":null!=t&&(null!=t.stack?n.messageText=t.stack.toString():null!=t.message?n.messageText=t.message.length?t.message:"UNKNOWN ERROR":n.messageText=t.toString()),null==e||ae(n.messageText)||e.push(n),n},ie=e=>null!=e&&0!==e.length&&e.some((e=>"error"===e.level&&"runtime"!==e.type)),ae=e=>e===oe,oe="task canceled",se=(e,t,r,n)=>{const i=de(n.code),a={level:"error",type:"bundling",language:"javascript",code:n.code,header:"Rollup"+(i.length>0?": "+i:""),messageText:i,relFilePath:null,absFilePath:null,lines:[]};"debug"===e.logLevel&&n.stack?a.messageText=n.stack:n.message&&(a.messageText=n.message),n.plugin&&(a.messageText+=` (plugin: ${n.plugin}${n.hook?`, ${n.hook}`:""})`);const o=n.loc;if(null!=o){const e=o.file||n.id;if(K(e))try{const r=t.fs.readFileSync(e);if(r){a.absFilePath=e;try{const e=Y(r),t={lineIndex:o.line-1,lineNumber:o.line,text:e[o.line-1],errorCharStart:o.column,errorLength:0};a.lineNumber=t.lineNumber,a.columnNumber=t.errorCharStart;const n=t.text.substr(o.column);for(let e=0;e<n.length&&!ue.has(n.charAt(e));e++)t.errorLength++;if(a.lines.push(t),0===t.errorLength&&t.errorCharStart>0&&(t.errorLength=1,t.errorCharStart--),t.lineIndex>0){const r={lineIndex:t.lineIndex-1,lineNumber:t.lineNumber-1,text:e[t.lineIndex-1],errorCharStart:-1,errorLength:-1};a.lines.unshift(r)}if(t.lineIndex+1<e.length){const r={lineIndex:t.lineIndex+1,lineNumber:t.lineNumber+1,text:e[t.lineIndex+1],errorCharStart:-1,errorLength:-1};a.lines.push(r)}}catch(e){a.messageText+=`\nError parsing: ${a.absFilePath}, line: ${o.line}, column: ${o.column}`,a.debugText=r}}else"string"==typeof n.frame&&(a.messageText+="\n"+n.frame)}catch(e){}}r.diagnostics.push(a)},ce=(e,t)=>{const r=new Set;return n=>{if(null==n||le.has(n.code)||r.has(n.message))return;r.add(n.message);let i="";t&&(i=t.reduce(((e,t)=>(e.push(...t.cmps),e)),[]).join(", ").trim(),i.length&&(i+=": "));const a=te(e);a.header=`Bundling Warning ${n.code}`,a.messageText=i+(n.message||n)}},le=new Set(["THIS_IS_UNDEFINED","NON_EXISTENT_EXPORT","CIRCULAR_DEPENDENCY","EMPTY_BUNDLE","UNUSED_EXTERNAL_IMPORT"]),ue=new Set([" ","=",".",",","?",":",";","(",")","{","}","[","]","|","'",'"',"`"]),de=e=>"string"==typeof e?e.split("_").map((e=>I(e.toLowerCase()))).join(" "):(e||"").trim(),pe=e=>{if("string"!=typeof e)throw new Error("invalid path to normalize");e=_e(e.trim());const t=be(e,ge(e)),r=me(t),n=r[0],i=r[1],a=n+r.slice(1).join("/");return""===a?".":""===n&&i&&e.includes("/")&&!i.startsWith(".")&&!i.startsWith("@")?"./"+a:a},_e=e=>e.replace(fe,"/"),fe=/\\/g,me=e=>{if(!Array.isArray(e)||0===e.length)return[];const t=[e[0]];for(let r=1;r<e.length;r++){const n=e[r];if(n&&"."!==n){if(".."===n)if(t.length>1){if(".."!==t[t.length-1]){t.pop();continue}}else if(t[0])continue;t.push(n)}}return t},ge=e=>{const t=he(e);return t<0?~t:t},he=e=>{if(!e)return 0;const t=e.charCodeAt(0);if(47===t||92===t){if(e.charCodeAt(1)!==t)return 1;const r=e.indexOf(47===t?"/":"\\",2);return r<0?e.length:r+1}if(ye(t)&&58===e.charCodeAt(1)){const t=e.charCodeAt(2);if(47===t||92===t)return 3;if(2===e.length)return 2}const r=e.indexOf("://");if(-1!==r){const t=r+"://".length,n=e.indexOf("/",t);if(-1!==n){const i=e.slice(0,r),a=e.slice(t,n);if("file"===i&&(""===a||"localhost"===a)&&ye(e.charCodeAt(n+1))){const t=ve(e,n+2);if(-1!==t){if(47===e.charCodeAt(t))return~(t+1);if(t===e.length)return~t}}return~(n+1)}return~e.length}return 0},ye=e=>e>=97&&e<=122||e>=65&&e<=90,ve=(e,t)=>{const r=e.charCodeAt(t);if(58===r)return t+1;if(37===r&&51===e.charCodeAt(t+1)){const r=e.charCodeAt(t+2);if(97===r||65===r)return t+3}return-1},be=(e,t)=>{const r=e.substring(0,t),n=e.substring(t).split("/"),i=n.length;return i>0&&!n[i-1]&&n.pop(),[r,...n]},xe=e=>pe(e.split("?")[0].replace(/\0/g,"")),Ee=(e,t)=>{if(!t)return e;const r=t.getSourceFile();if(!r)return e;e.absFilePath=pe(r.fileName);const n=r.text,i=Y(n),a=t.getStart(),o=t.getEnd(),s=r.getLineAndCharacterOfPosition(a),c={lineIndex:s.line,lineNumber:s.line+1,text:i[s.line],errorCharStart:s.character,errorLength:Math.max(o-a,1)};if(e.lineNumber=c.lineNumber,e.columnNumber=c.errorCharStart+1,e.lines.push(c),0===c.errorLength&&c.errorCharStart>0&&(c.errorLength=1,c.errorCharStart--),c.lineIndex>0){const t={lineIndex:c.lineIndex-1,lineNumber:c.lineNumber-1,text:i[c.lineIndex-1],errorCharStart:-1,errorLength:-1};e.lines.unshift(t)}if(c.lineIndex+1<i.length){const t={lineIndex:c.lineIndex+1,lineNumber:c.lineNumber+1,text:i[c.lineIndex+1],errorCharStart:-1,errorLength:-1};e.lines.push(t)}return e},Se=e=>{const t=[],r=Math.min(e.length,50);for(let n=0;n<r;n++)t.push(De(e[n]));return t},De=e=>{const t={level:"warn",type:"typescript",language:"typescript",header:"TypeScript",code:e.code.toString(),messageText:Te(e,e.messageText),relFilePath:null,absFilePath:null,lines:[]};if(1===e.category&&(t.level="error"),e.file){t.absFilePath=e.file.fileName;const r=e.file.text,n=Y(r),i=e.file.getLineAndCharacterOfPosition(e.start),a={lineIndex:i.line,lineNumber:i.line+1,text:n[i.line],errorCharStart:i.character,errorLength:Math.max(e.length,1)};if(t.lineNumber=a.lineNumber,t.columnNumber=a.errorCharStart+1,t.lines.push(a),0===a.errorLength&&a.errorCharStart>0&&(a.errorLength=1,a.errorCharStart--),a.lineIndex>0){const e={lineIndex:a.lineIndex-1,lineNumber:a.lineNumber-1,text:n[a.lineIndex-1],errorCharStart:-1,errorLength:-1};t.lines.unshift(e)}if(a.lineIndex+1<n.length){const e={lineIndex:a.lineIndex+1,lineNumber:a.lineNumber+1,text:n[a.lineIndex+1],errorCharStart:-1,errorLength:-1};t.lines.push(e)}}return t},Te=(e,t)=>{if("string"==typeof t)return t;if(void 0===t)return"";const r=[],n=e.file.fileName.includes("stencil.config");n&&r.push(2322);let i="";if(!r.includes(t.code)&&(i=t.messageText,W(t.next)))for(const r of t.next)i+=Te(e,r);return n&&(i=i.replace("type 'StencilConfig'","Stencil Config"),i=i.replace("Object literal may only specify known properties, but ",""),i=i.replace("Object literal may only specify known properties, and ","")),i.trim()},Ce=e=>!!K(e)&&((e=e.toLowerCase()).startsWith("https://")||e.startsWith("http://")),ke=e=>(K(e)&&(e=(e=(e=(e=e.split("?")[0]).split("#")[0]).split("&")[0]).split("=")[0],e=(e=F(e)).replace(/[|;$%@"<>()+,.{}_\!\/\\]/g,"-"),(e=(e=P(e)).length>1?e[0].toLowerCase()+e.substr(1):e.toLowerCase()).length>0&&!isNaN(e[0])&&(e="_"+e)),e),Ae=e=>{const{preamble:t}=e;if(!t)return"";const r=t.split("\n").map((e=>` * ${e}`));return r.unshift("/*!"),r.push(" */"),r.join("\n")},Ne=/\r?\n|\r/g;function we(e){return null==e?"":`${e.text.replace(Ne," ")}\n${e.tags.filter((e=>"internal"!==e.name)).map((e=>`@${e.name} ${(e.text||"").replace(Ne," ")}`)).join("\n")}`.trim()}const Fe=(e,t)=>K(t)?Pe(e,t):null,Pe=(e,t)=>{const r={diagnostic:null,data:null,filePath:t};if(K(e))try{r.data=JSON.parse(e)}catch(e){r.diagnostic=ee(),r.diagnostic.absFilePath=t,r.diagnostic.header="Error Parsing JSON",e instanceof Error&&(r.diagnostic.messageText=e.message)}else r.diagnostic=ee(),r.diagnostic.absFilePath=t,r.diagnostic.header="Error Parsing JSON",r.diagnostic.messageText="Invalid JSON input to parse";return r},Ie=["@stencil/core"],Oe=e=>{if(e!==e.trim())return"Tag can not contain white spaces";if(e!==e.toLowerCase())return"Tag can not contain upper case characters";if("string"!=typeof e)return`Tag "${e}" must be a string type`;if(0===e.length)return"Received empty tag value";if(e.indexOf(" ")>-1)return`"${e}" tag cannot contain a space`;if(e.indexOf(",")>-1)return`"${e}" tag cannot be used for multiple tags`;const t=e.replace(/\w|-/g,"");return""!==t?`"${e}" tag contains invalid characters: ${t}`:-1===e.indexOf("-")?`"${e}" tag must contain a dash (-) to work as a valid web component`:e.indexOf("--")>-1?`"${e}" tag cannot contain multiple dashes (--) next to each other`:0===e.indexOf("-")?`"${e}" tag cannot start with a dash (-)`:e.lastIndexOf("-")===e.length-1?`"${e}" tag cannot end with a dash (-)`:void 0},Me=e=>e?{file:e.file,mappings:e.mappings,names:e.names,sources:e.sources,sourcesContent:e.sourcesContent,version:e.version}:null,Re=e=>`\n${(e=>{return`//# sourceMappingURL=${t=e,encodeURIComponent(t).replace(/[!'()*]/g,(e=>"%"+e.charCodeAt(0).toString(16)))}`;var t})(e)}.map`;let Le,Be,je,Ue,Ve,ze,Ke,We,He,Je,$e,Ge,qe;const Xe={},Ye=e=>{e||(e=s),Object.assign(Xe,e);const t=Xe.normalize,r=Xe.join,n=Xe.relative,i=Xe.resolve;ze=Xe.normalize=(...e)=>pe(t.apply(Xe,e)),Ve=Xe.join=(...e)=>pe(r.apply(Xe,e)),We=Xe.relative=(...e)=>pe(n.apply(Xe,e)),He=Xe.resolve=(...e)=>pe(i.apply(Xe,e)),Le=Xe.basename,Be=Xe.dirname,je=Xe.extname,Ue=Xe.isAbsolute,Ke=Xe.parse,Je=Xe.sep,$e=Xe.delimiter,Ge=Xe.posix,Xe.win32?qe=Xe.win32:(qe={...Ge},qe.sep="\\")};Ye(c?f("path"):s);const Qe={__proto__:null,get basename(){return Le},get dirname(){return Be},get extname(){return je},get isAbsolute(){return Ue},get join(){return Ve},get normalize(){return ze},get parse(){return Ke},get relative(){return We},get resolve(){return He},get sep(){return Je},get delimiter(){return $e},get posix(){return Ge},get win32(){return qe},path:Xe,setPlatformPath:Ye,default:Xe};function Ze(e,t,r){return e(r={path:t,exports:{},require:(e,t)=>(()=>{throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})()},r.exports),r.exports}function et(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((r=>{var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})})),t}var tt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).process;const rt=Object.assign(Object.create(null),tt,{default:tt}),nt=()=>{const e=[],t=t=>{const r=e.findIndex((e=>e.callback===t));return r>-1&&(e.splice(r,1),!0)};return{emit(t,r){const n=t.toLowerCase().trim(),i=e.slice();for(const e of i)if(null==e.eventName)try{e.callback(t,r)}catch(e){console.error(e)}else if(e.eventName===n)try{e.callback(r)}catch(e){console.error(e)}},on(r,n){if("function"==typeof r){const n=null,i=r;return e.push({eventName:n,callback:i}),()=>t(i)}if("string"==typeof r&&"function"==typeof n){const i=r.toLowerCase().trim(),a=n;return e.push({eventName:i,callback:a}),()=>t(a)}return()=>!1},unsubscribeAll(){e.length=0}}},it=()=>{let e=u,t="info";return{enableColors:t=>e=t,getLevel:()=>t,setLevel:e=>t=e,emoji:e=>e,info:console.log.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),red:e=>e,green:e=>e,yellow:e=>e,blue:e=>e,magenta:e=>e,cyan:e=>e,gray:e=>e,bold:e=>e,dim:e=>e,bgRed:e=>e,createTimeSpan:(e,t=!1)=>({duration:()=>0,finish:()=>0}),printDiagnostics(t){t.forEach((t=>at(t,e)))}}},at=(e,t)=>{let r=ct,n="Build",i="";"error"===e.level?(r=st,n="Error"):"warn"===e.level&&(r=ot,n="Warning"),e.header&&(n=e.header);const a=e.relFilePath||e.absFilePath;if(a&&(i+=a,"number"==typeof e.lineNumber&&e.lineNumber>0&&(i+=", line "+e.lineNumber,"number"==typeof e.columnNumber&&e.columnNumber>0&&(i+=", column "+e.columnNumber)),i+="\n"),i+=e.messageText,e.lines&&e.lines.length>0&&(e.lines.forEach((e=>{i+="\n"+e.lineNumber+": "+e.text})),i+="\n"),t){const e=["%c"+n,`background: ${r}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;`];console.log(...e,i)}else"error"===e.level?console.error(i):"warn"===e.level?console.warn(i):console.log(i)},ot="#f39c12",st="#c0392b",ct="#3498db",lt=[".tsx",".ts",".mjs",".js",".jsx",".json",".md"],ut=["package.json","index.js","index.mjs"],dt=e=>e.endsWith(".d.ts"),pt=e=>!dt(e)&&e.endsWith(".ts"),_t=e=>e.endsWith(".tsx"),ft=e=>e.endsWith(".jsx"),mt=e=>e.endsWith(".js"),gt=(e,t)=>e+"/"+t,ht=e=>lt.some((t=>e.endsWith(t))),yt=(e,t)=>{try{const r=JSON.parse(t);r.name&&r.version&&((e,t,r)=>{e.set(t,r)})(e,r.name,r.version)}catch(e){}},vt=e=>e.startsWith(".")||e.startsWith("/"),bt=e=>_&&u&&xt(e),xt=e=>pe(e).split("/").includes("node_modules"),Et=e=>{e.startsWith("~")&&(e=e.substring(1));const t=e.split("/"),r={moduleId:null,filePath:null,scope:null,scopeSubModuleId:null};return e.startsWith("@")&&t.length>1?(r.moduleId=t.slice(0,2).join("/"),r.filePath=t.slice(2).join("/"),r.scope=t[0],r.scopeSubModuleId=t[1]):(r.moduleId=t[0],r.filePath=t.slice(1).join("/")),r},St=(e,t)=>{const r=pe(e).split("/"),n=Et(t);for(let e=r.length-1;e>=1;e--)if("node_modules"===r[e-1])if(n.scope){if(r[e]===n.scope&&r[e+1]===n.scopeSubModuleId)return r.slice(0,e+2).join("/")}else if(r[e]===n.moduleId)return r.slice(0,e+1).join("/");return null},Dt=new Map,Tt=new Set,Ct=(e,t)=>{let r=(t=pe(t)).split("/");const n=r.lastIndexOf("node_modules");return n>-1&&n<r.length-1&&(r=r.slice(n+1),r=r[0].startsWith("@")?r.slice(2):r.slice(1),t=r.join("/")),new URL("./"+t,(e=>new URL("../",e).href)(e)).href},kt=(e,t,r,n)=>At(e,t,r)+"/"+n,At=(e,t,r)=>{let n=(r=pe(r)).split("/").filter((e=>e.length));const i=n.lastIndexOf("node_modules");i>-1&&i<n.length-1&&(n=n.slice(i+1));let a=n.shift();a.startsWith("@")&&(a+="/"+n.shift());const o=n.join("/");if("@stencil/core"===a){const t=e.getCompilerExecutingPath();return Ct(t,o)}return e.getRemoteModuleUrl({moduleId:a,version:t.get(a),path:o})},Nt=e=>{if(pt(e)||_t(e))return!0;const t=e.split("/"),r=t[t.length-2],n=t[t.length-1];return!("node_modules"!==r||!ht(n))},wt=e=>Ft.some((t=>e.endsWith(t))),Ft=["/@stencil/core/internal.js","/@stencil/core/internal.json","/@stencil/core/internal.mjs","/@stencil/core/internal/stencil-core.js/index.json","/@stencil/core/internal/stencil-core.js.json","/@stencil/core/internal/stencil-core.js/package.json","/@stencil/core.js","/@stencil/core.json","/@stencil/core.mjs","/@stencil/core.css","/@stencil/core/index.js","/@stencil/core/index.json","/@stencil/core/index.mjs","/@stencil/core/index.css","/@stencil/package.json"],Pt=async(e,t,r,n,i)=>{if(!(Nt(i)||Tt.has(n)||wt(n)))try{const a=await((e,t,r)=>(console.trace(t),e&&U(e.fetch)?e.fetch(t,r):fetch(t,r)))(e,n);if(a){if(a.ok){const o=await a.clone().text();return await(async(e,t,r,n,i,a)=>{r.endsWith("package.json")&&yt(a,i);let o=Be(n);for(;"/"!==o&&""!==o;)t?(t.clearFileCache(o),await t.sys.createDir(o)):await e.createDir(o),o=Be(o);t?(t.clearFileCache(n),await t.sys.writeFile(n,i)):await e.writeFile(n,i)})(e,t,n,i,o,r),o}404===a.status&&Tt.add(n)}}catch(e){console.error(e)}},It=(e,t)=>{t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))},Ot=(...e)=>e.forEach((e=>console.log(e))),Mt=e=>"function"==typeof e[Mt.custom]?function(...t){return e[Mt.custom].apply(this,t)}:function(...t){return new Promise(((r,n)=>{t.push(((e,t)=>{null!=e?n(e):r(t)})),e.apply(this,t)}))};Mt.custom=Symbol("promisify.custom");const Rt={inherits:It,inspect:Ot,promisify:Mt},Lt={__proto__:null,inherits:It,inspect:Ot,promisify:Mt,default:Rt};class Bt extends Error{constructor(e,t,r="ENOENT",n=-2){super(`ENOENT: no such file or directory, ${e} '${t}'`),this.syscall=e,this.path=t,this.code=r,this.errno=n}}const jt={__sys:{}},Ut=jt.exists=(e,t)=>{jt.__sys.access(e).then(t).catch((()=>t(!1)))};Ut[Mt.custom]=e=>jt.__sys.access(e);const Vt=jt.existsSync=e=>jt.__sys.accessSync(e),zt=jt.mkdir=(e,t,r)=>{r="function"==typeof r?r:"function"==typeof t?t:null,t="function"==typeof t?void 0:t,jt.__sys.createDir(e,t).then((t=>{r&&(t.error?r(new Bt("mkdir",e)):r(null))})).catch((e=>{r&&r(e)}))},Kt=jt.mkdirSync=(e,t)=>{if(jt.__sys.createDirSync(e,t).error)throw new Bt("mkdir",e)},Wt=jt.readdirSync=e=>jt.__sys.readDirSync(e).map((e=>Le(e))),Ht=jt.readFile=async(e,t,r)=>{const n="object"==typeof t?t.encoding:"string"==typeof t?t:"utf-8";r="function"==typeof r?r:"function"==typeof t?t:null,jt.__sys.readFile(e,n).then((t=>{r&&r("string"==typeof t?null:new Bt("open",e),t)})).catch((e=>{r&&r(e)}))},Jt=jt.readFileSync=(e,t)=>{const r="object"==typeof t?t.encoding:"string"==typeof t?t:"utf-8",n=jt.__sys.readFileSync(e,r);if("string"!=typeof n)throw new Bt("open",e);return n},$t=jt.realpath=(e,t,r)=>{r="function"==typeof r?r:"function"==typeof t?t:null,jt.__sys.realpath(e).then((e=>{r&&r(e.error,e.path)})).catch((e=>{r&&r(e)}))},Gt=jt.realpathSync=e=>{const t=jt.__sys.realpathSync(e);if(t.error)throw t.error;return pe(t.path)},qt=jt.statSync=e=>{const t=jt.__sys.statSync(e);if(t.error)throw new Bt("statSync",e);return{isDirectory:()=>t.isDirectory,isFile:()=>t.isFile,isSymbolicLink:()=>t.isSymbolicLink,size:t.size,mtimeMs:t.mtimeMs}},Xt=jt.lstatSync=qt,Yt=jt.stat=(e,t,r)=>{r="function"==typeof r?r:"function"==typeof t?t:null,jt.__sys.stat(e).then((t=>{r&&(t.error?r(new Bt("stat",e)):r({isDirectory:()=>t.isDirectory,isFile:()=>t.isFile,isSymbolicLink:()=>t.isSymbolicLink,size:t.size,mtimeMs:t.mtimeMs}))})).catch((e=>{r&&r(e)}))},Qt=jt.watch=()=>{throw new Error("fs.watch() not implemented")},Zt=jt.writeFile=(e,t,r,n)=>{n="function"==typeof n?n:"function"==typeof r?r:null,jt.__sys.writeFile(e,t).then((t=>{n&&(t.error?n(new Bt("writeFile",e)):n(null))})).catch((e=>{n&&n(e)}))},er={__proto__:null,exists:Ut,existsSync:Vt,mkdir:zt,mkdirSync:Kt,readdirSync:Wt,readFile:Ht,readFileSync:Jt,realpath:$t,realpathSync:Gt,statSync:qt,lstatSync:Xt,stat:Yt,watch:Qt,writeFile:Zt,default:jt};var tr=()=>{var e=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;var t=(new Error).stack;return Error.prepareStackTrace=e,t[2].getFileName()},rr=Ze((e=>{var t="win32"===r.platform,n=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,i={parse:e=>{if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t,r=(t=e,n.exec(t).slice(1));if(!r||5!==r.length)throw new TypeError("Invalid path '"+e+"'");return{root:r[1],dir:r[0]===r[1]?r[0]:r[0].slice(0,-1),base:r[2],ext:r[4],name:r[3]}}},a=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,o={parse:e=>{if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t,r=(t=e,a.exec(t).slice(1));if(!r||5!==r.length)throw new TypeError("Invalid path '"+e+"'");return{root:r[1],dir:r[0].slice(0,-1),base:r[2],ext:r[4],name:r[3]}}};e.exports=t?i.parse:o.parse,e.exports.posix=o.parse,e.exports.win32=i.parse}));const nr=et(Qe);var ir=nr.parse||rr,ar=(e,t)=>{var r="/";/^([A-Za-z]:)/.test(e)?r="":/^\\\\/.test(e)&&(r="\\\\");for(var n=[e],i=ir(e);i.dir!==n[n.length-1];)n.push(i.dir),i=ir(i.dir);return n.reduce(((e,n)=>e.concat(t.map((e=>nr.resolve(r,n,e))))),[])},or=(e,t,r)=>{var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&"function"==typeof t.paths)return t.paths(r,e,(()=>ar(e,n)),t);var i=ar(e,n);return t&&t.paths?i.concat(t.paths):i},sr=(e,t)=>t||{},cr="Function.prototype.bind called on incompatible ",lr=Array.prototype.slice,ur=Object.prototype.toString,dr="[object Function]",pr=(Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||ur.call(t)!==dr)throw new TypeError(cr+t);for(var r,n=lr.call(arguments,1),i=function(){if(this instanceof r){var i=t.apply(this,n.concat(lr.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(lr.call(arguments)))},a=Math.max(0,t.length-n.length),o=[],s=0;s<a;s++)o.push("$"+s);if(r=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var c=()=>{};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r}).call(Function.call,Object.prototype.hasOwnProperty);const _r={assert:!0,"assert/strict":">= 15",async_hooks:">= 8",buffer_ieee754:"< 0.9.7",buffer:!0,child_process:!0,cluster:!0,console:!0,constants:!0,crypto:!0,_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,diagnostics_channel:">= 15.1",dns:!0,"dns/promises":">= 15",domain:">= 0.7.12",events:!0,freelist:"< 6",fs:!0,"fs/promises":[">= 10 && < 10.1",">= 14"],_http_agent:">= 0.11.1",_http_client:">= 0.11.1",_http_common:">= 0.11.1",_http_incoming:">= 0.11.1",_http_outgoing:">= 0.11.1",_http_server:">= 0.11.1",http:!0,http2:">= 8.8",https:!0,inspector:">= 8.0.0",_linklist:"< 8",module:!0,net:!0,"node-inspect/lib/_inspect":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6.0 && < 12",os:!0,path:!0,"path/posix":">= 15.3","path/win32":">= 15.3",perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4",_stream_transform:">= 0.9.4",_stream_wrap:">= 1.4.1",_stream_passthrough:">= 0.9.4",_stream_readable:">= 0.9.4",_stream_writable:">= 0.9.4",stream:!0,"stream/promises":">= 15",string_decoder:!0,sys:[">= 0.6 && < 0.7",">= 0.8"],timers:!0,"timers/promises":">= 15",_tls_common:">= 0.11.13",_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3",tls:!0,trace_events:">= 10",tty:!0,url:!0,util:!0,"util/types":">= 15.3","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/consarray":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/csvparser":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/logreader":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/profile_view":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/splaytree":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],v8:">= 1",vm:!0,wasi:">= 13.4 && < 13.5",worker_threads:">= 11.7",zlib:!0};function fr(e,t){for(var r=e.split("."),n=t.split(" "),i=n.length>1?n[0]:"=",a=(n.length>1?n[1]:n[0]).split("."),o=0;o<3;++o){var s=parseInt(r[o]||0,10),c=parseInt(a[o]||0,10);if(s!==c)return"<"===i?s<c:">="===i&&s>=c}return">="===i}function mr(e,t){var r=t.split(/ ?&& ?/);if(0===r.length)return!1;for(var n=0;n<r.length;++n)if(!fr(e,r[n]))return!1;return!0}var gr=(e,t)=>pr(_r,e)&&((e,t)=>{if("boolean"==typeof t)return t;var n=void 0===e?r.versions&&r.versions.node&&r.versions.node:e;if("string"!=typeof n)throw new TypeError(void 0===e?"Unable to determine current node version":"If provided, a valid node version is required");if(t&&"object"==typeof t){for(var i=0;i<t.length;++i)if(mr(n,t[i]))return!0;return!1}return mr(n,t)})(t,_r[e]);const hr=et(er);var yr=hr.realpath&&"function"==typeof hr.realpath.native?hr.realpath.native:hr.realpath,vr=(e,t)=>{hr.stat(e,((e,r)=>e?"ENOENT"===e.code||"ENOTDIR"===e.code?t(null,!1):t(e):t(null,r.isFile()||r.isFIFO())))},br=(e,t)=>{hr.stat(e,((e,r)=>e?"ENOENT"===e.code||"ENOTDIR"===e.code?t(null,!1):t(e):t(null,r.isDirectory())))},xr=(e,t)=>{yr(e,((r,n)=>{r&&"ENOENT"!==r.code?t(r):t(null,r?e:n)}))},Er=(e,t,r,n)=>{r&&!1===r.preserveSymlinks?e(t,n):n(null,t)},Sr=(e,t,r)=>{e(t,((e,t)=>{if(e)r(e);else try{var n=JSON.parse(t);r(null,n)}catch(e){r(null)}}))},Dr=(e,t,n)=>{var i=n,a=t;if("function"==typeof t&&(i=a,a={}),"string"!=typeof e){var o=new TypeError("Path must be a string.");return r.nextTick((()=>{i(o)}))}var s=(a=sr(0,a)).isFile||vr,c=a.isDirectory||br,l=a.readFile||hr.readFile,u=a.realpath||xr,d=a.readPackage||Sr;if(a.readFile&&a.readPackage){var p=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return r.nextTick((()=>{i(p)}))}var _=a.packageIterator,f=a.extensions||[".js"],m=!1!==a.includeCoreModules,g=a.basedir||nr.dirname(tr()),h=a.filename||g;a.paths=a.paths||[];var y,v=nr.resolve(g);function b(t,r,n){t?i(t):r?i(null,r,n):S(y,((t,r,n)=>{if(t)i(t);else if(r)Er(u,r,a,((e,t)=>{e?i(e):i(null,t,n)}));else{var o=new Error("Cannot find module '"+e+"' from '"+h+"'");o.code="MODULE_NOT_FOUND",i(o)}}))}function x(e,t,r){var n=t,i=r;"function"==typeof n&&(i=n,n=void 0),function e(t,r,n){if(0===t.length)return i(null,void 0,n);var o=r+t[0],c=n;function l(n,l,d){if(c=l,n)return i(n);if(d&&c&&a.pathFilter){var p=nr.relative(d,o),_=p.slice(0,p.length-t[0].length),m=a.pathFilter(c,r,_);if(m)return e([""].concat(f.slice()),nr.resolve(d,m),c)}s(o,u)}function u(n,a){return n?i(n):a?i(null,o,c):(e(t.slice(1),r,c),void 0)}c?l(null,c):E(nr.dirname(o),l)}([""].concat(f),e,n)}function E(e,t){return""===e||"/"===e||"win32"===r.platform&&/^\w:[/\\]*$/.test(e)||/[/\\]node_modules[/\\]*$/.test(e)?t(null):(Er(u,e,a,((r,n)=>{if(r)return E(nr.dirname(e),t);var i=nr.join(n,"package.json");s(i,((r,n)=>{if(!n)return E(nr.dirname(e),t);d(l,i,((r,n)=>{r&&t(r);var o=n;o&&a.packageFilter&&(o=a.packageFilter(o,i)),t(null,o,e)}))}))})),void 0)}function S(e,t,r){var n=r,i=t;"function"==typeof i&&(n=i,i=a.package),Er(u,e,a,((t,r)=>{if(t)return n(t);var o=nr.join(r,"package.json");s(o,((t,r)=>t?n(t):r?(d(l,o,((t,r)=>{if(t)return n(t);var i=r;if(i&&a.packageFilter&&(i=a.packageFilter(i,o)),i&&i.main){if("string"!=typeof i.main){var s=new TypeError("package “"+i.name+"” `main` must be a string");return s.code="INVALID_PACKAGE_MAIN",n(s)}return"."!==i.main&&"./"!==i.main||(i.main="index"),x(nr.resolve(e,i.main),i,((t,r,i)=>t?n(t):r?n(null,r,i):i?(S(nr.resolve(e,i.main),i,((t,r,i)=>t?n(t):r?n(null,r,i):(x(nr.join(e,"index"),i,n),void 0))),void 0):x(nr.join(e,"index"),i,n))),void 0}x(nr.join(e,"/index"),i,n)})),void 0):x(nr.join(e,"index"),i,n)))}))}function D(e,t){if(0===t.length)return e(null,void 0);var r=t[0];function n(t,n,o){return t?e(t):n?e(null,n,o):(S(r,a.package,i),void 0)}function i(r,n,i){return r?e(r):n?e(null,n,i):(D(e,t.slice(1)),void 0)}c(nr.dirname(r),((i,o)=>i?e(i):o?(x(r,a.package,n),void 0):D(e,t.slice(1))))}Er(u,v,a,((t,r)=>{t?i(t):!(t=>{if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))y=nr.resolve(t,e),"."!==e&&".."!==e&&"/"!==e.slice(-1)||(y+="/"),/\/$/.test(e)&&y===t?S(y,a.package,b):x(y,a.package,b);else{if(m&&gr(e))return i(null,e);!((e,t,r)=>{var n=()=>((e,t,r)=>{for(var n=or(t,r,e),i=0;i<n.length;i++)n[i]=nr.join(n[i],e);return n})(e,t,a);D(r,_?_(e,t,n,a):n())})(e,t,((t,r,n)=>{if(t)i(t);else{if(r)return Er(u,r,a,((e,t)=>{e?i(e):i(null,t,n)}));var o=new Error("Cannot find module '"+e+"' from '"+h+"'");o.code="MODULE_NOT_FOUND",i(o)}}))}})(r)}))};const Tr={assert:!0,"assert/strict":">= 15",async_hooks:">= 8",buffer_ieee754:"< 0.9.7",buffer:!0,child_process:!0,cluster:!0,console:!0,constants:!0,crypto:!0,_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,diagnostics_channel:">= 15.1",dns:!0,"dns/promises":">= 15",domain:">= 0.7.12",events:!0,freelist:"< 6",fs:!0,"fs/promises":[">= 10 && < 10.1",">= 14"],_http_agent:">= 0.11.1",_http_client:">= 0.11.1",_http_common:">= 0.11.1",_http_incoming:">= 0.11.1",_http_outgoing:">= 0.11.1",_http_server:">= 0.11.1",http:!0,http2:">= 8.8",https:!0,inspector:">= 8.0.0",_linklist:"< 8",module:!0,net:!0,"node-inspect/lib/_inspect":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6.0 && < 12",os:!0,path:!0,"path/posix":">= 15.3","path/win32":">= 15.3",perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4",_stream_transform:">= 0.9.4",_stream_wrap:">= 1.4.1",_stream_passthrough:">= 0.9.4",_stream_readable:">= 0.9.4",_stream_writable:">= 0.9.4",stream:!0,"stream/promises":">= 15",string_decoder:!0,sys:[">= 0.6 && < 0.7",">= 0.8"],timers:!0,"timers/promises":">= 15",_tls_common:">= 0.11.13",_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3",tls:!0,trace_events:">= 10",tty:!0,url:!0,util:!0,"util/types":">= 15.3","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/consarray":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/csvparser":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/logreader":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/profile_view":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/splaytree":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],v8:">= 1",vm:!0,wasi:">= 13.4 && < 13.5",worker_threads:">= 11.7",zlib:!0};var Cr=r.versions&&r.versions.node&&r.versions.node.split(".")||[];function kr(e){for(var t=e.split(" "),r=t.length>1?t[0]:"=",n=(t.length>1?t[1]:t[0]).split("."),i=0;i<3;++i){var a=parseInt(Cr[i]||0,10),o=parseInt(n[i]||0,10);if(a!==o)return"<"===r?a<o:">="===r&&a>=o}return">="===r}function Ar(e){var t=e.split(/ ?&& ?/);if(0===t.length)return!1;for(var r=0;r<t.length;++r)if(!kr(t[r]))return!1;return!0}function Nr(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){for(var t=0;t<e.length;++t)if(Ar(e[t]))return!0;return!1}return Ar(e)}var wr={};for(var Fr in Tr)Object.prototype.hasOwnProperty.call(Tr,Fr)&&(wr[Fr]=Nr(Tr[Fr]));var Pr=wr,Ir=hr.realpathSync&&"function"==typeof hr.realpathSync.native?hr.realpathSync.native:hr.realpathSync,Or=e=>{try{var t=hr.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return t.isFile()||t.isFIFO()},Mr=e=>{try{var t=hr.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return t.isDirectory()},Rr=e=>{try{return Ir(e)}catch(e){if("ENOENT"!==e.code)throw e}return e},Lr=(e,t,r)=>r&&!1===r.preserveSymlinks?e(t):t,Br=(e,t)=>{var r=e(t);try{return JSON.parse(r)}catch(e){}};Dr.core=Pr,Dr.isCore=e=>gr(e),Dr.sync=(e,t)=>{if("string"!=typeof e)throw new TypeError("Path must be a string.");var n=sr(0,t),i=n.isFile||Or,a=n.readFileSync||hr.readFileSync,o=n.isDirectory||Mr,s=n.realpathSync||Rr,c=n.readPackageSync||Br;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var l=n.packageIterator,u=n.extensions||[".js"],d=!1!==n.includeCoreModules,p=n.basedir||nr.dirname(tr()),_=n.filename||p;n.paths=n.paths||[];var f=Lr(s,nr.resolve(p),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var m=nr.resolve(f,e);"."!==e&&".."!==e&&"/"!==e.slice(-1)||(m+="/");var g=v(m)||x(m);if(g)return Lr(s,g,n)}else{if(d&&gr(e))return e;var h=((e,t)=>{for(var r=()=>((e,t,r)=>{for(var n=or(t,r,e),i=0;i<n.length;i++)n[i]=nr.join(n[i],e);return n})(e,t,n),i=l?l(e,t,r,n):r(),a=0;a<i.length;a++){var s=i[a];if(o(nr.dirname(s))){var c=v(s);if(c)return c;var u=x(s);if(u)return u}}})(e,f);if(h)return Lr(s,h,n)}var y=new Error("Cannot find module '"+e+"' from '"+_+"'");throw y.code="MODULE_NOT_FOUND",y;function v(e){var t=b(nr.dirname(e));if(t&&t.dir&&t.pkg&&n.pathFilter){var r=nr.relative(t.dir,e),a=n.pathFilter(t.pkg,e,r);a&&(e=nr.resolve(t.dir,a))}if(i(e))return e;for(var o=0;o<u.length;o++){var s=e+u[o];if(i(s))return s}}function b(e){if(""!==e&&"/"!==e&&!("win32"===r.platform&&/^\w:[/\\]*$/.test(e)||/[/\\]node_modules[/\\]*$/.test(e))){var t=nr.join(Lr(s,e,n),"package.json");if(!i(t))return b(nr.dirname(e));var o=c(a,t);return o&&n.packageFilter&&(o=n.packageFilter(o,e)),{pkg:o,dir:e}}}function x(e){var t=nr.join(Lr(s,e,n),"/package.json");if(i(t)){try{var r=c(a,t)}catch(e){}if(r&&n.packageFilter&&(r=n.packageFilter(r,e)),r&&r.main){if("string"!=typeof r.main){var o=new TypeError("package “"+r.name+"” `main` must be a string");throw o.code="INVALID_PACKAGE_MAIN",o}"."!==r.main&&"./"!==r.main||(r.main="index");try{var l=v(nr.resolve(e,r.main));if(l)return l;var u=x(nr.resolve(e,r.main));if(u)return u}catch(e){}}}return v(nr.join(e,"/index"))}};var jr=Dr;const Ur=(e,t,r)=>{const n=Vr(e,t,r.exts);return n.basedir=Be(xe(r.containingFile)),r.packageFilter?n.packageFilter=r.packageFilter:null!==r.packageFilter&&(n.packageFilter=e=>(K(e.main)&&""!==e.main||(e.main="package.json"),e)),new Promise(((e,t)=>{jr(r.moduleId,n,((n,i,a)=>{if(n)t(n);else{i=pe(i);const t={moduleId:r.moduleId,resolveId:i,pkgData:a,pkgDirPath:St(i,r.moduleId)};e(t)}}))}))},Vr=(e,t,r)=>({async isFile(n,i){const a=xe(n);if((await t.stat(a)).isFile)return i(null,!0),void 0;if(bt(a)&&r.some((e=>a.endsWith(e)))){const r=At(e,Dt,a);return i(null,"string"==typeof await Pt(e,t,Dt,r,a)),void 0}i(null,!1)},async isDirectory(r,n){const i=xe(r);if((await t.stat(i)).isDirectory)return n(null,!0),void 0;if(bt(i)){if("node_modules"===Le(i))return t.sys.createDirSync(i),t.clearFileCache(i),n(null,!0),void 0;if(ht(i))return n(null,!1),void 0;for(const r of ut){const a=kt(e,Dt,i,r),o=gt(i,r),s=await Pt(e,t,Dt,a,o);if(K(s))return n(null,!0),void 0}}n(null,!1)},async readFile(e,r){const n=xe(e),i=await t.readFile(n);return K(i)?r(null,i):r(`readFile not found: ${e}`)},async realpath(t,r){const n=xe(t),i=await e.realpath(n);i.error&&"ENOENT"!==i.error.code?r(i.error):r(null,i.error?n:i.path)},extensions:r}),zr="4.5.4",Kr="2.14.0",Wr={stencil:Kr,parse5:"6.0.1",rollup:"2.42.3",sizzle:"2.42.3",terser:"5.6.1",typescript:zr},Hr=e=>{const t=e&&e.logger?e.logger:it(),r=new Map,n=new Set,i=e=>n.add(e),a=e=>n.delete(e),o=nt(),c=u&&navigator.hardwareConcurrency||1,l=e=>{if("/"===e||""===e)return"/";const t=Be(e),r=Le(e);return t.endsWith("/")?pe(`${t}${r}`):pe(`${t}/${r}`)},_=e=>{const t=r.get(l(e));return!(!t||!(t.isDirectory||t.isFile&&"string"==typeof t.data))},f=(e,t)=>{e=l(e);const r={basename:Le(e),dirname:Be(e),path:e,newDirs:[],error:null};return m(e,t,r),r},m=(e,t,n)=>{const i=Be(e);t&&t.recursive&&!$(i)&&m(i,t,n);const a=r.get(e);a?(a.isDirectory=!0,a.isFile=!1):(r.set(e,{basename:Le(e),dirname:i,isDirectory:!0,isFile:!1,watcherCallbacks:null,data:void 0}),n.newDirs.push(e),D(e,new Set))},g=e=>{e=l(e);const t=[],n=r.get(e);return n&&n.isDirectory&&r.forEach(((r,n)=>{"/"!==n&&(r.isDirectory||r.isFile&&"string"==typeof r.data)&&(e.endsWith("/")&&`${e}${r.basename}`===n||`${e}/${r.basename}`===n)&&t.push(n)})),t.sort()},h=e=>{e=l(e);const t=r.get(e);if(t&&t.isFile)return t.data},y=e=>({path:l(e),error:null}),v=(e,t,n)=>{const i=E(e);if(!i.error&&!n.error)if(i.isFile){const i=Be(t),a=f(i,{recursive:!0}),o=r.get(e).data,s=T(t,o);n.newDirs.push(...a.newDirs),n.renamed.push({oldPath:e,newPath:t,isDirectory:!1,isFile:!0}),s.error?n.error=s.error:n.newFiles.push(t)}else if(i.isDirectory){const r=g(e),i=f(t,{recursive:!0});n.newDirs.push(...i.newDirs),n.renamed.push({oldPath:e,newPath:t,isDirectory:!0,isFile:!1});for(const i of r){const r=i.replace(e,t);v(i,r,n)}}},b=(e,t={})=>{const r={basename:Le(e),dirname:Be(e),path:e,removedDirs:[],removedFiles:[],error:null};return x(e,t,r),r},x=(e,t,n)=>{if(!n.error){e=l(e);const i=g(e);if(t&&t.recursive)for(const e of i){const i=r.get(e);if(i)if(i.isDirectory)x(e,t,n);else if(i.isFile){const t=S(e);t.error?n.error=t.error:n.removedFiles.push(e)}}else if(i.length>0)return n.error="cannot delete directory that contains files/subdirectories",void 0;r.delete(e),D(e,new Set),n.removedDirs.push(e)}},E=e=>{e=l(e);const t=r.get(e);return t&&(t.isDirectory||t.isFile&&"string"==typeof t.data)?{isDirectory:t.isDirectory,isFile:t.isFile,isSymbolicLink:!1,size:t.isFile&&t.data?t.data.length:0,error:null}:{isDirectory:!1,isFile:!1,isSymbolicLink:!1,size:0,error:`ENOENT: no such file or directory, statSync '${e}'`}},S=e=>{e=l(e);const t={basename:Le(e),dirname:Be(e),path:e,error:null},n=r.get(e);if(n){if(n.watcherCallbacks)for(const t of n.watcherCallbacks)t(e,"fileDelete");r.delete(e),D(e,new Set)}return t},D=(e,t)=>{const n=l(Be(e)),i=r.get(n);if(i&&i.isDirectory&&i.watcherCallbacks)for(const t of i.watcherCallbacks)t(e,null);t.has(n)||(t.add(n),D(n,t))},T=(e,t)=>{const n={path:e=l(e),error:null},i=r.get(e);if(i){const r=i.data!==t;if(i.data=t,r&&i.watcherCallbacks)for(const t of i.watcherCallbacks)t(e,"fileUpdate")}else r.set(e,{basename:Le(e),dirname:Be(e),isDirectory:!1,isFile:!0,watcherCallbacks:null,data:t}),D(e,new Set);return n},C="undefined"!=typeof self?null===self||void 0===self?void 0:self.fetch:"undefined"!=typeof window?null===window||void 0===window?void 0:window.fetch:"undefined"!=typeof global?null===global||void 0===global?void 0:global.fetch:void 0,k=Promise.resolve();f("/");const A={name:"in-memory",version:Kr,events:o,access:async e=>_(e),accessSync:_,addDestory:i,copyFile:async(e,t)=>(T(t,h(e)),!0),createDir:async(e,t)=>f(e,t),createDirSync:f,homeDir:()=>(void 0)(),isTTY(){var e;return!!(null===(e=null==rt?void 0:tt.stdout)||void 0===e?void 0:e.isTTY)},getEnvironmentVar:e=>null==rt?void 0:tt.env[e],async destroy(){const e=[];n.forEach((r=>{try{const t=r();t&&t.then&&e.push(t)}catch(e){t.error(`stencil sys destroy: ${e}`)}})),await Promise.all(e),n.clear()},encodeToBase64:e=>btoa(unescape(encodeURIComponent(e))),exit:async e=>t.warn(`exit ${e}`),getCurrentDirectory:()=>"/",getCompilerExecutingPath:()=>d?location.href:A.getRemoteModuleUrl({moduleId:"@stencil/core",path:"compiler/stencil.min.js"}),getLocalModulePath:e=>Ve(e.rootDir,"node_modules",e.moduleId,e.path),getRemoteModuleUrl(e){const t=`${e.moduleId}${e.version?"@"+e.version:""}/${e.path}`;return new URL(t,"https://cdn.jsdelivr.net/npm/").href},hardwareConcurrency:c,isSymbolicLink:async e=>!1,nextTick:e=>k.then(e),normalizePath:l,platformPath:s,readDir:async e=>g(e),readDirSync:g,readFile:async e=>h(e),readFileSync:h,realpath:async e=>y(e),realpathSync:y,removeDestory:a,async rename(e,t){const r={oldPath:e=pe(e),newPath:t=pe(t),renamed:[],oldDirs:[],oldFiles:[],newDirs:[],newFiles:[],isFile:!1,isDirectory:!1,error:null},n=E(e);if(n.error)r.error=`${e} does not exist`;else if(n.isFile?r.isFile=!0:n.isDirectory&&(r.isDirectory=!0),v(e,t,r),!r.error)if(r.isDirectory){const t=b(e,{recursive:!0});t.error?r.error=t.error:(r.oldDirs.push(...t.removedDirs),r.oldFiles.push(...t.removedFiles))}else if(r.isFile){const t=S(e);t.error?r.error=t.error:r.oldFiles.push(e)}return r},fetch:C,resolvePath:e=>l(e),removeDir:async(e,t={})=>b(e,t),removeDirSync:b,stat:async e=>E(e),statSync:E,tmpDirSync:()=>"/.tmp",removeFile:async e=>S(e),removeFileSync:S,watchDirectory(e,t){e=l(e);const n=r.get(e),o=()=>{const n=r.get(e);if(n&&n.watcherCallbacks){const e=n.watcherCallbacks.indexOf(t);e>-1&&n.watcherCallbacks.splice(e,1)}};return i(o),n?(n.isDirectory=!0,n.isFile=!1,n.watcherCallbacks=n.watcherCallbacks||[],n.watcherCallbacks.push(t)):r.set(e,{basename:Le(e),dirname:Be(e),isDirectory:!0,isFile:!1,watcherCallbacks:[t],data:void 0}),{close(){a(o),o()}}},watchFile(e,t){e=l(e);const n=r.get(e),o=()=>{const n=r.get(e);if(n&&n.watcherCallbacks){const e=n.watcherCallbacks.indexOf(t);e>-1&&n.watcherCallbacks.splice(e,1)}};return i(o),n?(n.isDirectory=!1,n.isFile=!0,n.watcherCallbacks=n.watcherCallbacks||[],n.watcherCallbacks.push(t)):r.set(e,{basename:Le(e),dirname:Be(e),isDirectory:!1,isFile:!0,watcherCallbacks:[t],data:void 0}),{close(){a(o),o()}}},watchTimeout:32,writeFile:async(e,t)=>T(e,t),writeFileSync:T,async generateContentHash(e,t){const r=await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));let n=Array.from(new Uint8Array(r)).map((e=>e.toString(16).padStart(2,"0"))).join("");return"number"==typeof t&&(n=n.substr(0,t)),n},createWorkerController:p?e=>((e,t)=>{let r,n=0,i=!1,a=!1,o=0;const s=new Map,c=[],l=[],u=Math.max(Math.min(t,e.hardwareConcurrency),2)-1,d=Promise.resolve(),p=e=>console.error(e),_=()=>{let t=null;const n=e.getCompilerExecutingPath(),a={name:"stencil.worker."+o++};try{t=new Worker(n,a)}catch(e){null==r&&(r=new Blob([`importScripts('${n}');`],{type:"application/javascript"})),t=new Worker(URL.createObjectURL(r),a)}const c={worker:t,activeTasks:0,sendQueue:[]};return t.onerror=p,t.onmessage=e=>((e,t)=>{if(!i){const r=t.data;if(Array.isArray(r))for(const t of r)if(t){const r=s.get(t.stencilId);r?(s.delete(t.stencilId),t.stencilRtnError?r.reject(t.stencilRtnError):r.resolve(t.stencilRtnValue),e.activeTasks--,(e.activeTasks<0||e.activeTasks>50)&&(e.activeTasks=0)):t.stencilRtnError&&console.error(t.stencilRtnError)}}})(c,e),c},f=e=>{e.sendQueue.length>0&&(e.worker.postMessage(e.sendQueue),e.sendQueue.length=0)},m=e=>{let t;if(l.length>0){if(t=l[0],u>1){for(const e of l)e.activeTasks<t.activeTasks&&(t=e);t.activeTasks>0&&l.length<u&&(t=_(),l.push(t))}}else t=_(),l.push(t);t.activeTasks++,t.sendQueue.push(e)},g=()=>{a=!1,c.forEach(m),c.length=0,l.forEach(f)},h=(...e)=>new Promise(((t,r)=>{if(i)r(oe);else{const i={stencilId:n++,args:e};c.push(i),s.set(i.stencilId,{resolve:t,reject:r}),a||(a=!0,d.then(g))}}));return{send:h,destroy(){i=!0,s.forEach((e=>e.reject(oe))),s.clear(),l.forEach((e=>e.worker.terminate())),l.length=0},handler(e){return(...t)=>h(e,...t)},maxWorkers:u}})(A,e):null,details:{cpuModel:"",freemem:()