essor 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/essor.esm.js CHANGED
@@ -1,25 +1,25 @@
1
1
  /**
2
- * essor v0.0.11
2
+ * essor v0.0.12
3
3
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
4
4
  * @license MIT
5
5
  **/
6
- var rt="0.0.11";var st=t=>t!==null&&typeof t=="object";var K=Array.isArray;function B(t){return typeof t=="string"}function ot(t){return t==null}var d=t=>typeof t=="function";function q(t){return t===!1||t===null||t===void 0}function z(t){return Array.isArray(t)?t.flat():[t]}function g(t,e){return B(t)?t.indexOf(e)===0:!1}var it=t=>t.replaceAll(/[A-Z]+/g,(e,n)=>`${n>0?"-":""}${e.toLocaleLowerCase()}`);var ct=t=>t.charAt(0).toUpperCase()+t.slice(1);var Ot=Object.defineProperty,at=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,ut=(t,e,n)=>e in t?Ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))At.call(e,n)&&ut(t,n,e[n]);if(at)for(var n of at(e))jt.call(e,n)&&ut(t,n,e[n]);return t},x=t=>t!==null&&typeof t=="object",dt=Array.isArray;function xt(t){return typeof t=="string"}function Pt(t){return t===null}function $t(t){return L.call(t)==="[object Set]"}function Lt(t){return L.call(t)==="[object WeakMap]"}function Rt(t){return L.call(t)==="[object WeakSet]"}function Wt(t){return L.call(t)==="[object Map]"}var U=t=>typeof t=="function",lt=t=>["string","number","boolean","symbol","undefined"].includes(typeof t)||Pt(t);function ft(t){return t?t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string":!1}var L=Object.prototype.toString,Ht=Object.prototype.hasOwnProperty,Ft=(t,e)=>Ht.call(t,e),R=(t,e)=>t!==e&&(t===t||e===e),It=Function.prototype;function Dt(t,e){return xt(t)?t.indexOf(e)===0:!1}function P(t,e){return Array.isArray(e)?e.includes(t):U(e)?e(t):!1}function ht(t,...e){console.warn.apply(console,[`[Essor warn]: ${t}`].concat(e));}var b=null,_=null,G=new WeakMap,Z=new WeakMap,Q=new Set,J=new WeakMap,Kt=["push","pop","shift","unshift","splice","sort","reverse"];function W(t,e){if(!b&&!_)return;let n=Z.get(t);n||(n=new Map,Z.set(t,n));let r=n.get(e);r||(r=new Set,n.set(e,r)),b&&r.add(b);let o=G.get(t);o||(o=new Map,G.set(t,o));let s=o.get(e);s||(s=new Set,o.set(e,s)),_&&s.add(_);}function E(t,e){let n=Z.get(t);if(!n)return;let r=n.get(e);r&&r.forEach(s=>Q.has(s)&&s());let o=G.get(t);if(o){let s=o.get(e);s&&s.forEach(c=>c.run());}}var Y=class{constructor(t,e=!1){this._value=t,this._shallow=e;}get value(){return W(this,"_sv"),this.__triggerObject(),this._value}__triggerObject(){!lt(this._value)&&!ft(this._value)&&!this._shallow&&k(this._value);}set value(t){h(t)&&(console.warn("Signal cannot be set to another signal, use .peek() instead"),t=t.peek()),R(t,this._value)&&(this._value=t,!lt(this._value)&&!ft(this._value)&&this.__triggerObject(),E(this,"_sv"));}peek(){return this._value}};function H(t){return h(t)?t:new Y(t)}function fe(t){return new Y(t,!0)}function h(t){return t instanceof Y}var mt=class{constructor(t){this.fn=t;let e=_;_=this,this._value=this.fn(),_=e;}peek(){return this._value}run(){let t=this.fn();R(t,this._value)&&(this._value=t,E(this,"_cv"));}get value(){return W(this,"_cv"),this._value}};function Bt(t){return new mt(t)}function pt(t){return t instanceof mt}function M(t){function e(){let n=b;b=e,t(),b=n;}return Q.add(e),e(),()=>{Q.delete(e),b=null;}}function vt(t,e){return Object.entries(t).reduce((r,[o,s])=>(r[o]=P(o,e)||h(s)?s:H(s),r),{})}function qt(t,e){return t?h(t)?t.peek():dt(t)?t.map(n=>qt(n,e)):x(t)?Object.entries(t).reduce((n,[r,o])=>(P(r,e)?n[r]=o:n[r]=h(o)?o.peek():w(o)?bt(o):o,n),{}):t:{}}var gt=Symbol("useReactive");function w(t){return t&&t[gt]===!0}function zt(t){Kt.forEach(e=>{let n=Array.prototype[e];W(t,"length"),Object.defineProperty(t,e,{value(...r){let o=n.apply(this,r);return ["push","pop","shift","unshift","splice","sort","reverse"].includes(e)&&E(t,"length"),o},enumerable:!1,writable:!0,configurable:!0});});}function k(t,e){return yt(t,e,!1)}function he(t,e){return yt(t,e,!0)}function bt(t){if(!x(t)||!w(t))return t;let e=Array.isArray(t)?[]:{};for(let n in t)if(Ft(t,n)){let r=t[n];w(r)?e[n]=bt(r):h(r)?e[n]=r.peek():e[n]=r;}return e}function yt(t,e,n=!1){if(!x(t)||w(t))return t;if(J.has(t))return J.get(t);if(Array.isArray(t)&&zt(t),$t(t)||Wt(t)||Rt(t)||Lt(t))return t;let r={get(s,c,i){if(c===gt||Dt(c,"_"))return !0;let a=Reflect.get(s,c,i),l=h(a)?a.value:a;return P(c,e)?l:(W(s,c),x(l)&&!n?k(l):l)},set(s,c,i,a){if(P(c,e))return Reflect.set(s,c,i,a),!0;let l=Reflect.get(s,c,a);h(l)&&(l=l.value),h(i)&&(i=i.value);let u=Reflect.set(s,c,i,a);return R(i,l)&&E(s,c),u},deleteProperty(s,c){let i=Reflect.get(s,c),a=Reflect.deleteProperty(s,c);return i!==void 0&&E(s,c),a}},o=new Proxy(t,r);return J.set(t,o),o}function Jt(t,e,n){return Ut(t,e,n)}function Ut(t,e,n){let r;h(t)||pt(t)?r=()=>t.value:w(t)?r=()=>j({},t):dt(t)?r=()=>t.map(i=>h(i)||pt(i)?i.value:w(i)?j({},i):U(i)?i():ht("Invalid source",i)):U(t)?r=t:(ht("Invalid source type",t),r=It);let o,s=()=>{let i=r();(n!=null&&n.deep||R(i,o))&&(e&&e(i,o),o=i);},c=M(s);return n!=null&&n.immediate&&s(),c}var $=0,X=new Map;function Gt(t){let{state:e,getters:n,actions:r}=t,o=j({},e!=null?e:{}),s=k(e!=null?e:{}),c=[],i=[],l=j({state:s},{patch$(u){Object.assign(s,u),c.forEach(f=>f(s)),i.forEach(f=>f(s));},subscribe$(u){c.push(u);},unsubscribe$(u){let f=c.indexOf(u);f!==-1&&c.splice(f,1);},onAction$(u){i.push(u);},reset$(){Object.assign(s,o);}});for(let u in n){let f=n[u];f&&Jt(Bt(f.bind(s,s)),p=>{l[u]=p;});}for(let u in r){let f=r[u];f&&(l[u]=f.bind(s));}return X.set($,l),++$,l}function pe(t){return function(){return X.has($)?X.get($):Gt(t)}}var V=class S{constructor(e,n){this.template=e,this.props=n,this.proxyProps={},this.context={},this.emitter=new Set,this.mounted=!1,this.rootNode=null,this.hooks={mounted:new Set,destroy:new Set},this.trackMap=new Map,this.proxyProps=vt(n,r=>g(r,"on")||g(r,"update"));}addEventListener(){}removeEventListener(){}get firstChild(){var e,n;return (n=(e=this.rootNode)==null?void 0:e.firstChild)!=null?n:null}get isConnected(){var e,n;return (n=(e=this.rootNode)==null?void 0:e.isConnected)!=null?n:!1}addHook(e,n){var r;(r=this.hooks[e])==null||r.add(n);}getContext(e){return S.context[e]}setContext(e,n){S.context[e]=n;}inheritNode(e){this.context=e.context,this.hooks=e.hooks,Object.assign(this.proxyProps,e.proxyProps),this.rootNode=e.rootNode,this.trackMap=e.trackMap;let n=this.props;this.props=e.props,this.patchProps(n);}mount(e,n){var r,o,s,c;if(!d(this.template))throw new Error("Template must be a function");if(this.isConnected)return (o=(r=this.rootNode)==null?void 0:r.mount(e,n))!=null?o:[];S.ref=this,this.rootNode=this.template(k(this.proxyProps,["children"])),S.ref=null,this.mounted=!0;let i=(c=(s=this.rootNode)==null?void 0:s.mount(e,n))!=null?c:[];return this.hooks.mounted.forEach(a=>a()),this.patchProps(this.props),i}unmount(){var e;this.hooks.destroy.forEach(n=>n()),Object.values(this.hooks).forEach(n=>n.clear()),(e=this.rootNode)==null||e.unmount(),this.rootNode=null,this.proxyProps={},this.mounted=!1,this.emitter.forEach(n=>n());}getNodeTrack(e,n){let r=this.trackMap.get(e);return r||(r={cleanup:()=>{}},this.trackMap.set(e,r)),n||r.cleanup(),r}patchProps(e){var n,r,o,s,c;for(let[i,a]of Object.entries(e))if(g(i,"on")&&((n=this.rootNode)!=null&&n.nodes)){let l=i.slice(2).toLowerCase(),u=a,f=m(this.rootNode.nodes[0],l,u);this.emitter.add(f);}else if(i==="ref")h(a)?e[i].value=(r=this.rootNode)==null?void 0:r.nodes[0]:d(a)&&e[i]((o=this.rootNode)==null?void 0:o.nodes[0]);else if(g(i,"update"))e[i]=h(a)?a.value:a;else if(i!=="children"){let l=(c=(s=this.proxyProps)[i])!=null?c:s[i]=H(a),u=this.getNodeTrack(i);u.cleanup=M(()=>{l.value=d(a)?a():a;});}this.props=e;}};V.ref=null;V.context={};var N=V;function Ne(t,e){return B(t)&&(Vt(t)&&(t=te(t),e={1:e}),t===""&&(e={0:e}),t=Zt(t)),d(t)?new N(t,e):new St(t,e)}function v(t){return t instanceof N||t instanceof St}function Zt(t){t=Yt(t);let e=document.createElement("template");return e.innerHTML=t,e}function _e(t){return t.children}var Et="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Qt="a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bdi,bdo,bgsound,big,blink,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,kbd,keygen,label,legend,li,link,listing,main,map,mark,marquee,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,spacer,span,strike,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,xmp";function Nt(t){if(v(t)||t instanceof Node)return t;let e=q(t)?"":String(t);return document.createTextNode(e)}function y(t,e,n=null){let r=v(n)?n.firstChild:n;v(e)?e.mount(t,r):r?r.before(e):t.append(e);}function T(t){v(t)?t.unmount():t.parentNode&&t.remove();}function kt(t,e,n){y(t,e,n),T(n);}function _t(t,e,n){if(e==="class"){typeof n=="string"?t.className=n:Array.isArray(n)?t.className=n.join(" "):n&&typeof n=="object"&&(t.className=Object.entries(n).reduce((r,[o,s])=>r+(s?` ${o}`:""),"").trim());return}if(e==="style"){if(typeof n=="string")t.style.cssText=n;else if(n&&typeof n=="object"){let r=n;Object.keys(r).forEach(o=>{t.style.setProperty(it(o),String(r[o]));});}return}q(n)?t.removeAttribute(e):n===!0?t.setAttribute(e,""):t instanceof HTMLInputElement?t.value=String(n):t.setAttribute(e,String(n));}function Xt(t,e){if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return m(t,"change",()=>{e(!!t.checked);});case"date":return m(t,"change",()=>{e(t.value?t.value:"");});case"file":return m(t,"change",()=>{t.files&&e(t.files);});case"number":return m(t,"input",()=>{let n=Number.parseFloat(t.value);e(Number.isNaN(n)?"":String(n));});case"radio":return m(t,"change",()=>{e(t.checked?t.value:"");});case"text":return m(t,"input",()=>{e(t.value);})}if(t instanceof HTMLSelectElement)return m(t,"change",()=>{e(t.value);});if(t instanceof HTMLTextAreaElement)return m(t,"input",()=>{e(t.value);})}var wt=Promise.resolve();function we(t){return t?wt.then(t):wt}function m(t,e,n){return t.addEventListener(e,n),()=>t.removeEventListener(e,n)}function Yt(t){let e=Et.split(","),n=[],r=[],o=/<\/?([\da-z-]+)([^>]*)>/gi,s=0;for(;;){let c=o.exec(t);if(!c)break;let[i,a]=c,l=i[1]==="/";if(r.push(t.slice(s,c.index)),s=c.index+i.length,l){for(;n.length>0&&n[n.length-1]!==a;){let u=n.pop();u&&r.push(`</${u}>`);}n.length>0&&n.pop();}else e.includes(a)||n.push(a);r.push(i);}for(r.push(t.slice(s));n.length>0;){let c=n.pop();c&&r.push(`</${c}>`);}return r.join("")}function Vt(t){return Qt.split(",").includes(t)}function te(t){return Et.split(",").includes(t)?`<${t}/>`:`<${t}></${t}>`}function ee(){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=t.length;for(let r=0;r<8;r++)e+=t.charAt(Math.floor(Math.random()*n));return e}function ne(t,e,n,r){let o=new Map,s=Array.from(e.values()),c=s.length;if(e.size>0&&n.length===0){if(t.childNodes.length===c+(r?1:0))t.innerHTML="",r&&y(t,r);else {let u=document.createRange(),f=s[0],p=v(f)?f.firstChild:f;u.setStartBefore(p),r?u.setEndBefore(r):u.setEndAfter(t),u.deleteContents();}return s.forEach(u=>{v(u)&&u.unmount();}),o}let i=[],a=se(n),l=0;for(let[u,f]of n.entries()){let p=s[l],C=F(p,u);for(;p&&!a.has(C);)T(p),e.delete(C),p=s[++l],C=F(p,u);let et=F(f,u),D=e.get(et);if(D&&(f=re(t,D,f)),p)if(p===D)l++;else {let nt=document.createComment("");y(t,nt,p),i.push([nt,f]);}else y(t,f,r);o.set(et,f);}return i.forEach(([u,f])=>kt(t,f,u)),e.forEach((u,f)=>{u.isConnected&&!o.has(f)&&T(u);}),o}function re(t,e,n){return e===n?e:v(e)&&v(n)&&e.template===n.template?(n.inheritNode(e),n):e instanceof Text&&n instanceof Text?(e.textContent!==n.textContent&&(e.textContent=n.textContent),e):(kt(t,n,e),n)}function se(t){let e=new Map;for(let[n,r]of t.entries()){let o=F(r,n);e.set(o,r);}return e}function F(t,e){if(v(t)){let n=t.key;if(n!=null)return String(n)}return `_$${e}$`}var St=class Tt{constructor(e,n,r){this.template=e,this.props=n,this.key=r,this.treeMap=new Map,this.mounted=!1,this.nodes=[],this.provides={},this.trackMap=new Map,this.parent=null;}get firstChild(){var e;return (e=this.nodes[0])!=null?e:null}get isConnected(){return this.mounted}addEventListener(){}removeEventListener(){}mount(e,n){var r;if(this.parent=e,this.isConnected)return this.nodes.forEach(c=>y(e,c,n)),this.nodes;this.key=this.key||ee();let o=this.template.content.cloneNode(!0),s=o.firstChild;return (r=s==null?void 0:s.hasAttribute)!=null&&r.call(s,"_svg_")&&(s.remove(),s==null||s.childNodes.forEach(c=>{o.append(c);})),this.nodes=Array.from(o.childNodes),this.mapNodeTree(e,o),y(e,o,n),this.patchNodes(this.props),this.mounted=!0,this.nodes}unmount(){this.trackMap.forEach(e=>{var n,r;(n=e.cleanup)==null||n.call(e),(r=e.lastNodes)==null||r.forEach(o=>{e.isRoot?T(o):o instanceof Tt&&o.unmount();});}),this.trackMap.clear(),this.treeMap.clear(),this.nodes.forEach(e=>T(e)),this.nodes=[],this.mounted=!1;}mapNodeTree(e,n){let r=1;this.treeMap.set(0,e);let o=s=>{s.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&this.treeMap.set(r++,s);let c=s.firstChild;for(;c;)o(c),c=c.nextSibling;};o(n);}patchNodes(e){for(let n in e){let r=Number(n),o=this.treeMap.get(r);if(o){let s=this.props[n];this.patchNode(n,o,s,r===0);}}this.props=e;}getNodeTrack(e,n,r){var o;let s=this.trackMap.get(e);return s||(s={cleanup:()=>{}},n&&(s.lastNodes=new Map),r&&(s.isRoot=!0),this.trackMap.set(e,s)),(o=s.cleanup)==null||o.call(s),s}inheritNode(e){this.mounted=e.mounted,this.nodes=e.nodes,this.trackMap=e.trackMap,this.treeMap=e.treeMap;let n=this.props;this.props=e.props,this.patchNodes(n);}patchNode(e,n,r,o){for(let s in r)if(s==="children"&&r.children)if(K(r.children))r.children.filter(Boolean).forEach((c,i)=>{var a;let[l,u]=K(c)?c:[c,null],f=ot(u)?null:(a=this.treeMap.get(u))!=null?a:null,p=`${e}:${s}:${i}`,C=this.getNodeTrack(p,!0,o);Ct(C,n,l,f);});else {let c=`${e}:${s}:0`,i=this.getNodeTrack(c,!0,o);Ct(i,n,r.children,null);}else if(s==="ref")h(r[s])?r[s].value=n:d(r[s])&&r[s](n);else if(g(s,"on")){let c=s.slice(2).toLocaleLowerCase(),i=this.getNodeTrack(`${e}:${s}`),a=r[s];i.cleanup=m(n,c,a);}else if(!g(s,"update")){let c=this.getNodeTrack(`${e}:${s}`),i=r[s],a=h(i)?i:H(i);Mt(c,n,s,a.value);let l=M(()=>{a.value=h(i)?i.value:i,Mt(c,n,s,a.value);}),u,f=`update${ct(s)}`;r[f]&&(u=Xt(n,p=>{r[f](p);})),c.cleanup=()=>{l&&l(),u&&u();};}}};function Mt(t,e,n,r){let o=e;o.setAttribute&&(d(r)?t.cleanup=M(()=>{_t(o,n,r());}):_t(o,n,r));}function Ct(t,e,n,r){d(n)?t.cleanup=M(()=>{let o=z(n()).map(Nt);t.lastNodes=ne(e,t.lastNodes,o,r);}):z(n).forEach((o,s)=>{let c=Nt(o);t.lastNodes.set(String(s),c),y(e,c,r);});}function Me(t){var e;I("onMounted"),(e=N.ref)==null||e.addHook("mounted",t);}function Ce(t){var e;I("onDestroy"),(e=N.ref)==null||e.addHook("destroy",t);}function I(t){N.ref||console.error(`"${t}" can only be called within the component function body
7
- and cannot be used in asynchronous or deferred calls.`);}function Ee(t,e){var n;I("useProvide"),(n=N.ref)==null||n.setContext(t,e);}function ke(t,e){var n;return I("useInject"),((n=N.ref)==null?void 0:n.getContext(t))||e}function oe(t){return Object.entries(t).map(([e,n])=>`${e}=${JSON.stringify(escape(String(n)))}`).join(" ")}function tt(t,e){if(d(t))return t(e);let n=Array.isArray(t)?t.reduce((s,c,i)=>(s[i+1]={template:c},s),{}):t,r={},o={};if(st(n))for(let[s,c]of Object.entries(n)){let i=e[s];if(i){for(let a in i)g(a,"on")&&d(i[a])&&delete i[a];if(i.children){for(let[a,l]of i.children)r[l]||(r[l]=[]),r[l].push(a);delete i.children;}}o[s]={template:c.template,props:i};}return Object.entries(o).map(([s,{template:c,props:i}])=>{let a=c;return i&&(a+=` ${oe(i)}`),r[s]&&(a+=r[s].map(l=>tt(l,i)).join("")),a}).join("")}function Se(t,e){return tt(t,e)}function Te(t,e,n={}){e.innerHTML=tt(t,n);}globalThis&&(globalThis.__essor_version__=rt);/**
8
- * @estjs/shared v0.0.11
6
+ var yt="0.0.12";var Nt=t=>t!==null&&typeof t=="object";var z=Array.isArray;function Y(t){return typeof t=="string"}function St(t){return typeof t=="symbol"}function _t(t){return t==null}var b=t=>typeof t=="function";function V(t){return t===!1||t===null||t===void 0}function B(t){return Array.isArray(t)?t.flat():[t]}function w(t,e){return Y(t)?t.indexOf(e)===0:!1}function wt(t){return t.replaceAll(/["&'<>]/g,e=>{switch(e){case"&":return "&amp;";case"<":return "&lt;";case">":return "&gt;";case'"':return "&quot;";case"'":return "&#039;";default:return e}})}var Ct=t=>t.replaceAll(/[A-Z]+/g,(e,r)=>`${r>0?"-":""}${e.toLocaleLowerCase()}`);var Et=t=>t.charAt(0).toUpperCase()+t.slice(1);var ne=Object.defineProperty,Mt=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,Tt=(t,e,r)=>e in t?ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J=(t,e)=>{for(var r in e||(e={}))se.call(e,r)&&Tt(t,r,e[r]);if(Mt)for(var r of Mt(e))ie.call(e,r)&&Tt(t,r,e[r]);return t},_=t=>t!==null&&typeof t=="object",k=Array.isArray;function oe(t){return typeof t=="string"}function at(t){return R.call(t)==="[object Set]"}function Lt(t){return R.call(t)==="[object WeakMap]"}function It(t){return R.call(t)==="[object WeakSet]"}function ut(t){return R.call(t)==="[object Map]"}var lt=t=>typeof t=="function",Wt=t=>R.call(t)==="[object Object]";function Ot(t){return oe(t)?!Number.isNaN(Number(t)):!1}var R=Object.prototype.toString,ce=Object.prototype.hasOwnProperty,ft=(t,e)=>ce.call(t,e),$=(t,e)=>t!==e&&(t===t||e===e),Ht=Function.prototype;function A(t,e){return Array.isArray(e)?e.includes(t):lt(e)?e(t):!1}function x(t,...e){console.warn.apply(console,[`[Essor warn]: ${t}`].concat(e));}var et=[],rt=[],Pt=Promise.resolve(),nt=!1;function ht(t){return t?Pt.then(t):Pt}function ae(t){et.includes(t)||(et.push(t),Ft());}function Ft(){nt||(nt=!0,ht(fe));}function ue(t){le(t,rt);}function le(t,e){e.includes(t)||(e.push(t),Ft());}function fe(){nt=!1,he();let t;for(;t=et.shift();)t&&t();}function he(){for(;rt.length>0;){let t=rt.shift();t&&t();}}var y=null,pe=null,st=new WeakMap,tt=new WeakMap,L=Symbol("ReactiveSymbol"),I=Symbol("__raw"),jt=Symbol("SignalValueKey"),At=Symbol("ComputedValueKey"),it=Symbol("ReactiveArrayKey"),g=Symbol("ReactiveCollectionKey"),M=Symbol("ReactiveWeakCollectionKey"),ot=!1,U=new Set;function f(t,e){if(!y&&!pe)return;let r=st.get(t);r||(r=new Map,st.set(t,r));let n=r.get(e);n||(n=new Set,r.set(e,n)),y&&n.add(y);}function v(t,e){let r=st.get(t);if(!r)return;let n=r.get(e);n&&n.forEach(s=>{if(ft(s,"active")&&!s.active){n.delete(s);return}ot?U.add(s):s();});}var Kt=class{constructor(t,e=!1){this.__signal=!0,this._shallow=e,this._value=t;}get value(){return f(this,jt),_(this._value)&&!this._shallow?W(this._value):this._value}set value(t){p(t)&&(t=t.peek()),$(t,this._value)&&(this._value=t,v(this,jt));}peek(){return this._value}};function G(t){return p(t)?t:new Kt(t)}function qt(t){return new Kt(t,!0)}function p(t){return !!(t&&(t!=null&&t.__signal))}var de=class{constructor(t){this.fn=t,this.__computed=!0;let e=y;y=this.run.bind(this),this._value=this.fn(),y=e;}peek(){return this._value}run(){let t=this.fn();$(t,this._value)&&(this._value=t,v(this,At));}get value(){return f(this,At),this._value}};function me(t){return new de(t)}function zt(t){return !!(t&&t.__computed)}function ge(t,e){return e==="sync"?()=>t():e==="pre"?()=>ue(t):()=>{ht(()=>ae(t));}}function T(t,e={}){let{flush:r="pre",onTrack:n,onTrigger:s}=e;function i(){let a=y;y=i.init?i:i.scheduler,t(),s&&s(),y=a;}let o=ge(i,r);return i.scheduler=o,i.init=!0,i.active=!0,n&&n(),i(),()=>{i.active=!1,y=null;}}function Bt(t,e){return !t||!_(t)?(x("initialValues must be an object,will return initial value!",t),t):Object.entries(t).reduce((n,[s,i])=>(n[s]=A(s,e)||p(i)?i:G(i),n),{})}function ve(t,e){return t?p(t)?t.peek():k(t)?t.map(r=>ve(r,e)):Wt(t)?Object.entries(t).reduce((r,[n,s])=>(A(n,e)?r[n]=s:r[n]=p(s)?s.peek():O(s)?h(s):s,r),{}):t:{}}function O(t){return !!(t&&typeof t=="object"&&t[L])}function W(t,e){return pt(t,!1,e)}function Ye(t,e){return pt(t,!0,e)}function h(t){return !_(t)||!O(t)?t:t[I]}var be=(t,e)=>({get(r,n,s){if(n===L)return !0;if(n===I)return r;let i=Reflect.get(r,n,s),o=p(i)?i.value:i;return A(n,e)?o:(f(r,n),_(o)&&!t?W(o):o)},set(r,n,s,i){if(A(n,e))return Reflect.set(r,n,s,i),!0;let o=Reflect.get(r,n,i);p(o)&&(o=o.value),p(s)&&(s=s.value);let a=Reflect.set(r,n,s,i);return $(s,o)&&v(r,n),a},deleteProperty(r,n){let s=Reflect.get(r,n),i=Reflect.deleteProperty(r,n);return s!==void 0&&v(r,n),i}}),xt=ye();function ye(){let t={};return ["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){let n=this;for(let i=0,o=this.length;i<o;i++)f(n,`${i}`);let s=n[e](...r);return s===-1||s===!1?n[e](...r):s};}),["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].forEach(e=>{t[e]=function(...r){let n=h(this),s=n[e].apply(this,r);return v(n,it),s};}),["forEach","map","filter","reduce","reduceRight","some","every","find","findIndex","findLast","findLastIndex","entries","keys","values"].forEach(e=>{t[e]=function(...r){let n=h(this);return f(n,it),n[e].apply(this,r)};}),t}var Ne=(t,e)=>({get(r,n,s){if(n===L)return !0;if(n===I)return r;if(xt.hasOwnProperty(n))return Reflect.get(xt,n,s);let i=Reflect.get(r,n,s);return A(n,e)?i:(Ot(n)&&f(r,n),f(r,"length"),_(i)&&!t?pt(i):i)},set(r,n,s,i){let o=Reflect.get(r,n,i),a=Reflect.set(r,n,s,i);return $(s,o)&&(Ot(n)&&v(r,n),n==="length"&&v(r,"length")),a}}),Se={get(t,e){return e===L?!0:e===I?t:((e===Symbol.iterator||e==="size")&&f(t,g),Reflect.get(ft(kt,e)&&e in t?kt:t,e,t))}},_e={get(t,e){return e===L?!0:e===I?t:Reflect.get(ft(Rt,e)&&e in t?Rt:t,e,t)}},kt={get(t){let e=h(this);return f(e,g),e.get(t)},set(t,e){let r=h(this),n=r.set(t,e);return v(r,g),n},add(t){let e=h(this),r=e.add(t);return v(e,g),r},has(t){let e=h(this);return f(e,g),e.has(t)},delete(t){let e=h(this),r=e.has(t),n=e.delete(t);return r&&v(e,g),n},clear(){let t=h(this),e=t.size>0,r=t.clear();return e&&v(t,g),r},forEach(t,e){let r=h(this);f(r,g),r.forEach((n,s)=>{t.call(e,n,s,r);});},get size(){let t=h(this);return f(t,g),t.size},keys(){let t=h(this);return f(t,g),t.keys()},values(){let t=h(this);return f(t,g),t.values()},entries(){let t=h(this);return f(t,g),t.entries()},[Symbol.iterator](){let t=h(this);return f(t,g),t[Symbol.iterator]()}},Rt={get(t){let e=h(this);return f(e,M),e.get(t)},set(t,e){let r=h(this),n=r.set(t,e);return v(r,M),n},add(t){let e=h(this),r=e.add(t);return v(e,M),r},has(t){let e=h(this);return f(e,M),e.has(t)},delete(t){let e=h(this),r=e.delete(t);return v(e,M),r}};function pt(t,e=!1,r){if(!_(t)||O(t))return t;if(tt.has(t))return tt.get(t);let n;k(t)?(f(t,it),n=Ne(e,r)):at(t)||ut(t)?(f(t,g),n=Se):It(t)||Lt(t)?(f(t,M),n=_e):n=be(e,r);let s=new Proxy(t,n);return tt.set(t,s),s}function Ve(t){if(!O(t)){x("clearReactive: argument must be a reactive object");return}if(Lt(t)||It(t)){x("clearReactive: WeakMap and WeakSet are not clearable");return}we(()=>{k(t)?t.length=0:at(t)||ut(t)?t.clear():_(t)&&Object.keys(t).forEach(e=>{delete t[e];});});}function we(t){try{ot=!0,t();}finally{ot=!1,Ce();}}function Ce(){U.size>0&&(U.forEach(t=>t()),U.clear());}function tr(t,e,r){return Te(t,e,r)}var $t=void 0,D,ct=!1;function Ee(t){D=t,ct||(ct=!0,ht(Me));}function Me(){D==null||D(),D=null,ct=!1;}function Te(t,e,{deep:r,immediate:n}={}){let s,i=k(t);if(p(t)||zt(t))s=()=>t.value;else if(O(t))s=()=>J({},t);else if(i)s=()=>t.map(c=>Oe(c));else if(lt(t))s=t;else return x("Invalid source type",t),Ht;if(e&&r){let c=s,u=r===!0?1/0:r;s=()=>j(c(),u);}let o=i?Array.from({length:t.length}).fill($t):$t,a=!1,l=()=>{let c=s();$(c,o)&&(n&&e&&(e(c,o),o=c),a&&e&&Ee(()=>{e(c,o),o=c;}),!a&&(o=c));},d=T(l,{flush:"sync"});return a=!0,n&&l(),d}function Oe(t){return p(t)||zt(t)?t.value:O(t)?J({},t):lt(t)?t():(x("Invalid source",t),Ht)}function j(t,e=1/0,r){if(e<=0||!_(t)||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,p(t))j(t.value,e,r);else if(k(t))for(let n of t)j(n,e,r);else if(at(t)||ut(t))t.forEach(n=>{j(n,e,r);});else if(Wt(t))for(let n in t)j(t[n],e,r);return t}function Pe(t){let{state:e,getters:r,actions:n}=t,s=J({},e!=null?e:{}),i=W(e!=null?e:{}),o=[],a=[],d=J({state:i},{patch$(c){Object.assign(i,c),o.forEach(u=>u(i)),a.forEach(u=>u(i));},subscribe$(c){o.push(c);},unsubscribe$(c){let u=o.indexOf(c);u!==-1&&o.splice(u,1);},onAction$(c){a.push(c);},reset$(){Object.assign(i,s);}});for(let c in r){let u=r[c];u&&Object.defineProperty(d,c,{get(){return me(u.bind(i,i)).value},enumerable:!0,configurable:!0});}for(let c in n){let u=n[c];u&&(d[c]=u.bind(i));}return d}function er(t){return function(){return Pe(t)}}var je=Object.defineProperty,Ut=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Dt=(t,e,r)=>e in t?je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ke=(t,e)=>{for(var r in e||(e={}))Ae.call(e,r)&&Dt(t,r,e[r]);if(Ut)for(var r of Ut(e))xe.call(e,r)&&Dt(t,r,e[r]);return t},mt=class H{constructor(){this.hooks={mounted:new Set,destroy:new Set};}addEventListener(){}removeEventListener(){}addHook(e,r){var n;(n=this.hooks[e])==null||n.add(r);}getContext(e){return H.context[e]}setContext(e,r){H.context[e]=r;}initRef(){H.ref=this;}removeRef(){H.ref=null;}};mt.ref=null;mt.context={};var E=mt,gt=class extends E{constructor(t,e,r){super(),this.template=t,this.props=e,this.key=r,this.proxyProps={},this.emitter=new Set,this.mounted=!1,this.rootNode=null,this.context={},this.trackMap=new Map,this.proxyProps=Bt(e,n=>w(n,"on")||w(n,"update")),this.key=this.key||e.key;}get firstChild(){var t,e;return (e=(t=this.rootNode)==null?void 0:t.firstChild)!=null?e:null}get isConnected(){var t,e;return (e=(t=this.rootNode)==null?void 0:t.isConnected)!=null?e:!1}inheritNode(t){this.context=t.context,this.hooks=t.hooks,Object.assign(this.proxyProps,t.proxyProps),this.rootNode=t.rootNode,this.trackMap=t.trackMap;let e=this.props;this.props=t.props,this.patchProps(e);}mount(t,e){var r,n,s,i;if(!b(this.template))throw new Error("Template must be a function");if(this.isConnected)return (n=(r=this.rootNode)==null?void 0:r.mount(t,e))!=null?n:[];this.initRef(),this.rootNode=this.template(W(this.proxyProps,["children"])),this.removeRef(),this.mounted=!0;let o=(i=(s=this.rootNode)==null?void 0:s.mount(t,e))!=null?i:[];return this.hooks.mounted.forEach(a=>a()),this.patchProps(this.props),o}unmount(){var t;this.hooks.destroy.forEach(e=>e()),Object.values(this.hooks).forEach(e=>e.clear()),(t=this.rootNode)==null||t.unmount(),this.rootNode=null,this.proxyProps={},this.mounted=!1,this.emitter.forEach(e=>e());}getNodeTrack(t,e){let r=this.trackMap.get(t);return r||(r={cleanup:()=>{}},this.trackMap.set(t,r)),e||r.cleanup(),r}patchProps(t){var e,r,n,s;for(let[i,o]of Object.entries(t))if(w(i,"on")&&((e=this.rootNode)!=null&&e.nodes)){let a=i.slice(2).toLowerCase(),l=o,d=N(this.rootNode.nodes[0],a,l);this.emitter.add(d);}else if(i==="ref")t[i].value=(r=this.rootNode)==null?void 0:r.nodes[0];else if(w(i,"update"))t[i]=p(o)?o.value:o;else if(i!=="children"){let a=(s=(n=this.proxyProps)[i])!=null?s:n[i]=G(o),l=this.getNodeTrack(i);l.cleanup=T(()=>{a.value=b(o)?o():o;});}this.props=t;}};function ar(t,e,r){return Y(t)&&(We(t)&&(t=He(t),e={1:e}),t===""&&(e={0:e}),t=Re(t)),b(t)?new gt(t,e,r):new te(t,e,r)}function ur(t){return t instanceof gt}function S(t){return t instanceof gt||t instanceof te}function Re(t){let e=document.createElement("template");return e.innerHTML=Ie(t),e}function lr(t){return t.children}var Yt="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",$e="a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bdi,bdo,bgsound,big,blink,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,kbd,keygen,label,legend,li,link,listing,main,map,mark,marquee,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,spacer,span,strike,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,xmp";function Jt(t){if(S(t)||t instanceof Node)return t;let e=V(t)?"":String(t);return document.createTextNode(e)}function C(t,e,r=null){let n=S(r)?r.firstChild:r;S(e)?e.mount(t,n):n?n.before(e):t.append(e);}function F(t){S(t)?t.unmount():t.parentNode&&t.remove();}function Vt(t,e,r){C(t,e,r),F(r);}function Gt(t,e,r){if(e==="class"){typeof r=="string"?t.className=r:Array.isArray(r)?t.className=r.join(" "):r&&typeof r=="object"&&(t.className=Object.entries(r).reduce((n,[s,i])=>n+(i?` ${s}`:""),"").trim());return}if(e==="style"){if(typeof r=="string")t.style.cssText=r;else if(r&&typeof r=="object"){let n=r;Object.keys(n).forEach(s=>{t.style.setProperty(Ct(s),String(n[s]));});}return}V(r)?t.removeAttribute(e):r===!0?t.setAttribute(e,""):t instanceof HTMLInputElement?t.value=String(r):t.setAttribute(e,String(r));}function Le(t,e){if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return N(t,"change",()=>{e(!!t.checked);});case"date":return N(t,"change",()=>{e(t.value?t.value:"");});case"file":return N(t,"change",()=>{t.files&&e(t.files);});case"number":return N(t,"input",()=>{let r=Number.parseFloat(t.value);e(Number.isNaN(r)?"":String(r));});case"radio":return N(t,"change",()=>{e(t.checked?t.value:"");});case"text":return N(t,"input",()=>{e(t.value);})}if(t instanceof HTMLSelectElement)return N(t,"change",()=>{e(t.value);});if(t instanceof HTMLTextAreaElement)return N(t,"input",()=>{e(t.value);})}var Zt=Promise.resolve();function fr(t){return t?Zt.then(t):Zt}function N(t,e,r){return t.addEventListener(e,r),()=>t.removeEventListener(e,r)}function Ie(t){let e=Yt.split(","),r=[],n=[],s=/<\/?([\da-z-]+)([^>]*)>/gi,i=0;for(;;){let o=s.exec(t);if(!o)break;let[a,l]=o,d=a[1]==="/";if(n.push(t.slice(i,o.index)),i=o.index+a.length,d){for(;r.length>0&&r[r.length-1]!==l;){let c=r.pop();c&&n.push(`</${c}>`);}r.length>0&&r.pop();}else e.includes(l)||r.push(l);n.push(a);}for(n.push(t.slice(i));r.length>0;){let o=r.pop();o&&n.push(`</${o}>`);}return n.join("")}function We(t){return $e.split(",").includes(t)}function He(t){return Yt.split(",").includes(t)?`<${t}/>`:`<${t}></${t}>`}function Fe(t,e,r,n){let s=new Map,i=Array.from(e.values()),o=i.length;if(e.size>0&&r.length===0){if(t.childNodes.length===o+(n?1:0))t.innerHTML="",n&&C(t,n);else {let c=document.createRange(),u=i[0],m=S(u)?u.firstChild:u;c.setStartBefore(m),n?c.setEndBefore(n):c.setEndAfter(t),c.deleteContents();}return i.forEach(c=>{S(c)&&c.unmount();}),s}let a=[],l=qe(r),d=0;for(let[c,u]of r.entries()){let m=i[d],P=Z(m,c);for(;m&&!l.has(P);)F(m),e.delete(P),m=i[++d],P=Z(m,c);let vt=Z(u,c),X=e.get(vt);if(X&&(u=Ke(t,X,u)),m)if(m===X)d++;else {let bt=document.createComment("");C(t,bt,m),a.push([bt,u]);}else C(t,u,n);s.set(vt,u);}return a.forEach(([c,u])=>Vt(t,u,c)),e.forEach((c,u)=>{c.isConnected&&!s.has(u)&&F(c);}),s}function Ke(t,e,r){return e===r?e:S(e)&&S(r)&&e.template===r.template?(r.inheritNode(e),r):e instanceof Text&&r instanceof Text?(e.textContent!==r.textContent&&(e.textContent=r.textContent),e):(Vt(t,r,e),r)}function qe(t){let e=new Map;for(let[r,n]of t.entries()){let s=Z(n,r);e.set(s,n);}return e}function Z(t,e){if(S(t)){let r=t.key;if(r!=null)return String(r)}return `_$${e}$`}var te=class ee{constructor(e,r,n){this.template=e,this.props=r,this.key=n,this.treeMap=new Map,this.mounted=!1,this.nodes=[],this.provides={},this.trackMap=new Map,this.parent=null,this.key=this.key||r.key;}get firstChild(){var e;return (e=this.nodes[0])!=null?e:null}get isConnected(){return this.mounted}addEventListener(){}removeEventListener(){}mount(e,r){var n;if(this.parent=e,this.isConnected)return this.nodes.forEach(o=>C(e,o,r)),this.nodes;let s=this.template.content.cloneNode(!0),i=s.firstChild;return (n=i==null?void 0:i.hasAttribute)!=null&&n.call(i,"_svg_")&&(i.remove(),i==null||i.childNodes.forEach(o=>{s.append(o);})),this.nodes=Array.from(s.childNodes),this.mapNodeTree(e,s),C(e,s,r),this.patchNodes(this.props),this.mounted=!0,this.nodes}unmount(){this.trackMap.forEach(e=>{var r,n;(r=e.cleanup)==null||r.call(e),(n=e.lastNodes)==null||n.forEach(s=>{e.isRoot?F(s):s instanceof ee&&s.unmount();});}),this.trackMap.clear(),this.treeMap.clear(),this.nodes.forEach(e=>F(e)),this.nodes=[],this.mounted=!1;}mapNodeTree(e,r){let n=1;this.treeMap.set(0,e);let s=i=>{i.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&this.treeMap.set(n++,i);let o=i.firstChild;for(;o;)s(o),o=o.nextSibling;};s(r);}patchNodes(e){for(let r in e){let n=Number(r),s=this.treeMap.get(n);if(s){let i=this.props[r];this.patchNode(r,s,i,n===0);}}this.props=e;}getNodeTrack(e,r,n){var s;let i=this.trackMap.get(e);return i||(i={cleanup:()=>{}},r&&(i.lastNodes=new Map),n&&(i.isRoot=!0),this.trackMap.set(e,i)),(s=i.cleanup)==null||s.call(i),i}inheritNode(e){this.mounted=e.mounted,this.nodes=e.nodes,this.trackMap=e.trackMap,this.treeMap=e.treeMap;let r=this.props;this.props=e.props,this.patchNodes(r);}patchNode(e,r,n,s){for(let i in n)if(i==="children"&&n.children)if(z(n.children))n.children.filter(Boolean).forEach((o,a)=>{var l;let[d,c]=z(o)?o:[o,null],u=_t(c)?null:(l=this.treeMap.get(c))!=null?l:null,m=`${e}:${i}:${a}`,P=this.getNodeTrack(m,!0,s);Xt(P,r,d,u);});else {let o=`${e}:${i}:0`,a=this.getNodeTrack(o,!0,s);Xt(a,r,n.children,null);}else if(i==="ref")n[i].value=r;else if(w(i,"on")){let o=i.slice(2).toLocaleLowerCase(),a=this.getNodeTrack(`${e}:${i}`),l=n[i];a.cleanup=N(r,o,l);}else if(!w(i,"update")){let o=this.getNodeTrack(`${e}:${i}`),a=n[i],l=p(a)?a:G(a);Qt(o,r,i,l.value);let d=T(()=>{l.value=p(a)?a.value:a,Qt(o,r,i,l.value);}),c,u=`update${Et(i)}`;n[u]&&(c=Le(r,m=>{n[u](m);})),o.cleanup=()=>{d&&d(),c&&c();};}}};function Qt(t,e,r,n){let s=e;s.setAttribute&&(b(n)?t.cleanup=T(()=>{Gt(s,r,n());}):Gt(s,r,n));}function Xt(t,e,r,n){b(r)?t.cleanup=T(()=>{let s=B(r()).map(Jt);t.lastNodes=Fe(e,t.lastNodes,s,n);}):B(r).forEach((s,i)=>{let o=Jt(s);t.lastNodes.set(String(i),o),C(e,o,n);});}function hr(t){var e;Q("onMounted"),(e=E.ref)==null||e.addHook("mounted",t);}function pr(t){var e;Q("onDestroy"),(e=E.ref)==null||e.addHook("destroy",t);}function Q(t,e){E.ref||console.error(`"${t}"(key: ${St(e)?e.toString():e}) can only be called within the component function body
7
+ and cannot be used in asynchronous or deferred calls.`);}function dr(t,e){var r;Q("useProvide",t),(r=E.ref)==null||r.setContext(t,e);}function mr(t,e){var r;return Q("useInject",t),((r=E.ref)==null?void 0:r.getContext(t))||e}function gr(){return qt(null)}function ze(t){return Object.entries(t).map(([e,r])=>e==="children"||b(r)?"":`${e}="${wt(String(r))}"`).filter(Boolean).join(" ")}function Be(t){Object.keys(t).forEach(e=>{b(t[e])&&delete t[e],p(t[e])&&(t[e]=t[e].value);});}function Ue(t,e,r,n,s,i){if(p(t))n.template+=t.value;else if(t instanceof re){let o=i?String(i):`${r}`;s[o]||(s[o]=[]);let a=t.mount();s[o].push(b(a)?a(e):p(a)?a.value:a);}else n.template+=b(t)?t(e):String(t);}var re=class dt extends E{constructor(e,r={},n){super(),this.template=e,this.props=r,this.key=n,this.childNodesMap={},this.processedTemplates={};}mount(){this.initRef();let e=this.render();return this.removeRef(),e}initTemplates(){let e=Array.isArray(this.template)?this.template.reduce((r,n,s)=>(r[s+1]={template:n},r),{}):this.template;Nt(e)&&Object.entries(e).forEach(([r,n])=>{let s=ke({},this.props[r]);Be(s),s.children&&s.children.forEach(i=>{let[o,a]=z(i)?i:[i,null];if(b(o)){let l=o(s);Ue(l,s,r,n,this.childNodesMap,a);}else n.template+=p(o)?o.value:String(o);}),this.processedTemplates[r]={template:n.template,props:s};});}render(){if(b(this.template)){let e=this.template(this.props);return e instanceof dt?e.mount():String(e)}return this.template instanceof dt?this.template.mount():(this.initTemplates(),Object.entries(this.processedTemplates).map(([e,{template:r,props:n}])=>{let s=r;return n&&Object.keys(n).length>0&&(s+=` ${ze(n)}`),this.childNodesMap[e]&&(s=s.replace("<!>",this.renderChildren(this.childNodesMap[e]))),s}).join(""))}renderChildren(e){return B(e).map(String).join("")}};function De(t,e){return new re(t,e)}function vr(t,e){return De(t,e).mount()}globalThis&&(globalThis.__essor_version__=yt);/**
8
+ * @estjs/shared v0.0.12
9
9
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
10
10
  * @license MIT
11
11
  **/
