mancha 0.17.5 → 0.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1 -1
- package/dist/css_gen_utils.d.ts +105 -2
- package/dist/css_gen_utils.js +62 -10
- package/dist/css_gen_utils.js.map +1 -1
- package/dist/mancha.js +1 -1
- package/docs/css.md +66 -9
- package/package.json +1 -1
- package/scripts/generate-css-docs.ts +47 -1
package/dist/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={};e.d=(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function r(e){if(!function(e){const r=!t.test(e);return r}(e))return e}function i(e){return r(e)}const n={};function s(e){0}"undefined"!=typeof window&&window.TrustedScriptURL;class o{constructor(e,t){this.privateDoNotAccessOrElseWrappedAttributePrefix=t}toString(){return this.privateDoNotAccessOrElseWrappedAttributePrefix}}const a=o;function l(e){if(function(e){return e instanceof o}(e))return e.privateDoNotAccessOrElseWrappedAttributePrefix;throw new Error("")}"undefined"!=typeof window&&window.TrustedHTML;function c(e,t,r,i){if(0===e.length){throw new Error("")}const n=e.map(e=>l(e)),s=r.toLowerCase();if(n.every(e=>0!==s.indexOf(e)))throw new Error(`Attribute "${r}" does not match any of the allowed prefixes.`);t.setAttribute(r,i)}"undefined"!=typeof window&&window.TrustedScript;class h{}class d extends h{constructor(e,t){super(),s(),this.privateDoNotAccessOrElseWrappedStyleSheet=e}toString(){return this.privateDoNotAccessOrElseWrappedStyleSheet}}function u(e){return new d(e,n)}function f(e){if(e instanceof d)return e.privateDoNotAccessOrElseWrappedStyleSheet;throw new Error("")}function p(e,t){e.textContent=f(t)}Error;class m{iterable;constructor(e){this.iterable=e}filter(e){return new m(m.filterGenerator(e,this.iterable))}map(e){return new m(m.mapGenerator(e,this.iterable))}find(e){for(const t of this.iterable)if(e(t))return t}array(){return Array.from(this.iterable)}*generator(){for(const e of this.iterable)yield e}static*filterGenerator(e,t){for(const r of t)e(r)&&(yield r)}static*mapGenerator(e,t){for(const r of t)yield e(r)}static equals(e,t){const r=e[Symbol.iterator](),i=t[Symbol.iterator]();let n=r.next(),s=i.next();for(;!n.done&&!s.done;){if(n.value!==s.value)return!1;n=r.next(),s=i.next()}return n.done===s.done}}function g(e){return Object.isFrozen(e)&&Object.isFrozen(e.raw)}function b(e){return-1===e.toString().indexOf("`")}b(e=>e``)||b(e=>e`\0`)||b(e=>e`\n`)||b(e=>e`\u0000`),g``&&g`\0`&&g`\n`&&g`\u0000`;function _(e){const t=e[0].toLowerCase();return new a(n,t)}var v,w;function x(e){return{valueOf:e}.valueOf()}!function(e){e[e.STYLE_TAG=0]="STYLE_TAG",e[e.STYLE_ATTRIBUTE=1]="STYLE_ATTRIBUTE",e[e.HTML_ATTRIBUTE=2]="HTML_ATTRIBUTE"}(v||(v={}));class y{constructor(e,t,r,i,n){this.allowedElements=e,this.elementPolicies=t,this.allowedGlobalAttributes=r,this.globalAttributePolicies=i,this.globallyAllowedAttributePrefixes=n}isAllowedElement(e){return"FORM"!==e&&(this.allowedElements.has(e)||this.elementPolicies.has(e))}getAttributePolicy(e,t){const r=this.elementPolicies.get(t);if(null==r?void 0:r.has(e))return r.get(e);if(this.allowedGlobalAttributes.has(e))return{policyAction:w.KEEP};const i=this.globalAttributePolicies.get(e);return i||(this.globallyAllowedAttributePrefixes&&[...this.globallyAllowedAttributePrefixes].some(t=>0===e.indexOf(t))?{policyAction:w.KEEP}:{policyAction:w.DROP})}}!function(e){e[e.DROP=0]="DROP",e[e.KEEP=1]="KEEP",e[e.KEEP_AND_SANITIZE_URL=2]="KEEP_AND_SANITIZE_URL",e[e.KEEP_AND_NORMALIZE=3]="KEEP_AND_NORMALIZE",e[e.KEEP_AND_SANITIZE_STYLE=4]="KEEP_AND_SANITIZE_STYLE",e[e.KEEP_AND_USE_RESOURCE_URL_POLICY=5]="KEEP_AND_USE_RESOURCE_URL_POLICY",e[e.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET=6]="KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET"}(w||(w={}));new Set(["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"]);const $=["ARTICLE","SECTION","NAV","ASIDE","H1","H2","H3","H4","H5","H6","HEADER","FOOTER","ADDRESS","P","HR","PRE","BLOCKQUOTE","OL","UL","LH","LI","DL","DT","DD","FIGURE","FIGCAPTION","MAIN","DIV","EM","STRONG","SMALL","S","CITE","Q","DFN","ABBR","RUBY","RB","RT","RTC","RP","DATA","TIME","CODE","VAR","SAMP","KBD","SUB","SUP","I","B","U","MARK","BDI","BDO","SPAN","BR","WBR","INS","DEL","PICTURE","PARAM","TRACK","MAP","TABLE","CAPTION","COLGROUP","COL","TBODY","THEAD","TFOOT","TR","TD","TH","SELECT","DATALIST","OPTGROUP","OPTION","OUTPUT","PROGRESS","METER","FIELDSET","LEGEND","DETAILS","SUMMARY","MENU","DIALOG","SLOT","CANVAS","FONT","CENTER","ACRONYM","BASEFONT","BIG","DIR","HGROUP","STRIKE","TT"],E=[["A",new Map([["href",{policyAction:w.KEEP_AND_SANITIZE_URL}]])],["AREA",new Map([["href",{policyAction:w.KEEP_AND_SANITIZE_URL}]])],["LINK",new Map([["href",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY,conditions:new Map([["rel",new Set(["alternate","author","bookmark","canonical","cite","help","icon","license","next","prefetch","dns-prefetch","prerender","preconnect","preload","prev","search","subresource"])]])}]])],["SOURCE",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["IMG",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["VIDEO",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}]])],["AUDIO",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}]])]],A=["title","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-current","aria-disabled","aria-dropeffect","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","alt","align","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","bgcolor","border","cellpadding","cellspacing","checked","color","cols","colspan","controls","datetime","disabled","download","draggable","enctype","face","formenctype","frameborder","height","hreflang","hidden","ismap","label","lang","loop","max","maxlength","media","minlength","min","multiple","muted","nonce","open","placeholder","preload","rel","required","reversed","role","rows","rowspan","selected","shape","size","sizes","slot","span","spellcheck","start","step","summary","translate","type","valign","value","width","wrap","itemscope","itemtype","itemid","itemprop","itemref"],R=[["dir",{policyAction:w.KEEP_AND_NORMALIZE,conditions:x(()=>new Map([["dir",new Set(["auto","ltr","rtl"])]]))}],["async",{policyAction:w.KEEP_AND_NORMALIZE,conditions:x(()=>new Map([["async",new Set(["async"])]]))}],["cite",{policyAction:w.KEEP_AND_SANITIZE_URL}],["loading",{policyAction:w.KEEP_AND_NORMALIZE,conditions:x(()=>new Map([["loading",new Set(["eager","lazy"])]]))}],["poster",{policyAction:w.KEEP_AND_SANITIZE_URL}],["target",{policyAction:w.KEEP_AND_NORMALIZE,conditions:x(()=>new Map([["target",new Set(["_self","_blank"])]]))}]];new y(new Set($),new Map(E),new Set(A),new Map(R)),new y(new Set(x(()=>$.concat(["STYLE"]))),new Map(E),new Set(x(()=>A.concat(["id","name","class"]))),new Map(x(()=>R.concat([["style",{policyAction:w.KEEP_AND_SANITIZE_STYLE}]]))));function O(e){return u(e[0])}const I=[_`:`,_`style`,_`class`];function*k(e,t=new Set){const r=new Set,i=Array.from(e.childNodes).filter(e=>!t.has(e));for(yield e;i.length;){const e=i.shift();r.has(e)||(r.add(e),yield e),e.childNodes&&Array.from(e.childNodes).filter(e=>!t.has(e)).forEach(e=>i.push(e))}}function N(e,t){return void 0!==e?.[t]}function P(e,t){return"function"==typeof e?.[t]}function T(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function S(e,t){return N(e,"attribs")?e.attribs?.[t]??null:e.getAttribute?.(t)??null}function C(e,t){return N(e,"attribs")?t in(e.attribs||{}):e.hasAttribute?.(t)??!1}function D(e,t,r=""){return S(e,r+t)||S(e,`data-${t}`)||(e.dataset?.[T(t)]??null)}function L(e,t,r){N(e,"attribs")?e.attribs[t]=r:e.setAttribute?.(t,r)}function U(e,t,r){N(e,"attribs")?e.attribs[t]=r:c(I,e,t,r)}function M(e,t,r){switch(t){case"disabled":return void(e.disabled=r);case"selected":return void(e.selected=r);case"checked":return void(e.checked=r);default:e[t]=r}}function z(e,t){N(e,"attribs")?delete e.attribs[t]:e.removeAttribute?.(t)}function j(e,t,r=""){z(e,`${r}${t}`),z(e,`data-${t}`)}function F(e,t,r){if(N(e,"attribs")&&N(t,"attribs"))t.attribs[r]=e.attribs[r];else if(r.startsWith("data-")){const i=T(r.slice(5));t.dataset[i]=e.dataset?.[i]}else{const i=e?.getAttribute?.(r);U(t,r,i||"")}}function G(e){if(N(e,"firstElementChild"))return e.firstElementChild;return Array.from(e.children).find(e=>1===e.nodeType)}function K(e,...t){if(P(e,"replaceWith"))return e.replaceWith(...t);{const r=e,i=r.parentNode,n=Array.from(i.childNodes).indexOf(r);t.forEach(e=>e.parentNode=i),i.childNodes=[].concat(Array.from(i.childNodes).slice(0,n)).concat(t).concat(Array.from(i.childNodes).slice(n+1))}}function W(e,...t){P(e,"replaceChildren")?e.replaceChildren(...t):(e.childNodes=t,t.forEach(t=>t.parentNode=e))}function Y(e,t){return P(t,"appendChild")?e.appendChild(t):(e.childNodes.push(t),t.parentNode=e,t)}function H(e,t){return P(t,"removeChild")?e.removeChild(t):(W(e,...Array.from(e.childNodes).filter(e=>e!==t)),t)}function B(e,t,r){return r?P(e,"insertBefore")?e.insertBefore(t,r):(K(r,t,r),t):Y(e,t)}function V(e,t=0){return e?e.length<=t?e:e.slice(0,t-1)+"…":""}function Z(e,t=0){return globalThis.DocumentFragment&&e instanceof DocumentFragment?Array.from(e.childNodes).map(e=>Z(e,t)).join(""):V(e.outerHTML||e.nodeValue||String(e),t)}function q(e){return e.includes("/")?e.split("/").slice(0,-1).join("/"):""}var Q;!function(e){e.resolveIncludes=async function(e,t){const r=e,i=r.tagName?.toLowerCase();if(!["include","link"].includes(i))return;if("link"===i&&"subresource"!==S(r,"rel"))return;this.log("include directive found in:\n",Z(e,128)),this.log("include params:",t);const n="link"===r.tagName.toLocaleLowerCase()?"href":"src",s=S(r,n);if(!s)throw new Error(`"${n}" attribute missing from ${Z(e,128)}.`);const o=[];"include"===i&&o.push("src"),"link"===i&&o.push("rel","href");const a=t=>{const i=G(t);for(const e of Array.from(r.attributes))i&&!o.includes(e.name)&&F(r,i,e.name);K(e,...t.childNodes)},l={...t,rootDocument:!1,maxdepth:t?.maxdepth-1};if(0===l.maxdepth)throw new Error("Maximum recursion depth reached.");if(s.includes("://")||s.startsWith("//"))this.log("Including remote file from absolute path:",s),await this.preprocessRemote(s,l).then(a);else if(t?.dirpath?.includes("://")||t?.dirpath?.startsWith("//")){const e=s.startsWith("/")?s:`${t.dirpath}/${s}`;this.log("Including remote file from relative path:",e),await this.preprocessRemote(e,l).then(a)}else if("/"===s.charAt(0))this.log("Including local file from absolute path:",s),await this.preprocessLocal(s,l).then(a);else{const e=t?.dirpath&&"."!==t?.dirpath?`${t?.dirpath}/${s}`:s;this.log("Including local file from relative path:",e),await this.preprocessLocal(e,l).then(a)}},e.rebaseRelativePaths=function(e,t){const r=e,n=r.tagName?.toLowerCase();if(!t?.dirpath)return;const s=S(r,"src"),o=S(r,"href"),a=D(r,"render",":"),l=s||o||a;if(!l||((c=l).includes("://")||c.startsWith("/")||c.startsWith("#")||c.startsWith("data:")))return;var c;const h=`${t.dirpath}/${l}`;this.log("Rebasing relative path as:",h),a?function(e,t,r,i=""){C(e,`${i}${t}`)?L(e,`${i}${t}`,r):C(e,`data-${t}`)?L(e,`data-${t}`,r):L(e,`${i}${t}`,r)}(r,"render",h,":"):N(r,"attribs")?U(r,s?"src":"href",h):"img"===n?r.src=h:"a"===n?function(e,t){const r=i(t);void 0!==r&&(e.href=r)}(r,h):"source"===n||"audio"===n||"video"===n||"track"===n||"input"===n?r.src=h:"area"===n?function(e,t){const r=i(t);void 0!==r&&(e.href=r)}(r,h):this.log("Unable to rebase relative path for element:",n)},e.registerCustomElements=function(t,r){const i=t,n=i.tagName?.toLowerCase(),s=(S(i,"is")||S(i,"alt"))?.toLowerCase();if(["template","div"].includes(n)&&s){if("div"===n&&"template"!==S(i,"role"))return;if(!this._customElements.has(s)){this.log(`Registering custom element: ${s}\n`,Z(i,128));const t=i.content||i,n=Array.from(k(t));for(let t=1;t<n.length;t++)e.rebaseRelativePaths.call(this,n[t],r);this._customElements.set(s,i),H(i.parentNode,i)}}},e.resolveCustomElements=function(e,t){const r=e,i=r.tagName?.toLowerCase();let n=i;if("div"===n&&(n=S(r,"role")?.toLowerCase()||n),n&&this._customElements.has(n)){this.log(`Processing custom element: ${n}\n`,Z(r,128));const t=this._customElements.get(n),s=(t.content||t).cloneNode(!0),o=G(s);if(o)for(const e of Array.from(r.attributes))"div"===i&&"role"===e.name||F(r,o,e.name);const a=new m(k(s)).find(e=>"slot"===e.tagName?.toLowerCase());a&&K(a,...r.childNodes),K(e,...s.childNodes)}},e.resolveTextNodeExpressions=function(e,t){const r=e.nodeValue||"";if(3!==e.nodeType||!r?.trim())return;this.log("Processing node content value:\n",V(r,128));const i=new RegExp(/{{ ([^}]+) }}/gm),n=Array.from(r.matchAll(i)).map(e=>e[1]);return this.effect(function(){let t=r;for(const r of n){const i=this.eval(r,{$elem:e});t=t.replace(`{{ ${r} }}`,String(i))}e.nodeValue=t})},e.resolveDataAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"data",":");if(i){let n;this.log(":data attribute found in:\n",Z(e,128)),j(r,"data",":"),N(e,"renderer")?(n=e.renderer,this.log("Reusing existing subrenderer for node:",Z(e,64))):(n=this.subrenderer(),M(e,"renderer",n),this.log("Created and attached new subrenderer for node:",Z(e,64)));const s=n.eval(i,{$elem:e});if(await Promise.all(Object.entries(s).map(([e,t])=>n._store.set(e,t))),n===this)return;for(const t of k(e,this._skipNodes))this._skipNodes.add(t);await n.mount(e,t)}},e.resolveClassAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"class",":");if(i){this.log(":class attribute found in:\n",Z(e,128)),j(r,"class",":");const t=S(r,"class")||"";return this.effect(function(){const n=this.eval(i,{$elem:e});U(r,"class",(n?`${t} ${n}`:t).trim())})}},e.resolveTextAttributes=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"text",":");if(i){this.log(":text attribute found in:\n",Z(e,128)),j(r,"text",":");const t=t=>this.textContent(e,t);return this.effect(function(){t(this.eval(i,{$elem:e}))})}},e.resolveHtmlAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"html",":");return i?(this.log(":html attribute found in:\n",Z(e,128)),j(r,"html",":"),this.effect(function(){const n=this.eval(i,{$elem:e});return new Promise(async e=>{const i=await this.preprocessString(n,t);await this.renderNode(i),W(r,i),e()})})):void 0},e.resolveEventAttributes=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[]))if(t.name.startsWith(":on:")||t.name.startsWith("data-on-")){let i="",n=[];if(t.name.startsWith(":on:")?[i,...n]=t.name.substring(4).split("."):t.name.startsWith("data-on-")&&([i,...n]=t.name.substring(8).split(".")),!i)throw new Error(`Invalid event attribute: ${t.name}`);this.log(t.name,"attribute found in:\n",Z(e,128)),j(r,t.name);const s="submit"===i&&"FORM"===r.tagName.toUpperCase();e.addEventListener?.(i,r=>((n.includes("prevent")||s)&&r.preventDefault(),this.eval(t.value,{$elem:e,$event:r})))}},e.resolveForAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"for",":")?.trim();if(i){this.log(":for attribute found in:\n",Z(e,128)),j(r,"for",":");for(const t of k(e,this._skipNodes))this._skipNodes.add(t);const n=S(r,"style")||"";L(r,"style","display: none;");const s=e.parentNode,o=this.createElement("template",e.ownerDocument);B(s,o,e),H(s,e),Y(o,e),this.log(":for template:\n",Z(o,128));const a=i.split(" in ",2);if(2!==a.length)throw new Error(`Invalid :for format: \`${i}\`. Expected "{key} in {expression}".`);const l=[],[c,h]=a;await this.effect(function(){const r=this.eval(h,{$elem:e});if(this.log(":for list items:",r),l.splice(0,l.length).forEach(e=>{H(s,e),this._skipNodes.delete(e)}),!Array.isArray(r))return console.error(`Expression did not yield a list: \`${h}\` => \`${r}\``),Promise.resolve();const i=[];for(const s of r){const r=this.subrenderer();r._store.set(c,s);const o=e.cloneNode(!0);L(o,"style",n),l.push(o),this._skipNodes.add(o),i.push(r.mount(o,t)),this.log("Rendered list child:\n",Z(o,128))}const a=o.nextSibling;for(const e of l)B(s,e,a);return Promise.all(i)})}},e.resolveBindAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"bind",":");if(i){this.log(":bind attribute found in:\n",Z(e,128));const t=["change","input"],n=S(r,":bind:on")?.split(",")||r.dataset?.bindOn?.split(",")||t;j(r,"bind",":"),z(r,":bind:on"),z(r,"data-bind-on");const s="checkbox"===S(r,"type")?"checked":"value";i.includes(".")||this.has(i)||this.set(i,""),this.effect(function(){const t=this.eval(i,{$elem:e});"checked"===s?r.checked=!!t:r.value=t});const o=`${i} = $elem.${s}`;for(const t of n)e.addEventListener(t,()=>this.eval(o,{$elem:e}))}},e.resolveShowAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"show",":");if(i){this.log(":show attribute found in:\n",Z(e,128)),j(r,"show",":");const t="none"===r.style?.display?"":r.style?.display??S(r,"style")?.split(";")?.find(e=>"display"===e.split(":")[0])?.split(":")?.at(1)?.trim();this.effect(function(){const n=this.eval(i,{$elem:e});r.style?r.style.display=n?t:"none":U(r,"style",`display: ${n?t:"none"};`)})}},e.resolveCustomAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[])){const i=":attr:",n="data-attr-";if(t.name.startsWith(i)||t.name.startsWith(n)){this.log(t.name,"attribute found in:\n",Z(e,128)),z(r,t.name);const s=t.name.split(i,2).at(-1)?.split(n,2).at(-1);this.effect(function(){const i=this.eval(t.value,{$elem:e});L(r,s,i)})}}},e.resolveCustomProperty=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[])){const i=":prop:",n="data-prop-";if(t.name.startsWith(i)||t.name.startsWith(n)){this.log(t.name,"property found in:\n",Z(e,128)),z(r,t.name);const s=t.name.split(i,2).at(-1)?.split(n,2).at(-1),o=T(s);this.effect(function(){const i=this.eval(t.value,{$elem:e});M(r,o,i)})}}},e.stripTypes=function(e,t){const r=e;S(r,":types")&&z(r,":types"),S(r,"data-types")&&z(r,"data-types")},e.resolveRenderAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"render",":");if(!i)return;let n;this.log(`:render attribute found: ${i}`),j(r,"render",":"),N(e,"renderer")?(n=e.renderer,this.log("Reusing existing subrenderer for :render:",Z(e,64))):(n=this.subrenderer(),M(r,"renderer",n)),await n.mount(e,t);for(const t of k(e,this._skipNodes))this._skipNodes.add(t);try{const e=await import(i);"function"==typeof e.default?await e.default(r,n):void 0!==e.default&&console.warn(`Module ${i} default export is not a function`)}catch(e){console.error(`Failed to execute render init from ${i}:`,e)}}}(Q||(Q={}));const X=new Set(["this","typeof"]),J=new Set(["in"]),ee=new Set(["+","-","!","typeof"]),te=new Set(["=","+","-","*","/","%","^","==","!=",">","<",">=","<=","||","&&","??","&","===","!==","|","in"]),re={"!":0,":":0,",":0,")":0,"]":0,"}":0,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,in:10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"?.":13,"{":13},ie={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"||":(e,t)=>e||t,"&&":(e,t)=>e&&t,"??":(e,t)=>e??t,"|":(e,t)=>t(e),in:(e,t)=>e in t},ne={"+":e=>e,"-":e=>-e,"!":e=>!e,typeof:e=>typeof e};const se=new Set(["==","!=","<=",">=","||","&&","??","?."]),oe=new Set(["===","!=="]);var ae;!function(e){e[e.STRING=1]="STRING",e[e.IDENTIFIER=2]="IDENTIFIER",e[e.DOT=3]="DOT",e[e.COMMA=4]="COMMA",e[e.COLON=5]="COLON",e[e.INTEGER=6]="INTEGER",e[e.DECIMAL=7]="DECIMAL",e[e.OPERATOR=8]="OPERATOR",e[e.GROUPER=9]="GROUPER",e[e.KEYWORD=10]="KEYWORD",e[e.ARROW=11]="ARROW",e[e.OPTIONAL_DOT=12]="OPTIONAL_DOT",e[e.SPREAD=13]="SPREAD"}(ae||(ae={}));const le=(e,t,r=0)=>({kind:e,value:t,precedence:r}),ce=e=>9===e||10===e||13===e||32===e,he=e=>95===e||36===e||65<=(e&=-33)&&e<=90,de=e=>he(e)||ue(e),ue=e=>48<=e&&e<=57;class fe{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;ce(this._next);)this._advance(!0);if(34===(e=this._next)||39===e)return this._tokenizeString();var e;if(he(this._next))return this._tokenizeIdentOrKeyword();if(ue(this._next))return this._tokenizeNumber();if(46===this._next)return this._tokenizeDot();if(44===this._next)return this._tokenizeComma();if(58===this._next)return this._tokenizeColon();if((e=>43===e||45===e||42===e||47===e||33===e||38===e||37===e||60===e||61===e||62===e||63===e||94===e||124===e)(this._next))return this._tokenizeOperator();if((e=>40===e||41===e||91===e||93===e||123===e||125===e)(this._next))return this._tokenizeGrouper();if(this._advance(),void 0!==this._next)throw new Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),!0===e&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){const t=this._input.substring(this._tokenStart,this._index+e);return 0===e&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){const e="unterminated string",t=this._next;for(this._advance(!0);this._next!==t;){if(void 0===this._next)throw new Error(e);if(92===this._next&&(this._advance(),void 0===this._next))throw new Error(e);this._advance()}const r=le(ae.STRING,this._getValue().replace(/\\(.)/g,(e,t)=>{switch(t){case"n":return"\n";case"r":return"\r";case"t":return"\t";case"b":return"\b";case"f":return"\f";default:return t}}));return this._advance(),r}_tokenizeIdentOrKeyword(){do{this._advance()}while(de(this._next));const e=this._getValue(),t=(r=e,X.has(r)?ae.KEYWORD:J.has(e)?ae.OPERATOR:ae.IDENTIFIER);var r;return le(t,e,re[e]??0)}_tokenizeNumber(){do{this._advance()}while(ue(this._next));return 46===this._next?this._tokenizeDot():le(ae.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),ue(this._next))return this._tokenizeFraction();if(46===this._next){if(this._advance(),46===this._next)return this._advance(),this._clearValue(),le(ae.SPREAD,"...");throw new Error("Unexpected token ..")}return this._clearValue(),le(ae.DOT,".",13)}_tokenizeComma(){return this._advance(!0),le(ae.COMMA,",")}_tokenizeColon(){return this._advance(!0),le(ae.COLON,":")}_tokenizeFraction(){do{this._advance()}while(ue(this._next));return le(ae.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(oe.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),"=>"===e)return this._advance(),le(ae.ARROW,e);se.has(e)&&this._advance()}return e=this._getValue(),"?."===e?le(ae.OPTIONAL_DOT,e,13):le(ae.OPERATOR,e,re[e])}_tokenizeGrouper(){const e=String.fromCharCode(this._next),t=le(ae.GROUPER,e,re[e]);return this._advance(!0),t}}class pe{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new fe(e),this._ast=t}parse(){this._advance();const e=this._parseExpression();if(this._token)throw new Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw new Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);const r=this._tokenizer.nextToken();this._token=r,this._kind=r?.kind,this._value=r?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();const e=this._parseUnary();return void 0===e?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(void 0===e)throw new Error("Expected left to be defined.");for(;this._token;)if(this._matches(ae.GROUPER,"(")){const t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(ae.GROUPER,"[")){const t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(ae.DOT)||this._matches(ae.OPTIONAL_DOT)){const t=this._kind===ae.OPTIONAL_DOT;if(this._advance(),t&&this._matches(ae.GROUPER,"[")){const t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(ae.GROUPER,"(")){const t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{const r=this._parseUnary();e=this._makeInvokeOrGetter(e,r,t)}}else{if(this._matches(ae.KEYWORD))break;if(!(this._matches(ae.OPERATOR)&&this._token.precedence>=t))break;e="?"===this._value?this._parseTernary(e):this._parseBinary(e,this._token)}return e}_makeInvokeOrGetter(e,t,r){if(void 0===t)throw new Error("expected identifier");if("ID"===t.type)return this._ast.getter(e,t.value,r);if("Invoke"===t.type&&"ID"===t.receiver.type){const i=t.receiver;return this._ast.invoke(e,i.value,t.arguments,r)}throw new Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!te.has(t.value))throw new Error(`unknown operator: ${t.value}`);this._advance();let r=this._parseUnary();for(;(this._kind===ae.OPERATOR||this._kind===ae.DOT||this._kind===ae.GROUPER)&&this._token.precedence>t.precedence;)r=this._parsePrecedence(r,this._token.precedence);if(void 0===r)throw new Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,r)}_parseUnary(){if(this._matches(ae.KEYWORD,"typeof")){this._advance();const e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary("typeof",e)}if(this._matches(ae.OPERATOR)){const e=this._value;if(this._advance(),"+"===e||"-"===e){if(this._matches(ae.INTEGER))return this._parseInteger(e);if(this._matches(ae.DECIMAL))return this._parseDecimal(e)}if(!ee.has(e))throw new Error(`unexpected token: ${e}`);const t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(ae.OPERATOR,"?");const t=this._parseExpression();this._advance(ae.COLON);const r=this._parseExpression();return this._ast.ternary(e,t,r)}_parsePrimary(){switch(this._kind){case ae.KEYWORD:const e=this._value;if("this"===e)return this._advance(),this._ast.id(e);if(X.has(e))throw new Error(`unexpected keyword: ${e}`);throw new Error(`unrecognized keyword: ${e}`);case ae.IDENTIFIER:return this._parseInvokeOrIdentifier();case ae.STRING:return this._parseString();case ae.INTEGER:return this._parseInteger();case ae.DECIMAL:return this._parseDecimal();case ae.GROUPER:return"("===this._value?this._parseParenOrFunction():"{"===this._value?this._parseMap():"["===this._value?this._parseList():void 0;case ae.COLON:throw new Error('unexpected token ":"');default:return}}_parseList(){const e=[];do{if(this._advance(),this._matches(ae.GROUPER,"]"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,"]"),this._ast.list(e)}_parseMap(){const e=[];do{if(this._advance(),this._matches(ae.GROUPER,"}"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{const t=this._value;if((this._matches(ae.STRING)||this._matches(ae.IDENTIFIER))&&this._advance(),this._matches(ae.COLON)){this._advance(ae.COLON);const r=this._parseExpression();r&&e.push(this._ast.property(t,r))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,"}"),this._ast.map(e)}_parseInvokeOrIdentifier(){const e=this._value;if("true"===e)return this._advance(),this._ast.literal(!0);if("false"===e)return this._advance(),this._ast.literal(!1);if("null"===e)return this._advance(),this._ast.literal(null);if("undefined"===e)return this._advance(),this._ast.literal(void 0);const t=this._parseIdentifier(),r=this._parseArguments();return r?this._ast.invoke(t,void 0,r):t}_parseIdentifier(){if(!this._matches(ae.IDENTIFIER))throw new Error(`expected identifier: ${this._value}`);const e=this._value;return this._advance(),this._ast.id(e)}_parseArguments(){if(!this._matches(ae.GROUPER,"("))return;const e=[];do{if(this._advance(),this._matches(ae.GROUPER,")"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{const t=this._parseExpression();e.push(t)}}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,")"),e}_parseIndex(){this._advance();const e=this._parseExpression();return this._advance(ae.GROUPER,"]"),e}_parseParenOrFunction(){const e=this._parseArguments();if(this._matches(ae.ARROW)){this._advance();const t=this._parseExpression(),r=e?.map(e=>e.value)??[];return this._ast.arrowFunction(r,t)}return this._ast.paren(e[0])}_parseString(){const e=this._ast.literal(this._value);return this._advance(),e}_parseInteger(e=""){const t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=""){const t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}}class me{timeouts=new Map;debounce(e,t){return new Promise((r,i)=>{const n=this.timeouts.get(t);n&&clearTimeout(n),this.timeouts.set(t,setTimeout(()=>{try{r(t()),this.timeouts.delete(t)}catch(e){i(e)}},e))})}}const ge=new class{empty(){return{type:"Empty",evaluate:e=>e,getIds:e=>e}}literal(e){return{type:"Literal",value:e,evaluate(e){return this.value},getIds:e=>e}}id(e){return{type:"ID",value:e,evaluate(e){return"this"===this.value?e:e?.[this.value]},getIds(e){return e.push(this.value),e}}}unary(e,t){const r=ne[e];return{type:"Unary",operator:e,child:t,evaluate(e){return r(this.child.evaluate(e))},getIds(e){return this.child.getIds(e)}}}binary(e,t,r){const i=ie[t];return{type:"Binary",operator:t,left:e,right:r,evaluate(e){if("="===this.operator){if("ID"!==this.left.type&&"Getter"!==this.left.type&&"Index"!==this.left.type)throw new Error(`Invalid assignment target: ${this.left}`);const t=this.right.evaluate(e);let r,i;return"Getter"===this.left.type?(r=this.left.receiver.evaluate(e),i=this.left.name):"Index"===this.left.type?(r=this.left.receiver.evaluate(e),i=String(this.left.argument.evaluate(e))):"ID"===this.left.type&&(r=e,i=this.left.value),void 0===r?void 0:r[i]=t}return i(this.left.evaluate(e),this.right.evaluate(e))},getIds(e){return this.left.getIds(e),this.right.getIds(e),e}}}getter(e,t,r){return{type:"Getter",receiver:e,name:t,optional:r,evaluate(e){const t=this.receiver.evaluate(e);if(!this.optional||null!=t)return t?.[this.name]},getIds(e){return this.receiver.getIds(e),e}}}invoke(e,t,r,i){if(null!=t&&"string"!=typeof t)throw new Error("method not a string");return{type:"Invoke",receiver:e,method:t,arguments:r,optional:i,evaluate(e){const t=this.receiver.evaluate(e);if(this.optional&&null==t)return;const r=this.method?t:e?.this??e,i=this.method?t?.[this.method]:t,n=this.arguments??[],s=[];for(const t of n)if("SpreadElement"===t?.type){const r=t.evaluate(e);r&&"function"==typeof r[Symbol.iterator]&&s.push(...r)}else s.push(t?.evaluate(e));return i?.apply?.(r,s)},getIds(e){return this.receiver.getIds(e),this.arguments?.forEach(t=>t?.getIds(e)),e}}}paren(e){return e}index(e,t,r){return{type:"Index",receiver:e,argument:t,optional:r,evaluate(e){const t=this.receiver.evaluate(e);if(this.optional&&null==t)return;const r=this.argument.evaluate(e);return t?.[r]},getIds(e){return this.receiver.getIds(e),e}}}ternary(e,t,r){return{type:"Ternary",condition:e,trueExpr:t,falseExpr:r,evaluate(e){return this.condition.evaluate(e)?this.trueExpr.evaluate(e):this.falseExpr.evaluate(e)},getIds(e){return this.condition.getIds(e),this.trueExpr.getIds(e),this.falseExpr.getIds(e),e}}}map(e){return{type:"Map",properties:e,evaluate(t){const r={};if(e&&this.properties)for(const e of this.properties)"SpreadProperty"===e.type?Object.assign(r,e.evaluate(t)):r[e.key]=e.value.evaluate(t);return r},getIds(t){if(e&&this.properties)for(const e of this.properties)"SpreadProperty"===e.type?e.expression.getIds(t):e.value.getIds(t);return t}}}property(e,t){return{type:"Property",key:e,value:t,evaluate(e){return this.value.evaluate(e)},getIds(e){return this.value.getIds(e)}}}list(e){return{type:"List",items:e,evaluate(e){if(!this.items)return[];const t=[];for(const r of this.items)if("SpreadElement"===r?.type){const i=r.evaluate(e);i&&"function"==typeof i[Symbol.iterator]&&t.push(...i)}else t.push(r?.evaluate(e));return t},getIds(e){return this.items?.forEach(t=>t?.getIds(e)),e}}}arrowFunction(e,t){return{type:"ArrowFunction",params:e,body:t,evaluate(e){const t=this.params,r=this.body;return function(...i){const n=Object.fromEntries(t.map((e,t)=>[e,i[t]])),s=new Proxy(e??{},{set:(e,t,r)=>(n.hasOwnProperty(t)&&(n[t]=r),e[t]=r),get:(e,t)=>n.hasOwnProperty(t)?n[t]:e[t]});return r.evaluate(s)}},getIds(e){return this.body.getIds(e).filter(e=>!this.params.includes(e))}}}spreadProperty(e){return{type:"SpreadProperty",expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}spreadElement(e){return{type:"SpreadElement",expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}},be="__is_proxy__";function _e(e,t){const r=e?._store;return r?.has(t)?r.get(t):r?.has("$parent")?_e(r.get("$parent"),t):void 0}function ve(e,t){const r=e?._store;return r?.has(t)?e:r?.has("$parent")?ve(r.get("$parent"),t):null}class we extends me{evalkeys=["$elem","$event"];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_observer=null;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(const[t,r]of Object.entries(e||{}))this.set(t,r)}wrapFunction(e){return(...t)=>e.call(this.$,...t)}wrapObject(e,t){return null==e||((r=e)instanceof we||!0===r[be])||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,r)=>"string"==typeof r&&r in e&&(delete e[r],t(),!0),set:(e,r,i,n)=>{"object"==typeof i&&null!==i&&(i=this.wrapObject(i,t));const s=Reflect.set(e,r,i,n);return t(),s},get:(e,t,r)=>t===be||Reflect.get(e,t,r)});var r}watch(e,t){const r=ve(this,e);if(!r)throw new Error(`Cannot watch key "${e}" as it does not exist in the store.`);r.observers.has(e)||r.observers.set(e,new Set),r.observers.get(e)?.has(t)||r.observers.get(e)?.add(t)}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e).add(t)}async notify(e,t=10){const r=ve(this,e),i=Array.from(r?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(i.map(e=>e.call(this.proxify(e)))))}get(e,t){return t&&this.watch(e,t),_e(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;const r=()=>this.notify(e);t&&"function"==typeof t&&(t=this.wrapFunction(t)),t&&"object"==typeof t&&(t=this.wrapObject(t,r)),function(e,t,r){const i=ve(e,t);i?i._store.set(t,r):e._store.set(t,r)}(this,e,t);for(const[r,i]of this.keyHandlers.entries())if(r.test(e))for(const r of i)await Promise.resolve(r.call(this.$,e,t));await r()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}effect(e){return e.call(this.proxify(e))}proxify(e){const t=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(t.map(e=>[e,null]));return new Proxy(r,{has:(e,t)=>{if("string"==typeof t){if(ve(this,t))return!0;if(Reflect.has(this,t))return!0}return Reflect.has(r,t)},get:(t,r,i)=>{if("string"==typeof r){if(ve(this,r))return this.get(r,e);if(e&&r!==be&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,e)}return"$"===r?this.proxify(e):Reflect.get(this,r,i)},set:(e,t,r,i)=>("string"!=typeof t||t in this?Reflect.set(this,t,r,i):this.set(t,r),!0)})}get $(){return this.proxify()}makeEvalFunction(e){if(e.includes(";"))throw new Error("Complex expressions are not supported.");return(t,r)=>{const i=((e,t)=>new pe(e,t).parse())(e,ge),n=new Proxy(r,{has:(e,r)=>r in e||r in t||r in globalThis,get(e,r){if("string"==typeof r)return r in e?e[r]:r in t?t[r]:r in globalThis?globalThis[r]:t[r]},set:(e,r,i)=>"string"==typeof r&&(r in e?(e[r]=i,!0):(t[r]=i,!0))});return i?.evaluate(n)}}cachedExpressionFunction(e){return e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e)),this.expressionCache.get(e)}eval(e,t={}){const r=this._observer?this:this.$;if(this._store.has(e))return r[e];{const i=this.cachedExpressionFunction(e);try{return i(r,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){const r={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{r.$result=e}).catch(e=>{r.$error=e instanceof Error?e:new Error(String(e))}).finally(()=>{r.$pending=!1}),r}}const xe="$$";function ye(){return new URL(globalThis.window?.location?.href||"http://localhost/")}function $e(e){return`${xe}${e}`}function Ee(e){return e.keys().filter(e=>e.startsWith(xe))}function Ae(e,t,r){const i=function(e){return e.substring(2)}(t);let n=!1;if(r){const t=String(r);e.searchParams.get(i)!==t&&(e.searchParams.set(i,t),n=!0)}else e.searchParams.has(i)&&(e.searchParams.delete(i),n=!0);return n}async function Re(e){const t=ye();await async function(e,t){for(const[r,i]of t.searchParams.entries()){const t=$e(r);e.get(t)!==i&&await e.set(t,i)}}(e,t),function(e,t){let r=!1;for(const i of Ee(t))Ae(e,i,t.get(i))&&(r=!0);r&&globalThis.window?.history?.replaceState({},"",e.toString())}(t,e),e.addKeyHandler(new RegExp("^\\$\\$"),(e,t)=>{const r=ye();Ae(r,e,t)&&globalThis.window?.history?.replaceState({},"",r.toString())}),globalThis.window?.addEventListener("popstate",function(e){return async()=>{const t=ye(),r=new Set;for(const[i,n]of t.searchParams.entries()){const t=$e(i);r.add(t),e.get(t)!==n&&e.set(t,n)}const i=Ee(e);for(const t of i)r.has(t)||e.del(t)}}(e))}class Oe extends we{debugging=!1;dirpath="";_skipNodes=new Set;_customElements=new Map;debug(e){return this.debugging=e,this}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??"default"}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log("Preprocessing string content with params:\n",t);const r=this.parseHTML(e,t);return await this.preprocessNode(r,t),r}async preprocessRemote(e,t){const r={};t?.cache&&(r.cache=t.cache);const i=await fetch(e,r).then(e=>e.text());return this.preprocessString(i,{...t,dirpath:q(e),rootDocument:t?.rootDocument??!e.endsWith(".tpl.html")})}async preprocessLocal(e,t){const r=await this.fetchLocal(e,t);return this.preprocessString(r,{...t,dirpath:q(e),rootDocument:t?.rootDocument??!e.endsWith(".tpl.html")})}subrenderer(){const e=(new this.constructor).debug(this.debugging);return e._store.set("$parent",this),e._store.set("$rootRenderer",this.get("$rootRenderer")??this),e._customElements=this._customElements,e}log(...e){this.debugging&&console.debug(...e)}async preprocessNode(e,t){t={dirpath:this.dirpath,maxdepth:10,...t};const r=new m(k(e,this._skipNodes)).map(async e=>{this.log("Preprocessing node:\n",Z(e,128)),await Q.resolveIncludes.call(this,e,t),await Q.rebaseRelativePaths.call(this,e,t),await Q.registerCustomElements.call(this,e,t),await Q.resolveCustomElements.call(this,e,t)});return await Promise.all(r.generator()),e}async renderNode(e,t){for(const r of k(e,this._skipNodes))this.log("Rendering node:\n",Z(r,128)),await Q.resolveForAttribute.call(this,r,t),await Q.resolveRenderAttribute.call(this,r,t),await Q.resolveDataAttribute.call(this,r,t),await Q.resolveTextAttributes.call(this,r,t),await Q.resolveHtmlAttribute.call(this,r,t),await Q.resolveShowAttribute.call(this,r,t),await Q.resolveClassAttribute.call(this,r,t),await Q.resolveBindAttribute.call(this,r,t),await Q.resolveEventAttributes.call(this,r,t),await Q.resolveTextNodeExpressions.call(this,r,t),await Q.resolveCustomAttribute.call(this,r,t),await Q.resolveCustomProperty.call(this,r,t),await Q.stripTypes.call(this,r,t);return e}async mount(e,t){t={...t,rootNode:e},M(e,"renderer",this),this._store.set("$rootNode",e),this.has("$rootRenderer")||this._store.set("$rootRenderer",this),this.get("$rootRenderer")===this&&await Re(this),await this.preprocessNode(e,t),await this.renderNode(e,t)}}function Ie(){return u([O`html{`,O`max-width: 70ch;`,O`padding: 2em 1em;`,O`margin: auto;`,O`line-height: 1.75;`,O`font-size: 1.25em;`,O`font-family: sans-serif;`,O`}`,O`h1,h2,h3,h4,h5,h6{`,O`margin: 1em 0 0.5em;`,O`}`,O`p,ul,ol{`,O`margin-bottom: 1em;`,O`color: #1d1d1d;`,O`}`].map(f).join(""))}const ke={sm:640,md:768,lg:1024,xl:1280},Ne=Object.entries(ke),Pe=.25,Te=[...Array(15)].map((e,t)=>t+1),Se=[...Te,16,20,24,25,28,30,32,36,40,44,48,50,52,56,60,64,72,80,96,100,112,128,144,160,192,200,224,256,288,300,320,384,400,448,500,512,...Object.values(ke)],Ce=[1,2,5,10,20,25,30,40,50,60,70,75,80,90,95,98,99,100],De=[75,100,150,200,300,500,700,1e3],Le=["hover","focus","disabled","active"],Ue={margin:"m",padding:"p"},Me={width:"w",height:"h"},ze={top:"top",right:"right",bottom:"bottom",left:"left"},je={"min-width":"min-w","min-height":"min-h","max-width":"max-w","max-height":"max-h"},Fe={"font-mono":{"font-family":"monospace"},"font-sans":{"font-family":"sans-serif"},"font-serif":{"font-family":"serif"},"font-cursive":{"font-family":"cursive"},"text-xs":{"font-size":".75rem","line-height":"calc(1 / 0.75)"},"text-sm":{"font-size":".875rem","line-height":"calc(1.25 / 0.875)"},"text-base":{"font-size":"1rem","line-height":"calc(1.5 / 1)"},"text-lg":{"font-size":"1.125rem","line-height":"calc(1.75 / 1.125)"},"text-xl":{"font-size":"1.25rem","line-height":"calc(1.75 / 1.25)"},"text-2xl":{"font-size":"1.5rem","line-height":"calc(2 / 1.5)"},"text-3xl":{"font-size":"1.875rem","line-height":"calc(2.25 / 1.875)"},"text-4xl":{"font-size":"2.25rem","line-height":"calc(2.5 / 2.25)"},"text-5xl":{"font-size":"3rem","line-height":"1"},"text-6xl":{"font-size":"3.75rem","line-height":"1"},"text-7xl":{"font-size":"4.5rem","line-height":"1"},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":"italic"},"not-italic":{"font-style":"normal"},"w-max":{width:"max-content"},"w-min":{width:"min-content"},"w-fit":{width:"fit-content"},"h-max":{height:"max-content"},"h-min":{height:"min-content"},"h-fit":{height:"fit-content"},"size-auto":{width:"auto",height:"auto"},"size-px":{width:"1px",height:"1px"},"size-full":{width:"100%",height:"100%"},"size-dvw":{width:"100dvw",height:"100dvw"},"size-dvh":{width:"100dvh",height:"100dvh"},"size-lvw":{width:"100lvw",height:"100lvw"},"size-lvh":{width:"100lvh",height:"100lvh"},"size-svw":{width:"100svw",height:"100svw"},"size-svh":{width:"100svh",height:"100svh"},"size-min":{width:"min-content",height:"min-content"},"size-max":{width:"max-content",height:"max-content"},"size-fit":{width:"fit-content",height:"fit-content"},"tracking-tighter":{"letter-spacing":"-0.05em"},"tracking-tight":{"letter-spacing":"-0.025em"},"tracking-normal":{"letter-spacing":"0"},"tracking-wide":{"letter-spacing":"0.025em"},"tracking-wider":{"letter-spacing":"0.05em"},"tracking-widest":{"letter-spacing":"0.1em"},"leading-none":{"line-height":"1"},"leading-tight":{"line-height":"1.25"},"leading-snug":{"line-height":"1.375"},"leading-normal":{"line-height":"1.5"},"leading-relaxed":{"line-height":"1.625"},"leading-loose":{"line-height":"2"},"text-left":{"text-align":"left"},"text-right":{"text-align":"right"},"text-center":{"text-align":"center"},"text-justify":{"text-align":"justify"},underline:{"text-decoration":"underline"},"no-underline":{"text-decoration":"none"},"decoration-none":{"text-decoration":"none"},"line-through":{"text-decoration":"line-through"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},truncate:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},"text-elipsis":{"text-overflow":"ellipsis"},"text-clip":{"text-overflow":"clip"},"text-wrap":{"text-wrap":"wrap"},"text-nowrap":{"text-wrap":"nowrap"},"text-balance":{"text-wrap":"balance"},"text-pretty":{"text-wrap":"pretty"},"whitespace-normal":{"white-space":"normal"},"whitespace-nowrap":{"white-space":"nowrap"},"whitespace-pre":{"white-space":"pre"},"whitespace-pre-line":{"white-space":"pre-line"},"whitespace-pre-wrap":{"white-space":"pre-wrap"},"whitespace-break-spaces":{"white-space":"break-spaces"},relative:{position:"relative"},fixed:{position:"fixed"},absolute:{position:"absolute"},sticky:{position:"sticky"},"object-contain":{"object-fit":"contain"},"object-cover":{"object-fit":"cover"},"object-fill":{"object-fit":"fill"},"object-none":{"object-fit":"none"},block:{display:"block"},contents:{display:"contents"},hidden:{display:"none"},inline:{display:"inline"},"inline-block":{display:"inline-block"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},collapse:{visibility:"collapse"},"list-none":{"list-style-type":"none"},"list-disc":{"list-style-type":"disc"},"list-decimal":{"list-style-type":"decimal"},flex:{display:"flex"},"flex-1":{flex:"1 1 0%"},"flex-inline":{display:"inline-flex"},"flex-row":{"flex-direction":"row"},"flex-col":{"flex-direction":"column"},"flex-row-reverse":{"flex-direction":"row-reverse"},"flex-col-reverse":{"flex-direction":"column-reverse"},"flex-wrap":{"flex-wrap":"wrap"},"flex-wrap-reverse":{"flex-wrap":"wrap-reverse"},"flex-nowrap":{"flex-wrap":"nowrap"},"justify-start":{"justify-content":"flex-start"},"justify-end":{"justify-content":"flex-end"},"justify-center":{"justify-content":"center"},"justify-between":{"justify-content":"space-between"},"justify-around":{"justify-content":"space-around"},"justify-evenly":{"justify-content":"space-evenly"},"justify-stretch":{"justify-content":"stretch"},"items-start":{"align-items":"flex-start"},"items-end":{"align-items":"flex-end"},"items-center":{"align-items":"center"},"items-stretch":{"align-items":"stretch"},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":"baseline"},"align-top":{"vertical-align":"top"},"align-middle":{"vertical-align":"middle"},"align-bottom":{"vertical-align":"bottom"},"align-text-top":{"vertical-align":"text-top"},"align-text-bottom":{"vertical-align":"text-bottom"},"overflow-auto":{overflow:"auto"},"overflow-x-auto":{"overflow-x":"auto"},"overflow-y-auto":{"overflow-y":"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-hidden":{"overflow-x":"hidden"},"overflow-y-hidden":{"overflow-y":"hidden"},"overflow-visible":{overflow:"visible"},"overscroll-auto":{"overscroll-behavior":"auto"},"overscroll-contain":{"overscroll-behavior":"contain"},"overscroll-none":{"overscroll-behavior":"none"},"overscroll-x-auto":{"overscroll-behavior-x":"auto"},"overscroll-x-contain":{"overscroll-behavior-x":"contain"},"overscroll-x-none":{"overscroll-behavior-x":"none"},"overscroll-y-auto":{"overscroll-behavior-y":"auto"},"overscroll-y-contain":{"overscroll-behavior-y":"contain"},"overscroll-y-none":{"overscroll-behavior-y":"none"},"z-auto":{"z-index":"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-wait":{cursor:"wait"},"cursor-not-allowed":{cursor:"not-allowed"},"select-none":{"user-select":"none"},"select-all":{"user-select":"all"},"pointer-events-auto":{"pointer-events":"auto"},"pointer-events-none":{"pointer-events":"none"},"box-border":{"box-sizing":"border-box"},"box-content":{"box-sizing":"content-box"},resize:{resize:"both"},"resize-x":{resize:"horizontal"},"resize-y":{resize:"vertical"},"resize-none":{resize:"none"},border:{border:"1px solid"},"border-none":{border:"none"},"border-solid":{"border-style":"solid"},"border-dashed":{"border-style":"dashed"},"border-dotted":{"border-style":"dotted"},"border-collapse":{"border-collapse":"collapse"},"rounded-none":{"border-radius":"0"},rounded:{"border-radius":".25rem"},"rounded-sm":{"border-radius":".125rem"},"rounded-md":{"border-radius":".375rem"},"rounded-lg":{"border-radius":".5rem"},"rounded-xl":{"border-radius":".75rem"},"rounded-full":{"border-radius":"9999px"},shadow:{"box-shadow":"0 0 1px 0 rgba(0, 0, 0, 0.05)"},"shadow-sm":{"box-shadow":"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},"shadow-md":{"box-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},"shadow-lg":{"box-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"},"shadow-xl":{"box-shadow":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"shadow-2xl":{"box-shadow":"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},"shadow-inner":{"box-shadow":"inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"},"shadow-outline":{"box-shadow":"0 0 0 3px rgba(66, 153, 225, 0.5)"},"shadow-none":{"box-shadow":"none"},"transition-none":{transition:"none"},transition:{transition:"all 150ms ease-in-out"},"animate-none":{animation:"none"},"animate-spin":{animation:"spin 1s linear infinite"},"animate-ping":{animation:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite"},"animate-pulse":{animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},"bg-auto":{"background-size":"auto"},"bg-cover":{"background-size":"cover"},"bg-contain":{"background-size":"contain"},"bg-no-repeat":{"background-repeat":"no-repeat"},"bg-fixed":{"background-attachment":"fixed"},"bg-local":{"background-attachment":"local"},"bg-scroll":{"background-attachment":"scroll"},"min-h-screen":{"min-height":"100vh"},"max-h-screen":{"max-height":"100vh"},"min-w-screen":{"min-width":"100vw"},"h-dvh":{height:"100dvh"},"h-svh":{height:"100svh"},"h-lvh":{height:"100lvh"},"w-dvw":{width:"100dvw"},"w-svw":{width:"100svw"},"w-lvw":{width:"100lvw"},"min-h-dvh":{"min-height":"100dvh"},"min-h-svh":{"min-height":"100svh"},"min-h-lvh":{"min-height":"100lvh"},"flex-none":{flex:"none"},"flex-auto":{flex:"1 1 auto"},"flex-initial":{flex:"0 1 auto"},grow:{"flex-grow":"1"},"grow-0":{"flex-grow":"0"},shrink:{"flex-shrink":"1"},"shrink-0":{"flex-shrink":"0"},"self-auto":{"align-self":"auto"},"self-start":{"align-self":"flex-start"},"self-end":{"align-self":"flex-end"},"self-center":{"align-self":"center"},"self-stretch":{"align-self":"stretch"},"self-baseline":{"align-self":"baseline"},"content-normal":{"align-content":"normal"},"content-start":{"align-content":"flex-start"},"content-end":{"align-content":"flex-end"},"content-center":{"align-content":"center"},"content-between":{"align-content":"space-between"},"content-around":{"align-content":"space-around"},"content-evenly":{"align-content":"space-evenly"},"content-stretch":{"align-content":"stretch"},"items-baseline":{"align-items":"baseline"},"inset-0":{inset:"0"},"inset-auto":{inset:"auto"},"inset-x-0":{left:"0",right:"0"},"inset-y-0":{top:"0",bottom:"0"},"inset-x-auto":{left:"auto",right:"auto"},"inset-y-auto":{top:"auto",bottom:"auto"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)","white-space":"nowrap","border-width":"0"},"not-sr-only":{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto","white-space":"normal"}},Ge=["@keyframes spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n }","@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n }","@keyframes pulse {\n 0%, 100% { opacity: 1 }\n 50% { opacity: .5 }\n }"],Ke={red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},gray:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},"blue-gray":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"}};function We(e){return Le.map(t=>`.${t}\\:${e}:${t}`)}function Ye(e,t){return Ne.map(([r,i])=>`@media (min-width: ${i}px) { .${r}\\:${e} { ${t} } }`)}function He(e){return e.flatMap(([e,t])=>[`.${e} { ${t} }`,`${We(e).join(",")} { ${t} }`,...Ye(e,t)])}function Be(e,t){const r="@"===e[0],i="@"===t[0];return r&&!i?1:!r&&i?-1:e.localeCompare(t)}function Ve(e){return He(Object.entries(e).flatMap(([e,t])=>[[`${t}-0`,`${e}: 0`],[`${t}-screen`,`${e}: 100v${e.includes("height")?"h":"w"}`],[`${t}-full`,`${e}: 100%`],...Se.map(r=>[`${t}-${r}`,`${e}: ${r*Pe}rem`]),...Se.map(r=>[`-${t}-${r}`,`${e}: -${r*Pe}rem`]),...Se.map(r=>[`${t}-${r}px`,`${e}: ${r}px`]),...Se.map(r=>[`-${t}-${r}px`,`${e}: -${r}px`]),...Ce.map(r=>[`${t}-${r}\\%`,`${e}: ${r}%`]),...Ce.map(r=>[`-${t}-${r}\\%`,`${e}: -${r}%`])]))}function Ze(e){return He(Object.entries(e).flatMap(([e,t])=>[[`${t}-auto`,`${e}: auto`],[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...Se.map(r=>[`${t}x-${r}`,`${e}-left: ${r*Pe}rem; ${e}-right: ${r*Pe}rem;`]),...Se.map(r=>[`${t}y-${r}`,`${e}-top: ${r*Pe}rem; ${e}-bottom: ${r*Pe}rem;`]),...Se.map(r=>[`${t}x-${r}px`,`${e}-left: ${r}px; ${e}-right: ${r}px;`]),...Se.map(r=>[`${t}y-${r}px`,`${e}-top: ${r}px; ${e}-bottom: ${r}px;`]),...Ce.map(r=>[`${t}x-${r}\\%`,`${e}-left: ${r}%; ${e}-right: ${r}%;`]),...Ce.map(r=>[`${t}y-${r}\\%`,`${e}-top: ${r}%; ${e}-bottom: ${r}%;`])]))}function qe(){const e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`]];return He([...e("white","#fff"),...e("black","#000"),...e("transparent","transparent"),...Object.entries(Ke).flatMap(([t,r])=>[...e(t,r[500]),...Object.entries(r).flatMap(([r,i])=>e(`${t}-${r}`,i))])])}let Qe=null;function Xe(){return null!==Qe||(Qe=[...Ge,...Object.entries(Fe).flatMap(([e,t])=>{const r=Object.entries(t).map(([e,t])=>`${e}: ${t}`).join("; ");return[`.${e} { ${r} }`,`${We(e).join(",")} { ${r} }`,...Ye(e,r)]}),...qe(),...He([["opacity-0","opacity: 0"],...Ce.map(e=>[`opacity-${e}`,"opacity: "+e/100])]),...He(Ce.map(e=>[`z-${e}`,`z-index: ${e}`])),...He(De.map(e=>[`duration-${e}`,`transition-duration: ${e}ms`])),...Ve(ze),...Ve(Me),...Ze(Me),...(e=Ue,He(Object.entries(e).flatMap(([e,t])=>[[`${t}t-0`,`${e}-top: 0`],[`${t}b-0`,`${e}-bottom: 0`],[`${t}l-0`,`${e}-left: 0`],[`${t}r-0`,`${e}-right: 0`],[`${t}t-auto`,`${e}-top: auto`],[`${t}b-auto`,`${e}-bottom: auto`],[`${t}l-auto`,`${e}-left: auto`],[`${t}r-auto`,`${e}-right: auto`],...["","-"].flatMap(r=>[...Se.map(i=>[`${r}${t}t-${i}`,`${e}-top: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}b-${i}`,`${e}-bottom: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}l-${i}`,`${e}-left: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}r-${i}`,`${e}-right: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}t-${i}px`,`${e}-top: ${r}${i}px`]),...Se.map(i=>[`${r}${t}b-${i}px`,`${e}-bottom: ${r}${i}px`]),...Se.map(i=>[`${r}${t}l-${i}px`,`${e}-left: ${r}${i}px`]),...Se.map(i=>[`${r}${t}r-${i}px`,`${e}-right: ${r}${i}px`]),...Ce.map(i=>[`${r}${t}t-${i}\\%`,`${e}-top: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}b-${i}\\%`,`${e}-bottom: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}l-${i}\\%`,`${e}-left: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}r-${i}\\%`,`${e}-right: ${r}${i}%`])])]))),...Ve(Ue),...Ze(Ue),...He([["space-x-0 > *","margin-left: 0"],["space-y-0 > *","margin-top: 0"],...Se.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*Pe}rem`]),...Se.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*Pe}rem`]),...Se.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...Se.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),["gap-0","gap: 0"],...Se.map(e=>[`gap-${e}`,`gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...Se.map(e=>[`gap-x-${e}`,`column-gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-y-${e}`,`row-gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...Se.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`])]),...Ve(je),...He([["border","border: 1px"],["border-x","border-inline-width: 1px"],["border-y","border-block-width: 1px"],...[0,...Te].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...Te].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...Te].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),...["top","bottom","left","right"].flatMap(e=>[[`border-${e.slice(0,1)}`,`border-${e}: 1px`],...[0,...Te].map(t=>[`border-${e.slice(0,1)}-${t}`,`border-${e}-width: ${t}px`])])]),...He([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${t*Pe}rem`,`font-size: ${t*Pe}rem`])])].sort(Be).join("\n")),Qe;var e}class Je extends Oe{impl="browser";dirpath=q(globalThis.location?.href??"http://localhost/");parseHTML(e,t={rootDocument:!1}){if(t.rootDocument)return(new DOMParser).parseFromString(e,"text/html");{const t=document.createRange();return t.selectNodeContents(document.body),t.createContextualFragment(e)}}serializeHTML(e){return(new XMLSerializer).serializeToString(e).replace(/\s?xmlns="[^"]+"/gm,"")}preprocessLocal(e,t){return this.preprocessRemote(e,t)}createElement(e,t){return(t||document).createElement(e)}textContent(e,t){e.textContent=t}}const et=new Je;function tt(e){for(const t of e){const e=document.createElement("style");switch(t){case"basic":p(e,Ie());break;case"utils":e.textContent=Xe();break;default:console.error(`Unknown style name: "${t}"`);continue}globalThis.document.head.appendChild(e)}}function rt(){tt(["basic"])}function it(){tt(["utils"])}async function nt(e={}){const t=new Je;if(e.css&&e.css.length>0&&tt(e.css),e.debug&&t.debug(!0),e.state)for(const[r,i]of Object.entries(e.state))await t.set(r,i);if(e.target){const r=Array.isArray(e.target)?e.target:[e.target];for(const i of r){const r=globalThis.document.querySelector(i);r?await t.mount(r,{cache:e.cache}):console.error(`Target element not found: "${i}"`)}}return t}export{Oe as IRenderer,et as Mancha,Je as Renderer,Ie as basicCssRules,nt as initMancha,rt as injectBasicCss,tt as injectCss,it as injectUtilsCss,Xe as utilsCssRules};
|
|
1
|
+
var e={};e.d=(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function r(e){if(!function(e){const r=!t.test(e);return r}(e))return e}function i(e){return r(e)}const n={};function s(e){0}"undefined"!=typeof window&&window.TrustedScriptURL;class o{constructor(e,t){this.privateDoNotAccessOrElseWrappedAttributePrefix=t}toString(){return this.privateDoNotAccessOrElseWrappedAttributePrefix}}const a=o;function l(e){if(function(e){return e instanceof o}(e))return e.privateDoNotAccessOrElseWrappedAttributePrefix;throw new Error("")}"undefined"!=typeof window&&window.TrustedHTML;function c(e,t,r,i){if(0===e.length){throw new Error("")}const n=e.map(e=>l(e)),s=r.toLowerCase();if(n.every(e=>0!==s.indexOf(e)))throw new Error(`Attribute "${r}" does not match any of the allowed prefixes.`);t.setAttribute(r,i)}"undefined"!=typeof window&&window.TrustedScript;class h{}class d extends h{constructor(e,t){super(),s(),this.privateDoNotAccessOrElseWrappedStyleSheet=e}toString(){return this.privateDoNotAccessOrElseWrappedStyleSheet}}function u(e){return new d(e,n)}function p(e){if(e instanceof d)return e.privateDoNotAccessOrElseWrappedStyleSheet;throw new Error("")}function f(e,t){e.textContent=p(t)}Error;class m{iterable;constructor(e){this.iterable=e}filter(e){return new m(m.filterGenerator(e,this.iterable))}map(e){return new m(m.mapGenerator(e,this.iterable))}find(e){for(const t of this.iterable)if(e(t))return t}array(){return Array.from(this.iterable)}*generator(){for(const e of this.iterable)yield e}static*filterGenerator(e,t){for(const r of t)e(r)&&(yield r)}static*mapGenerator(e,t){for(const r of t)yield e(r)}static equals(e,t){const r=e[Symbol.iterator](),i=t[Symbol.iterator]();let n=r.next(),s=i.next();for(;!n.done&&!s.done;){if(n.value!==s.value)return!1;n=r.next(),s=i.next()}return n.done===s.done}}function b(e){return Object.isFrozen(e)&&Object.isFrozen(e.raw)}function g(e){return-1===e.toString().indexOf("`")}g(e=>e``)||g(e=>e`\0`)||g(e=>e`\n`)||g(e=>e`\u0000`),b``&&b`\0`&&b`\n`&&b`\u0000`;function x(e){const t=e[0].toLowerCase();return new a(n,t)}var _,w;function v(e){return{valueOf:e}.valueOf()}!function(e){e[e.STYLE_TAG=0]="STYLE_TAG",e[e.STYLE_ATTRIBUTE=1]="STYLE_ATTRIBUTE",e[e.HTML_ATTRIBUTE=2]="HTML_ATTRIBUTE"}(_||(_={}));class y{constructor(e,t,r,i,n){this.allowedElements=e,this.elementPolicies=t,this.allowedGlobalAttributes=r,this.globalAttributePolicies=i,this.globallyAllowedAttributePrefixes=n}isAllowedElement(e){return"FORM"!==e&&(this.allowedElements.has(e)||this.elementPolicies.has(e))}getAttributePolicy(e,t){const r=this.elementPolicies.get(t);if(null==r?void 0:r.has(e))return r.get(e);if(this.allowedGlobalAttributes.has(e))return{policyAction:w.KEEP};const i=this.globalAttributePolicies.get(e);return i||(this.globallyAllowedAttributePrefixes&&[...this.globallyAllowedAttributePrefixes].some(t=>0===e.indexOf(t))?{policyAction:w.KEEP}:{policyAction:w.DROP})}}!function(e){e[e.DROP=0]="DROP",e[e.KEEP=1]="KEEP",e[e.KEEP_AND_SANITIZE_URL=2]="KEEP_AND_SANITIZE_URL",e[e.KEEP_AND_NORMALIZE=3]="KEEP_AND_NORMALIZE",e[e.KEEP_AND_SANITIZE_STYLE=4]="KEEP_AND_SANITIZE_STYLE",e[e.KEEP_AND_USE_RESOURCE_URL_POLICY=5]="KEEP_AND_USE_RESOURCE_URL_POLICY",e[e.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET=6]="KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET"}(w||(w={}));new Set(["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"]);const $=["ARTICLE","SECTION","NAV","ASIDE","H1","H2","H3","H4","H5","H6","HEADER","FOOTER","ADDRESS","P","HR","PRE","BLOCKQUOTE","OL","UL","LH","LI","DL","DT","DD","FIGURE","FIGCAPTION","MAIN","DIV","EM","STRONG","SMALL","S","CITE","Q","DFN","ABBR","RUBY","RB","RT","RTC","RP","DATA","TIME","CODE","VAR","SAMP","KBD","SUB","SUP","I","B","U","MARK","BDI","BDO","SPAN","BR","WBR","INS","DEL","PICTURE","PARAM","TRACK","MAP","TABLE","CAPTION","COLGROUP","COL","TBODY","THEAD","TFOOT","TR","TD","TH","SELECT","DATALIST","OPTGROUP","OPTION","OUTPUT","PROGRESS","METER","FIELDSET","LEGEND","DETAILS","SUMMARY","MENU","DIALOG","SLOT","CANVAS","FONT","CENTER","ACRONYM","BASEFONT","BIG","DIR","HGROUP","STRIKE","TT"],E=[["A",new Map([["href",{policyAction:w.KEEP_AND_SANITIZE_URL}]])],["AREA",new Map([["href",{policyAction:w.KEEP_AND_SANITIZE_URL}]])],["LINK",new Map([["href",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY,conditions:new Map([["rel",new Set(["alternate","author","bookmark","canonical","cite","help","icon","license","next","prefetch","dns-prefetch","prerender","preconnect","preload","prev","search","subresource"])]])}]])],["SOURCE",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["IMG",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["VIDEO",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}]])],["AUDIO",new Map([["src",{policyAction:w.KEEP_AND_USE_RESOURCE_URL_POLICY}]])]],A=["title","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-current","aria-disabled","aria-dropeffect","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","alt","align","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","bgcolor","border","cellpadding","cellspacing","checked","color","cols","colspan","controls","datetime","disabled","download","draggable","enctype","face","formenctype","frameborder","height","hreflang","hidden","ismap","label","lang","loop","max","maxlength","media","minlength","min","multiple","muted","nonce","open","placeholder","preload","rel","required","reversed","role","rows","rowspan","selected","shape","size","sizes","slot","span","spellcheck","start","step","summary","translate","type","valign","value","width","wrap","itemscope","itemtype","itemid","itemprop","itemref"],R=[["dir",{policyAction:w.KEEP_AND_NORMALIZE,conditions:v(()=>new Map([["dir",new Set(["auto","ltr","rtl"])]]))}],["async",{policyAction:w.KEEP_AND_NORMALIZE,conditions:v(()=>new Map([["async",new Set(["async"])]]))}],["cite",{policyAction:w.KEEP_AND_SANITIZE_URL}],["loading",{policyAction:w.KEEP_AND_NORMALIZE,conditions:v(()=>new Map([["loading",new Set(["eager","lazy"])]]))}],["poster",{policyAction:w.KEEP_AND_SANITIZE_URL}],["target",{policyAction:w.KEEP_AND_NORMALIZE,conditions:v(()=>new Map([["target",new Set(["_self","_blank"])]]))}]];new y(new Set($),new Map(E),new Set(A),new Map(R)),new y(new Set(v(()=>$.concat(["STYLE"]))),new Map(E),new Set(v(()=>A.concat(["id","name","class"]))),new Map(v(()=>R.concat([["style",{policyAction:w.KEEP_AND_SANITIZE_STYLE}]]))));function O(e){return u(e[0])}const k=[x`:`,x`style`,x`class`];function*I(e,t=new Set){const r=new Set,i=Array.from(e.childNodes).filter(e=>!t.has(e));for(yield e;i.length;){const e=i.shift();r.has(e)||(r.add(e),yield e),e.childNodes&&Array.from(e.childNodes).filter(e=>!t.has(e)).forEach(e=>i.push(e))}}function N(e,t){return void 0!==e?.[t]}function P(e,t){return"function"==typeof e?.[t]}function T(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function S(e,t){return N(e,"attribs")?e.attribs?.[t]??null:e.getAttribute?.(t)??null}function C(e,t){return N(e,"attribs")?t in(e.attribs||{}):e.hasAttribute?.(t)??!1}function D(e,t,r=""){return S(e,r+t)||S(e,`data-${t}`)||(e.dataset?.[T(t)]??null)}function L(e,t,r){N(e,"attribs")?e.attribs[t]=r:e.setAttribute?.(t,r)}function U(e,t,r){N(e,"attribs")?e.attribs[t]=r:c(k,e,t,r)}function M(e,t,r){switch(t){case"disabled":return void(e.disabled=r);case"selected":return void(e.selected=r);case"checked":return void(e.checked=r);default:e[t]=r}}function z(e,t){N(e,"attribs")?delete e.attribs[t]:e.removeAttribute?.(t)}function j(e,t,r=""){z(e,`${r}${t}`),z(e,`data-${t}`)}function F(e,t,r){if(N(e,"attribs")&&N(t,"attribs"))t.attribs[r]=e.attribs[r];else if(r.startsWith("data-")){const i=T(r.slice(5));t.dataset[i]=e.dataset?.[i]}else{const i=e?.getAttribute?.(r);U(t,r,i||"")}}function G(e){if(N(e,"firstElementChild"))return e.firstElementChild;return Array.from(e.children).find(e=>1===e.nodeType)}function K(e,...t){if(P(e,"replaceWith"))return e.replaceWith(...t);{const r=e,i=r.parentNode,n=Array.from(i.childNodes).indexOf(r);t.forEach(e=>e.parentNode=i),i.childNodes=[].concat(Array.from(i.childNodes).slice(0,n)).concat(t).concat(Array.from(i.childNodes).slice(n+1))}}function W(e,...t){P(e,"replaceChildren")?e.replaceChildren(...t):(e.childNodes=t,t.forEach(t=>t.parentNode=e))}function Y(e,t){return P(t,"appendChild")?e.appendChild(t):(e.childNodes.push(t),t.parentNode=e,t)}function H(e,t){return P(t,"removeChild")?e.removeChild(t):(W(e,...Array.from(e.childNodes).filter(e=>e!==t)),t)}function B(e,t,r){return r?P(e,"insertBefore")?e.insertBefore(t,r):(K(r,t,r),t):Y(e,t)}function V(e,t=0){return e?e.length<=t?e:e.slice(0,t-1)+"…":""}function Z(e,t=0){return globalThis.DocumentFragment&&e instanceof DocumentFragment?Array.from(e.childNodes).map(e=>Z(e,t)).join(""):V(e.outerHTML||e.nodeValue||String(e),t)}function q(e){return e.includes("/")?e.split("/").slice(0,-1).join("/"):""}var Q;!function(e){e.resolveIncludes=async function(e,t){const r=e,i=r.tagName?.toLowerCase();if(!["include","link"].includes(i))return;if("link"===i&&"subresource"!==S(r,"rel"))return;this.log("include directive found in:\n",Z(e,128)),this.log("include params:",t);const n="link"===r.tagName.toLocaleLowerCase()?"href":"src",s=S(r,n);if(!s)throw new Error(`"${n}" attribute missing from ${Z(e,128)}.`);const o=[];"include"===i&&o.push("src"),"link"===i&&o.push("rel","href");const a=t=>{const i=G(t);for(const e of Array.from(r.attributes))i&&!o.includes(e.name)&&F(r,i,e.name);K(e,...t.childNodes)},l={...t,rootDocument:!1,maxdepth:t?.maxdepth-1};if(0===l.maxdepth)throw new Error("Maximum recursion depth reached.");if(s.includes("://")||s.startsWith("//"))this.log("Including remote file from absolute path:",s),await this.preprocessRemote(s,l).then(a);else if(t?.dirpath?.includes("://")||t?.dirpath?.startsWith("//")){const e=s.startsWith("/")?s:`${t.dirpath}/${s}`;this.log("Including remote file from relative path:",e),await this.preprocessRemote(e,l).then(a)}else if("/"===s.charAt(0))this.log("Including local file from absolute path:",s),await this.preprocessLocal(s,l).then(a);else{const e=t?.dirpath&&"."!==t?.dirpath?`${t?.dirpath}/${s}`:s;this.log("Including local file from relative path:",e),await this.preprocessLocal(e,l).then(a)}},e.rebaseRelativePaths=function(e,t){const r=e,n=r.tagName?.toLowerCase();if(!t?.dirpath)return;const s=S(r,"src"),o=S(r,"href"),a=D(r,"render",":"),l=s||o||a;if(!l||((c=l).includes("://")||c.startsWith("/")||c.startsWith("#")||c.startsWith("data:")))return;var c;const h=`${t.dirpath}/${l}`;this.log("Rebasing relative path as:",h),a?function(e,t,r,i=""){C(e,`${i}${t}`)?L(e,`${i}${t}`,r):C(e,`data-${t}`)?L(e,`data-${t}`,r):L(e,`${i}${t}`,r)}(r,"render",h,":"):N(r,"attribs")?U(r,s?"src":"href",h):"img"===n?r.src=h:"a"===n?function(e,t){const r=i(t);void 0!==r&&(e.href=r)}(r,h):"source"===n||"audio"===n||"video"===n||"track"===n||"input"===n?r.src=h:"area"===n?function(e,t){const r=i(t);void 0!==r&&(e.href=r)}(r,h):this.log("Unable to rebase relative path for element:",n)},e.registerCustomElements=function(t,r){const i=t,n=i.tagName?.toLowerCase(),s=(S(i,"is")||S(i,"alt"))?.toLowerCase();if(["template","div"].includes(n)&&s){if("div"===n&&"template"!==S(i,"role"))return;if(!this._customElements.has(s)){this.log(`Registering custom element: ${s}\n`,Z(i,128));const t=i.content||i,n=Array.from(I(t));for(let t=1;t<n.length;t++)e.rebaseRelativePaths.call(this,n[t],r);this._customElements.set(s,i),H(i.parentNode,i)}}},e.resolveCustomElements=function(e,t){const r=e,i=r.tagName?.toLowerCase();let n=i;if("div"===n&&(n=S(r,"role")?.toLowerCase()||n),n&&this._customElements.has(n)){this.log(`Processing custom element: ${n}\n`,Z(r,128));const t=this._customElements.get(n),s=(t.content||t).cloneNode(!0),o=G(s);if(o)for(const e of Array.from(r.attributes))"div"===i&&"role"===e.name||F(r,o,e.name);const a=new m(I(s)).find(e=>"slot"===e.tagName?.toLowerCase());a&&K(a,...r.childNodes),K(e,...s.childNodes)}},e.resolveTextNodeExpressions=function(e,t){const r=e.nodeValue||"";if(3!==e.nodeType||!r?.trim())return;this.log("Processing node content value:\n",V(r,128));const i=new RegExp(/{{ ([^}]+) }}/gm),n=Array.from(r.matchAll(i)).map(e=>e[1]);return this.effect(function(){let t=r;for(const r of n){const i=this.eval(r,{$elem:e});t=t.replace(`{{ ${r} }}`,String(i))}e.nodeValue=t})},e.resolveDataAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"data",":");if(i){let n;this.log(":data attribute found in:\n",Z(e,128)),j(r,"data",":"),N(e,"renderer")?(n=e.renderer,this.log("Reusing existing subrenderer for node:",Z(e,64))):(n=this.subrenderer(),M(e,"renderer",n),this.log("Created and attached new subrenderer for node:",Z(e,64)));const s=n.eval(i,{$elem:e});if(await Promise.all(Object.entries(s).map(([e,t])=>n._store.set(e,t))),n===this)return;for(const t of I(e,this._skipNodes))this._skipNodes.add(t);await n.mount(e,t)}},e.resolveClassAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"class",":");if(i){this.log(":class attribute found in:\n",Z(e,128)),j(r,"class",":");const t=S(r,"class")||"";return this.effect(function(){const n=this.eval(i,{$elem:e});U(r,"class",(n?`${t} ${n}`:t).trim())})}},e.resolveTextAttributes=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"text",":");if(i){this.log(":text attribute found in:\n",Z(e,128)),j(r,"text",":");const t=t=>this.textContent(e,t);return this.effect(function(){t(this.eval(i,{$elem:e}))})}},e.resolveHtmlAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"html",":");return i?(this.log(":html attribute found in:\n",Z(e,128)),j(r,"html",":"),this.effect(function(){const n=this.eval(i,{$elem:e});return new Promise(async e=>{const i=await this.preprocessString(n,t);await this.renderNode(i),W(r,i),e()})})):void 0},e.resolveEventAttributes=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[]))if(t.name.startsWith(":on:")||t.name.startsWith("data-on-")){let i="",n=[];if(t.name.startsWith(":on:")?[i,...n]=t.name.substring(4).split("."):t.name.startsWith("data-on-")&&([i,...n]=t.name.substring(8).split(".")),!i)throw new Error(`Invalid event attribute: ${t.name}`);this.log(t.name,"attribute found in:\n",Z(e,128)),j(r,t.name);const s="submit"===i&&"FORM"===r.tagName.toUpperCase();e.addEventListener?.(i,r=>((n.includes("prevent")||s)&&r.preventDefault(),this.eval(t.value,{$elem:e,$event:r})))}},e.resolveForAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"for",":")?.trim();if(i){this.log(":for attribute found in:\n",Z(e,128)),j(r,"for",":");for(const t of I(e,this._skipNodes))this._skipNodes.add(t);const n=S(r,"style")||"";L(r,"style","display: none;");const s=e.parentNode,o=this.createElement("template",e.ownerDocument);B(s,o,e),H(s,e),Y(o,e),this.log(":for template:\n",Z(o,128));const a=i.split(" in ",2);if(2!==a.length)throw new Error(`Invalid :for format: \`${i}\`. Expected "{key} in {expression}".`);const l=[],[c,h]=a;await this.effect(function(){const r=this.eval(h,{$elem:e});if(this.log(":for list items:",r),l.splice(0,l.length).forEach(e=>{H(s,e),this._skipNodes.delete(e)}),!Array.isArray(r))return console.error(`Expression did not yield a list: \`${h}\` => \`${r}\``),Promise.resolve();const i=[];for(const s of r){const r=this.subrenderer();r._store.set(c,s);const o=e.cloneNode(!0);L(o,"style",n),l.push(o),this._skipNodes.add(o),i.push(r.mount(o,t)),this.log("Rendered list child:\n",Z(o,128))}const a=o.nextSibling;for(const e of l)B(s,e,a);return Promise.all(i)})}},e.resolveBindAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"bind",":");if(i){this.log(":bind attribute found in:\n",Z(e,128));const t=["change","input"],n=S(r,":bind:on")?.split(",")||r.dataset?.bindOn?.split(",")||t;j(r,"bind",":"),z(r,":bind:on"),z(r,"data-bind-on");const s="checkbox"===S(r,"type")?"checked":"value";i.includes(".")||this.has(i)||this.set(i,""),this.effect(function(){const t=this.eval(i,{$elem:e});"checked"===s?r.checked=!!t:r.value=t});const o=`${i} = $elem.${s}`;for(const t of n)e.addEventListener(t,()=>this.eval(o,{$elem:e}))}},e.resolveShowAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"show",":");if(i){this.log(":show attribute found in:\n",Z(e,128)),j(r,"show",":");const t="none"===r.style?.display?"":r.style?.display??S(r,"style")?.split(";")?.find(e=>"display"===e.split(":")[0])?.split(":")?.at(1)?.trim();this.effect(function(){const n=this.eval(i,{$elem:e});r.style?r.style.display=n?t:"none":U(r,"style",`display: ${n?t:"none"};`)})}},e.resolveCustomAttribute=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[])){const i=":attr:",n="data-attr-";if(t.name.startsWith(i)||t.name.startsWith(n)){this.log(t.name,"attribute found in:\n",Z(e,128)),z(r,t.name);const s=t.name.split(i,2).at(-1)?.split(n,2).at(-1);this.effect(function(){const i=this.eval(t.value,{$elem:e});L(r,s,i)})}}},e.resolveCustomProperty=function(e,t){if(this._skipNodes.has(e))return;const r=e;for(const t of Array.from(r.attributes||[])){const i=":prop:",n="data-prop-";if(t.name.startsWith(i)||t.name.startsWith(n)){this.log(t.name,"property found in:\n",Z(e,128)),z(r,t.name);const s=t.name.split(i,2).at(-1)?.split(n,2).at(-1),o=T(s);this.effect(function(){const i=this.eval(t.value,{$elem:e});M(r,o,i)})}}},e.stripTypes=function(e,t){const r=e;S(r,":types")&&z(r,":types"),S(r,"data-types")&&z(r,"data-types")},e.resolveRenderAttribute=async function(e,t){if(this._skipNodes.has(e))return;const r=e,i=D(r,"render",":");if(!i)return;let n;this.log(`:render attribute found: ${i}`),j(r,"render",":"),N(e,"renderer")?(n=e.renderer,this.log("Reusing existing subrenderer for :render:",Z(e,64))):(n=this.subrenderer(),M(r,"renderer",n)),await n.mount(e,t);for(const t of I(e,this._skipNodes))this._skipNodes.add(t);try{const e=await import(i);"function"==typeof e.default?await e.default(r,n):void 0!==e.default&&console.warn(`Module ${i} default export is not a function`)}catch(e){console.error(`Failed to execute render init from ${i}:`,e)}}}(Q||(Q={}));const X=new Set(["this","typeof"]),J=new Set(["in"]),ee=new Set(["+","-","!","typeof"]),te=new Set(["=","+","-","*","/","%","^","==","!=",">","<",">=","<=","||","&&","??","&","===","!==","|","in"]),re={"!":0,":":0,",":0,")":0,"]":0,"}":0,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,in:10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"?.":13,"{":13},ie={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"||":(e,t)=>e||t,"&&":(e,t)=>e&&t,"??":(e,t)=>e??t,"|":(e,t)=>t(e),in:(e,t)=>e in t},ne={"+":e=>e,"-":e=>-e,"!":e=>!e,typeof:e=>typeof e};const se=new Set(["==","!=","<=",">=","||","&&","??","?."]),oe=new Set(["===","!=="]);var ae;!function(e){e[e.STRING=1]="STRING",e[e.IDENTIFIER=2]="IDENTIFIER",e[e.DOT=3]="DOT",e[e.COMMA=4]="COMMA",e[e.COLON=5]="COLON",e[e.INTEGER=6]="INTEGER",e[e.DECIMAL=7]="DECIMAL",e[e.OPERATOR=8]="OPERATOR",e[e.GROUPER=9]="GROUPER",e[e.KEYWORD=10]="KEYWORD",e[e.ARROW=11]="ARROW",e[e.OPTIONAL_DOT=12]="OPTIONAL_DOT",e[e.SPREAD=13]="SPREAD"}(ae||(ae={}));const le=(e,t,r=0)=>({kind:e,value:t,precedence:r}),ce=e=>9===e||10===e||13===e||32===e,he=e=>95===e||36===e||65<=(e&=-33)&&e<=90,de=e=>he(e)||ue(e),ue=e=>48<=e&&e<=57;class pe{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;ce(this._next);)this._advance(!0);if(34===(e=this._next)||39===e)return this._tokenizeString();var e;if(he(this._next))return this._tokenizeIdentOrKeyword();if(ue(this._next))return this._tokenizeNumber();if(46===this._next)return this._tokenizeDot();if(44===this._next)return this._tokenizeComma();if(58===this._next)return this._tokenizeColon();if((e=>43===e||45===e||42===e||47===e||33===e||38===e||37===e||60===e||61===e||62===e||63===e||94===e||124===e)(this._next))return this._tokenizeOperator();if((e=>40===e||41===e||91===e||93===e||123===e||125===e)(this._next))return this._tokenizeGrouper();if(this._advance(),void 0!==this._next)throw new Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),!0===e&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){const t=this._input.substring(this._tokenStart,this._index+e);return 0===e&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){const e="unterminated string",t=this._next;for(this._advance(!0);this._next!==t;){if(void 0===this._next)throw new Error(e);if(92===this._next&&(this._advance(),void 0===this._next))throw new Error(e);this._advance()}const r=le(ae.STRING,this._getValue().replace(/\\(.)/g,(e,t)=>{switch(t){case"n":return"\n";case"r":return"\r";case"t":return"\t";case"b":return"\b";case"f":return"\f";default:return t}}));return this._advance(),r}_tokenizeIdentOrKeyword(){do{this._advance()}while(de(this._next));const e=this._getValue(),t=(r=e,X.has(r)?ae.KEYWORD:J.has(e)?ae.OPERATOR:ae.IDENTIFIER);var r;return le(t,e,re[e]??0)}_tokenizeNumber(){do{this._advance()}while(ue(this._next));return 46===this._next?this._tokenizeDot():le(ae.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),ue(this._next))return this._tokenizeFraction();if(46===this._next){if(this._advance(),46===this._next)return this._advance(),this._clearValue(),le(ae.SPREAD,"...");throw new Error("Unexpected token ..")}return this._clearValue(),le(ae.DOT,".",13)}_tokenizeComma(){return this._advance(!0),le(ae.COMMA,",")}_tokenizeColon(){return this._advance(!0),le(ae.COLON,":")}_tokenizeFraction(){do{this._advance()}while(ue(this._next));return le(ae.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(oe.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),"=>"===e)return this._advance(),le(ae.ARROW,e);se.has(e)&&this._advance()}return e=this._getValue(),"?."===e?le(ae.OPTIONAL_DOT,e,13):le(ae.OPERATOR,e,re[e])}_tokenizeGrouper(){const e=String.fromCharCode(this._next),t=le(ae.GROUPER,e,re[e]);return this._advance(!0),t}}class fe{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new pe(e),this._ast=t}parse(){this._advance();const e=this._parseExpression();if(this._token)throw new Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw new Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);const r=this._tokenizer.nextToken();this._token=r,this._kind=r?.kind,this._value=r?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();const e=this._parseUnary();return void 0===e?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(void 0===e)throw new Error("Expected left to be defined.");for(;this._token;)if(this._matches(ae.GROUPER,"(")){const t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(ae.GROUPER,"[")){const t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(ae.DOT)||this._matches(ae.OPTIONAL_DOT)){const t=this._kind===ae.OPTIONAL_DOT;if(this._advance(),t&&this._matches(ae.GROUPER,"[")){const t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(ae.GROUPER,"(")){const t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{const r=this._parseUnary();e=this._makeInvokeOrGetter(e,r,t)}}else{if(this._matches(ae.KEYWORD))break;if(!(this._matches(ae.OPERATOR)&&this._token.precedence>=t))break;e="?"===this._value?this._parseTernary(e):this._parseBinary(e,this._token)}return e}_makeInvokeOrGetter(e,t,r){if(void 0===t)throw new Error("expected identifier");if("ID"===t.type)return this._ast.getter(e,t.value,r);if("Invoke"===t.type&&"ID"===t.receiver.type){const i=t.receiver;return this._ast.invoke(e,i.value,t.arguments,r)}throw new Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!te.has(t.value))throw new Error(`unknown operator: ${t.value}`);this._advance();let r=this._parseUnary();for(;(this._kind===ae.OPERATOR||this._kind===ae.DOT||this._kind===ae.GROUPER)&&this._token.precedence>t.precedence;)r=this._parsePrecedence(r,this._token.precedence);if(void 0===r)throw new Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,r)}_parseUnary(){if(this._matches(ae.KEYWORD,"typeof")){this._advance();const e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary("typeof",e)}if(this._matches(ae.OPERATOR)){const e=this._value;if(this._advance(),"+"===e||"-"===e){if(this._matches(ae.INTEGER))return this._parseInteger(e);if(this._matches(ae.DECIMAL))return this._parseDecimal(e)}if(!ee.has(e))throw new Error(`unexpected token: ${e}`);const t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(ae.OPERATOR,"?");const t=this._parseExpression();this._advance(ae.COLON);const r=this._parseExpression();return this._ast.ternary(e,t,r)}_parsePrimary(){switch(this._kind){case ae.KEYWORD:const e=this._value;if("this"===e)return this._advance(),this._ast.id(e);if(X.has(e))throw new Error(`unexpected keyword: ${e}`);throw new Error(`unrecognized keyword: ${e}`);case ae.IDENTIFIER:return this._parseInvokeOrIdentifier();case ae.STRING:return this._parseString();case ae.INTEGER:return this._parseInteger();case ae.DECIMAL:return this._parseDecimal();case ae.GROUPER:return"("===this._value?this._parseParenOrFunction():"{"===this._value?this._parseMap():"["===this._value?this._parseList():void 0;case ae.COLON:throw new Error('unexpected token ":"');default:return}}_parseList(){const e=[];do{if(this._advance(),this._matches(ae.GROUPER,"]"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,"]"),this._ast.list(e)}_parseMap(){const e=[];do{if(this._advance(),this._matches(ae.GROUPER,"}"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{const t=this._value;if((this._matches(ae.STRING)||this._matches(ae.IDENTIFIER))&&this._advance(),this._matches(ae.COLON)){this._advance(ae.COLON);const r=this._parseExpression();r&&e.push(this._ast.property(t,r))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,"}"),this._ast.map(e)}_parseInvokeOrIdentifier(){const e=this._value;if("true"===e)return this._advance(),this._ast.literal(!0);if("false"===e)return this._advance(),this._ast.literal(!1);if("null"===e)return this._advance(),this._ast.literal(null);if("undefined"===e)return this._advance(),this._ast.literal(void 0);const t=this._parseIdentifier(),r=this._parseArguments();return r?this._ast.invoke(t,void 0,r):t}_parseIdentifier(){if(!this._matches(ae.IDENTIFIER))throw new Error(`expected identifier: ${this._value}`);const e=this._value;return this._advance(),this._ast.id(e)}_parseArguments(){if(!this._matches(ae.GROUPER,"("))return;const e=[];do{if(this._advance(),this._matches(ae.GROUPER,")"))break;if(this._matches(ae.SPREAD)){this._advance();const t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{const t=this._parseExpression();e.push(t)}}while(this._matches(ae.COMMA));return this._advance(ae.GROUPER,")"),e}_parseIndex(){this._advance();const e=this._parseExpression();return this._advance(ae.GROUPER,"]"),e}_parseParenOrFunction(){const e=this._parseArguments();if(this._matches(ae.ARROW)){this._advance();const t=this._parseExpression(),r=e?.map(e=>e.value)??[];return this._ast.arrowFunction(r,t)}return this._ast.paren(e[0])}_parseString(){const e=this._ast.literal(this._value);return this._advance(),e}_parseInteger(e=""){const t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=""){const t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}}class me{timeouts=new Map;debounce(e,t){return new Promise((r,i)=>{const n=this.timeouts.get(t);n&&clearTimeout(n),this.timeouts.set(t,setTimeout(()=>{try{r(t()),this.timeouts.delete(t)}catch(e){i(e)}},e))})}}const be=new class{empty(){return{type:"Empty",evaluate:e=>e,getIds:e=>e}}literal(e){return{type:"Literal",value:e,evaluate(e){return this.value},getIds:e=>e}}id(e){return{type:"ID",value:e,evaluate(e){return"this"===this.value?e:e?.[this.value]},getIds(e){return e.push(this.value),e}}}unary(e,t){const r=ne[e];return{type:"Unary",operator:e,child:t,evaluate(e){return r(this.child.evaluate(e))},getIds(e){return this.child.getIds(e)}}}binary(e,t,r){const i=ie[t];return{type:"Binary",operator:t,left:e,right:r,evaluate(e){if("="===this.operator){if("ID"!==this.left.type&&"Getter"!==this.left.type&&"Index"!==this.left.type)throw new Error(`Invalid assignment target: ${this.left}`);const t=this.right.evaluate(e);let r,i;return"Getter"===this.left.type?(r=this.left.receiver.evaluate(e),i=this.left.name):"Index"===this.left.type?(r=this.left.receiver.evaluate(e),i=String(this.left.argument.evaluate(e))):"ID"===this.left.type&&(r=e,i=this.left.value),void 0===r?void 0:r[i]=t}return i(this.left.evaluate(e),this.right.evaluate(e))},getIds(e){return this.left.getIds(e),this.right.getIds(e),e}}}getter(e,t,r){return{type:"Getter",receiver:e,name:t,optional:r,evaluate(e){const t=this.receiver.evaluate(e);if(!this.optional||null!=t)return t?.[this.name]},getIds(e){return this.receiver.getIds(e),e}}}invoke(e,t,r,i){if(null!=t&&"string"!=typeof t)throw new Error("method not a string");return{type:"Invoke",receiver:e,method:t,arguments:r,optional:i,evaluate(e){const t=this.receiver.evaluate(e);if(this.optional&&null==t)return;const r=this.method?t:e?.this??e,i=this.method?t?.[this.method]:t,n=this.arguments??[],s=[];for(const t of n)if("SpreadElement"===t?.type){const r=t.evaluate(e);r&&"function"==typeof r[Symbol.iterator]&&s.push(...r)}else s.push(t?.evaluate(e));return i?.apply?.(r,s)},getIds(e){return this.receiver.getIds(e),this.arguments?.forEach(t=>t?.getIds(e)),e}}}paren(e){return e}index(e,t,r){return{type:"Index",receiver:e,argument:t,optional:r,evaluate(e){const t=this.receiver.evaluate(e);if(this.optional&&null==t)return;const r=this.argument.evaluate(e);return t?.[r]},getIds(e){return this.receiver.getIds(e),e}}}ternary(e,t,r){return{type:"Ternary",condition:e,trueExpr:t,falseExpr:r,evaluate(e){return this.condition.evaluate(e)?this.trueExpr.evaluate(e):this.falseExpr.evaluate(e)},getIds(e){return this.condition.getIds(e),this.trueExpr.getIds(e),this.falseExpr.getIds(e),e}}}map(e){return{type:"Map",properties:e,evaluate(t){const r={};if(e&&this.properties)for(const e of this.properties)"SpreadProperty"===e.type?Object.assign(r,e.evaluate(t)):r[e.key]=e.value.evaluate(t);return r},getIds(t){if(e&&this.properties)for(const e of this.properties)"SpreadProperty"===e.type?e.expression.getIds(t):e.value.getIds(t);return t}}}property(e,t){return{type:"Property",key:e,value:t,evaluate(e){return this.value.evaluate(e)},getIds(e){return this.value.getIds(e)}}}list(e){return{type:"List",items:e,evaluate(e){if(!this.items)return[];const t=[];for(const r of this.items)if("SpreadElement"===r?.type){const i=r.evaluate(e);i&&"function"==typeof i[Symbol.iterator]&&t.push(...i)}else t.push(r?.evaluate(e));return t},getIds(e){return this.items?.forEach(t=>t?.getIds(e)),e}}}arrowFunction(e,t){return{type:"ArrowFunction",params:e,body:t,evaluate(e){const t=this.params,r=this.body;return function(...i){const n=Object.fromEntries(t.map((e,t)=>[e,i[t]])),s=new Proxy(e??{},{set:(e,t,r)=>(n.hasOwnProperty(t)&&(n[t]=r),e[t]=r),get:(e,t)=>n.hasOwnProperty(t)?n[t]:e[t]});return r.evaluate(s)}},getIds(e){return this.body.getIds(e).filter(e=>!this.params.includes(e))}}}spreadProperty(e){return{type:"SpreadProperty",expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}spreadElement(e){return{type:"SpreadElement",expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}},ge="__is_proxy__";function xe(e,t){const r=e?._store;return r?.has(t)?r.get(t):r?.has("$parent")?xe(r.get("$parent"),t):void 0}function _e(e,t){const r=e?._store;return r?.has(t)?e:r?.has("$parent")?_e(r.get("$parent"),t):null}class we extends me{evalkeys=["$elem","$event"];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_observer=null;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(const[t,r]of Object.entries(e||{}))this.set(t,r)}wrapFunction(e){return(...t)=>e.call(this.$,...t)}wrapObject(e,t){return null==e||((r=e)instanceof we||!0===r[ge])||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,r)=>"string"==typeof r&&r in e&&(delete e[r],t(),!0),set:(e,r,i,n)=>{"object"==typeof i&&null!==i&&(i=this.wrapObject(i,t));const s=Reflect.set(e,r,i,n);return t(),s},get:(e,t,r)=>t===ge||Reflect.get(e,t,r)});var r}watch(e,t){const r=_e(this,e);if(!r)throw new Error(`Cannot watch key "${e}" as it does not exist in the store.`);r.observers.has(e)||r.observers.set(e,new Set),r.observers.get(e)?.has(t)||r.observers.get(e)?.add(t)}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e).add(t)}async notify(e,t=10){const r=_e(this,e),i=Array.from(r?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(i.map(e=>e.call(this.proxify(e)))))}get(e,t){return t&&this.watch(e,t),xe(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;const r=()=>this.notify(e);t&&"function"==typeof t&&(t=this.wrapFunction(t)),t&&"object"==typeof t&&(t=this.wrapObject(t,r)),function(e,t,r){const i=_e(e,t);i?i._store.set(t,r):e._store.set(t,r)}(this,e,t);for(const[r,i]of this.keyHandlers.entries())if(r.test(e))for(const r of i)await Promise.resolve(r.call(this.$,e,t));await r()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}effect(e){return e.call(this.proxify(e))}proxify(e){const t=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(t.map(e=>[e,null]));return new Proxy(r,{has:(e,t)=>{if("string"==typeof t){if(_e(this,t))return!0;if(Reflect.has(this,t))return!0}return Reflect.has(r,t)},get:(t,r,i)=>{if("string"==typeof r){if(_e(this,r))return this.get(r,e);if(e&&r!==ge&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,e)}return"$"===r?this.proxify(e):Reflect.get(this,r,i)},set:(e,t,r,i)=>("string"!=typeof t||t in this?Reflect.set(this,t,r,i):this.set(t,r),!0)})}get $(){return this.proxify()}makeEvalFunction(e){if(e.includes(";"))throw new Error("Complex expressions are not supported.");return(t,r)=>{const i=((e,t)=>new fe(e,t).parse())(e,be),n=new Proxy(r,{has:(e,r)=>r in e||r in t||r in globalThis,get(e,r){if("string"==typeof r)return r in e?e[r]:r in t?t[r]:r in globalThis?globalThis[r]:t[r]},set:(e,r,i)=>"string"==typeof r&&(r in e?(e[r]=i,!0):(t[r]=i,!0))});return i?.evaluate(n)}}cachedExpressionFunction(e){return e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e)),this.expressionCache.get(e)}eval(e,t={}){const r=this._observer?this:this.$;if(this._store.has(e))return r[e];{const i=this.cachedExpressionFunction(e);try{return i(r,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){const r={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{r.$result=e}).catch(e=>{r.$error=e instanceof Error?e:new Error(String(e))}).finally(()=>{r.$pending=!1}),r}}const ve="$$";function ye(){return new URL(globalThis.window?.location?.href||"http://localhost/")}function $e(e){return`${ve}${e}`}function Ee(e){return e.keys().filter(e=>e.startsWith(ve))}function Ae(e,t,r){const i=function(e){return e.substring(2)}(t);let n=!1;if(r){const t=String(r);e.searchParams.get(i)!==t&&(e.searchParams.set(i,t),n=!0)}else e.searchParams.has(i)&&(e.searchParams.delete(i),n=!0);return n}async function Re(e){const t=ye();await async function(e,t){for(const[r,i]of t.searchParams.entries()){const t=$e(r);e.get(t)!==i&&await e.set(t,i)}}(e,t),function(e,t){let r=!1;for(const i of Ee(t))Ae(e,i,t.get(i))&&(r=!0);r&&globalThis.window?.history?.replaceState({},"",e.toString())}(t,e),e.addKeyHandler(new RegExp("^\\$\\$"),(e,t)=>{const r=ye();Ae(r,e,t)&&globalThis.window?.history?.replaceState({},"",r.toString())}),globalThis.window?.addEventListener("popstate",function(e){return async()=>{const t=ye(),r=new Set;for(const[i,n]of t.searchParams.entries()){const t=$e(i);r.add(t),e.get(t)!==n&&e.set(t,n)}const i=Ee(e);for(const t of i)r.has(t)||e.del(t)}}(e))}class Oe extends we{debugging=!1;dirpath="";_skipNodes=new Set;_customElements=new Map;debug(e){return this.debugging=e,this}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??"default"}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log("Preprocessing string content with params:\n",t);const r=this.parseHTML(e,t);return await this.preprocessNode(r,t),r}async preprocessRemote(e,t){const r={};t?.cache&&(r.cache=t.cache);const i=await fetch(e,r).then(e=>e.text());return this.preprocessString(i,{...t,dirpath:q(e),rootDocument:t?.rootDocument??!e.endsWith(".tpl.html")})}async preprocessLocal(e,t){const r=await this.fetchLocal(e,t);return this.preprocessString(r,{...t,dirpath:q(e),rootDocument:t?.rootDocument??!e.endsWith(".tpl.html")})}subrenderer(){const e=(new this.constructor).debug(this.debugging);return e._store.set("$parent",this),e._store.set("$rootRenderer",this.get("$rootRenderer")??this),e._customElements=this._customElements,e}log(...e){this.debugging&&console.debug(...e)}async preprocessNode(e,t){t={dirpath:this.dirpath,maxdepth:10,...t};const r=new m(I(e,this._skipNodes)).map(async e=>{this.log("Preprocessing node:\n",Z(e,128)),await Q.resolveIncludes.call(this,e,t),await Q.rebaseRelativePaths.call(this,e,t),await Q.registerCustomElements.call(this,e,t),await Q.resolveCustomElements.call(this,e,t)});return await Promise.all(r.generator()),e}async renderNode(e,t){for(const r of I(e,this._skipNodes))this.log("Rendering node:\n",Z(r,128)),await Q.resolveForAttribute.call(this,r,t),await Q.resolveRenderAttribute.call(this,r,t),await Q.resolveDataAttribute.call(this,r,t),await Q.resolveTextAttributes.call(this,r,t),await Q.resolveHtmlAttribute.call(this,r,t),await Q.resolveShowAttribute.call(this,r,t),await Q.resolveClassAttribute.call(this,r,t),await Q.resolveBindAttribute.call(this,r,t),await Q.resolveEventAttributes.call(this,r,t),await Q.resolveTextNodeExpressions.call(this,r,t),await Q.resolveCustomAttribute.call(this,r,t),await Q.resolveCustomProperty.call(this,r,t),await Q.stripTypes.call(this,r,t);return e}async mount(e,t){t={...t,rootNode:e},M(e,"renderer",this),this._store.set("$rootNode",e),this.has("$rootRenderer")||this._store.set("$rootRenderer",this),this.get("$rootRenderer")===this&&await Re(this),await this.preprocessNode(e,t),await this.renderNode(e,t)}}function ke(){return u([O`html{`,O`max-width: 70ch;`,O`padding: 2em 1em;`,O`margin: auto;`,O`line-height: 1.75;`,O`font-size: 1.25em;`,O`font-family: sans-serif;`,O`}`,O`h1,h2,h3,h4,h5,h6{`,O`margin: 1em 0 0.5em;`,O`}`,O`p,ul,ol{`,O`margin-bottom: 1em;`,O`color: #1d1d1d;`,O`}`].map(p).join(""))}const Ie={sm:640,md:768,lg:1024,xl:1280},Ne=Object.entries(Ie),Pe=.25,Te=[...Array(15)].map((e,t)=>t+1),Se=[...Te,16,20,24,25,28,30,32,36,40,44,48,50,52,56,60,64,72,80,96,100,112,128,144,160,192,200,224,256,288,300,320,384,400,448,500,512,...Object.values(Ie)],Ce=[1,2,5,10,20,25,30,40,50,60,70,75,80,90,95,98,99,100],De=[75,100,150,200,300,500,700,1e3],Le=["hover","focus","disabled","active"],Ue={margin:"m",padding:"p"},Me={width:"w",height:"h"},ze={top:"top",right:"right",bottom:"bottom",left:"left"},je={"min-width":"min-w","min-height":"min-h","max-width":"max-w","max-height":"max-h"},Fe={"font-mono":{"font-family":"monospace"},"font-sans":{"font-family":"sans-serif"},"font-serif":{"font-family":"serif"},"font-cursive":{"font-family":"cursive"},"text-xs":{"font-size":".75rem","line-height":"calc(1 / 0.75)"},"text-sm":{"font-size":".875rem","line-height":"calc(1.25 / 0.875)"},"text-base":{"font-size":"1rem","line-height":"calc(1.5 / 1)"},"text-lg":{"font-size":"1.125rem","line-height":"calc(1.75 / 1.125)"},"text-xl":{"font-size":"1.25rem","line-height":"calc(1.75 / 1.25)"},"text-2xl":{"font-size":"1.5rem","line-height":"calc(2 / 1.5)"},"text-3xl":{"font-size":"1.875rem","line-height":"calc(2.25 / 1.875)"},"text-4xl":{"font-size":"2.25rem","line-height":"calc(2.5 / 2.25)"},"text-5xl":{"font-size":"3rem","line-height":"1"},"text-6xl":{"font-size":"3.75rem","line-height":"1"},"text-7xl":{"font-size":"4.5rem","line-height":"1"},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":"italic"},"not-italic":{"font-style":"normal"},"w-max":{width:"max-content"},"w-min":{width:"min-content"},"w-fit":{width:"fit-content"},"h-max":{height:"max-content"},"h-min":{height:"min-content"},"h-fit":{height:"fit-content"},"size-auto":{width:"auto",height:"auto"},"size-px":{width:"1px",height:"1px"},"size-full":{width:"100%",height:"100%"},"size-dvw":{width:"100dvw",height:"100dvw"},"size-dvh":{width:"100dvh",height:"100dvh"},"size-lvw":{width:"100lvw",height:"100lvw"},"size-lvh":{width:"100lvh",height:"100lvh"},"size-svw":{width:"100svw",height:"100svw"},"size-svh":{width:"100svh",height:"100svh"},"size-min":{width:"min-content",height:"min-content"},"size-max":{width:"max-content",height:"max-content"},"size-fit":{width:"fit-content",height:"fit-content"},"tracking-tighter":{"letter-spacing":"-0.05em"},"tracking-tight":{"letter-spacing":"-0.025em"},"tracking-normal":{"letter-spacing":"0"},"tracking-wide":{"letter-spacing":"0.025em"},"tracking-wider":{"letter-spacing":"0.05em"},"tracking-widest":{"letter-spacing":"0.1em"},"leading-none":{"line-height":"1"},"leading-tight":{"line-height":"1.25"},"leading-snug":{"line-height":"1.375"},"leading-normal":{"line-height":"1.5"},"leading-relaxed":{"line-height":"1.625"},"leading-loose":{"line-height":"2"},"text-left":{"text-align":"left"},"text-right":{"text-align":"right"},"text-center":{"text-align":"center"},"text-justify":{"text-align":"justify"},underline:{"text-decoration":"underline"},"no-underline":{"text-decoration":"none"},"decoration-none":{"text-decoration":"none"},"line-through":{"text-decoration":"line-through"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},truncate:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},"text-elipsis":{"text-overflow":"ellipsis"},"text-clip":{"text-overflow":"clip"},"text-wrap":{"text-wrap":"wrap"},"text-nowrap":{"text-wrap":"nowrap"},"text-balance":{"text-wrap":"balance"},"text-pretty":{"text-wrap":"pretty"},"whitespace-normal":{"white-space":"normal"},"whitespace-nowrap":{"white-space":"nowrap"},"whitespace-pre":{"white-space":"pre"},"whitespace-pre-line":{"white-space":"pre-line"},"whitespace-pre-wrap":{"white-space":"pre-wrap"},"whitespace-break-spaces":{"white-space":"break-spaces"},relative:{position:"relative"},fixed:{position:"fixed"},absolute:{position:"absolute"},sticky:{position:"sticky"},"object-contain":{"object-fit":"contain"},"object-cover":{"object-fit":"cover"},"object-fill":{"object-fit":"fill"},"object-none":{"object-fit":"none"},block:{display:"block"},contents:{display:"contents"},hidden:{display:"none"},inline:{display:"inline"},"inline-block":{display:"inline-block"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},collapse:{visibility:"collapse"},"list-none":{"list-style-type":"none"},"list-disc":{"list-style-type":"disc"},"list-decimal":{"list-style-type":"decimal"},flex:{display:"flex"},"flex-1":{flex:"1 1 0%"},"flex-inline":{display:"inline-flex"},"flex-row":{"flex-direction":"row"},"flex-col":{"flex-direction":"column"},"flex-row-reverse":{"flex-direction":"row-reverse"},"flex-col-reverse":{"flex-direction":"column-reverse"},"flex-wrap":{"flex-wrap":"wrap"},"flex-wrap-reverse":{"flex-wrap":"wrap-reverse"},"flex-nowrap":{"flex-wrap":"nowrap"},"justify-start":{"justify-content":"flex-start"},"justify-end":{"justify-content":"flex-end"},"justify-center":{"justify-content":"center"},"justify-between":{"justify-content":"space-between"},"justify-around":{"justify-content":"space-around"},"justify-evenly":{"justify-content":"space-evenly"},"justify-stretch":{"justify-content":"stretch"},"items-start":{"align-items":"flex-start"},"items-end":{"align-items":"flex-end"},"items-center":{"align-items":"center"},"items-stretch":{"align-items":"stretch"},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":"baseline"},"align-top":{"vertical-align":"top"},"align-middle":{"vertical-align":"middle"},"align-bottom":{"vertical-align":"bottom"},"align-text-top":{"vertical-align":"text-top"},"align-text-bottom":{"vertical-align":"text-bottom"},"overflow-auto":{overflow:"auto"},"overflow-x-auto":{"overflow-x":"auto"},"overflow-y-auto":{"overflow-y":"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-hidden":{"overflow-x":"hidden"},"overflow-y-hidden":{"overflow-y":"hidden"},"overflow-visible":{overflow:"visible"},"overscroll-auto":{"overscroll-behavior":"auto"},"overscroll-contain":{"overscroll-behavior":"contain"},"overscroll-none":{"overscroll-behavior":"none"},"overscroll-x-auto":{"overscroll-behavior-x":"auto"},"overscroll-x-contain":{"overscroll-behavior-x":"contain"},"overscroll-x-none":{"overscroll-behavior-x":"none"},"overscroll-y-auto":{"overscroll-behavior-y":"auto"},"overscroll-y-contain":{"overscroll-behavior-y":"contain"},"overscroll-y-none":{"overscroll-behavior-y":"none"},"z-auto":{"z-index":"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-wait":{cursor:"wait"},"cursor-not-allowed":{cursor:"not-allowed"},"select-none":{"user-select":"none"},"select-all":{"user-select":"all"},"pointer-events-auto":{"pointer-events":"auto"},"pointer-events-none":{"pointer-events":"none"},"box-border":{"box-sizing":"border-box"},"box-content":{"box-sizing":"content-box"},resize:{resize:"both"},"resize-x":{resize:"horizontal"},"resize-y":{resize:"vertical"},"resize-none":{resize:"none"},border:{border:"1px solid"},"border-none":{border:"none"},"border-solid":{"border-style":"solid"},"border-dashed":{"border-style":"dashed"},"border-dotted":{"border-style":"dotted"},"border-collapse":{"border-collapse":"collapse"},"rounded-none":{"border-radius":"0"},rounded:{"border-radius":".25rem"},"rounded-sm":{"border-radius":".125rem"},"rounded-md":{"border-radius":".375rem"},"rounded-lg":{"border-radius":".5rem"},"rounded-xl":{"border-radius":".75rem"},"rounded-full":{"border-radius":"9999px"},"shadow-2xs":{"box-shadow":"0 1px rgb(0 0 0 / 0.05)"},"shadow-xs":{"box-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)"},shadow:{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-sm":{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-md":{"box-shadow":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},"shadow-lg":{"box-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},"shadow-xl":{"box-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},"shadow-2xl":{"box-shadow":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},"shadow-inner":{"box-shadow":"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},"shadow-none":{"box-shadow":"0 0 #0000"},ring:{"box-shadow":"0 0 0 3px rgb(59 130 246 / 0.5)"},"ring-0":{"box-shadow":"0 0 0 0px rgb(59 130 246 / 0.5)"},"ring-1":{"box-shadow":"0 0 0 1px rgb(59 130 246 / 0.5)"},"ring-2":{"box-shadow":"0 0 0 2px rgb(59 130 246 / 0.5)"},"ring-4":{"box-shadow":"0 0 0 4px rgb(59 130 246 / 0.5)"},"ring-8":{"box-shadow":"0 0 0 8px rgb(59 130 246 / 0.5)"},"ring-inset":{"--tw-ring-inset":"inset"},outline:{"outline-style":"solid"},"outline-none":{outline:"2px solid transparent","outline-offset":"2px"},"outline-dashed":{"outline-style":"dashed"},"outline-dotted":{"outline-style":"dotted"},"outline-double":{"outline-style":"double"},"outline-0":{"outline-width":"0px"},"outline-1":{"outline-width":"1px"},"outline-2":{"outline-width":"2px"},"outline-4":{"outline-width":"4px"},"outline-8":{"outline-width":"8px"},"outline-offset-0":{"outline-offset":"0px"},"outline-offset-1":{"outline-offset":"1px"},"outline-offset-2":{"outline-offset":"2px"},"outline-offset-4":{"outline-offset":"4px"},"outline-offset-8":{"outline-offset":"8px"},"aspect-auto":{"aspect-ratio":"auto"},"aspect-square":{"aspect-ratio":"1 / 1"},"aspect-video":{"aspect-ratio":"16 / 9"},"backdrop-blur-none":{"backdrop-filter":"blur(0)"},"backdrop-blur-sm":{"backdrop-filter":"blur(4px)"},"backdrop-blur":{"backdrop-filter":"blur(8px)"},"backdrop-blur-md":{"backdrop-filter":"blur(12px)"},"backdrop-blur-lg":{"backdrop-filter":"blur(16px)"},"backdrop-blur-xl":{"backdrop-filter":"blur(24px)"},"backdrop-blur-2xl":{"backdrop-filter":"blur(40px)"},"backdrop-blur-3xl":{"backdrop-filter":"blur(64px)"},"transition-none":{transition:"none"},transition:{transition:"all 150ms ease-in-out"},"animate-none":{animation:"none"},"animate-spin":{animation:"spin 1s linear infinite"},"animate-ping":{animation:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite"},"animate-pulse":{animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},"bg-auto":{"background-size":"auto"},"bg-cover":{"background-size":"cover"},"bg-contain":{"background-size":"contain"},"bg-no-repeat":{"background-repeat":"no-repeat"},"bg-fixed":{"background-attachment":"fixed"},"bg-local":{"background-attachment":"local"},"bg-scroll":{"background-attachment":"scroll"},"min-h-screen":{"min-height":"100vh"},"max-h-screen":{"max-height":"100vh"},"min-w-screen":{"min-width":"100vw"},"h-dvh":{height:"100dvh"},"h-svh":{height:"100svh"},"h-lvh":{height:"100lvh"},"w-dvw":{width:"100dvw"},"w-svw":{width:"100svw"},"w-lvw":{width:"100lvw"},"min-h-dvh":{"min-height":"100dvh"},"min-h-svh":{"min-height":"100svh"},"min-h-lvh":{"min-height":"100lvh"},"flex-none":{flex:"none"},"flex-auto":{flex:"1 1 auto"},"flex-initial":{flex:"0 1 auto"},grow:{"flex-grow":"1"},"grow-0":{"flex-grow":"0"},shrink:{"flex-shrink":"1"},"shrink-0":{"flex-shrink":"0"},"self-auto":{"align-self":"auto"},"self-start":{"align-self":"flex-start"},"self-end":{"align-self":"flex-end"},"self-center":{"align-self":"center"},"self-stretch":{"align-self":"stretch"},"self-baseline":{"align-self":"baseline"},"content-normal":{"align-content":"normal"},"content-start":{"align-content":"flex-start"},"content-end":{"align-content":"flex-end"},"content-center":{"align-content":"center"},"content-between":{"align-content":"space-between"},"content-around":{"align-content":"space-around"},"content-evenly":{"align-content":"space-evenly"},"content-stretch":{"align-content":"stretch"},"items-baseline":{"align-items":"baseline"},"inset-0":{inset:"0"},"inset-auto":{inset:"auto"},"inset-x-0":{left:"0",right:"0"},"inset-y-0":{top:"0",bottom:"0"},"inset-x-auto":{left:"auto",right:"auto"},"inset-y-auto":{top:"auto",bottom:"auto"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)","white-space":"nowrap","border-width":"0"},"not-sr-only":{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto","white-space":"normal"}},Ge=["@keyframes spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n }","@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n }","@keyframes pulse {\n 0%, 100% { opacity: 1 }\n 50% { opacity: .5 }\n }"],Ke={red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},gray:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},"blue-gray":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"}};function We(e){return Le.map(t=>`.${t}\\:${e}:${t}`)}function Ye(e,t){return Ne.map(([r,i])=>`@media (min-width: ${i}px) { .${r}\\:${e} { ${t} } }`)}function He(e){return e.flatMap(([e,t])=>[`.${e} { ${t} }`,`${We(e).join(",")} { ${t} }`,...Ye(e,t)])}function Be(e,t){const r="@"===e[0],i="@"===t[0];return r&&!i?1:!r&&i?-1:e.localeCompare(t)}function Ve(e){return He(Object.entries(e).flatMap(([e,t])=>[[`${t}-0`,`${e}: 0`],[`${t}-screen`,`${e}: 100v${e.includes("height")?"h":"w"}`],[`${t}-full`,`${e}: 100%`],...Se.map(r=>[`${t}-${r}`,`${e}: ${r*Pe}rem`]),...Se.map(r=>[`-${t}-${r}`,`${e}: -${r*Pe}rem`]),...Se.map(r=>[`${t}-${r}px`,`${e}: ${r}px`]),...Se.map(r=>[`-${t}-${r}px`,`${e}: -${r}px`]),...Ce.map(r=>[`${t}-${r}\\%`,`${e}: ${r}%`]),...Ce.map(r=>[`-${t}-${r}\\%`,`${e}: -${r}%`])]))}function Ze(e){return He(Object.entries(e).flatMap(([e,t])=>[[`${t}-auto`,`${e}: auto`],[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...Se.map(r=>[`${t}x-${r}`,`${e}-left: ${r*Pe}rem; ${e}-right: ${r*Pe}rem;`]),...Se.map(r=>[`${t}y-${r}`,`${e}-top: ${r*Pe}rem; ${e}-bottom: ${r*Pe}rem;`]),...Se.map(r=>[`${t}x-${r}px`,`${e}-left: ${r}px; ${e}-right: ${r}px;`]),...Se.map(r=>[`${t}y-${r}px`,`${e}-top: ${r}px; ${e}-bottom: ${r}px;`]),...Ce.map(r=>[`${t}x-${r}\\%`,`${e}-left: ${r}%; ${e}-right: ${r}%;`]),...Ce.map(r=>[`${t}y-${r}\\%`,`${e}-top: ${r}%; ${e}-bottom: ${r}%;`])]))}function qe(){const e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`]];return He([...e("white","#fff"),...e("black","#000"),...e("transparent","transparent"),...Object.entries(Ke).flatMap(([t,r])=>[...e(t,r[500]),...Object.entries(r).flatMap(([r,i])=>e(`${t}-${r}`,i))])])}let Qe=null;function Xe(){return null!==Qe||(Qe=[...Ge,...Object.entries(Fe).flatMap(([e,t])=>{const r=Object.entries(t).map(([e,t])=>`${e}: ${t}`).join("; ");return[`.${e} { ${r} }`,`${We(e).join(",")} { ${r} }`,...Ye(e,r)]}),...qe(),...He([["opacity-0","opacity: 0"],...Ce.map(e=>[`opacity-${e}`,"opacity: "+e/100])]),...He(Ce.map(e=>[`z-${e}`,`z-index: ${e}`])),...He(De.map(e=>[`duration-${e}`,`transition-duration: ${e}ms`])),...Ve(ze),...Ve(Me),...Ze(Me),...(e=Ue,He(Object.entries(e).flatMap(([e,t])=>[[`${t}t-0`,`${e}-top: 0`],[`${t}b-0`,`${e}-bottom: 0`],[`${t}l-0`,`${e}-left: 0`],[`${t}r-0`,`${e}-right: 0`],[`${t}t-auto`,`${e}-top: auto`],[`${t}b-auto`,`${e}-bottom: auto`],[`${t}l-auto`,`${e}-left: auto`],[`${t}r-auto`,`${e}-right: auto`],...["","-"].flatMap(r=>[...Se.map(i=>[`${r}${t}t-${i}`,`${e}-top: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}b-${i}`,`${e}-bottom: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}l-${i}`,`${e}-left: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}r-${i}`,`${e}-right: ${r}${i*Pe}rem`]),...Se.map(i=>[`${r}${t}t-${i}px`,`${e}-top: ${r}${i}px`]),...Se.map(i=>[`${r}${t}b-${i}px`,`${e}-bottom: ${r}${i}px`]),...Se.map(i=>[`${r}${t}l-${i}px`,`${e}-left: ${r}${i}px`]),...Se.map(i=>[`${r}${t}r-${i}px`,`${e}-right: ${r}${i}px`]),...Ce.map(i=>[`${r}${t}t-${i}\\%`,`${e}-top: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}b-${i}\\%`,`${e}-bottom: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}l-${i}\\%`,`${e}-left: ${r}${i}%`]),...Ce.map(i=>[`${r}${t}r-${i}\\%`,`${e}-right: ${r}${i}%`])])]))),...Ve(Ue),...Ze(Ue),...He([["space-x-0 > *","margin-left: 0"],["space-y-0 > *","margin-top: 0"],...Se.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*Pe}rem`]),...Se.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*Pe}rem`]),...Se.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...Se.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),["gap-0","gap: 0"],...Se.map(e=>[`gap-${e}`,`gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...Se.map(e=>[`gap-x-${e}`,`column-gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-y-${e}`,`row-gap: ${e*Pe}rem`]),...Se.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...Se.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`]),["divide-x > :not(:last-child)","border-inline-end-width: 1px"],["divide-y > :not(:last-child)","border-bottom-width: 1px"],["divide-x-0 > :not(:last-child)","border-inline-end-width: 0px"],["divide-y-0 > :not(:last-child)","border-bottom-width: 0px"],...[2,4,8].map(e=>[`divide-x-${e} > :not(:last-child)`,`border-inline-end-width: ${e}px`]),...[2,4,8].map(e=>[`divide-y-${e} > :not(:last-child)`,`border-bottom-width: ${e}px`]),["divide-solid > :not(:last-child)","border-style: solid"],["divide-dashed > :not(:last-child)","border-style: dashed"],["divide-dotted > :not(:last-child)","border-style: dotted"],["divide-none > :not(:last-child)","border-style: none"]]),...Ve(je),...He([["border","border: 1px"],["border-x","border-inline-width: 1px"],["border-y","border-block-width: 1px"],...[0,...Te].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...Te].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...Te].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),...["top","bottom","left","right"].flatMap(e=>[[`border-${e.slice(0,1)}`,`border-${e}: 1px`],...[0,...Te].map(t=>[`border-${e.slice(0,1)}-${t}`,`border-${e}-width: ${t}px`])])]),...He([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${t*Pe}rem`,`font-size: ${t*Pe}rem`])])].sort(Be).join("\n")),Qe;var e}class Je extends Oe{impl="browser";dirpath=q(globalThis.location?.href??"http://localhost/");parseHTML(e,t={rootDocument:!1}){if(t.rootDocument)return(new DOMParser).parseFromString(e,"text/html");{const t=document.createRange();return t.selectNodeContents(document.body),t.createContextualFragment(e)}}serializeHTML(e){return(new XMLSerializer).serializeToString(e).replace(/\s?xmlns="[^"]+"/gm,"")}preprocessLocal(e,t){return this.preprocessRemote(e,t)}createElement(e,t){return(t||document).createElement(e)}textContent(e,t){e.textContent=t}}const et=new Je;function tt(e){for(const t of e){const e=document.createElement("style");switch(t){case"basic":f(e,ke());break;case"utils":e.textContent=Xe();break;default:console.error(`Unknown style name: "${t}"`);continue}globalThis.document.head.appendChild(e)}}function rt(){tt(["basic"])}function it(){tt(["utils"])}async function nt(e={}){const t=new Je;if(e.css&&e.css.length>0&&tt(e.css),e.debug&&t.debug(!0),e.state)for(const[r,i]of Object.entries(e.state))await t.set(r,i);if(e.target){const r=Array.isArray(e.target)?e.target:[e.target];for(const i of r){const r=globalThis.document.querySelector(i);r?await t.mount(r,{cache:e.cache}):console.error(`Target element not found: "${i}"`)}}return t}export{Oe as IRenderer,et as Mancha,Je as Renderer,ke as basicCssRules,nt as initMancha,rt as injectBasicCss,tt as injectCss,it as injectUtilsCss,Xe as utilsCssRules};
|
package/dist/css_gen_utils.d.ts
CHANGED
|
@@ -567,6 +567,12 @@ export declare const PROPS_CUSTOM: {
|
|
|
567
567
|
"rounded-full": {
|
|
568
568
|
"border-radius": string;
|
|
569
569
|
};
|
|
570
|
+
"shadow-2xs": {
|
|
571
|
+
"box-shadow": string;
|
|
572
|
+
};
|
|
573
|
+
"shadow-xs": {
|
|
574
|
+
"box-shadow": string;
|
|
575
|
+
};
|
|
570
576
|
shadow: {
|
|
571
577
|
"box-shadow": string;
|
|
572
578
|
};
|
|
@@ -588,12 +594,109 @@ export declare const PROPS_CUSTOM: {
|
|
|
588
594
|
"shadow-inner": {
|
|
589
595
|
"box-shadow": string;
|
|
590
596
|
};
|
|
591
|
-
"shadow-
|
|
597
|
+
"shadow-none": {
|
|
592
598
|
"box-shadow": string;
|
|
593
599
|
};
|
|
594
|
-
|
|
600
|
+
ring: {
|
|
601
|
+
"box-shadow": string;
|
|
602
|
+
};
|
|
603
|
+
"ring-0": {
|
|
604
|
+
"box-shadow": string;
|
|
605
|
+
};
|
|
606
|
+
"ring-1": {
|
|
607
|
+
"box-shadow": string;
|
|
608
|
+
};
|
|
609
|
+
"ring-2": {
|
|
610
|
+
"box-shadow": string;
|
|
611
|
+
};
|
|
612
|
+
"ring-4": {
|
|
595
613
|
"box-shadow": string;
|
|
596
614
|
};
|
|
615
|
+
"ring-8": {
|
|
616
|
+
"box-shadow": string;
|
|
617
|
+
};
|
|
618
|
+
"ring-inset": {
|
|
619
|
+
"--tw-ring-inset": string;
|
|
620
|
+
};
|
|
621
|
+
outline: {
|
|
622
|
+
"outline-style": string;
|
|
623
|
+
};
|
|
624
|
+
"outline-none": {
|
|
625
|
+
outline: string;
|
|
626
|
+
"outline-offset": string;
|
|
627
|
+
};
|
|
628
|
+
"outline-dashed": {
|
|
629
|
+
"outline-style": string;
|
|
630
|
+
};
|
|
631
|
+
"outline-dotted": {
|
|
632
|
+
"outline-style": string;
|
|
633
|
+
};
|
|
634
|
+
"outline-double": {
|
|
635
|
+
"outline-style": string;
|
|
636
|
+
};
|
|
637
|
+
"outline-0": {
|
|
638
|
+
"outline-width": string;
|
|
639
|
+
};
|
|
640
|
+
"outline-1": {
|
|
641
|
+
"outline-width": string;
|
|
642
|
+
};
|
|
643
|
+
"outline-2": {
|
|
644
|
+
"outline-width": string;
|
|
645
|
+
};
|
|
646
|
+
"outline-4": {
|
|
647
|
+
"outline-width": string;
|
|
648
|
+
};
|
|
649
|
+
"outline-8": {
|
|
650
|
+
"outline-width": string;
|
|
651
|
+
};
|
|
652
|
+
"outline-offset-0": {
|
|
653
|
+
"outline-offset": string;
|
|
654
|
+
};
|
|
655
|
+
"outline-offset-1": {
|
|
656
|
+
"outline-offset": string;
|
|
657
|
+
};
|
|
658
|
+
"outline-offset-2": {
|
|
659
|
+
"outline-offset": string;
|
|
660
|
+
};
|
|
661
|
+
"outline-offset-4": {
|
|
662
|
+
"outline-offset": string;
|
|
663
|
+
};
|
|
664
|
+
"outline-offset-8": {
|
|
665
|
+
"outline-offset": string;
|
|
666
|
+
};
|
|
667
|
+
"aspect-auto": {
|
|
668
|
+
"aspect-ratio": string;
|
|
669
|
+
};
|
|
670
|
+
"aspect-square": {
|
|
671
|
+
"aspect-ratio": string;
|
|
672
|
+
};
|
|
673
|
+
"aspect-video": {
|
|
674
|
+
"aspect-ratio": string;
|
|
675
|
+
};
|
|
676
|
+
"backdrop-blur-none": {
|
|
677
|
+
"backdrop-filter": string;
|
|
678
|
+
};
|
|
679
|
+
"backdrop-blur-sm": {
|
|
680
|
+
"backdrop-filter": string;
|
|
681
|
+
};
|
|
682
|
+
"backdrop-blur": {
|
|
683
|
+
"backdrop-filter": string;
|
|
684
|
+
};
|
|
685
|
+
"backdrop-blur-md": {
|
|
686
|
+
"backdrop-filter": string;
|
|
687
|
+
};
|
|
688
|
+
"backdrop-blur-lg": {
|
|
689
|
+
"backdrop-filter": string;
|
|
690
|
+
};
|
|
691
|
+
"backdrop-blur-xl": {
|
|
692
|
+
"backdrop-filter": string;
|
|
693
|
+
};
|
|
694
|
+
"backdrop-blur-2xl": {
|
|
695
|
+
"backdrop-filter": string;
|
|
696
|
+
};
|
|
697
|
+
"backdrop-blur-3xl": {
|
|
698
|
+
"backdrop-filter": string;
|
|
699
|
+
};
|
|
597
700
|
"transition-none": {
|
|
598
701
|
transition: string;
|
|
599
702
|
};
|
package/dist/css_gen_utils.js
CHANGED
|
@@ -241,22 +241,60 @@ export const PROPS_CUSTOM = {
|
|
|
241
241
|
"rounded-lg": { "border-radius": ".5rem" },
|
|
242
242
|
"rounded-xl": { "border-radius": ".75rem" },
|
|
243
243
|
"rounded-full": { "border-radius": "9999px" },
|
|
244
|
-
// Shadows.
|
|
245
|
-
shadow: { "box-shadow": "0
|
|
246
|
-
"shadow-
|
|
244
|
+
// Shadows (matching Tailwind CSS).
|
|
245
|
+
"shadow-2xs": { "box-shadow": "0 1px rgb(0 0 0 / 0.05)" },
|
|
246
|
+
"shadow-xs": { "box-shadow": "0 1px 2px 0 rgb(0 0 0 / 0.05)" },
|
|
247
|
+
shadow: { "box-shadow": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)" },
|
|
248
|
+
"shadow-sm": { "box-shadow": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)" },
|
|
247
249
|
"shadow-md": {
|
|
248
|
-
"box-shadow": "0 4px 6px -1px
|
|
250
|
+
"box-shadow": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
249
251
|
},
|
|
250
252
|
"shadow-lg": {
|
|
251
|
-
"box-shadow": "0 10px 15px -3px
|
|
253
|
+
"box-shadow": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
252
254
|
},
|
|
253
255
|
"shadow-xl": {
|
|
254
|
-
"box-shadow": "0 20px 25px -5px
|
|
256
|
+
"box-shadow": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
255
257
|
},
|
|
256
|
-
"shadow-2xl": { "box-shadow": "0 25px 50px -12px
|
|
257
|
-
"shadow-inner": { "box-shadow": "inset 0 2px 4px 0
|
|
258
|
-
"shadow-
|
|
259
|
-
|
|
258
|
+
"shadow-2xl": { "box-shadow": "0 25px 50px -12px rgb(0 0 0 / 0.25)" },
|
|
259
|
+
"shadow-inner": { "box-shadow": "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)" },
|
|
260
|
+
"shadow-none": { "box-shadow": "0 0 #0000" },
|
|
261
|
+
// Ring utilities for focus states.
|
|
262
|
+
ring: { "box-shadow": "0 0 0 3px rgb(59 130 246 / 0.5)" },
|
|
263
|
+
"ring-0": { "box-shadow": "0 0 0 0px rgb(59 130 246 / 0.5)" },
|
|
264
|
+
"ring-1": { "box-shadow": "0 0 0 1px rgb(59 130 246 / 0.5)" },
|
|
265
|
+
"ring-2": { "box-shadow": "0 0 0 2px rgb(59 130 246 / 0.5)" },
|
|
266
|
+
"ring-4": { "box-shadow": "0 0 0 4px rgb(59 130 246 / 0.5)" },
|
|
267
|
+
"ring-8": { "box-shadow": "0 0 0 8px rgb(59 130 246 / 0.5)" },
|
|
268
|
+
"ring-inset": { "--tw-ring-inset": "inset" },
|
|
269
|
+
// Outline utilities.
|
|
270
|
+
outline: { "outline-style": "solid" },
|
|
271
|
+
"outline-none": { outline: "2px solid transparent", "outline-offset": "2px" },
|
|
272
|
+
"outline-dashed": { "outline-style": "dashed" },
|
|
273
|
+
"outline-dotted": { "outline-style": "dotted" },
|
|
274
|
+
"outline-double": { "outline-style": "double" },
|
|
275
|
+
"outline-0": { "outline-width": "0px" },
|
|
276
|
+
"outline-1": { "outline-width": "1px" },
|
|
277
|
+
"outline-2": { "outline-width": "2px" },
|
|
278
|
+
"outline-4": { "outline-width": "4px" },
|
|
279
|
+
"outline-8": { "outline-width": "8px" },
|
|
280
|
+
"outline-offset-0": { "outline-offset": "0px" },
|
|
281
|
+
"outline-offset-1": { "outline-offset": "1px" },
|
|
282
|
+
"outline-offset-2": { "outline-offset": "2px" },
|
|
283
|
+
"outline-offset-4": { "outline-offset": "4px" },
|
|
284
|
+
"outline-offset-8": { "outline-offset": "8px" },
|
|
285
|
+
// Aspect ratio utilities.
|
|
286
|
+
"aspect-auto": { "aspect-ratio": "auto" },
|
|
287
|
+
"aspect-square": { "aspect-ratio": "1 / 1" },
|
|
288
|
+
"aspect-video": { "aspect-ratio": "16 / 9" },
|
|
289
|
+
// Backdrop filter utilities.
|
|
290
|
+
"backdrop-blur-none": { "backdrop-filter": "blur(0)" },
|
|
291
|
+
"backdrop-blur-sm": { "backdrop-filter": "blur(4px)" },
|
|
292
|
+
"backdrop-blur": { "backdrop-filter": "blur(8px)" },
|
|
293
|
+
"backdrop-blur-md": { "backdrop-filter": "blur(12px)" },
|
|
294
|
+
"backdrop-blur-lg": { "backdrop-filter": "blur(16px)" },
|
|
295
|
+
"backdrop-blur-xl": { "backdrop-filter": "blur(24px)" },
|
|
296
|
+
"backdrop-blur-2xl": { "backdrop-filter": "blur(40px)" },
|
|
297
|
+
"backdrop-blur-3xl": { "backdrop-filter": "blur(64px)" },
|
|
260
298
|
// Transitions.
|
|
261
299
|
"transition-none": { transition: "none" },
|
|
262
300
|
transition: { transition: `all 150ms ease-in-out` },
|
|
@@ -724,6 +762,20 @@ function between() {
|
|
|
724
762
|
...UNITS_ALL.map((v) => [`gap-y-${v}`, `row-gap: ${v * REM_UNIT}rem`]),
|
|
725
763
|
...UNITS_ALL.map((v) => [`gap-x-${v}px`, `column-gap: ${v}px`]),
|
|
726
764
|
...UNITS_ALL.map((v) => [`gap-y-${v}px`, `row-gap: ${v}px`]),
|
|
765
|
+
// Divide utilities for adding borders between child elements.
|
|
766
|
+
[`divide-x > :not(:last-child)`, `border-inline-end-width: 1px`],
|
|
767
|
+
[`divide-y > :not(:last-child)`, `border-bottom-width: 1px`],
|
|
768
|
+
[`divide-x-0 > :not(:last-child)`, `border-inline-end-width: 0px`],
|
|
769
|
+
[`divide-y-0 > :not(:last-child)`, `border-bottom-width: 0px`],
|
|
770
|
+
...[2, 4, 8].map((v) => [
|
|
771
|
+
`divide-x-${v} > :not(:last-child)`,
|
|
772
|
+
`border-inline-end-width: ${v}px`,
|
|
773
|
+
]),
|
|
774
|
+
...[2, 4, 8].map((v) => [`divide-y-${v} > :not(:last-child)`, `border-bottom-width: ${v}px`]),
|
|
775
|
+
[`divide-solid > :not(:last-child)`, `border-style: solid`],
|
|
776
|
+
[`divide-dashed > :not(:last-child)`, `border-style: dashed`],
|
|
777
|
+
[`divide-dotted > :not(:last-child)`, `border-style: dotted`],
|
|
778
|
+
[`divide-none > :not(:last-child)`, `border-style: none`],
|
|
727
779
|
]);
|
|
728
780
|
}
|
|
729
781
|
function textSizes() {
|