@jasonshimmy/custom-elements-runtime 2.2.0 → 2.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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./helpers-D3UjNfYY.cjs"),j=require("./logger-CqdBMdui.cjs"),Y=require("./transitions-BO7bCYYx.cjs");function Je(e,r,n){if(n)for(const[t,s]of Object.entries(n)){let o,i={};if(Array.isArray(s)?(o=s[0],i=s[1]||{}):o=s,r.set(t,{callback:o,options:i,oldValue:p.getNestedValue(e,t)}),i.immediate)try{const a=p.getNestedValue(e,t);o(a,void 0,e)}catch(a){j.devError(`Error in immediate watcher for "${t}":`,a)}}}function Ye(e,r,n,t){const s=(i,a)=>{if(i===a)return!0;if(typeof i!=typeof a||typeof i!="object"||i===null||a===null)return!1;if(Array.isArray(i)&&Array.isArray(a))return i.length!==a.length?!1:i.every((c,g)=>s(c,a[g]));const f=i,u=a,_=Object.keys(f||{}),S=Object.keys(u||{});return _.length!==S.length?!1:_.every(c=>s(f[c],u[c]))},o=r.get(n);if(o&&!s(t,o.oldValue))try{o.callback(t,o.oldValue,e),o.oldValue=t}catch(i){j.devError(`Error in watcher for "${n}":`,i)}for(const[i,a]of r.entries())if(a.options.deep&&n.startsWith(i+"."))try{const f=p.getNestedValue(e,i);s(f,a.oldValue)||(a.callback(f,a.oldValue,e),a.oldValue=f)}catch(f){j.devError(`Error in deep watcher for "${i}":`,f)}}function Ae(e,r){return r===Boolean?e===""||e==="true":r===Number?Number(e):e}function Xe(e,r,n){if(r)for(const t in r){const s=r[t],o=p.toKebab(t),i=e.getAttribute(o);if(s.type===Function&&typeof e[t]=="function")n[t]=e[t];else if(i!==null)n[t]=Ae(i,s.type);else if(typeof e[t]<"u")try{const a=e[t];if(s.type===String&&a&&typeof a=="object")try{n[t]=Ae(String(a),s.type)}catch{n[t]=a}else s.type===Boolean&&typeof a=="boolean"||s.type===Number&&typeof a=="number"||s.type===Function&&typeof a=="function"?n[t]=a:n[t]=Ae(String(a),s.type)}catch{n[t]=e[t]}else"default"in s&&s.default!==void 0&&(n[t]=s.default)}}function Qe(e,r,n){if(!r.props){try{const t=n?._hookCallbacks?.props||{},s=Array.from(new Set([...Object.keys(e||{}),...Object.keys(t||{})]));for(const o of s){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(n,o);if(!(!Object.prototype.hasOwnProperty.call(t,o)&&i&&(i.get||i.set||!i.configurable)))try{Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get(){try{const f=p.toKebab(o),u=e.getAttribute(f);if(u!==null)return u;const _=e[o];let S;return p.isReactiveState(_)||_&&typeof _=="object"&&"value"in _&&!(_ instanceof Node)?S=_.value:S=_,S}catch{return e[o]}}})}catch{}}}catch{}return}Xe(e,r.props,n)}function et(e,r,n,t){e.onConnected&&!n&&(e.onConnected(r),t(!0))}function tt(e,r,n,t,s,o,i,a){e.onDisconnected&&e.onDisconnected(r),n.forEach(f=>f()),t(),s(),o(!1),i(null),a(!1)}function nt(e,r,n,t,s){e.onAttributeChanged&&e.onAttributeChanged(r,n,t,s)}class rt{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(r,n){const t=this.cache.get(r);if(t){if(!t.isSecure){j.devWarn("Blocked cached dangerous expression:",r);return}try{this.cache.delete(r),this.cache.set(r,t)}catch{}return t.evaluator(n)}const s=this.createEvaluator(r);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(r,s),!s.isSecure){j.devWarn("Blocked dangerous expression:",r);return}return s.evaluator(n)}static createEvaluator(r){if(this.hasDangerousPatterns(r))return{evaluator:()=>{},isSecure:!1};if(r.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(r),isSecure:!0}}catch(n){return j.devWarn("Failed to create evaluator for expression:",r,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(r){return this.dangerousPatterns.some(n=>n.test(r))}static createSafeEvaluator(r){const n=r.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(r);if(/^ctx\.[a-zA-Z0-9_.]+$/.test(r.trim())){const t=r.trim().slice(4);return s=>p.getNestedValue(s,t)}return r.includes("ctx")||/[+\-*/%<>=&|?:[\]]/.test(r)?this.createSimpleEvaluator(r):t=>p.getNestedValue(t,r)}static createObjectEvaluator(r){const n=r.trim().slice(1,-1),t=this.parseObjectProperties(n);return s=>{const o={};for(const{key:i,value:a}of t)try{if(a.startsWith("ctx.")){const f=a.slice(4);o[i]=p.getNestedValue(s,f)}else o[i]=this.evaluateSimpleValue(a,s)}catch{o[i]=void 0}return o}}static parseObjectProperties(r){const n=[],t=r.split(",");for(const s of t){const o=s.indexOf(":");if(o===-1)continue;const i=s.slice(0,o).trim(),a=s.slice(o+1).trim(),f=i.replace(/^['"]|['"]$/g,"");n.push({key:f,value:a})}return n}static createSimpleEvaluator(r){return n=>{try{let t=r;const s=[];t=t.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,S=>`<<#${s.push(S)-1}#>>`);const o=t.match(/ctx\.[\w.]+/g)||[];for(const S of o){const c=S.slice(4),g=p.getNestedValue(n,c);if(g===void 0)return;const d=s.push(JSON.stringify(g))-1;t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const i=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,a=t.match(i)||[];for(const S of a){if(S.startsWith("ctx."))continue;const c=p.getNestedValue(n,S);if(c===void 0)return;const g=s.push(JSON.stringify(c))-1;t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${g}#>>`)}const f=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let u;const _=new Set;for(;(u=f.exec(t))!==null;){const S=u[1];if(["true","false","null","undefined"].includes(S)||/^[0-9]+$/.test(S)||S==="ctx"||_.has(S))continue;_.add(S);const c=p.getNestedValue(n,S);if(c===void 0)return;const g=JSON.stringify(c),d=s.push(g)-1;S.includes(".")?t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`):t=t.replace(new RegExp("\\b"+S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${d}#>>`)}t=t.replace(/<<#(\d+)#>>/g,(S,c)=>s[Number(c)]);try{return this.evaluateBasicExpression(t)}catch{return}}catch{return}}}static evaluateBasicExpression(r){const n=this.tokenize(r);let t=0;function s(){return n[t]}function o(l){const E=n[t++];if(l&&!E)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&E&&E.type!==l&&E.value!==l)throw new Error(`Unexpected token ${E.type}/${E.value}, expected ${l}`);return E}function i(){return d()}function a(l){if(typeof l=="number")return l;if(l==null)return NaN;if(typeof l=="boolean")return l?1:0;const E=Number(l);return Number.isNaN(E)?NaN:E}function f(l,E){return typeof l=="string"||typeof E=="string"?String(l)+String(E):a(l)+a(E)}function u(l,E){return a(l)-a(E)}function _(l,E){return a(l)*a(E)}function S(l,E){return a(l)/a(E)}function c(l,E){return a(l)%a(E)}function g(l,E,y){if(typeof E=="number"&&typeof y=="number")switch(l){case">":return E>y;case"<":return E<y;case">=":return E>=y;case"<=":return E<=y;default:return!1}const h=String(E),C=String(y);switch(l){case">":return h>C;case"<":return h<C;case">=":return h>=C;case"<=":return h<=C;default:return!1}}function d(){const l=b(),E=s();if(E&&E.value==="?"){o("?");const y=i();o(":");const h=i();return l?y:h}return l}function b(){let l=m();for(;;){const E=s();if(!E||E.value!=="||")break;o("OP");const y=m();l=l||y}return l}function m(){let l=L();for(;;){const E=s();if(!E||E.value!=="&&")break;o("OP");const y=L();l=l&&y}return l}function L(){let l=w();for(;;){const E=s();if(!E||!["==","!=","===","!=="].includes(E.value))break;const y=o("OP").value,h=w();switch(y){case"==":l=l==h;break;case"!=":l=l!=h;break;case"===":l=l===h;break;case"!==":l=l!==h;break}}return l}function w(){let l=v();for(;;){const E=s();if(!E||![">","<",">=","<="].includes(E.value))break;const y=o("OP").value,h=v();switch(y){case">":l=g(">",l,h);break;case"<":l=g("<",l,h);break;case">=":l=g(">=",l,h);break;case"<=":l=g("<=",l,h);break}}return l}function v(){let l=k();for(;;){const E=s();if(!E||E.value!=="+"&&E.value!=="-")break;const y=o("OP").value,h=k();l=y==="+"?f(l,h):u(l,h)}return l}function k(){let l=T();for(;;){const E=s();if(!E||E.value!=="*"&&E.value!=="/"&&E.value!=="%")break;const y=o("OP").value,h=T();switch(y){case"*":l=_(l,h);break;case"/":l=S(l,h);break;case"%":l=c(l,h);break}}return l}function T(){const l=s();if(l&&l.value==="!")return o("OP"),!T();if(l&&l.value==="-"){o("OP");const E=T();return u(0,E)}return N()}function N(){const l=s();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 E=[];for(;;){const y=s();if(!y||y.value==="]")break;E.push(i());const h=s();h&&h.value===","&&o("PUNC")}return o("PUNC"),E}if(l.value==="("){o("PUNC");const E=i();return o("PUNC"),E}throw new Error("Unexpected token in expression")}}return i()}static tokenize(r){const n=[],t=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let s;for(;(s=t.exec(r))!==null;){const o=s[1];o&&(/^\d/.test(o)?n.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?n.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?n.push({type:"IDENT",value:o}):/^[()?:,[\]]$/.test(o)?n.push({type:"PUNC",value:o}):n.push({type:"OP",value:o}))}return n}static evaluateSimpleValue(r,n){if(r==="true")return!0;if(r==="false")return!1;if(!isNaN(Number(r)))return Number(r);if(r.startsWith("ctx.")){const t=r.slice(4);return p.getNestedValue(n,t)}return r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")?r.slice(1,-1):r}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class U{static cleanupFunctions=new WeakMap;static addListener(r,n,t,s){r.addEventListener(n,t,s);const i={event:n,handler:t,wrapper:t,options:s,cleanup:()=>r.removeEventListener(n,t,s),addedAt:Date.now()};this.cleanupFunctions.has(r)||this.cleanupFunctions.set(r,[]);const a=this.cleanupFunctions.get(r);a.push(i),a.__metaList=a}static removeListener(r,n,t,s){r.removeEventListener(n,t,s);const o=this.cleanupFunctions.get(r);if(o)for(let i=0;i<o.length;i++){const a=o[i];if(a.event===n&&a.handler===t){o.splice(i,1),o.length===0&&this.cleanupFunctions.delete(r);return}}}static cleanup(r){const n=this.cleanupFunctions.get(r);n&&(n.forEach(t=>{try{t.cleanup()}catch{}}),this.cleanupFunctions.delete(r))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(r){const n=this.cleanupFunctions.get(r);return!!(n&&n.length>0)}static getListenerCount(r){const n=this.cleanupFunctions.get(r);return n?n.length:0}static getListenerInfo(r){const n=this.cleanupFunctions.get(r);return n?n.map(t=>({event:t.event,handler:t.handler,wrapper:t.wrapper,options:t.options})):[]}}function Se(e,r){return Array.isArray(e)&&Array.isArray(r)?JSON.stringify([...e].sort())!==JSON.stringify([...r].sort()):e!==r}function He(e,r,n,t,s){if(e){const o=r.value;if(s&&typeof o=="object"&&o!==null){const i={...o};i[s]=n,r.value=i}else r.value=n}else{const o=t._state||t;p.setNestedValue(o,r,n)}}function _e(e,r,n,t){if(typeof e._requestRender=="function"&&e._requestRender(),typeof e._triggerWatchers=="function"){const s=r?"reactiveState":n;e._triggerWatchers(s,t)}}function st(e,r,n){const t=`update:${p.toKebab(r)}`,s=`update:${r}`,o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}),i=new CustomEvent(s,{detail:n,bubbles:!0,cancelable:!0});e.dispatchEvent(o),e.dispatchEvent(i)}function xe(e,r,n,t){const s=n;if(p.safe(()=>{if(typeof e.setAttribute=="function")try{e[r]=s}catch{}else e[r]=s}),s==null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"){const o=p.safeSerializeAttr(s);o!==null?p.safe(()=>{typeof e.setAttribute=="function"&&e.setAttribute(p.toKebab(r),o)}):p.safe(()=>{typeof e.removeAttribute=="function"&&e.removeAttribute(p.toKebab(r))})}}function it(e,r,n,t){if(e){const s=r.value;return t&&typeof s=="object"&&s!==null?s[t]:s}else{const s=n._state||n;return p.getNestedValue(s,r)}}function se(e){return e?e.split(/\s+/).filter(Boolean):[]}function ie(e,r){if(r.length===0)return;const n=r.filter(t=>t&&!e.classList.contains(t));n.length>0&&e.classList.add(...n)}function re(e,r){if(r.length===0)return;const n=r.filter(Boolean);n.length>0&&e.classList.remove(...n)}let we=!1;async function ot(e,r,n=10){if(!we){if(!e.isConnected){j.devWarn("⚠️ Element not connected to DOM, skipping style wait");return}for(let t=0;t<n;t++){const s=window.getComputedStyle(e),o=s.transform&&s.transform!=="",i=s.opacity&&s.opacity!=="";if(o||i){we=!0;return}await new Promise(a=>requestAnimationFrame(()=>a(void 0)))}we=!0,j.devWarn("⚠️ Styles did not load in time for transition, continuing anyway")}}function at(e){const r=window.getComputedStyle(e),n=r.transitionDuration||"0s",t=r.transitionDelay||"0s",s=o=>{const i=parseFloat(o);return o.includes("ms")?i:i*1e3};return s(n)+s(t)}function ze(e,r){return new Promise(n=>{const t=r??at(e);if(t<=0){n();return}let s=!1;const o=()=>{s||(s=!0,e.removeEventListener("transitionend",i),e.removeEventListener("transitioncancel",i),n())},i=()=>o();e.addEventListener("transitionend",i),e.addEventListener("transitioncancel",i),setTimeout(o,t+50)})}async function pe(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeEnter)try{t.onBeforeEnter(e)}catch(d){j.devError("Transition onBeforeEnter error:",d)}if(!s)return t?.onEnter?new Promise(d=>{const b=t.onEnter;typeof b=="function"?b(e,()=>{if(t?.onAfterEnter)try{t.onAfterEnter(e)}catch(m){j.devError("Transition onAfterEnter error:",m)}d()}):d()}):void 0;const i=se(n?.enterFrom),a=se(n?.enterActive),f=se(n?.enterTo);ie(e,i),e.offsetHeight,ie(e,a),e.offsetHeight;let u;if(t?.onEnter){const d=new Promise(b=>{u=b});try{const b=t.onEnter;typeof b=="function"&&b(e,()=>{u&&u()})}catch(b){j.devError("Transition onEnter error:",b)}u&&await d}await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.offsetHeight;const _=window.getComputedStyle(e),S=_.transform,c=_.opacity;re(e,i),S&&S!=="none"&&(e.style.transform=S),c&&c!==""&&(e.style.opacity=c),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.style.transform="",e.style.opacity="",ie(e,f),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0)));let g;if(typeof o=="number"?g=o:o&&typeof o=="object"&&"enter"in o&&(g=o.enter),await ze(e,g),re(e,a),t?.onAfterEnter)try{t.onAfterEnter(e)}catch(d){j.devError("Transition onAfterEnter error:",d)}}async function Te(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeLeave)try{t.onBeforeLeave(e)}catch(S){j.devError("Transition onBeforeLeave error:",S)}if(!s)return t?.onLeave?new Promise(S=>{const c=t.onLeave;typeof c=="function"?c(e,()=>{if(t?.onAfterLeave)try{t.onAfterLeave(e)}catch(g){j.devError("Transition onAfterLeave error:",g)}S()}):S()}):void 0;const i=se(n?.leaveFrom),a=se(n?.leaveActive),f=se(n?.leaveTo);ie(e,i),e.offsetHeight,ie(e,a);let u;if(t?.onLeave){const S=new Promise(c=>{u=c});try{const c=t.onLeave;typeof c=="function"&&c(e,()=>{u&&u()})}catch(c){j.devError("Transition onLeave error:",c)}u&&await S}await new Promise(S=>requestAnimationFrame(()=>S(void 0))),await ot(e,[...i,...a]),re(e,i),ie(e,f);let _;if(typeof o=="number"?_=o:o&&typeof o=="object"&&"leave"in o&&(_=o.leave),await ze(e,_),re(e,a),re(e,f),re(e,i),t?.onAfterLeave)try{t.onAfterLeave(e)}catch(S){j.devError("Transition onAfterLeave error:",S)}}const Ke=new WeakMap,Ve=new WeakMap;function ke(e){if(!e)return;const r=Ke.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n.key!=null)return String(n.key)}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function z(e,r){try{Ke.set(e,r)}catch{}try{e.key=r}catch{}try{if(e instanceof Element){const n=p.safeSerializeAttr(r);n!==null&&e.setAttribute("data-anchor-key",n)}}catch{}}function ct(e){if(!e)return;const r=Ve.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function lt(e,r){try{Ve.set(e,r)}catch{}try{e._transitionGroup=r}catch{}}function oe(e){return e!==null&&typeof e=="object"&&"value"in e}function Oe(e){try{if(p.isReactiveState(e))return e.value}catch{}try{if(oe(e))return e.value}catch{}return e}function V(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function ae(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?p.isReactiveState(e)||"value"in e?!!e.value:!1:!!e}function ne(e,r){if(!r||!(e instanceof HTMLElement))return;U.cleanup(e);for(const t in r)r[t]===e&&delete r[t];const n=e.childNodes;for(let t=0;t<n.length;t++)ne(n[t],r)}function he(e,r,n){if(typeof e=="string")return;const t=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),s=e.props?.ref??(e.props?.props&&e.props.props.ref);if(t)try{if(p.isReactiveState(t)||typeof t=="object"&&"value"in t)t.value=r;else if(typeof t=="function")t(r);else if(typeof t=="string"&&n)try{const o=String(t);n[o]=r}catch{}}catch{}else if(s&&n)try{const o=String(s);n[o]=r}catch{}}function ft(e,r,n,t,s,o,i,a){if(!o)return;const f=r.includes("lazy"),u=r.includes("trim"),_=r.includes("number"),S=()=>{if(p.isReactiveState(e)){const k=e.value;return a&&i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[a]:k}const v=o?._state||o;return p.getNestedValue(v,e)},c=S();let g="text";i instanceof HTMLInputElement?g=t?.type||i.type||"text":i instanceof HTMLSelectElement?g="select":i instanceof HTMLTextAreaElement&&(g="textarea");const d=i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement,m=d?g==="checkbox"||g==="radio"?"checked":"value":a??"modelValue";if(g==="checkbox")if(Array.isArray(c))n[m]=c.includes(String(i?.getAttribute("value")??t?.value??""));else{const v=i?.getAttribute("true-value")??!0;n[m]=c===v}else if(g==="radio")n[m]=c===(t?.value??"");else if(g==="select")if(i&&i.hasAttribute("multiple")&&i instanceof HTMLSelectElement){const v=Array.isArray(c)?c.map(String):[];setTimeout(()=>{Array.from(i.options).forEach(k=>{k.selected=v.includes(k.value)})},0),n[m]=Array.isArray(c)?c:[]}else n[m]=c;else{!d&&p.isReactiveState(e)?n[m]=e:n[m]=c;try{const v=p.toKebab(m);t&&(t[v]=c)}catch{}}const L=f||g==="checkbox"||g==="radio"||g==="select"?"change":"input",w=v=>{if(v.isComposing||s._isComposing)return;const k=globalThis.process,T=!!k&&k.env?.NODE_ENV==="test"||typeof window<"u"&&globalThis.__vitest__;if(v.isTrusted===!1&&!T)return;const N=v.target;if(!N||N._modelUpdating)return;let O=N.value;if(g==="checkbox"){const y=S();if(Array.isArray(y)){const h=N.getAttribute("value")??"",C=Array.from(y);if(N.checked)C.includes(h)||C.push(h);else{const P=C.indexOf(h);P>-1&&C.splice(P,1)}O=C}else{const h=N.getAttribute("true-value")??!0,C=N.getAttribute("false-value")??!1;O=N.checked?h:C}}else if(g==="radio")O=N.getAttribute("value")??N.value;else if(g==="select"&&N.multiple)O=Array.from(N.selectedOptions).map(y=>y.value);else if(u&&typeof O=="string"&&(O=O.trim()),_){const y=Number(O);isNaN(y)||(O=y)}const l=S();if(Se(O,l)){N._modelUpdating=!0;try{He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O),N&&st(N,m,O)}finally{setTimeout(()=>N._modelUpdating=!1,0)}}};if(d){if(s[L]){const v=s[L];i&&U.removeListener(i,L,v)}s[L]=w}else{const v=`update:${p.toKebab(m)}`,k=`update:${m}`;if(s[v]){const T=s[v];i&&U.removeListener(i,v,T)}if(s[k]){const T=s[k];i&&U.removeListener(i,k,T)}if(s[v]=T=>{const N=T.detail;let O=N!==void 0?N:void 0;if(O===void 0){const y=T.target;if(y&&typeof y=="object"&&"value"in y)try{O=y.value}catch{O=void 0}}const l=it(p.isReactiveState(e),e,o,a);if(Se(O,l)){He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O);const y=T.target;y&&xe(y,m,p.isReactiveState(e)?e:O,p.isReactiveState(e))}},p.isReactiveState(e)&&typeof e.value=="object"&&e.value!==null){let T=[];try{T=Reflect.ownKeys(e.value)}catch{T=Object.keys(e.value)}const N=T.filter(O=>typeof O=="string"&&!String(O).startsWith("_")&&O!=="constructor");for(const O of N){const l=String(O),E=`update:${p.toKebab(l)}`,y=`update:${l}`;s[E]||(s[E]=h=>{const C=h.detail!==void 0?h.detail:h.target?.value,P=p.isReactiveState(e)?e.value[l]:p.getNestedValue(o?._state||o,e);if(!Se(C,P))return;if(p.isReactiveState(e)){const x={...e.value};x[l]=C,e.value=x}else p.setNestedValue(o?._state||o,e,C);_e(o,p.isReactiveState(e),e,C);const A=h.currentTarget||i||h.target;A&&xe(A,m,p.isReactiveState(e)?e:C,p.isReactiveState(e))},s[y]=s[E])}}s[k]=s[v]}(g==="text"||g==="textarea")&&(s.compositionstart=()=>s._isComposing=!0,s.compositionend=v=>{s._isComposing=!1;const k=v.target;k&&setTimeout(()=>{const T=k.value,N=o?._state||o,O=p.getNestedValue(N,e);let l=T;if(u&&(l=l.trim()),_){const y=Number(l);isNaN(y)||(l=y)}if(Se(l,O)){k._modelUpdating=!0;try{p.setNestedValue(N,e,l),_e(o,p.isReactiveState(e),e,l)}finally{setTimeout(()=>k._modelUpdating=!1,0)}}},0)})}function Fe(e){const r=e.slice(2);return r?r.charAt(0).toLowerCase()+r.slice(1):""}function ut(e,r,n,t,s){if(typeof e=="object"&&e!==null)for(const[o,i]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")n[o]=i;else if(o==="disabled"&&s&&V(s)){const a=i&&typeof i=="object"&&"value"in i;(()=>{try{return p.isReactiveState(i)}catch{return!1}})()||a?r[o]=i:n[o]=i}else r[o]=i;else if(typeof e=="string"){if(!t)return;try{const o=be(e,t);if(typeof o=="object"&&o!==null){for(const[i,a]of Object.entries(o))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=a;else if(i==="disabled"&&s&&V(s)){const f=a&&typeof a=="object"&&"value"in a;(()=>{try{return p.isReactiveState(a)}catch{return!1}})()||f?r[i]=a:n[i]=a}else r[i]=a;return}else{n[e]=o;return}}catch{const o=p.getNestedValue(t,e);n[e]=o}}}function dt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;const s=String(r.style||"");let o=s;if(t){if(s){const i=String(s).split(";").map(f=>f.trim()).filter(Boolean),a=i.findIndex(f=>f.startsWith("display:"));a>=0&&i[a]==="display: none"&&(i.splice(a,1),o=i.length>0?i.join("; ")+";":"")}}else if(s){const i=String(s).split(";").filter(Boolean),a=i.findIndex(f=>f.trim().startsWith("display:"));a>=0?i[a]="display: none":i.push("display: none"),o=i.join("; ")}else o="display: none";o!==s&&(o?r.style=o:delete r.style)}function be(e,r){return rt.evaluate(e,r)}function pt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;try{if(t&&typeof t=="object"){if(p.isReactiveState(t))t=t.value;else if("value"in t&&typeof t.value<"u"){const a=t.value;a instanceof Node||(t=a)}}}catch{}let s=[];if(typeof t=="string")s=[t];else if(Array.isArray(t))s=t.filter(Boolean);else if(typeof t=="object"&&t!==null)for(const[a,f]of Object.entries(t))f&&s.push(a);const o=r.class||"",i=s.join(" ");r.class=o?`${o} ${i}`.trim():i}function Re(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,t=typeof n;return t==="boolean"?!0:t==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function ht(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;let s="";if(typeof t=="string")s=t;else if(t&&typeof t=="object"){const i=[];for(const[a,f]of Object.entries(t))if(f!=null&&f!==""){const u=a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`),_=["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 S=String(f);typeof f=="number"&&_.includes(u)&&(S=`${f}px`),i.push(`${u}: ${S}`)}s=i.join("; ")+(i.length>0?";":"")}const o=String(r.style||"");r.style=o+(o&&!o.endsWith(";")?"; ":"")+s}function yt(e,r,n){let t=e;typeof e=="string"&&n&&(t=be(e,n)),p.isReactiveState(t)?r.reactiveRef=t:r.ref=t}function Ue(e,r,n,t){const s={},o={...t||{}},i={};for(const[a,f]of Object.entries(e)){const{value:u,modifiers:_,arg:S}=f;if(a==="model"||a.startsWith("model:")){const c=a.split(":"),g=c.length>1?c[1]:S;ft(u,_,s,o,i,r,n,g);continue}switch(a){case"bind":ut(u,s,o,r,n);break;case"show":dt(u,o,r);break;case"class":pt(u,o,r);break;case"style":ht(u,o,r);break;case"ref":yt(u,s,r);break}}try{if(Object.prototype.hasOwnProperty.call(s,"disabled")&&n&&V(n)){const f=s.disabled,u=f&&typeof f=="object"&&"value"in f;let _=!1;try{_=p.isReactiveState(f)}catch{_=!1}if(!u&&!_)try{o.disabled=f,delete s.disabled;const S=globalThis;S.__VDOM_DISABLED_PROMOTIONS||(S.__VDOM_DISABLED_PROMOTIONS=[]),S.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:f,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:s,attrs:o,listeners:i}}function Pe(e,r){if(Array.isArray(e)){const o=new Set;return e.map(i=>{if(!i||typeof i!="object")return i;let a=i.props?.key??i.key;if(!a){const S=i.tag||"node",g=[i.props?.attrs?.id,i.props?.attrs?.name,i.props?.attrs?.["data-key"],i.props?.props?.id,i.props?.props?.name,i.props?.props?.dataKey,i.props?.props?.["data-key"]].find(d=>d!=null)??"";a=g?`${r}:${S}:${g}`:`${r}:${S}`}let f=a,u=1;for(;o.has(f);)f=`${a}#${u++}`;o.add(f);let _=i.children;return Array.isArray(_)&&(_=Pe(_,f)),{...i,key:f,children:_}})}const n=e,t=n.props?.key??n.key??r;let s=n.children;return Array.isArray(s)&&(s=Pe(s,t)),{...n,key:t,children:s}}function Ie(e,r,n,t){const s=n.directives??{},o=Ue(s,t,e,n.attrs),i={...r.props||{},...n.props||{},...o.props||{}},a={...r.attrs||{},...n.attrs||{},...o.attrs||{}},f=r.props??{},u=i,_=!!(n?.isCustomElement??r?.isCustomElement??!1);let S=!1;for(const d in{...f,...u}){const b=f[d],m=u[d];let L=b,w=m;if(p.safe(()=>{(p.isReactiveState(b)||oe(b))&&(L=b.value)}),p.safe(()=>{(p.isReactiveState(m)||oe(m))&&(w=m.value)}),!(b===m&&L===w))if(S=!0,d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const v=Oe(m),k=v==null?"":String(v);e.value!==k&&(e.value=k)}else if(d==="checked"&&e instanceof HTMLInputElement){const v=Oe(m);e.checked=!!v}else if(d.startsWith("on")&&typeof m=="function"){const v=Fe(d);typeof b=="function"&&U.removeListener(e,v,b),typeof m=="function"&&U.addListener(e,v,m);try{if(v&&v.startsWith("update:")){const k=v.split(":",2)[1],T=u[k];let N=[];try{if(p.isReactiveState(T)){const l=T.value;N=l&&typeof l=="object"?Object.keys(l):[]}else T&&typeof T=="object"&&(N=Object.keys(T))}catch{N=[]}const O=N.filter(l=>typeof l=="string"&&!l.startsWith("_")&&l!=="constructor");for(const l of O){const E=`update:${l}`,y=h=>{const C=h.detail!==void 0?h.detail:h.target instanceof HTMLInputElement||h.target instanceof HTMLTextAreaElement||h.target instanceof HTMLSelectElement?h.target.value:void 0,R={...p.isReactiveState(T)?T.value||{}:u[k]||{},[l]:C};try{typeof m=="function"&&m({detail:R})}catch{}};p.safe(()=>{U.addListener(e,E,y)})}}}catch{}}else if(m==null)e.removeAttribute(d);else{const v=n?.isCustomElement??r?.isCustomElement??!1;if(v||d in e)try{e[d]=m,d==="disabled"&&m===!1&&!v&&V(e)&&e.removeAttribute("disabled")}catch{}else m===!1&&e.removeAttribute(d)}}for(const[d,b]of Object.entries(o.listeners||{})){U.addListener(e,d,b);try{const m=e&&e.parentElement;m&&m!==e&&U.addListener(m,d,b)}catch{}}const c=r.attrs??{},g=a;for(const d in{...c,...g}){const b=c[d],m=g[d];let L=b,w=m;if(p.isReactiveState(b)&&(L=b.value),p.isReactiveState(m)&&(w=m.value),L!==w)if(S=!0,w==null||w===!1)p.safe(()=>{e.removeAttribute(d)}),d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?p.safe(()=>{e.value=""}):e instanceof HTMLSelectElement?p.safe(()=>{e.value=""}):e instanceof HTMLProgressElement&&p.safe(()=>{e.value=0})),d==="checked"&&e instanceof HTMLInputElement&&p.safe(()=>{e.checked=!1}),d==="disabled"&&V(e)&&p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=!1)});else{if(d==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLSelectElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLProgressElement){p.safe(()=>{e.value=Number(w)});continue}}if(d==="checked"&&e instanceof HTMLInputElement){p.safe(()=>{e.checked=!!w});continue}if(d==="style"){const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k);continue}if(d==="disabled"&&V(e)){p.safe(()=>{const k=ae(w);(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=k)}),ae(w)?p.safe(()=>{e.setAttribute(d,"")}):p.safe(()=>{e.removeAttribute(d)});continue}const v=e.namespaceURI==="http://www.w3.org/2000/svg";if(_&&!v&&d.includes("-"))if(p.isClassLikeAttr(d)){const k=p.safeSerializeAttr(m??w);if(k!==null)try{e.setAttribute(d,k)}catch{}}else{const k=p.toCamel(d);try{const T=e;T[k]=p.isReactiveState(m)?m:w}catch{const T=p.safeSerializeAttr(m??w);T!==null&&e.setAttribute(d,T)}}else if(!v&&d in e)try{const k=e;k[d]=p.isReactiveState(m)?m:w}catch{const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k)}else{const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k)}}}try{if(V(e)){const d=i.disabled;let b;try{const L=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),w=d&&typeof d=="object"&&"value"in d;let v=!1;p.safe(()=>{v=!!p.isReactiveState(d)});const k=Re(d);v||w||L||k?b=d:b=a.disabled}catch{b=a.disabled}const m=ae(b);p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=m)}),m?p.safe(()=>{e.setAttribute("disabled","")}):p.safe(()=>{e.removeAttribute("disabled")})}}catch{}if(_&&S){const d=e;p.safe(()=>{d._applyProps?.(d._cfg)}),p.safe(()=>{typeof d.requestRender=="function"?d.requestRender():typeof d._render=="function"&&d._render?.(d._cfg)})}}function K(e,r,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const c=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&z(c,e.key),c}if(e.tag==="#raw"){const c=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(c)}if(e.tag==="#anchor"){const c=e,g=Array.isArray(c.children)?c.children:[],d=document.createTextNode(""),b=document.createTextNode("");c.key!=null&&(z(d,`${c.key}:start`),z(b,`${c.key}:end`)),c._startNode=d,c._endNode=b;const m=document.createDocumentFragment();m.appendChild(d);for(const L of g){const w=K(L,r);if(c.key!=null&&w instanceof Element&&!w.hasAttribute("data-anchor-key")){const v=L;v&&typeof v=="object"&&v.key!=null||z(w,String(c.key))}m.appendChild(w)}return m.appendChild(b),m}const t=document.createElement(e.tag);e.key!=null&&z(t,e.key),e.props&&e.props?._transitionGroup&&lt(t,e.props?._transitionGroup);const{props:s={},attrs:o={},directives:i={}}=e.props??{},a=Ue(i,r,t,o),f={...s,...a.props},u={...o,...a.attrs};try{const c=(u&&u.class)??(f&&f.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),g=p.safeSerializeAttr(c);if(g!==null){const d=String(g).trim();d&&t.setAttribute("class",d)}}catch{}try{if(f.disabled!==void 0&&t&&V(t)){const c=f.disabled,g=c&&typeof c=="object"&&"value"in c;let d=!1;try{d=p.isReactiveState(c)}catch{d=!1}!g&&!d&&p.safe(()=>{u.disabled=c,delete f.disabled})}}catch{}const _=t.namespaceURI==="http://www.w3.org/2000/svg";for(const c in u){const g=u[c];if(typeof c!="string"||/\[object Object\]/.test(c))continue;const d=Oe(g);if(typeof d=="boolean")d?t.setAttribute(c,""):p.safe(()=>{t.removeAttribute(c)});else if(d!=null){if(c==="disabled"&&V(t)){const b=f.disabled,m=Re(b)?b:d,L=ae(m);p.safe(()=>{t.disabled=L}),L?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}if(!_&&c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLProgressElement))try{t instanceof HTMLProgressElement?t.value=Number(d):t.value=String(d??"")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!_&&c==="checked"&&t instanceof HTMLInputElement)try{t.checked=!!d}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!_&&c in t)try{t[c]=d,c==="disabled"&&d===!1&&V(t)&&t.removeAttribute("disabled")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if((e.props?.isCustomElement??!1)&&!_&&c.includes("-")){const m=p.toCamel(c);try{t[m]=d}catch{const L=p.safeSerializeAttr(d);L!==null&&t.setAttribute(c,L)}}else{const m=p.safeSerializeAttr(d);m!==null&&t.setAttribute(c,m)}}}for(const c in f){const g=f[c];if(!(typeof c!="string"||/\[object Object\]/.test(c)))if(c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)){const d=typeof g=="object"&&g!==null&&oe(g)?g.value:g;p.safe(()=>{t.value=String(d??"")})}else if(c.startsWith("on")&&typeof g=="function"){const d=Fe(c),b=d.includes(":")?(()=>{const m=d.split(":"),L=m[1];if(L.includes("-")){const w=L.split("-").map((v,k)=>k===0?v:v.charAt(0).toUpperCase()+v.slice(1)).join("");return`${m[0]}:${w}`}else{const w=L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${m[0]}:${w}`}})():d;a.listeners&&(a.listeners[d]||a.listeners[b])||U.addListener(t,d,g)}else{if(c.startsWith("on")&&g===void 0)continue;if(g==null||g===!1)t.removeAttribute(c);else{const d=e.props?.isCustomElement??!1,b=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)&&typeof g.value<"u"?g.value:g;if(c==="class"||c==="style"){try{const m=p.safeSerializeAttr(b);m!==null&&t.setAttribute(c,m)}catch{}continue}if(d||c in t)try{const m=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)?g.value:g;if(c==="disabled"&&V(t)){const L=f.disabled!==void 0?f.disabled:m,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}try{if(typeof t[c]=="boolean"){let w=m;typeof m=="string"?m==="false"?w=!1:m==="true"?w=!0:w=!!m&&m!=="":w=!!m,t[c]=w}else t[c]=m}catch{t[c]=m}}catch{}}}}for(const[c,g]of Object.entries(a.listeners||{}))U.addListener(t,c,g);const S={...e,props:{...e.props,...a.props}};he(S,t,n);try{const c=t;if(typeof c._applyProps=="function")try{c._applyProps(c._cfg)}catch{}typeof c.requestRender=="function"?c.requestRender():typeof c._render=="function"&&c._render(c._cfg)}catch{}if(Array.isArray(e.children))for(const c of e.children)t.appendChild(K(c,r,n));else typeof e.children=="string"&&(t.textContent=e.children);try{if(t instanceof HTMLSelectElement&&u&&Object.prototype.hasOwnProperty.call(u,"value"))try{t.value=String(u.value??"")}catch{}}catch{}try{if(V(t)){const c=f.disabled,g=u.disabled,d=c&&typeof c=="object"&&"value"in c;let b=!1;try{b=!!p.isReactiveState(c)}catch{b=!1}const L=b||d||Re(c)?c:g,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute("disabled","")}):p.safe(()=>{t.removeAttribute("disabled")})}}catch{}return t}function mt(e,r,n,t,s){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const o=e.childNodes,i=[];for(let b=0;b<o.length;b++)i.push(o[b]);const a=Array.isArray(r)?r:[],f=ct(e);if(f){const b=v=>{if(typeof v=="string")return v.startsWith("each-")?v.substring(5):v;if(typeof v=="number")return String(v)},m=[],L=[];for(const v of n)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const T of k){const N=b(T.key??v.key??"unknown");m.push({...T,key:N})}}else v&&m.push({...v,key:b(v.key)});for(const v of a)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const T of k){const N=b(T.key??v.key??"unknown");L.push({...T,key:N})}}else v&&L.push({...v,key:b(v.key)});if(m.some(v=>v&&v.key!=null)||L.some(v=>v&&v.key!=null)){const v=new Map,k=new Map;for(const y of L)if(y&&y.key!=null){const h=String(y.key);v.set(h,y)}for(let y=0;y<i.length;y++){const h=i[y];let C=ke(h);if(C=b(C),C!=null&&h instanceof Element&&h.nodeType===Node.ELEMENT_NODE){let P=typeof C=="string"&&C.includes(":")?C.substring(0,C.lastIndexOf(":")):C;P=String(P),k.set(P,h)}}const T=new Set,N=new Map,O=i.length>0;if(f.moveClass&&O)for(let y=0;y<i.length;y++){const h=i[y];if(h instanceof HTMLElement&&h.parentElement){const C=h.getBoundingClientRect();N.set(h,C)}}const l=[];for(const y of m){let h=y.key;if(h==null)continue;h=String(h);const C=v.get(h);let P=k.get(h);if(P&&C){const R=ye(P,C,y,t);T.add(P);const A=String(h);z(R,A),l.push({node:R,key:h,newVNode:y,oldVNode:C,isNew:!1})}else{P=K(y,t),z(P,String(h)),e.appendChild(P);const R=O||f.appear===!0;P instanceof HTMLElement&&R&&pe(P,f).catch(A=>{j.devError("Enter transition error:",A)}),l.push({node:P,key:h,newVNode:y,isNew:!0})}}const E=[];for(let y=0;y<i.length;y++){const h=i[y],C=ke(h);if(!T.has(h)&&C!=null&&h instanceof HTMLElement){const R=Te(h,f).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(A=>{j.devError("Leave transition error:",A),e.contains(h)&&e.removeChild(h)});E.push(R)}}if(E.length===0){let y=e.firstChild;for(const{node:h}of l)h!==y&&e.insertBefore(h,y),y=h.nextSibling;if(f.moveClass&&N.size>0){const h=[];for(const{node:C,isNew:P}of l)if(!P&&C instanceof HTMLElement){const R=N.get(C);if(R){const A=C.getBoundingClientRect(),x=R.left-A.left,$=R.top-A.top;if(x!==0||$!==0){const q=f.moveClass.split(/\s+/).filter(B=>B);h.push({node:C,deltaX:x,deltaY:$,moveClasses:q})}}}if(h.length>0){for(const{node:C,deltaX:P,deltaY:R}of h)C.style.transform=`translate(${P}px, ${R}px)`,C.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:C,moveClasses:P}of h)for(const R of P)C.classList.add(R);requestAnimationFrame(()=>{const C=f.moveClass||"",P=C.match(/duration-(\d+)/),R=P?`${P[1]}ms`:"300ms",A=C.match(/ease-(out|in|in-out|linear)/),x=A?`ease-${A[1]}`:"ease-out";for(const{node:$}of h)$.style.transition=`transform ${R} ${x}`;requestAnimationFrame(()=>{for(const{node:$,moveClasses:q}of h){$.style.removeProperty("transform");const B=()=>{for(const H of q)$.classList.remove(H);$.style.removeProperty("transition"),$.removeEventListener("transitionend",B),$.removeEventListener("transitioncancel",B)};$.addEventListener("transitionend",B,{once:!0}),$.addEventListener("transitioncancel",B,{once:!0})}})})})})}}}return}}const u=new Map;for(const b of a)b&&b.key!=null&&u.set(b.key,b);const _=new Map;for(let b=0;b<i.length;b++){const m=i[b],L=ke(m);L!=null&&_.set(L,m)}const S=new Set;let c=e.firstChild;function g(b,m){let L=b;for(;L&&(S.add(L),L!==m);)L=L.nextSibling}function d(b,m,L,w,v,k=!0){const T=[];let N=b.nextSibling;for(;N&&N!==m;)T.push(N),N=N.nextSibling;const O=Array.isArray(L)?L:[];if(w.some(E=>E&&E.key!=null)||O.some(E=>E&&E.key!=null)){const E=new Map,y=new Map;for(const R of O)R&&R.key!=null&&E.set(R.key,R);for(const R of T){const A=ke(R);A!=null&&y.set(A,R)}const h=v&&v.state==="visible"&&O.length===0&&w.length>0,C=new Set;let P=b.nextSibling;for(const R of w){let A;if(R.key!=null&&y.has(R.key)){const x=E.get(R.key);A=ye(y.get(R.key),x,R,t),C.add(A),v&&A instanceof HTMLElement&&h&&v.appear&&pe(A,v).catch($=>{j.devError("Transition enter error (appear):",$)}),A!==P&&e.contains(A)&&e.insertBefore(A,P)}else A=K(R,t),e.insertBefore(A,P),C.add(A),v&&A instanceof HTMLElement&&k&&pe(A,v).catch(x=>{j.devError("Transition enter error:",x)});P=A.nextSibling}for(const R of T)!C.has(R)&&e.contains(R)&&(v&&R instanceof HTMLElement&&k?Te(R,v).then(()=>{e.contains(R)&&e.removeChild(R)}).catch(A=>{j.devError("Transition leave error:",A),e.contains(R)&&e.removeChild(R)}):e.removeChild(R))}else{const E=Math.min(O.length,w.length);for(let y=0;y<E;y++){const h=O[y],C=w[y],P=ye(T[y],h,C,t);P!==T[y]&&(e.insertBefore(P,T[y]),e.removeChild(T[y]))}for(let y=E;y<w.length;y++){const h=K(w[y],t);e.insertBefore(h,m),v&&h instanceof HTMLElement&&k&&pe(h,v).catch(C=>{j.devError("Transition enter error:",C)})}for(let y=E;y<T.length;y++){const h=T[y];v&&h instanceof HTMLElement&&k?Te(h,v).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(C=>{j.devError("Transition leave error:",C),e.contains(h)&&e.removeChild(h)}):e.removeChild(h)}}}for(const b of n){let m;if(b.tag==="#anchor"){const L=b.key,w=`${L}:start`,v=`${L}:end`;let k=_.get(w),T=_.get(v);const N=Array.isArray(b.children)?b.children:[];if(k||(k=document.createTextNode(""),z(k,w)),T||(T=document.createTextNode(""),z(T,v)),b._startNode=k,b._endNode=T,!e.contains(k)||!e.contains(T)){e.insertBefore(k,c);const O=b._transition,E=!(O&&O.state==="visible"&&N.length>0)||O.appear;for(const y of N){const h=K(y,t);e.insertBefore(h,c),O&&h instanceof HTMLElement&&E&&pe(h,O).catch(C=>{j.devError("Transition enter error:",C)})}e.insertBefore(T,c)}else{const O=b._transition,E=u.get(L)._transition,y=E&&E.state!==O?.state,h=O&&O.state==="visible"&&N.length>0&&!y,C=y||!h||O?.appear===!0;d(k,T,u.get(L)?.children,N,O,C)}g(k,T),c=T.nextSibling;continue}if(b.key!=null&&_.has(b.key)){const L=u.get(b.key);m=ye(_.get(b.key),L,b,t,s),S.add(m),m!==c&&e.contains(m)&&(c&&!e.contains(c)&&(c=null),e.insertBefore(m,c))}else m=K(b,t,s),c&&!e.contains(c)&&(c=null),e.insertBefore(m,c),S.add(m);c=m.nextSibling}for(let b=0;b<i.length;b++){const m=i[b];!S.has(m)&&e.contains(m)&&(ne(m,s),e.removeChild(m))}}function ye(e,r,n,t,s){if(r&&typeof r!="string"&&r.props?.ref&&s&&ne(e,s),r===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const i=document.createTextNode(n);return e.parentNode?.replaceChild(i,e),i}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const i=n,a=Array.isArray(i.children)?i.children:[],f=i._startNode??document.createTextNode(""),u=i._endNode??document.createTextNode("");i.key!=null&&(z(f,`${i.key}:start`),z(u,`${i.key}:end`)),i._startNode=f,i._endNode=u;const _=document.createDocumentFragment();_.appendChild(f);for(const S of a){const c=K(S,t);_.appendChild(c)}return _.appendChild(u),e.parentNode?.replaceChild(_,e),f}if(!n){ne(e,s);const i=document.createComment("removed");return e.parentNode?.replaceChild(i,e),i}if(!r||typeof r=="string"){ne(e,s);const i=K(n,t,s);return he(n,i,s),e.parentNode?.replaceChild(i,e),i}if(n.tag==="#anchor"){const i=Array.isArray(n.children)?n.children:[],a=n._startNode??document.createTextNode(""),f=n._endNode??document.createTextNode("");n.key!=null&&(z(a,`${n.key}:start`),z(f,`${n.key}:end`)),n._startNode=a,n._endNode=f;const u=document.createDocumentFragment();u.appendChild(a);for(const _ of i)u.appendChild(K(_,t));return u.appendChild(f),e.parentNode?.replaceChild(u,e),a}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&r.key===n.key){const i=e;return Ie(i,r.props||{},n.props||{},t),mt(i,r.children,n.children,t,s),he(n,i,s),i}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&(r.tag&&String(r.tag).includes("-")||n.props&&n.props.isCustomElement||r.props&&r.props.isCustomElement))try{const a=e;return Ie(a,r.props||{},n.props||{},t),he(n,a,s),a}catch{}ne(e,s);const o=K(n,t,s);return he(n,o,s),e.parentNode?.replaceChild(o,e),o}function gt(e,r,n,t){let s;Array.isArray(r)?r.length===1?(s=r[0],s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})):s={tag:"div",key:"__root__",children:r}:(s=r,s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})),s&&typeof s=="object"&&s.tag==="#anchor"&&(s={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[s]}),s=Pe(s,String(s.key??"root"));const o=e._prevVNode??null,i=e._prevDom??e.firstChild??null;let a;o&&i?typeof o!="string"&&typeof s!="string"&&o.tag===s.tag&&o.key===s.key?a=ye(i,o,s,n,t):(a=K(s,n,t),e.replaceChild(a,i)):(a=K(s,n,t),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const f=[];for(let u=0;u<e.childNodes.length;u++){const _=e.childNodes[u];_!==a&&_.nodeName!=="STYLE"&&(ne(_,t),f.push(_))}f.forEach(u=>e.removeChild(u)),e._prevVNode=s,e._prevDom=a}const me=[];function bt(e,r,n,t,s,o,i,a){if(e){me.push(n);try{const f=r.render(n);if(f instanceof Promise){o(!0),f.then(u=>{o(!1),i(null),We(e,u,n,t,s),a(e.innerHTML)}).catch(u=>{o(!1),i(u)});return}We(e,f,n,t,s),a(e.innerHTML)}finally{me.pop()}}}function We(e,r,n,t,s){e&&(gt(e,Array.isArray(r)?r:[r],n,t),s(e.innerHTML))}function vt(e,r,n,t,s,o,i){if(o!==null&&clearTimeout(o),Date.now()-r<16){if(s(n+1),n===15)j.devWarn(`⚠️ Component is re-rendering rapidly. This might indicate:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./helpers-D3UjNfYY.cjs"),j=require("./logger-CqdBMdui.cjs"),Y=require("./transitions-BdcSG3zN.cjs");function Je(e,r,n){if(n)for(const[t,s]of Object.entries(n)){let o,i={};if(Array.isArray(s)?(o=s[0],i=s[1]||{}):o=s,r.set(t,{callback:o,options:i,oldValue:p.getNestedValue(e,t)}),i.immediate)try{const a=p.getNestedValue(e,t);o(a,void 0,e)}catch(a){j.devError(`Error in immediate watcher for "${t}":`,a)}}}function Ye(e,r,n,t){const s=(i,a)=>{if(i===a)return!0;if(typeof i!=typeof a||typeof i!="object"||i===null||a===null)return!1;if(Array.isArray(i)&&Array.isArray(a))return i.length!==a.length?!1:i.every((c,g)=>s(c,a[g]));const f=i,u=a,_=Object.keys(f||{}),S=Object.keys(u||{});return _.length!==S.length?!1:_.every(c=>s(f[c],u[c]))},o=r.get(n);if(o&&!s(t,o.oldValue))try{o.callback(t,o.oldValue,e),o.oldValue=t}catch(i){j.devError(`Error in watcher for "${n}":`,i)}for(const[i,a]of r.entries())if(a.options.deep&&n.startsWith(i+"."))try{const f=p.getNestedValue(e,i);s(f,a.oldValue)||(a.callback(f,a.oldValue,e),a.oldValue=f)}catch(f){j.devError(`Error in deep watcher for "${i}":`,f)}}function Ae(e,r){return r===Boolean?e===""||e==="true":r===Number?Number(e):e}function Xe(e,r,n){if(r)for(const t in r){const s=r[t],o=p.toKebab(t),i=e.getAttribute(o);if(s.type===Function&&typeof e[t]=="function")n[t]=e[t];else if(i!==null)n[t]=Ae(i,s.type);else if(typeof e[t]<"u")try{const a=e[t];if(s.type===String&&a&&typeof a=="object")try{n[t]=Ae(String(a),s.type)}catch{n[t]=a}else s.type===Boolean&&typeof a=="boolean"||s.type===Number&&typeof a=="number"||s.type===Function&&typeof a=="function"?n[t]=a:n[t]=Ae(String(a),s.type)}catch{n[t]=e[t]}else"default"in s&&s.default!==void 0&&(n[t]=s.default)}}function Qe(e,r,n){if(!r.props){try{const t=n?._hookCallbacks?.props||{},s=Array.from(new Set([...Object.keys(e||{}),...Object.keys(t||{})]));for(const o of s){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(n,o);if(!(!Object.prototype.hasOwnProperty.call(t,o)&&i&&(i.get||i.set||!i.configurable)))try{Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get(){try{const f=p.toKebab(o),u=e.getAttribute(f);if(u!==null)return u;const _=e[o];let S;return p.isReactiveState(_)||_&&typeof _=="object"&&"value"in _&&!(_ instanceof Node)?S=_.value:S=_,S}catch{return e[o]}}})}catch{}}}catch{}return}Xe(e,r.props,n)}function et(e,r,n,t){e.onConnected&&!n&&(e.onConnected(r),t(!0))}function tt(e,r,n,t,s,o,i,a){e.onDisconnected&&e.onDisconnected(r),n.forEach(f=>f()),t(),s(),o(!1),i(null),a(!1)}function nt(e,r,n,t,s){e.onAttributeChanged&&e.onAttributeChanged(r,n,t,s)}class rt{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(r,n){const t=this.cache.get(r);if(t){if(!t.isSecure){j.devWarn("Blocked cached dangerous expression:",r);return}try{this.cache.delete(r),this.cache.set(r,t)}catch{}return t.evaluator(n)}const s=this.createEvaluator(r);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(r,s),!s.isSecure){j.devWarn("Blocked dangerous expression:",r);return}return s.evaluator(n)}static createEvaluator(r){if(this.hasDangerousPatterns(r))return{evaluator:()=>{},isSecure:!1};if(r.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(r),isSecure:!0}}catch(n){return j.devWarn("Failed to create evaluator for expression:",r,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(r){return this.dangerousPatterns.some(n=>n.test(r))}static createSafeEvaluator(r){const n=r.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(r);if(/^ctx\.[a-zA-Z0-9_.]+$/.test(r.trim())){const t=r.trim().slice(4);return s=>p.getNestedValue(s,t)}return r.includes("ctx")||/[+\-*/%<>=&|?:[\]]/.test(r)?this.createSimpleEvaluator(r):t=>p.getNestedValue(t,r)}static createObjectEvaluator(r){const n=r.trim().slice(1,-1),t=this.parseObjectProperties(n);return s=>{const o={};for(const{key:i,value:a}of t)try{if(a.startsWith("ctx.")){const f=a.slice(4);o[i]=p.getNestedValue(s,f)}else o[i]=this.evaluateSimpleValue(a,s)}catch{o[i]=void 0}return o}}static parseObjectProperties(r){const n=[],t=r.split(",");for(const s of t){const o=s.indexOf(":");if(o===-1)continue;const i=s.slice(0,o).trim(),a=s.slice(o+1).trim(),f=i.replace(/^['"]|['"]$/g,"");n.push({key:f,value:a})}return n}static createSimpleEvaluator(r){return n=>{try{let t=r;const s=[];t=t.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,S=>`<<#${s.push(S)-1}#>>`);const o=t.match(/ctx\.[\w.]+/g)||[];for(const S of o){const c=S.slice(4),g=p.getNestedValue(n,c);if(g===void 0)return;const d=s.push(JSON.stringify(g))-1;t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const i=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,a=t.match(i)||[];for(const S of a){if(S.startsWith("ctx."))continue;const c=p.getNestedValue(n,S);if(c===void 0)return;const g=s.push(JSON.stringify(c))-1;t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${g}#>>`)}const f=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let u;const _=new Set;for(;(u=f.exec(t))!==null;){const S=u[1];if(["true","false","null","undefined"].includes(S)||/^[0-9]+$/.test(S)||S==="ctx"||_.has(S))continue;_.add(S);const c=p.getNestedValue(n,S);if(c===void 0)return;const g=JSON.stringify(c),d=s.push(g)-1;S.includes(".")?t=t.replace(new RegExp(S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`):t=t.replace(new RegExp("\\b"+S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${d}#>>`)}t=t.replace(/<<#(\d+)#>>/g,(S,c)=>s[Number(c)]);try{return this.evaluateBasicExpression(t)}catch{return}}catch{return}}}static evaluateBasicExpression(r){const n=this.tokenize(r);let t=0;function s(){return n[t]}function o(l){const E=n[t++];if(l&&!E)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&E&&E.type!==l&&E.value!==l)throw new Error(`Unexpected token ${E.type}/${E.value}, expected ${l}`);return E}function i(){return d()}function a(l){if(typeof l=="number")return l;if(l==null)return NaN;if(typeof l=="boolean")return l?1:0;const E=Number(l);return Number.isNaN(E)?NaN:E}function f(l,E){return typeof l=="string"||typeof E=="string"?String(l)+String(E):a(l)+a(E)}function u(l,E){return a(l)-a(E)}function _(l,E){return a(l)*a(E)}function S(l,E){return a(l)/a(E)}function c(l,E){return a(l)%a(E)}function g(l,E,y){if(typeof E=="number"&&typeof y=="number")switch(l){case">":return E>y;case"<":return E<y;case">=":return E>=y;case"<=":return E<=y;default:return!1}const h=String(E),C=String(y);switch(l){case">":return h>C;case"<":return h<C;case">=":return h>=C;case"<=":return h<=C;default:return!1}}function d(){const l=b(),E=s();if(E&&E.value==="?"){o("?");const y=i();o(":");const h=i();return l?y:h}return l}function b(){let l=m();for(;;){const E=s();if(!E||E.value!=="||")break;o("OP");const y=m();l=l||y}return l}function m(){let l=L();for(;;){const E=s();if(!E||E.value!=="&&")break;o("OP");const y=L();l=l&&y}return l}function L(){let l=w();for(;;){const E=s();if(!E||!["==","!=","===","!=="].includes(E.value))break;const y=o("OP").value,h=w();switch(y){case"==":l=l==h;break;case"!=":l=l!=h;break;case"===":l=l===h;break;case"!==":l=l!==h;break}}return l}function w(){let l=v();for(;;){const E=s();if(!E||![">","<",">=","<="].includes(E.value))break;const y=o("OP").value,h=v();switch(y){case">":l=g(">",l,h);break;case"<":l=g("<",l,h);break;case">=":l=g(">=",l,h);break;case"<=":l=g("<=",l,h);break}}return l}function v(){let l=k();for(;;){const E=s();if(!E||E.value!=="+"&&E.value!=="-")break;const y=o("OP").value,h=k();l=y==="+"?f(l,h):u(l,h)}return l}function k(){let l=T();for(;;){const E=s();if(!E||E.value!=="*"&&E.value!=="/"&&E.value!=="%")break;const y=o("OP").value,h=T();switch(y){case"*":l=_(l,h);break;case"/":l=S(l,h);break;case"%":l=c(l,h);break}}return l}function T(){const l=s();if(l&&l.value==="!")return o("OP"),!T();if(l&&l.value==="-"){o("OP");const E=T();return u(0,E)}return N()}function N(){const l=s();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 E=[];for(;;){const y=s();if(!y||y.value==="]")break;E.push(i());const h=s();h&&h.value===","&&o("PUNC")}return o("PUNC"),E}if(l.value==="("){o("PUNC");const E=i();return o("PUNC"),E}throw new Error("Unexpected token in expression")}}return i()}static tokenize(r){const n=[],t=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let s;for(;(s=t.exec(r))!==null;){const o=s[1];o&&(/^\d/.test(o)?n.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?n.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?n.push({type:"IDENT",value:o}):/^[()?:,[\]]$/.test(o)?n.push({type:"PUNC",value:o}):n.push({type:"OP",value:o}))}return n}static evaluateSimpleValue(r,n){if(r==="true")return!0;if(r==="false")return!1;if(!isNaN(Number(r)))return Number(r);if(r.startsWith("ctx.")){const t=r.slice(4);return p.getNestedValue(n,t)}return r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")?r.slice(1,-1):r}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class U{static cleanupFunctions=new WeakMap;static addListener(r,n,t,s){r.addEventListener(n,t,s);const i={event:n,handler:t,wrapper:t,options:s,cleanup:()=>r.removeEventListener(n,t,s),addedAt:Date.now()};this.cleanupFunctions.has(r)||this.cleanupFunctions.set(r,[]);const a=this.cleanupFunctions.get(r);a.push(i),a.__metaList=a}static removeListener(r,n,t,s){r.removeEventListener(n,t,s);const o=this.cleanupFunctions.get(r);if(o)for(let i=0;i<o.length;i++){const a=o[i];if(a.event===n&&a.handler===t){o.splice(i,1),o.length===0&&this.cleanupFunctions.delete(r);return}}}static cleanup(r){const n=this.cleanupFunctions.get(r);n&&(n.forEach(t=>{try{t.cleanup()}catch{}}),this.cleanupFunctions.delete(r))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(r){const n=this.cleanupFunctions.get(r);return!!(n&&n.length>0)}static getListenerCount(r){const n=this.cleanupFunctions.get(r);return n?n.length:0}static getListenerInfo(r){const n=this.cleanupFunctions.get(r);return n?n.map(t=>({event:t.event,handler:t.handler,wrapper:t.wrapper,options:t.options})):[]}}function Se(e,r){return Array.isArray(e)&&Array.isArray(r)?JSON.stringify([...e].sort())!==JSON.stringify([...r].sort()):e!==r}function He(e,r,n,t,s){if(e){const o=r.value;if(s&&typeof o=="object"&&o!==null){const i={...o};i[s]=n,r.value=i}else r.value=n}else{const o=t._state||t;p.setNestedValue(o,r,n)}}function _e(e,r,n,t){if(typeof e._requestRender=="function"&&e._requestRender(),typeof e._triggerWatchers=="function"){const s=r?"reactiveState":n;e._triggerWatchers(s,t)}}function st(e,r,n){const t=`update:${p.toKebab(r)}`,s=`update:${r}`,o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}),i=new CustomEvent(s,{detail:n,bubbles:!0,cancelable:!0});e.dispatchEvent(o),e.dispatchEvent(i)}function xe(e,r,n,t){const s=n;if(p.safe(()=>{if(typeof e.setAttribute=="function")try{e[r]=s}catch{}else e[r]=s}),s==null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"){const o=p.safeSerializeAttr(s);o!==null?p.safe(()=>{typeof e.setAttribute=="function"&&e.setAttribute(p.toKebab(r),o)}):p.safe(()=>{typeof e.removeAttribute=="function"&&e.removeAttribute(p.toKebab(r))})}}function it(e,r,n,t){if(e){const s=r.value;return t&&typeof s=="object"&&s!==null?s[t]:s}else{const s=n._state||n;return p.getNestedValue(s,r)}}function se(e){return e?e.split(/\s+/).filter(Boolean):[]}function ie(e,r){if(r.length===0)return;const n=r.filter(t=>t&&!e.classList.contains(t));n.length>0&&e.classList.add(...n)}function re(e,r){if(r.length===0)return;const n=r.filter(Boolean);n.length>0&&e.classList.remove(...n)}let we=!1;async function ot(e,r,n=10){if(!we){if(!e.isConnected){j.devWarn("⚠️ Element not connected to DOM, skipping style wait");return}for(let t=0;t<n;t++){const s=window.getComputedStyle(e),o=s.transform&&s.transform!=="",i=s.opacity&&s.opacity!=="";if(o||i){we=!0;return}await new Promise(a=>requestAnimationFrame(()=>a(void 0)))}we=!0,j.devWarn("⚠️ Styles did not load in time for transition, continuing anyway")}}function at(e){const r=window.getComputedStyle(e),n=r.transitionDuration||"0s",t=r.transitionDelay||"0s",s=o=>{const i=parseFloat(o);return o.includes("ms")?i:i*1e3};return s(n)+s(t)}function ze(e,r){return new Promise(n=>{const t=r??at(e);if(t<=0){n();return}let s=!1;const o=()=>{s||(s=!0,e.removeEventListener("transitionend",i),e.removeEventListener("transitioncancel",i),n())},i=()=>o();e.addEventListener("transitionend",i),e.addEventListener("transitioncancel",i),setTimeout(o,t+50)})}async function pe(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeEnter)try{t.onBeforeEnter(e)}catch(d){j.devError("Transition onBeforeEnter error:",d)}if(!s)return t?.onEnter?new Promise(d=>{const b=t.onEnter;typeof b=="function"?b(e,()=>{if(t?.onAfterEnter)try{t.onAfterEnter(e)}catch(m){j.devError("Transition onAfterEnter error:",m)}d()}):d()}):void 0;const i=se(n?.enterFrom),a=se(n?.enterActive),f=se(n?.enterTo);ie(e,i),e.offsetHeight,ie(e,a),e.offsetHeight;let u;if(t?.onEnter){const d=new Promise(b=>{u=b});try{const b=t.onEnter;typeof b=="function"&&b(e,()=>{u&&u()})}catch(b){j.devError("Transition onEnter error:",b)}u&&await d}await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.offsetHeight;const _=window.getComputedStyle(e),S=_.transform,c=_.opacity;re(e,i),S&&S!=="none"&&(e.style.transform=S),c&&c!==""&&(e.style.opacity=c),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.style.transform="",e.style.opacity="",ie(e,f),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0)));let g;if(typeof o=="number"?g=o:o&&typeof o=="object"&&"enter"in o&&(g=o.enter),await ze(e,g),re(e,a),t?.onAfterEnter)try{t.onAfterEnter(e)}catch(d){j.devError("Transition onAfterEnter error:",d)}}async function Te(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeLeave)try{t.onBeforeLeave(e)}catch(S){j.devError("Transition onBeforeLeave error:",S)}if(!s)return t?.onLeave?new Promise(S=>{const c=t.onLeave;typeof c=="function"?c(e,()=>{if(t?.onAfterLeave)try{t.onAfterLeave(e)}catch(g){j.devError("Transition onAfterLeave error:",g)}S()}):S()}):void 0;const i=se(n?.leaveFrom),a=se(n?.leaveActive),f=se(n?.leaveTo);ie(e,i),e.offsetHeight,ie(e,a);let u;if(t?.onLeave){const S=new Promise(c=>{u=c});try{const c=t.onLeave;typeof c=="function"&&c(e,()=>{u&&u()})}catch(c){j.devError("Transition onLeave error:",c)}u&&await S}await new Promise(S=>requestAnimationFrame(()=>S(void 0))),await ot(e,[...i,...a]),re(e,i),ie(e,f);let _;if(typeof o=="number"?_=o:o&&typeof o=="object"&&"leave"in o&&(_=o.leave),await ze(e,_),re(e,a),re(e,f),re(e,i),t?.onAfterLeave)try{t.onAfterLeave(e)}catch(S){j.devError("Transition onAfterLeave error:",S)}}const Ke=new WeakMap,Ve=new WeakMap;function ke(e){if(!e)return;const r=Ke.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n.key!=null)return String(n.key)}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function z(e,r){try{Ke.set(e,r)}catch{}try{e.key=r}catch{}try{if(e instanceof Element){const n=p.safeSerializeAttr(r);n!==null&&e.setAttribute("data-anchor-key",n)}}catch{}}function ct(e){if(!e)return;const r=Ve.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function lt(e,r){try{Ve.set(e,r)}catch{}try{e._transitionGroup=r}catch{}}function oe(e){return e!==null&&typeof e=="object"&&"value"in e}function Oe(e){try{if(p.isReactiveState(e))return e.value}catch{}try{if(oe(e))return e.value}catch{}return e}function V(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function ae(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?p.isReactiveState(e)||"value"in e?!!e.value:!1:!!e}function ne(e,r){if(!r||!(e instanceof HTMLElement))return;U.cleanup(e);for(const t in r)r[t]===e&&delete r[t];const n=e.childNodes;for(let t=0;t<n.length;t++)ne(n[t],r)}function he(e,r,n){if(typeof e=="string")return;const t=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),s=e.props?.ref??(e.props?.props&&e.props.props.ref);if(t)try{if(p.isReactiveState(t)||typeof t=="object"&&"value"in t)t.value=r;else if(typeof t=="function")t(r);else if(typeof t=="string"&&n)try{const o=String(t);n[o]=r}catch{}}catch{}else if(s&&n)try{const o=String(s);n[o]=r}catch{}}function ft(e,r,n,t,s,o,i,a){if(!o)return;const f=r.includes("lazy"),u=r.includes("trim"),_=r.includes("number"),S=()=>{if(p.isReactiveState(e)){const k=e.value;return a&&i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[a]:k}const v=o?._state||o;return p.getNestedValue(v,e)},c=S();let g="text";i instanceof HTMLInputElement?g=t?.type||i.type||"text":i instanceof HTMLSelectElement?g="select":i instanceof HTMLTextAreaElement&&(g="textarea");const d=i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement,m=d?g==="checkbox"||g==="radio"?"checked":"value":a??"modelValue";if(g==="checkbox")if(Array.isArray(c))n[m]=c.includes(String(i?.getAttribute("value")??t?.value??""));else{const v=i?.getAttribute("true-value")??!0;n[m]=c===v}else if(g==="radio")n[m]=c===(t?.value??"");else if(g==="select")if(i&&i.hasAttribute("multiple")&&i instanceof HTMLSelectElement){const v=Array.isArray(c)?c.map(String):[];setTimeout(()=>{Array.from(i.options).forEach(k=>{k.selected=v.includes(k.value)})},0),n[m]=Array.isArray(c)?c:[]}else n[m]=c;else{!d&&p.isReactiveState(e)?n[m]=e:n[m]=c;try{const v=p.toKebab(m);t&&(t[v]=c)}catch{}}const L=f||g==="checkbox"||g==="radio"||g==="select"?"change":"input",w=v=>{if(v.isComposing||s._isComposing)return;const k=globalThis.process,T=!!k&&k.env?.NODE_ENV==="test"||typeof window<"u"&&globalThis.__vitest__;if(v.isTrusted===!1&&!T)return;const N=v.target;if(!N||N._modelUpdating)return;let O=N.value;if(g==="checkbox"){const y=S();if(Array.isArray(y)){const h=N.getAttribute("value")??"",C=Array.from(y);if(N.checked)C.includes(h)||C.push(h);else{const P=C.indexOf(h);P>-1&&C.splice(P,1)}O=C}else{const h=N.getAttribute("true-value")??!0,C=N.getAttribute("false-value")??!1;O=N.checked?h:C}}else if(g==="radio")O=N.getAttribute("value")??N.value;else if(g==="select"&&N.multiple)O=Array.from(N.selectedOptions).map(y=>y.value);else if(u&&typeof O=="string"&&(O=O.trim()),_){const y=Number(O);isNaN(y)||(O=y)}const l=S();if(Se(O,l)){N._modelUpdating=!0;try{He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O),N&&st(N,m,O)}finally{setTimeout(()=>N._modelUpdating=!1,0)}}};if(d){if(s[L]){const v=s[L];i&&U.removeListener(i,L,v)}s[L]=w}else{const v=`update:${p.toKebab(m)}`,k=`update:${m}`;if(s[v]){const T=s[v];i&&U.removeListener(i,v,T)}if(s[k]){const T=s[k];i&&U.removeListener(i,k,T)}if(s[v]=T=>{const N=T.detail;let O=N!==void 0?N:void 0;if(O===void 0){const y=T.target;if(y&&typeof y=="object"&&"value"in y)try{O=y.value}catch{O=void 0}}const l=it(p.isReactiveState(e),e,o,a);if(Se(O,l)){He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O);const y=T.target;y&&xe(y,m,p.isReactiveState(e)?e:O,p.isReactiveState(e))}},p.isReactiveState(e)&&typeof e.value=="object"&&e.value!==null){let T=[];try{T=Reflect.ownKeys(e.value)}catch{T=Object.keys(e.value)}const N=T.filter(O=>typeof O=="string"&&!String(O).startsWith("_")&&O!=="constructor");for(const O of N){const l=String(O),E=`update:${p.toKebab(l)}`,y=`update:${l}`;s[E]||(s[E]=h=>{const C=h.detail!==void 0?h.detail:h.target?.value,P=p.isReactiveState(e)?e.value[l]:p.getNestedValue(o?._state||o,e);if(!Se(C,P))return;if(p.isReactiveState(e)){const x={...e.value};x[l]=C,e.value=x}else p.setNestedValue(o?._state||o,e,C);_e(o,p.isReactiveState(e),e,C);const A=h.currentTarget||i||h.target;A&&xe(A,m,p.isReactiveState(e)?e:C,p.isReactiveState(e))},s[y]=s[E])}}s[k]=s[v]}(g==="text"||g==="textarea")&&(s.compositionstart=()=>s._isComposing=!0,s.compositionend=v=>{s._isComposing=!1;const k=v.target;k&&setTimeout(()=>{const T=k.value,N=o?._state||o,O=p.getNestedValue(N,e);let l=T;if(u&&(l=l.trim()),_){const y=Number(l);isNaN(y)||(l=y)}if(Se(l,O)){k._modelUpdating=!0;try{p.setNestedValue(N,e,l),_e(o,p.isReactiveState(e),e,l)}finally{setTimeout(()=>k._modelUpdating=!1,0)}}},0)})}function Fe(e){const r=e.slice(2);return r?r.charAt(0).toLowerCase()+r.slice(1):""}function ut(e,r,n,t,s){if(typeof e=="object"&&e!==null)for(const[o,i]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")n[o]=i;else if(o==="disabled"&&s&&V(s)){const a=i&&typeof i=="object"&&"value"in i;(()=>{try{return p.isReactiveState(i)}catch{return!1}})()||a?r[o]=i:n[o]=i}else r[o]=i;else if(typeof e=="string"){if(!t)return;try{const o=be(e,t);if(typeof o=="object"&&o!==null){for(const[i,a]of Object.entries(o))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=a;else if(i==="disabled"&&s&&V(s)){const f=a&&typeof a=="object"&&"value"in a;(()=>{try{return p.isReactiveState(a)}catch{return!1}})()||f?r[i]=a:n[i]=a}else r[i]=a;return}else{n[e]=o;return}}catch{const o=p.getNestedValue(t,e);n[e]=o}}}function dt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;const s=String(r.style||"");let o=s;if(t){if(s){const i=String(s).split(";").map(f=>f.trim()).filter(Boolean),a=i.findIndex(f=>f.startsWith("display:"));a>=0&&i[a]==="display: none"&&(i.splice(a,1),o=i.length>0?i.join("; ")+";":"")}}else if(s){const i=String(s).split(";").filter(Boolean),a=i.findIndex(f=>f.trim().startsWith("display:"));a>=0?i[a]="display: none":i.push("display: none"),o=i.join("; ")}else o="display: none";o!==s&&(o?r.style=o:delete r.style)}function be(e,r){return rt.evaluate(e,r)}function pt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;try{if(t&&typeof t=="object"){if(p.isReactiveState(t))t=t.value;else if("value"in t&&typeof t.value<"u"){const a=t.value;a instanceof Node||(t=a)}}}catch{}let s=[];if(typeof t=="string")s=[t];else if(Array.isArray(t))s=t.filter(Boolean);else if(typeof t=="object"&&t!==null)for(const[a,f]of Object.entries(t))f&&s.push(a);const o=r.class||"",i=s.join(" ");r.class=o?`${o} ${i}`.trim():i}function Re(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,t=typeof n;return t==="boolean"?!0:t==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function ht(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;let s="";if(typeof t=="string")s=t;else if(t&&typeof t=="object"){const i=[];for(const[a,f]of Object.entries(t))if(f!=null&&f!==""){const u=a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`),_=["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 S=String(f);typeof f=="number"&&_.includes(u)&&(S=`${f}px`),i.push(`${u}: ${S}`)}s=i.join("; ")+(i.length>0?";":"")}const o=String(r.style||"");r.style=o+(o&&!o.endsWith(";")?"; ":"")+s}function yt(e,r,n){let t=e;typeof e=="string"&&n&&(t=be(e,n)),p.isReactiveState(t)?r.reactiveRef=t:r.ref=t}function Ue(e,r,n,t){const s={},o={...t||{}},i={};for(const[a,f]of Object.entries(e)){const{value:u,modifiers:_,arg:S}=f;if(a==="model"||a.startsWith("model:")){const c=a.split(":"),g=c.length>1?c[1]:S;ft(u,_,s,o,i,r,n,g);continue}switch(a){case"bind":ut(u,s,o,r,n);break;case"show":dt(u,o,r);break;case"class":pt(u,o,r);break;case"style":ht(u,o,r);break;case"ref":yt(u,s,r);break}}try{if(Object.prototype.hasOwnProperty.call(s,"disabled")&&n&&V(n)){const f=s.disabled,u=f&&typeof f=="object"&&"value"in f;let _=!1;try{_=p.isReactiveState(f)}catch{_=!1}if(!u&&!_)try{o.disabled=f,delete s.disabled;const S=globalThis;S.__VDOM_DISABLED_PROMOTIONS||(S.__VDOM_DISABLED_PROMOTIONS=[]),S.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:f,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:s,attrs:o,listeners:i}}function Pe(e,r){if(Array.isArray(e)){const o=new Set;return e.map(i=>{if(!i||typeof i!="object")return i;let a=i.props?.key??i.key;if(!a){const S=i.tag||"node",g=[i.props?.attrs?.id,i.props?.attrs?.name,i.props?.attrs?.["data-key"],i.props?.props?.id,i.props?.props?.name,i.props?.props?.dataKey,i.props?.props?.["data-key"]].find(d=>d!=null)??"";a=g?`${r}:${S}:${g}`:`${r}:${S}`}let f=a,u=1;for(;o.has(f);)f=`${a}#${u++}`;o.add(f);let _=i.children;return Array.isArray(_)&&(_=Pe(_,f)),{...i,key:f,children:_}})}const n=e,t=n.props?.key??n.key??r;let s=n.children;return Array.isArray(s)&&(s=Pe(s,t)),{...n,key:t,children:s}}function Ie(e,r,n,t){const s=n.directives??{},o=Ue(s,t,e,n.attrs),i={...r.props||{},...n.props||{},...o.props||{}},a={...r.attrs||{},...n.attrs||{},...o.attrs||{}},f=r.props??{},u=i,_=!!(n?.isCustomElement??r?.isCustomElement??!1);let S=!1;for(const d in{...f,...u}){const b=f[d],m=u[d];let L=b,w=m;if(p.safe(()=>{(p.isReactiveState(b)||oe(b))&&(L=b.value)}),p.safe(()=>{(p.isReactiveState(m)||oe(m))&&(w=m.value)}),!(b===m&&L===w))if(S=!0,d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const v=Oe(m),k=v==null?"":String(v);e.value!==k&&(e.value=k)}else if(d==="checked"&&e instanceof HTMLInputElement){const v=Oe(m);e.checked=!!v}else if(d.startsWith("on")&&typeof m=="function"){const v=Fe(d);typeof b=="function"&&U.removeListener(e,v,b),typeof m=="function"&&U.addListener(e,v,m);try{if(v&&v.startsWith("update:")){const k=v.split(":",2)[1],T=u[k];let N=[];try{if(p.isReactiveState(T)){const l=T.value;N=l&&typeof l=="object"?Object.keys(l):[]}else T&&typeof T=="object"&&(N=Object.keys(T))}catch{N=[]}const O=N.filter(l=>typeof l=="string"&&!l.startsWith("_")&&l!=="constructor");for(const l of O){const E=`update:${l}`,y=h=>{const C=h.detail!==void 0?h.detail:h.target instanceof HTMLInputElement||h.target instanceof HTMLTextAreaElement||h.target instanceof HTMLSelectElement?h.target.value:void 0,R={...p.isReactiveState(T)?T.value||{}:u[k]||{},[l]:C};try{typeof m=="function"&&m({detail:R})}catch{}};p.safe(()=>{U.addListener(e,E,y)})}}}catch{}}else if(m==null)e.removeAttribute(d);else{const v=n?.isCustomElement??r?.isCustomElement??!1;if(v||d in e)try{e[d]=m,d==="disabled"&&m===!1&&!v&&V(e)&&e.removeAttribute("disabled")}catch{}else m===!1&&e.removeAttribute(d)}}for(const[d,b]of Object.entries(o.listeners||{})){U.addListener(e,d,b);try{const m=e&&e.parentElement;m&&m!==e&&U.addListener(m,d,b)}catch{}}const c=r.attrs??{},g=a;for(const d in{...c,...g}){const b=c[d],m=g[d];let L=b,w=m;if(p.isReactiveState(b)&&(L=b.value),p.isReactiveState(m)&&(w=m.value),L!==w)if(S=!0,w==null||w===!1)p.safe(()=>{e.removeAttribute(d)}),d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?p.safe(()=>{e.value=""}):e instanceof HTMLSelectElement?p.safe(()=>{e.value=""}):e instanceof HTMLProgressElement&&p.safe(()=>{e.value=0})),d==="checked"&&e instanceof HTMLInputElement&&p.safe(()=>{e.checked=!1}),d==="disabled"&&V(e)&&p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=!1)});else{if(d==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLSelectElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLProgressElement){p.safe(()=>{e.value=Number(w)});continue}}if(d==="checked"&&e instanceof HTMLInputElement){p.safe(()=>{e.checked=!!w});continue}if(d==="style"){const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k);continue}if(d==="disabled"&&V(e)){p.safe(()=>{const k=ae(w);(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=k)}),ae(w)?p.safe(()=>{e.setAttribute(d,"")}):p.safe(()=>{e.removeAttribute(d)});continue}const v=e.namespaceURI==="http://www.w3.org/2000/svg";if(_&&!v&&d.includes("-"))if(p.isClassLikeAttr(d)){const k=p.safeSerializeAttr(m??w);if(k!==null)try{e.setAttribute(d,k)}catch{}}else{const k=p.toCamel(d);try{const T=e;T[k]=p.isReactiveState(m)?m:w}catch{const T=p.safeSerializeAttr(m??w);T!==null&&e.setAttribute(d,T)}}else if(!v&&d in e)try{const k=e;k[d]=p.isReactiveState(m)?m:w}catch{const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k)}else{const k=p.safeSerializeAttr(w);k!==null&&e.setAttribute(d,k)}}}try{if(V(e)){const d=i.disabled;let b;try{const L=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),w=d&&typeof d=="object"&&"value"in d;let v=!1;p.safe(()=>{v=!!p.isReactiveState(d)});const k=Re(d);v||w||L||k?b=d:b=a.disabled}catch{b=a.disabled}const m=ae(b);p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=m)}),m?p.safe(()=>{e.setAttribute("disabled","")}):p.safe(()=>{e.removeAttribute("disabled")})}}catch{}if(_&&S){const d=e;p.safe(()=>{d._applyProps?.(d._cfg)}),p.safe(()=>{typeof d.requestRender=="function"?d.requestRender():typeof d._render=="function"&&d._render?.(d._cfg)})}}function K(e,r,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const c=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&z(c,e.key),c}if(e.tag==="#raw"){const c=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(c)}if(e.tag==="#anchor"){const c=e,g=Array.isArray(c.children)?c.children:[],d=document.createTextNode(""),b=document.createTextNode("");c.key!=null&&(z(d,`${c.key}:start`),z(b,`${c.key}:end`)),c._startNode=d,c._endNode=b;const m=document.createDocumentFragment();m.appendChild(d);for(const L of g){const w=K(L,r);if(c.key!=null&&w instanceof Element&&!w.hasAttribute("data-anchor-key")){const v=L;v&&typeof v=="object"&&v.key!=null||z(w,String(c.key))}m.appendChild(w)}return m.appendChild(b),m}const t=document.createElement(e.tag);e.key!=null&&z(t,e.key),e.props&&e.props?._transitionGroup&&lt(t,e.props?._transitionGroup);const{props:s={},attrs:o={},directives:i={}}=e.props??{},a=Ue(i,r,t,o),f={...s,...a.props},u={...o,...a.attrs};try{const c=(u&&u.class)??(f&&f.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),g=p.safeSerializeAttr(c);if(g!==null){const d=String(g).trim();d&&t.setAttribute("class",d)}}catch{}try{if(f.disabled!==void 0&&t&&V(t)){const c=f.disabled,g=c&&typeof c=="object"&&"value"in c;let d=!1;try{d=p.isReactiveState(c)}catch{d=!1}!g&&!d&&p.safe(()=>{u.disabled=c,delete f.disabled})}}catch{}const _=t.namespaceURI==="http://www.w3.org/2000/svg";for(const c in u){const g=u[c];if(typeof c!="string"||/\[object Object\]/.test(c))continue;const d=Oe(g);if(typeof d=="boolean")d?t.setAttribute(c,""):p.safe(()=>{t.removeAttribute(c)});else if(d!=null){if(c==="disabled"&&V(t)){const b=f.disabled,m=Re(b)?b:d,L=ae(m);p.safe(()=>{t.disabled=L}),L?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}if(!_&&c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLProgressElement))try{t instanceof HTMLProgressElement?t.value=Number(d):t.value=String(d??"")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!_&&c==="checked"&&t instanceof HTMLInputElement)try{t.checked=!!d}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!_&&c in t)try{t[c]=d,c==="disabled"&&d===!1&&V(t)&&t.removeAttribute("disabled")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if((e.props?.isCustomElement??!1)&&!_&&c.includes("-")){const m=p.toCamel(c);try{t[m]=d}catch{const L=p.safeSerializeAttr(d);L!==null&&t.setAttribute(c,L)}}else{const m=p.safeSerializeAttr(d);m!==null&&t.setAttribute(c,m)}}}for(const c in f){const g=f[c];if(!(typeof c!="string"||/\[object Object\]/.test(c)))if(c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)){const d=typeof g=="object"&&g!==null&&oe(g)?g.value:g;p.safe(()=>{t.value=String(d??"")})}else if(c.startsWith("on")&&typeof g=="function"){const d=Fe(c),b=d.includes(":")?(()=>{const m=d.split(":"),L=m[1];if(L.includes("-")){const w=L.split("-").map((v,k)=>k===0?v:v.charAt(0).toUpperCase()+v.slice(1)).join("");return`${m[0]}:${w}`}else{const w=L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${m[0]}:${w}`}})():d;a.listeners&&(a.listeners[d]||a.listeners[b])||U.addListener(t,d,g)}else{if(c.startsWith("on")&&g===void 0)continue;if(g==null||g===!1)t.removeAttribute(c);else{const d=e.props?.isCustomElement??!1,b=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)&&typeof g.value<"u"?g.value:g;if(c==="class"||c==="style"){try{const m=p.safeSerializeAttr(b);m!==null&&t.setAttribute(c,m)}catch{}continue}if(d||c in t)try{const m=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)?g.value:g;if(c==="disabled"&&V(t)){const L=f.disabled!==void 0?f.disabled:m,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}try{if(typeof t[c]=="boolean"){let w=m;typeof m=="string"?m==="false"?w=!1:m==="true"?w=!0:w=!!m&&m!=="":w=!!m,t[c]=w}else t[c]=m}catch{t[c]=m}}catch{}}}}for(const[c,g]of Object.entries(a.listeners||{}))U.addListener(t,c,g);const S={...e,props:{...e.props,...a.props}};he(S,t,n);try{const c=t;if(typeof c._applyProps=="function")try{c._applyProps(c._cfg)}catch{}typeof c.requestRender=="function"?c.requestRender():typeof c._render=="function"&&c._render(c._cfg)}catch{}if(Array.isArray(e.children))for(const c of e.children)t.appendChild(K(c,r,n));else typeof e.children=="string"&&(t.textContent=e.children);try{if(t instanceof HTMLSelectElement&&u&&Object.prototype.hasOwnProperty.call(u,"value"))try{t.value=String(u.value??"")}catch{}}catch{}try{if(V(t)){const c=f.disabled,g=u.disabled,d=c&&typeof c=="object"&&"value"in c;let b=!1;try{b=!!p.isReactiveState(c)}catch{b=!1}const L=b||d||Re(c)?c:g,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute("disabled","")}):p.safe(()=>{t.removeAttribute("disabled")})}}catch{}return t}function mt(e,r,n,t,s){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const o=e.childNodes,i=[];for(let b=0;b<o.length;b++)i.push(o[b]);const a=Array.isArray(r)?r:[],f=ct(e);if(f){const b=v=>{if(typeof v=="string")return v.startsWith("each-")?v.substring(5):v;if(typeof v=="number")return String(v)},m=[],L=[];for(const v of n)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const T of k){const N=b(T.key??v.key??"unknown");m.push({...T,key:N})}}else v&&m.push({...v,key:b(v.key)});for(const v of a)if(v&&v.tag==="#anchor"){const k=Array.isArray(v.children)?v.children:[];for(const T of k){const N=b(T.key??v.key??"unknown");L.push({...T,key:N})}}else v&&L.push({...v,key:b(v.key)});if(m.some(v=>v&&v.key!=null)||L.some(v=>v&&v.key!=null)){const v=new Map,k=new Map;for(const y of L)if(y&&y.key!=null){const h=String(y.key);v.set(h,y)}for(let y=0;y<i.length;y++){const h=i[y];let C=ke(h);if(C=b(C),C!=null&&h instanceof Element&&h.nodeType===Node.ELEMENT_NODE){let P=typeof C=="string"&&C.includes(":")?C.substring(0,C.lastIndexOf(":")):C;P=String(P),k.set(P,h)}}const T=new Set,N=new Map,O=i.length>0;if(f.moveClass&&O)for(let y=0;y<i.length;y++){const h=i[y];if(h instanceof HTMLElement&&h.parentElement){const C=h.getBoundingClientRect();N.set(h,C)}}const l=[];for(const y of m){let h=y.key;if(h==null)continue;h=String(h);const C=v.get(h);let P=k.get(h);if(P&&C){const R=ye(P,C,y,t);T.add(P);const A=String(h);z(R,A),l.push({node:R,key:h,newVNode:y,oldVNode:C,isNew:!1})}else{P=K(y,t),z(P,String(h)),e.appendChild(P);const R=O||f.appear===!0;P instanceof HTMLElement&&R&&pe(P,f).catch(A=>{j.devError("Enter transition error:",A)}),l.push({node:P,key:h,newVNode:y,isNew:!0})}}const E=[];for(let y=0;y<i.length;y++){const h=i[y],C=ke(h);if(!T.has(h)&&C!=null&&h instanceof HTMLElement){const R=Te(h,f).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(A=>{j.devError("Leave transition error:",A),e.contains(h)&&e.removeChild(h)});E.push(R)}}if(E.length===0){let y=e.firstChild;for(const{node:h}of l)h!==y&&e.insertBefore(h,y),y=h.nextSibling;if(f.moveClass&&N.size>0){const h=[];for(const{node:C,isNew:P}of l)if(!P&&C instanceof HTMLElement){const R=N.get(C);if(R){const A=C.getBoundingClientRect(),x=R.left-A.left,$=R.top-A.top;if(x!==0||$!==0){const q=f.moveClass.split(/\s+/).filter(B=>B);h.push({node:C,deltaX:x,deltaY:$,moveClasses:q})}}}if(h.length>0){for(const{node:C,deltaX:P,deltaY:R}of h)C.style.transform=`translate(${P}px, ${R}px)`,C.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:C,moveClasses:P}of h)for(const R of P)C.classList.add(R);requestAnimationFrame(()=>{const C=f.moveClass||"",P=C.match(/duration-(\d+)/),R=P?`${P[1]}ms`:"300ms",A=C.match(/ease-(out|in|in-out|linear)/),x=A?`ease-${A[1]}`:"ease-out";for(const{node:$}of h)$.style.transition=`transform ${R} ${x}`;requestAnimationFrame(()=>{for(const{node:$,moveClasses:q}of h){$.style.removeProperty("transform");const B=()=>{for(const H of q)$.classList.remove(H);$.style.removeProperty("transition"),$.removeEventListener("transitionend",B),$.removeEventListener("transitioncancel",B)};$.addEventListener("transitionend",B,{once:!0}),$.addEventListener("transitioncancel",B,{once:!0})}})})})})}}}return}}const u=new Map;for(const b of a)b&&b.key!=null&&u.set(b.key,b);const _=new Map;for(let b=0;b<i.length;b++){const m=i[b],L=ke(m);L!=null&&_.set(L,m)}const S=new Set;let c=e.firstChild;function g(b,m){let L=b;for(;L&&(S.add(L),L!==m);)L=L.nextSibling}function d(b,m,L,w,v,k=!0){const T=[];let N=b.nextSibling;for(;N&&N!==m;)T.push(N),N=N.nextSibling;const O=Array.isArray(L)?L:[];if(w.some(E=>E&&E.key!=null)||O.some(E=>E&&E.key!=null)){const E=new Map,y=new Map;for(const R of O)R&&R.key!=null&&E.set(R.key,R);for(const R of T){const A=ke(R);A!=null&&y.set(A,R)}const h=v&&v.state==="visible"&&O.length===0&&w.length>0,C=new Set;let P=b.nextSibling;for(const R of w){let A;if(R.key!=null&&y.has(R.key)){const x=E.get(R.key);A=ye(y.get(R.key),x,R,t),C.add(A),v&&A instanceof HTMLElement&&h&&v.appear&&pe(A,v).catch($=>{j.devError("Transition enter error (appear):",$)}),A!==P&&e.contains(A)&&e.insertBefore(A,P)}else A=K(R,t),e.insertBefore(A,P),C.add(A),v&&A instanceof HTMLElement&&k&&pe(A,v).catch(x=>{j.devError("Transition enter error:",x)});P=A.nextSibling}for(const R of T)!C.has(R)&&e.contains(R)&&(v&&R instanceof HTMLElement&&k?Te(R,v).then(()=>{e.contains(R)&&e.removeChild(R)}).catch(A=>{j.devError("Transition leave error:",A),e.contains(R)&&e.removeChild(R)}):e.removeChild(R))}else{const E=Math.min(O.length,w.length);for(let y=0;y<E;y++){const h=O[y],C=w[y],P=ye(T[y],h,C,t);P!==T[y]&&(e.insertBefore(P,T[y]),e.removeChild(T[y]))}for(let y=E;y<w.length;y++){const h=K(w[y],t);e.insertBefore(h,m),v&&h instanceof HTMLElement&&k&&pe(h,v).catch(C=>{j.devError("Transition enter error:",C)})}for(let y=E;y<T.length;y++){const h=T[y];v&&h instanceof HTMLElement&&k?Te(h,v).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(C=>{j.devError("Transition leave error:",C),e.contains(h)&&e.removeChild(h)}):e.removeChild(h)}}}for(const b of n){let m;if(b.tag==="#anchor"){const L=b.key,w=`${L}:start`,v=`${L}:end`;let k=_.get(w),T=_.get(v);const N=Array.isArray(b.children)?b.children:[];if(k||(k=document.createTextNode(""),z(k,w)),T||(T=document.createTextNode(""),z(T,v)),b._startNode=k,b._endNode=T,!e.contains(k)||!e.contains(T)){e.insertBefore(k,c);const O=b._transition,E=!(O&&O.state==="visible"&&N.length>0)||O.appear;for(const y of N){const h=K(y,t);e.insertBefore(h,c),O&&h instanceof HTMLElement&&E&&pe(h,O).catch(C=>{j.devError("Transition enter error:",C)})}e.insertBefore(T,c)}else{const O=b._transition,E=u.get(L)._transition,y=E&&E.state!==O?.state,h=O&&O.state==="visible"&&N.length>0&&!y,C=y||!h||O?.appear===!0;d(k,T,u.get(L)?.children,N,O,C)}g(k,T),c=T.nextSibling;continue}if(b.key!=null&&_.has(b.key)){const L=u.get(b.key);m=ye(_.get(b.key),L,b,t,s),S.add(m),m!==c&&e.contains(m)&&(c&&!e.contains(c)&&(c=null),e.insertBefore(m,c))}else m=K(b,t,s),c&&!e.contains(c)&&(c=null),e.insertBefore(m,c),S.add(m);c=m.nextSibling}for(let b=0;b<i.length;b++){const m=i[b];!S.has(m)&&e.contains(m)&&(ne(m,s),e.removeChild(m))}}function ye(e,r,n,t,s){if(r&&typeof r!="string"&&r.props?.ref&&s&&ne(e,s),r===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const i=document.createTextNode(n);return e.parentNode?.replaceChild(i,e),i}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const i=n,a=Array.isArray(i.children)?i.children:[],f=i._startNode??document.createTextNode(""),u=i._endNode??document.createTextNode("");i.key!=null&&(z(f,`${i.key}:start`),z(u,`${i.key}:end`)),i._startNode=f,i._endNode=u;const _=document.createDocumentFragment();_.appendChild(f);for(const S of a){const c=K(S,t);_.appendChild(c)}return _.appendChild(u),e.parentNode?.replaceChild(_,e),f}if(!n){ne(e,s);const i=document.createComment("removed");return e.parentNode?.replaceChild(i,e),i}if(!r||typeof r=="string"){ne(e,s);const i=K(n,t,s);return he(n,i,s),e.parentNode?.replaceChild(i,e),i}if(n.tag==="#anchor"){const i=Array.isArray(n.children)?n.children:[],a=n._startNode??document.createTextNode(""),f=n._endNode??document.createTextNode("");n.key!=null&&(z(a,`${n.key}:start`),z(f,`${n.key}:end`)),n._startNode=a,n._endNode=f;const u=document.createDocumentFragment();u.appendChild(a);for(const _ of i)u.appendChild(K(_,t));return u.appendChild(f),e.parentNode?.replaceChild(u,e),a}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&r.key===n.key){const i=e;return Ie(i,r.props||{},n.props||{},t),mt(i,r.children,n.children,t,s),he(n,i,s),i}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&(r.tag&&String(r.tag).includes("-")||n.props&&n.props.isCustomElement||r.props&&r.props.isCustomElement))try{const a=e;return Ie(a,r.props||{},n.props||{},t),he(n,a,s),a}catch{}ne(e,s);const o=K(n,t,s);return he(n,o,s),e.parentNode?.replaceChild(o,e),o}function gt(e,r,n,t){let s;Array.isArray(r)?r.length===1?(s=r[0],s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})):s={tag:"div",key:"__root__",children:r}:(s=r,s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})),s&&typeof s=="object"&&s.tag==="#anchor"&&(s={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[s]}),s=Pe(s,String(s.key??"root"));const o=e._prevVNode??null,i=e._prevDom??e.firstChild??null;let a;o&&i?typeof o!="string"&&typeof s!="string"&&o.tag===s.tag&&o.key===s.key?a=ye(i,o,s,n,t):(a=K(s,n,t),e.replaceChild(a,i)):(a=K(s,n,t),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const f=[];for(let u=0;u<e.childNodes.length;u++){const _=e.childNodes[u];_!==a&&_.nodeName!=="STYLE"&&(ne(_,t),f.push(_))}f.forEach(u=>e.removeChild(u)),e._prevVNode=s,e._prevDom=a}const me=[];function bt(e,r,n,t,s,o,i,a){if(e){me.push(n);try{const f=r.render(n);if(f instanceof Promise){o(!0),f.then(u=>{o(!1),i(null),We(e,u,n,t,s),a(e.innerHTML)}).catch(u=>{o(!1),i(u)});return}We(e,f,n,t,s),a(e.innerHTML)}finally{me.pop()}}}function We(e,r,n,t,s){e&&(gt(e,Array.isArray(r)?r:[r],n,t),s(e.innerHTML))}function vt(e,r,n,t,s,o,i){if(o!==null&&clearTimeout(o),Date.now()-r<16){if(s(n+1),n===15)j.devWarn(`⚠️ Component is re-rendering rapidly. This might indicate:
2
2
  Common causes:
3
3
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
4
4
  • State modification during render
@@ -1,8 +1,8 @@
1
1
  import { g as K, t as q, i as M, s as Ne, a as j, b as z, d as De, f as Qe, h as ze, j as ge, k as Fe, l as ct } from "./helpers-CDfJhmMS.js";
2
2
  import { c as on, r as an, u as cn, w as ln } from "./helpers-CDfJhmMS.js";
3
3
  import { d as B, a as Z } from "./logger-BpibrmKL.js";
4
- import { j as lt, g as Ve, a as Ue, s as ft, m as ut } from "./transitions-CbxTVf1F.js";
5
- import { c as un } from "./transitions-CbxTVf1F.js";
4
+ import { j as lt, g as Ve, a as Ue, s as ft, m as ut } from "./transitions-Cctsmip5.js";
5
+ import { c as un } from "./transitions-Cctsmip5.js";
6
6
  function dt(e, r, n) {
7
7
  if (n)
8
8
  for (const [t, s] of Object.entries(n)) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./custom-elements-runtime.directives.cjs.js");const t=require("./transitions-BO7bCYYx.cjs");exports.Transition=t.Transition;exports.TransitionGroup=t.TransitionGroup;exports.createTransitionPreset=t.createTransitionPreset;exports.getTransitionStyleSheet=t.getTransitionStyleSheet;exports.transitionPresets=t.transitionPresets;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./custom-elements-runtime.directives.cjs.js");const t=require("./transitions-BdcSG3zN.cjs");exports.Transition=t.Transition;exports.TransitionGroup=t.TransitionGroup;exports.createTransitionPreset=t.createTransitionPreset;exports.getTransitionStyleSheet=t.getTransitionStyleSheet;exports.transitionPresets=t.transitionPresets;
2
2
  //# sourceMappingURL=custom-elements-runtime.transitions.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import "./custom-elements-runtime.directives.es.js";
2
- import { T as r, b as e, d as i, a as n, t as o } from "./transitions-CbxTVf1F.js";
2
+ import { T as r, b as e, d as i, a as n, t as o } from "./transitions-Cctsmip5.js";
3
3
  export {
4
4
  r as Transition,
5
5
  e as TransitionGroup,
package/dist/prose.css ADDED
@@ -0,0 +1 @@
1
+ .prose{--cer-prose-body: var(--cer-color-neutral-900);--cer-prose-headings: var(--cer-color-neutral-900);--cer-prose-lead: var(--cer-color-neutral-700);--cer-prose-links: var(--cer-color-primary-700);--cer-prose-links-hover: var(--cer-color-primary-800);--cer-prose-bold: var(--cer-color-neutral-900);--cer-prose-quotes: var(--cer-color-neutral-700);--cer-prose-quote-border: var(--cer-color-neutral-200);--cer-prose-code: var(--cer-color-neutral-900);--cer-prose-code-bg: var(--cer-color-neutral-50);--cer-prose-pre-bg: var(--cer-color-neutral-950);--cer-prose-pre-border: var(--cer-color-neutral-200);--cer-prose-hr: var(--cer-color-neutral-200);--cer-prose-caps: var(--cer-color-neutral-600);--cer-prose-list-marker: var(--cer-color-neutral-600);--cer-prose-list-marker-strong: var(--cer-color-neutral-700);--cer-prose-img-caption: var(--cer-color-neutral-600);--cer-prose-table-border: var(--cer-color-neutral-200);--cer-prose-table-head: var(--cer-color-neutral-700);--cer-prose-base: 1rem;--cer-prose-leading: 1.75;--cer-prose-max-width: 65ch;--cer-prose-h1: 2.25rem;--cer-prose-h2: 1.875rem;--cer-prose-h3: 1.5rem;--cer-prose-h4: 1.25rem;--cer-prose-h5: 1.125rem;--cer-prose-h6: 1rem;--cer-prose-h1-leading: 1.15;--cer-prose-h2-leading: 1.2;--cer-prose-h3-leading: 1.35;--cer-prose-h4-leading: 1.4;--cer-prose-h5-leading: 1.45;--cer-prose-h6-leading: 1.5;--cer-prose-block-space: 1.25em;--cer-prose-block-space-lg: 2em;--cer-prose-code-radius: .25rem;--cer-prose-pre-radius: .5rem;--cer-prose-pre-padding-y: .875rem;--cer-prose-pre-padding-x: 1rem;--cer-prose-list-indent: 1.5em;--cer-prose-list-gap: .5em;--cer-prose-table-cell-pad-y: .6em;--cer-prose-table-cell-pad-x: .8em}.prose{color:var(--cer-prose-body);font-size:var(--cer-prose-base);line-height:var(--cer-prose-leading);max-width:var(--cer-prose-max-width)}.prose p{margin:1em 0}.prose .lead,.prose p.lead{font-size:1.125em;font-weight:600;color:var(--cer-prose-lead)}.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{color:var(--cer-prose-headings);font-weight:700;margin:var(--cer-prose-block-space) 0 .5em}.prose h1{font-size:var(--cer-prose-h1);line-height:var(--cer-prose-h1-leading);margin-top:var(--cer-prose-block-space-lg)}.prose h2{font-size:var(--cer-prose-h2);line-height:var(--cer-prose-h2-leading);margin-top:var(--cer-prose-block-space-lg)}.prose h3{font-size:var(--cer-prose-h3);line-height:var(--cer-prose-h3-leading)}.prose h4{font-size:var(--cer-prose-h4);line-height:var(--cer-prose-h4-leading)}.prose h5{font-size:var(--cer-prose-h5);line-height:var(--cer-prose-h5-leading)}.prose h6{font-size:var(--cer-prose-h6);line-height:var(--cer-prose-h6-leading);color:var(--cer-prose-caps);text-transform:uppercase;letter-spacing:.02em}.prose a{color:var(--cer-prose-links);text-decoration:underline;text-decoration-thickness:.08em;text-underline-offset:.15em}.prose a:hover,.prose a:focus{color:var(--cer-prose-links-hover)}.prose b,.prose strong{color:var(--cer-prose-bold);font-weight:700}.prose em,.prose i{font-style:italic}.prose small,.prose .caption{color:var(--cer-prose-img-caption);font-size:.875em}.prose blockquote{color:var(--cer-prose-quotes);border-left:.25rem solid var(--cer-prose-quote-border);margin:var(--cer-prose-block-space) 0;padding:.5em 1em;font-style:italic;font-weight:500}.prose blockquote>p:last-child{margin-bottom:0}.prose code,.prose kbd,.prose samp{color:var(--cer-prose-code);background:var(--cer-prose-code-bg);border-radius:var(--cer-prose-code-radius);padding:.15em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95em}.prose pre{color:var(--cer-prose-code);background:var(--cer-prose-pre-bg);border:1px solid var(--cer-prose-pre-border);border-radius:var(--cer-prose-pre-radius);padding:var(--cer-prose-pre-padding-y) var(--cer-prose-pre-padding-x);overflow:auto;margin:var(--cer-prose-block-space) 0}.prose pre:has(code){background:var(--cer-prose-code-bg)}.prose pre code{background:transparent;padding:0;color:inherit;font-size:.95em}.prose hr{border:0;border-top:1px solid var(--cer-prose-hr);margin:var(--cer-prose-block-space-lg) 0}.prose img,.prose svg,.prose video,.prose canvas{display:block;max-width:100%;height:auto}.prose figure{margin:var(--cer-prose-block-space) 0}.prose figcaption{color:var(--cer-prose-img-caption);font-size:.875em;margin-top:.5em}.prose ul,.prose ol{margin:var(--cer-prose-block-space) 0;padding-left:var(--cer-prose-list-indent)}.prose li{margin:var(--cer-prose-list-gap) 0}.prose ul{list-style-type:disc}.prose ol{list-style-type:decimal}.prose li>ul,.prose li>ol{margin-top:.5em}.prose dl{margin:var(--cer-prose-block-space) 0}.prose dt{font-weight:600;color:var(--cer-prose-list-marker-strong)}.prose dd{margin:.25em 0 .75em}.prose table{width:100%;border-collapse:collapse;margin:var(--cer-prose-block-space) 0;font-size:.95em}.prose thead th{color:var(--cer-prose-table-head);font-weight:600;border-bottom:1px solid var(--cer-prose-table-border)}.prose tbody td,.prose tbody th{border-top:1px solid var(--cer-prose-table-border)}.prose th,.prose td{padding:var(--cer-prose-table-cell-pad-y) var(--cer-prose-table-cell-pad-x);text-align:left}.prose sup,.prose sub{font-size:.8em}.prose cite{font-style:normal;color:var(--cer-prose-caps)}.prose a[href^="#fn"]{text-decoration-style:dotted}.prose ol.footnotes{font-size:.9em;color:var(--cer-prose-caps)}.prose>:first-child{margin-top:0!important}.prose>:last-child{margin-bottom:0!important}.prose ul li::marker{color:var(--cer-prose-list-marker)}.prose ol li::marker{color:var(--cer-prose-list-marker)}.prose li>strong::marker{color:var(--cer-prose-list-marker-strong)}.prose code{background-color:var(--cer-prose-code-bg);padding:.2em .35em;border-radius:var(--cer-prose-code-radius);border:1px solid rgba(0,0,0,.04)}.prose kbd{background:transparent;border:1px solid rgba(0,0,0,.12);border-bottom-width:2px;padding:.12em .4em;border-radius:6px;box-shadow:inset 0 -1px #00000005;font-weight:600}.prose mark{background-color:#fff2b8;padding:.15em .25em;border-radius:.25rem;color:inherit}.prose del{text-decoration:line-through;color:var(--cer-prose-caps)}.prose abbr[title]{text-decoration:dotted;border-bottom:1px dotted currentColor;cursor:help}.prose details{background:transparent;padding:.5em 1em;border-radius:.375rem;margin:var(--cer-prose-block-space) 0}.prose summary{cursor:pointer;list-style:none;font-weight:600}.prose caption{color:var(--cer-prose-img-caption);font-size:.875em;text-align:left;margin-bottom:.5em}.prose h1+p.lead,.prose h2+p.lead{margin-top:.25em}.prose *:first-child{margin-top:0!important}.prose a:focus,.prose summary:focus{outline:2px solid Highlight;outline-offset:3px}.prose ul{color:inherit}@media(prefers-color-scheme:dark){.prose{--cer-prose-body: var(--cer-color-neutral-200);--cer-prose-headings: var(--cer-color-neutral-50);--cer-prose-lead: var(--cer-color-neutral-300);--cer-prose-links: var(--cer-color-primary-300);--cer-prose-links-hover: var(--cer-color-primary-200);--cer-prose-bold: var(--cer-color-neutral-50);--cer-prose-quotes: var(--cer-color-neutral-300);--cer-prose-quote-border: var(--cer-color-neutral-700);--cer-prose-code: var(--cer-color-neutral-200);--cer-prose-code-bg: var(--cer-color-neutral-900);--cer-prose-pre-bg: var(--cer-color-neutral-900);--cer-prose-pre-border: var(--cer-color-neutral-950);--cer-prose-hr: var(--cer-color-neutral-700);--cer-prose-caps: var(--cer-color-neutral-400);--cer-prose-list-marker: var(--cer-color-neutral-400);--cer-prose-list-marker-strong: var(--cer-color-neutral-300);--cer-prose-img-caption: var(--cer-color-neutral-400);--cer-prose-table-border: var(--cer-color-neutral-700);--cer-prose-table-head: var(--cer-color-neutral-200)}}.prose-sm{--cer-prose-base: .875rem;--cer-prose-leading: 1.6;--cer-prose-h1: 1.875rem;--cer-prose-h2: 1.5rem;--cer-prose-h3: 1.25rem;--cer-prose-h4: 1.125rem;--cer-prose-h5: 1rem;--cer-prose-h6: .875rem;--cer-prose-block-space: 1em;--cer-prose-block-space-lg: 1.5em;--cer-prose-list-indent: 1.25em;--cer-prose-list-gap: .4em;--cer-prose-table-cell-pad-y: .45em;--cer-prose-table-cell-pad-x: .6em}.prose-lg{--cer-prose-base: 1.125rem;--cer-prose-leading: 1.85;--cer-prose-h1: 3rem;--cer-prose-h2: 1.875rem;--cer-prose-h3: 1.5rem;--cer-prose-h4: 1.25rem;--cer-prose-h5: 1.125rem;--cer-prose-h6: 1rem;--cer-prose-block-space: 1.5em;--cer-prose-block-space-lg: 2.25em;--cer-prose-list-indent: 1.75em;--cer-prose-list-gap: .6em;--cer-prose-table-cell-pad-y: .75em;--cer-prose-table-cell-pad-x: 1rem}.prose-xl{--cer-prose-base: 1.25rem;--cer-prose-leading: 1.9;--cer-prose-h1: 3.5rem;--cer-prose-h2: 2.25rem;--cer-prose-h3: 1.75rem;--cer-prose-h4: 1.375rem;--cer-prose-h5: 1.25rem;--cer-prose-h6: 1.125rem;--cer-prose-block-space: 1.75em;--cer-prose-block-space-lg: 2.5em;--cer-prose-list-indent: 2em;--cer-prose-list-gap: .75em;--cer-prose-table-cell-pad-y: .9em;--cer-prose-table-cell-pad-x: 1.125rem}
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- :root{--cer-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style: solid;--cer-color-neutral-50: #fafafa;--cer-color-neutral-100: #f4f4f5;--cer-color-neutral-200: #e4e4e7;--cer-color-neutral-300: #d4d4d8;--cer-color-neutral-400: #9f9fa9;--cer-color-neutral-500: #71717b;--cer-color-neutral-600: #52525c;--cer-color-neutral-700: #3f3f46;--cer-color-neutral-800: #27272a;--cer-color-neutral-900: #18181b;--cer-color-neutral-950: #09090b;--cer-color-primary-50: #eff6ff;--cer-color-primary-100: #dbeafe;--cer-color-primary-200: #bfdbfe;--cer-color-primary-300: #93c5fd;--cer-color-primary-400: #60a5fa;--cer-color-primary-500: #3b82f6;--cer-color-primary-600: #2563eb;--cer-color-primary-700: #1d4ed8;--cer-color-primary-800: #1e40af;--cer-color-primary-900: #1e3a8a;--cer-color-primary-950: #172554;--cer-color-secondary-50: #eef2ff;--cer-color-secondary-100: #e0e7ff;--cer-color-secondary-200: #c7d2fe;--cer-color-secondary-300: #a5b4fc;--cer-color-secondary-400: #818cf8;--cer-color-secondary-500: #6366f1;--cer-color-secondary-600: #4f46e5;--cer-color-secondary-700: #4338ca;--cer-color-secondary-800: #3730a3;--cer-color-secondary-900: #312e81;--cer-color-secondary-950: #1e1b4b;--cer-color-success-50: #f0fdf4;--cer-color-success-100: #dcfce7;--cer-color-success-200: #bbf7d0;--cer-color-success-300: #86efac;--cer-color-success-400: #4ade80;--cer-color-success-500: #22c55e;--cer-color-success-600: #16a34a;--cer-color-success-700: #15803d;--cer-color-success-800: #166534;--cer-color-success-900: #14532d;--cer-color-success-950: #052e16;--cer-color-info-50: #f0f9ff;--cer-color-info-100: #e0f2fe;--cer-color-info-200: #bae6fd;--cer-color-info-300: #7dd3fc;--cer-color-info-400: #38bdf8;--cer-color-info-500: #0ea5e9;--cer-color-info-600: #0284c7;--cer-color-info-700: #0369a1;--cer-color-info-800: #075985;--cer-color-info-900: #0c4a6e;--cer-color-info-950: #082f49;--cer-color-warning-50: #fffbeb;--cer-color-warning-100: #fef3c7;--cer-color-warning-200: #fde68a;--cer-color-warning-300: #fcd34d;--cer-color-warning-400: #fbbf24;--cer-color-warning-500: #f59e0b;--cer-color-warning-600: #d97706;--cer-color-warning-700: #b45309;--cer-color-warning-800: #92400e;--cer-color-warning-900: #78350f;--cer-color-warning-950: #451a03;--cer-color-error-50: #fef2f2;--cer-color-error-100: #fee2e2;--cer-color-error-200: #fecaca;--cer-color-error-300: #fca5a5;--cer-color-error-400: #f87171;--cer-color-error-500: #ef4444;--cer-color-error-600: #dc2626;--cer-color-error-700: #b91c1c;--cer-color-error-800: #991b1b;--cer-color-error-900: #7f1d1d;--cer-color-error-950: #450a0a}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}body{margin:0;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5}html{-webkit-text-size-adjust:100%;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6,p,blockquote,figure,dl,dd{margin:0;font-size:inherit;font-weight:inherit}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;color:inherit;margin:0;padding:0;line-height:inherit;background:transparent;border:none}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;appearance:button;background:none;cursor:pointer}textarea{resize:vertical}::-webkit-input-placeholder,::placeholder{color:inherit;opacity:.5}table{border-collapse:collapse;text-indent:0;border-color:inherit}code,kbd,samp,pre{font-family:var( --cer-font-mono, ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace );font-size:1em}sub,sup{font-size:.75em;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}[hidden]{display:none}[disabled],[aria-disabled=true]{cursor:not-allowed}*:focus-visible{outline:2px solid var(--cer-color-primary-500, #3b82f6);outline-offset:2px}abbr:where([title]){text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}hr{height:0;color:inherit;border-top-width:1px}mark{background-color:var(--cer-color-warning-200, #fde68a);color:inherit}progress{vertical-align:baseline}summary{display:list-item}
1
+ :root,:host{--cer-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style: solid;--cer-color-transparent: transparent;--cer-color-current: currentColor;--cer-color-black: #000000;--cer-color-white: #ffffff;--cer-color-inherit: inherit;--cer-color-neutral-50: #fafafa;--cer-color-neutral-100: #f4f4f5;--cer-color-neutral-200: #e4e4e7;--cer-color-neutral-300: #d4d4d8;--cer-color-neutral-400: #9f9fa9;--cer-color-neutral-500: #71717b;--cer-color-neutral-600: #52525c;--cer-color-neutral-700: #3f3f46;--cer-color-neutral-800: #27272a;--cer-color-neutral-900: #18181b;--cer-color-neutral-950: #09090b;--cer-color-primary-50: #eff6ff;--cer-color-primary-100: #dbeafe;--cer-color-primary-200: #bfdbfe;--cer-color-primary-300: #93c5fd;--cer-color-primary-400: #60a5fa;--cer-color-primary-500: #3b82f6;--cer-color-primary-600: #2563eb;--cer-color-primary-700: #1d4ed8;--cer-color-primary-800: #1e40af;--cer-color-primary-900: #1e3a8a;--cer-color-primary-950: #172554;--cer-color-secondary-50: #eef2ff;--cer-color-secondary-100: #e0e7ff;--cer-color-secondary-200: #c7d2fe;--cer-color-secondary-300: #a5b4fc;--cer-color-secondary-400: #818cf8;--cer-color-secondary-500: #6366f1;--cer-color-secondary-600: #4f46e5;--cer-color-secondary-700: #4338ca;--cer-color-secondary-800: #3730a3;--cer-color-secondary-900: #312e81;--cer-color-secondary-950: #1e1b4b;--cer-color-success-50: #f0fdf4;--cer-color-success-100: #dcfce7;--cer-color-success-200: #bbf7d0;--cer-color-success-300: #86efac;--cer-color-success-400: #4ade80;--cer-color-success-500: #22c55e;--cer-color-success-600: #16a34a;--cer-color-success-700: #15803d;--cer-color-success-800: #166534;--cer-color-success-900: #14532d;--cer-color-success-950: #052e16;--cer-color-info-50: #f0f9ff;--cer-color-info-100: #e0f2fe;--cer-color-info-200: #bae6fd;--cer-color-info-300: #7dd3fc;--cer-color-info-400: #38bdf8;--cer-color-info-500: #0ea5e9;--cer-color-info-600: #0284c7;--cer-color-info-700: #0369a1;--cer-color-info-800: #075985;--cer-color-info-900: #0c4a6e;--cer-color-info-950: #082f49;--cer-color-warning-50: #fffbeb;--cer-color-warning-100: #fef3c7;--cer-color-warning-200: #fde68a;--cer-color-warning-300: #fcd34d;--cer-color-warning-400: #fbbf24;--cer-color-warning-500: #f59e0b;--cer-color-warning-600: #d97706;--cer-color-warning-700: #b45309;--cer-color-warning-800: #92400e;--cer-color-warning-900: #78350f;--cer-color-warning-950: #451a03;--cer-color-error-50: #fef2f2;--cer-color-error-100: #fee2e2;--cer-color-error-200: #fecaca;--cer-color-error-300: #fca5a5;--cer-color-error-400: #f87171;--cer-color-error-500: #ef4444;--cer-color-error-600: #dc2626;--cer-color-error-700: #b91c1c;--cer-color-error-800: #991b1b;--cer-color-error-900: #7f1d1d;--cer-color-error-950: #450a0a}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}body{margin:0;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5}html{-webkit-text-size-adjust:100%;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6,p,blockquote,figure,dl,dd{margin:0;font-size:inherit;font-weight:inherit}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;color:inherit;margin:0;padding:0;line-height:inherit;background:transparent;border:none}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;appearance:button;background:none;cursor:pointer}textarea{resize:vertical}::-webkit-input-placeholder,::placeholder{color:inherit;opacity:.5}table{border-collapse:collapse;text-indent:0;border-color:inherit}code,kbd,samp,pre{font-family:var( --cer-font-mono, ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace );font-size:1em}sub,sup{font-size:.75em;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}[hidden]{display:none}[disabled],[aria-disabled=true]{cursor:not-allowed}*:focus-visible{outline:2px solid var(--cer-color-primary-500, #3b82f6);outline-offset:2px}abbr:where([title]){text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}hr{height:0;color:inherit;border-top-width:1px}mark{background-color:var(--cer-color-warning-200, #fde68a);color:inherit}progress{vertical-align:baseline}summary{display:list-item}