12
12
  /**
13
- * @estjs/signal v0.0.11
13
+ * @estjs/signal v0.0.12
14
14
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
15
15
  * @license MIT
16
16
  **/
17
17
  /**
18
- * @estjs/template v0.0.11
18
+ * @estjs/template v0.0.12
19
19
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
20
20
  * @license MIT
21
21
  **/
22
22
 
23
- export { N as ComponentNode, _e as Fragment, St as TemplateNode, pe as createStore, rt as essor_version, Ne as h, pt as isComputed, v as isJsxElement, w as isReactive, h as isSignal, we as nextTick, Ce as onDestroy, Me as onMount, Te as renderSSG, tt as renderTemplate, Se as renderToString, he as shallowReactive, fe as shallowSignal, vt as signalObject, Zt as template, bt as unReactive, qt as unSignal, Bt as useComputed, M as useEffect, ke as useInject, Ee as useProvide, k as useReactive, H as useSignal, Jt as useWatch };
23
+ export { gt as ComponentNode, lr as Fragment, te as TemplateNode, Ve as clearReactive, er as createStore, yt as essor_version, ar as h, ur as isComponent, zt as isComputed, S as isJsxElement, O as isReactive, p as isSignal, fr as nextTick, pr as onDestroy, hr as onMount, vr as renderToString, Ye as shallowReactive, qt as shallowSignal, Bt as signalObject, De as ssg, Re as template, h as unReactive, ve as unSignal, we as useBatch, me as useComputed, T as useEffect, mr as useInject, dr as useProvide, W as useReactive, gr as useRef, G as useSignal, tr as useWatch };
24
24
  //# sourceMappingURL=essor.esm.js.map
25
25
  //# sourceMappingURL=essor.esm.js.map