@jasonshimmy/custom-elements-runtime 1.1.2 → 1.2.1
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/custom-elements-runtime.cjs.js +21 -19
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +2302 -2068
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +23 -21
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/directives.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/runtime/helpers.d.ts +48 -0
- package/dist/runtime/node-metadata.d.ts +45 -0
- package/entities.json +211 -0
- package/package.json +5 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(O,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(O=typeof globalThis<"u"?globalThis:O||self,be(O.CustomElementsRuntime={}))})(this,(function(O){"use strict";var be=typeof document<"u"?document.currentScript:null;const an={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let xe=!1;try{const e=globalThis.process;e&&e.env?xe=e.env.NODE_ENV!=="production":typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:be&&be.tagName.toUpperCase()==="SCRIPT"&&be.src||new URL("custom-elements-runtime.umd.js",document.baseURI).href}<"u"&&an?xe=!1:xe=typeof window<"u"}catch{xe=!0}function H(e,...t){xe&&console.error(e,...t)}function Q(e,...t){xe&&console.warn(e,...t)}class cn{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,n){const r=n||t;this.pendingUpdates.set(r,t),this.isFlushScheduled||(this.isFlushScheduled=!0,typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&(window.__vitest__||window.Cypress)?this.flush():queueMicrotask(()=>this.flush()))}flush(){const t=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;for(const n of t.values())try{n()}catch(r){H("Error in batched update:",r)}}get pendingCount(){return this.pendingUpdates.size}}const ln=new cn;function $e(e,t){ln.schedule(e,t)}const _t=new WeakSet;class un{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,n,r=!1){const o=this.cache.get(t);if(o)return o;const i=r?this.getOrCreateArrayHandler(n):this.getOrCreateObjectHandler(n),s=new Proxy(t,i);try{St.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const n={get:(r,o,i)=>{const s=Reflect.get(r,o,i);return typeof s=="function"&&typeof o=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(o)?function(...a){const u=s.apply(r,a);return t.triggerUpdate(),u}:s},set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,n)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const n={get:(r,o,i)=>Reflect.get(r,o,i),set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,n)}return this.objectHandlerCache.get(t)}static hasProxy(t){return this.cache.has(t)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class St{static contextCache=new WeakMap;static createReactiveProxy(t,n,r){try{if(_t.has(t))return t}catch{}const o=Array.isArray(t);let i=this.contextCache.get(n);i||(i=new WeakMap,this.contextCache.set(n,i));let s=i.get(r);return s||(s={triggerUpdate:n,makeReactiveValue:r},i.set(r,s)),un.getOrCreateProxy(t,s,o)}static markAsProxy(t){if(t)try{_t.add(t)}catch{}}}class fn{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,n){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:n,stateIndex:0,lastWarnTime:0});else{const r=this.componentData.get(t);r.renderFn=n,r.stateIndex=0}}clearCurrentComponent(){this.currentComponent=null}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponent!==null}shouldEmitRenderWarning(){if(!this.currentComponent)return!0;const t=this.componentData.get(this.currentComponent);if(!t)return!0;const n=Date.now();return n-t.lastWarnTime<1e3?!1:(t.lastWarnTime=n,!0)}withoutTracking(t){const n=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=n}}getOrCreateState(t){if(!this.currentComponent)return new Be(t);const n=this.componentData.get(this.currentComponent);if(!n)return new Be(t);const r=`${this.currentComponent}:${n.stateIndex++}`;let o=this.stateStorage.get(r);return o||(o=new Be(t),this.stateStorage.set(r,o)),o}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const n=this.componentData.get(this.currentComponent);n&&(n.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const n=t.getDependents();for(const r of n){const o=this.componentData.get(r);o&&$e(o.renderFn,r)}}cleanup(t){const n=this.componentData.get(t);if(n){for(const o of n.dependencies)o.removeDependent(t);this.componentData.delete(t)}const r=t+":";for(const o of this.stateStorage.keys())o.startsWith(r)&&this.stateStorage.delete(o)}}const ee=new fn;class Be{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const n=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,n,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return ee.trackDependency(this),this._value}set value(t){ee.isRenderingComponent()&&ee.shouldEmitRenderWarning()&&Q(`🚨 State modification detected during render! This can cause infinite loops.
|
|
2
2
|
• Move state updates to event handlers
|
|
3
3
|
• Use useEffect/watch for side effects
|
|
4
|
-
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),Y.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:xt.createReactiveProxy(t,()=>Y.triggerUpdate(this),r=>this.makeReactive(r))}}function Xt(e){return Y.getOrCreateState(e===void 0?null:e)}function N(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function Yt(e){const t=new Ie(e());return{get value(){return Y.trackDependency(t),e()}}}function Qt(e,t,r={}){let n=e();r.immediate&&t(n,n);const i=`watch-${Math.random().toString(36).substr(2,9)}`,o=()=>{Y.setCurrentComponent(i,o);const s=e();Y.clearCurrentComponent(),s!==n&&(t(s,n),n=s)};return Y.setCurrentComponent(i,o),e(),Y.clearCurrentComponent(),()=>{Y.cleanup(i)}}const R=e=>{try{e()}catch{}},Fe=new Map,We=new Map,ze=new Map,Ye=500;function ee(e){if(Fe.has(e))return Fe.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Fe.size<Ye&&Fe.set(e,t),t}function Qe(e){if(We.has(e))return We.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return We.size<Ye&&We.set(e,t),t}function Te(e){if(typeof e=="string"){if(ze.has(e))return ze.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r]);return t!==e&&ze.size<Ye&&ze.set(e,t),t}return e}function Z(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,i)=>n?.[i],e);return N(r)?r.value:r}return t}function Ue(e,t,r){const n=String(t).split("."),i=n.pop();if(!i)return;const o=n.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);N(o[i])?o[i].value=r:o[i]=r}function en(e,t,r){if(r)for(const[n,i]of Object.entries(r)){let o,s={};if(Array.isArray(i)?(o=i[0],s=i[1]||{}):o=i,t.set(n,{callback:o,options:s,oldValue:Z(e,n)}),s.immediate)try{const c=Z(e,n);o(c,void 0,e)}catch(c){I(`Error in immediate watcher for "${n}":`,c)}}}function tn(e,t,r,n){const i=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((b,m)=>i(b,c[m]));const a=Object.keys(s),f=Object.keys(c);return a.length!==f.length?!1:a.every(b=>i(s[b],c[b]))},o=t.get(r);if(o&&!i(n,o.oldValue))try{o.callback(n,o.oldValue,e),o.oldValue=n}catch(s){I(`Error in watcher for "${r}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&r.startsWith(s+"."))try{const a=Z(e,s);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){I(`Error in deep watcher for "${s}":`,a)}}function $t(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function nn(e,t,r){if(t)for(const n in t){const i=t[n],o=ee(n),s=e.getAttribute(o);if(i.type===Function&&typeof e[n]=="function")r[n]=e[n];else if(s!==null)r[n]=$t(s,i.type);else if(typeof e[n]<"u")try{const c=e[n];i.type===Boolean&&typeof c=="boolean"||i.type===Number&&typeof c=="number"||i.type===Function&&typeof c=="function"?r[n]=c:r[n]=$t(String(c),i.type)}catch{r[n]=e[n]}else"default"in i&&i.default!==void 0&&(r[n]=i.default)}}function rn(e,t,r){if(!t.props){try{const n=r&&r._hookCallbacks&&r._hookCallbacks.props||{},i=Array.from(new Set([...Object.keys(e),...Object.keys(n)]));for(const o of i){if(typeof o!="string"||o.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(r,o);if(!(!Object.prototype.hasOwnProperty.call(n,o)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get(){try{const a=ee(o),f=e.getAttribute(a);if(f!==null)return f;const b=e[o];let m;return N(b)||b&&typeof b=="object"&&"value"in b&&!(b instanceof Node)?m=b.value:m=b,m}catch{return e[o]}}})}catch{}}}catch{}return}nn(e,t.props,r)}function on(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function sn(e,t,r,n,i,o,s,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(a=>a()),n(),i(),o(!1),s(null),c(!1)}function an(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class cn{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,r){const n=this.cache.get(t);if(n){if(!n.isSecure){re("Blocked cached dangerous expression:",t);return}return n.evaluator(r)}const i=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(t,i),!i.isSecure){re("Blocked dangerous expression:",t);return}return i.evaluator(r)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(r){return re("Failed to create evaluator for expression:",t,r),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(r=>r.test(t))}static createSafeEvaluator(t){const r=t.trim();if(r.startsWith("{")&&r.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const n=t.trim().slice(4);return i=>Z(i,n)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):n=>Z(n,t)}static createObjectEvaluator(t){const r=t.trim().slice(1,-1),n=this.parseObjectProperties(r);return i=>{const o={};for(const{key:s,value:c}of n)try{if(c.startsWith("ctx.")){const a=c.slice(4);o[s]=Z(i,a)}else o[s]=this.evaluateSimpleValue(c,i)}catch{o[s]=void 0}return o}}static parseObjectProperties(t){const r=[],n=t.split(",");for(const i of n){const o=i.indexOf(":");if(o===-1)continue;const s=i.slice(0,o).trim(),c=i.slice(o+1).trim(),a=s.replace(/^['"]|['"]$/g,"");r.push({key:a,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const i=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,m=>`<<#${i.push(m)-1}#>>`);const o=n.match(/ctx\.[\w.]+/g)||[];for(const m of o){const d=m.slice(4),x=Z(r,d);if(x===void 0)return;const u=i.push(JSON.stringify(x))-1;n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=n.match(s)||[];for(const m of c){if(m.startsWith("ctx."))continue;const d=Z(r,m);if(d===void 0)return;const x=i.push(JSON.stringify(d))-1;n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${x}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let f;const b=new Set;for(;(f=a.exec(n))!==null;){const m=f[1];if(["true","false","null","undefined"].includes(m)||/^[0-9]+$/.test(m)||m==="ctx"||b.has(m))continue;b.add(m);const d=Z(r,m);if(d===void 0)return;const x=JSON.stringify(d),u=i.push(x)-1;m.includes(".")?n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`):n=n.replace(new RegExp("\\b"+m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${u}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(m,d)=>i[Number(d)]);try{return this.evaluateBasicExpression(n)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const r=this.tokenize(t);let n=0;function i(){return r[n]}function o(l){const y=r[n++];if(l&&!y)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&y&&y.type!==l&&y.value!==l)throw new Error(`Unexpected token ${y.type}/${y.value}, expected ${l}`);return y}function s(){return c()}function c(){let l=a();if(i()&&i().value==="?"){o("?");const y=s();o(":");const w=s();return l?y:w}return l}function a(){let l=f();for(;i()&&i().value==="||";){o("OP");const y=f();l=l||y}return l}function f(){let l=b();for(;i()&&i().value==="&&";){o("OP");const y=b();l=l&&y}return l}function b(){let l=m();for(;i()&&["==","!=","===","!=="].includes(i().value);){const y=o("OP").value,w=m();switch(y){case"==":l=l==w;break;case"!=":l=l!=w;break;case"===":l=l===w;break;case"!==":l=l!==w;break}}return l}function m(){let l=d();for(;i()&&[">","<",">=","<="].includes(i().value);){const y=o("OP").value,w=d();switch(y){case">":l=l>w;break;case"<":l=l<w;break;case">=":l=l>=w;break;case"<=":l=l<=w;break}}return l}function d(){let l=x();for(;i()&&(i().value==="+"||i().value==="-");){const y=o("OP").value,w=x();l=y==="+"?l+w:l-w}return l}function x(){let l=u();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const y=o("OP").value,w=u();switch(y){case"*":l=l*w;break;case"/":l=l/w;break;case"%":l=l%w;break}}return l}function u(){return i()&&i().value==="!"?(o("OP"),!u()):i()&&i().value==="-"?(o("OP"),-u()):p()}function p(){const l=i();if(l){if(l.type==="NUMBER")return o("NUMBER"),Number(l.value);if(l.type==="STRING")return o("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return o("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){o("PUNC");const y=[];for(;i()&&i().value!=="]";)y.push(s()),i()&&i().value===","&&o("PUNC");return o("PUNC"),y}if(l.value==="("){o("PUNC");const y=s();return o("PUNC"),y}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const r=[],n=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let i;for(;(i=n.exec(t))!==null;){const o=i[1];o&&(/^\d/.test(o)?r.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?r.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?r.push({type:"IDENT",value:o}):/^[()?:,\[\]]$/.test(o)?r.push({type:"PUNC",value:o}):r.push({type:"OP",value:o}))}return r}static evaluateSimpleValue(t,r){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const n=t.slice(4);return Z(r,n)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ie{static cleanupFunctions=new WeakMap;static addListener(t,r,n,i){t.addEventListener(r,n,i);const s={event:r,handler:n,wrapper:n,options:i,cleanup:()=>t.removeEventListener(r,n,i),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,r,n,i){t.removeEventListener(r,n,i);const o=this.cleanupFunctions.get(t);if(o)for(let s=0;s<o.length;s++){const c=o[s];if(c.event===r&&c.handler===n){o.splice(s,1),o.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const r=this.cleanupFunctions.get(t);r&&(r.forEach(n=>{try{n.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const r=this.cleanupFunctions.get(t);return!!(r&&r.length>0)}static getListenerCount(t){const r=this.cleanupFunctions.get(t);return r?r.length:0}static getListenerInfo(t){const r=this.cleanupFunctions.get(t);return r?r.map(n=>({event:n.event,handler:n.handler,wrapper:n.wrapper,options:n.options})):[]}}function Ke(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function Ct(e,t,r,n,i){if(e)if(i&&typeof t.value=="object"&&t.value!==null){const o={...t.value};o[i]=r,t.value=o}else t.value=r;else{const o=n._state||n;Ue(o,t,r)}}function qe(e,t,r,n){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const i=t?"reactiveState":r;e._triggerWatchers(i,n)}}function ln(e,t,r){const n=`update:${ee(t)}`,i=`update:${t}`,o=new CustomEvent(n,{detail:r,bubbles:!0,composed:!0}),s=new CustomEvent(i,{detail:r,bubbles:!0,composed:!0});e.dispatchEvent(o),e.dispatchEvent(s)}function Et(e,t,r,n){const i=r;R(()=>{e[t]=i}),R(()=>{const o=ee(t);typeof i=="boolean"?i?e.setAttribute(o,"true"):e.setAttribute(o,"false"):i!=null&&(typeof i=="string"||typeof i=="number")?e.setAttribute(o,String(i)):e.removeAttribute?.(o)}),R(()=>{e._applyProps?.(e._cfg)}),R(()=>{e._requestRender?.()})}function un(e,t,r,n){if(e){const o=t.value;return n&&typeof o=="object"&&o!==null?o[n]:o}const i=r._state||r;return Z(i,t)}function ke(e){return e?e.split(/\s+/).filter(Boolean):[]}function xe(e,t){if(t.length===0)return;const r=t.filter(n=>n&&!e.classList.contains(n));r.length>0&&e.classList.add(...r)}function $e(e,t){if(t.length===0)return;const r=t.filter(Boolean);r.length>0&&e.classList.remove(...r)}let et=!1;async function fn(e,t,r=10){if(!et){if(!e.isConnected){re("⚠️ Element not connected to DOM, skipping style wait");return}for(let n=0;n<r;n++){const i=window.getComputedStyle(e),o=i.transform&&i.transform!=="",s=i.opacity&&i.opacity!=="";if(o||s){et=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}et=!0,re("⚠️ Styles did not load in time for transition, continuing anyway")}}function dn(e){const t=window.getComputedStyle(e),r=t.transitionDuration||"0s",n=t.transitionDelay||"0s",i=o=>{const s=parseFloat(o);return o.includes("ms")?s:s*1e3};return i(r)+i(n)}function _t(e,t){return new Promise(r=>{const n=t??dn(e);if(n<=0){r();return}let i=!1;const o=()=>{i||(i=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),r())},s=()=>o();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(o,n+50)})}async function Oe(e,t){const{classes:r,hooks:n,css:i,duration:o}=t;if(n?.onBeforeEnter)try{n.onBeforeEnter(e)}catch(u){I("Transition onBeforeEnter error:",u)}if(!i)return n?.onEnter?new Promise(u=>{n.onEnter(e,()=>{if(n?.onAfterEnter)try{n.onAfterEnter(e)}catch(p){I("Transition onAfterEnter error:",p)}u()})}):void 0;const s=ke(r?.enterFrom),c=ke(r?.enterActive),a=ke(r?.enterTo);xe(e,s),e.offsetHeight,xe(e,c),e.offsetHeight;let f;if(n?.onEnter){const u=new Promise(p=>{f=p});try{n.onEnter(e,()=>{f&&f()})}catch(p){I("Transition onEnter error:",p)}f&&await u}await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.offsetHeight;const b=window.getComputedStyle(e),m=b.transform,d=b.opacity;$e(e,s),m&&m!=="none"&&(e.style.transform=m),d&&d!==""&&(e.style.opacity=d),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.style.transform="",e.style.opacity="",xe(e,a),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0)));let x;if(typeof o=="number"?x=o:o&&typeof o=="object"&&"enter"in o&&(x=o.enter),await _t(e,x),$e(e,c),n?.onAfterEnter)try{n.onAfterEnter(e)}catch(u){I("Transition onAfterEnter error:",u)}}async function tt(e,t){const{classes:r,hooks:n,css:i,duration:o}=t;if(n?.onBeforeLeave)try{n.onBeforeLeave(e)}catch(m){I("Transition onBeforeLeave error:",m)}if(!i)return n?.onLeave?new Promise(m=>{n.onLeave(e,()=>{if(n?.onAfterLeave)try{n.onAfterLeave(e)}catch(d){I("Transition onAfterLeave error:",d)}m()})}):void 0;const s=ke(r?.leaveFrom),c=ke(r?.leaveActive),a=ke(r?.leaveTo);xe(e,s),e.offsetHeight,xe(e,c);let f;if(n?.onLeave){const m=new Promise(d=>{f=d});try{n.onLeave(e,()=>{f&&f()})}catch(d){I("Transition onLeave error:",d)}f&&await m}await new Promise(m=>requestAnimationFrame(()=>m(void 0))),await fn(e,[...s,...c]),$e(e,s),xe(e,a);let b;if(typeof o=="number"?b=o:o&&typeof o=="object"&&"leave"in o&&(b=o.leave),await _t(e,b),$e(e,c),$e(e,a),$e(e,s),n?.onAfterLeave)try{n.onAfterLeave(e)}catch(m){I("Transition onAfterLeave error:",m)}}function te(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function Ce(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?N(e)||"value"in e?!!e.value:!1:!!e}function me(e,t){if(!t||!(e instanceof HTMLElement))return;ie.cleanup(e);for(const n in t)t[n]===e&&delete t[n];const r=e.childNodes;for(let n=0;n<r.length;n++)me(r[n],t)}function je(e,t,r){if(typeof e=="string")return;const n=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),i=e.props?.ref??(e.props?.props&&e.props.props.ref);n?n.value=t:i&&r&&(r[i]=t)}function pn(e,t,r,n,i,o,s,c){if(!o)return;const a=t.includes("lazy"),f=t.includes("trim"),b=t.includes("number"),m=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",d=()=>{if(m){const k=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[c]:k}return Z(o._state||o,e)},x=d();let u="text";s instanceof HTMLInputElement?u=n?.type||s.type||"text":s instanceof HTMLSelectElement?u="select":s instanceof HTMLTextAreaElement&&(u="textarea");const p=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,l=p?u==="checkbox"||u==="radio"?"checked":"value":c??"modelValue";if(u==="checkbox")if(Array.isArray(x))r[l]=x.includes(String(s?.getAttribute("value")??n?.value??""));else{const k=s?.getAttribute("true-value")??!0;r[l]=x===k}else if(u==="radio")r[l]=x===(n?.value??"");else if(u==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const k=Array.isArray(x)?x.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(_=>{_.selected=k.includes(_.value)})},0),r[l]=Array.isArray(x)?x:[]}else r[l]=x;else{!p&&m?r[l]=e:r[l]=x;try{const k=ee(l);n&&(n[k]=x)}catch{}}const y=a||u==="checkbox"||u==="radio"||u==="select"?"change":"input",w=k=>{if(k.isComposing||i._isComposing)return;const _=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!_)return;const C=k.target;if(!C||C._modelUpdating)return;let g=C.value;if(u==="checkbox"){const $=d();if(Array.isArray($)){const v=C.getAttribute("value")??"",S=Array.from($);if(C.checked)S.includes(v)||S.push(v);else{const L=S.indexOf(v);L>-1&&S.splice(L,1)}g=S}else{const v=C.getAttribute("true-value")??!0,S=C.getAttribute("false-value")??!1;g=C.checked?v:S}}else if(u==="radio")g=C.getAttribute("value")??C.value;else if(u==="select"&&C.multiple)g=Array.from(C.selectedOptions).map($=>$.value);else if(f&&typeof g=="string"&&(g=g.trim()),b){const $=Number(g);isNaN($)||(g=$)}const A=d();if(Ke(g,A)){C._modelUpdating=!0;try{Ct(m,e,g,o,c),qe(o,m,e,g),C&&ln(C,l,g)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}};if(p){if(i[y]){const k=i[y];s&&ie.removeListener(s,y,k)}i[y]=w}else{const k=`update:${ee(l)}`,_=`update:${l}`;if(i[k]){const C=i[k];s&&ie.removeListener(s,k,C)}if(i[_]){const C=i[_];s&&ie.removeListener(s,_,C)}if(i[k]=C=>{const g=C.detail!==void 0?C.detail:C.target?.value,A=un(m,e,o,c);if(Ke(g,A)){Ct(m,e,g,o,c),qe(o,m,e,g);const $=C.target;$&&Et($,l,m?e:g,m)}},m&&typeof e.value=="object"&&e.value!==null){let C=[];try{C=Reflect.ownKeys(e.value)}catch{C=Object.keys(e.value)}const g=C.filter(A=>typeof A=="string"&&!String(A).startsWith("_")&&A!=="constructor");for(const A of g){const T=`update:${ee(A)}`,$=`update:${A}`;i[T]||(i[T]=v=>{const S=v.detail!==void 0?v.detail:v.target?.value,L=m?e.value[A]:Z(o._state||o,e);if(!Ke(S,L))return;if(m){const M={...e.value};M[A]=S,e.value=M}else Ue(o._state||o,e,S);qe(o,m,e,S);const O=v.currentTarget||s||v.target;O&&Et(O,l,m?e:S,m)},i[$]=i[T])}}i[_]=i[k]}(u==="text"||u==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=k=>{i._isComposing=!1;const _=k.target;_&&setTimeout(()=>{const C=_.value,g=o._state||o,A=Z(g,e);let T=C;if(f&&(T=T.trim()),b){const v=Number(T);isNaN(v)||(T=v)}if(Ke(T,A)){_._modelUpdating=!0;try{Ue(g,e,T),qe(o,m,e,T)}finally{setTimeout(()=>_._modelUpdating=!1,0)}}},0)})}function St(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function hn(e,t,r,n,i){if(typeof e=="object"&&e!==null)for(const[o,s]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")r[o]=s;else if(o==="disabled"&&i&&te(i)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return N(s)}catch{return!1}})()||c?t[o]=s:r[o]=s}else t[o]=s;else if(typeof e=="string"){if(!n)return;try{const o=Le(e,n);if(typeof o=="object"&&o!==null){for(const[s,c]of Object.entries(o))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")r[s]=c;else if(s==="disabled"&&i&&te(i)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return N(c)}catch{return!1}})()||a?t[s]=c:r[s]=c}else t[s]=c;return}else{r[e]=o;return}}catch{const o=Z(n,e);r[e]=o}}}function gn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Le(e,r)}else n=e;const i=t.style||"";let o=i;if(n){if(i){const s=i.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),o=s.length>0?s.join("; ")+";":"")}}else if(i){const s=i.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),o=s.join("; ")}else o="display: none";o!==i&&(o?t.style=o:delete t.style)}function Le(e,t){return cn.evaluate(e,t)}function mn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Le(e,r)}else n=e;let i=[];if(typeof n=="string")i=[n];else if(Array.isArray(n))i=n.filter(Boolean);else if(typeof n=="object"&&n!==null)for(const[c,a]of Object.entries(n))a&&i.push(c);const o=t.class||"",s=i.join(" ");t.class=o?`${o} ${s}`.trim():s}function nt(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const r=e.value,n=typeof r;return n==="boolean"?!0:n==="string"?r===""||r==="true"||r==="false":!1}}catch{}return!1}function yn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Le(e,r)}else n=e;let i="";if(typeof n=="string")i=n;else if(n&&typeof n=="object"){const s=[];for(const[c,a]of Object.entries(n))if(a!=null&&a!==""){const f=c.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`),b=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let m=String(a);typeof a=="number"&&b.includes(f)&&(m=`${a}px`),s.push(`${f}: ${m}`)}i=s.join("; ")+(s.length>0?";":"")}const o=t.style||"";t.style=o+(o&&!o.endsWith(";")?"; ":"")+i}function bn(e,t,r){let n=e;typeof e=="string"&&r&&(n=Le(e,r)),N(n)?t.reactiveRef=n:t.ref=n}function At(e,t,r,n){const i={},o={...n||{}},s={};for(const[c,a]of Object.entries(e)){const{value:f,modifiers:b,arg:m}=a;if(c==="model"||c.startsWith("model:")){const d=c.split(":"),x=d.length>1?d[1]:m;pn(f,b,i,o,s,t,r,x);continue}switch(c){case"bind":hn(f,i,o,t,r);break;case"show":gn(f,o,t);break;case"class":mn(f,o,t);break;case"style":yn(f,o,t);break;case"ref":bn(f,i,t);break}}try{if(Object.prototype.hasOwnProperty.call(i,"disabled")&&r&&te(r)){const a=i.disabled,f=a&&typeof a=="object"&&"value"in a;let b=!1;try{b=N(a)}catch{b=!1}if(!f&&!b)try{o.disabled=a,delete i.disabled;const m=globalThis;m.__VDOM_DISABLED_PROMOTIONS||(m.__VDOM_DISABLED_PROMOTIONS=[]),m.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:i,attrs:o,listeners:s}}function rt(e,t){if(Array.isArray(e)){const o=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const m=s.tag||"node",x=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(u=>u!=null)??"";c=x?`${t}:${m}:${x}`:`${t}:${m}`}let a=c,f=1;for(;o.has(a);)a=`${c}#${f++}`;o.add(a);let b=s.children;return Array.isArray(b)&&(b=rt(b,a)),{...s,key:a,children:b}})}const r=e;let n=r.props?.key??r.key??t,i=r.children;return Array.isArray(i)&&(i=rt(i,n)),{...r,key:n,children:i}}function Tt(e,t,r,n){const i=r.directives??{},o=At(i,n,e,r.attrs),s={...t.props,...r.props,...o.props},c={...t.attrs,...r.attrs,...o.attrs},a=t.props??{},f=s,b=r?.isCustomElement??t?.isCustomElement??!1;let m=!1;for(const u in{...a,...f}){const p=a[u],h=f[u];let l=p,y=h;if(R(()=>{(N(p)||p&&typeof p=="object"&&"value"in p)&&(l=p.value)}),R(()=>{(N(h)||h&&typeof h=="object"&&"value"in h)&&(y=h.value)}),!(p===h&&l===y))if(m=!0,u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const w=typeof h=="object"&&h!==null&&N(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.value!==w&&(e.value=w??"")}else if(u==="checked"&&e instanceof HTMLInputElement){const w=typeof h=="object"&&h!==null&&N(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.checked=!!w}else if(u.startsWith("on")&&typeof h=="function"){const w=St(u);typeof p=="function"&&ie.removeListener(e,w,p),ie.addListener(e,w,h);try{if(w&&w.startsWith("update:")){const k=w.split(":",2)[1],_=f[k];let C=[];try{if(N(_)){const A=_.value;C=A&&typeof A=="object"?Object.keys(A):[]}else _&&typeof _=="object"&&(C=Object.keys(_))}catch{C=[]}const g=C.filter(A=>typeof A=="string"&&!A.startsWith("_")&&A!=="constructor");for(const A of g){const T=`update:${A}`,$=v=>{const S=v.detail!==void 0?v.detail:v.target?.value,E={...N(_)?_.value||{}:f[k]||{},[A]:S};R(()=>{h({detail:E})})};R(()=>{ie.addListener(e,T,$)})}}}catch{}}else if(h==null)e.removeAttribute(u);else{const w=r?.isCustomElement??t?.isCustomElement??!1;if(w||u in e)try{e[u]=h,u==="disabled"&&h===!1&&!w&&te(e)&&e.removeAttribute("disabled")}catch{}else h===!1&&e.removeAttribute(u)}}for(const[u,p]of Object.entries(o.listeners||{})){ie.addListener(e,u,p);try{const h=e&&e.parentElement;h&&h!==e&&ie.addListener(h,u,p)}catch{}}const d=t.attrs??{},x=c;for(const u in{...d,...x}){const p=d[u],h=x[u];let l=p,y=h;if(N(p)&&(l=p.value),N(h)&&(y=h.value),l!==y)if(m=!0,y==null||y===!1)R(()=>{e.removeAttribute(u)}),u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?R(()=>{e.value=""}):e instanceof HTMLSelectElement?R(()=>{e.value=""}):e instanceof HTMLProgressElement&&R(()=>{e.value=0})),u==="checked"&&e instanceof HTMLInputElement&&R(()=>{e.checked=!1}),u==="disabled"&&te(e)&&R(()=>{e.disabled=!1});else{if(u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){R(()=>{e.value=y??""});continue}else if(e instanceof HTMLSelectElement){R(()=>{e.value=y??""});continue}else if(e instanceof HTMLProgressElement){R(()=>{e.value=Number(y)});continue}}if(u==="checked"&&e instanceof HTMLInputElement){R(()=>{e.checked=!!y});continue}if(u==="style"){e.setAttribute(u,String(y));continue}if(u==="disabled"&&te(e)){R(()=>{e.disabled=Ce(y)}),Ce(y)?R(()=>{e.setAttribute(u,"")}):R(()=>{e.removeAttribute(u)});continue}const w=e.namespaceURI==="http://www.w3.org/2000/svg";if(b&&!w&&u.includes("-")){const k=Qe(u);try{N(h)?e[k]=h:e[k]=y}catch{e.setAttribute(u,String(y))}}else if(!w&&u in e)try{N(h)?e[u]=h:e[u]=y}catch{e.setAttribute(u,String(y))}else e.setAttribute(u,String(y))}}try{if(te(e)){const u=s.disabled;let p;try{const l=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),y=u&&typeof u=="object"&&"value"in u;let w=!1;R(()=>{w=!!N(u)});const k=nt(u);w||y||l||k?p=u:p=c.disabled}catch{p=c.disabled}const h=Ce(p);R(()=>{e.disabled=h}),R(h?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}b&&m&&(R(()=>{e._applyProps?.(e._cfg)}),R(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function Q(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const d=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(d.key=e.key),d}if(e.tag==="#anchor"){const d=e,x=Array.isArray(d.children)?d.children:[],u=document.createTextNode(""),p=document.createTextNode("");d.key!=null&&(u.key=`${d.key}:start`,p.key=`${d.key}:end`),d._startNode=u,d._endNode=p;const h=document.createDocumentFragment();h.appendChild(u);for(const l of x){const y=Q(l,t);if(d.key!=null&&y instanceof Element&&!y.hasAttribute("data-anchor-key")){const w=l;w&&typeof w=="object"&&w.key!=null||(y.key=d.key,y.setAttribute("data-anchor-key",String(d.key)))}h.appendChild(y)}return h.appendChild(p),h}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key),e.props&&e.props._transitionGroup&&(n._transitionGroup=e.props._transitionGroup);const{props:i={},attrs:o={},directives:s={}}=e.props??{},c=At(s,t,n,o),a={...i,...c.props},f={...o,...c.attrs};try{if(a.disabled!==void 0&&n&&te(n)){const d=a.disabled,x=d&&typeof d=="object"&&"value"in d;let u=!1;try{u=N(d)}catch{u=!1}!x&&!u&&R(()=>{f.disabled=d,delete a.disabled;const p=globalThis;p.__VDOM_DISABLED_PROMOTIONS||(p.__VDOM_DISABLED_PROMOTIONS=[]),p.__VDOM_DISABLED_PROMOTIONS.push({phase:"createElement:move-prop-to-attr",location:"attrs",key:"disabled",value:d,time:Date.now(),stack:new Error().stack})})}}catch{}const b=n.namespaceURI==="http://www.w3.org/2000/svg";for(const d in f){const x=f[d];if(typeof d!="string"||/\[object Object\]/.test(d))continue;const u=typeof x=="object"&&x!==null&&N(x)||x&&typeof x=="object"&&"value"in x?x.value:x;if(typeof u=="boolean")u?n.setAttribute(d,""):R(()=>{n.removeAttribute(d)});else if(u!=null){if(d==="disabled"&&te(n)){const p=a.disabled,h=nt(p)?p:u,l=Ce(h);R(()=>{n.disabled=l}),R(l?()=>{n.setAttribute(d,"")}:()=>{n.removeAttribute(d)});continue}if(!b&&d==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(u):n.value=u??""}catch{n.setAttribute(d,String(u))}else if(!b&&d==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!u}catch{n.setAttribute(d,String(u))}else if(!b&&d in n)try{n[d]=u,d==="disabled"&&u===!1&&te(n)&&n.removeAttribute("disabled")}catch{n.setAttribute(d,String(u))}else if((e.props?.isCustomElement??!1)&&!b&&d.includes("-")){const h=Qe(d);try{n[h]=u}catch{n.setAttribute(d,String(u))}}else n.setAttribute(d,String(u))}}for(const d in a){const x=a[d];if(!(typeof d!="string"||/\[object Object\]/.test(d)))if(d==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const u=typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;R(()=>{n.value=u??""})}else if(d.startsWith("on")&&typeof x=="function"){const u=St(d),p=u.includes(":")?(()=>{const h=u.split(":"),l=h[1];if(l.includes("-")){const y=l.split("-").map((w,k)=>k===0?w:w.charAt(0).toUpperCase()+w.slice(1)).join("");return`${h[0]}:${y}`}else{const y=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${y}`}})():u;c.listeners&&(c.listeners[u]||c.listeners[p])||ie.addListener(n,u,x)}else{if(d.startsWith("on")&&x===void 0)continue;if(x==null||x===!1)n.removeAttribute(d);else if((e.props?.isCustomElement??!1)||d in n)try{const p=typeof x=="object"&&x!==null&&N(x)?x:typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;if(d==="disabled"&&te(n)){const h=a.disabled!==void 0?a.disabled:p,l=Ce(h);R(()=>{n.disabled=l}),R(l?()=>{n.setAttribute(d,"")}:()=>{n.removeAttribute(d)});continue}try{if(typeof n[d]=="boolean"){let l=p;typeof p=="string"?p==="false"?l=!1:p==="true"?l=!0:l=!!p&&p!=="":l=!!p,n[d]=l}else n[d]=p}catch{n[d]=p}}catch{}}}for(const[d,x]of Object.entries(c.listeners||{}))ie.addListener(n,d,x);const m={...e,props:{...e.props,...c.props}};je(m,n,r);try{if(typeof n._applyProps=="function")try{n._applyProps(n._cfg)}catch{}typeof n.requestRender=="function"?n.requestRender():typeof n._render=="function"&&n._render(n._cfg)}catch{}if(Array.isArray(e.children))for(const d of e.children)n.appendChild(Q(d,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&f&&f.hasOwnProperty("value"))try{n.value=f.value??""}catch{}}catch{}try{if(te(n)){const d=a.disabled,x=f.disabled,u=d&&typeof d=="object"&&"value"in d;let p=!1;try{p=!!N(d)}catch{p=!1}const l=p||u||nt(d)?d:x,y=Ce(l);R(()=>{n.disabled=y}),R(y?()=>{n.setAttribute("disabled","")}:()=>{n.removeAttribute("disabled")})}}catch{}return n}function wn(e,t,r,n,i){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const o=e.childNodes,s=[];for(let p=0;p<o.length;p++)s.push(o[p]);const c=Array.isArray(t)?t:[],a=e._transitionGroup;if(a){const p=w=>typeof w=="string"&&w.startsWith("each-")?w.substring(5):w,h=[],l=[];for(const w of r)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const _ of k){const C=p(_.key||w.key||"unknown");h.push({..._,key:C})}}else w&&h.push({...w,key:p(w.key)});for(const w of c)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const _ of k){const C=p(_.key||w.key||"unknown");l.push({..._,key:C})}}else w&&l.push({...w,key:p(w.key)});if(h.some(w=>w&&w.key!=null)||l.some(w=>w&&w.key!=null)){const w=new Map,k=new Map;for(const $ of l)if($&&$.key!=null){const v=String($.key);w.set(v,$)}for(let $=0;$<s.length;$++){const v=s[$];let S=v.key;if(!S&&v instanceof Element){const L=v.getAttribute("data-anchor-key");L&&(S=L)}if(S=p(S),S!=null&&v instanceof Element&&v.nodeType===Node.ELEMENT_NODE){let L=typeof S=="string"&&S.includes(":")?S.substring(0,S.lastIndexOf(":")):S;L=String(L),k.set(L,v)}}const _=new Set,C=new Map,g=s.length>0;if(a.moveClass&&g)for(let $=0;$<s.length;$++){const v=s[$];if(v instanceof HTMLElement&&v.parentElement){const S=v.getBoundingClientRect();C.set(v,S)}}const A=[];for(const $ of h){let v=$.key;if(v==null)continue;v=String(v);const S=w.get(v);let L=k.get(v);if(L&&S){const E=Pe(L,S,$,n);_.add(L);const O=String(v);E.key=O,E instanceof Element&&E.setAttribute("data-anchor-key",O),A.push({node:E,key:v,newVNode:$,oldVNode:S,isNew:!1})}else{L=Q($,n),L.key=v,L instanceof Element&&L.setAttribute("data-anchor-key",String(v)),e.appendChild(L);const E=g||a.appear===!0;L instanceof HTMLElement&&E&&Oe(L,a).catch(O=>{I("Enter transition error:",O)}),A.push({node:L,key:v,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const v=s[$],S=v.key;if(!_.has(v)&&S!=null&&v instanceof HTMLElement){const E=tt(v,a).then(()=>{e.contains(v)&&e.removeChild(v)}).catch(O=>{I("Leave transition error:",O),e.contains(v)&&e.removeChild(v)});T.push(E)}}if(T.length===0){let $=e.firstChild;for(const{node:v}of A)v!==$&&e.insertBefore(v,$),$=v.nextSibling;if(a.moveClass&&C.size>0){const v=[];for(const{node:S,isNew:L}of A)if(!L&&S instanceof HTMLElement){const E=C.get(S);if(E){const O=S.getBoundingClientRect(),M=E.left-O.left,F=E.top-O.top;if(M!==0||F!==0){const pe=a.moveClass.split(/\s+/).filter(H=>H);v.push({node:S,deltaX:M,deltaY:F,moveClasses:pe})}}}if(v.length>0){for(const{node:S,deltaX:L,deltaY:E}of v)S.style.transform=`translate(${L}px, ${E}px)`,S.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:S,moveClasses:L}of v)for(const E of L)S.classList.add(E);requestAnimationFrame(()=>{const S=a.moveClass||"",L=S.match(/duration-(\d+)/),E=L?`${L[1]}ms`:"300ms",O=S.match(/ease-(out|in|in-out|linear)/),M=O?`ease-${O[1]}`:"ease-out";for(const{node:F}of v)F.style.transition=`transform ${E} ${M}`;requestAnimationFrame(()=>{for(const{node:F,moveClasses:pe}of v){F.style.removeProperty("transform");const H=()=>{for(const D of pe)F.classList.remove(D);F.style.removeProperty("transition"),F.removeEventListener("transitionend",H),F.removeEventListener("transitioncancel",H)};F.addEventListener("transitionend",H,{once:!0}),F.addEventListener("transitioncancel",H,{once:!0})}})})})})}}}return}}const f=new Map;for(const p of c)p&&p.key!=null&&f.set(p.key,p);const b=new Map;for(let p=0;p<s.length;p++){const h=s[p],l=h.key;l!=null&&b.set(l,h)}const m=new Set;let d=e.firstChild;function x(p,h){let l=p;for(;l&&(m.add(l),l!==h);)l=l.nextSibling}function u(p,h,l,y,w,k=!0){const _=[];let C=p.nextSibling;for(;C&&C!==h;)_.push(C),C=C.nextSibling;const g=Array.isArray(l)?l:[];if(y.some(T=>T&&T.key!=null)||g.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const E of g)E&&E.key!=null&&T.set(E.key,E);for(const E of _){const O=E.key;O!=null&&$.set(O,E)}const v=w&&w.state==="visible"&&g.length===0&&y.length>0,S=new Set;let L=p.nextSibling;for(const E of y){let O;if(E.key!=null&&$.has(E.key)){const M=T.get(E.key);O=Pe($.get(E.key),M,E,n),S.add(O),w&&O instanceof HTMLElement&&v&&w.appear&&Oe(O,w).catch(F=>{I("Transition enter error (appear):",F)}),O!==L&&e.contains(O)&&e.insertBefore(O,L)}else O=Q(E,n),e.insertBefore(O,L),S.add(O),w&&O instanceof HTMLElement&&k&&Oe(O,w).catch(M=>{I("Transition enter error:",M)});L=O.nextSibling}for(const E of _)!S.has(E)&&e.contains(E)&&(w&&E instanceof HTMLElement&&k?tt(E,w).then(()=>{e.contains(E)&&e.removeChild(E)}).catch(O=>{I("Transition leave error:",O),e.contains(E)&&e.removeChild(E)}):e.removeChild(E))}else{const T=Math.min(g.length,y.length);for(let $=0;$<T;$++){const v=g[$],S=y[$],L=Pe(_[$],v,S,n);L!==_[$]&&(e.insertBefore(L,_[$]),e.removeChild(_[$]))}for(let $=T;$<y.length;$++){const v=Q(y[$],n);e.insertBefore(v,h),w&&v instanceof HTMLElement&&k&&Oe(v,w).catch(S=>{I("Transition enter error:",S)})}for(let $=T;$<_.length;$++){const v=_[$];w&&v instanceof HTMLElement&&k?tt(v,w).then(()=>{e.contains(v)&&e.removeChild(v)}).catch(S=>{I("Transition leave error:",S),e.contains(v)&&e.removeChild(v)}):e.removeChild(v)}}}for(const p of r){let h;if(p.tag==="#anchor"){const l=p.key,y=`${l}:start`,w=`${l}:end`;let k=b.get(y),_=b.get(w);const C=Array.isArray(p.children)?p.children:[];if(k||(k=document.createTextNode(""),k.key=y),_||(_=document.createTextNode(""),_.key=w),p._startNode=k,p._endNode=_,!e.contains(k)||!e.contains(_)){e.insertBefore(k,d);const g=p._transition,T=!(g&&g.state==="visible"&&C.length>0)||g.appear;for(const $ of C){const v=Q($,n);e.insertBefore(v,d),g&&v instanceof HTMLElement&&T&&Oe(v,g).catch(S=>{I("Transition enter error:",S)})}e.insertBefore(_,d)}else{const g=p._transition,T=f.get(l)?._transition,$=T&&T.state!==g?.state,v=g&&g.state==="visible"&&C.length>0&&!$,S=$||!v||g?.appear===!0;u(k,_,f.get(l)?.children,C,g,S)}x(k,_),d=_.nextSibling;continue}if(p.key!=null&&b.has(p.key)){const l=f.get(p.key);h=Pe(b.get(p.key),l,p,n,i),m.add(h),h!==d&&e.contains(h)&&(d&&!e.contains(d)&&(d=null),e.insertBefore(h,d))}else h=Q(p,n,i),d&&!e.contains(d)&&(d=null),e.insertBefore(h,d),m.add(h);d=h.nextSibling}for(let p=0;p<s.length;p++){const h=s[p];!m.has(h)&&e.contains(h)&&(me(h,i),e.removeChild(h))}}function Pe(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&me(e,i),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const s=document.createTextNode(r);return e.parentNode?.replaceChild(s,e),s}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const s=r,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),f=s._endNode??document.createTextNode("");s.key!=null&&(a.key=`${s.key}:start`,f.key=`${s.key}:end`),s._startNode=a,s._endNode=f;const b=document.createDocumentFragment();b.appendChild(a);for(const m of c){const d=Q(m,n);b.appendChild(d)}return b.appendChild(f),e.parentNode?.replaceChild(b,e),a}if(!r){me(e,i);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){me(e,i);const s=Q(r,n,i);return je(r,s,i),e.parentNode?.replaceChild(s,e),s}if(r.tag==="#anchor"){const s=Array.isArray(r.children)?r.children:[],c=r._startNode??document.createTextNode(""),a=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,a.key=`${r.key}:end`),r._startNode=c,r._endNode=a;const f=document.createDocumentFragment();f.appendChild(c);for(const b of s)f.appendChild(Q(b,n));return f.appendChild(a),e.parentNode?.replaceChild(f,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const s=e;return Tt(s,t.props||{},r.props||{},n),wn(s,t.children,r.children,n,i),je(r,s,i),s}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return Tt(c,t.props||{},r.props||{},n),je(r,c,i),c}catch{}me(e,i);const o=Q(r,n,i);return je(r,o,i),e.parentNode?.replaceChild(o,e),o}function vn(e,t,r,n){let i;Array.isArray(t)?t.length===1?(i=t[0],i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})):i={tag:"div",key:"__root__",children:t}:(i=t,i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})),i&&typeof i=="object"&&i.tag==="#anchor"&&(i={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[i]}),i=rt(i,String(i.key??"root"));const o=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let c;o&&s?typeof o!="string"&&typeof i!="string"&&o.tag===i.tag&&o.key===i.key?c=Pe(s,o,i,r,n):(c=Q(i,r,n),e.replaceChild(c,s)):(c=Q(i,r,n),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let f=0;f<e.childNodes.length;f++){const b=e.childNodes[f];b!==c&&b.nodeName!=="STYLE"&&(me(b,n),a.push(b))}a.forEach(f=>e.removeChild(f)),e._prevVNode=i,e._prevDom=c}function Ve(e){if(typeof e=="string")return Te(e);if(e.tag==="#text")return typeof e.children=="string"?Te(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Ve).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,o])=>` ${i}="${Te(String(o))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([i])=>i!=="attrs"&&i!=="directives"&&i!=="ref"&&i!=="key").map(([i,o])=>` ${i}="${Te(String(o))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Ve).join(""):typeof e.children=="string"?Te(e.children):e.children?Ve(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function Ot(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function jt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ze=null;function Lt(){return Ze||(Ze=new CSSStyleSheet,Ze.replaceSync(jt(xn))),Ze}function kn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const xn=Ot`
|
|
4
|
+
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),ee.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:St.createReactiveProxy(t,()=>ee.triggerUpdate(this),n=>this.makeReactive(n))}}function dn(e){return ee.getOrCreateState(e===void 0?null:e)}function D(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function pn(e){const t=new Be(e());return{get value(){return ee.trackDependency(t),e()}}}function hn(e,t,n={}){let r=e();n.immediate&&t(r,r);const o=`watch-${Math.random().toString(36).substr(2,9)}`,i=()=>{ee.setCurrentComponent(o,i);const s=e();ee.clearCurrentComponent(),s!==r&&(t(s,r),r=s)};return ee.setCurrentComponent(o,i),e(),ee.clearCurrentComponent(),()=>{ee.cleanup(o)}}const M=e=>{try{e()}catch{}},Ue=new Map,ze=new Map,qe=new Map,nt=500;let At,Tt,jt=!1,Lt=!1,Ot;const gn=!!(globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);function re(e){if(Ue.has(e))return Ue.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Ue.size<nt&&Ue.set(e,t),t}function rt(e){if(ze.has(e))return ze.get(e);const t=e.replace(/-([a-z])/g,(n,r)=>r.toUpperCase());return ze.size<nt&&ze.set(e,t),t}function Ke(e){if(typeof e=="string"){if(qe.has(e))return qe.get(e);const t=e.replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]);return t!==e&&qe.size<nt&&qe.set(e,t),t}return e}function se(e){if(!e)return"";const t=String(e);if(typeof document<"u"&&typeof document.createElement=="function"){const c=t.replace(/</g,"").replace(/>/g,""),a=Ot||(Ot=document.createElement("div"));try{se._el=a}catch{}return a.innerHTML=c,(a.textContent||"").replace(new RegExp("","g"),"<").replace(new RegExp("","g"),">")}const n={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "},r=At??se._namedMap;let o=r;if(!o&&gn)try{const i=globalThis.require;if(typeof i=="function"){const s=["@jasonshimmy/custom-elements-runtime/entities.json","../../entities.json","../../../entities.json","../entities.json","./entities.json"];for(const c of s)try{const a=i(c);if(a){o=a;break}}catch{}}}catch{}if(!o){o=n,jt=!0;try{se._usedFallback=!0}catch{}const i=se._namedMapLoader??Tt;i&&i().then(s=>{At=s;try{se._namedMap=s}catch{}}).catch(()=>{})}if((jt||se._usedFallback)&&!(Lt||se._warnedFallback)){Lt=!0;try{se._warnedFallback=!0}catch{}try{Q("decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding.")}catch{}}return t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(i,s)=>{if(s.charCodeAt(0)===35){const u=(s.charAt(1)||"").toLowerCase()==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return Number.isNaN(u)?`&${s};`:String.fromCodePoint(u)}const c=o[s]??(r&&r[s]);return c!==void 0?c:`&${s};`})}async function Pt(){const e=["@jasonshimmy","custom-elements-runtime","entities.json"].join("/");try{const t=await import(e);return t&&(t.default||t)}catch{try{const t=[e,"./entities.json","../../entities.json","../../../entities.json"];for(const n of t)try{const r=await import(n);if(r)return r&&(r.default||r)}catch{}return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}catch{return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}}}Tt=Pt,se._namedMapLoader=Pt;function mn(e){const t=String(e);return{__unsafeHTML:t,__rawHTML:t}}function Mt(e){return!!e&&(typeof e.__unsafeHTML=="string"||typeof e.__rawHTML=="string")}function J(e,t){if(typeof t=="string"){const n=t.split(".").reduce((r,o)=>r?.[o],e);return D(n)?n.value:n}return t}function Ve(e,t,n){const r=String(t).split("."),o=r.pop();if(!o)return;const i=r.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);D(i[o])?i[o].value=n:i[o]=n}function yn(e,t,n){if(n)for(const[r,o]of Object.entries(n)){let i,s={};if(Array.isArray(o)?(i=o[0],s=o[1]||{}):i=o,t.set(r,{callback:i,options:s,oldValue:J(e,r)}),s.immediate)try{const c=J(e,r);i(c,void 0,e)}catch(c){H(`Error in immediate watcher for "${r}":`,c)}}}function bn(e,t,n,r){const o=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((m,y)=>o(m,c[y]));const a=Object.keys(s),u=Object.keys(c);return a.length!==u.length?!1:a.every(m=>o(s[m],c[m]))},i=t.get(n);if(i&&!o(r,i.oldValue))try{i.callback(r,i.oldValue,e),i.oldValue=r}catch(s){H(`Error in watcher for "${n}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&n.startsWith(s+"."))try{const a=J(e,s);o(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){H(`Error in deep watcher for "${s}":`,a)}}function Rt(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function vn(e,t,n){if(t)for(const r in t){const o=t[r],i=re(r),s=e.getAttribute(i);if(o.type===Function&&typeof e[r]=="function")n[r]=e[r];else if(s!==null)n[r]=Rt(s,o.type);else if(typeof e[r]<"u")try{const c=e[r];o.type===Boolean&&typeof c=="boolean"||o.type===Number&&typeof c=="number"||o.type===Function&&typeof c=="function"?n[r]=c:n[r]=Rt(String(c),o.type)}catch{n[r]=e[r]}else"default"in o&&o.default!==void 0&&(n[r]=o.default)}}function wn(e,t,n){if(!t.props){try{const r=n&&n._hookCallbacks&&n._hookCallbacks.props||{},o=Array.from(new Set([...Object.keys(e),...Object.keys(r)]));for(const i of o){if(typeof i!="string"||i.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(n,i);if(!(!Object.prototype.hasOwnProperty.call(r,i)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get(){try{const a=re(i),u=e.getAttribute(a);if(u!==null)return u;const m=e[i];let y;return D(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?y=m.value:y=m,y}catch{return e[i]}}})}catch{}}}catch{}return}vn(e,t.props,n)}function kn(e,t,n,r){e.onConnected&&!n&&(e.onConnected(t),r(!0))}function xn(e,t,n,r,o,i,s,c){e.onDisconnected&&e.onDisconnected(t),n.forEach(a=>a()),r(),o(),i(!1),s(null),c(!1)}function $n(e,t,n,r,o){e.onAttributeChanged&&e.onAttributeChanged(t,n,r,o)}class En{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,n){const r=this.cache.get(t);if(r){if(!r.isSecure){Q("Blocked cached dangerous expression:",t);return}return r.evaluator(n)}const o=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}if(this.cache.set(t,o),!o.isSecure){Q("Blocked dangerous expression:",t);return}return o.evaluator(n)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(n){return Q("Failed to create evaluator for expression:",t,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(n=>n.test(t))}static createSafeEvaluator(t){const n=t.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return o=>J(o,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>J(r,t)}static createObjectEvaluator(t){const n=t.trim().slice(1,-1),r=this.parseObjectProperties(n);return o=>{const i={};for(const{key:s,value:c}of r)try{if(c.startsWith("ctx.")){const a=c.slice(4);i[s]=J(o,a)}else i[s]=this.evaluateSimpleValue(c,o)}catch{i[s]=void 0}return i}}static parseObjectProperties(t){const n=[],r=t.split(",");for(const o of r){const i=o.indexOf(":");if(i===-1)continue;const s=o.slice(0,i).trim(),c=o.slice(i+1).trim(),a=s.replace(/^['"]|['"]$/g,"");n.push({key:a,value:c})}return n}static createSimpleEvaluator(t){return n=>{try{let r=t;const o=[];r=r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,y=>`<<#${o.push(y)-1}#>>`);const i=r.match(/ctx\.[\w.]+/g)||[];for(const y of i){const p=y.slice(4),x=J(n,p);if(x===void 0)return;const d=o.push(JSON.stringify(x))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=r.match(s)||[];for(const y of c){if(y.startsWith("ctx."))continue;const p=J(n,y);if(p===void 0)return;const x=o.push(JSON.stringify(p))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${x}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let u;const m=new Set;for(;(u=a.exec(r))!==null;){const y=u[1];if(["true","false","null","undefined"].includes(y)||/^[0-9]+$/.test(y)||y==="ctx"||m.has(y))continue;m.add(y);const p=J(n,y);if(p===void 0)return;const x=JSON.stringify(p),d=o.push(x)-1;y.includes(".")?r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`):r=r.replace(new RegExp("\\b"+y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${d}#>>`)}r=r.replace(/<<#(\d+)#>>/g,(y,p)=>o[Number(p)]);try{return this.evaluateBasicExpression(r)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const n=this.tokenize(t);let r=0;function o(){return n[r]}function i(l){const g=n[r++];if(l&&!g)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&g&&g.type!==l&&g.value!==l)throw new Error(`Unexpected token ${g.type}/${g.value}, expected ${l}`);return g}function s(){return c()}function c(){let l=a();if(o()&&o().value==="?"){i("?");const g=s();i(":");const v=s();return l?g:v}return l}function a(){let l=u();for(;o()&&o().value==="||";){i("OP");const g=u();l=l||g}return l}function u(){let l=m();for(;o()&&o().value==="&&";){i("OP");const g=m();l=l&&g}return l}function m(){let l=y();for(;o()&&["==","!=","===","!=="].includes(o().value);){const g=i("OP").value,v=y();switch(g){case"==":l=l==v;break;case"!=":l=l!=v;break;case"===":l=l===v;break;case"!==":l=l!==v;break}}return l}function y(){let l=p();for(;o()&&[">","<",">=","<="].includes(o().value);){const g=i("OP").value,v=p();switch(g){case">":l=l>v;break;case"<":l=l<v;break;case">=":l=l>=v;break;case"<=":l=l<=v;break}}return l}function p(){let l=x();for(;o()&&(o().value==="+"||o().value==="-");){const g=i("OP").value,v=x();l=g==="+"?l+v:l-v}return l}function x(){let l=d();for(;o()&&(o().value==="*"||o().value==="/"||o().value==="%");){const g=i("OP").value,v=d();switch(g){case"*":l=l*v;break;case"/":l=l/v;break;case"%":l=l%v;break}}return l}function d(){return o()&&o().value==="!"?(i("OP"),!d()):o()&&o().value==="-"?(i("OP"),-d()):f()}function f(){const l=o();if(l){if(l.type==="NUMBER")return i("NUMBER"),Number(l.value);if(l.type==="STRING")return i("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return i("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){i("PUNC");const g=[];for(;o()&&o().value!=="]";)g.push(s()),o()&&o().value===","&&i("PUNC");return i("PUNC"),g}if(l.value==="("){i("PUNC");const g=s();return i("PUNC"),g}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const n=[],r=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let o;for(;(o=r.exec(t))!==null;){const i=o[1];i&&(/^\d/.test(i)?n.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?n.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?n.push({type:"IDENT",value:i}):/^[()?:,\[\]]$/.test(i)?n.push({type:"PUNC",value:i}):n.push({type:"OP",value:i}))}return n}static evaluateSimpleValue(t,n){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const r=t.slice(4);return J(n,r)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ae{static cleanupFunctions=new WeakMap;static addListener(t,n,r,o){t.addEventListener(n,r,o);const s={event:n,handler:r,wrapper:r,options:o,cleanup:()=>t.removeEventListener(n,r,o),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,n,r,o){t.removeEventListener(n,r,o);const i=this.cleanupFunctions.get(t);if(i)for(let s=0;s<i.length;s++){const c=i[s];if(c.event===n&&c.handler===r){i.splice(s,1),i.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const n=this.cleanupFunctions.get(t);n&&(n.forEach(r=>{try{r.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const n=this.cleanupFunctions.get(t);return!!(n&&n.length>0)}static getListenerCount(t){const n=this.cleanupFunctions.get(t);return n?n.length:0}static getListenerInfo(t){const n=this.cleanupFunctions.get(t);return n?n.map(r=>({event:r.event,handler:r.handler,wrapper:r.wrapper,options:r.options})):[]}}function Ge(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function Nt(e,t,n,r,o){if(e)if(o&&typeof t.value=="object"&&t.value!==null){const i={...t.value};i[o]=n,t.value=i}else t.value=n;else{const i=r._state||r;Ve(i,t,n)}}function Ze(e,t,n,r){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const o=t?"reactiveState":n;e._triggerWatchers(o,r)}}function Cn(e,t,n){const r=`update:${re(t)}`,o=`update:${t}`,i=new CustomEvent(r,{detail:n,bubbles:!0,composed:!0}),s=new CustomEvent(o,{detail:n,bubbles:!0,composed:!0});e.dispatchEvent(i),e.dispatchEvent(s)}function Dt(e,t,n,r){const o=n;M(()=>{e[t]=o}),M(()=>{const i=re(t);typeof o=="boolean"?o?e.setAttribute(i,"true"):e.setAttribute(i,"false"):o!=null&&(typeof o=="string"||typeof o=="number")?e.setAttribute(i,String(o)):e.removeAttribute?.(i)}),M(()=>{e._applyProps?.(e._cfg)}),M(()=>{e._requestRender?.()})}function _n(e,t,n,r){if(e){const i=t.value;return r&&typeof i=="object"&&i!==null?i[r]:i}const o=n._state||n;return J(o,t)}function Ee(e){return e?e.split(/\s+/).filter(Boolean):[]}function Ce(e,t){if(t.length===0)return;const n=t.filter(r=>r&&!e.classList.contains(r));n.length>0&&e.classList.add(...n)}function _e(e,t){if(t.length===0)return;const n=t.filter(Boolean);n.length>0&&e.classList.remove(...n)}let ot=!1;async function Sn(e,t,n=10){if(!ot){if(!e.isConnected){Q("⚠️ Element not connected to DOM, skipping style wait");return}for(let r=0;r<n;r++){const o=window.getComputedStyle(e),i=o.transform&&o.transform!=="",s=o.opacity&&o.opacity!=="";if(i||s){ot=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}ot=!0,Q("⚠️ Styles did not load in time for transition, continuing anyway")}}function An(e){const t=window.getComputedStyle(e),n=t.transitionDuration||"0s",r=t.transitionDelay||"0s",o=i=>{const s=parseFloat(i);return i.includes("ms")?s:s*1e3};return o(n)+o(r)}function Ht(e,t){return new Promise(n=>{const r=t??An(e);if(r<=0){n();return}let o=!1;const i=()=>{o||(o=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),n())},s=()=>i();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(i,r+50)})}async function Oe(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeEnter)try{r.onBeforeEnter(e)}catch(d){H("Transition onBeforeEnter error:",d)}if(!o)return r?.onEnter?new Promise(d=>{r.onEnter(e,()=>{if(r?.onAfterEnter)try{r.onAfterEnter(e)}catch(f){H("Transition onAfterEnter error:",f)}d()})}):void 0;const s=Ee(n?.enterFrom),c=Ee(n?.enterActive),a=Ee(n?.enterTo);Ce(e,s),e.offsetHeight,Ce(e,c),e.offsetHeight;let u;if(r?.onEnter){const d=new Promise(f=>{u=f});try{r.onEnter(e,()=>{u&&u()})}catch(f){H("Transition onEnter error:",f)}u&&await d}await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.offsetHeight;const m=window.getComputedStyle(e),y=m.transform,p=m.opacity;_e(e,s),y&&y!=="none"&&(e.style.transform=y),p&&p!==""&&(e.style.opacity=p),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.style.transform="",e.style.opacity="",Ce(e,a),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0)));let x;if(typeof i=="number"?x=i:i&&typeof i=="object"&&"enter"in i&&(x=i.enter),await Ht(e,x),_e(e,c),r?.onAfterEnter)try{r.onAfterEnter(e)}catch(d){H("Transition onAfterEnter error:",d)}}async function it(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeLeave)try{r.onBeforeLeave(e)}catch(y){H("Transition onBeforeLeave error:",y)}if(!o)return r?.onLeave?new Promise(y=>{r.onLeave(e,()=>{if(r?.onAfterLeave)try{r.onAfterLeave(e)}catch(p){H("Transition onAfterLeave error:",p)}y()})}):void 0;const s=Ee(n?.leaveFrom),c=Ee(n?.leaveActive),a=Ee(n?.leaveTo);Ce(e,s),e.offsetHeight,Ce(e,c);let u;if(r?.onLeave){const y=new Promise(p=>{u=p});try{r.onLeave(e,()=>{u&&u()})}catch(p){H("Transition onLeave error:",p)}u&&await y}await new Promise(y=>requestAnimationFrame(()=>y(void 0))),await Sn(e,[...s,...c]),_e(e,s),Ce(e,a);let m;if(typeof i=="number"?m=i:i&&typeof i=="object"&&"leave"in i&&(m=i.leave),await Ht(e,m),_e(e,c),_e(e,a),_e(e,s),r?.onAfterLeave)try{r.onAfterLeave(e)}catch(y){H("Transition onAfterLeave error:",y)}}const It=new WeakMap,Ft=new WeakMap;function Je(e){if(!e)return;const t=It.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n.key!=null)return n.key}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function te(e,t){try{It.set(e,t)}catch{}try{e.key=t}catch{}try{e instanceof Element&&e.setAttribute("data-anchor-key",String(t))}catch{}}function Tn(e){if(!e)return;const t=Ft.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function jn(e,t){try{Ft.set(e,t)}catch{}try{e._transitionGroup=t}catch{}}function oe(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function Se(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?D(e)||"value"in e?!!e.value:!1:!!e}function ve(e,t){if(!t||!(e instanceof HTMLElement))return;ae.cleanup(e);for(const r in t)t[r]===e&&delete t[r];const n=e.childNodes;for(let r=0;r<n.length;r++)ve(n[r],t)}function Pe(e,t,n){if(typeof e=="string")return;const r=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),o=e.props?.ref??(e.props?.props&&e.props.props.ref);r?r.value=t:o&&n&&(n[o]=t)}function Ln(e,t,n,r,o,i,s,c){if(!i)return;const a=t.includes("lazy"),u=t.includes("trim"),m=t.includes("number"),y=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(y){const k=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[c]:k}return J(i._state||i,e)},x=p();let d="text";s instanceof HTMLInputElement?d=r?.type||s.type||"text":s instanceof HTMLSelectElement?d="select":s instanceof HTMLTextAreaElement&&(d="textarea");const f=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,l=f?d==="checkbox"||d==="radio"?"checked":"value":c??"modelValue";if(d==="checkbox")if(Array.isArray(x))n[l]=x.includes(String(s?.getAttribute("value")??r?.value??""));else{const k=s?.getAttribute("true-value")??!0;n[l]=x===k}else if(d==="radio")n[l]=x===(r?.value??"");else if(d==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const k=Array.isArray(x)?x.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(S=>{S.selected=k.includes(S.value)})},0),n[l]=Array.isArray(x)?x:[]}else n[l]=x;else{!f&&y?n[l]=e:n[l]=x;try{const k=re(l);r&&(r[k]=x)}catch{}}const g=a||d==="checkbox"||d==="radio"||d==="select"?"change":"input",v=k=>{if(k.isComposing||o._isComposing)return;const S=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!S)return;const E=k.target;if(!E||E._modelUpdating)return;let C=E.value;if(d==="checkbox"){const $=p();if(Array.isArray($)){const b=E.getAttribute("value")??"",_=Array.from($);if(E.checked)_.includes(b)||_.push(b);else{const P=_.indexOf(b);P>-1&&_.splice(P,1)}C=_}else{const b=E.getAttribute("true-value")??!0,_=E.getAttribute("false-value")??!1;C=E.checked?b:_}}else if(d==="radio")C=E.getAttribute("value")??E.value;else if(d==="select"&&E.multiple)C=Array.from(E.selectedOptions).map($=>$.value);else if(u&&typeof C=="string"&&(C=C.trim()),m){const $=Number(C);isNaN($)||(C=$)}const w=p();if(Ge(C,w)){E._modelUpdating=!0;try{Nt(y,e,C,i,c),Ze(i,y,e,C),E&&Cn(E,l,C)}finally{setTimeout(()=>E._modelUpdating=!1,0)}}};if(f){if(o[g]){const k=o[g];s&&ae.removeListener(s,g,k)}o[g]=v}else{const k=`update:${re(l)}`,S=`update:${l}`;if(o[k]){const E=o[k];s&&ae.removeListener(s,k,E)}if(o[S]){const E=o[S];s&&ae.removeListener(s,S,E)}if(o[k]=E=>{const C=E.detail!==void 0?E.detail:E.target?.value,w=_n(y,e,i,c);if(Ge(C,w)){Nt(y,e,C,i,c),Ze(i,y,e,C);const $=E.target;$&&Dt($,l,y?e:C,y)}},y&&typeof e.value=="object"&&e.value!==null){let E=[];try{E=Reflect.ownKeys(e.value)}catch{E=Object.keys(e.value)}const C=E.filter(w=>typeof w=="string"&&!String(w).startsWith("_")&&w!=="constructor");for(const w of C){const T=`update:${re(w)}`,$=`update:${w}`;o[T]||(o[T]=b=>{const _=b.detail!==void 0?b.detail:b.target?.value,P=y?e.value[w]:J(i._state||i,e);if(!Ge(_,P))return;if(y){const R={...e.value};R[w]=_,e.value=R}else Ve(i._state||i,e,_);Ze(i,y,e,_);const A=b.currentTarget||s||b.target;A&&Dt(A,l,y?e:_,y)},o[$]=o[T])}}o[S]=o[k]}(d==="text"||d==="textarea")&&(o.compositionstart=(()=>o._isComposing=!0),o.compositionend=k=>{o._isComposing=!1;const S=k.target;S&&setTimeout(()=>{const E=S.value,C=i._state||i,w=J(C,e);let T=E;if(u&&(T=T.trim()),m){const b=Number(T);isNaN(b)||(T=b)}if(Ge(T,w)){S._modelUpdating=!0;try{Ve(C,e,T),Ze(i,y,e,T)}finally{setTimeout(()=>S._modelUpdating=!1,0)}}},0)})}function Wt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function On(e,t,n,r,o){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=s;else if(i==="disabled"&&o&&oe(o)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return D(s)}catch{return!1}})()||c?t[i]=s:n[i]=s}else t[i]=s;else if(typeof e=="string"){if(!r)return;try{const i=Me(e,r);if(typeof i=="object"&&i!==null){for(const[s,c]of Object.entries(i))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")n[s]=c;else if(s==="disabled"&&o&&oe(o)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return D(c)}catch{return!1}})()||a?t[s]=c:n[s]=c}else t[s]=c;return}else{n[e]=i;return}}catch{const i=J(r,e);n[e]=i}}}function Pn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Me(e,n)}else r=e;const o=t.style||"";let i=o;if(r){if(o){const s=o.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),i=s.length>0?s.join("; ")+";":"")}}else if(o){const s=o.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),i=s.join("; ")}else i="display: none";i!==o&&(i?t.style=i:delete t.style)}function Me(e,t){return En.evaluate(e,t)}function Mn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Me(e,n)}else r=e;let o=[];if(typeof r=="string")o=[r];else if(Array.isArray(r))o=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[c,a]of Object.entries(r))a&&o.push(c);const i=t.class||"",s=o.join(" ");t.class=i?`${i} ${s}`.trim():s}function st(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const n=e.value,r=typeof n;return r==="boolean"?!0:r==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function Rn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Me(e,n)}else r=e;let o="";if(typeof r=="string")o=r;else if(r&&typeof r=="object"){const s=[];for(const[c,a]of Object.entries(r))if(a!=null&&a!==""){const u=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),m=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(a);typeof a=="number"&&m.includes(u)&&(y=`${a}px`),s.push(`${u}: ${y}`)}o=s.join("; ")+(s.length>0?";":"")}const i=t.style||"";t.style=i+(i&&!i.endsWith(";")?"; ":"")+o}function Nn(e,t,n){let r=e;typeof e=="string"&&n&&(r=Me(e,n)),D(r)?t.reactiveRef=r:t.ref=r}function Bt(e,t,n,r){const o={},i={...r||{}},s={};for(const[c,a]of Object.entries(e)){const{value:u,modifiers:m,arg:y}=a;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),x=p.length>1?p[1]:y;Ln(u,m,o,i,s,t,n,x);continue}switch(c){case"bind":On(u,o,i,t,n);break;case"show":Pn(u,i,t);break;case"class":Mn(u,i,t);break;case"style":Rn(u,i,t);break;case"ref":Nn(u,o,t);break}}try{if(Object.prototype.hasOwnProperty.call(o,"disabled")&&n&&oe(n)){const a=o.disabled,u=a&&typeof a=="object"&&"value"in a;let m=!1;try{m=D(a)}catch{m=!1}if(!u&&!m)try{i.disabled=a,delete o.disabled;const y=globalThis;y.__VDOM_DISABLED_PROMOTIONS||(y.__VDOM_DISABLED_PROMOTIONS=[]),y.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:o,attrs:i,listeners:s}}function at(e,t){if(Array.isArray(e)){const i=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const y=s.tag||"node",x=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(d=>d!=null)??"";c=x?`${t}:${y}:${x}`:`${t}:${y}`}let a=c,u=1;for(;i.has(a);)a=`${c}#${u++}`;i.add(a);let m=s.children;return Array.isArray(m)&&(m=at(m,a)),{...s,key:a,children:m}})}const n=e;let r=n.props?.key??n.key??t,o=n.children;return Array.isArray(o)&&(o=at(o,r)),{...n,key:r,children:o}}function Ut(e,t,n,r){const o=n.directives??{},i=Bt(o,r,e,n.attrs),s={...t.props,...n.props,...i.props},c={...t.attrs,...n.attrs,...i.attrs},a=t.props??{},u=s,m=n?.isCustomElement??t?.isCustomElement??!1;let y=!1;for(const d in{...a,...u}){const f=a[d],h=u[d];let l=f,g=h;if(M(()=>{(D(f)||f&&typeof f=="object"&&"value"in f)&&(l=f.value)}),M(()=>{(D(h)||h&&typeof h=="object"&&"value"in h)&&(g=h.value)}),!(f===h&&l===g))if(y=!0,d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const v=typeof h=="object"&&h!==null&&D(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.value!==v&&(e.value=v??"")}else if(d==="checked"&&e instanceof HTMLInputElement){const v=typeof h=="object"&&h!==null&&D(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.checked=!!v}else if(d.startsWith("on")&&typeof h=="function"){const v=Wt(d);typeof f=="function"&&ae.removeListener(e,v,f),ae.addListener(e,v,h);try{if(v&&v.startsWith("update:")){const k=v.split(":",2)[1],S=u[k];let E=[];try{if(D(S)){const w=S.value;E=w&&typeof w=="object"?Object.keys(w):[]}else S&&typeof S=="object"&&(E=Object.keys(S))}catch{E=[]}const C=E.filter(w=>typeof w=="string"&&!w.startsWith("_")&&w!=="constructor");for(const w of C){const T=`update:${w}`,$=b=>{const _=b.detail!==void 0?b.detail:b.target?.value,j={...D(S)?S.value||{}:u[k]||{},[w]:_};M(()=>{h({detail:j})})};M(()=>{ae.addListener(e,T,$)})}}}catch{}}else if(h==null)e.removeAttribute(d);else{const v=n?.isCustomElement??t?.isCustomElement??!1;if(v||d in e)try{e[d]=h,d==="disabled"&&h===!1&&!v&&oe(e)&&e.removeAttribute("disabled")}catch{}else h===!1&&e.removeAttribute(d)}}for(const[d,f]of Object.entries(i.listeners||{})){ae.addListener(e,d,f);try{const h=e&&e.parentElement;h&&h!==e&&ae.addListener(h,d,f)}catch{}}const p=t.attrs??{},x=c;for(const d in{...p,...x}){const f=p[d],h=x[d];let l=f,g=h;if(D(f)&&(l=f.value),D(h)&&(g=h.value),l!==g)if(y=!0,g==null||g===!1)M(()=>{e.removeAttribute(d)}),d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?M(()=>{e.value=""}):e instanceof HTMLSelectElement?M(()=>{e.value=""}):e instanceof HTMLProgressElement&&M(()=>{e.value=0})),d==="checked"&&e instanceof HTMLInputElement&&M(()=>{e.checked=!1}),d==="disabled"&&oe(e)&&M(()=>{e.disabled=!1});else{if(d==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){M(()=>{e.value=g??""});continue}else if(e instanceof HTMLSelectElement){M(()=>{e.value=g??""});continue}else if(e instanceof HTMLProgressElement){M(()=>{e.value=Number(g)});continue}}if(d==="checked"&&e instanceof HTMLInputElement){M(()=>{e.checked=!!g});continue}if(d==="style"){e.setAttribute(d,String(g));continue}if(d==="disabled"&&oe(e)){M(()=>{e.disabled=Se(g)}),Se(g)?M(()=>{e.setAttribute(d,"")}):M(()=>{e.removeAttribute(d)});continue}const v=e.namespaceURI==="http://www.w3.org/2000/svg";if(m&&!v&&d.includes("-")){const k=rt(d);try{D(h)?e[k]=h:e[k]=g}catch{e.setAttribute(d,String(g))}}else if(!v&&d in e)try{D(h)?e[d]=h:e[d]=g}catch{e.setAttribute(d,String(g))}else e.setAttribute(d,String(g))}}try{if(oe(e)){const d=s.disabled;let f;try{const l=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),g=d&&typeof d=="object"&&"value"in d;let v=!1;M(()=>{v=!!D(d)});const k=st(d);v||g||l||k?f=d:f=c.disabled}catch{f=c.disabled}const h=Se(f);M(()=>{e.disabled=h}),M(h?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}m&&y&&(M(()=>{e._applyProps?.(e._cfg)}),M(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function ne(e,t,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const p=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&te(p,e.key),p}if(e.tag==="#raw"){const p=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(p)}if(e.tag==="#anchor"){const p=e,x=Array.isArray(p.children)?p.children:[],d=document.createTextNode(""),f=document.createTextNode("");p.key!=null&&(te(d,`${p.key}:start`),te(f,`${p.key}:end`)),p._startNode=d,p._endNode=f;const h=document.createDocumentFragment();h.appendChild(d);for(const l of x){const g=ne(l,t);if(p.key!=null&&g instanceof Element&&!g.hasAttribute("data-anchor-key")){const v=l;v&&typeof v=="object"&&v.key!=null||te(g,p.key)}h.appendChild(g)}return h.appendChild(f),h}const r=document.createElement(e.tag);e.key!=null&&te(r,e.key),e.props&&e.props._transitionGroup&&jn(r,e.props._transitionGroup);const{props:o={},attrs:i={},directives:s={}}=e.props??{},c=Bt(s,t,r,i),a={...o,...c.props},u={...i,...c.attrs};try{if(a.disabled!==void 0&&r&&oe(r)){const p=a.disabled,x=p&&typeof p=="object"&&"value"in p;let d=!1;try{d=D(p)}catch{d=!1}!x&&!d&&M(()=>{u.disabled=p,delete a.disabled;const f=globalThis;f.__VDOM_DISABLED_PROMOTIONS||(f.__VDOM_DISABLED_PROMOTIONS=[]),f.__VDOM_DISABLED_PROMOTIONS.push({phase:"createElement:move-prop-to-attr",location:"attrs",key:"disabled",value:p,time:Date.now(),stack:new Error().stack})})}}catch{}const m=r.namespaceURI==="http://www.w3.org/2000/svg";for(const p in u){const x=u[p];if(typeof p!="string"||/\[object Object\]/.test(p))continue;const d=typeof x=="object"&&x!==null&&D(x)||x&&typeof x=="object"&&"value"in x?x.value:x;if(typeof d=="boolean")d?r.setAttribute(p,""):M(()=>{r.removeAttribute(p)});else if(d!=null){if(p==="disabled"&&oe(r)){const f=a.disabled,h=st(f)?f:d,l=Se(h);M(()=>{r.disabled=l}),M(l?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}if(!m&&p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement||r instanceof HTMLProgressElement))try{r instanceof HTMLProgressElement?r.value=Number(d):r.value=d??""}catch{r.setAttribute(p,String(d))}else if(!m&&p==="checked"&&r instanceof HTMLInputElement)try{r.checked=!!d}catch{r.setAttribute(p,String(d))}else if(!m&&p in r)try{r[p]=d,p==="disabled"&&d===!1&&oe(r)&&r.removeAttribute("disabled")}catch{r.setAttribute(p,String(d))}else if((e.props?.isCustomElement??!1)&&!m&&p.includes("-")){const h=rt(p);try{r[h]=d}catch{r.setAttribute(p,String(d))}}else r.setAttribute(p,String(d))}}for(const p in a){const x=a[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)){const d=typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;M(()=>{r.value=d??""})}else if(p.startsWith("on")&&typeof x=="function"){const d=Wt(p),f=d.includes(":")?(()=>{const h=d.split(":"),l=h[1];if(l.includes("-")){const g=l.split("-").map((v,k)=>k===0?v:v.charAt(0).toUpperCase()+v.slice(1)).join("");return`${h[0]}:${g}`}else{const g=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${g}`}})():d;c.listeners&&(c.listeners[d]||c.listeners[f])||ae.addListener(r,d,x)}else{if(p.startsWith("on")&&x===void 0)continue;if(x==null||x===!1)r.removeAttribute(p);else if((e.props?.isCustomElement??!1)||p in r)try{const f=typeof x=="object"&&x!==null&&D(x)?x:typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;if(p==="disabled"&&oe(r)){const h=a.disabled!==void 0?a.disabled:f,l=Se(h);M(()=>{r.disabled=l}),M(l?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}try{if(typeof r[p]=="boolean"){let l=f;typeof f=="string"?f==="false"?l=!1:f==="true"?l=!0:l=!!f&&f!=="":l=!!f,r[p]=l}else r[p]=f}catch{r[p]=f}}catch{}}}for(const[p,x]of Object.entries(c.listeners||{}))ae.addListener(r,p,x);const y={...e,props:{...e.props,...c.props}};Pe(y,r,n);try{if(typeof r._applyProps=="function")try{r._applyProps(r._cfg)}catch{}typeof r.requestRender=="function"?r.requestRender():typeof r._render=="function"&&r._render(r._cfg)}catch{}if(Array.isArray(e.children))for(const p of e.children)r.appendChild(ne(p,t,n));else typeof e.children=="string"&&(r.textContent=e.children);try{if(r instanceof HTMLSelectElement&&u&&u.hasOwnProperty("value"))try{r.value=u.value??""}catch{}}catch{}try{if(oe(r)){const p=a.disabled,x=u.disabled,d=p&&typeof p=="object"&&"value"in p;let f=!1;try{f=!!D(p)}catch{f=!1}const l=f||d||st(p)?p:x,g=Se(l);M(()=>{r.disabled=g}),M(g?()=>{r.setAttribute("disabled","")}:()=>{r.removeAttribute("disabled")})}}catch{}return r}function Dn(e,t,n,r,o){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const i=e.childNodes,s=[];for(let f=0;f<i.length;f++)s.push(i[f]);const c=Array.isArray(t)?t:[],a=Tn(e);if(a){const f=v=>typeof v=="string"&&v.startsWith("each-")?v.substring(5):v,h=[],l=[];for(const v of n)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const S of k){const E=f(S.key||v.key||"unknown");h.push({...S,key:E})}}else v&&h.push({...v,key:f(v.key)});for(const v of c)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const S of k){const E=f(S.key||v.key||"unknown");l.push({...S,key:E})}}else v&&l.push({...v,key:f(v.key)});if(h.some(v=>v&&v.key!=null)||l.some(v=>v&&v.key!=null)){const v=new Map,k=new Map;for(const $ of l)if($&&$.key!=null){const b=String($.key);v.set(b,$)}for(let $=0;$<s.length;$++){const b=s[$];let _=Je(b);if(_=f(_),_!=null&&b instanceof Element&&b.nodeType===Node.ELEMENT_NODE){let P=typeof _=="string"&&_.includes(":")?_.substring(0,_.lastIndexOf(":")):_;P=String(P),k.set(P,b)}}const S=new Set,E=new Map,C=s.length>0;if(a.moveClass&&C)for(let $=0;$<s.length;$++){const b=s[$];if(b instanceof HTMLElement&&b.parentElement){const _=b.getBoundingClientRect();E.set(b,_)}}const w=[];for(const $ of h){let b=$.key;if(b==null)continue;b=String(b);const _=v.get(b);let P=k.get(b);if(P&&_){const j=Re(P,_,$,r);S.add(P);const A=String(b);te(j,A),w.push({node:j,key:b,newVNode:$,oldVNode:_,isNew:!1})}else{P=ne($,r),te(P,b),e.appendChild(P);const j=C||a.appear===!0;P instanceof HTMLElement&&j&&Oe(P,a).catch(A=>{H("Enter transition error:",A)}),w.push({node:P,key:b,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const b=s[$],_=Je(b);if(!S.has(b)&&_!=null&&b instanceof HTMLElement){const j=it(b,a).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(A=>{H("Leave transition error:",A),e.contains(b)&&e.removeChild(b)});T.push(j)}}if(T.length===0){let $=e.firstChild;for(const{node:b}of w)b!==$&&e.insertBefore(b,$),$=b.nextSibling;if(a.moveClass&&E.size>0){const b=[];for(const{node:_,isNew:P}of w)if(!P&&_ instanceof HTMLElement){const j=E.get(_);if(j){const A=_.getBoundingClientRect(),R=j.left-A.left,N=j.top-A.top;if(R!==0||N!==0){const pe=a.moveClass.split(/\s+/).filter(Z=>Z);b.push({node:_,deltaX:R,deltaY:N,moveClasses:pe})}}}if(b.length>0){for(const{node:_,deltaX:P,deltaY:j}of b)_.style.transform=`translate(${P}px, ${j}px)`,_.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:_,moveClasses:P}of b)for(const j of P)_.classList.add(j);requestAnimationFrame(()=>{const _=a.moveClass||"",P=_.match(/duration-(\d+)/),j=P?`${P[1]}ms`:"300ms",A=_.match(/ease-(out|in|in-out|linear)/),R=A?`ease-${A[1]}`:"ease-out";for(const{node:N}of b)N.style.transition=`transform ${j} ${R}`;requestAnimationFrame(()=>{for(const{node:N,moveClasses:pe}of b){N.style.removeProperty("transform");const Z=()=>{for(const q of pe)N.classList.remove(q);N.style.removeProperty("transition"),N.removeEventListener("transitionend",Z),N.removeEventListener("transitioncancel",Z)};N.addEventListener("transitionend",Z,{once:!0}),N.addEventListener("transitioncancel",Z,{once:!0})}})})})})}}}return}}const u=new Map;for(const f of c)f&&f.key!=null&&u.set(f.key,f);const m=new Map;for(let f=0;f<s.length;f++){const h=s[f],l=Je(h);l!=null&&m.set(l,h)}const y=new Set;let p=e.firstChild;function x(f,h){let l=f;for(;l&&(y.add(l),l!==h);)l=l.nextSibling}function d(f,h,l,g,v,k=!0){const S=[];let E=f.nextSibling;for(;E&&E!==h;)S.push(E),E=E.nextSibling;const C=Array.isArray(l)?l:[];if(g.some(T=>T&&T.key!=null)||C.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const j of C)j&&j.key!=null&&T.set(j.key,j);for(const j of S){const A=Je(j);A!=null&&$.set(A,j)}const b=v&&v.state==="visible"&&C.length===0&&g.length>0,_=new Set;let P=f.nextSibling;for(const j of g){let A;if(j.key!=null&&$.has(j.key)){const R=T.get(j.key);A=Re($.get(j.key),R,j,r),_.add(A),v&&A instanceof HTMLElement&&b&&v.appear&&Oe(A,v).catch(N=>{H("Transition enter error (appear):",N)}),A!==P&&e.contains(A)&&e.insertBefore(A,P)}else A=ne(j,r),e.insertBefore(A,P),_.add(A),v&&A instanceof HTMLElement&&k&&Oe(A,v).catch(R=>{H("Transition enter error:",R)});P=A.nextSibling}for(const j of S)!_.has(j)&&e.contains(j)&&(v&&j instanceof HTMLElement&&k?it(j,v).then(()=>{e.contains(j)&&e.removeChild(j)}).catch(A=>{H("Transition leave error:",A),e.contains(j)&&e.removeChild(j)}):e.removeChild(j))}else{const T=Math.min(C.length,g.length);for(let $=0;$<T;$++){const b=C[$],_=g[$],P=Re(S[$],b,_,r);P!==S[$]&&(e.insertBefore(P,S[$]),e.removeChild(S[$]))}for(let $=T;$<g.length;$++){const b=ne(g[$],r);e.insertBefore(b,h),v&&b instanceof HTMLElement&&k&&Oe(b,v).catch(_=>{H("Transition enter error:",_)})}for(let $=T;$<S.length;$++){const b=S[$];v&&b instanceof HTMLElement&&k?it(b,v).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(_=>{H("Transition leave error:",_),e.contains(b)&&e.removeChild(b)}):e.removeChild(b)}}}for(const f of n){let h;if(f.tag==="#anchor"){const l=f.key,g=`${l}:start`,v=`${l}:end`;let k=m.get(g),S=m.get(v);const E=Array.isArray(f.children)?f.children:[];if(k||(k=document.createTextNode(""),te(k,g)),S||(S=document.createTextNode(""),te(S,v)),f._startNode=k,f._endNode=S,!e.contains(k)||!e.contains(S)){e.insertBefore(k,p);const C=f._transition,T=!(C&&C.state==="visible"&&E.length>0)||C.appear;for(const $ of E){const b=ne($,r);e.insertBefore(b,p),C&&b instanceof HTMLElement&&T&&Oe(b,C).catch(_=>{H("Transition enter error:",_)})}e.insertBefore(S,p)}else{const C=f._transition,T=u.get(l)?._transition,$=T&&T.state!==C?.state,b=C&&C.state==="visible"&&E.length>0&&!$,_=$||!b||C?.appear===!0;d(k,S,u.get(l)?.children,E,C,_)}x(k,S),p=S.nextSibling;continue}if(f.key!=null&&m.has(f.key)){const l=u.get(f.key);h=Re(m.get(f.key),l,f,r,o),y.add(h),h!==p&&e.contains(h)&&(p&&!e.contains(p)&&(p=null),e.insertBefore(h,p))}else h=ne(f,r,o),p&&!e.contains(p)&&(p=null),e.insertBefore(h,p),y.add(h);p=h.nextSibling}for(let f=0;f<s.length;f++){const h=s[f];!y.has(h)&&e.contains(h)&&(ve(h,o),e.removeChild(h))}}function Re(e,t,n,r,o){if(t&&typeof t!="string"&&t.props?.ref&&o&&ve(e,o),t===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const s=document.createTextNode(n);return e.parentNode?.replaceChild(s,e),s}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const s=n,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),u=s._endNode??document.createTextNode("");s.key!=null&&(te(a,`${s.key}:start`),te(u,`${s.key}:end`)),s._startNode=a,s._endNode=u;const m=document.createDocumentFragment();m.appendChild(a);for(const y of c){const p=ne(y,r);m.appendChild(p)}return m.appendChild(u),e.parentNode?.replaceChild(m,e),a}if(!n){ve(e,o);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){ve(e,o);const s=ne(n,r,o);return Pe(n,s,o),e.parentNode?.replaceChild(s,e),s}if(n.tag==="#anchor"){const s=Array.isArray(n.children)?n.children:[],c=n._startNode??document.createTextNode(""),a=n._endNode??document.createTextNode("");n.key!=null&&(te(c,`${n.key}:start`),te(a,`${n.key}:end`)),n._startNode=c,n._endNode=a;const u=document.createDocumentFragment();u.appendChild(c);for(const m of s)u.appendChild(ne(m,r));return u.appendChild(a),e.parentNode?.replaceChild(u,e),c}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&t.key===n.key){const s=e;return Ut(s,t.props||{},n.props||{},r),Dn(s,t.children,n.children,r,o),Pe(n,s,o),s}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&(t.tag&&String(t.tag).includes("-")||n.props&&n.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return Ut(c,t.props||{},n.props||{},r),Pe(n,c,o),c}catch{}ve(e,o);const i=ne(n,r,o);return Pe(n,i,o),e.parentNode?.replaceChild(i,e),i}function Hn(e,t,n,r){let o;Array.isArray(t)?t.length===1?(o=t[0],o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})):o={tag:"div",key:"__root__",children:t}:(o=t,o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})),o&&typeof o=="object"&&o.tag==="#anchor"&&(o={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[o]}),o=at(o,String(o.key??"root"));const i=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let c;i&&s?typeof i!="string"&&typeof o!="string"&&i.tag===o.tag&&i.key===o.key?c=Re(s,i,o,n,r):(c=ne(o,n,r),e.replaceChild(c,s)):(c=ne(o,n,r),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let u=0;u<e.childNodes.length;u++){const m=e.childNodes[u];m!==c&&m.nodeName!=="STYLE"&&(ve(m,r),a.push(m))}a.forEach(u=>e.removeChild(u)),e._prevVNode=o,e._prevDom=c}function Xe(e){if(typeof e=="string")return Ke(e);if(e.tag==="#text")return typeof e.children=="string"?Ke(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Xe).join("");if(e.tag==="#raw")return typeof e.children=="string"?e.children:"";let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([r,o])=>` ${r}="${Ke(String(o))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Xe).join(""):typeof e.children=="string"?Ke(e.children):e.children?Xe(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}function zt(e,...t){let n="";for(let r=0;r<e.length;r++)n+=e[r],r<t.length&&(n+=t[r]);return n}function qt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ye=null;function Kt(){return Ye||(Ye=new CSSStyleSheet,Ye.replaceSync(qt(Fn))),Ye}function In(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Fn=zt`
|
|
5
5
|
:host,
|
|
6
6
|
*,
|
|
7
7
|
::before,
|
|
@@ -20,15 +20,17 @@
|
|
|
20
20
|
:host {
|
|
21
21
|
display: contents;
|
|
22
22
|
font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
23
|
+
/* Default CE line-height variable so leading-* can reliably override */
|
|
24
|
+
--ce-line-height: 1.5;
|
|
23
25
|
-webkit-text-size-adjust: 100%;
|
|
24
26
|
text-size-adjust: 100%;
|
|
25
27
|
/* Default gradient variables to avoid undefined var() usage in generated utilities */
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
--
|
|
31
|
-
--
|
|
28
|
+
--ce-gradient-from-position: 0%;
|
|
29
|
+
--ce-gradient-to-position: 100%;
|
|
30
|
+
--ce-gradient-via-position: 50%;
|
|
31
|
+
--ce-gradient-from: rgba(255,255,255,0);
|
|
32
|
+
--ce-gradient-to: rgba(255,255,255,0);
|
|
33
|
+
--ce-gradient-stops: var(--ce-gradient-from), var(--ce-gradient-to);
|
|
32
34
|
}
|
|
33
35
|
button,
|
|
34
36
|
input,
|
|
@@ -112,36 +114,36 @@
|
|
|
112
114
|
[hidden] {
|
|
113
115
|
display: none;
|
|
114
116
|
}
|
|
115
|
-
`,Pt=Object.fromEntries(Object.entries({neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}}).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,n])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${n})`]))])),fe="0.25rem",$n={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},it={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},ot=(()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","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;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","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;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","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;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,f,b])=>{e[a]=`font-size:${f};line-height:${b};`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,f])=>{e[a]=`letter-spacing:${f};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,f])=>{e[a]=`line-height:${f};`});const o=[0,1,2,4,6,8];for(const a of o){const f=`${a}px`;e[`border-${a}`]=`border-width:${f};`,e[`border-t-${a}`]=`border-top-width:${f};`,e[`border-r-${a}`]=`border-right-width:${f};`,e[`border-b-${a}`]=`border-bottom-width:${f};`,e[`border-l-${a}`]=`border-left-width:${f};`,e[`border-x-${a}`]=`border-left-width:${f};border-right-width:${f};`,e[`border-y-${a}`]=`border-top-width:${f};border-bottom-width:${f};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,f]of Object.entries(s)){const b=f===9999?"9999px":`${f/16}rem`;e[`rounded-${a}`]=`border-radius:${b};`,e[`rounded-t-${a}`]=`border-top-left-radius:${b};border-top-right-radius:${b};`,e[`rounded-r-${a}`]=`border-top-right-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-l-${a}`]=`border-top-left-radius:${b};border-bottom-left-radius:${b};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${b};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${b};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${b};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${b};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"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;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,f]of Object.entries($n))e[`max-w-${a}`]=`max-width:calc(${fe} * ${f});`,e[`min-w-${a}`]=`min-width:calc(${fe} * ${f});`,e[`w-${a}`]=`width:calc(${fe} * ${f});`,e[`max-h-${a}`]=`max-height:calc(${fe} * ${f});`,e[`min-h-${a}`]=`min-height:calc(${fe} * ${f});`,e[`h-${a}`]=`height:calc(${fe} * ${f});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--tw-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--tw-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--tw-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--tw-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--tw-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--tw-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--tw-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--tw-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--tw-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--tw-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--tw-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--tw-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--tw-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--tw-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--tw-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--tw-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--tw-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--tw-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--tw-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--tw-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--tw-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--tw-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--tw-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--tw-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--tw-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--tw-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--tw-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--tw-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--tw-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--tw-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--tw-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--tw-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--tw-gradient-stops));"}),e})();function ne(e,t){let r=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="["||i==="(")r++;else if((i==="]"||i===")")&&r>0)r--;else if(r===0&&(i===">"||i==="+"||i==="~"||i===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const Cn={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${ne(e,":hover")}{${t}}`,focus:(e,t)=>`${ne(e,":focus")}{${t}}`,active:(e,t)=>`${ne(e,":active")}{${t}}`,disabled:(e,t)=>`${ne(e,":disabled")}{${t}}`,visited:(e,t)=>`${ne(e,":visited")}{${t}}`,checked:(e,t)=>`${ne(e,":checked")}{${t}}`,first:(e,t)=>`${ne(e,":first-child")}{${t}}`,last:(e,t)=>`${ne(e,":last-child")}{${t}}`,odd:(e,t)=>`${ne(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${ne(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${ne(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${ne(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},st={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Rt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},at=["sm","md","lg","xl","2xl"],ct=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function lt(e){const t=e.startsWith("-"),r=t?e.slice(1):e,n=r.lastIndexOf("-");if(n===-1)return null;const i=r.slice(0,n),o=r.slice(n+1);if(!it[i])return null;if(o.includes("/")){const[a,f]=o.split("/").map(m=>parseFloat(m));if(Number.isNaN(a)||Number.isNaN(f)||f===0)return null;const b=a/f*100;return it[i].map(m=>`${m}:${b}%;`).join("")}const s=parseFloat(o);if(Number.isNaN(s))return null;const c=t?"-":"";return it[i].map(a=>`${a}:calc(${c}${fe} * ${s});`).join("")}function ut(e){const t=e.startsWith("-"),n=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!n)return null;const[,i,o]=n,s=i==="x";if(o==="reverse")return s?"--tw-space-x-reverse:1;":"--tw-space-y-reverse:1;";if(o.includes("/")){const[b,m]=o.split("/").map(u=>parseFloat(u));if(Number.isNaN(b)||Number.isNaN(m)||m===0)return null;const d=b/m*100,x=t?"-":"";return s?`--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${x}${d}% * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${x}${d}% * var(--tw-space-x-reverse));}`:`--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${x}${d}% * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${x}${d}% * var(--tw-space-y-reverse));}`}const c=parseFloat(o);if(Number.isNaN(c))return null;const f=`calc(${t?"-":""}${fe} * ${c})`;return s?`--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${f} * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${f} * var(--tw-space-x-reverse));}`:`--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${f} * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${f} * var(--tw-space-y-reverse));}`}function Mt(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const En=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,_n={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function Sn(e){const t=En.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,o=Pt[n]?.[i];if(!o)return null;if(r==="shadow")return`--ce-shadow-color:${o};`;const s=_n[r];return s?`${s}:${o};`:null}function An(e){const t=e.indexOf("/");if(t===-1)return{base:e};const r=e.slice(0,t),n=e.slice(t+1),i=parseInt(n,10);return isNaN(i)||i<0||i>100?{base:r}:{base:r,opacity:i/100}}function ft(e){const{base:t,opacity:r}=An(e),n=Sn(t);if(n&&r!==void 0){const o=/#([0-9a-f]{6})/i.exec(n);if(o){const s=Mt(o[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}if(n)return n;const i=Ge(t);if(i&&r!==void 0){const o=/#([0-9a-f]{6})/i.exec(i);if(o){const s=Mt(o[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}return i}function dt(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,o=Pt[n]?.[i];if(!o)return null;switch(r){case"from":return`--tw-gradient-from:${o} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;case"to":return`--tw-gradient-to:${o} var(--tw-gradient-to-position);`;case"via":return`--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${o} var(--tw-gradient-via-position), var(--tw-gradient-to);`;default:return null}}function pt(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function Ge(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let f=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(f=f.replace(/_/g," "),f=f.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),f=f.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${f};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const r=e.slice(0,t);let n=e.slice(t+2,-1).replace(/_/g," ");const i={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(r==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n)?`font-size:${n};`:`color:${n};`;if(r==="rotate")return`transform:rotate(${n});`;if(r==="scale")return`transform:scale(${n});`;if(r==="translate-x")return`transform:translateX(${n});`;if(r==="translate-y")return`transform:translateY(${n});`;const o=i[r]??r.replace(/_/g,"-");return o&&n?`${o}:${n};`:null}function Tn(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function Nt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function On(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,r=[];let n;for(;n=t.exec(e);){const i=n[2].split(/\s+/).filter(Boolean);i.length&&r.push(...i)}return r}const Re=new Map,jn=16,Dt=1e3;function Ht(e){const t=Date.now(),r=Re.get(e);if(r&&t-r.timestamp<jn)return r.css;const n=On(e);if(!n.length)return"";const i=new Set(n),o=[[],[],[],[]],s={},c=(p,h=!1)=>{const l=h?`dark|${p}`:p;if(l in s)return s[l];const y=m(p,h);return s[l]=y,y},a=p=>{const h=p.some(w=>at.includes(w)),l=p.some(w=>w.startsWith("@")&&(ct.includes(w.slice(1))||w.match(/^@\[.+\]$/))),y=p.includes("dark");return p.length?!h&&!y&&!l?1:y&&(h||l)?3:2:0},f=p=>{const h=[];let l="",y=0;for(let w=0;w<p.length;w++){const k=p[w];k==="["||k==="("?y++:(k==="]"||k===")")&&y--,k===":"&&y===0?(h.push(l),l=""):l+=k}return l&&h.push(l),h},b={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},m=(p,h=!1)=>{const l=f(p);let y="",w=!1;for(const j of l){let B=j;if(B.startsWith("!")&&(w=!0,B=B.slice(1)),ot[B]||lt(B)||ut(B)||pt(B)||ft(B)||dt(B)||Ge(B)){y=j;break}}if(!y)return null;const k=y.replace(/^!/,""),_=ot[k]??lt(k)??ut(k)??pt(k)??ft(k)??dt(k)??Ge(k);if(!_)return null;const C=l.indexOf(y);let g=C>=0?l.slice(0,C):[];h&&(g=g.filter(j=>j!=="dark"));const A=`.${Nt(p)}`,T=w?_.replace(/;/g," !important;"):_,$="__SUBJECT__";let v=$;const S=[];for(const j of g)j.startsWith("group-")?(v=`.group:${j.slice(6)} ${v}`,S.push(j)):j.startsWith("peer-")&&(v=v.replace($,`.peer:${j.slice(5)}~${$}`),S.push(j));g=g.filter(j=>!S.includes(j));const L=[],E=[];let O=null;for(const j of g){if(j==="dark"||at.includes(j)||j.startsWith("@")&&(ct.includes(j.slice(1))||j.match(/^@\[.+\]$/)))continue;const B=Tn(j);if(B){O=B;continue}const z=b[j];if(z){O?E.push(z):L.push(z);continue}const J=Cn[j];typeof J=="function"&&(v=J(v,T).split("{")[0])}const M=L.join(""),F=E.join("");function pe(j,B){if(!B)return j;let z=0,J=0;if(j.length&&(j[0]===">"||j[0]==="+"||j[0]==="~"||j[0]===" ")){let U=1;for(;U<j.length&&j[U]===" ";)U++;for(;U<j.length;U++){const X=j[U];if(X==="["?z++:X==="]"&&z>0?z--:X==="("?J++:X===")"&&J>0&&J--,z===0&&J===0&&(j[U]===">"||j[U]==="+"||j[U]==="~"||j[U]===" "))return j.slice(0,U)+B+j.slice(U)}return j+B}for(let U=0;U<j.length;U++){const X=j[U];if(X==="["?z++:X==="]"&&z>0?z--:X==="("?J++:X===")"&&J>0&&J--,z===0&&J===0&&(X===">"||X==="+"||X==="~"||X===" "))return j.slice(0,U)+B+j.slice(U)}return j+B}if(O)if(O.includes("&")){const j=O.indexOf("&"),B=O.slice(0,j),z=O.slice(j+1),J=$+M;if(L.length===0)v=v.replace($,B+J+F+z);else{const U=pe(z,F);v=v.replace($,B+J+U)}}else v=v.replace($,`${O}${$+M}`),F&&(v=v.replace($,`${$}${F}`));else v=v.replace($,$+M+F);v=v.replace(new RegExp($,"g"),A);let H=`${v}{${T}}`;const D=g.filter(j=>at.includes(j)),V=g.filter(j=>j.startsWith("@")&&(ct.includes(j.slice(1))||j.match(/^@\[.+\]$/))),ce=D.length?D[D.length-1]:null,he=V.length?V[V.length-1]:null,q=g.includes("dark");let se="",ue="";if(q&&ce?se=`@media (prefers-color-scheme: dark) and ${st[ce]}`:q?se="@media (prefers-color-scheme: dark)":ce&&(se=`@media ${st[ce]}`),he)if(he.startsWith("@[")&&he.endsWith("]")){const j=he.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(j))return null;ue=`@container (min-width:${j})`}else{const j=he.slice(1);ue=`@container ${Rt[j]||`(min-width:${j})`}`}return se&&ue?H=`${se}${ue}{${H}}`:se?H=`${se}{${H}}`:ue&&(H=`${ue}{${H}}`),H};for(const p of i){const h=f(p),l=h.find(C=>ot[C.replace(/^!/,"")]||lt(C.replace(/^!/,""))||ut(C.replace(/^!/,""))||pt(C.replace(/^!/,""))||ft(C.replace(/^!/,""))||dt(C.replace(/^!/,""))||Ge(C.replace(/^!/,"")));if(!l)continue;const y=h.indexOf(l),w=y>=0?h.slice(0,y):[],k=a(w),_=c(p);_&&o[k].push(_)}const d=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const p of i)if(d.test(p)){if(o.flat().join("").includes(`.${Nt(p)}`))continue;const l=c(p);l&&o[0].push(l)}const x=p=>p.sort((h,l)=>{const y=A=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,v]of Object.entries(T))if(A.includes(`@media ${st[$]}`))return v;return-1},w=A=>{const T={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[$,v]of Object.entries(T))if(A.includes(`@container ${Rt[$]}`))return v;if(A.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(A);if($){const v=parseFloat($[1]),S=$[2];return S==="rem"||S==="em"?v*16:v}}return-1},k=y(h),_=y(l),C=w(h),g=w(l);return k>=0&&_>=0&&k!==_?k-_:C>=0&&g>=0&&C!==g?C-g:0});o[2]=x(o[2]),o[3]=x(o[3]);const u=o.flat().join("");return Re.size>=Dt&&Array.from(Re.keys()).slice(0,Math.floor(Dt/2)).forEach(h=>Re.delete(h)),Re.set(e,{css:u,timestamp:t}),u}function Me(e,t){return K(e?t:[],"when-block")}function Ln(e,t){return e.map((r,n)=>{const i=typeof r=="object"?r?.key??r?.id??`idx-${n}`:String(r);return K(t(r,n),`each-${i}`)})}function Bt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return Pn(...e)}}}function Pn(...e){for(let t=0;t<e.length;t++){const[r,n]=e[t];if(r)return[K(n,`whenChain-branch-${t}`)]}return[K([],"whenChain-empty")]}function K(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}const Ee={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function Rn(e,t){const{preset:r,show:n,mode:i="default",duration:o,appear:s=!1,css:c=!0,name:a,enterFrom:f,enterActive:b,enterTo:m,leaveFrom:d,leaveActive:x,leaveTo:u,onBeforeEnter:p,onEnter:h,onAfterEnter:l,onEnterCancelled:y,onBeforeLeave:w,onLeave:k,onAfterLeave:_,onLeaveCancelled:C}=e;let g;r&&Ee[r]?(g={...Ee[r]},f&&(g.enterFrom=f),b&&(g.enterActive=b),m&&(g.enterTo=m),d&&(g.leaveFrom=d),x&&(g.leaveActive=x),u&&(g.leaveTo=u)):g={enterFrom:f,enterActive:b,enterTo:m,leaveFrom:d,leaveActive:x,leaveTo:u};const A=a||(r?`transition-${r}`:"transition"),T=K(n?t:[],A);return T._transition={name:A,classes:g,mode:i,duration:o,appear:s,css:c,state:n?"visible":"hidden",hooks:{onBeforeEnter:p,onEnter:h,onAfterEnter:l,onEnterCancelled:y,onBeforeLeave:w,onLeave:k,onAfterLeave:_,onLeaveCancelled:C}},T}function Mn(e,t){const{tag:r="div",moveClass:n="transition-transform duration-300",preset:i,show:o=!0,mode:s="default",duration:c,appear:a=!1,css:f=!0,name:b,class:m,style:d,enterFrom:x,enterActive:u,enterTo:p,leaveFrom:h,leaveActive:l,leaveTo:y,onBeforeEnter:w,onEnter:k,onAfterEnter:_,onEnterCancelled:C,onBeforeLeave:g,onLeave:A,onAfterLeave:T,onLeaveCancelled:$}=e;let v;i&&Ee[i]?(v={...Ee[i]},x&&(v.enterFrom=x),u&&(v.enterActive=u),p&&(v.enterTo=p),h&&(v.leaveFrom=h),l&&(v.leaveActive=l),y&&(v.leaveTo=y)):v={enterFrom:x,enterActive:u,enterTo:p,leaveFrom:h,leaveActive:l,leaveTo:y};const S=b||(i?`transition-group-${i}`:"transition-group"),L=[];for(const E of o?t:[])if(E&&typeof E=="object"&&E.tag==="#anchor"){const O=Array.isArray(E.children)?E.children:[];for(const M of O)if(M&&typeof M=="object"){const F={...M,key:E.key||M.key,props:{...M.props,_anchorKey:E.key}};L.push(F)}else L.push(M)}else L.push(E);return{tag:r,children:L,key:S,props:{attrs:{...m?{class:m}:{},...d?{style:d}:{}},_transitionGroup:{name:S,classes:v,moveClass:n,mode:s,duration:c,appear:a,css:f,hooks:{onBeforeEnter:w,onEnter:k,onAfterEnter:_,onEnterCancelled:C,onBeforeLeave:g,onLeave:A,onAfterLeave:T,onLeaveCancelled:$}}}}}function Nn(e){return{...e}}let Je=null;function Xe(){if(!Je){const e=[];Object.values(Ee).forEach(n=>{n.enterFrom&&e.push(n.enterFrom),n.enterActive&&e.push(n.enterActive),n.enterTo&&e.push(n.enterTo),n.leaveFrom&&e.push(n.leaveFrom),n.leaveActive&&e.push(n.leaveActive),n.leaveTo&&e.push(n.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,r=Ht(t);Je=new CSSStyleSheet,Je.replaceSync(r)}return Je}function Dn(){Xe()}Dn();const Ne=[];function Hn(e,t,r,n,i,o,s,c){if(e){Ne.push(r);try{const a=t.render(r);if(a instanceof Promise){o(!0),a.then(f=>{o(!1),s(null),It(e,f,r,n,i),c(e.innerHTML)}).catch(f=>{o(!1),s(f)});return}It(e,a,r,n,i),c(e.innerHTML)}finally{Ne.pop()}}}function It(e,t,r,n,i){e&&(vn(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function Bn(e,t,r,n,i,o,s){if(o!==null&&clearTimeout(o),Date.now()-t<16){if(i(r+1),r===15)re(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
117
|
+
`,Vt=Object.fromEntries(Object.entries({neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}}).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([n,r])=>[n,`var(--color-${e}${n==="DEFAULT"?"":`-${n}`}, ${r})`]))])),he="0.25rem",Wn={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},ct={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},lt=(()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","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;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","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;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","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;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,u,m])=>{e[a]=`font-size:${u};line-height:var(--ce-line-height,${m});`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,u])=>{e[a]=`letter-spacing:${u};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,u])=>{e[a]=`line-height:${u};--ce-line-height:${u};line-height:var(--ce-line-height,${u});`});const i=[0,1,2,4,6,8];for(const a of i){const u=`${a}px`;e[`border-${a}`]=`border-width:${u};`,e[`border-t-${a}`]=`border-top-width:${u};`,e[`border-r-${a}`]=`border-right-width:${u};`,e[`border-b-${a}`]=`border-bottom-width:${u};`,e[`border-l-${a}`]=`border-left-width:${u};`,e[`border-x-${a}`]=`border-left-width:${u};border-right-width:${u};`,e[`border-y-${a}`]=`border-top-width:${u};border-bottom-width:${u};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,u]of Object.entries(s)){const m=u===9999?"9999px":`${u/16}rem`;e[`rounded-${a}`]=`border-radius:${m};`,e[`rounded-t-${a}`]=`border-top-left-radius:${m};border-top-right-radius:${m};`,e[`rounded-r-${a}`]=`border-top-right-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-l-${a}`]=`border-top-left-radius:${m};border-bottom-left-radius:${m};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${m};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${m};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${m};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${m};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"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;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,u]of Object.entries(Wn))e[`max-w-${a}`]=`max-width:calc(${he} * ${u});`,e[`min-w-${a}`]=`min-width:calc(${he} * ${u});`,e[`w-${a}`]=`width:calc(${he} * ${u});`,e[`max-h-${a}`]=`max-height:calc(${he} * ${u});`,e[`min-h-${a}`]=`min-height:calc(${he} * ${u});`,e[`h-${a}`]=`height:calc(${he} * ${u});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--ce-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--ce-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--ce-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--ce-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--ce-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--ce-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--ce-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--ce-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--ce-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--ce-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--ce-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--ce-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--ce-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--ce-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--ce-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--ce-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--ce-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--ce-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--ce-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--ce-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--ce-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--ce-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--ce-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--ce-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--ce-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--ce-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--ce-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--ce-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--ce-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--ce-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--ce-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--ce-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--ce-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--ce-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--ce-gradient-stops));"}),e})();function ie(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r];if(o==="["||o==="(")n++;else if((o==="]"||o===")")&&n>0)n--;else if(n===0&&(o===">"||o==="+"||o==="~"||o===" "))return e.slice(0,r)+t+e.slice(r)}return e+t}const Bn={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${ie(e,":hover")}{${t}}`,focus:(e,t)=>`${ie(e,":focus")}{${t}}`,active:(e,t)=>`${ie(e,":active")}{${t}}`,disabled:(e,t)=>`${ie(e,":disabled")}{${t}}`,visited:(e,t)=>`${ie(e,":visited")}{${t}}`,checked:(e,t)=>`${ie(e,":checked")}{${t}}`,first:(e,t)=>`${ie(e,":first-child")}{${t}}`,last:(e,t)=>`${ie(e,":last-child")}{${t}}`,odd:(e,t)=>`${ie(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${ie(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${ie(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${ie(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},ut={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Gt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},ft=["sm","md","lg","xl","2xl"],dt=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function pt(e){const t=e.startsWith("-"),n=t?e.slice(1):e,r=n.lastIndexOf("-");if(r===-1)return null;const o=n.slice(0,r),i=n.slice(r+1);if(!ct[o])return null;if(i.includes("/")){const[a,u]=i.split("/").map(y=>parseFloat(y));if(Number.isNaN(a)||Number.isNaN(u)||u===0)return null;const m=a/u*100;return ct[o].map(y=>`${y}:${m}%;`).join("")}const s=parseFloat(i);if(Number.isNaN(s))return null;const c=t?"-":"";return ct[o].map(a=>`${a}:calc(${c}${he} * ${s});`).join("")}function ht(e){const t=e.startsWith("-"),r=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!r)return null;const[,o,i]=r,s=o==="x";if(i==="reverse")return s?"--ce-space-x-reverse:1;":"--ce-space-y-reverse:1;";if(i.includes("/")){const[m,y]=i.split("/").map(d=>parseFloat(d));if(Number.isNaN(m)||Number.isNaN(y)||y===0)return null;const p=m/y*100,x=t?"-":"";return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${x}${p}% * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${x}${p}% * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${x}${p}% * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${x}${p}% * var(--ce-space-y-reverse));}`}const c=parseFloat(i);if(Number.isNaN(c))return null;const u=`calc(${t?"-":""}${he} * ${c})`;return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${u} * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${u} * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${u} * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${u} * var(--ce-space-y-reverse));}`}function Zt(e){const t=e.replace("#",""),n=parseInt(t,16);return`${n>>16&255} ${n>>8&255} ${n&255}`}const Un=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,zn={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function qn(e){const t=Un.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=Vt[r]?.[o];if(!i)return null;if(n==="shadow")return`--ce-shadow-color:${i};`;const s=zn[n];return s?`${s}:${i};`:null}function Kn(e){const t=e.indexOf("/");if(t===-1)return{base:e};const n=e.slice(0,t),r=e.slice(t+1),o=parseInt(r,10);return isNaN(o)||o<0||o>100?{base:n}:{base:n,opacity:o/100}}function gt(e){const{base:t,opacity:n}=Kn(e),r=qn(t);if(r&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(r);if(i){const s=Zt(i[0]);return r.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}if(r)return r;const o=Qe(t);if(o&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(o);if(i){const s=Zt(i[0]);return o.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}return o}function mt(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=Vt[r]?.[o];if(!i)return null;switch(n){case"from":return`--ce-gradient-from:${i} var(--ce-gradient-from-position);--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), var(--ce-gradient-to);`;case"to":return`--ce-gradient-to:${i} var(--ce-gradient-to-position);`;case"via":return`--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), ${i} var(--ce-gradient-via-position), var(--ce-gradient-to);`;default:return null}}function yt(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const n=parseInt(t[1],10);return n<0||n>100?null:`opacity:${n/100};`}function Qe(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let u=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(u=u.replace(/_/g," "),u=u.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),u=u.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${u};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const n=e.slice(0,t);let r=e.slice(t+2,-1).replace(/_/g," ");const o={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(n==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(r)?`font-size:${r};`:`color:${r};`;if(n==="rotate")return`transform:rotate(${r});`;if(n==="scale")return`transform:scale(${r});`;if(n==="translate-x")return`transform:translateX(${r});`;if(n==="translate-y")return`transform:translateY(${r});`;const i=o[n]??n.replace(/_/g,"-");return i&&r?`${i}:${r};`:null}function Vn(e){if(e.startsWith("[")&&e.endsWith("]")){const n=e.slice(1,-1);return n.includes("&")?n:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const n=e.slice(t+2,-1).replace(/_/g,"-");return n.includes("&")?n:e.replace(/_/g,"-")}return null}function Jt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Gn(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,n=[];let r;for(;r=t.exec(e);){const o=r[2].split(/\s+/).filter(Boolean);o.length&&n.push(...o)}return n}const Ne=new Map,Zn=16,Xt=1e3;function Yt(e){const t=Date.now(),n=Ne.get(e);if(n&&t-n.timestamp<Zn)return n.css;const r=Gn(e);if(!r.length)return"";const o=new Set(r),i=[[],[],[],[]],s={},c=(f,h=!1)=>{const l=h?`dark|${f}`:f;if(l in s)return s[l];const g=y(f,h);return s[l]=g,g},a=f=>{const h=f.some(v=>ft.includes(v)),l=f.some(v=>v.startsWith("@")&&(dt.includes(v.slice(1))||v.match(/^@\[.+\]$/))),g=f.includes("dark");return f.length?!h&&!g&&!l?1:g&&(h||l)?3:2:0},u=f=>{const h=[];let l="",g=0;for(let v=0;v<f.length;v++){const k=f[v];k==="["||k==="("?g++:(k==="]"||k===")")&&g--,k===":"&&g===0?(h.push(l),l=""):l+=k}return l&&h.push(l),h},m={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},y=(f,h=!1)=>{const l=u(f);let g="",v=!1;for(const L of l){let B=L;if(B.startsWith("!")&&(v=!0,B=B.slice(1)),lt[B]||pt(B)||ht(B)||yt(B)||gt(B)||mt(B)||Qe(B)){g=L;break}}if(!g)return null;const k=g.replace(/^!/,""),S=lt[k]??pt(k)??ht(k)??yt(k)??gt(k)??mt(k)??Qe(k);if(!S)return null;const E=l.indexOf(g);let C=E>=0?l.slice(0,E):[];h&&(C=C.filter(L=>L!=="dark"));const w=`.${Jt(f)}`,T=v?S.replace(/;/g," !important;"):S,$="__SUBJECT__";let b=$;const _=[];for(const L of C)L.startsWith("group-")?(b=`.group:${L.slice(6)} ${b}`,_.push(L)):L.startsWith("peer-")&&(b=b.replace($,`.peer:${L.slice(5)}~${$}`),_.push(L));C=C.filter(L=>!_.includes(L));const P=[],j=[];let A=null;for(const L of C){if(L==="dark"||ft.includes(L)||L.startsWith("@")&&(dt.includes(L.slice(1))||L.match(/^@\[.+\]$/)))continue;const B=Vn(L);if(B){A=B;continue}const G=m[L];if(G){A?j.push(G):P.push(G);continue}const U=Bn[L];typeof U=="function"&&(b=U(b,T).split("{")[0])}const R=P.join(""),N=j.join("");function pe(L,B){if(!B)return L;let G=0,U=0;if(L.length&&(L[0]===">"||L[0]==="+"||L[0]==="~"||L[0]===" ")){let K=1;for(;K<L.length&&L[K]===" ";)K++;for(;K<L.length;K++){const X=L[K];if(X==="["?G++:X==="]"&&G>0?G--:X==="("?U++:X===")"&&U>0&&U--,G===0&&U===0&&(L[K]===">"||L[K]==="+"||L[K]==="~"||L[K]===" "))return L.slice(0,K)+B+L.slice(K)}return L+B}for(let K=0;K<L.length;K++){const X=L[K];if(X==="["?G++:X==="]"&&G>0?G--:X==="("?U++:X===")"&&U>0&&U--,G===0&&U===0&&(X===">"||X==="+"||X==="~"||X===" "))return L.slice(0,K)+B+L.slice(K)}return L+B}if(A)if(A.includes("&")){const L=A.indexOf("&"),B=A.slice(0,L),G=A.slice(L+1),U=$+R;if(P.length===0)b=b.replace($,B+U+N+G);else{const K=pe(G,N);b=b.replace($,B+U+K)}}else b=b.replace($,`${A}${$+R}`),N&&(b=b.replace($,`${$}${N}`));else b=b.replace($,$+R+N);b=b.replace(new RegExp($,"g"),w);let Z=`${b}{${T}}`;const q=C.filter(L=>ft.includes(L)),I=C.filter(L=>L.startsWith("@")&&(dt.includes(L.slice(1))||L.match(/^@\[.+\]$/))),V=q.length?q[q.length-1]:null,le=I.length?I[I.length-1]:null,We=C.includes("dark");let W="",fe="";if(We&&V?W=`@media (prefers-color-scheme: dark) and ${ut[V]}`:We?W="@media (prefers-color-scheme: dark)":V&&(W=`@media ${ut[V]}`),le)if(le.startsWith("@[")&&le.endsWith("]")){const L=le.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(L))return null;fe=`@container (min-width:${L})`}else{const L=le.slice(1);fe=`@container ${Gt[L]||`(min-width:${L})`}`}return W&&fe?Z=`${W}${fe}{${Z}}`:W?Z=`${W}{${Z}}`:fe&&(Z=`${fe}{${Z}}`),Z};for(const f of o){const h=u(f),l=h.find(E=>lt[E.replace(/^!/,"")]||pt(E.replace(/^!/,""))||ht(E.replace(/^!/,""))||yt(E.replace(/^!/,""))||gt(E.replace(/^!/,""))||mt(E.replace(/^!/,""))||Qe(E.replace(/^!/,"")));if(!l)continue;const g=h.indexOf(l),v=g>=0?h.slice(0,g):[],k=a(v),S=c(f);S&&i[k].push(S)}const p=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const f of o)if(p.test(f)){if(i.flat().join("").includes(`.${Jt(f)}`))continue;const l=c(f);l&&i[0].push(l)}const x=f=>f.sort((h,l)=>{const g=w=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,b]of Object.entries(T))if(w.includes(`@media ${ut[$]}`))return b;return-1},v=w=>{const T={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[$,b]of Object.entries(T))if(w.includes(`@container ${Gt[$]}`))return b;if(w.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(w);if($){const b=parseFloat($[1]),_=$[2];return _==="rem"||_==="em"?b*16:b}}return-1},k=g(h),S=g(l),E=v(h),C=v(l);return k>=0&&S>=0&&k!==S?k-S:E>=0&&C>=0&&E!==C?E-C:0});i[2]=x(i[2]),i[3]=x(i[3]);const d=i.flat().join("");return Ne.size>=Xt&&Array.from(Ne.keys()).slice(0,Math.floor(Xt/2)).forEach(h=>Ne.delete(h)),Ne.set(e,{css:d,timestamp:t}),d}function De(e,t){const n="when-block";return z(typeof t=="function"?e?t():[]:e?t:[],n)}function Jn(e,t){return e.map((n,r)=>{const o=typeof n=="object"?n?.key??n?.id??`idx-${r}`:String(n);return z(t(n,r),`each-${o}`)})}function Qt(){const e=[];return{when(t,n){return e.push([t,n]),this},otherwise(t){return e.push([!0,t]),this},done(){return Xn(...e)}}}function Xn(...e){for(let t=0;t<e.length;t++){const[n,r]=e[t];if(n){const o=typeof r=="function"?r():r;return[z(o,`whenChain-branch-${t}`)]}}return[z([],"whenChain-empty")]}function z(e,t){const n=e?Array.isArray(e)?e.filter(r=>r!=null):[e].filter(r=>r!=null):[];return{tag:"#anchor",key:t,children:n}}const Ae={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function Yn(e,t){const{preset:n,show:r,mode:o="default",duration:i,appear:s=!1,css:c=!0,name:a,enterFrom:u,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:x,leaveTo:d,onBeforeEnter:f,onEnter:h,onAfterEnter:l,onEnterCancelled:g,onBeforeLeave:v,onLeave:k,onAfterLeave:S,onLeaveCancelled:E}=e;let C;n&&Ae[n]?(C={...Ae[n]},u&&(C.enterFrom=u),m&&(C.enterActive=m),y&&(C.enterTo=y),p&&(C.leaveFrom=p),x&&(C.leaveActive=x),d&&(C.leaveTo=d)):C={enterFrom:u,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:x,leaveTo:d};const w=a||(n?`transition-${n}`:"transition"),T=z(r?t:[],w);return T._transition={name:w,classes:C,mode:o,duration:i,appear:s,css:c,state:r?"visible":"hidden",hooks:{onBeforeEnter:f,onEnter:h,onAfterEnter:l,onEnterCancelled:g,onBeforeLeave:v,onLeave:k,onAfterLeave:S,onLeaveCancelled:E}},T}function Qn(e,t){const{tag:n="div",moveClass:r="transition-transform duration-300",preset:o,show:i=!0,mode:s="default",duration:c,appear:a=!1,css:u=!0,name:m,class:y,style:p,enterFrom:x,enterActive:d,enterTo:f,leaveFrom:h,leaveActive:l,leaveTo:g,onBeforeEnter:v,onEnter:k,onAfterEnter:S,onEnterCancelled:E,onBeforeLeave:C,onLeave:w,onAfterLeave:T,onLeaveCancelled:$}=e;let b;o&&Ae[o]?(b={...Ae[o]},x&&(b.enterFrom=x),d&&(b.enterActive=d),f&&(b.enterTo=f),h&&(b.leaveFrom=h),l&&(b.leaveActive=l),g&&(b.leaveTo=g)):b={enterFrom:x,enterActive:d,enterTo:f,leaveFrom:h,leaveActive:l,leaveTo:g};const _=m||(o?`transition-group-${o}`:"transition-group"),P=[];for(const j of i?t:[])if(j&&typeof j=="object"&&j.tag==="#anchor"){const A=Array.isArray(j.children)?j.children:[];for(const R of A)if(R&&typeof R=="object"){const N={...R,key:j.key||R.key,props:{...R.props,_anchorKey:j.key}};P.push(N)}else P.push(R)}else P.push(j);return{tag:n,children:P,key:_,props:{attrs:{...y?{class:y}:{},...p?{style:p}:{}},_transitionGroup:{name:_,classes:b,moveClass:r,mode:s,duration:c,appear:a,css:u,hooks:{onBeforeEnter:v,onEnter:k,onAfterEnter:S,onEnterCancelled:E,onBeforeLeave:C,onLeave:w,onAfterLeave:T,onLeaveCancelled:$}}}}}function er(e){return{...e}}let et=null;function tt(){if(!et){const e=[];Object.values(Ae).forEach(r=>{r.enterFrom&&e.push(r.enterFrom),r.enterActive&&e.push(r.enterActive),r.enterTo&&e.push(r.enterTo),r.leaveFrom&&e.push(r.leaveFrom),r.leaveActive&&e.push(r.leaveActive),r.leaveTo&&e.push(r.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,n=Yt(t);et=new CSSStyleSheet,et.replaceSync(n)}return et}function tr(){tt()}tr();const He=[];function nr(e,t,n,r,o,i,s,c){if(e){He.push(n);try{const a=t.render(n);if(a instanceof Promise){i(!0),a.then(u=>{i(!1),s(null),en(e,u,n,r,o),c(e.innerHTML)}).catch(u=>{i(!1),s(u)});return}en(e,a,n,r,o),c(e.innerHTML)}finally{He.pop()}}}function en(e,t,n,r,o){e&&(Hn(e,Array.isArray(t)?t:[t],n,r),o(e.innerHTML))}function rr(e,t,n,r,o,i,s){if(i!==null&&clearTimeout(i),Date.now()-t<16){if(o(n+1),n===15)Q(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
116
118
|
Common causes:
|
|
117
119
|
• Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
118
120
|
• State modification during render
|
|
119
121
|
• Missing dependencies in computed/watch
|
|
120
|
-
Component rendering will be throttled to prevent browser freeze.`);else if(
|
|
122
|
+
Component rendering will be throttled to prevent browser freeze.`);else if(n>20){H(`🛑 Infinite loop detected in component render:
|
|
121
123
|
• This might be caused by state updates during render
|
|
122
124
|
• Ensure all state modifications are done in event handlers or effects
|
|
123
|
-
Stopping runaway component render to prevent browser freeze`),s(null);return}}else
|
|
124
|
-
${
|
|
125
|
-
`);c=jt(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.cssRules.length>0&&Array.from(a.cssRules).map(b=>b.cssText).join("")!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[Lt(),Xe(),a],i(a)}let W=null;function Ft(e){W=e}function Wt(){W=null}function Fn(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,r)=>e(t,r)}function _e(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function Wn(e){if(!W)throw new Error("useOnConnected must be called during component render");_e(W),W._hookCallbacks.onConnected=e}function zn(e){if(!W)throw new Error("useOnDisconnected must be called during component render");_e(W),W._hookCallbacks.onDisconnected=e}function Un(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");_e(W),W._hookCallbacks.onAttributeChanged=e}function Kn(e){if(!W)throw new Error("useOnError must be called during component render");_e(W),W._hookCallbacks.onError=e}function qn(e){if(!W)throw new Error("useProps must be called during component render");_e(W),W._hookCallbacks.props={...W._hookCallbacks.props||{},...e};const t=W;try{const n=Object.keys(e||{});for(const i of n){if(typeof i!="string"||i.startsWith("_"))continue;const o=Object.getOwnPropertyDescriptor(t,i);if(!(o&&!o.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const f=ee(i),b=a.getAttribute(f);if(b!==null){const m=typeof e[i];return m==="boolean"?b===""||b==="true":m==="number"?Number(b):b}if(typeof a[i]<"u"){const m=a[i];return N(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?m.value:typeof e[i]==="boolean"&&typeof m=="string"?m===""||m==="true":m}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(n,i){if(typeof i!="string")return;const o=e[i];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const f=i.replace(/([A-Z])/g,"-$1").toLowerCase(),b=c.getAttribute(f);if(b!==null)return typeof o=="boolean"?b===""||b==="true":typeof o=="number"?Number(b):b}const a=c[i];if(typeof a<"u"&&a!=="")return typeof o=="boolean"&&o===!1&&a===""?o:N(a)||a&&typeof a=="object"&&"value"in a&&!(a instanceof Node)?a.value:typeof o=="boolean"&&typeof a=="string"?a==="true"||a!==""&&a!=="false":typeof o=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}catch{}const s=t[i];return typeof o=="boolean"&&s===""?o===!1?o:!0:N(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof o=="boolean"&&typeof s=="string"?s==="true":typeof o=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:o},has(n,i){return typeof i=="string"&&(i in t||i in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function Vn(e){if(!W)throw new Error("useStyle must be called during component render");_e(W);try{const t=e();Object.defineProperty(W,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){re("Error in useStyle callback:",t),Object.defineProperty(W,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Se=new Map,zt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[zt]||(e[zt]=Se)}function Zn(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=Se.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const r=this._initContext(t),n=(o,s,c)=>{Object.defineProperty(o,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};n(r,"refs",this._refs),n(r,"requestRender",()=>this.requestRender()),n(r,"_requestRender",()=>this._requestRender()),n(r,"_componentId",this._componentId),n(r,"_triggerWatchers",(o,s)=>this._triggerWatchers(o,s)),this.context=r,R(()=>{n(r,"_host",this)}),n(this.context,"emit",(o,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},f=new CustomEvent(o,a);this.dispatchEvent(f);const b=o.indexOf(":");if(b>0){const m=o.substring(0,b),d=o.substring(b+1),x=d.includes("-")?`${m}:${d.split("-").map((u,p)=>p===0?u:u.charAt(0).toUpperCase()+u.slice(1)).join("")}`:`${m}:${d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;x!==o&&R(()=>{this.dispatchEvent(new CustomEvent(x,a))})}return!f.defaultPrevented});const i=Se.get(e)||t;for(const o in i){const s=i[o];typeof s=="function"&&(this.context[o]=(...c)=>s(...c,this.context))}if(i.props)for(const o in i.props){let s=this[o];Object.defineProperty(this,o,{get(){return s},set(c){const a=s;s=c,this.context[o]=c,this._initializing||(this._applyProps(i),a!==c&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(i),this._applyProps(i),this._render(i)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),on(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{sn(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,n,i){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),n!==i&&this._requestRender(),an(t,r,n,i,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(ee):[]}_render(r){this._runLogicWithinErrorBoundary(r,()=>{Hn(this.shadowRoot,r,this.context,this._refs,n=>{this._lastHtmlStringForJitCSS=n,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(n)},n=>{this._templateLoading=n,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(n)},n=>{this._templateError=n,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(n)},n=>this._applyStyle(r,n))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{ve(()=>{Bn(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})},this._componentId)})}_applyStyle(r,n){this._runLogicWithinErrorBoundary(r,()=>{In(this.shadowRoot,this.context,n,this._styleSheet,i=>{this._styleSheet=i})})}_runLogicWithinErrorBoundary(r,n){this._hasError&&(this._hasError=!1);try{n()}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context)}}_initContext(r){try{let n=function(o,s=""){if(Array.isArray(o))return new Proxy(o,{get(c,a,f){const b=Reflect.get(c,a,f);return typeof b=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...d){const x=b.apply(c,d);if(!i._initializing){const u=s||"root";i._triggerWatchers(u,c),ve(()=>i._render(r),i._componentId)}return x}:b},set(c,a,f){if(c[a]=f,!i._initializing){const b=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(b,f),ve(()=>i._render(r),i._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!i._initializing){const f=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(f,void 0),ve(()=>i._render(r),i._componentId)}return!0}});if(o&&typeof o=="object"){if(N(o))return o;for(const c in o){const a=s?`${s}.${c}`:c;o[c]=n(o[c],a)}return new Proxy(o,{set(c,a,f){const b=s?`${s}.${String(a)}`:String(a);return c[a]=n(f,b),i._initializing||(i._triggerWatchers(b,c[a]),ve(()=>i._render(r),i._componentId)),!0},get(c,a,f){return Reflect.get(c,a,f)}})}return o};const i=this;return n({...r.props?Object.fromEntries(Object.entries(r.props).map(([o,s])=>[o,s.default])):{}})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{en(this.context,this._watchers,{})})}_triggerWatchers(r,n){tn(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{rn(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function ht(e,t){let r=ee(e);r.includes("-")||(r=`cer-${r}`);let n={};const i={props:{},onConnected:o=>{n.onConnected&&n.onConnected()},onDisconnected:o=>{n.onDisconnected&&n.onDisconnected()},onAttributeChanged:(o,s,c,a)=>{n.onAttributeChanged&&n.onAttributeChanged(o,s,c)},onError:(o,s)=>{n.onError&&o&&n.onError(o)},render:o=>{const s=o._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;Y.setCurrentComponent(s,()=>{o.requestRender&&o.requestRender()});try{Ft(o);const c=t();if(o._hookCallbacks){const a=o._hookCallbacks;if(a.onConnected&&(n.onConnected=a.onConnected),a.onDisconnected&&(n.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(n.onAttributeChanged=a.onAttributeChanged),a.onError&&(n.onError=a.onError),a.style&&(o._styleCallback=a.style),a.props){const f=a.props;i.props=Object.fromEntries(Object.entries(f).map(([b,m])=>[b,{type:typeof m=="boolean"?Boolean:typeof m=="number"?Number:typeof m=="string"?String:Function,default:m}])),Se.set(r,i)}}return c}finally{Wt(),Y.clearCurrentComponent()}}};if(Se.set(r,i),typeof window<"u"){try{const o={_hookCallbacks:{},requestRender:()=>{}};if(Ft(o),t(),Wt(),o._hookCallbacks?.props){const s=o._hookCallbacks.props;i.props=Object.fromEntries(Object.entries(s).map(([c,a])=>[c,{type:typeof a=="boolean"?Boolean:typeof a=="number"?Number:typeof a=="string"?String:Function,default:a}])),Se.set(r,i)}}catch{}customElements.get(r)||customElements.define(r,Zn(r,i))}}class Gn{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}set(t,r){if(this.map.delete(t),this.map.set(t,r),this.map.size>this.maxSize){const n=this.map.keys().next().value;n!==void 0&&this.map.delete(n)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const gt=new Gn(500);function Jn(e,t){if(e==null){re(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&re(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&re(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function De(e,t={},r,n){const i=n??t.key;return{tag:e,key:i,props:t,children:r}}function He(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Be(e){return typeof e=="object"&&e!==null&&"tag"in e&&!He(e)}function Xn(e,t){return e.key!=null?e:{...e,key:t}}function Yn(e,t=[],r={}){const n={},i={},o={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const f=a[1],b=a[2],m=(a[4]||a[6])??"",d=a[3]===void 0&&a[6]===void 0,x=m.match(/^{{(\d+)}}$/);let u=d?!0:x?t[Number(x[1])]??null:m;x||(u==="true"?u=!0:u==="false"?u=!1:u==="null"?u=null:isNaN(Number(u))||(u=Number(u)));const p=["model","bind","show","class","style","ref","when"];if(f===":"){const[h,l]=b.split(":"),[y,...w]=h.split(".");if(p.includes(y)){const k=[...w],_=y==="model"&&l?`model:${l}`:y;o[_]={value:u,modifiers:k,arg:l}}else if(b==="disabled"){let k=u;k&&N(k)&&(k=k.value);const _=typeof k;if(k===""||_==="boolean"||_==="string"&&(k==="true"||k==="false")||k==null||_==="number")n[b]=k;else{let A=u;A&&N(A)&&(A=A.value),i[b]=A}s.push(b)}else{let k=u;k&&N(k)&&(k=k.value),i[b]=k,s.push(b)}}else if(f==="@"){const[h,...l]=b.split("."),y=l;Jn(u,h);const w=typeof u=="function"?u:typeof r[u]=="function"?r[u]:void 0;if(w){const k=C=>{if(y.includes("prevent")&&C.preventDefault(),y.includes("stop")&&C.stopPropagation(),!(y.includes("self")&&C.target!==C.currentTarget))return y.includes("once")&&C.currentTarget?.removeEventListener(h,k),w(C)},_="on"+h.charAt(0).toUpperCase()+h.slice(1);n[_]=k}}else b==="ref"?n.ref=u:i[b]=u}return{props:n,attrs:i,directives:o,bound:s}}function mt(e){if(!Be(e)||He(e))return e;const t=e.props?.directives;if(t&&t.when){const r=t.when.value,{when:n,...i}=t,o={...e.props};Object.keys(i).length>0?o.directives=i:delete o.directives;const s={...e,props:o};return Array.isArray(s.children)&&(s.children=s.children.map(a=>typeof a=="object"&&a!==null?mt(a):a)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[s]:[]}}if(Array.isArray(e.children)){const r=e.children.map(n=>typeof n=="object"&&n!==null?mt(n):n);return{...e,children:r}}return e}function Qn(e,t,r){const n=Ne.length>0?Ne[Ne.length-1]:void 0,i=r??n,o=!r&&t.length===0,s=o?e.join("<!--TEMPLATE_DELIM-->"):null;if(o&&s){const g=gt.get(s);if(g)return g}function c(g,A){return De("#text",{},g,A)}let a="";for(let g=0;g<e.length;g++)a+=e[g],g<t.length&&(a+=`{{${g}}}`);const f=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,b=[];let m,d=[],x=null,u={},p,h=0,l=[];function y(g){!g||typeof g!="object"||He(g)||(g.props||g.attrs?(g.props&&(u.props||(u.props={}),Object.assign(u.props,g.props)),g.attrs&&(u.attrs||(u.attrs={}),Object.keys(g.attrs).forEach(A=>{if(A==="style"&&u.attrs.style){const T=u.attrs.style.replace(/;?\s*$/,""),$=g.attrs.style.replace(/^;?\s*/,"");u.attrs.style=T+"; "+$}else if(A==="class"&&u.attrs.class){const T=u.attrs.class.trim().split(/\s+/).filter(Boolean),$=g.attrs.class.trim().split(/\s+/).filter(Boolean),v=[...new Set([...T,...$])];u.attrs.class=v.join(" ")}else u.attrs[A]=g.attrs[A]}))):(u.props||(u.props={}),Object.assign(u.props,g)))}function w(g,A){const T=x?d:l;if(He(g)){const $=g.key??A;let v=g.children;T.push({...g,key:$,children:v});return}if(Be(g)){T.push(Xn(g,void 0));return}if(Array.isArray(g)){if(g.length===0)return;for(let $=0;$<g.length;$++){const v=g[$];He(v)||Be(v)||Array.isArray(v)?w(v,`${A}-${$}`):v!==null&&typeof v=="object"?y(v):T.push(c(String(v),`${A}-${$}`))}return}if(g!==null&&typeof g=="object"){y(g);return}T.push(c(String(g),A))}const k=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;m=f.exec(a);)if(!(m[0].startsWith("<!--")&&m[0].endsWith("-->"))){if(m[1]){const g=m[1],A=m[0][1]==="/",T=m[0][m[0].length-2]==="/"||k.has(g),{props:$,attrs:v,directives:S,bound:L}=Yn(m[2]||"",t,i),E={props:{},attrs:{}};for(const O in $)E.props[O]=$[O];for(const O in v)E.attrs[O]=v[O];E.attrs&&Object.prototype.hasOwnProperty.call(E.attrs,"key")&&!(E.props&&Object.prototype.hasOwnProperty.call(E.props,"key"))&&R(()=>{E.props.key=E.attrs.key});try{const O={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},M=g.toLowerCase(),F=O[M]??[];if(E.attrs){for(const H of F)if(L&&L.includes(H)&&H in E.attrs&&!(E.props&&H in E.props)){let D=E.attrs[H];if(D&&N(D))D=D.value,E.props[H]=D,delete E.attrs[H];else{const V=typeof D;H==="disabled"?(D===""||V==="boolean"||V==="string"&&(D==="true"||D==="false")||D==null||V==="number")&&(E.props[H]=D,R(()=>{const q=globalThis;q.__VDOM_DISABLED_PROMOTIONS||(q.__VDOM_DISABLED_PROMOTIONS=[]),q.__VDOM_DISABLED_PROMOTIONS.push({phase:"compiler-promotion",tag:g,propName:H,value:D,time:Date.now(),stack:new Error().stack})}),delete E.attrs[H]):(D===""||V==="string"||V==="number"||V==="boolean"||D==null)&&(E.props[H]=D,delete E.attrs[H])}}}if((g.includes("-")||!!i?.__customElements?.has?.(g))&&(E.isCustomElement=!0,L&&E.attrs)){const H=new Set(["id","name","data-key","key"]);for(const D of L)if(D in E.attrs&&!(E.props&&D in E.props)){const V=D.includes("-")?Qe(D):D;let ce=E.attrs[D];E.props[V]=ce,H.has(D)||delete E.attrs[D]}}}catch{}if(S&&Object.keys(S).some(O=>O==="model"||O.startsWith("model:")))try{const O=Symbol.for("cer.registry"),M=globalThis[O],F=!!(M&&typeof M.has=="function"&&M.has(g)),pe=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(g)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(g)));if(!!(g.includes("-")||pe||F))for(const V of Object.keys(S)){if(V!=="model"&&!V.startsWith("model:"))continue;const ce=S[V],he=ce.arg??(V.includes(":")?V.split(":",2)[1]:void 0),q=ce.value,se=he??"modelValue",ue=Z,j=Ue,B=i?i._state||i:void 0;let z;typeof q=="string"&&i?z=ue(B,q):z=q,E.props[se]=z;try{const ge=ee(se);E.attrs||(E.attrs={}),z!=null&&(typeof z=="string"||typeof z=="number"||typeof z=="boolean")&&(E.attrs[ge]=z)}catch{}E.isCustomElement=!0;const U=`update:${ee(se)}`.replace(/-([a-z])/g,(ge,le)=>le.toUpperCase()),X="on"+U.charAt(0).toUpperCase()+U.slice(1);E.props[X]=function(ge){const le=ge.detail!==void 0?ge.detail:ge.target?ge.target.value:void 0;if(B)if(q&&N(q)){const be=q.value;(Array.isArray(le)&&Array.isArray(be)?JSON.stringify([...le].sort())!==JSON.stringify([...be].sort()):le!==be)&&(q.value=le,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const be=ue(B,typeof q=="string"?q:String(q));(Array.isArray(le)&&Array.isArray(be)?JSON.stringify([...le].sort())!==JSON.stringify([...be].sort()):le!==be)&&(j(B,typeof q=="string"?q:String(q),le),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete S[V]}}catch{}if(Object.keys(S).length>0&&(E.directives={...S}),A){const O=De(x,u,d.length===1&&Be(d[0])&&d[0].tag==="#text"?typeof d[0].children=="string"?d[0].children:"":d.length?d:void 0,p),M=b.pop();M?(x=M.tag,u=M.props,p=M.key,d=M.children,d.push(O)):(l.push(O),x=null,u={},p=void 0,d=[])}else T?x?d.push(De(g,E,void 0,void 0)):l.push(De(g,E,void 0,void 0)):(x&&b.push({tag:x,props:u,children:d,key:p}),x=g,u=E,d=[])}else if(typeof m[3]<"u"){const g=Number(m[3]),A=t[g],T=`interp-${g}`;w(A,T)}else if(m[4]){const g=m[4],A=x?d:l,T=g.split(/({{\d+}})/);for(const $ of T){if(!$)continue;const v=$.match(/^{{(\d+)}}$/);if(v){const S=Number(v[1]),L=t[S],E=`interp-${S}`;w(L,E)}else{const S=`text-${h++}`;A.push(c($,S))}}}}const C=l.filter(g=>Be(g)&&g.tag==="#text"?typeof g.children=="string"&&g.children.trim()!=="":!0).map(g=>mt(g));if(C.length===1){const g=C[0];return o&&s&>.set(s,g),g}else if(C.length>1){const g=C;return o&&s&>.set(s,g),g}return De("div",{},"","fallback-root")}function de(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return Qn(e,t,n)}function er(e,t){return Me(!e,t)}function tr(e,t){const r=!e||e.length===0;return Me(r,t)}function nr(e,t){const r=!!(e&&e.length>0);return Me(r,t)}function rr(e,t,r){const n=[];return e.forEach((i,o)=>{t(i,o)&&n.push({item:i,originalIndex:o})}),n.map(({item:i,originalIndex:o},s)=>{const c=typeof i=="object"&&i!=null?i?.key??i?.id??`filtered-${o}`:`filtered-${o}`;return K(r(i,o,s),`each-where-${c}`)})}function ir(e,t){const r=e?.length??0;return r===0&&t.empty?K(t.empty,"switch-length-empty"):r===1&&t.one?K(t.one(e[0]),"switch-length-one"):t.exactly?.[r]?K(t.exactly[r](e),`switch-length-${r}`):r>1&&t.many?K(t.many(e),"switch-length-many"):K([],"switch-length-fallback")}function or(e,t,r){const n=new Map;return e.forEach(i=>{const o=t(i);n.has(o)||n.set(o,[]),n.get(o).push(i)}),Array.from(n.entries()).map(([i,o],s)=>K(r(i,o,s),`each-group-${i}`))}function sr(e,t,r,n){const i=r*t,o=Math.min(i+t,e.length);return e.slice(i,o).map((c,a)=>{const f=i+a,b=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${f}`:`page-${f}`;return K(n(c,f,a),`each-page-${b}`)})}function ar(e,t){return e.loading&&t.loading?K(t.loading,"promise-loading"):e.error&&t.error?K(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?K(t.success(e.data),"promise-success"):t.idle?K(t.idle,"promise-idle"):K([],"promise-fallback")}function G(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return Me(!!r,t)}const ae={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},yt=["sm","md","lg","xl","2xl"],Ut={sm:e=>G(ae.sm,e),md:e=>G(ae.md,e),lg:e=>G(ae.lg,e),xl:e=>G(ae.xl,e),"2xl":e=>G(ae["2xl"],e),dark:e=>G(ae.dark,e),light:e=>G("(prefers-color-scheme: light)",e),touch:e=>G("(hover: none) and (pointer: coarse)",e),mouse:e=>G("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>G("(prefers-reduced-motion: reduce)",e),highContrast:e=>G("(prefers-contrast: high)",e),portrait:e=>G("(orientation: portrait)",e),landscape:e=>G("(orientation: landscape)",e)};function cr(e,t){const r=[];e.includes("dark")?r.push(ae.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(s=>yt.includes(s)),i=n[n.length-1];i&&i in ae&&r.push(ae[i]);const o=r.length>0?r.join(" and "):"all";return G(o,t)}function lr(e){const t=[];return e.base&&t.push(K(e.base,"responsive-base")),yt.forEach(r=>{const n=e[r];n&&t.push(Ut[r](n))}),t}function ur(e){const t=[];let r=null;return{case(n,i){const o=typeof n=="function"?n:s=>s===n;return t.push({condition:o,content:i}),this},when(n,i){return t.push({condition:n,content:i}),this},otherwise(n){return r=n,this},done(){for(let n=0;n<t.length;n++){const{condition:i,content:o}=t[n];if(i(e))return K(o,`switch-case-${n}`)}return K(r||[],"switch-otherwise")}}}class ye extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return ye.instance||(ye.instance=new ye),ye.instance}emit(t,r){const n=Date.now(),i=this.eventCounters.get(t);if(!i||n-i.window>1e3)this.eventCounters.set(t,{count:1,window:n});else if(i.count++,i.count>50&&i.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const o=this.handlers[t];o&&o.forEach(s=>{try{s(r)}catch(c){I(`Error in global event handler for "${t}":`,c)}})}on(t,r){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(r),()=>this.off(t,r)}off(t,r){const n=this.handlers[t];n&&n.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,n){return this.addEventListener(t,r,n),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(n=>{const i=this.on(t,o=>{i(),r(o),n(o)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[r,n]of this.eventCounters.entries())t[r]={count:n.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const Ae=ye.getInstance(),fr=(e,t)=>Ae.emit(e,t),dr=(e,t)=>Ae.on(e,t),pr=(e,t)=>Ae.off(e,t),hr=(e,t)=>Ae.once(e,t),gr=(e,t,r)=>Ae.listen(e,t,r);function bt(e){let t={...e};const r=[];function n(c){r.push(c),c(t)}function i(){return t}function o(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){r.forEach(c=>c(t))}return{subscribe:n,getState:i,setState:o}}const wt=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},oe=(e,t)=>{for(const r of e){const n=[],i=r.path.replace(/:[^/]+/g,c=>(n.push(c.slice(1)),"([^/]+)")),o=new RegExp(`^${i}$`),s=t.match(o);if(s){const c={};return n.forEach((a,f)=>{c[a]=s[f+1]}),{route:r,params:c}}}return{route:null,params:{}}},vt={};async function Kt(e){if(e.component)return e.component;if(e.load){if(vt[e.path])return vt[e.path];try{const t=await e.load();return vt[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function qt(e){const{routes:t,base:r="",initialUrl:n}=e;let i,o,s,c,a,f,b;const m=async(p,h)=>{const l=t.find(y=>oe([y],p.path).route!==null);if(l?.beforeEnter)try{const y=await l.beforeEnter(p,h);return typeof y=="string"?(await u(y,!0),!1):y!==!1}catch(y){return I("beforeEnter error",y),!1}return!0},d=async(p,h)=>{const l=t.find(y=>oe([y],p.path).route!==null);if(l?.onEnter)try{const y=await l.onEnter(p,h);return typeof y=="string"?(await u(y,!0),!1):y!==!1}catch(y){return I("onEnter error",y),!1}return!0},x=(p,h)=>{const l=t.find(y=>oe([y],p.path).route!==null);if(l?.afterEnter)try{l.afterEnter(p,h)}catch(y){I("afterEnter error",y)}},u=async(p,h=!1)=>{try{const l={path:p.replace(r,"")||"/",query:{}},y=oe(t,l.path);if(!y)throw new Error(`No route found for ${l.path}`);const w=s.getState(),k={path:l.path,params:y.params,query:l.query};if(!await m(k,w)||!await d(k,w))return;typeof window<"u"&&typeof document<"u"&&(h?window.history.replaceState({},"",r+p):window.history.pushState({},"",r+p)),s.setState(k),x(k,w)}catch(l){I("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const h=new URL(window.location.href),l=h.pathname.replace(r,"")||"/",y=wt(h.search);return{path:l,query:y}},o=i();const p=oe(t,o.path);s=bt({path:o.path,params:p.params,query:o.query}),c=async(h=!1)=>{const l=i();await u(l.path,h)},window.addEventListener("popstate",()=>c(!0)),a=h=>u(h,!1),f=h=>u(h,!0),b=()=>window.history.back()}else{i=()=>{const l=new URL(n||"/","http://localhost"),y=l.pathname.replace(r,"")||"/",w=wt(l.search);return{path:y,query:w}},o=i();const p=oe(t,o.path);s=bt({path:o.path,params:p.params,query:o.query}),c=async()=>{const l=i();await h(l.path)};const h=async l=>{try{const y={path:l.replace(r,"")||"/",query:{}},w=oe(t,y.path);if(!w)throw new Error(`No route found for ${y.path}`);const k=s.getState(),_={path:y.path,params:w.params,query:y.query},C=t.find(g=>oe([g],_.path).route!==null);if(C?.beforeEnter)try{const g=await C.beforeEnter(_,k);if(typeof g=="string"){await h(g);return}if(g===!1)return}catch{return}if(C?.onEnter)try{const g=await C.onEnter(_,k);if(typeof g=="string"){await h(g);return}if(g===!1)return}catch{return}if(s.setState(_),C?.afterEnter)try{C.afterEnter(_,k)}catch{}}catch{}};a=async l=>h(l),f=async l=>h(l),b=()=>{}}return{store:s,push:a,replace:f,back:b,subscribe:s.subscribe,matchRoute:p=>oe(t,p),getCurrent:()=>s.getState(),resolveRouteComponent:Kt}}function mr(e,t){return oe(e,t)}function yr(e){const t=qt(e);return ht("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return de`<div>Router not initialized.</div>`;const o=t.getCurrent(),{path:s}=o,c=t.matchRoute(s);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const f=a();return(f instanceof Promise?f:Promise.resolve(f)).then(m=>typeof m=="string"?{tag:m,props:{},children:[]}:m)}return de`<div>Invalid route component</div>`}).catch(()=>de`<div>Invalid route component</div>`):de`<div>Not found</div>`}),ht("router-link",(r={},n={})=>{const{to:i="",tag:o="a",replace:s=!1,exact:c=!1,activeClass:a="active",exactActiveClass:f="exact-active",ariaCurrentValue:b="page",disabled:m=!1,external:d=!1,class:x=""}=r,u=t.getCurrent(),p=u.path===i,h=c?p:u&&typeof u.path=="string"?u.path.startsWith(i):!1,l=p?`aria-current="${b}"`:"",y=(x||"").split(/\s+/).filter(Boolean),w={};for(const T of y)w[T]=!0;const k={...w,[a]:h,[f]:p},_=o==="button",C=m?_?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",g=d&&(o==="a"||!o)?'target="_blank" rel="noopener noreferrer"':"",A=T=>{if(m){T.preventDefault();return}d&&(o==="a"||!o)||(T.preventDefault(),s?t.replace(i):t.push(i))};return de`
|
|
126
|
-
${
|
|
125
|
+
Stopping runaway component render to prevent browser freeze`),s(null);return}}else o(0);const u=setTimeout(()=>{r(Date.now()),e(),s(null)},n>10?100:0);s(u)}function or(e,t,n,r,o){if(!e)return;const i=Yt(n);if((!i||i.trim()==="")&&!t._computedStyle){o(null),e.adoptedStyleSheets=[Kt(),tt()];return}let s="";t._computedStyle&&(s=t._computedStyle);let c=In(`${s}
|
|
126
|
+
${i}
|
|
127
|
+
`);c=qt(c);let a=r;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.cssRules.length>0&&Array.from(a.cssRules).map(m=>m.cssText).join("")!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[Kt(),tt(),a],o(a)}let F=null;function tn(e){F=e}function bt(){F=null}function ir(){if(!F)throw new Error("useEmit must be called during component render");const e=F.emit;return(t,n)=>e(t,n)}function Te(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function sr(e){if(!F)throw new Error("useOnConnected must be called during component render");Te(F),F._hookCallbacks.onConnected=e}function ar(e){if(!F)throw new Error("useOnDisconnected must be called during component render");Te(F),F._hookCallbacks.onDisconnected=e}function cr(e){if(!F)throw new Error("useOnAttributeChanged must be called during component render");Te(F),F._hookCallbacks.onAttributeChanged=e}function lr(e){if(!F)throw new Error("useOnError must be called during component render");Te(F),F._hookCallbacks.onError=e}function ur(e){if(!F)throw new Error("useProps must be called during component render");Te(F),F._hookCallbacks.props={...F._hookCallbacks.props||{},...e};const t=F;try{const r=Object.keys(e||{});for(const o of r){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(t,o);if(!(i&&!i.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const u=re(o),m=a.getAttribute(u);if(m!==null){const y=typeof e[o];return y==="boolean"?m===""||m==="true":y==="number"?Number(m):m}if(typeof a[o]<"u"){const y=a[o];return D(y)||y&&typeof y=="object"&&"value"in y&&!(y instanceof Node)?y.value:typeof e[o]==="boolean"&&typeof y=="string"?y===""||y==="true":y}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(r,o){if(typeof o!="string")return;const i=e[o];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const u=o.replace(/([A-Z])/g,"-$1").toLowerCase(),m=c.getAttribute(u);if(m!==null)return typeof i=="boolean"?m===""||m==="true":typeof i=="number"?Number(m):m}const a=c[o];if(typeof a<"u"&&a!=="")return typeof i=="boolean"&&i===!1&&a===""?i:D(a)||a&&typeof a=="object"&&"value"in a&&!(a instanceof Node)?a.value:typeof i=="boolean"&&typeof a=="string"?a==="true"||a!==""&&a!=="false":typeof i=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}catch{}const s=t[o];return typeof i=="boolean"&&s===""?i===!1?i:!0:D(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof i=="boolean"&&typeof s=="string"?s==="true":typeof i=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:i},has(r,o){return typeof o=="string"&&(o in t||o in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function fr(e){if(!F)throw new Error("useStyle must be called during component render");Te(F);try{const t=e();Object.defineProperty(F,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){Q("Error in useStyle callback:",t),Object.defineProperty(F,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const je=new Map,nn=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[nn]||(e[nn]=je)}function dr(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=je.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const n=this._initContext(t),r=(i,s,c)=>{Object.defineProperty(i,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};r(n,"refs",this._refs),r(n,"requestRender",()=>this.requestRender()),r(n,"_requestRender",()=>this._requestRender()),r(n,"_componentId",this._componentId),r(n,"_triggerWatchers",(i,s)=>this._triggerWatchers(i,s)),this.context=n,M(()=>{r(n,"_host",this)}),r(this.context,"emit",(i,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},u=new CustomEvent(i,a);this.dispatchEvent(u);const m=i.indexOf(":");if(m>0){const y=i.substring(0,m),p=i.substring(m+1),x=p.includes("-")?`${y}:${p.split("-").map((d,f)=>f===0?d:d.charAt(0).toUpperCase()+d.slice(1)).join("")}`:`${y}:${p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;x!==i&&M(()=>{this.dispatchEvent(new CustomEvent(x,a))})}return!u.defaultPrevented});const o=je.get(e)||t;for(const i in o){const s=o[i];typeof s=="function"&&(this.context[i]=(...c)=>s(...c,this.context))}if(o.props)for(const i in o.props){let s=this[i];Object.defineProperty(this,i,{get(){return s},set(c){const a=s;s=c,this.context[i]=c,this._initializing||(this._applyProps(o),a!==c&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(o),this._applyProps(o),this._render(o)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),kn(t,this.context,this._mounted,n=>{this._mounted=n})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{xn(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},n=>{this._templateLoading=n},n=>{this._templateError=n},n=>{this._mounted=n})})}attributeChangedCallback(n,r,o){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),r!==o&&this._requestRender(),$n(t,n,r,o,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(re):[]}_render(n){this._runLogicWithinErrorBoundary(n,()=>{nr(this.shadowRoot,n,this.context,this._refs,r=>{this._lastHtmlStringForJitCSS=r,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(r)},r=>{this._templateLoading=r,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(r)},r=>{this._templateError=r,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(r)},r=>this._applyStyle(n,r))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{$e(()=>{rr(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,n=>{this._lastRenderTime=n},n=>{this._renderCount=n},this._renderTimeoutId,n=>{this._renderTimeoutId=n})},this._componentId)})}_applyStyle(n,r){this._runLogicWithinErrorBoundary(n,()=>{or(this.shadowRoot,this.context,r,this._styleSheet,o=>{this._styleSheet=o})})}_runLogicWithinErrorBoundary(n,r){this._hasError&&(this._hasError=!1);try{r()}catch(o){this._hasError=!0;try{const i=n&&n.tag||this.tagName?.toLowerCase?.()||"<unknown>",s=this._componentId||"<unknown-id>",c={};if(n&&n.props)for(const a of Object.keys(n.props))try{const u=this.context[a];u instanceof Node?c[a]=`[DOM Node: ${u.nodeName}]`:typeof u=="object"&&u!==null?c[a]=Object.keys(u).length>5?`[object(${Object.keys(u).length} keys)]`:u:c[a]=u}catch{c[a]="[unreadable]"}H(`Error rendering component <${i}> (id=${s}):`,o),H("Component props snapshot:",c),Q("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).")}catch{}n.onError&&n.onError(o,this.context)}}_initContext(n){try{let r=function(i,s=""){if(Array.isArray(i))return new Proxy(i,{get(c,a,u){const m=Reflect.get(c,a,u);return typeof m=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...p){const x=m.apply(c,p);if(!o._initializing){const d=s||"root";o._triggerWatchers(d,c),$e(()=>o._render(n),o._componentId)}return x}:m},set(c,a,u){if(c[a]=u,!o._initializing){const m=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(m,u),$e(()=>o._render(n),o._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!o._initializing){const u=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(u,void 0),$e(()=>o._render(n),o._componentId)}return!0}});if(i&&typeof i=="object"){if(D(i))return i;for(const c in i){const a=s?`${s}.${c}`:c;i[c]=r(i[c],a)}return new Proxy(i,{set(c,a,u){const m=s?`${s}.${String(a)}`:String(a);return c[a]=r(u,m),o._initializing||(o._triggerWatchers(m,c[a]),$e(()=>o._render(n),o._componentId)),!0},get(c,a,u){return Reflect.get(c,a,u)}})}return i};const o=this;return r({...n.props?Object.fromEntries(Object.entries(n.props).map(([i,s])=>[i,s.default])):{}})}catch{return{}}}_initWatchers(n){this._runLogicWithinErrorBoundary(n,()=>{yn(this.context,this._watchers,{})})}_triggerWatchers(n,r){bn(this.context,this._watchers,n,r)}_applyProps(n){this._runLogicWithinErrorBoundary(n,()=>{try{wn(this,n,this.context)}catch(r){this._hasError=!0,n.onError&&n.onError(r,this.context)}})}}}function vt(e,t){let n=re(e);n.includes("-")||(n=`cer-${n}`);let r={};const o={props:{},onConnected:i=>{r.onConnected&&r.onConnected()},onDisconnected:i=>{r.onDisconnected&&r.onDisconnected()},onAttributeChanged:(i,s,c,a)=>{r.onAttributeChanged&&r.onAttributeChanged(i,s,c)},onError:(i,s)=>{r.onError&&i&&r.onError(i)},render:i=>{const s=i._componentId||`${n}-${Math.random().toString(36).substr(2,9)}`;ee.setCurrentComponent(s,()=>{i.requestRender&&i.requestRender()});try{tn(i);let c;try{c=t()}catch(a){try{const u=i?._hookCallbacks;if(u&&typeof u.onError=="function")try{u.onError(a)}catch{}}catch{}throw a}if(i._hookCallbacks){const a=i._hookCallbacks;if(a.onConnected&&(r.onConnected=a.onConnected),a.onDisconnected&&(r.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(r.onAttributeChanged=a.onAttributeChanged),a.onError&&(r.onError=a.onError),a.style&&(i._styleCallback=a.style),a.props){const u=a.props;o.props=Object.fromEntries(Object.entries(u).map(([m,y])=>[m,{type:typeof y=="boolean"?Boolean:typeof y=="number"?Number:typeof y=="string"?String:Function,default:y}])),je.set(n,o)}}return c}finally{bt(),ee.clearCurrentComponent()}}};if(je.set(n,o),typeof window<"u"){try{const i={_hookCallbacks:{},requestRender:()=>{}};tn(i);try{t()}catch(s){try{const c=i?._hookCallbacks;if(c&&typeof c.onError=="function")try{c.onError(s)}catch{}H(`Error during component discovery render <${n}>:`,s),Q("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().")}catch{}throw bt(),s}if(bt(),i._hookCallbacks?.props){const s=i._hookCallbacks.props;o.props=Object.fromEntries(Object.entries(s).map(([c,a])=>[c,{type:typeof a=="boolean"?Boolean:typeof a=="number"?Number:typeof a=="string"?String:Function,default:a}])),je.set(n,o)}}catch{}customElements.get(n)||customElements.define(n,dr(n,o))}}class pr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}set(t,n){if(this.map.delete(t),this.map.set(t,n),this.map.size>this.maxSize){const r=this.map.keys().next().value;r!==void 0&&this.map.delete(r)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const wt=new pr(500);function hr(e,t){if(e==null){Q(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&Q(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&Q(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function ge(e,t={},n,r){const o=r??t.key;return{tag:e,key:o,props:t,children:n}}function Ie(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Fe(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Ie(e)}function gr(e,t){return e.key!=null?e:{...e,key:t}}function mr(e,t=[],n={}){const r={},o={},i={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const u=a[1],m=a[2],y=(a[4]||a[6])??"",p=a[3]===void 0&&a[6]===void 0,x=y.match(/^{{(\d+)}}$/);let d=p?!0:x?t[Number(x[1])]??null:y;x||(d==="true"?d=!0:d==="false"?d=!1:d==="null"?d=null:isNaN(Number(d))||(d=Number(d)));const f=["model","bind","show","class","style","ref","when"];if(u===":"){const[h,l]=m.split(":"),[g,...v]=h.split(".");if(f.includes(g)){const k=[...v],S=g==="model"&&l?`model:${l}`:g;i[S]={value:d,modifiers:k,arg:l}}else if(m==="disabled"){let k=d;k&&D(k)&&(k=k.value);const S=typeof k;if(k===""||S==="boolean"||S==="string"&&(k==="true"||k==="false")||k==null||S==="number")r[m]=k;else{let w=d;w&&D(w)&&(w=w.value),o[m]=w}s.push(m)}else{let k=d;k&&D(k)&&(k=k.value),o[m]=k,s.push(m)}}else if(u==="@"){const[h,...l]=m.split("."),g=l;hr(d,h);const v=typeof d=="function"?d:typeof n[d]=="function"?n[d]:void 0;if(v){const k=E=>{if(g.includes("prevent")&&E.preventDefault(),g.includes("stop")&&E.stopPropagation(),!(g.includes("self")&&E.target!==E.currentTarget))return g.includes("once")&&E.currentTarget?.removeEventListener(h,k),v(E)},S="on"+h.charAt(0).toUpperCase()+h.slice(1);r[S]=k}}else m==="ref"?r.ref=d:o[m]=d}return{props:r,attrs:o,directives:i,bound:s}}function kt(e){if(!Fe(e)||Ie(e))return e;const t=e.props?.directives;if(t&&t.when){const n=t.when.value,r=D(n)?n.value:n,{when:o,...i}=t,s={...e.props};Object.keys(i).length>0?s.directives=i:delete s.directives;const c={...e,props:s};return Array.isArray(c.children)&&(c.children=c.children.map(u=>typeof u=="object"&&u!==null?kt(u):u)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[c]:[]}}if(Array.isArray(e.children)){const n=e.children.map(r=>typeof r=="object"&&r!==null?kt(r):r);return{...e,children:n}}return e}function yr(e,t,n){const r=He.length>0?He[He.length-1]:void 0,o=n??r,i=!n&&t.length===0,s=i?e.join("<!--TEMPLATE_DELIM-->"):null;if(i&&s){const w=wt.get(s);if(w)return w}function c(w,T){return ge("#text",{},w,T)}function a(w,T){const $=typeof w=="string"?se(w):w;return ge("#text",{},$,T)}let u="";for(let w=0;w<e.length;w++)u+=e[w],w<t.length&&(u+=`{{${w}}}`);const m=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,y=[];let p,x=[],d=null,f={},h,l=0,g=[];function v(w){!w||typeof w!="object"||Ie(w)||(w.props||w.attrs?(w.props&&(f.props||(f.props={}),Object.assign(f.props,w.props)),w.attrs&&(f.attrs||(f.attrs={}),Object.keys(w.attrs).forEach(T=>{if(T==="style"&&f.attrs.style){const $=f.attrs.style.replace(/;?\s*$/,""),b=w.attrs.style.replace(/^;?\s*/,"");f.attrs.style=$+"; "+b}else if(T==="class"&&f.attrs.class){const $=f.attrs.class.trim().split(/\s+/).filter(Boolean),b=w.attrs.class.trim().split(/\s+/).filter(Boolean),_=[...new Set([...$,...b])];f.attrs.class=_.join(" ")}else f.attrs[T]=w.attrs[T]}))):(f.props||(f.props={}),Object.assign(f.props,w)))}function k(w,T){const $=d?x:g;if(Ie(w)){const b=w.key??T;let _=w.children;$.push({...w,key:b,children:_});return}if(Fe(w)){$.push(gr(w,void 0));return}if(Array.isArray(w)){if(w.length===0)return;for(let b=0;b<w.length;b++){const _=w[b];Ie(_)||Fe(_)||Array.isArray(_)?k(_,`${T}-${b}`):_!==null&&typeof _=="object"?Mt(_)?$.push(ge("#raw",{},_.__rawHTML,`${T}-${b}`)):v(_):$.push(c(String(_),`${T}-${b}`))}return}if(w!==null&&typeof w=="object"){if(Mt(w)){const b=w.__rawHTML??"";$.push(ge("#raw",{},b,T));return}v(w);return}$.push(c(String(w),T))}const S=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;p=m.exec(u);)if(!(p[0].startsWith("<!--")&&p[0].endsWith("-->"))){if(p[1]){const w=p[1],T=p[0][1]==="/",$=p[0][p[0].length-2]==="/"||S.has(w),{props:b,attrs:_,directives:P,bound:j}=mr(p[2]||"",t,o),A={props:{},attrs:{}};for(const R in b)A.props[R]=b[R];for(const R in _)A.attrs[R]=_[R];A.attrs&&Object.prototype.hasOwnProperty.call(A.attrs,"key")&&!(A.props&&Object.prototype.hasOwnProperty.call(A.props,"key"))&&M(()=>{A.props.key=A.attrs.key});try{const R={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},N=w.toLowerCase(),pe=R[N]??[];if(A.attrs){for(const q of pe)if(j&&j.includes(q)&&q in A.attrs&&!(A.props&&q in A.props)){let I=A.attrs[q];if(I&&D(I))I=I.value,A.props[q]=I,delete A.attrs[q];else{const V=typeof I;q==="disabled"?(I===""||V==="boolean"||V==="string"&&(I==="true"||I==="false")||I==null||V==="number")&&(A.props[q]=I,M(()=>{const W=globalThis;W.__VDOM_DISABLED_PROMOTIONS||(W.__VDOM_DISABLED_PROMOTIONS=[]),W.__VDOM_DISABLED_PROMOTIONS.push({phase:"compiler-promotion",tag:w,propName:q,value:I,time:Date.now(),stack:new Error().stack})}),delete A.attrs[q]):(I===""||V==="string"||V==="number"||V==="boolean"||I==null)&&(A.props[q]=I,delete A.attrs[q])}}}if((w.includes("-")||!!o?.__customElements?.has?.(w))&&(A.isCustomElement=!0,j&&A.attrs)){const q=new Set(["id","name","data-key","key"]);for(const I of j)if(I in A.attrs&&!(A.props&&I in A.props)){const V=I.includes("-")?rt(I):I;let le=A.attrs[I];A.props[V]=le,q.has(I)||delete A.attrs[I]}}}catch{}if(P&&Object.keys(P).some(R=>R==="model"||R.startsWith("model:")))try{const R=Symbol.for("cer.registry"),N=globalThis[R],pe=!!(N&&typeof N.has=="function"&&N.has(w)),Z=!!(o&&(o.__customElements instanceof Set&&o.__customElements.has(w)||Array.isArray(o.__isCustomElements)&&o.__isCustomElements.includes(w)));if(!!(w.includes("-")||Z||pe))for(const V of Object.keys(P)){if(V!=="model"&&!V.startsWith("model:"))continue;const le=P[V],We=le.arg??(V.includes(":")?V.split(":",2)[1]:void 0),W=le.value,fe=We??"modelValue",L=J,B=Ve,G=o?o._state||o:void 0;let U;typeof W=="string"&&o?U=L(G,W):U=W,A.props[fe]=U;try{const ye=re(fe);A.attrs||(A.attrs={}),U!=null&&(typeof U=="string"||typeof U=="number"||typeof U=="boolean")&&(A.attrs[ye]=U)}catch{}A.isCustomElement=!0;const X=`update:${re(fe)}`.replace(/-([a-z])/g,(ye,de)=>de.toUpperCase()),Nr="on"+X.charAt(0).toUpperCase()+X.slice(1);A.props[Nr]=function(ye){const de=ye.detail!==void 0?ye.detail:ye.target?ye.target.value:void 0;if(G)if(W&&D(W)){const ke=W.value;(Array.isArray(de)&&Array.isArray(ke)?JSON.stringify([...de].sort())!==JSON.stringify([...ke].sort()):de!==ke)&&(W.value=de,o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}else{const ke=L(G,typeof W=="string"?W:String(W));(Array.isArray(de)&&Array.isArray(ke)?JSON.stringify([...de].sort())!==JSON.stringify([...ke].sort()):de!==ke)&&(B(G,typeof W=="string"?W:String(W),de),o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}},delete P[V]}}catch{}if(Object.keys(P).length>0&&(A.directives={...P}),T){const R=ge(d,f,x.length===1&&Fe(x[0])&&x[0].tag==="#text"?typeof x[0].children=="string"?x[0].children:"":x.length?x:void 0,h),N=y.pop();N?(d=N.tag,f=N.props,h=N.key,x=N.children,x.push(R)):(g.push(R),d=null,f={},h=void 0,x=[])}else $?d?x.push(ge(w,A,void 0,void 0)):g.push(ge(w,A,void 0,void 0)):(d&&y.push({tag:d,props:f,children:x,key:h}),d=w,f=A,x=[])}else if(typeof p[3]<"u"){const w=Number(p[3]),T=t[w],$=`interp-${w}`;k(T,$)}else if(p[4]){const w=p[4],T=d?x:g,$=w.split(/({{\d+}})/);for(const b of $){if(!b)continue;const _=b.match(/^{{(\d+)}}$/);if(_){const P=Number(_[1]),j=t[P],A=`interp-${P}`;k(j,A)}else{const P=`text-${l++}`;T.push(a(b,P))}}}}const C=g.filter(w=>Fe(w)&&w.tag==="#text"?typeof w.children=="string"&&w.children.trim()!=="":!0).map(w=>kt(w));if(C.length===1){const w=C[0];return i&&s&&wt.set(s,w),w}else if(C.length>1){const w=C;return i&&s&&wt.set(s,w),w}return ge("div",{},"","fallback-root")}function me(e,...t){const n=t[t.length-1],r=typeof n=="object"&&n&&!Array.isArray(n)?n:void 0;return yr(e,t,r)}function br(e,t){return De(!e,t)}function vr(e,t){const n=!e||e.length===0;return De(n,t)}function wr(e,t){const n=!!(e&&e.length>0);return De(n,t)}function kr(e,t,n){const r=[];return e.forEach((o,i)=>{t(o,i)&&r.push({item:o,originalIndex:i})}),r.map(({item:o,originalIndex:i},s)=>{const c=typeof o=="object"&&o!=null?o?.key??o?.id??`filtered-${i}`:`filtered-${i}`;return z(n(o,i,s),`each-where-${c}`)})}function xr(e,t){const n=e?.length??0;return n===0&&t.empty?z(t.empty,"switch-length-empty"):n===1&&t.one?z(t.one(e[0]),"switch-length-one"):t.exactly?.[n]?z(t.exactly[n](e),`switch-length-${n}`):n>1&&t.many?z(t.many(e),"switch-length-many"):z([],"switch-length-fallback")}function $r(e,t,n){const r=new Map;return e.forEach(o=>{const i=t(o);r.has(i)||r.set(i,[]),r.get(i).push(o)}),Array.from(r.entries()).map(([o,i],s)=>z(n(o,i,s),`each-group-${o}`))}function Er(e,t,n,r){const o=n*t,i=Math.min(o+t,e.length);return e.slice(o,i).map((c,a)=>{const u=o+a,m=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${u}`:`page-${u}`;return z(r(c,u,a),`each-page-${m}`)})}function Cr(e,t){return e.loading&&t.loading?z(t.loading,"promise-loading"):e.error&&t.error?z(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?z(t.success(e.data),"promise-success"):t.idle?z(t.idle,"promise-idle"):z([],"promise-fallback")}function Y(e,t){const n=typeof window<"u"&&window.matchMedia?.(e)?.matches;return De(!!n,t)}const ue={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},xt=["sm","md","lg","xl","2xl"],rn={sm:e=>Y(ue.sm,e),md:e=>Y(ue.md,e),lg:e=>Y(ue.lg,e),xl:e=>Y(ue.xl,e),"2xl":e=>Y(ue["2xl"],e),dark:e=>Y(ue.dark,e),light:e=>Y("(prefers-color-scheme: light)",e),touch:e=>Y("(hover: none) and (pointer: coarse)",e),mouse:e=>Y("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>Y("(prefers-reduced-motion: reduce)",e),highContrast:e=>Y("(prefers-contrast: high)",e),portrait:e=>Y("(orientation: portrait)",e),landscape:e=>Y("(orientation: landscape)",e)};function _r(e,t){const n=[];e.includes("dark")?n.push(ue.dark):e.includes("light")&&n.push("(prefers-color-scheme: light)");const r=e.filter(s=>xt.includes(s)),o=r[r.length-1];o&&o in ue&&n.push(ue[o]);const i=n.length>0?n.join(" and "):"all";return Y(i,t)}function Sr(e){const t=[];return e.base&&t.push(z(e.base,"responsive-base")),xt.forEach(n=>{const r=e[n];r&&t.push(rn[n](r))}),t}function Ar(e){const t=[];let n=null;return{case(r,o){const i=typeof r=="function"?r:s=>s===r;return t.push({condition:i,content:o}),this},when(r,o){return t.push({condition:r,content:o}),this},otherwise(r){return n=r,this},done(){for(let r=0;r<t.length;r++){const{condition:o,content:i}=t[r];if(o(e))return z(i,`switch-case-${r}`)}return z(n||[],"switch-otherwise")}}}class we extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return we.instance||(we.instance=new we),we.instance}emit(t,n){const r=Date.now(),o=this.eventCounters.get(t);if(!o||r-o.window>1e3)this.eventCounters.set(t,{count:1,window:r});else if(o.count++,o.count>50&&o.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!1,cancelable:!0}));const i=this.handlers[t];i&&i.forEach(s=>{try{s(n)}catch(c){H(`Error in global event handler for "${t}":`,c)}})}on(t,n){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(n),()=>this.off(t,n)}off(t,n){const r=this.handlers[t];r&&r.delete(n)}offAll(t){delete this.handlers[t]}listen(t,n,r){return this.addEventListener(t,n,r),()=>this.removeEventListener(t,n)}once(t,n){return new Promise(r=>{const o=this.on(t,i=>{o(),n(i),r(i)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[n,r]of this.eventCounters.entries())t[n]={count:r.count,handlersCount:this.getHandlerCount(n)};return t}resetEventCounters(){this.eventCounters.clear()}}const Le=we.getInstance(),Tr=(e,t)=>Le.emit(e,t),jr=(e,t)=>Le.on(e,t),Lr=(e,t)=>Le.off(e,t),Or=(e,t)=>Le.once(e,t),Pr=(e,t,n)=>Le.listen(e,t,n);function $t(e){let t={...e};const n=[];function r(c){n.push(c),c(t)}function o(){return t}function i(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){n.forEach(c=>c(t))}return{subscribe:r,getState:o,setState:i}}const Et=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},ce=(e,t)=>{for(const n of e){const r=[],o=n.path.replace(/:[^/]+/g,c=>(r.push(c.slice(1)),"([^/]+)")),i=new RegExp(`^${o}$`),s=t.match(i);if(s){const c={};return r.forEach((a,u)=>{c[a]=s[u+1]}),{route:n,params:c}}}return{route:null,params:{}}},Ct={};async function on(e){if(e.component)return e.component;if(e.load){if(Ct[e.path])return Ct[e.path];try{const t=await e.load();return Ct[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function sn(e){const{routes:t,base:n="",initialUrl:r}=e;let o,i,s,c,a,u,m;const y=async(f,h)=>{const l=t.find(g=>ce([g],f.path).route!==null);if(l?.beforeEnter)try{const g=await l.beforeEnter(f,h);return typeof g=="string"?(await d(g,!0),!1):g!==!1}catch(g){return H("beforeEnter error",g),!1}return!0},p=async(f,h)=>{const l=t.find(g=>ce([g],f.path).route!==null);if(l?.onEnter)try{const g=await l.onEnter(f,h);return typeof g=="string"?(await d(g,!0),!1):g!==!1}catch(g){return H("onEnter error",g),!1}return!0},x=(f,h)=>{const l=t.find(g=>ce([g],f.path).route!==null);if(l?.afterEnter)try{l.afterEnter(f,h)}catch(g){H("afterEnter error",g)}},d=async(f,h=!1)=>{try{const l={path:f.replace(n,"")||"/",query:{}},g=ce(t,l.path);if(!g)throw new Error(`No route found for ${l.path}`);const v=s.getState(),k={path:l.path,params:g.params,query:l.query};if(!await y(k,v)||!await p(k,v))return;typeof window<"u"&&typeof document<"u"&&(h?window.history.replaceState({},"",n+f):window.history.pushState({},"",n+f)),s.setState(k),x(k,v)}catch(l){H("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof r>"u"){o=()=>{const h=new URL(window.location.href),l=h.pathname.replace(n,"")||"/",g=Et(h.search);return{path:l,query:g}},i=o();const f=ce(t,i.path);s=$t({path:i.path,params:f.params,query:i.query}),c=async(h=!1)=>{const l=o();await d(l.path,h)},window.addEventListener("popstate",()=>c(!0)),a=h=>d(h,!1),u=h=>d(h,!0),m=()=>window.history.back()}else{o=()=>{const l=new URL(r||"/","http://localhost"),g=l.pathname.replace(n,"")||"/",v=Et(l.search);return{path:g,query:v}},i=o();const f=ce(t,i.path);s=$t({path:i.path,params:f.params,query:i.query}),c=async()=>{const l=o();await h(l.path)};const h=async l=>{try{const g={path:l.replace(n,"")||"/",query:{}},v=ce(t,g.path);if(!v)throw new Error(`No route found for ${g.path}`);const k=s.getState(),S={path:g.path,params:v.params,query:g.query},E=t.find(C=>ce([C],S.path).route!==null);if(E?.beforeEnter)try{const C=await E.beforeEnter(S,k);if(typeof C=="string"){await h(C);return}if(C===!1)return}catch{return}if(E?.onEnter)try{const C=await E.onEnter(S,k);if(typeof C=="string"){await h(C);return}if(C===!1)return}catch{return}if(s.setState(S),E?.afterEnter)try{E.afterEnter(S,k)}catch{}}catch{}};a=async l=>h(l),u=async l=>h(l),m=()=>{}}return{store:s,push:a,replace:u,back:m,subscribe:s.subscribe,matchRoute:f=>ce(t,f),getCurrent:()=>s.getState(),resolveRouteComponent:on}}function Mr(e,t){return ce(e,t)}function Rr(e){const t=sn(e);return vt("router-view",(n={},r={})=>{const{onConnected:o}=r;if(o&&o(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return me`<div>Router not initialized.</div>`;const i=t.getCurrent(),{path:s}=i,c=t.matchRoute(s);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const u=a();return(u instanceof Promise?u:Promise.resolve(u)).then(y=>typeof y=="string"?{tag:y,props:{},children:[]}:y)}return me`<div>Invalid route component</div>`}).catch(()=>me`<div>Invalid route component</div>`):me`<div>Not found</div>`}),vt("router-link",(n={},r={})=>{const{to:o="",tag:i="a",replace:s=!1,exact:c=!1,activeClass:a="active",exactActiveClass:u="exact-active",ariaCurrentValue:m="page",disabled:y=!1,external:p=!1,class:x=""}=n,d=t.getCurrent(),f=d.path===o,h=c?f:d&&typeof d.path=="string"?d.path.startsWith(o):!1,l=f?`aria-current="${m}"`:"",g=(x||"").split(/\s+/).filter(Boolean),v={};for(const T of g)v[T]=!0;const k={...v,[a]:h,[u]:f},S=i==="button",E=y?S?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",C=p&&(i==="a"||!i)?'target="_blank" rel="noopener noreferrer"':"",w=T=>{if(y){T.preventDefault();return}p&&(i==="a"||!i)||(T.preventDefault(),s?t.replace(o):t.push(o))};return me`
|
|
128
|
+
${Qt().when(S,me`
|
|
127
129
|
<button
|
|
128
130
|
part="button"
|
|
129
131
|
:class="${k}"
|
|
130
132
|
${l}
|
|
133
|
+
${E}
|
|
131
134
|
${C}
|
|
132
|
-
${
|
|
133
|
-
@click="${A}"
|
|
135
|
+
@click="${w}"
|
|
134
136
|
><slot></slot></button>
|
|
135
|
-
`).otherwise(
|
|
137
|
+
`).otherwise(me`
|
|
136
138
|
<a
|
|
137
139
|
part="link"
|
|
138
|
-
href="${
|
|
140
|
+
href="${o}"
|
|
139
141
|
:class="${k}"
|
|
140
142
|
${l}
|
|
143
|
+
${E}
|
|
141
144
|
${C}
|
|
142
|
-
${
|
|
143
|
-
@click="${A}"
|
|
145
|
+
@click="${w}"
|
|
144
146
|
><slot></slot></a>
|
|
145
147
|
`).done()}
|
|
146
|
-
`}),t}
|
|
148
|
+
`}),t}O.GlobalEventBus=we,O.Transition=Yn,O.TransitionGroup=Qn,O.anchorBlock=z,O.component=vt,O.computed=pn,O.createStore=$t,O.createTransitionPreset=er,O.css=zt,O.decodeEntities=se,O.each=Jn,O.eachGroup=$r,O.eachPage=Er,O.eachWhere=kr,O.emit=Tr,O.eventBus=Le,O.getTransitionStyleSheet=tt,O.html=me,O.initRouter=Rr,O.listen=Pr,O.match=Qt,O.matchRoute=ce,O.matchRouteSSR=Mr,O.mediaVariants=ue,O.off=Lr,O.on=jr,O.once=Or,O.parseQuery=Et,O.ref=dn,O.renderToString=Xe,O.resolveRouteComponent=on,O.responsive=rn,O.responsiveOrder=xt,O.responsiveSwitch=Sr,O.switchOn=Ar,O.switchOnLength=xr,O.switchOnPromise=Cr,O.transitionPresets=Ae,O.unless=br,O.unsafeHTML=mn,O.useEmit=ir,O.useOnAttributeChanged=cr,O.useOnConnected=sr,O.useOnDisconnected=ar,O.useOnError=lr,O.useProps=ur,O.useRouter=sn,O.useStyle=fr,O.watch=hn,O.when=De,O.whenEmpty=vr,O.whenMedia=Y,O.whenNotEmpty=wr,O.whenVariants=_r,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
|
|
147
149
|
//# sourceMappingURL=custom-elements-runtime.umd.js.map
|