solely 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.js +1039 -1000
- package/dist/index.umd.cjs +10 -10
- package/dist/runtime/reactivity/index.d.ts +1 -1
- package/dist/runtime/reactivity/observe.d.ts +5 -1
- package/package.json +1 -1
- package/dist/runtime/reactivity/types.d.ts +0 -51
- package/dist/types/component.d.ts +0 -66
package/dist/index.umd.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`);if(a>
|
|
3
|
-
`):[],
|
|
1
|
+
(function(m,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(m=typeof globalThis<"u"?globalThis:m||self,k(m.solely={}))})(this,function(m){"use strict";var ln=Object.defineProperty;var he=m=>{throw TypeError(m)};var un=(m,k,I)=>k in m?ln(m,k,{enumerable:!0,configurable:!0,writable:!0,value:I}):m[k]=I;var C=(m,k,I)=>un(m,typeof k!="symbol"?k+"":k,I),Mt=(m,k,I)=>k.has(m)||he("Cannot "+I);var A=(m,k,I)=>(Mt(m,k,"read from private field"),I?I.call(m):k.get(m)),_=(m,k,I)=>k.has(m)?he("Cannot add the same private member more than once"):k instanceof WeakSet?k.add(m):k.set(m,I),M=(m,k,I,mt)=>(Mt(m,k,"write to private field"),mt?mt.call(m,I):k.set(m,I),I),O=(m,k,I)=>(Mt(m,k,"access private method"),I);var F,B,H,et,Y,q,Z,J,K,nt,R,fe,Pt,de,pe,Ot,pt,me,ge,Nt,Ct;const N={dark:{gutter:"#858585",errorLineBg:"#3c1e1e",errorLineFg:"#f8f8f2",arrow:"#ff6b6b",badgeBg:"#ff6b6b",badgeFg:"#ffffff",exprLabel:"#a0a0a0",exprCode:"#5ddcff"}}.dark;function it(s){let t=0;for(let e=0;e<s.length;){const n=s.codePointAt(e);if(s[e]===" "){t+=4,e++;continue}n>=9472&&n<=9599||n>255?t+=2:t+=1,e+=n>65535?2:1}return t}function _t(s,t={}){const{lineIndex:e=0,totalLines:n=1}=t,r=Math.max(1,Math.floor(s));return(n<=1||e===0?"^":"~").repeat(r)}function Tt(s,t="",e,n="component"){var ft;const r=(s==null?void 0:s.message)??String(s),o=`%cTemplate Error%c in <${n}> → ${r}`,i=[`color:${N.badgeFg};background:${N.badgeBg};padding:4px 10px;border-radius:6px;font-weight:bold;`,`color:${N.arrow};font-weight:bold;`];if(!t||!(e!=null&&e.loc)||e.loc.length<2){console.error(o,...i),e!=null&&e.expr&&console.log(`Expression: ${e.expr.trim()}`);return}const l=e.loc;let a=l[0]||0,c=l[1]||0;a|=0,c|=0,a<1&&(a=1),c<1&&(c=1);const h=t.split(`
|
|
2
|
+
`);if(a>h.length){console.error(`[Template Error] 行号 ${a} 超出范围`);return}const u=a-1,p=Math.max(0,u-3),$=Math.min(h.length-1,u+3),f=String($+1).length,d=((ft=e.expr)==null?void 0:ft.trim())??"",S=d?d.split(`
|
|
3
|
+
`):[],g=d?Math.max(...S.map(it)):0,b=S.length>1,y=`color:${N.gutter};`,E=`color:${N.arrow};font-weight:bold;`,v=`color:${N.gutter};`,x=`color:${N.errorLineFg};background:${N.errorLineBg};padding:0 4px;`,L=`color:${N.gutter};`,P=`color:${N.arrow};font-weight:bold;padding:0 4px;`;console.groupCollapsed(`${o} %c(Line:${a}, Col:${c})`,...i,`color:${N.gutter};font-weight:normal;`);for(let X=p;X<=$;X++){const At=h[X],oe=String(X+1).padStart(f," ");if(!(X===u)){console.log(`%c${oe} │%c ${At}`,y,v);continue}const rn=At.slice(0,Math.max(0,c-1)),ae=it(rn),ce=" ".repeat(f+3),on=oe.padEnd(f," ");if(console.log(`%c${on} │%c ${At}`,E,x),b)for(let D=0;D<S.length;D++){const Lt=S[D],st=u+D;let It=0;if(D===0)It=ae;else if(st<h.length){const rt=h[st],dt=rt.search(/\S/),cn=dt===-1?rt:rt.slice(0,dt);It=it(cn)}const an=Math.max(1,it(Lt.trim())),le=_t(an,{lineIndex:D,totalLines:S.length}),ue=ce+" ".repeat(It);if(D===0)console.log(`%c${ue}%c${le}`,L,P);else if(st<h.length){const rt=String(st+1).padEnd(f," "),dt=h[st];console.log(`%c${rt} │%c ${dt}`,E,x),console.log(`%c${ue}%c${le}`,L,P)}}else{const D=ce+" ".repeat(ae),Lt=_t(g||1);console.log(`%c${D}%c${Lt}`,L,P)}}d&&console.log(`%cExpression:%c ${d}`,`color:${N.exprLabel};font-weight:bold;`,`color:${N.exprCode};font-family:monospace;`),console.groupEnd()}const gt={};function Wt(s){const t=s.map(e=>e.replace(/[',"]/g,"")).join(",");if(!gt[t]){const e=s[s.length-1];if(e.trim()==="")throw new Error("Function body cannot be empty");if(be(e))throw new Error("Input contains potentially dangerous code: "+e);gt[t]=new Function(...s)}return gt[t]}const ye=["eval","Function","process","require"];function be(s){return ye.some(t=>new RegExp(`\\b${t}\\b`,"g").test(s))}const we=/\{\{\{\s*[\s\S]*?\s*\}\}\}/,Ee=/\{\{\s*([\s\S]*?)\s*\}\}/g;function ve(s,t){if(!(s!=null&&s.trim()))return"";if(we.test(s))throw new Error("Illegal interpolation syntax: use {{ }} instead of {{{ }}}");return t==="template"?s.replace(Ee,(e,n)=>`\${${n.trim()}}`):s}function $e(s,t){const e=n=>n.endsWith(";")?n:n+";";switch(t){case"template":return`return \`${s}\`;`;case"expression":return`return (${s});`;case"handler":case"lifecycle":return e(s)}}function Se(s){if(!s.length)return{loopValues:"",loopIndices:""};const t=s.map(n=>n.item).join(", "),e=s.map(n=>n.index).join(", ");return{loopValues:`var [${t}] = loops.map(l => l.itmVal);`,loopIndices:`var [${e}] = loops.map(l => l.idxVal);`}}function ke(s,t,e,n){const r=s==="lifecycle"?["el","loops"]:s==="handler"?["event","loops"]:["loops"],i=`
|
|
4
4
|
const { $data } = this;
|
|
5
5
|
${s==="handler"?"const { value, checked } = event?.target || {};":""}
|
|
6
6
|
${e}
|
|
7
7
|
${n}
|
|
8
8
|
${t}
|
|
9
|
-
`.replace(/^\s+|\s+$/gm,"");return r.push(i),r}function
|
|
10
|
-
const _v = ${
|
|
9
|
+
`.replace(/^\s+|\s+$/gm,"");return r.push(i),r}function Ft(s,t,e){if(!(s!=null&&s.trim()))return()=>"";const n=ve(s,t),r=$e(n,t),{loopValues:o,loopIndices:i}=Se(e),l=ke(t,r,o,i);return Wt(l)}const Dt=new Set(["onabort","onautocomplete","onautocompleteerror","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onwheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting"]),V=s=>{if(s===null||typeof s!="object")return!1;const t=Object.prototype.toString.call(s);return!["[object Function]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]"].includes(t)};function xe(s=window.location){let t;typeof s=="string"?t=new URL(s).hash:t=s.hash;const e=t.split("?");let n=e[0];const r=e[1],o={};return n=n.replace(/^#\/?/,""),r&&r.split("&").forEach(i=>{const[l,a]=i.split("=");l&&a&&(o[decodeURIComponent(l)]=decodeURIComponent(a))}),{path:n.split("/").filter(Boolean),query:o}}var w=(s=>(s[s.Element=0]="Element",s[s.Text=1]="Text",s[s.Comment=2]="Comment",s[s.If=3]="If",s[s.ElseIf=4]="ElseIf",s[s.Else=5]="Else",s[s.For=6]="For",s[s.Conditional=7]="Conditional",s[s.Other=99]="Other",s))(w||{});const Vt={onMounted:"mounted",onUpdated:"updated",onUnmounted:"unmounted"};function jt(s){return Vt[s]??null}function Bt(s){return s==="mounted"||s==="updated"||s==="unmounted"}const yt=Symbol.for("solely.irMeta"),U=process.env.NODE_ENV!=="production",Re=/\{\{[\s\S]*?\}\}/;class Ce{constructor(){C(this,"compilers",new Map)}get(t="anonymous"){let e=this.compilers.get(t);return e||(e=new Ae,this.compilers.set(t,e)),e}clear(t){var e;if(t)(e=this.compilers.get(t))==null||e.clear(),this.compilers.delete(t);else{for(const n of this.compilers.values())n.clear();this.compilers.clear()}}}const Gt=new Ce;class Ae{constructor(){C(this,"cache",new Map);C(this,"functions",[])}makeCacheKey(t,e,n){if(n.length===0)return`${t}:${e}`;const r=n.map(o=>Object.keys(o).sort().join(",")).join(";");return`${t}:${e}:${r}`}compile(t,e,n){const r=e==null?void 0:e.trim();if(!r)return 0;const o=this.makeCacheKey(t,r,n),i=this.cache.get(o);if(i!==void 0)return i;let l;try{l=Ft(r,t,n)}catch(c){U&&console.error(`[IR Compile Error] Type: ${t}, Expr: "${r}"`,c),l=()=>""}const a=this.functions.push(l);return this.cache.set(o,a),a}getFunctions(){return this.functions}getStats(){return{total:this.functions.length,cached:this.cache.size}}clear(){this.cache.clear(),this.functions=[]}}function qt(s){const t=s[0];return t===":"?{isDynamic:!0,type:"expression"}:t==="@"?{isDynamic:!0,type:"handler"}:Bt(s)?{isDynamic:!0,type:"lifecycle"}:{isDynamic:!1,type:null}}function Le(s){return s?Re.test(s):!1}function bt(s,t,e){U&&(s[yt]={expr:t??"",loc:e??null})}function Kt(s){if(!s.attrs)return;const t=s.attrs.find(a=>a.key==="s-model");if(!t)return;const e="$data."+t.value.replace("this.","").replace("$data.",""),n=t.loc,r=(s.tag||"").toLowerCase(),o=s.attrs.find(a=>a.key==="type"),i=(o==null?void 0:o.value)??"text";s.attrs=s.attrs.filter(a=>a!==t);const l=(a,c,h)=>{var u;(u=s.attrs)==null||u.push({key:a,value:c,role:h,loc:n})};if(r==="input"){if(i==="checkbox"){const a=s.attrs.find(p=>p.key==="value"),c=a?JSON.stringify(a.value):'"on"',h=`Array.isArray(${e}) ? ${e}.includes(${c}) : ${e}`;l(":checked",h);const u=`
|
|
10
|
+
const _v = ${c};
|
|
11
11
|
if(Array.isArray(${e})) {
|
|
12
12
|
const _i = ${e}.indexOf(_v);
|
|
13
13
|
if(checked && _i === -1) ${e}.push(_v);
|
|
14
14
|
else if(!checked && _i > -1) ${e}.splice(_i,1);
|
|
15
15
|
} else {
|
|
16
16
|
${e} = checked;
|
|
17
|
-
}`;
|
|
17
|
+
}`;l("@change",u,"model");return}if(i==="radio"){const a=s.attrs.find(h=>h.key==="value"),c=(a==null?void 0:a.value)??"null";l(":checked",`${e} == ${JSON.stringify(c)}`),l("@change",`if (checked) ${e} = ${JSON.stringify(c)}`,"model");return}l(":value",e),l("@input",`${e} = value`,"model");return}if(r==="textarea"){l(":value",e),l("@input",`${e} = value`,"model");return}if(r==="select"){s.attrs.some(c=>c.key==="multiple")?(l("updated",`
|
|
18
18
|
const values = Array.isArray(${e}) ? ${e} : ${e} != null ? [${e}] : [];
|
|
19
19
|
for (const opt of el.options) {
|
|
20
20
|
opt.selected = values.includes(opt.value);
|
|
21
|
-
}`),
|
|
22
|
-
`),
|
|
23
|
-
`&&c.push(l+1);function a(l){let u=0;for(let h=1;h<c.length&&!(c[h]>l);h++)u=h;return[u+1,l-c[u]+1]}for(;o<i;){const l=s.indexOf("<",o);if(l===-1||l>o){const R=s.substring(o,l===-1?void 0:l),I=R.trim();if(I){const d=R.indexOf(I),E=o+d,S=a(E);r().push({type:y.Text,tag:"text",content:I,loc:S,children:[]})}if(l===-1)break;o=l}const u=Oe(s,o+1);if(u===-1){const R=s.substring(o);R.trim()&&r().push({type:y.Text,tag:"text",content:R.trim(),children:[],loc:a(o)});break}const h=s.substring(o,u+1),p=r(),v=a(o);if(h.startsWith("<!--")){p.push({type:y.Comment,tag:"comment",content:h.slice(4,-3),loc:v,children:[]}),o=u+1;continue}if(h.startsWith("<![CDATA[")){p.push({type:y.Text,tag:"text",content:h.slice(9,-3),loc:v,children:[]}),o=u+1;continue}if(h.startsWith("<!")&&!h.startsWith("<!--")){p.push({type:y.Comment,tag:"comment",content:h.slice(2,-1),loc:v,children:[]}),o=u+1;continue}if(h.startsWith("<?")){p.push({type:y.Comment,tag:"comment",content:h.slice(2,-2),loc:v,children:[]}),o=u+1;continue}if(h.startsWith("</")){const R=n.pop();for(;e.length>0;){if((e[e.length-1].tag||"").toLowerCase()===(R==null?void 0:R.toLowerCase())){e.pop();break}e.pop()}o=u+1;continue}const g=Pe(h,v);p.push(g);const m=g.tag||"",L=m.toLowerCase().startsWith("script"),b=m.toLowerCase().startsWith("style"),$=h.endsWith("/>")||Le.has(m.toLowerCase());if((L||b)&&!$){const R=`</${m}>`,I=s.toLowerCase().indexOf(R,u+1);if(I!==-1){const d=s.substring(u+1,I);d.length&&g.children.push({type:y.Text,tag:"text",content:d,loc:a(u+1),children:[]}),o=I+R.length;continue}else{const d=s.substring(u+1);d.length&&g.children.push({type:y.Text,tag:"text",content:d,loc:a(u+1),children:[]}),o=i;continue}}!$&&g.type!==y.Text&&g.type!==y.Comment&&(e.push(g),n.push(m)),o=u+1}return t}const ut=Symbol("solely.raw");function Yt(s){const t=s&&s[ut];return t?Yt(t):s}function Ne(s){return!!(s&&s[ut])}const $t=(s,t,e=new WeakMap)=>{if(s===t)return!0;if(s==null||t==null||typeof s!="object"||typeof t!="object")return s===t;if(Array.isArray(s)&&Array.isArray(t)){if(s.length!==t.length)return!1;if(e.has(s))return e.get(s)===t;e.set(s,t);for(let r=0;r<s.length;r++)if(!$t(s[r],t[r],e))return!1;return!0}if(Array.isArray(s)!==Array.isArray(t))return!1;if(e.has(s))return e.get(s)===t;e.set(s,t);const n=Reflect.ownKeys(s);if(n.length!==Reflect.ownKeys(t).length)return!1;for(const r of n)if(!Reflect.has(t,r)||!$t(s[r],t[r],e))return!1;return!0};function Zt(s,t,e={}){const{throttle:n=0,onBatch:r,immediate:o=!1,deepCompare:i=!1}=e;let c=!0,a=null,l=[],u=0;const h=new WeakMap,p=new WeakMap,v=new WeakMap,g=Array.isArray(e.filter)?e.filter:e.filter?[e.filter]:[],m=d=>{if(g.length===0)return!0;const E=d.map(String).join(".");return g.some(S=>{if(S==="")return!0;const w=S.replace(/\./g,"\\.").replace(/\*\*/g,"(.+)").replace(/\*/g,"[^.]+").replace(/\[\d+\]/g,"\\[\\d+\\]");return new RegExp(`^${w}$`).test(E)})},L=d=>{const E=[];let S=d;for(;S;){const w=p.get(S);if(!w||w.key==null)break;E.unshift(w.key),S=w.parent}return E},b=(d,E)=>{if(!c)return;const S=L(d);if(!m(S))return;const w={...E,path:S};n>0?(l.push(w),a||(a=setTimeout(()=>{const M=[...l];l=[],a=null,c&&(r==null||r(M),M.forEach(t))},n))):(r==null||r([w]),t(w))},$=(d,E)=>{const S={};return["push","pop","shift","unshift","splice"].forEach(w=>{S[w]=function(...M){u++;const x=d[w].apply(d,M);if(u--,w==="push")b(E,{type:"array-push",index:d.length-M.length,values:M});else if(w==="unshift")b(E,{type:"array-push",index:0,values:M});else if(w==="pop")b(E,{type:"array-splice",index:d.length,deleteCount:1,insert:[]});else if(w==="shift")b(E,{type:"array-splice",index:0,deleteCount:1,insert:[]});else if(w==="splice"){const[P,O,...F]=M;b(E,{type:"array-splice",index:P,deleteCount:O,insert:F})}return x}}),["sort","reverse","fill","copyWithin"].forEach(w=>{S[w]=function(...M){u++;const x=d[w].apply(d,M);return u--,b(E,{type:"array-reset",method:w}),x}}),["indexOf","lastIndexOf","includes"].forEach(w=>{S[w]=function(M,...x){let P=d[w].apply(d,[M,...x]);return(P===-1||P===!1)&&Ne(M)&&(P=d[w].apply(d,[Yt(M),...x])),P}}),S},R=(d,E,S)=>{if(!Object.isExtensible(d)||d[ut])return d;const w=h.get(d);if(w)return p.set(w,{parent:E,key:S}),w;const M={get(P,O,F){if(O===ut)return P;if(Array.isArray(P)){const B=v.get(x);if(B&&Object.prototype.hasOwnProperty.call(B,O))return Reflect.get(B,O,F)}const G=Reflect.get(P,O,F);return typeof O=="symbol"?G:z(G)?R(G,x,O):G},set(P,O,F,G){const B=P[O];if(i?$t(B,F):B===F)return!0;const mt=Reflect.set(P,O,F,G);return u===0&&(Array.isArray(B)&&Array.isArray(F)?b(x,{type:"array-replace",oldValue:B,newValue:F}):b(x,{type:"set",key:O,newValue:F,oldValue:B})),mt},deleteProperty(P,O){if(!Reflect.has(P,O))return!1;const F=P[O],G=Reflect.deleteProperty(P,O);return G&&u===0&&b(x,{type:"delete",key:O,oldValue:F}),G}},x=new Proxy(d,M);return h.set(d,x),p.set(x,{parent:E,key:S}),Array.isArray(d)&&v.set(x,$(d,x)),x},I=R(s,null,null);if(o){const d=(E,S,w=new WeakSet)=>{!z(E)||w.has(E)||(w.add(E),Reflect.ownKeys(E).forEach(M=>{const x=E[M];b(S,{type:"set",key:M,newValue:x,oldValue:void 0}),z(x)&&d(x,R(x,S,M),w)}))};d(s,I)}return{proxy:I,unobserve:()=>{c=!1,l=[],a&&clearTimeout(a)},resume:()=>{c=!0}}}const Jt=Symbol.for("solely.manifest");class st extends HTMLElement{constructor(e={}){var o;super();j(this,C);j(this,q);j(this,J);j(this,X);j(this,rt);j(this,Q);j(this,U);j(this,tt,!1);j(this,et,!1);j(this,H,!1);j(this,it,!1);const n=this.constructor;T(this,q,n[Jt]||{tagName:"base-element"});const r=N(this,q);T(this,Q,(o=r.shadowDOM)!=null&&o.use?this.attachShadow({mode:r.shadowDOM.mode||"open"}):this),W(this,C,Ot).call(this,e),W(this,C,ue).call(this,r),queueMicrotask(()=>W(this,C,_t).call(this))}static get observedAttributes(){const e=this[Jt];return e!=null&&e.propMap?Array.from(e.propMap.keys()):[]}get $data(){return N(this,rt)}set $data(e){var n;z(e)||(e={}),(n=N(this,U))==null||n.call(this),W(this,C,Ot).call(this,e),W(this,C,gt).call(this)}refresh(){W(this,C,gt).call(this)}connectedCallback(){var o;const e=this.constructor;Array.isArray(e.upgradeProps)&&W(this,C,ce).call(this,e.upgradeProps),W(this,C,_t).call(this);const n=N(this,q);if((n.className||n.tagName||"").split(" ").forEach(i=>i&&this.classList.add(i)),W(this,C,fe).call(this),n.propMap&&z(this.$data))for(const[i,c]of n.propMap){const a=c.name;if(this.hasAttribute(i)){const l=this.getAttribute(i),u=W(this,C,Nt).call(this,l,c.default,c.type);this.$data[a]=u}else"default"in c&&(this.$data[a]=c.default)}N(this,X)&&T(this,J,ne(N(this,X),N(this,Q),this)),this.mounted(),(o=this.onInit)==null||o.call(this)}disconnectedCallback(){var e;this.unmounted(),(e=N(this,U))==null||e.call(this),T(this,U,void 0)}attributeChangedCallback(e,n,r){var u;if(n===r||!z(this.$data))return;const i=(u=N(this,q).propMap)==null?void 0:u.get(e);if(!i)return;const c=i.name,a=this.$data[c],l=W(this,C,Nt).call(this,r,i.default??a,i.type);this.$data[c]=l,T(this,H,!0),this.attributeChanged(e,a,l)}emit(e,n,r){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:n,...r}))}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(e,n,r){}beforeAttributesUpdate(){}afterAttributesUpdate(){}}q=new WeakMap,J=new WeakMap,X=new WeakMap,rt=new WeakMap,Q=new WeakMap,U=new WeakMap,tt=new WeakMap,et=new WeakMap,H=new WeakMap,it=new WeakMap,C=new WeakSet,ce=function(e){for(const n of e)if(this.hasOwnProperty(n)){const r=this[n];delete this[n],this[n]=r}},Ot=function(e){const{proxy:n,unobserve:r}=Zt(e,o=>{var i,c;if(o.type==="set"){const{key:a,newValue:l}=o,u=N(this,q),h=String(a),p=((i=u.propMap)==null?void 0:i.get(h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()))||Array.from(((c=u.propMap)==null?void 0:c.values())||[]).find(v=>v.name===h);p!=null&&p.reflect&&W(this,C,le).call(this,p,l)}this.emit("change",{source:"state",...o}),W(this,C,gt).call(this)});T(this,rt,n),T(this,U,r)},le=function(e,n){const r=e.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(e.type==="boolean")n?this.setAttribute(r,""):this.removeAttribute(r);else{const o=typeof n=="object"?JSON.stringify(n):String(n);this.setAttribute(r,o)}},ue=function(e){e.ir&&T(this,X,e.ir)},Nt=function(e,n,r){if(e===null)return r==="boolean"?n??!1:n;switch(r){case"boolean":return!0;case"number":{const o=Number(e);return isNaN(o)?n:o}case"object":try{return JSON.parse(e)}catch{return n}default:return e}},gt=function(){N(this,et)||!N(this,J)||(T(this,et,!0),queueMicrotask(()=>{T(this,et,!1),W(this,C,he).call(this)}))},he=function(){N(this,tt)||!this.isConnected||(T(this,tt,!0),N(this,H)&&this.beforeAttributesUpdate(),this.beforeUpdate(),N(this,J).update(),this.updated(),N(this,H)&&(this.afterAttributesUpdate(),T(this,H,!1)),T(this,tt,!1))},fe=function(){const e=N(this,q);if(!e.styles)return;const n=N(this,Q);if(e.sheet&&n instanceof ShadowRoot&&"adoptedStyleSheets"in n){n.adoptedStyleSheets.includes(e.sheet)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,e.sheet]);return}const r=n instanceof ShadowRoot?n:document.head,o=`solely-style-${e.tagName}`;if(!r.querySelector(`#${o}`)){const i=document.createElement("style");i.id=o,i.textContent=e.styles,r.appendChild(i)}},_t=function(){N(this,it)||(T(this,it,!0),this.created())},Lt=new WeakMap,A(st,"upgradeProps"),j(st,Lt,!1);const _e=Symbol.for("solely.manifest"),St=s=>{const t=s;return e=>{const{tagName:n}=t;if(customElements.get(n))return e;if(typeof t.template=="string"&&!t.ir)try{const o=Ht(t.template);t.ir=Ut(o,{source:t.template,filename:n})}catch(o){console.error(`[Compiler Error] <${n}>:`,o)}if(t.styles&&!t.sheet&&"CSSStyleSheet"in window)try{const o=new CSSStyleSheet;o.replaceSync(t.styles),t.sheet=o}catch(o){console.error(`[Style Error] <${n}>:`,o)}if(t.props&&!t.propMap){const o=new Map;t.props.forEach(i=>{const c=typeof i=="string"?{name:i}:i,a=c.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();o.set(a,c)}),t.propMap=o}class r extends e{}return r[_e]=t,customElements.define(n,r),r}},ht=Symbol("solely.irCtx"),ft=Symbol("solely.irEvents"),D=Symbol.for("solely.irMeta"),xt=Symbol("solely.prevClassObj"),kt=Symbol("solely.prevStyleObj"),Te={xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xt={readonly:"readOnly",for:"htmlFor",tabindex:"tabIndex",contenteditable:"contentEditable",maxlength:"maxLength"},We=new Set(["data-","aria-","role","form"]),Fe=new Set(["value","selectedIndex"]);function Ve(s,t){var n;const e=(n=t.attrs)==null?void 0:n.find(r=>r.key==="class"&&!r.dynamic);e!=null&&e.value&&s.setAttribute("class",e.value)}function je(s,t){var o;if(!s.style)return;const n=(o=t.attrs)==null?void 0:o.find(i=>i.key==="style"&&!i.dynamic),r=n?Qt(n.value):{};for(const i in r){const c=r[i];i.startsWith("--")?s.style.setProperty(i,c):s.style[i]=c}}const De=(s,t)=>{const e=s,n=Qt(t),r=e[kt];if(!r){for(const i in n){const c=n[i];i.startsWith("--")?s.style.setProperty(i,c):s.style[i]=c}e[kt]=n;return}let o=!1;for(const i in r)i in n||(i.startsWith("--")?s.style.removeProperty(i):s.style[i]="",o=!0);for(const i in n){const c=n[i],a=r[i];c!==a&&(i.startsWith("--")?s.style.setProperty(i,c):s.style[i]=c,o=!0)}o&&(e[kt]=n)},Be=(s,t)=>{const e=s,n=e[xt],r=Ge(t);if(!n){for(const i in r)s.classList.add(i);e[xt]=r;return}let o=!1;for(const i in n)r[i]||(s.classList.remove(i),o=!0);for(const i in r)n[i]||(s.classList.add(i),o=!0);o&&(e[xt]=r)};function Qt(s){const t={},e=[[s]];for(;e.length;){const[n,r]=e.pop();if(n){if(typeof n=="string"){const o=/([^:;]+)\s*:\s*([^;]*\(.*?\)[^;]*|[^;]+)/g;let i;for(;(i=o.exec(n))!==null;){const c=i[1].trim(),a=i[2].trim();c&&a&&(t[c]=a)}continue}if(Array.isArray(n)){for(let o=n.length-1;o>=0;o--)e.push([n[o]]);continue}if(typeof n=="object")for(const o in n){const i=n[o];if(i==null)continue;const c=r?`${r}-${o}`:o;typeof i=="object"&&!Array.isArray(i)?e.push([i,c]):t[c]=String(i)}}}return t}function Ge(s){const t={},e=[s];for(;e.length;){const n=e.pop();if(n){if(typeof n=="string"){const r=n.split(" ");for(let o=0;o<r.length;o++){const i=r[o].trim();i&&(t[i]=!0)}}else if(Array.isArray(n))for(let r=n.length-1;r>=0;r--)e.push(n[r]);else if(typeof n=="object")for(const r in n)n[r]&&(t[r]=!0)}}return t}function Rt(s,t,e){const n=e==null?"":String(e),r=t.indexOf(":");if(r>0){const o=t.slice(0,r),i=Te[o];if(i){s.getAttributeNS(i,t)!==n&&s.setAttributeNS(i,t,n);return}}s.getAttribute(t)!==n&&s.setAttribute(t,n)}function te(s,t,e){const n=Xt[t]||t;if(t.startsWith("data-")||t.startsWith("aria-")||We.has(t)){Rt(s,t,e);return}const r=s,o=r.tagName;if(e==null){if(typeof r[n]=="boolean")r[n]!==!1&&(r[n]=!1);else{const c=r[n];c!==""&&c!==void 0&&(r[n]=""),s.hasAttribute(t)&&s.removeAttribute(t)}return}if(n==="src"||n==="href"){const c=String(e);if(r[n]===c||s.getAttribute(n)===c)return}if(n==="value"&&(o==="INPUT"||o==="TEXTAREA")&&r.value===e)return;if(typeof e=="boolean"){if(r[n]===e)return;r[n]=e;return}(s instanceof SVGElement||r.ownerSVGElement!==void 0)&&!Xt[t]?Rt(s,t,e):r[n]!==e&&(r[n]=e)}class ee{constructor(t,e,n={}){A(this,"nodeMap",new Map);A(this,"marker",!1);this.ir=t,this.container=e,this.scope=n}evalIR(t,e,n){var o;const r=this.ir.functions[t-1];try{return r?r.apply(this.scope,e):""}catch(i){return Wt(i.message||i.toString(),((o=this.ir.metadata)==null?void 0:o.source)||"",n,this.scope.tagName),""}}createElement(t,e){const n=t.tag;return e instanceof SVGElement||n==="svg"?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n)}createText(t,e){const n=t.dynamic?this.evalIR(t.fid,[e],t[D]):t.txt||"";return document.createTextNode(n)}createComment(t,e){const n=t.dynamic?this.evalIR(t.fid,[e],t[D]):t.txt||"";return document.createComment(n)}applyAttrs(t,e,n,r=!1){const o=[],i=t;i[ht]||(i[ht]={loops:null}),i[ht].loops=n,i[ft]||(i[ft]=Object.create(null));let c,a=!1,l,u=!1;for(const h of e){const{key:p,fid:v,dynamic:g,value:m}=h;if(p===":class"){c=this.evalIR(v,[n],h[D]),a=!0;continue}if(p===":style"){l=this.evalIR(v,[n],h[D]),u=!0;continue}if(p==="class"||p==="style")continue;const L=p[0];if(L==="@"){const $=p.slice(1),R=h.role??"user";let I=i[ft][$];if(I||(I=i[ft][$]={model:[],user:[]},t.addEventListener($,d=>{for(const E of I.model)E(d);for(const E of I.user)E(d)})),!r){const d=E=>this.evalIR(v,[E,i[ht].loops],h[D]);I[R].push(d)}continue}if(p==="mounted"){r||requestAnimationFrame(()=>this.evalIR(v,[t,n],h[D]));continue}if(p==="updated"){r&&requestAnimationFrame(()=>this.evalIR(v,[t,n],h[D]));continue}if(p==="ref"&&m){this.scope.$refs=this.scope.$refs||{},this.scope.$refs[m]=t;continue}const b=g?this.evalIR(v,[n],h[D]):m??"";if(L===":"){const $=p.slice(1);t.tagName==="SELECT"&&Fe.has($)?o.push(()=>te(t,$,b)):te(t,$,b)}else r||Rt(t,p,String(b))}return a&&Be(t,c),u&&De(t,l),o}updateNode(t,e,n){const r=e.dynamic?this.evalIR(e.fid,[n],e[D]):e.txt||"";e.dynamic&&t.textContent!==r&&(t.textContent=r)}irToNode(t,e,n,r,o){var l,u,h,p;const i=n+"-"+e,c=this.nodeMap.get(i);let a;if(c){a=c.node,c.marker=this.marker;let v=[];t.dynamic&&(t.type===y.Element?v=this.applyAttrs(a,t.attrs??[],o,!0):this.updateNode(a,t,o)),(l=t.children)==null||l.forEach((g,m)=>{this.irToNode(g,m,i,a,o)}),v.forEach(g=>g())}else switch(t.type){case y.Element:a=this.createElement(t,r),Ve(a,t),je(a,t);const v=this.applyAttrs(a,t.attrs??[],o);r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker}),(u=t.children)==null||u.forEach((g,m)=>{this.irToNode(g,m,i,a,o)}),v.forEach(g=>g());break;case y.Text:a=this.createText(t,o),r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker});break;case y.Comment:a=this.createComment(t,o),r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker});break;case y.For:{const g=`${i}-end`;let m=(h=this.nodeMap.get(g))==null?void 0:h.node;m?this.nodeMap.get(g).marker=this.marker:(m=document.createComment(`for:${i}`),r.appendChild(m),this.nodeMap.set(g,{irNode:{type:y.Comment},node:m,loops:o,marker:this.marker}));const L=this.evalIR(t.fid,[o],t[D])||[],b=document.createDocumentFragment();L.forEach(($,R)=>{var d;const I=[...o,{itmVal:$,idxVal:R}];(d=t.children)==null||d.forEach((E,S)=>{this.irToNode(E,S,`${i}-for-${R}`,b,I)})}),m.parentNode.insertBefore(b,m);break}case y.Conditional:{const g=`${i}-end`;let m=(p=this.nodeMap.get(g))==null?void 0:p.node;m?this.nodeMap.get(g).marker=this.marker:(m=document.createComment(`if:${i}`),r.appendChild(m),this.nodeMap.set(g,{irNode:{},node:m,loops:o,marker:this.marker}));for(let L=0;L<(t.branches||[]).length;L++){const b=t.branches[L];if(b.condFid===null||this.evalIR(b.condFid,[o],b[D])){const R=document.createDocumentFragment();b.children.forEach((I,d)=>{this.irToNode(I,d,`${i}-if-${L}`,R,o)}),m.parentNode.insertBefore(R,m);break}}break}}}cleanupOldNodes(){for(const[t,e]of this.nodeMap.entries())if(e.marker!==this.marker){const{irNode:n,node:r,loops:o}=e;if(n.attrs){const i=n.attrs.find(a=>a.key==="unmounted");i&&requestAnimationFrame(()=>{this.evalIR(i.fid,[r,o],i[D])});const c=n.attrs.find(a=>a.key==="ref");c&&c.value&&delete this.scope.$refs[c.value]}r==null||r.remove(),this.nodeMap.delete(t)}}mount(){this.marker=!this.marker,this.ir.nodes.forEach((t,e)=>{this.irToNode(t,e,"root",this.container,[])}),this.cleanupOldNodes()}update(){this.marker=!this.marker,this.ir.nodes.forEach((t,e)=>{this.irToNode(t,e,"root",this.container,[])}),this.cleanupOldNodes()}destroy(){this.container.innerHTML="",this.nodeMap.clear()}}const ne=(s,t,e={})=>{const n=new ee(s,t,e);return n.mount(),{update:()=>n.update(),destroy:()=>n.destroy()}};let Z=null,se;const Ct=new Promise(s=>{se=s});function qe(s){return Z||(Z=new re(s),se(Z),Z)}function dt(){return Z}class re{constructor(t){A(this,"routes");A(this,"base");A(this,"mode");A(this,"beforeEachGuard");A(this,"afterEachGuard");A(this,"currentRoute",null);A(this,"listeners",new Set);A(this,"isStarted",!1);this.routes=t.routes,this.base=t.base??"/",this.mode=t.mode||"history",this.beforeEachGuard=t.beforeEach,this.afterEachGuard=t.afterEach}matchRoute(t="/"){const e=t.startsWith("/")?t:"/"+t,[n,r]=e.split("?"),o=n.split("/").filter(Boolean),i=this.parseQuery(r),c=this.recursiveMatch(this.routes,o);if(c){const a=c.matched[c.matched.length-1];return a.config.redirect?this.matchRoute(a.config.redirect):{matched:c.matched,params:c.params,query:i,fullPath:e,meta:c.matched.reduce((l,u)=>({...l,...u.config.meta||{}}),{})}}return null}recursiveMatch(t,e){const n=[...t].sort((r,o)=>this.calculateScore(o.path)-this.calculateScore(r.path));for(const r of n){const o=r.path.split("/").filter(Boolean),i={};let c=!0;if(o.length===0&&e.length===0)return{matched:[{config:r,params:{}}],params:{}};for(let a=0;a<o.length;a++){const l=o[a],u=e[a];if(l.startsWith(":")){if(!u){c=!1;break}i[l.slice(1)]=u}else if(l==="*"){c=!0;break}else if(l!==u){c=!1;break}}if(c){const a=o.length,l=e.slice(a),u={config:r,params:i};if(l.length>0&&r.children){const h=this.recursiveMatch(r.children,l);if(h)return{matched:[u,...h.matched],params:{...i,...h.params}}}else if(l.length===0||o.includes("*"))return{matched:[u],params:i}}}return null}calculateScore(t="/"){const e=t.split("/").filter(Boolean);return e.length===0?1:e.reduce((n,r)=>r.startsWith(":")?n+5:r==="*"?n+0:n+10,0)}parseQuery(t){const e={};return t&&new URLSearchParams(t).forEach((r,o)=>{e[o]=r}),e}normalizePath(t="/"){let e=t&&typeof t=="string"?t:"/";return e.startsWith("/")||(e="/"+e),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}getPath(){let t;try{t=this.mode==="hash"?window.location.hash.slice(1)||"/":window.location.pathname||"/"}catch{t="/"}const e=this.base||"/";return e!=="/"&&t.startsWith(e)&&(t=t.slice(e.length)||"/"),this.normalizePath(t)}updateBrowserHistory(t="/",e){const n=this.normalizePath(t),r=this.base||"/";if(this.mode==="hash")e?window.location.replace(`#${n}`):window.location.hash=n;else{const o=r.endsWith("/")?r.slice(0,-1):r,i=o==="/"?n:o+n;e?window.history.replaceState({path:i},"",i):window.history.pushState({path:i},"",i)}}async navigate(t="/",e=!1,n=!1){const r=this.normalizePath(t),o=this.currentRoute,i=this.matchRoute(r);if(!i)return{success:!1,error:`No route matched: ${r}`};if(o&&o.fullPath===i.fullPath)return{success:!0};if(this.beforeEachGuard)try{const c=await this.beforeEachGuard(i,o);if(c===!1)return{success:!1,cancelled:!0};if(typeof c=="string")return this.navigate(c,e)}catch(c){return{success:!1,error:c instanceof Error?c.message:"Guard Error"}}return this.currentRoute=i,n||this.updateBrowserHistory(r,e),this.notifyListeners(),this.afterEachGuard&&this.afterEachGuard(i,o),{success:!0}}resolve(t="/"){const e=this.normalizePath(t);if(this.mode==="hash")return`#${e}`;const n=this.base.endsWith("/")?this.base.slice(0,-1):this.base;return n==="/"?e:n+e}get modeType(){return this.mode}pushWithQuery(t="/",e){const n=new URLSearchParams(e).toString(),r=t.includes("?")?"&":"?";return this.push(t+(n?r+n:""))}push(t="/"){return this.navigate(t,!1)}replace(t="/"){return this.navigate(t,!0)}back(){window.history.back()}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notifyListeners(){this.listeners.forEach(t=>t())}setupListeners(){if(this.isStarted)return;const t=()=>{this.navigate(this.getPath(),!0,!0)};window.addEventListener("popstate",t),this.mode==="hash"&&!window.location.hash&&(window.location.hash="/"),this.navigate(this.getPath(),!0)}getCurrentRoute(){return this.currentRoute}}var Ke=Object.getOwnPropertyDescriptor,ze=(s,t,e,n)=>{for(var r=n>1?void 0:n?Ke(t,e):t,o=s.length-1,i;o>=0;o--)(i=s[o])&&(r=i(r)||r);return r};let pt=class extends st{constructor(){super(...arguments);A(this,"unsubscribe");A(this,"level",0);A(this,"currentElement",null);A(this,"currentTagName",null);A(this,"routerAttrs",new Set);A(this,"prevPropKeys",new Set);A(this,"scheduled",!1);A(this,"cache",new Map);A(this,"latestLoadId",0)}async mounted(){this.detectLevel();const t=await Ct;this.unsubscribe=t.listen(()=>{this.scheduleLoad(t.getCurrentRoute())}),this.loadRoute(t.getCurrentRoute())}unmounted(){var t;(t=this.unsubscribe)==null||t.call(this),this.cache.forEach(e=>e.remove()),this.cache.clear()}scheduleLoad(t){this.scheduled||(this.scheduled=!0,queueMicrotask(()=>{this.scheduled=!1,this.loadRoute(t)}))}detectLevel(){let t=0,e=this.parentElement;for(;e;)e instanceof pt&&t++,e=e.parentElement;this.level=t}async loadRoute(t){const e=++this.latestLoadId,n=t==null?void 0:t.matched[this.level];if(!n){this.handleEmptyRoute();return}const{config:r}=n;let o=r.tagName;if(!o&&typeof r.component=="function"){this.renderLoading();try{const c=await r.component();o=typeof c=="string"?c:c.tagName}catch(c){this.renderError(`Load Error: ${c}`);return}}if(e!==this.latestLoadId)return;if(!o){this.clear();return}if(!r.forceReload&&this.currentElement&&this.currentTagName===o.toLowerCase()){this.syncState(this.currentElement,t==null?void 0:t.params,(t==null?void 0:t.query)||{},r.props);return}this.clear(r.keepAlive);const i=this.getOrCreateComponent(o,r);this.syncState(i,t==null?void 0:t.params,(t==null?void 0:t.query)||{},r.props),this.appendChild(i),this.currentElement=i,this.currentTagName=o.toLowerCase()}getOrCreateComponent(t,e){const n=t.toLowerCase();if(e.keepAlive&&this.cache.has(n))return this.cache.get(n);const r=document.createElement(t);return e.keepAlive&&this.cache.set(n,r),r}syncState(t,e,n,r={}){const o=a=>a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=new Map;Object.entries(e).forEach(([a,l])=>i.set(o(a),String(l))),Object.entries(n).forEach(([a,l])=>i.set(`query-${o(a)}`,String(l))),this.routerAttrs.forEach(a=>{i.has(a)||(t.removeAttribute(a),this.routerAttrs.delete(a))}),i.forEach((a,l)=>{t.getAttribute(l)!==a&&t.setAttribute(l,a),this.routerAttrs.add(l)});const c=new Set(Object.keys(r));this.prevPropKeys.forEach(a=>{c.has(a)||(t[a]=void 0)}),Object.entries(r).forEach(([a,l])=>{t[a]!==l&&(t[a]=l)}),this.prevPropKeys=c}handleEmptyRoute(){this.clear(),this.level===0&&this.renderError("404 Not Found")}renderLoading(){this.innerHTML='<div style="padding:20px; color:#999;">Loading...</div>'}renderError(t){this.innerHTML=`<div style="padding:20px; color:#ff4d4f;">${t}</div>`}clear(t=!1){this.currentElement?this.contains(this.currentElement)&&this.removeChild(this.currentElement):t||(this.innerHTML=""),this.currentElement=null,this.currentTagName=null,this.routerAttrs.clear(),this.prevPropKeys.clear()}};pt=ze([St({tagName:"router-view"})],pt);const Ue=pt;var He=Object.getOwnPropertyDescriptor,Ye=(s,t,e,n)=>{for(var r=n>1?void 0:n?He(t,e):t,o=s.length-1,i;o>=0;o--)(i=s[o])&&(r=i(r)||r);return r};let At=class extends st{constructor(){super(...arguments);A(this,"_prefetched",!1)}set to(t){this.$data.to=t,this.updateState()}get to(){return this.$data.to}async mounted(){(await Ct).listen(()=>this.updateState()),this.updateState(),this.addEventListener("click",e=>{var r,o;e.defaultPrevented||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||(r=e.target.closest("a"))!=null&&r.getAttribute("target")||(e.preventDefault(),(o=dt())==null||o.push(this.$data.to))}),this.addEventListener("mouseenter",()=>{this.prefetchRoute()},{once:!0})}updateState(){const t=dt();if(!t)return;this.$data.href=t.resolve(this.$data.to);let e=!1;if(this.$data.active)e=!0;else{const r=t.getCurrentRoute();if(r){const o=r.fullPath;this.hasAttribute("exact")?e=o===this.$data.to:e=o===this.$data.to||o.startsWith(this.$data.to+"/")}}this.$data.isActive=e;const n=this.$data.activeClass||"active";this.classList.toggle(n,e)}prefetchRoute(){if(this._prefetched||!this.hasAttribute("prefetch"))return;const t=dt();t&&typeof t.prefetch=="function"&&(t.prefetch(this.$data.to),this._prefetched=!0)}};At=Ye([St({tagName:"router-link",template:`
|
|
21
|
+
}`),l("@change",`${e} = Array.from(event.target.selectedOptions).map(o => o.value)`,"model")):(l(":value",e),l("@change",`${e} = value`,"model"));return}l(":value",e),l("@input",`${e} = $event`,"model")}function ot(s,t,e,n=null){if(!s.attrs||s.attrs.length===0)return[];const r=[];for(const o of s.attrs){if(n&&n.has(o.key))continue;const{key:i,value:l,role:a}=o,{isDynamic:c,type:h}=qt(i);if(c&&h){const u=e.compile(h,l??"",t),p={key:i,fid:u,dynamic:1,role:a};bt(p,l,o.loc??s.loc),r.push(p)}else r.push({key:i,value:l,dynamic:0,role:a})}return r}function Ie(s,t,e){var o,i,l,a,c,h;const n={type:s.type,dynamic:0};let r=!1;switch(s.type===w.Text?Le(s.content)&&(r=!0):((o=s.attrs)!=null&&o.some(u=>u.key==="s-model"||qt(u.key).isDynamic)&&(r=!0),s.type===w.For&&(r=!0)),n.dynamic=r?1:0,s.type){case w.Text:{const u=s.content??"";r?(n.fid=e.compile("template",u,t),bt(n,u,s.loc)):n.txt=u;break}case w.Element:{n.tag=s.tag,Kt(s),n.attrs=ot(s,t,e),s.children&&(n.children=Q(s.children,t,e));break}case w.For:{const u=(i=s.attrs)==null?void 0:i.find(d=>d.key==="each"),p=(u==null?void 0:u.value)??"";n.fid=e.compile("expression",p,t),n.item=((a=(l=s.attrs)==null?void 0:l.find(d=>d.key==="item"))==null?void 0:a.value)??"item",n.index=((h=(c=s.attrs)==null?void 0:c.find(d=>d.key==="index"))==null?void 0:h.value)??"index",bt(n,p,(u==null?void 0:u.loc)??s.loc);const $=new Set(["each","item","index"]);n.attrs=ot(s,t,e,$);const f=[...t,{item:n.item,index:n.index}];s.children&&(n.children=Q(s.children,f,e));break}case w.If:case w.ElseIf:case w.Else:{U&&console.warn(`[IR] Orphaned conditional node found: ${w[s.type]}`),n.attrs=ot(s,t,e),s.children&&(n.children=Q(s.children,t,e));break}case w.Comment:{n.txt=s.content??"";break}}return n}function Q(s,t,e){var o;const n=[];let r=0;for(;r<s.length;){const i=s[r];if(i.type===w.If){const l=[];let a=r;for(;a<s.length;){const c=s[a],h=c.type;if(h!==w.If&&h!==w.ElseIf&&h!==w.Else||h===w.If&&l.length>0)break;let u=null,p="",$=null;if(h!==w.Else){const g=(o=c.attrs)==null?void 0:o.find(b=>b.key==="test"||b.key==="condition");p=(g==null?void 0:g.value)??"false",u=e.compile("expression",p,t),$=(g==null?void 0:g.loc)??c.loc}const f=c.children?Q(c.children,t,e):[],S=ot(c,t,e,new Set(["test","condition"]));if(l.push({condFid:u,children:f,attrs:S.length>0?S:void 0,[yt]:U?{expr:p,loc:$}:void 0}),a++,h===w.Else)break}n.push({type:w.Conditional,dynamic:1,branches:l,...U&&{[yt]:{loc:i.loc}}}),r=a}else n.push(Ie(i,t,e)),r++}return n}function Ut(s,t={}){const{filename:e="anonymous",source:n}=t,r=Gt.get(e);r.clear();const o=performance.now(),i=Q(s,[],r),l=performance.now(),a=r.getStats(),c=i.filter(u=>u.dynamic===1).length,h={type:"root",version:"1.1.0",functions:r.getFunctions(),nodes:i,stats:{totalFunctions:a.total,cachedFunctions:a.cached,dynamicNodes:c,totalNodes:i.length},metadata:{compiledAt:new Date().toISOString(),astSize:s.length,filename:e,...n&&{source:n}}};return U&&console.log(`[IRBuilder] ${e} | ${(l-o).toFixed(2)}ms | Nodes: ${i.length} | Fns: ${a.total}`),h}function Me(s){Gt.clear(s)}const Pe=/<\/?([A-Za-z][A-Za-z0-9\-\:]*)[>\s\/]/,Oe=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ne=/\s*([^\s"'/>=]+)(?:=(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/gs;function _e(s,t){const e=[];let n;const r=s.replace(/^\s*[^\s"'/>]+/,""),o=s.length-r.length;for(;(n=Ne.exec(r))!==null;){const i=n[1];if(!i)continue;const l=n[2]??n[3]??n[4]??"";let a=i;Dt.has(i)&&(a=a.replace(/^on/,"@")),a!=="s-model"&&(a=a.replace(/^on-/,"@").replace(/^s-/,":")),a=jt(a)||a;const c=n[0],h=c.indexOf("=");let u;if(h===-1)u=c.indexOf(i)+i.length;else{let g=h+1;for(;g<c.length&&/\s/.test(c[g]);)g++;if(c[g]==='"'||c[g]==="'"){let b=g+1;for(;b<c.length&&/\s/.test(c[b]);)b++;u=b}else{let b=g;for(;b<c.length&&/\s/.test(c[b]);)b++;u=b}}let p=n.index+u+o;const f=s.slice(0,p).split(`
|
|
22
|
+
`),d=t[0]+f.length-1,S=f.length>1?f[f.length-1].length+1:t[1]+p;e.push({key:a,value:l,loc:[d,S]})}return e}function Te(s,t){var i;const e=((i=(s.match(Pe)||[])[1])==null?void 0:i.toLowerCase())??"",n=_e(s,t);return{type:{for:w.For,if:w.If,elseif:w.ElseIf,else:w.Else}[e]??w.Element,tag:e,loc:t,children:[],attrs:n}}function We(s,t){const e=s.length;if(s.startsWith("!--",t)){const i=s.indexOf("-->",t+3);return i===-1?-1:i+2}if(s.startsWith("![CDATA[",t)){const i=s.indexOf("]]>",t+8);return i===-1?-1:i+2}if(s[t]==="!")return s.indexOf(">",t+1);if(s[t]==="?"){const i=s.indexOf("?>",t+1);return i===-1?-1:i+1}let n=!1,r=!1,o=t;for(;o<e;){const i=s[o];if(i==="'"&&!r)n=!n;else if(i==='"'&&!n)r=!r;else if(i===">"&&!n&&!r)return o;o++}return-1}function zt(s){const t=[];if(!s)return[];const e=[],n=[],r=()=>{var c;return e.length===0?t:(c=e[e.length-1]).children||(c.children=[])};let o=0;const i=s.length,l=[0];for(let c=0;c<i;c++)s[c]===`
|
|
23
|
+
`&&l.push(c+1);function a(c){let h=0;for(let u=1;u<l.length&&!(l[u]>c);u++)h=u;return[h+1,c-l[h]+1]}for(;o<i;){const c=s.indexOf("<",o);if(c===-1||c>o){const y=s.substring(o,c===-1?void 0:c),E=y.trim();if(E){const v=y.indexOf(E),x=o+v,L=a(x);r().push({type:w.Text,tag:"text",content:E,loc:L,children:[]})}if(c===-1)break;o=c}const h=We(s,o+1);if(h===-1){const y=s.substring(o);y.trim()&&r().push({type:w.Text,tag:"text",content:y.trim(),children:[],loc:a(o)});break}const u=s.substring(o,h+1),p=r(),$=a(o);if(u.startsWith("<!--")){p.push({type:w.Comment,tag:"comment",content:u.slice(4,-3),loc:$,children:[]}),o=h+1;continue}if(u.startsWith("<![CDATA[")){p.push({type:w.Text,tag:"text",content:u.slice(9,-3),loc:$,children:[]}),o=h+1;continue}if(u.startsWith("<!")&&!u.startsWith("<!--")){p.push({type:w.Comment,tag:"comment",content:u.slice(2,-1),loc:$,children:[]}),o=h+1;continue}if(u.startsWith("<?")){p.push({type:w.Comment,tag:"comment",content:u.slice(2,-2),loc:$,children:[]}),o=h+1;continue}if(u.startsWith("</")){const y=n.pop();for(;e.length>0;){if((e[e.length-1].tag||"").toLowerCase()===(y==null?void 0:y.toLowerCase())){e.pop();break}e.pop()}o=h+1;continue}const f=Te(u,$);p.push(f);const d=f.tag||"",S=d.toLowerCase().startsWith("script"),g=d.toLowerCase().startsWith("style"),b=u.endsWith("/>")||Oe.has(d.toLowerCase());if((S||g)&&!b){const y=`</${d}>`,E=s.toLowerCase().indexOf(y,h+1);if(E!==-1){const v=s.substring(h+1,E);v.length&&f.children.push({type:w.Text,tag:"text",content:v,loc:a(h+1),children:[]}),o=E+y.length;continue}else{const v=s.substring(h+1);v.length&&f.children.push({type:w.Text,tag:"text",content:v,loc:a(h+1),children:[]}),o=i;continue}}!b&&f.type!==w.Text&&f.type!==w.Comment&&(e.push(f),n.push(d)),o=h+1}return t}const at=Symbol("solely.raw"),G=new WeakMap,Ht=new WeakMap,wt=new WeakMap,Yt=new WeakMap,j=new WeakMap;function Fe(s){if(s&&typeof s=="object"){const t=s[at];if(t)return t}return s}function De(s){return!!(s&&s[at])}const Et=(s,t,e=new WeakMap)=>{if(s===t)return!0;if(s==null||t==null||typeof s!="object"||typeof t!="object")return s===t;if(Array.isArray(s)!==Array.isArray(t))return!1;if(e.has(s))return e.get(s)===t;if(e.set(s,t),Array.isArray(s)&&Array.isArray(t)){if(s.length!==t.length)return!1;for(let r=0;r<s.length;r++)if(!Et(s[r],t[r],e))return!1;return!0}const n=Reflect.ownKeys(s);if(n.length!==Reflect.ownKeys(t).length)return!1;for(const r of n){if(!Reflect.has(t,r))return!1;const o=s[r],i=t[r];if(!Et(o,i,e))return!1}return!0},Zt=s=>{const t=[];let e=s;for(;e;){const n=wt.get(e);if(!n||n.key==null)break;t.unshift(n.key),e=n.parent}return t},Ve=s=>s.map(t=>{if(t==="")return/^.*$/;const e=t.replace(/\./g,"\\.").replace(/\*\*/g,"(.+)").replace(/\*/g,"[^.]+").replace(/\[\d+\]/g,"\\[\\d+\\]");return new RegExp(`^${e}$`)}),je=(s,t)=>{if(t.length===0)return!0;const e=s.map(String).join(".");return t.some(n=>n.test(e))},W=(s,t)=>{const e=Zt(s);let n=s;for(;n;){const r=G.get(n);r&&r.forEach(i=>{var h;if(!i.active)return;const l=Zt(n),a=[...l,...e.slice(l.length)];if(!je(a,i.filterRegexes))return;const c={...t,path:a};i.throttle>0?(i.pending.push(c),i.timer||(i.timer=setTimeout(()=>{var p;if(!i.active)return;const u=[...i.pending];i.pending=[],i.timer=null,u.length>0&&((p=i.onBatch)==null||p.call(i,u),u.forEach($=>i.callback($)))},i.throttle))):((h=i.onBatch)==null||h.call(i,[c]),i.callback(c))});const o=wt.get(n);n=(o==null?void 0:o.parent)||null}};function Jt(s,t,e={}){const{throttle:n=0,onBatch:r,immediate:o=!1,deepCompare:i=!1}=e,l=Array.isArray(e.filter)?e.filter:e.filter?[e.filter]:[],a=Ve(l),c={callback:t,onBatch:r,throttle:n,filterRegexes:a,pending:[],timer:null,active:!0},h=(f,d)=>{const S={};return["push","pop","shift","unshift","splice"].forEach(g=>{S[g]=function(...b){if(!d)return;const y=j.get(d)||0;j.set(d,y+1);const E=f[g].apply(f,b);if(j.set(d,y),g==="push")W(d,{type:"array-push",index:f.length-b.length,values:b});else if(g==="unshift")W(d,{type:"array-push",index:0,values:b});else if(g==="pop")W(d,{type:"array-splice",index:f.length,deleteCount:1,insert:[]});else if(g==="shift")W(d,{type:"array-splice",index:0,deleteCount:1,insert:[]});else if(g==="splice"){const[v,x,...L]=b;W(d,{type:"array-splice",index:v,deleteCount:x,insert:L})}return E}}),["sort","reverse","fill","copyWithin"].forEach(g=>{S[g]=function(...b){if(!d)return;const y=j.get(d)||0;j.set(d,y+1);const E=f[g].apply(f,b);return j.set(d,y),W(d,{type:"array-reset",method:g}),E}}),["indexOf","lastIndexOf","includes"].forEach(g=>{S[g]=function(b,...y){let E=f[g].apply(f,[b,...y]);return(E===-1||E===!1)&&De(b)&&(E=f[g].apply(f,[Fe(b),...y])),E}}),S},u=(f,d,S)=>{if(!Object.isExtensible(f)||f[at])return f;const g=Ht.get(f);if(g)return g;const b={get(E,v,x){if(v===at)return E;if(Array.isArray(E)){const P=Yt.get(y);if(P&&Object.prototype.hasOwnProperty.call(P,v))return Reflect.get(P,v,x)}const L=Reflect.get(E,v,x);return typeof v=="symbol"?L:V(L)?u(L,y,v):L},set(E,v,x,L){const P=E[v];if(i?Et(P,x):P===x)return!0;const ft=Reflect.set(E,v,x,L);return(j.get(y)||0)===0&&(Array.isArray(P)&&Array.isArray(x)?W(y,{type:"array-replace",oldValue:P,newValue:x}):W(y,{type:"set",key:v,newValue:x,oldValue:P})),ft},deleteProperty(E,v){if(!Reflect.has(E,v))return!1;const x=E[v],L=Reflect.deleteProperty(E,v),P=j.get(y)||0;return L&&P===0&&W(y,{type:"delete",key:v,oldValue:x}),L}},y=new Proxy(f,b);return Ht.set(f,y),wt.set(y,{parent:d,key:S}),Array.isArray(f)&&Yt.set(y,h(f,y)),y},p=u(s,null,null);let $=G.get(p);if($||($=new Set,G.set(p,$)),$.add(c),o){const f=(d,S,g=new WeakSet)=>{!V(d)||g.has(d)||(g.add(d),Reflect.ownKeys(d).forEach(b=>{const y=d[b];V(y)&&g.has(y)||(W(S,{type:"set",key:b,newValue:y,oldValue:void 0}),V(y)&&f(y,u(y,S,b),g))}))};f(s,p)}return{proxy:p,unobserve:()=>{c.active=!1,c.pending=[],c.timer&&(clearTimeout(c.timer),c.timer=null);const f=G.get(p);f&&f.delete(c)},resume:()=>{if(c.active)return;c.active=!0;let f=G.get(p);f||(f=new Set,G.set(p,f)),f.has(c)||f.add(c)},dispose:()=>{c.active=!1,c.pending=[],c.timer&&(clearTimeout(c.timer),c.timer=null);const f=G.get(p);f&&f.delete(c),c.callback=()=>{},c.onBatch=void 0}}}const ct=Symbol("solely.irCtx"),lt=Symbol("solely.irEvents"),T=Symbol.for("solely.irMeta"),vt=Symbol("solely.prevClassObj"),$t=Symbol("solely.prevStyleObj"),Be={xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xt={readonly:"readOnly",for:"htmlFor",tabindex:"tabIndex",contenteditable:"contentEditable",maxlength:"maxLength"},Ge=new Set(["data-","aria-","role","form"]),qe=new Set(["value","selectedIndex"]);function Ke(s,t){var n;const e=(n=t.attrs)==null?void 0:n.find(r=>r.key==="class"&&!r.dynamic);e!=null&&e.value&&s.setAttribute("class",e.value)}function Ue(s,t){var o;if(!s.style)return;const n=(o=t.attrs)==null?void 0:o.find(i=>i.key==="style"&&!i.dynamic),r=n?Qt(n.value):{};for(const i in r){const l=r[i];i.startsWith("--")?s.style.setProperty(i,l):s.style[i]=l}}const ze=(s,t)=>{const e=s,n=Qt(t),r=e[$t];if(!r){for(const i in n){const l=n[i];i.startsWith("--")?s.style.setProperty(i,l):s.style[i]=l}e[$t]=n;return}let o=!1;for(const i in r)i in n||(i.startsWith("--")?s.style.removeProperty(i):s.style[i]="",o=!0);for(const i in n){const l=n[i],a=r[i];l!==a&&(i.startsWith("--")?s.style.setProperty(i,l):s.style[i]=l,o=!0)}o&&(e[$t]=n)},He=(s,t)=>{const e=s,n=e[vt],r=Ye(t);if(!n){for(const i in r)s.classList.add(i);e[vt]=r;return}let o=!1;for(const i in n)r[i]||(s.classList.remove(i),o=!0);for(const i in r)n[i]||(s.classList.add(i),o=!0);o&&(e[vt]=r)};function Qt(s){const t={},e=[[s]];for(;e.length;){const[n,r]=e.pop();if(n){if(typeof n=="string"){const o=/([^:;]+)\s*:\s*([^;]*\(.*?\)[^;]*|[^;]+)/g;let i;for(;(i=o.exec(n))!==null;){const l=i[1].trim(),a=i[2].trim();l&&a&&(t[l]=a)}continue}if(Array.isArray(n)){for(let o=n.length-1;o>=0;o--)e.push([n[o]]);continue}if(typeof n=="object")for(const o in n){const i=n[o];if(i==null)continue;const l=r?`${r}-${o}`:o;typeof i=="object"&&!Array.isArray(i)?e.push([i,l]):t[l]=String(i)}}}return t}function Ye(s){const t={},e=[s];for(;e.length;){const n=e.pop();if(n){if(typeof n=="string"){const r=n.split(" ");for(let o=0;o<r.length;o++){const i=r[o].trim();i&&(t[i]=!0)}}else if(Array.isArray(n))for(let r=n.length-1;r>=0;r--)e.push(n[r]);else if(typeof n=="object")for(const r in n)n[r]&&(t[r]=!0)}}return t}function St(s,t,e){const n=e==null?"":String(e),r=t.indexOf(":");if(r>0){const o=t.slice(0,r),i=Be[o];if(i){s.getAttributeNS(i,t)!==n&&s.setAttributeNS(i,t,n);return}}s.getAttribute(t)!==n&&s.setAttribute(t,n)}function te(s,t,e){const n=Xt[t]||t;if(t.startsWith("data-")||t.startsWith("aria-")||Ge.has(t)){St(s,t,e);return}const r=s,o=r.tagName;if(e==null){if(typeof r[n]=="boolean")r[n]!==!1&&(r[n]=!1);else{const l=r[n];l!==""&&l!==void 0&&(r[n]=""),s.hasAttribute(t)&&s.removeAttribute(t)}return}if(n==="src"||n==="href"){const l=String(e);if(r[n]===l||s.getAttribute(n)===l)return}if(n==="value"&&(o==="INPUT"||o==="TEXTAREA")&&r.value===e)return;if(typeof e=="boolean"){if(r[n]===e)return;r[n]=e;return}(s instanceof SVGElement||r.ownerSVGElement!==void 0)&&!Xt[t]?St(s,t,e):r[n]!==e&&(r[n]=e)}class ee{constructor(t,e,n={}){C(this,"nodeMap",new Map);C(this,"marker",!1);this.ir=t,this.container=e,this.scope=n}evalIR(t,e,n){var o;const r=this.ir.functions[t-1];try{return r?r.apply(this.scope,e):""}catch(i){return Tt(i.message||i.toString(),((o=this.ir.metadata)==null?void 0:o.source)||"",n,this.scope.tagName),""}}createElement(t,e){const n=t.tag;return e instanceof SVGElement||n==="svg"?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n)}createText(t,e){const n=t.dynamic?this.evalIR(t.fid,[e],t[T]):t.txt||"";return document.createTextNode(n)}createComment(t,e){const n=t.dynamic?this.evalIR(t.fid,[e],t[T]):t.txt||"";return document.createComment(n)}applyAttrs(t,e,n,r=!1){const o=[],i=t;i[ct]||(i[ct]={loops:null}),i[ct].loops=n,i[lt]||(i[lt]=Object.create(null));let l,a=!1,c,h=!1;for(const u of e){const{key:p,fid:$,dynamic:f,value:d}=u;if(p===":class"){l=this.evalIR($,[n],u[T]),a=!0;continue}if(p===":style"){c=this.evalIR($,[n],u[T]),h=!0;continue}if(p==="class"||p==="style")continue;const S=p[0];if(S==="@"){const b=p.slice(1),y=u.role??"user";let E=i[lt][b];if(E||(E=i[lt][b]={model:[],user:[]},t.addEventListener(b,v=>{for(const x of E.model)x(v);for(const x of E.user)x(v)})),!r){const v=x=>this.evalIR($,[x,i[ct].loops],u[T]);E[y].push(v)}continue}if(p==="mounted"){r||requestAnimationFrame(()=>this.evalIR($,[t,n],u[T]));continue}if(p==="updated"){r&&requestAnimationFrame(()=>this.evalIR($,[t,n],u[T]));continue}if(p==="ref"&&d){this.scope.$refs=this.scope.$refs||{},this.scope.$refs[d]=t;continue}const g=f?this.evalIR($,[n],u[T]):d??"";if(S===":"){const b=p.slice(1);t.tagName==="SELECT"&&qe.has(b)?o.push(()=>te(t,b,g)):te(t,b,g)}else r||St(t,p,String(g))}return a&&He(t,l),h&&ze(t,c),o}updateNode(t,e,n){const r=e.dynamic?this.evalIR(e.fid,[n],e[T]):e.txt||"";e.dynamic&&t.textContent!==r&&(t.textContent=r)}irToNode(t,e,n,r,o){var c,h,u,p;const i=n+"-"+e,l=this.nodeMap.get(i);let a;if(l){a=l.node,l.marker=this.marker;let $=[];t.dynamic&&(t.type===w.Element?$=this.applyAttrs(a,t.attrs??[],o,!0):this.updateNode(a,t,o)),(c=t.children)==null||c.forEach((f,d)=>{this.irToNode(f,d,i,a,o)}),$.forEach(f=>f())}else switch(t.type){case w.Element:a=this.createElement(t,r),Ke(a,t),Ue(a,t);const $=this.applyAttrs(a,t.attrs??[],o);r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker}),(h=t.children)==null||h.forEach((f,d)=>{this.irToNode(f,d,i,a,o)}),$.forEach(f=>f());break;case w.Text:a=this.createText(t,o),r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker});break;case w.Comment:a=this.createComment(t,o),r.appendChild(a),this.nodeMap.set(i,{irNode:t,node:a,loops:o,marker:this.marker});break;case w.For:{const f=`${i}-end`;let d=(u=this.nodeMap.get(f))==null?void 0:u.node;d?this.nodeMap.get(f).marker=this.marker:(d=document.createComment(`for:${i}`),r.appendChild(d),this.nodeMap.set(f,{irNode:{type:w.Comment},node:d,loops:o,marker:this.marker}));const S=this.evalIR(t.fid,[o],t[T])||[],g=document.createDocumentFragment();S.forEach((b,y)=>{var v;const E=[...o,{itmVal:b,idxVal:y}];(v=t.children)==null||v.forEach((x,L)=>{this.irToNode(x,L,`${i}-for-${y}`,g,E)})}),d.parentNode.insertBefore(g,d);break}case w.Conditional:{const f=`${i}-end`;let d=(p=this.nodeMap.get(f))==null?void 0:p.node;d?this.nodeMap.get(f).marker=this.marker:(d=document.createComment(`if:${i}`),r.appendChild(d),this.nodeMap.set(f,{irNode:{},node:d,loops:o,marker:this.marker}));for(let S=0;S<(t.branches||[]).length;S++){const g=t.branches[S];if(g.condFid===null||this.evalIR(g.condFid,[o],g[T])){const y=document.createDocumentFragment();g.children.forEach((E,v)=>{this.irToNode(E,v,`${i}-if-${S}`,y,o)}),d.parentNode.insertBefore(y,d);break}}break}}}cleanupOldNodes(){for(const[t,e]of this.nodeMap.entries())if(e.marker!==this.marker){const{irNode:n,node:r,loops:o}=e;if(n.attrs){const i=n.attrs.find(a=>a.key==="unmounted");i&&requestAnimationFrame(()=>{this.evalIR(i.fid,[r,o],i[T])});const l=n.attrs.find(a=>a.key==="ref");l&&l.value&&delete this.scope.$refs[l.value]}r==null||r.remove(),this.nodeMap.delete(t)}}mount(){this.marker=!this.marker,this.ir.nodes.forEach((t,e)=>{this.irToNode(t,e,"root",this.container,[])}),this.cleanupOldNodes()}update(){this.marker=!this.marker,this.ir.nodes.forEach((t,e)=>{this.irToNode(t,e,"root",this.container,[])}),this.cleanupOldNodes()}destroy(){this.container.innerHTML="",this.nodeMap.clear()}}const ne=(s,t,e={})=>{const n=new ee(s,t,e);return n.mount(),{update:()=>n.update(),destroy:()=>n.destroy()}},se=Symbol.for("solely.manifest");class tt extends HTMLElement{constructor(e={}){var o;super();_(this,R);_(this,F);_(this,B);_(this,H);_(this,et);_(this,Y);_(this,q);_(this,Z,!1);_(this,J,!1);_(this,K,!1);_(this,nt,!1);const n=this.constructor;M(this,F,n[se]||{tagName:"base-element"});const r=A(this,F);M(this,Y,(o=r.shadowDOM)!=null&&o.use?this.attachShadow({mode:r.shadowDOM.mode||"open"}):this),O(this,R,Pt).call(this,e),O(this,R,pe).call(this,r),queueMicrotask(()=>O(this,R,Nt).call(this))}static get observedAttributes(){const e=this[se];return e!=null&&e.propMap?Array.from(e.propMap.keys()):[]}get $data(){return A(this,et)}set $data(e){var n;V(e)||(e={}),(n=A(this,q))==null||n.call(this),O(this,R,Pt).call(this,e),O(this,R,pt).call(this)}refresh(){O(this,R,pt).call(this)}connectedCallback(){var l;const n=this.constructor.upgradeProps;let r;Array.isArray(n)?r=n.includes("$data")?n:[...n,"$data"]:r=["$data"],O(this,R,fe).call(this,r),O(this,R,Nt).call(this);const o=A(this,F);if((o.className||o.tagName||"").split(" ").forEach(a=>a&&this.classList.add(a)),O(this,R,ge).call(this),o.propMap&&V(this.$data))for(const[a,c]of o.propMap){const h=c.name;if(this.hasAttribute(a)){const u=this.getAttribute(a),p=O(this,R,Ot).call(this,u,c.default,c.type);this.$data[h]=p}else"default"in c&&(this.$data[h]=c.default)}A(this,H)&&M(this,B,ne(A(this,H),A(this,Y),this)),this.mounted(),(l=this.onInit)==null||l.call(this)}disconnectedCallback(){var e,n,r;this.unmounted(),(e=A(this,q))==null||e.call(this),M(this,q,void 0),(r=(n=A(this,B))==null?void 0:n.destroy)==null||r.call(n),M(this,B,null)}attributeChangedCallback(e,n,r){var h;if(n===r||!V(this.$data))return;const i=(h=A(this,F).propMap)==null?void 0:h.get(e);if(!i)return;const l=i.name,a=this.$data[l],c=O(this,R,Ot).call(this,r,i.default??a,i.type);this.$data[l]=c,M(this,K,!0),this.attributeChanged(e,a,c)}emit(e,n,r){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:n,...r}))}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(e,n,r){}beforeAttributesUpdate(){}afterAttributesUpdate(){}}F=new WeakMap,B=new WeakMap,H=new WeakMap,et=new WeakMap,Y=new WeakMap,q=new WeakMap,Z=new WeakMap,J=new WeakMap,K=new WeakMap,nt=new WeakMap,R=new WeakSet,fe=function(e){for(const n of e)if(this.hasOwnProperty(n)){const r=this[n];delete this[n],this[n]=r}},Pt=function(e){const{proxy:n,dispose:r}=Jt(e,o=>{var i,l;if(o.type==="set"){const{key:a,newValue:c}=o,h=A(this,F),u=String(a),p=((i=h.propMap)==null?void 0:i.get(u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()))||Array.from(((l=h.propMap)==null?void 0:l.values())||[]).find($=>$.name===u);p!=null&&p.reflect&&O(this,R,de).call(this,p,c)}this.emit("change",{source:"state",...o}),O(this,R,pt).call(this)});M(this,et,n),M(this,q,r)},de=function(e,n){const r=e.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(e.type==="boolean")n?this.setAttribute(r,""):this.removeAttribute(r);else{const o=typeof n=="object"?JSON.stringify(n):String(n);this.setAttribute(r,o)}},pe=function(e){e.ir&&M(this,H,e.ir)},Ot=function(e,n,r){if(e===null)return r==="boolean"?n??!1:n;switch(r){case"boolean":return!0;case"number":{const o=Number(e);return isNaN(o)?n:o}case"object":try{return JSON.parse(e)}catch{return n}default:return e}},pt=function(){A(this,J)||!A(this,B)||(M(this,J,!0),queueMicrotask(()=>{M(this,J,!1),O(this,R,me).call(this)}))},me=function(){A(this,Z)||!this.isConnected||(M(this,Z,!0),A(this,K)&&this.beforeAttributesUpdate(),this.beforeUpdate(),A(this,B).update(),this.updated(),A(this,K)&&(this.afterAttributesUpdate(),M(this,K,!1)),M(this,Z,!1))},ge=function(){const e=A(this,F);if(!e.styles)return;const n=A(this,Y);if(e.sheet&&n instanceof ShadowRoot&&"adoptedStyleSheets"in n){n.adoptedStyleSheets.includes(e.sheet)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,e.sheet]);return}const r=n instanceof ShadowRoot?n:document.head,o=`solely-style-${e.tagName}`;if(!r.querySelector(`#${o}`)){const i=document.createElement("style");i.id=o,i.textContent=e.styles,r.appendChild(i)}},Nt=function(){A(this,nt)||(M(this,nt,!0),this.created())},Ct=new WeakMap,C(tt,"upgradeProps"),_(tt,Ct,!1);const Ze=Symbol.for("solely.manifest"),kt=s=>{const t=s;return e=>{const{tagName:n}=t;if(customElements.get(n))return e;if(typeof t.template=="string"&&!t.ir)try{const o=zt(t.template);t.ir=Ut(o,{source:t.template,filename:n})}catch(o){console.error(`[Compiler Error] <${n}>:`,o)}if(t.styles&&!t.sheet&&"CSSStyleSheet"in window)try{const o=new CSSStyleSheet;o.replaceSync(t.styles),t.sheet=o}catch(o){console.error(`[Style Error] <${n}>:`,o)}if(t.props&&!t.propMap){const o=new Map;t.props.forEach(i=>{const l=typeof i=="string"?{name:i}:i,a=l.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),c=a.replace(/-([a-z])/g,(h,u)=>u.toUpperCase());o.set(a,{...l,name:c})}),t.propMap=o}class r extends e{}return r[Ze]=t,customElements.define(n,r),r}};let z=null,re;const xt=new Promise(s=>{re=s});function Je(s){return z||(z=new ie(s),re(z),z)}function ut(){return z}class ie{constructor(t){C(this,"routes");C(this,"base");C(this,"mode");C(this,"beforeEachGuard");C(this,"afterEachGuard");C(this,"currentRoute",null);C(this,"listeners",new Set);C(this,"isStarted",!1);this.routes=t.routes,this.base=t.base??"/",this.mode=t.mode||"history",this.beforeEachGuard=t.beforeEach,this.afterEachGuard=t.afterEach}matchRoute(t="/"){const e=t.startsWith("/")?t:"/"+t,[n,r]=e.split("?"),o=n.split("/").filter(Boolean),i=this.parseQuery(r),l=this.recursiveMatch(this.routes,o);if(l){const a=l.matched[l.matched.length-1];return a.config.redirect?this.matchRoute(a.config.redirect):{matched:l.matched,params:l.params,query:i,fullPath:e,meta:l.matched.reduce((c,h)=>({...c,...h.config.meta||{}}),{})}}return null}recursiveMatch(t,e){const n=[...t].sort((r,o)=>this.calculateScore(o.path)-this.calculateScore(r.path));for(const r of n){const o=r.path.split("/").filter(Boolean),i={};let l=!0;if(o.length===0&&e.length===0)return{matched:[{config:r,params:{}}],params:{}};for(let a=0;a<o.length;a++){const c=o[a],h=e[a];if(c.startsWith(":")){if(!h){l=!1;break}i[c.slice(1)]=h}else if(c==="*"){l=!0;break}else if(c!==h){l=!1;break}}if(l){const a=o.length,c=e.slice(a),h={config:r,params:i};if(c.length>0&&r.children){const u=this.recursiveMatch(r.children,c);if(u)return{matched:[h,...u.matched],params:{...i,...u.params}}}else if(c.length===0||o.includes("*"))return{matched:[h],params:i}}}return null}calculateScore(t="/"){const e=t.split("/").filter(Boolean);return e.length===0?1:e.reduce((n,r)=>r.startsWith(":")?n+5:r==="*"?n+0:n+10,0)}parseQuery(t){const e={};return t&&new URLSearchParams(t).forEach((r,o)=>{e[o]=r}),e}normalizePath(t="/"){let e=t&&typeof t=="string"?t:"/";return e.startsWith("/")||(e="/"+e),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}getPath(){let t;try{t=this.mode==="hash"?window.location.hash.slice(1)||"/":window.location.pathname||"/"}catch{t="/"}const e=this.base||"/";return e!=="/"&&t.startsWith(e)&&(t=t.slice(e.length)||"/"),this.normalizePath(t)}updateBrowserHistory(t="/",e){const n=this.normalizePath(t),r=this.base||"/";if(this.mode==="hash")e?window.location.replace(`#${n}`):window.location.hash=n;else{const o=r.endsWith("/")?r.slice(0,-1):r,i=o==="/"?n:o+n;e?window.history.replaceState({path:i},"",i):window.history.pushState({path:i},"",i)}}async navigate(t="/",e=!1,n=!1){const r=this.normalizePath(t),o=this.currentRoute,i=this.matchRoute(r);if(!i)return{success:!1,error:`No route matched: ${r}`};if(o&&o.fullPath===i.fullPath)return{success:!0};if(this.beforeEachGuard)try{const l=await this.beforeEachGuard(i,o);if(l===!1)return{success:!1,cancelled:!0};if(typeof l=="string")return this.navigate(l,e)}catch(l){return{success:!1,error:l instanceof Error?l.message:"Guard Error"}}return this.currentRoute=i,n||this.updateBrowserHistory(r,e),this.notifyListeners(),this.afterEachGuard&&this.afterEachGuard(i,o),{success:!0}}resolve(t="/"){const e=this.normalizePath(t);if(this.mode==="hash")return`#${e}`;const n=this.base.endsWith("/")?this.base.slice(0,-1):this.base;return n==="/"?e:n+e}get modeType(){return this.mode}pushWithQuery(t="/",e){const n=new URLSearchParams(e).toString(),r=t.includes("?")?"&":"?";return this.push(t+(n?r+n:""))}push(t="/"){return this.navigate(t,!1)}replace(t="/"){return this.navigate(t,!0)}back(){window.history.back()}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notifyListeners(){this.listeners.forEach(t=>t())}setupListeners(){if(this.isStarted)return;const t=()=>{this.navigate(this.getPath(),!0,!0)};window.addEventListener("popstate",t),this.mode==="hash"&&!window.location.hash&&(window.location.hash="/"),this.navigate(this.getPath(),!0)}getCurrentRoute(){return this.currentRoute}}var Xe=Object.getOwnPropertyDescriptor,Qe=(s,t,e,n)=>{for(var r=n>1?void 0:n?Xe(t,e):t,o=s.length-1,i;o>=0;o--)(i=s[o])&&(r=i(r)||r);return r};let ht=class extends tt{constructor(){super(...arguments);C(this,"unsubscribe");C(this,"level",0);C(this,"currentElement",null);C(this,"currentTagName",null);C(this,"routerAttrs",new Set);C(this,"prevPropKeys",new Set);C(this,"scheduled",!1);C(this,"cache",new Map);C(this,"latestLoadId",0)}async mounted(){this.detectLevel();const t=await xt;this.unsubscribe=t.listen(()=>{this.scheduleLoad(t.getCurrentRoute())}),this.loadRoute(t.getCurrentRoute())}unmounted(){var t;(t=this.unsubscribe)==null||t.call(this),this.cache.forEach(e=>e.remove()),this.cache.clear()}scheduleLoad(t){this.scheduled||(this.scheduled=!0,queueMicrotask(()=>{this.scheduled=!1,this.loadRoute(t)}))}detectLevel(){let t=0,e=this.parentElement;for(;e;)e instanceof ht&&t++,e=e.parentElement;this.level=t}async loadRoute(t){const e=++this.latestLoadId,n=t==null?void 0:t.matched[this.level];if(!n){this.handleEmptyRoute();return}const{config:r}=n;let o=r.tagName;if(!o&&typeof r.component=="function"){this.renderLoading();try{const l=await r.component();o=typeof l=="string"?l:l.tagName}catch(l){this.renderError(`Load Error: ${l}`);return}}if(e!==this.latestLoadId)return;if(!o){this.clear();return}if(!r.forceReload&&this.currentElement&&this.currentTagName===o.toLowerCase()){this.syncState(this.currentElement,t==null?void 0:t.params,(t==null?void 0:t.query)||{},r.props);return}this.clear(r.keepAlive);const i=this.getOrCreateComponent(o,r);this.syncState(i,t==null?void 0:t.params,(t==null?void 0:t.query)||{},r.props),this.appendChild(i),this.currentElement=i,this.currentTagName=o.toLowerCase()}getOrCreateComponent(t,e){const n=t.toLowerCase();if(e.keepAlive&&this.cache.has(n))return this.cache.get(n);const r=document.createElement(t);return e.keepAlive&&this.cache.set(n,r),r}syncState(t,e,n,r={}){const o=a=>a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=new Map;Object.entries(e).forEach(([a,c])=>i.set(o(a),String(c))),Object.entries(n).forEach(([a,c])=>i.set(`query-${o(a)}`,String(c))),this.routerAttrs.forEach(a=>{i.has(a)||(t.removeAttribute(a),this.routerAttrs.delete(a))}),i.forEach((a,c)=>{t.getAttribute(c)!==a&&t.setAttribute(c,a),this.routerAttrs.add(c)});const l=new Set(Object.keys(r));this.prevPropKeys.forEach(a=>{l.has(a)||(t[a]=void 0)}),Object.entries(r).forEach(([a,c])=>{t[a]!==c&&(t[a]=c)}),this.prevPropKeys=l}handleEmptyRoute(){this.clear(),this.level===0&&this.renderError("404 Not Found")}renderLoading(){this.innerHTML='<div style="padding:20px; color:#999;">Loading...</div>'}renderError(t){this.innerHTML=`<div style="padding:20px; color:#ff4d4f;">${t}</div>`}clear(t=!1){this.currentElement?this.contains(this.currentElement)&&this.removeChild(this.currentElement):t||(this.innerHTML=""),this.currentElement=null,this.currentTagName=null,this.routerAttrs.clear(),this.prevPropKeys.clear()}};ht=Qe([kt({tagName:"router-view"})],ht);const tn=ht;var en=Object.getOwnPropertyDescriptor,nn=(s,t,e,n)=>{for(var r=n>1?void 0:n?en(t,e):t,o=s.length-1,i;o>=0;o--)(i=s[o])&&(r=i(r)||r);return r};let Rt=class extends tt{constructor(){super(...arguments);C(this,"_prefetched",!1)}set to(t){this.$data.to=t,this.updateState()}get to(){return this.$data.to}async mounted(){(await xt).listen(()=>this.updateState()),this.updateState(),this.addEventListener("click",e=>{var r,o;e.defaultPrevented||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||(r=e.target.closest("a"))!=null&&r.getAttribute("target")||(e.preventDefault(),(o=ut())==null||o.push(this.$data.to))}),this.addEventListener("mouseenter",()=>{this.prefetchRoute()},{once:!0})}updateState(){const t=ut();if(!t)return;this.$data.href=t.resolve(this.$data.to);let e=!1;if(this.$data.active)e=!0;else{const r=t.getCurrentRoute();if(r){const o=r.fullPath;this.hasAttribute("exact")?e=o===this.$data.to:e=o===this.$data.to||o.startsWith(this.$data.to+"/")}}this.$data.isActive=e;const n=this.$data.activeClass||"active";this.classList.toggle(n,e)}prefetchRoute(){if(this._prefetched||!this.hasAttribute("prefetch"))return;const t=ut();t&&typeof t.prefetch=="function"&&(t.prefetch(this.$data.to),this._prefetched=!0)}};Rt=nn([kt({tagName:"router-link",template:`
|
|
24
24
|
<a part="link" :href="$data.href" :class="{active: $data.isActive}">
|
|
25
25
|
<slot>{{$data.label || ''}}</slot>
|
|
26
26
|
</a>
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
:host([custom]) a {
|
|
44
44
|
display: contents;
|
|
45
45
|
}
|
|
46
|
-
`,shadowDOM:{use:!0,mode:"open"},props:["to","active","exact","label","custom","activeClass","prefetch"]})],
|
|
46
|
+
`,shadowDOM:{use:!0,mode:"open"},props:["to","active","exact","label","custom","activeClass","prefetch"]})],Rt);const sn=Rt;m.ASTType=w,m.BaseElement=tt,m.CustomElement=kt,m.IRRenderer=ee,m.LIFECYCLE_ATTRS_MAP=Vt,m.Router=ie,m.RouterLink=sn,m.RouterView=tn,m.buildIR=Ut,m.clearIRCache=Me,m.createFunction=Wt,m.createRender=ne,m.createRouter=Je,m.genFunction=Ft,m.getRouter=ut,m.isLifecycleKind=Bt,m.isObject=V,m.listeners=Dt,m.mapAttrKeyToLifecycleKind=jt,m.observe=Jt,m.parseHashUrl=xe,m.parseHtml=zt,m.routerReady=xt,m.showTemplateError=Tt,m.transformModel=Kt,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { observe } from './observe';
|
|
2
|
-
export type { ChangeItem, ObserveOptions, ObserveReturn } from './
|
|
2
|
+
export type { ChangeItem, ObserveOptions, ObserveReturn } from './observe';
|
|
@@ -39,9 +39,13 @@ export interface ObserveOptions {
|
|
|
39
39
|
}
|
|
40
40
|
export interface ObserveReturn<T> {
|
|
41
41
|
proxy: T;
|
|
42
|
+
/** 暂停观察,可以调用 resume 恢复 */
|
|
42
43
|
unobserve: () => void;
|
|
44
|
+
/** 恢复观察 */
|
|
43
45
|
resume: () => void;
|
|
46
|
+
/** 彻底销毁,释放所有资源,不可恢复 */
|
|
47
|
+
dispose: () => void;
|
|
44
48
|
}
|
|
45
|
-
/** 将 Proxy 还原为原始对象 */
|
|
49
|
+
/** 将 Proxy 还原为原始对象 - 优化后只需读取一次 */
|
|
46
50
|
export declare function toRaw<T>(observed: T): T;
|
|
47
51
|
export declare function observe<T extends object>(value: T, callback: (change: ChangeItem) => void, options?: ObserveOptions): ObserveReturn<T>;
|
package/package.json
CHANGED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表示一次对象或数组的变更信息
|
|
3
|
-
*/
|
|
4
|
-
export interface ChangeItem {
|
|
5
|
-
/** 变更的路径,从根对象开始 */
|
|
6
|
-
path: (string | symbol)[];
|
|
7
|
-
/** 新值 */
|
|
8
|
-
newValue: any;
|
|
9
|
-
/** 旧值 */
|
|
10
|
-
oldValue: any;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* observe 函数的可选配置项
|
|
14
|
-
*/
|
|
15
|
-
export interface ObserveOptions {
|
|
16
|
-
/**
|
|
17
|
-
* 节流时间(毫秒),用于批量回调
|
|
18
|
-
*/
|
|
19
|
-
throttle?: number;
|
|
20
|
-
/**
|
|
21
|
-
* 仅监听匹配的路径,可为字符串或字符串数组
|
|
22
|
-
* 支持通配符:
|
|
23
|
-
* - `*` 单层匹配
|
|
24
|
-
* - `**` 任意层级匹配
|
|
25
|
-
* - `[*]` 数组元素匹配
|
|
26
|
-
*/
|
|
27
|
-
filter?: string | string[];
|
|
28
|
-
/**
|
|
29
|
-
* 是否进行深度比较,避免浅比较导致重复触发
|
|
30
|
-
*/
|
|
31
|
-
deepCompare?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 批量变化时的回调
|
|
34
|
-
*/
|
|
35
|
-
onBatch?: (changes: ChangeItem[]) => void;
|
|
36
|
-
/**
|
|
37
|
-
* 是否在初始化时立即触发一次回调
|
|
38
|
-
*/
|
|
39
|
-
immediate?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* observe 返回值对象
|
|
43
|
-
*/
|
|
44
|
-
export interface ObserveReturn<T> {
|
|
45
|
-
/** 代理对象 */
|
|
46
|
-
proxy: T;
|
|
47
|
-
/** 停止监听 */
|
|
48
|
-
unobserve: () => void;
|
|
49
|
-
/** 恢复监听 */
|
|
50
|
-
resume: () => void;
|
|
51
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 组件属性配置选项
|
|
3
|
-
*/
|
|
4
|
-
export interface PropOption {
|
|
5
|
-
/** 属性名,对应 HTML attribute */
|
|
6
|
-
name: string;
|
|
7
|
-
/** 属性类型 */
|
|
8
|
-
type?: 'string' | 'number' | 'boolean' | 'object';
|
|
9
|
-
/** 是否必填 */
|
|
10
|
-
required?: boolean;
|
|
11
|
-
/** 默认值 */
|
|
12
|
-
default?: any;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* 组件声明配置
|
|
16
|
-
* 用于描述组件模板、样式、属性监听和 Shadow DOM 行为
|
|
17
|
-
*/
|
|
18
|
-
export interface ComponentManifest {
|
|
19
|
-
/** HTML 模板字符串或模板函数 */
|
|
20
|
-
template?: string | Function;
|
|
21
|
-
/** 组件样式(CSS 字符串) */
|
|
22
|
-
styles?: string;
|
|
23
|
-
/** 支持的属性列表 */
|
|
24
|
-
props?: Array<string | PropOption>;
|
|
25
|
-
/** Shadow DOM 配置 */
|
|
26
|
-
shadowDOM?: {
|
|
27
|
-
/** 是否使用 Shadow DOM */
|
|
28
|
-
use: boolean;
|
|
29
|
-
/** Shadow DOM 模式 */
|
|
30
|
-
mode?: "open" | "closed";
|
|
31
|
-
};
|
|
32
|
-
/** 组件根元素类名 */
|
|
33
|
-
className?: string;
|
|
34
|
-
/** 注册的自定义元素标签名 */
|
|
35
|
-
tagName: string;
|
|
36
|
-
/** 内部使用的配置标记 */
|
|
37
|
-
hasConfig?: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 组件生命周期钩子接口
|
|
41
|
-
*/
|
|
42
|
-
export interface ComponentLifecycle {
|
|
43
|
-
/** 组件创建完成(构造函数结束时调用) */
|
|
44
|
-
created?(): void;
|
|
45
|
-
/** 组件首次挂载到 DOM 后调用 */
|
|
46
|
-
mounted?(): void;
|
|
47
|
-
/** 每次更新前调用 */
|
|
48
|
-
beforeUpdate?(): void;
|
|
49
|
-
/** 每次更新完成后调用 */
|
|
50
|
-
updated?(): void;
|
|
51
|
-
/** 组件从 DOM 中卸载时调用 */
|
|
52
|
-
unmounted?(): void;
|
|
53
|
-
/** 兼容旧组件的初始化钩子(首次 mounted 后调用) */
|
|
54
|
-
onInit?(): void | Promise<void>;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* BaseElement 泛型接口
|
|
58
|
-
*/
|
|
59
|
-
export interface IBaseElement<TData = any> extends HTMLElement, ComponentLifecycle {
|
|
60
|
-
/** 组件配置 */
|
|
61
|
-
_manifest: ComponentManifest;
|
|
62
|
-
/** 组件数据 */
|
|
63
|
-
$data: TData;
|
|
64
|
-
/** 手动刷新组件 */
|
|
65
|
-
refresh(): void;
|
|
66
|
-
}
|