@akashjs/runtime 0.1.33 → 0.1.35
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/chunk-VAHJHMWE.js +2 -0
- package/dist/chunk-VAHJHMWE.js.map +1 -0
- package/dist/chunk-YU4YSPD6.cjs +2 -0
- package/dist/chunk-YU4YSPD6.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/ssr.cjs +1 -1
- package/dist/ssr.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2X7GUBTG.cjs +0 -2
- package/dist/chunk-2X7GUBTG.cjs.map +0 -1
- package/dist/chunk-3HWR5MIF.js +0 -2
- package/dist/chunk-3HWR5MIF.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{a as createMachine}from'./chunk-42ZHET2G.js';export{b as generateSWScript,a as registerServiceWorker,c as subscribePush}from'./chunk-WG5GKD3B.js';import {B as B$1,z as z$1,u,y,e,f,h}from'./chunk-367DJVST.js';export{t as For,s as Show,w as __getter,b as akashError,o as bindProperty,n as bindText,p as bindVisible,l as cloneTemplate,g as createContext,j as createElement,k as createText,B as defineComponent,a as formatError,d as getAllErrorCodes,e as getCurrentScope,c as getErrorDef,i as inject,v as insert,u as nodeToDOM,z as onError,x as onMount,y as onUnmount,h as provide,A as ref,q as renderConditional,r as renderList,f as runInScope,m as setProperty}from'./chunk-367DJVST.js';import {d}from'./chunk-DZGRBVSY.js';export{d as __getStoreInstances,c as clearStores,a as configureStores,b as defineStore}from'./chunk-DZGRBVSY.js';export{b as isServerRendering,i as nodeToHtml,j as renderNodes,e as renderToStream,c as renderToString,d as renderToStringSync,f as ssrElement,h as ssrRaw,g as ssrText}from'./chunk-
|
|
1
|
+
export{a as createMachine}from'./chunk-42ZHET2G.js';export{b as generateSWScript,a as registerServiceWorker,c as subscribePush}from'./chunk-WG5GKD3B.js';import {B as B$1,z as z$1,u,y,e,f,h}from'./chunk-367DJVST.js';export{t as For,s as Show,w as __getter,b as akashError,o as bindProperty,n as bindText,p as bindVisible,l as cloneTemplate,g as createContext,j as createElement,k as createText,B as defineComponent,a as formatError,d as getAllErrorCodes,e as getCurrentScope,c as getErrorDef,i as inject,v as insert,u as nodeToDOM,z as onError,x as onMount,y as onUnmount,h as provide,A as ref,q as renderConditional,r as renderList,f as runInScope,m as setProperty}from'./chunk-367DJVST.js';import {d}from'./chunk-DZGRBVSY.js';export{d as __getStoreInstances,c as clearStores,a as configureStores,b as defineStore}from'./chunk-DZGRBVSY.js';export{b as isServerRendering,i as nodeToHtml,j as renderNodes,e as renderToStream,c as renderToString,d as renderToStringSync,f as ssrElement,h as ssrRaw,g as ssrText}from'./chunk-VAHJHMWE.js';export{a as LWWRegister,c as createLocalTransport,d as createSync,b as createWebSocketTransport}from'./chunk-CEJF44LZ.js';export{a as createOfflineStore}from'./chunk-5NJYYK3Q.js';import {l,n,m,a}from'./chunk-TWA4T6PX.js';export{a as batch,m as computed,j as createTimer,n as effect,b as flushSync,k as formatProfile,g as getProfileSummary,e as isProfiling,i as measureAsync,h as measureSync,p as on,f as recordPerfEntry,l as signal,c as startProfiling,d as stopProfiling,o as untrack}from'./chunk-TWA4T6PX.js';export{a as animate,d as animateGroup,c as animateSequence,e as animateSpring,b as animateStagger,g as defineStates,f as keyframes}from'./chunk-Q3E2UVUK.js';function un(e,t){if(e&&typeof e=="function"){let n=e();return u(n)}return t?u(t()):document.createComment("empty slot")}function dn(e,t){if(!e)return false;let n=t&&typeof e=="object"?e[t]:e;if(!n||typeof n!="function")return false;let r=n();return !(r==null||r===false||typeof r=="string"&&r.trim()==="")}function pn(e,t){let n={},r=t??Object.keys(e);for(let o of r){let i=e[o];typeof i=="function"&&(n[o]=i);}return n}var fn=B$1(e=>{let t=l(null);z$1(r=>{t.set(r);});function n(){t.set(null);}return ()=>{let r=t();return r?u(e.props.fallback(r,n)):u(e.children())}});var H=null;function mn(){return H}function gn(e){H&&H.addPending(e);}var yn=B$1(e=>{let t=l(false),n$1=[],r={addPending(s){n$1.push(s);},isResolved:()=>t()},o=H;H=r;let i;try{i=e.children();}finally{H=o;}return n$1.length>0?Promise.all(n$1).then(()=>{t.set(true);}):t.set(true),()=>{let s=document.createElement("div");return s.setAttribute("data-akash-suspense",""),s.style.display="contents",t()?s.appendChild(u(i)):s.appendChild(u(e.props.fallback())),n(()=>{if(t()){for(;s.firstChild;)s.removeChild(s.firstChild);s.appendChild(u(i));}}),s}});var N=false,L=null;function hn(){return N}function Z(e){let{container:t,component:n,props:r={}}=e;N=true,L=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);try{n(r);}finally{N=false,L=null;}return ()=>{}}function Tn(e){if(!N||!L)return null;let t=L.nextNode();for(;t;){if(t instanceof HTMLElement&&t.tagName.toLowerCase()===e.toLowerCase())return t;t=L.nextNode();}return null}function vn(){if(!N||!L)return null;let e=L.nextNode();for(;e;){if(e instanceof Text)return e;e=L.nextNode();}return null}function bn(e){let{target:t,component:n,props:r,rootMargin:o="200px"}=e;if(typeof IntersectionObserver>"u")return Z({container:t,component:n,props:r});let i=false,s=new IntersectionObserver(a=>{for(let c of a)c.isIntersecting&&!i&&(s.disconnect(),Z({container:t,component:n,props:r}));},{rootMargin:o});return s.observe(t),()=>{i=true,s.disconnect();}}var ge="data-akash-hydrate";function wn(e=document.body){return Array.from(e.querySelectorAll(`[${ge}]`))}function ye(e){return {enterFrom:`${e}-enter-from`,enterActive:`${e}-enter-active`,enterTo:`${e}-enter-to`,exitFrom:`${e}-exit-from`,exitActive:`${e}-exit-active`,exitTo:`${e}-exit-to`}}function he(e,t,n){return new Promise(r=>{e.classList.add(t.enterFrom,t.enterActive),e.offsetHeight,e.classList.remove(t.enterFrom),e.classList.add(t.enterTo);let o=()=>{e.classList.remove(t.enterActive,t.enterTo),e.removeEventListener("transitionend",o),r();};n!==void 0?setTimeout(o,n):(e.addEventListener("transitionend",o,{once:true}),setTimeout(o,5e3));})}function Sn(e,t,n){return new Promise(r=>{e.classList.add(t.exitFrom,t.exitActive),e.offsetHeight,e.classList.remove(t.exitFrom),e.classList.add(t.exitTo);let o=()=>{e.classList.remove(t.exitActive,t.exitTo),e.removeEventListener("transitionend",o),r();};n!==void 0?setTimeout(o,n):(e.addEventListener("transitionend",o,{once:true}),setTimeout(o,5e3));})}var xn=B$1(e=>{let t=e.props.name??"akash",n=ye(t);return ()=>{let r=document.createElement("div");if(r.style.display="contents",e.props.when){let o=u(e.children());r.appendChild(o),o instanceof HTMLElement&&(e.props.onEnter?.(o),he(o,n,e.props.duration).then(()=>{e.props.onAfterEnter?.(o);}));}return r}});function En(e,t={}){let{property:n="all",duration:r="0.3s",easing:o="ease"}=t;return `
|
|
2
2
|
.${e}-enter-active,
|
|
3
3
|
.${e}-exit-active {
|
|
4
4
|
transition: ${n} ${r} ${o};
|
|
@@ -57,6 +57,6 @@ ${n.stackTrace}`);}}}function sr(){return {enabled:I,activeCount:M.size,totalTra
|
|
|
57
57
|
`),o&&(i+=`::view-transition-new(root) {
|
|
58
58
|
animation-name: ${o};
|
|
59
59
|
}
|
|
60
|
-
`),i}function To(e,t){e.style.viewTransitionName=t;}function vo(e,t){let n=document.documentElement,r=new Promise(async o=>{n.style.transition="opacity 0.15s ease",n.style.opacity="0",await new Promise(i=>setTimeout(i,150)),await e(),n.style.opacity="1",await new Promise(i=>setTimeout(i,150)),n.style.transition="",n.style.opacity="",t.onAfter?.(),o();});return {finished:r,updateCallbackDone:r,ready:Promise.resolve(),skipTransition:()=>{n.style.transition="",n.style.opacity="";}}}function bo(e){return Array.isArray(e)?e.join(","):typeof e=="boolean"?e?"true":"false":String(e)}function wo(e,t){return typeof t=="number"?Number(e):typeof t=="boolean"?e==="true"||e==="1":Array.isArray(t)?e?e.split(","):[]:e}function B(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function So(e,t){if(typeof window>"u")return;let n=e.toString(),r=n?`${window.location.pathname}?${n}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;t==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r);}var K=new Map,De=false;function xo(){De||typeof window>"u"||(De=true,window.addEventListener("popstate",()=>{let e=B();a(()=>{for(let[t,n]of K){let r=e.get(t),o=r!==null?n.deserialize(r):n.defaultValue;n.signal.set(o);}});}));}function Me(e,t,n={}){let{serialize:r=m=>bo(m),deserialize:o=m=>wo(m,t),history:i="replace",debounce:s=0,removeDefault:a=true}=n,l$1=B().get(e),d=l$1!==null?o(l$1):t,u=l(d);K.set(e,{signal:u,deserialize:o,defaultValue:t}),xo();let f=null,p=false,y=u.set;u.set=m=>{if(y(m),p);let h=()=>{let b=B();a&&m===t?b.delete(e):b.set(e,r(m)),So(b,i);};s>0?(f&&clearTimeout(f),f=setTimeout(h,s)):h();};u.update;return u.update=m=>{u.set(m(u()));},u}function Eo(e,t){let n={};for(let[r,o]of Object.entries(e))n[r]=Me(r,o.default,{serialize:o.serialize,deserialize:o.deserialize,history:t?.history});return n}function ko(){if(typeof window>"u")return;let e=`${window.location.pathname}${window.location.hash}`;window.history.replaceState(null,"",e),a(()=>{for(let[,t]of K)t.signal.set(t.defaultValue);});}function Co(){let e=B(),t={};return e.forEach((n,r)=>{t[r]=n;}),t}function Po(e){K.delete(e);}function Ao(){K.clear();}var ie=typeof requestAnimationFrame=="function"?requestAnimationFrame:e=>setTimeout(()=>e(Date.now()),16),Ie=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:e=>clearTimeout(e),je={linear:e=>e,cubicIn:e=>e*e*e,cubicOut:e=>1-Math.pow(1-e,3),cubicInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,quadIn:e=>e*e,quadOut:e=>1-(1-e)*(1-e),quintOut:e=>1-Math.pow(1-e,5),bounceOut:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,elasticOut:e=>e===0||e===1?e:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1};function Ro(e,t,n){return typeof e=="number"&&typeof t=="number"?e+(t-e)*n:n<.5?e:t}function Oo(e,t={}){let{duration:n=400,easing:r=je.cubicOut,interpolate:o=Ro,delay:i=0}=t,s=l(e),a=l(e),c=0,l$1=false,d=(()=>s());return d.set=(u,f)=>{let p=f?.duration??n,y=f?.easing??r,T=f?.interpolate??o,m=f?.delay??i,h=s();return a.set(u),p===0?(s.set(u),Promise.resolve()):(l$1&&(Ie(c),l$1=false),new Promise(b=>{let k=performance.now()+m;l$1=true;function v(S){if(!l$1){b();return}let A=S-k;if(A<0){c=ie(v);return}let C=Math.min(A/p,1),R=y(C);s.set(T(h,u,R)),C<1?c=ie(v):(l$1=false,b());}c=ie(v);}))},d.setImmediate=u=>{l$1&&(Ie(c),l$1=false),s.set(u),a.set(u);},d.target=()=>a(),d}function He(e,t={}){let{duration:n=300,easing:r="cubic-bezier(0.2, 0, 0, 1)",delay:o=0,selector:i,keyAttribute:s="data-key",onComplete:a}=t,c=new Map;function l(){return Array.from(i?e.querySelectorAll(i):e.children)}function d(p){return p.getAttribute(s)??p.id??""}function u(){c=new Map;for(let p of l()){let y=d(p);if(y){let T=p.getBoundingClientRect();c.set(y,{left:T.left,top:T.top,width:T.width,height:T.height});}}}function f(){let p=l(),y=[];for(let m of p){let h=d(m),b=c.get(h);if(!b)continue;let k=m.getBoundingClientRect(),v=b.left-k.left,S=b.top-k.top,A=b.width/(k.width||1),C=b.height/(k.height||1);if(Math.abs(v)<.5&&Math.abs(S)<.5&&Math.abs(A-1)<.01&&Math.abs(C-1)<.01)continue;let R=m.animate([{transform:`translate(${v}px, ${S}px) scale(${A}, ${C})`},{transform:"translate(0, 0) scale(1, 1)"}],{duration:n,easing:r,delay:o,fill:"both"});y.push(R);}let T=new Set(p.map(d));for(let[m,h]of c)T.has(m);return c.clear(),new Promise(m=>{if(y.length===0){a?.(),m();return}Promise.all(y.map(h=>h.finished)).then(()=>{for(let h of y)h.cancel();a?.(),m();});})}return {measure:u,animate:f,async flip(p){return u(),p(),await new Promise(y=>requestAnimationFrame(y)),f()}}}async function Lo(e,t,n){return He(e,n).flip(t)}var Do=B$1(e=>{let t=l({status:"pending"}),n=e.props.promise;return e.props.promise.then(r=>{e.props.promise===n&&t.set({status:"resolved",value:r});}).catch(r=>{e.props.promise===n&&t.set({status:"rejected",error:r instanceof Error?r:new Error(String(r))});}),()=>{let r=t();switch(r.status){case "pending":return e.props.pending?u(e.props.pending()):document.createComment("await-pending");case "resolved":return u(e.props.then(r.value));case "rejected":return e.props.catch?u(e.props.catch(r.error)):document.createComment("await-error")}}});function Mo(e){let t=l({status:"pending"});return e.then(n=>t.set({status:"resolved",value:n})).catch(n=>t.set({status:"rejected",error:n instanceof Error?n:new Error(String(n))})),()=>t()}function Fe(e,t){return n=>{t.self&&n.target!==n.currentTarget||(t.preventDefault&&n.preventDefault(),t.stopPropagation&&n.stopPropagation(),t.stopImmediatePropagation&&n.stopImmediatePropagation?.(),e(n));}}function Io(e,t,n,r={}){let o=Fe(n,r),i={once:r.once,capture:r.capture,passive:r.passive};return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function jo(e){let t=l(e.clientWidth),n=l(e.clientHeight);return typeof ResizeObserver<"u"&&new ResizeObserver(o=>{let i=o[0];i&&(t.set(i.contentRect.width),n.set(i.contentRect.height));}).observe(e),{width:()=>t(),height:()=>n()}}function Ho(e){let t=e??(typeof window<"u"?window:null),n=l(e?e.scrollLeft:window?.scrollX??0),r=l(e?e.scrollTop:window?.scrollY??0);if(t){let s=()=>{e?(n.set(e.scrollLeft),r.set(e.scrollTop)):(n.set(window.scrollX),r.set(window.scrollY));};t.addEventListener("scroll",s,{passive:true});}let o=r.set;r.set=s=>{o(s),e?e.scrollTop=s:window?.scrollTo(window.scrollX,s);};let i=n.set;return n.set=s=>{i(s),e?e.scrollLeft=s:window?.scrollTo(s,window.scrollY);},{scrollX:n,scrollY:r}}function Fo(){return l(null)}function _o(e){return l(null)}function No(e,t,n$1){e.name=typeof n$1=="string"?n$1:"",e.addEventListener("change",()=>{e.checked&&t.set(n$1);}),n(()=>{e.checked=t()===n$1;});}function _e(e,t,n$1){return n(()=>{n$1()?e.classList.add(t):e.classList.remove(t);})}function $o(e,t){let n=Object.entries(t).map(([r,o])=>_e(e,r,o));return ()=>n.forEach(r=>r())}function Ne(e,t,n$1){let r=t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return n(()=>{let o=n$1();o==null?e.style.removeProperty(r):e.style.setProperty(r,typeof o=="number"?`${o}px`:String(o));})}function Ko(e,t){let n=Object.entries(t).map(([r,o])=>Ne(e,r,o));return ()=>n.forEach(r=>r())}function Vo(e){return e}function Wo(...e){let t={},n$1=[];for(let c of e)typeof c=="function"?n$1.push(c):typeof c=="object"&&c!==null&&(t=c);let{label:r="inspect",level:o="log",logger:i,when:s}=t,a={dispose:null,get values(){return n$1.map(c=>c())},get value(){return n$1.length===1?n$1[0]():n$1.map(c=>c())},label:r,sources:n$1.length};return a.dispose=n(()=>{if(s&&!s())return;let c=n$1.map(l=>l());i?i(r,...c):console[o](`[${r}]`,...c);}),a}function zo(e,t={}){let{method:n="POST",headers:r={},onSuccess:o,onError:i,fetch:s=globalThis.fetch.bind(globalThis)}=t,a=l(false),c=l(null),l$1=l(null);async function d(u){a.set(true),l$1.set(null);try{let f=await s(e,{method:n,headers:{"Content-Type":"application/json",...r},body:JSON.stringify(u)});if(!f.ok)throw new Error(`Form action failed: ${f.status}`);let p=await f.json();return c.set(p),a.set(!1),o?.(p),p}catch(f){let p=f instanceof Error?f:new Error(String(f));throw l$1.set(p),a.set(false),i?.(p),p}}return {url:e,method:n,submitting:()=>a(),result:()=>c(),error:()=>l$1(),handle(u){return f=>{f.preventDefault();let p=f.target,y=new FormData(p),T={...u};y.forEach((m,h)=>{T[h]=m;}),d(T);}},submit:d}}function qo(e={}){if(typeof window>"u")return ()=>{};let{keyPrefix:t="akash-snapshot",capture:n=["scroll","forms"]}=e;function r(){let c={scrollX:window.scrollX,scrollY:window.scrollY,forms:{},timestamp:Date.now()};return n.includes("forms")&&document.querySelectorAll("form[id]").forEach(l=>{let d=l,u={};new FormData(d).forEach((f,p)=>{u[p]=String(f);}),c.forms[d.id]=u;}),c}function o(c){if(n.includes("scroll")&&requestAnimationFrame(()=>{window.scrollTo(c.scrollX,c.scrollY);}),n.includes("forms"))for(let[l,d]of Object.entries(c.forms)){let u=document.getElementById(l);if(u)for(let[f,p]of Object.entries(d)){let y=u.elements.namedItem(f);y&&(y.value=p);}}}let i=()=>`${t}-${window.location.pathname}`;function s(){try{let c=r();sessionStorage.setItem(i(),JSON.stringify(c));}catch{}}function a(){try{let c=sessionStorage.getItem(i());if(c){let l=JSON.parse(c);Date.now()-l.timestamp<1800*1e3&&o(l);}}catch{}}return window.addEventListener("beforeunload",s),window.addEventListener("popstate",()=>{requestAnimationFrame(a);}),performance.getEntriesByType("navigation")[0]?.type==="back_forward"&&requestAnimationFrame(a),()=>{window.removeEventListener("beforeunload",s);}}function se(e,t,n$1={}){let{immediate:r=false,once:o=false,debounce:i,deep:s=false}=n$1,a=Array.isArray(e),c=a?e:[e],l=c.map(()=>{}),d=true,u=null,f=false,p=null,y=()=>{f=true,u&&clearTimeout(u),p?.();};p=n(()=>{let m=c.map(k=>k());if(d){d=false,l=s?m.map($e):[...m],r&&T(m,c.map(()=>{}));return}if(!(s?m.some((k,v)=>!Go(k,l[v])):m.some((k,v)=>!Object.is(k,l[v]))))return;let b=[...l];l=s?m.map($e):[...m],T(m,b);});function T(m,h){if(f)return;let b=()=>{o&&(f=true,queueMicrotask(y)),a?t(m,h):t(m[0],h[0]);};i&&i>0?(u&&clearTimeout(u),u=setTimeout(b,i)):b();}return y}function Bo(e,t){return se(e,t,{once:true})}function Uo(e,t,n){return se(e,t,{debounce:n})}function $e(e){if(e===null||typeof e!="object")return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Go(e,t){if(Object.is(e,t))return true;if(e===null||t===null||typeof e!="object"||typeof t!="object")return false;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return false}}var Ke=Symbol("deepSignal"),Jo=Symbol("deepRaw");function Qo(e){let t=l(0),n=JSON.parse(JSON.stringify(e));function r(){t.update(i=>i+1);}function o(i,s=[]){return new Proxy(i,{get(a,c,l){if(c==="$raw")return JSON.parse(JSON.stringify(n));if(c==="$signal")return ()=>(t(),JSON.parse(JSON.stringify(n)));if(c===Ke)return t;if(c===Jo)return n;let d=Reflect.get(a,c,l);return t(),d!==null&&typeof d=="object"?o(d,[...s,String(c)]):d},set(a,c,l){let d=Reflect.set(a,c,l);return r(),d},deleteProperty(a,c){let l=Reflect.deleteProperty(a,c);return r(),l}})}return o(n)}function Yo(e){return e.$raw??e}function Xo(e){if(e===null||typeof e!="object")return false;try{return e[Ke]!==void 0}catch{return false}}function Ve(){let e=new Map;function t(n){let r=e.get(n);return r||(r=new Set,e.set(n,r)),r}return {on(n,r){return t(n).add(r),()=>t(n).delete(r)},once(n,r){let o=i=>{t(n).delete(o),r(i);};return t(n).add(o),()=>t(n).delete(o)},emit(n,r){let o=e.get(n);if(o)for(let i of Array.from(o))i(r);},off(n,r){t(n).delete(r);},clear(n){n?e.delete(n):e.clear();},listenerCount(n){return e.get(n)?.size??0},hasListeners(n){return (e.get(n)?.size??0)>0}}}var ae=null;function Zo(){return ae||(ae=Ve()),ae}var ei=new Set(["a","abbr","address","article","aside","b","bdi","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hr","i","img","ins","kbd","li","main","mark","nav","ol","p","pre","q","rp","rt","ruby","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"]),ti=new Set(["alt","class","dir","href","id","lang","name","rel","src","style","tabindex","target","title","type","width","height","colspan","rowspan","scope","loading","decoding"]),ni=/^(javascript|data|vbscript):/i,ri=/^on/i;function ze(e,t={}){if(typeof document>"u")return e.replace(/<[^>]*>/g,"");let{allowTags:n=[],allowAttrs:r=[],allowDataAttrs:o=true,allowAriaAttrs:i=true,allowStyle:s=false,tagFilter:a,attrFilter:c}=t,l=new Set([...ei,...n]),d=new Set([...ti,...r]);s||d.delete("style");let u=new DOMParser().parseFromString(e,"text/html");return qe(u.body,l,d,o,i,a,c),u.body.innerHTML}function qe(e,t,n,r,o,i,s){let a=Array.from(e.childNodes);for(let c of a)if(c.nodeType===Node.ELEMENT_NODE){let l=c,d=l.tagName.toLowerCase();if(!(i?i(d):t.has(d))){let p=document.createTextNode(l.textContent??"");e.replaceChild(p,c);continue}let f=Array.from(l.attributes);for(let p of f){let y=p.name.toLowerCase(),T=p.value;if(ri.test(y)){l.removeAttribute(p.name);continue}if(!(y.startsWith("data-")&&r)&&!(y.startsWith("aria-")&&o)){if(s&&!s(y,T,d)){l.removeAttribute(p.name);continue}if(!n.has(y)){l.removeAttribute(p.name);continue}if((y==="href"||y==="src")&&ni.test(T)){l.removeAttribute(p.name);continue}}}qe(l,t,n,r,o,i,s);}}function oi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ii(e,t){return n=>{e.innerHTML=ze(n,t);}}function Be(e={}){let n={...{"default-src":["'self'"],"script-src":["'self'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:"],"connect-src":["'self'"],"frame-ancestors":["'none'"],"base-uri":["'self'"],"form-action":["'self'"],"object-src":["'none'"]},...e.directives};if(e.nonce){let r=`'nonce-${e.nonce}'`;n["script-src"]&&n["script-src"].push(r),n["style-src"]&&n["style-src"].push(r);}return e.reportUri&&(n["report-uri"]=[e.reportUri]),Object.entries(n).map(([r,o])=>`${r} ${o.join(" ")}`).join("; ")}function Ue(e={}){return e.reportOnly?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function si(e={}){let t={};if(e.csp!==false){let n=e.csp??{};t[Ue(n)]=Be(n);}if(e.frameOptions!==false&&(t["X-Frame-Options"]=e.frameOptions??"DENY"),e.contentTypeOptions!==false&&(t["X-Content-Type-Options"]="nosniff"),t["X-XSS-Protection"]=e.xssProtection?"1; mode=block":"0",e.hsts!==false){let n=e.hsts??{maxAge:31536e3,includeSubDomains:true},r=`max-age=${n.maxAge}`;n.includeSubDomains&&(r+="; includeSubDomains"),n.preload&&(r+="; preload"),t["Strict-Transport-Security"]=r;}if(e.referrerPolicy!==false&&(t["Referrer-Policy"]=e.referrerPolicy??"strict-origin-when-cross-origin"),e.permissionsPolicy!==false){let n=e.permissionsPolicy??{camera:[],microphone:[],geolocation:[],payment:[]};t["Permissions-Policy"]=Object.entries(n).map(([r,o])=>`${r}=(${o.join(" ")})`).join(", ");}return e.coop!==false&&(t["Cross-Origin-Opener-Policy"]=e.coop??"same-origin"),e.coep!==false&&(t["Cross-Origin-Embedder-Policy"]=e.coep??"require-corp"),t}function Ge(e,...t){let n=new Set(["__proto__","constructor","prototype"]);for(let r of t)if(!(!r||typeof r!="object"))for(let o of Object.keys(r)){if(n.has(o))continue;let i=e[o],s=r[o];We(s)&&We(i)?e[o]=Ge({...i},s):e[o]=s;}return e}function Je(e){if(e===null||typeof e!="object")return e;Object.freeze(e);for(let t of Object.values(e))typeof t=="object"&&t!==null&&Je(t);return e}function We(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}async function ai(e,t="sha384"){let r=new TextEncoder().encode(e),o=t==="sha256"?"SHA-256":t==="sha384"?"SHA-384":"SHA-512",i=await crypto.subtle.digest(o,r),s=new Uint8Array(i),a=btoa(String.fromCharCode(...s));return `${t}-${a}`}function Qe(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function ci(e={}){let{headerName:t="X-CSRF-Token",cookieName:n="csrf-token",tokenGenerator:r=Qe}=e,o=null;function i(){if(!o){if(typeof document<"u"){let a=document.cookie.match(new RegExp(`${n}=([^;]+)`));if(a)return o=a[1],o}o=r();}return o}return {interceptor:async(a,c)=>{let l=a.method.toUpperCase();return ["POST","PUT","PATCH","DELETE"].includes(l)&&a.headers.set(t,i()),c(a)},token:i,refresh(){o=r();}}}function li(e,t={}){let{allowedHosts:n,allowedProtocols:r=["http:","https:"],allowRelative:o=true}=t;if(e.startsWith("/")&&!e.startsWith("//"))return o?e:null;try{let i=new URL(e);return !r.includes(i.protocol)||n&&!n.includes(i.hostname)?null:i.toString()}catch{return null}}function ui(e){let{maxAttempts:t,windowMs:n}=e,r=[];return {check(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return r.length>=t?false:(r.push(o),true)},remaining(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return Math.max(0,t-r.length)},reset(){r.length=0;}}}var ce=new Set,Ye=true,le=null;function di(e){Ye=e;}function pi(e){le=e;}function fi(){ce.clear();}function mi(e,t){let n=((...r)=>(Xe(t),e(...r)));return Object.keys(e).forEach(r=>{n[r]=e[r];}),n.__deprecated=t,n}function gi(e,t){return Xe(t),e}function Xe(e){if(!Ye||ce.has(e.name))return;ce.add(e.name);let t=[`[AkashJS] DEPRECATED: ${e.name}() is deprecated since v${e.since}`];e.removeIn?t[0]+=` and will be removed in v${e.removeIn}.`:t[0]+=".",e.replacement&&t.push(` Migrate to: ${e.replacement}()`),e.message&&t.push(` ${e.message}`),t.push(` See: ${e.link??"https://akash.js.org/migration"}`);let n=t.join(`
|
|
60
|
+
`),i}function To(e,t){e.style.viewTransitionName=t;}function vo(e,t){let n=document.documentElement,r=new Promise(async o=>{n.style.transition="opacity 0.15s ease",n.style.opacity="0",await new Promise(i=>setTimeout(i,150)),await e(),n.style.opacity="1",await new Promise(i=>setTimeout(i,150)),n.style.transition="",n.style.opacity="",t.onAfter?.(),o();});return {finished:r,updateCallbackDone:r,ready:Promise.resolve(),skipTransition:()=>{n.style.transition="",n.style.opacity="";}}}function bo(e){return Array.isArray(e)?e.join(","):typeof e=="boolean"?e?"true":"false":String(e)}function wo(e,t){return typeof t=="number"?Number(e):typeof t=="boolean"?e==="true"||e==="1":Array.isArray(t)?e?e.split(","):[]:e}function B(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function So(e,t){if(typeof window>"u")return;let n=e.toString(),r=n?`${window.location.pathname}?${n}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;t==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r);}var K=new Map,De=false;function xo(){De||typeof window>"u"||(De=true,window.addEventListener("popstate",()=>{let e=B();a(()=>{for(let[t,n]of K){let r=e.get(t),o=r!==null?n.deserialize(r):n.defaultValue;n.signal.set(o);}});}));}function Me(e,t,n={}){let{serialize:r=m=>bo(m),deserialize:o=m=>wo(m,t),history:i="replace",debounce:s=0,removeDefault:a=true}=n,l$1=B().get(e),d=l$1!==null?o(l$1):t,u=l(d);K.set(e,{signal:u,deserialize:o,defaultValue:t}),xo();let f=null,p=false,y=u.set;u.set=m=>{if(y(m),p);let h=()=>{let b=B();a&&m===t?b.delete(e):b.set(e,r(m)),So(b,i);};s>0?(f&&clearTimeout(f),f=setTimeout(h,s)):h();};u.update;return u.update=m=>{u.set(m(u()));},u}function Eo(e,t){let n={};for(let[r,o]of Object.entries(e))n[r]=Me(r,o.default,{serialize:o.serialize,deserialize:o.deserialize,history:t?.history});return n}function ko(){if(typeof window>"u")return;let e=`${window.location.pathname}${window.location.hash}`;window.history.replaceState(null,"",e),a(()=>{for(let[,t]of K)t.signal.set(t.defaultValue);});}function Co(){let e=B(),t={};return e.forEach((n,r)=>{t[r]=n;}),t}function Po(e){K.delete(e);}function Ao(){K.clear();}var ie=typeof requestAnimationFrame=="function"?requestAnimationFrame:e=>setTimeout(()=>e(Date.now()),16),Ie=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:e=>clearTimeout(e),je={linear:e=>e,cubicIn:e=>e*e*e,cubicOut:e=>1-Math.pow(1-e,3),cubicInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,quadIn:e=>e*e,quadOut:e=>1-(1-e)*(1-e),quintOut:e=>1-Math.pow(1-e,5),bounceOut:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,elasticOut:e=>e===0||e===1?e:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1};function Ro(e,t,n){return typeof e=="number"&&typeof t=="number"?e+(t-e)*n:n<.5?e:t}function Oo(e,t={}){let{duration:n=400,easing:r=je.cubicOut,interpolate:o=Ro,delay:i=0}=t,s=l(e),a=l(e),c=0,l$1=false,d=(()=>s());return d.set=(u,f)=>{let p=f?.duration??n,y=f?.easing??r,T=f?.interpolate??o,m=f?.delay??i,h=s();return a.set(u),p===0?(s.set(u),Promise.resolve()):(l$1&&(Ie(c),l$1=false),new Promise(b=>{let k=performance.now()+m;l$1=true;function v(S){if(!l$1){b();return}let A=S-k;if(A<0){c=ie(v);return}let C=Math.min(A/p,1),R=y(C);s.set(T(h,u,R)),C<1?c=ie(v):(l$1=false,b());}c=ie(v);}))},d.setImmediate=u=>{l$1&&(Ie(c),l$1=false),s.set(u),a.set(u);},d.target=()=>a(),d}function He(e,t={}){let{duration:n=300,easing:r="cubic-bezier(0.2, 0, 0, 1)",delay:o=0,selector:i,keyAttribute:s="data-key",onComplete:a}=t,c=new Map;function l(){return Array.from(i?e.querySelectorAll(i):e.children)}function d(p){return p.getAttribute(s)??p.id??""}function u(){c=new Map;for(let p of l()){let y=d(p);if(y){let T=p.getBoundingClientRect();c.set(y,{left:T.left,top:T.top,width:T.width,height:T.height});}}}function f(){let p=l(),y=[];for(let m of p){let h=d(m),b=c.get(h);if(!b)continue;let k=m.getBoundingClientRect(),v=b.left-k.left,S=b.top-k.top,A=b.width/(k.width||1),C=b.height/(k.height||1);if(Math.abs(v)<.5&&Math.abs(S)<.5&&Math.abs(A-1)<.01&&Math.abs(C-1)<.01)continue;let R=m.animate([{transform:`translate(${v}px, ${S}px) scale(${A}, ${C})`},{transform:"translate(0, 0) scale(1, 1)"}],{duration:n,easing:r,delay:o,fill:"both"});y.push(R);}let T=new Set(p.map(d));for(let[m,h]of c)T.has(m);return c.clear(),new Promise(m=>{if(y.length===0){a?.(),m();return}Promise.all(y.map(h=>h.finished)).then(()=>{for(let h of y)h.cancel();a?.(),m();});})}return {measure:u,animate:f,async flip(p){return u(),p(),await new Promise(y=>requestAnimationFrame(y)),f()}}}async function Lo(e,t,n){return He(e,n).flip(t)}var Do=B$1(e=>{let t=l({status:"pending"}),n=e.props.promise;return e.props.promise.then(r=>{e.props.promise===n&&t.set({status:"resolved",value:r});}).catch(r=>{e.props.promise===n&&t.set({status:"rejected",error:r instanceof Error?r:new Error(String(r))});}),()=>{let r=t();switch(r.status){case "pending":return e.props.pending?u(e.props.pending()):document.createComment("await-pending");case "resolved":return u(e.props.then(r.value));case "rejected":return e.props.catch?u(e.props.catch(r.error)):document.createComment("await-error")}}});function Mo(e){let t=l({status:"pending"});return e.then(n=>t.set({status:"resolved",value:n})).catch(n=>t.set({status:"rejected",error:n instanceof Error?n:new Error(String(n))})),()=>t()}function Fe(e,t){return n=>{t.self&&n.target!==n.currentTarget||(t.preventDefault&&n.preventDefault(),t.stopPropagation&&n.stopPropagation(),t.stopImmediatePropagation&&n.stopImmediatePropagation?.(),e(n));}}function Io(e,t,n,r={}){let o=Fe(n,r),i={once:r.once,capture:r.capture,passive:r.passive};return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function jo(e){let t=l(e.clientWidth),n=l(e.clientHeight);return typeof ResizeObserver<"u"&&new ResizeObserver(o=>{let i=o[0];i&&(t.set(i.contentRect.width),n.set(i.contentRect.height));}).observe(e),{width:()=>t(),height:()=>n()}}function Ho(e){let t=e??(typeof window<"u"?window:null),n=l(e?e.scrollLeft:window?.scrollX??0),r=l(e?e.scrollTop:window?.scrollY??0);if(t){let s=()=>{e?(n.set(e.scrollLeft),r.set(e.scrollTop)):(n.set(window.scrollX),r.set(window.scrollY));};t.addEventListener("scroll",s,{passive:true});}let o=r.set;r.set=s=>{o(s),e?e.scrollTop=s:window?.scrollTo(window.scrollX,s);};let i=n.set;return n.set=s=>{i(s),e?e.scrollLeft=s:window?.scrollTo(s,window.scrollY);},{scrollX:n,scrollY:r}}function Fo(){return l(null)}function _o(e){return l(null)}function No(e,t,n$1){e.name=typeof n$1=="string"?n$1:"",e.addEventListener("change",()=>{e.checked&&t.set(n$1);}),n(()=>{e.checked=t()===n$1;});}function _e(e,t,n$1){return n(()=>{n$1()?e.classList.add(t):e.classList.remove(t);})}function $o(e,t){let n=Object.entries(t).map(([r,o])=>_e(e,r,o));return ()=>n.forEach(r=>r())}function Ne(e,t,n$1){let r=t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return n(()=>{let o=n$1();o==null?e.style.removeProperty(r):e.style.setProperty(r,typeof o=="number"?`${o}px`:String(o));})}function Ko(e,t){let n=Object.entries(t).map(([r,o])=>Ne(e,r,o));return ()=>n.forEach(r=>r())}function Vo(e){return e}function Wo(...e){let t={},n$1=[];for(let c of e)typeof c=="function"?n$1.push(c):typeof c=="object"&&c!==null&&(t=c);let{label:r="inspect",level:o="log",logger:i,when:s}=t,a={dispose:null,get values(){return n$1.map(c=>c())},get value(){return n$1.length===1?n$1[0]():n$1.map(c=>c())},label:r,sources:n$1.length};return a.dispose=n(()=>{if(s&&!s())return;let c=n$1.map(l=>l());i?i(r,...c):console[o](`[${r}]`,...c);}),a}function zo(e,t={}){let{method:n="POST",headers:r={},onSuccess:o,onError:i,fetch:s=globalThis.fetch.bind(globalThis)}=t,a=l(false),c=l(null),l$1=l(null);async function d(u){a.set(true),l$1.set(null);try{let f=await s(e,{method:n,headers:{"Content-Type":"application/json",...r},body:JSON.stringify(u)});if(!f.ok)throw new Error(`Form action failed: ${f.status}`);let p=await f.json();return c.set(p),a.set(!1),o?.(p),p}catch(f){let p=f instanceof Error?f:new Error(String(f));throw l$1.set(p),a.set(false),i?.(p),p}}return {url:e,method:n,submitting:()=>a(),result:()=>c(),error:()=>l$1(),handle(u){return f=>{f.preventDefault();let p=f.target,y=new FormData(p),T={...u};y.forEach((m,h)=>{T[h]=m;}),d(T);}},submit:d}}function qo(e={}){if(typeof window>"u")return ()=>{};let{keyPrefix:t="akash-snapshot",capture:n=["scroll","forms"]}=e;function r(){let c={scrollX:window.scrollX,scrollY:window.scrollY,forms:{},timestamp:Date.now()};return n.includes("forms")&&document.querySelectorAll("form[id]").forEach(l=>{let d=l,u={};new FormData(d).forEach((f,p)=>{u[p]=String(f);}),c.forms[d.id]=u;}),c}function o(c){if(n.includes("scroll")&&requestAnimationFrame(()=>{window.scrollTo(c.scrollX,c.scrollY);}),n.includes("forms"))for(let[l,d]of Object.entries(c.forms)){let u=document.getElementById(l);if(u)for(let[f,p]of Object.entries(d)){let y=u.elements.namedItem(f);y&&(y.value=p);}}}let i=()=>`${t}-${window.location.pathname}`;function s(){try{let c=r();sessionStorage.setItem(i(),JSON.stringify(c));}catch{}}function a(){try{let c=sessionStorage.getItem(i());if(c){let l=JSON.parse(c);Date.now()-l.timestamp<1800*1e3&&o(l);}}catch{}}return window.addEventListener("beforeunload",s),window.addEventListener("popstate",()=>{requestAnimationFrame(a);}),performance.getEntriesByType("navigation")[0]?.type==="back_forward"&&requestAnimationFrame(a),()=>{window.removeEventListener("beforeunload",s);}}function se(e,t,n$1={}){let{immediate:r=false,once:o=false,debounce:i,deep:s=false}=n$1,a=Array.isArray(e),c=a?e:[e],l=c.map(()=>{}),d=true,u=null,f=false,p=null,y=()=>{f=true,u&&clearTimeout(u),p?.();};p=n(()=>{let m=c.map(k=>k());if(d){d=false,l=s?m.map($e):[...m],r&&T(m,c.map(()=>{}));return}if(!(s?m.some((k,v)=>!Go(k,l[v])):m.some((k,v)=>!Object.is(k,l[v]))))return;let b=[...l];l=s?m.map($e):[...m],T(m,b);});function T(m,h){if(f)return;let b=()=>{o&&(f=true,queueMicrotask(y)),a?t(m,h):t(m[0],h[0]);};i&&i>0?(u&&clearTimeout(u),u=setTimeout(b,i)):b();}return y}function Bo(e,t){return se(e,t,{once:true})}function Uo(e,t,n){return se(e,t,{debounce:n})}function $e(e){if(e===null||typeof e!="object")return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Go(e,t){if(Object.is(e,t))return true;if(e===null||t===null||typeof e!="object"||typeof t!="object")return false;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return false}}var Ke=Symbol("deepSignal"),Jo=Symbol("deepRaw");function Qo(e){let t=l(0),n=JSON.parse(JSON.stringify(e));function r(){t.update(i=>i+1);}function o(i,s=[]){return new Proxy(i,{get(a,c,l){if(c==="$raw")return JSON.parse(JSON.stringify(n));if(c==="$signal")return ()=>(t(),JSON.parse(JSON.stringify(n)));if(c===Ke)return t;if(c===Jo)return n;let d=Reflect.get(a,c,l);return t(),d!==null&&typeof d=="object"?o(d,[...s,String(c)]):d},set(a,c,l){let d=Reflect.set(a,c,l);return r(),d},deleteProperty(a,c){let l=Reflect.deleteProperty(a,c);return r(),l}})}return o(n)}function Yo(e){return e.$raw??e}function Xo(e){if(e===null||typeof e!="object")return false;try{return e[Ke]!==void 0}catch{return false}}function Ve(){let e=new Map;function t(n){let r=e.get(n);return r||(r=new Set,e.set(n,r)),r}return {on(n,r){return t(n).add(r),()=>t(n).delete(r)},once(n,r){let o=i=>{t(n).delete(o),r(i);};return t(n).add(o),()=>t(n).delete(o)},emit(n,r){let o=e.get(n);if(o)for(let i of Array.from(o))i(r);},off(n,r){t(n).delete(r);},clear(n){n?e.delete(n):e.clear();},listenerCount(n){return e.get(n)?.size??0},hasListeners(n){return (e.get(n)?.size??0)>0}}}var ae=null;function Zo(){return ae||(ae=Ve()),ae}var ei=new Set(["a","abbr","address","article","aside","b","bdi","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hr","i","img","ins","kbd","li","main","mark","nav","ol","p","pre","q","rp","rt","ruby","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"]),ti=new Set(["alt","class","dir","href","id","lang","name","rel","src","style","tabindex","target","title","type","width","height","colspan","rowspan","scope","loading","decoding"]),ni=/^(javascript|data|vbscript):/i,ri=/^on/i;function ze(e,t={}){if(typeof document>"u")return e.replace(/<[^>]*>/g,"");let{allowTags:n=[],allowAttrs:r=[],allowDataAttrs:o=true,allowAriaAttrs:i=true,allowStyle:s=false,tagFilter:a,attrFilter:c}=t,l=new Set([...ei,...n]),d=new Set([...ti,...r]);s||d.delete("style");let u=new DOMParser().parseFromString(e,"text/html");return qe(u.body,l,d,o,i,a,c),u.body.innerHTML}function qe(e,t,n,r,o,i,s){let a=Array.from(e.childNodes);for(let c of a)if(c.nodeType===Node.ELEMENT_NODE){let l=c,d=l.tagName.toLowerCase();if(!(i?i(d):t.has(d))){let p=document.createTextNode(l.textContent??"");e.replaceChild(p,c);continue}let f=Array.from(l.attributes);for(let p of f){let y=p.name.toLowerCase(),T=p.value;if(ri.test(y)){l.removeAttribute(p.name);continue}if(!(y.startsWith("data-")&&r)&&!(y.startsWith("aria-")&&o)){if(s&&!s(y,T,d)){l.removeAttribute(p.name);continue}if(!n.has(y)){l.removeAttribute(p.name);continue}if((y==="href"||y==="src")&&ni.test(T)){l.removeAttribute(p.name);continue}}}qe(l,t,n,r,o,i,s);}}function oi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ii(e,t){return n=>{e.innerHTML=ze(n,t);}}function Be(e={}){let n={...{"default-src":["'self'"],"script-src":["'self'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:"],"connect-src":["'self'"],"frame-ancestors":["'none'"],"base-uri":["'self'"],"form-action":["'self'"],"object-src":["'none'"]},...e.directives};if(e.nonce){let r=`'nonce-${e.nonce}'`;n["script-src"]&&n["script-src"].push(r),n["style-src"]&&n["style-src"].push(r);}return e.reportUri&&(n["report-uri"]=[e.reportUri]),Object.entries(n).map(([r,o])=>`${r} ${o.join(" ")}`).join("; ")}function Ue(e={}){return e.reportOnly?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function si(e={}){let t={};if(e.csp!==false){let n=e.csp??{};t[Ue(n)]=Be(n);}if(e.frameOptions!==false&&(t["X-Frame-Options"]=e.frameOptions??"DENY"),e.contentTypeOptions!==false&&(t["X-Content-Type-Options"]="nosniff"),t["X-XSS-Protection"]=e.xssProtection?"1; mode=block":"0",e.hsts!==false){let n=e.hsts??{maxAge:31536e3,includeSubDomains:true},r=`max-age=${n.maxAge}`;n.includeSubDomains&&(r+="; includeSubDomains"),n.preload&&(r+="; preload"),t["Strict-Transport-Security"]=r;}if(e.referrerPolicy!==false&&(t["Referrer-Policy"]=e.referrerPolicy??"strict-origin-when-cross-origin"),e.permissionsPolicy!==false){let n=e.permissionsPolicy??{camera:[],microphone:[],geolocation:[],payment:[]};t["Permissions-Policy"]=Object.entries(n).map(([r,o])=>`${r}=(${o.join(" ")})`).join(", ");}return e.coop!==false&&(t["Cross-Origin-Opener-Policy"]=e.coop??"same-origin"),e.coep!==false&&(t["Cross-Origin-Embedder-Policy"]=e.coep??"require-corp"),t}function Ge(e,...t){let n=new Set(["__proto__","constructor","prototype"]);for(let r of t)if(!(!r||typeof r!="object"))for(let o of Object.keys(r)){if(n.has(o))continue;let i=e[o],s=r[o];We(s)&&We(i)?e[o]=Ge({...i},s):e[o]=s;}return e}function Je(e){if(e===null||typeof e!="object")return e;Object.freeze(e);for(let t of Object.values(e))typeof t=="object"&&t!==null&&Je(t);return e}function We(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}async function ai(e,t="sha384"){let r=new TextEncoder().encode(e),o=t==="sha256"?"SHA-256":t==="sha384"?"SHA-384":"SHA-512",i=await crypto.subtle.digest(o,r),s=new Uint8Array(i),a=btoa(String.fromCharCode(...s));return `${t}-${a}`}function Qe(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function ci(e={}){let{headerName:t="X-CSRF-Token",cookieName:n="csrf-token",tokenGenerator:r=Qe}=e,o=null;function i(){if(!o){if(typeof document<"u"){let a=document.cookie.match(new RegExp(`${n}=([^;]+)`));if(a)return o=a[1],o}o=r();}return o}return {interceptor:async(a,c)=>{let l=a.method.toUpperCase();return ["POST","PUT","PATCH","DELETE"].includes(l)&&a.headers.set(t,i()),c(a)},token:i,refresh(){o=r();}}}function li(e,t={}){if(e==null)return null;let{allowedHosts:n,allowedProtocols:r=["http:","https:"],allowRelative:o=true}=t;if(e.startsWith("/")&&!e.startsWith("//"))return o?e:null;try{let i=new URL(e);return !r.includes(i.protocol)||n&&!n.includes(i.hostname)?null:i.toString()}catch{return null}}function ui(e){let{maxAttempts:t,windowMs:n}=e,r=[];return {check(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return r.length>=t?false:(r.push(o),true)},remaining(){let o=Date.now();for(;r.length>0&&r[0]<o-n;)r.shift();return Math.max(0,t-r.length)},reset(){r.length=0;}}}var ce=new Set,Ye=true,le=null;function di(e){Ye=e;}function pi(e){le=e;}function fi(){ce.clear();}function mi(e,t){let n=((...r)=>(Xe(t),e(...r)));return Object.keys(e).forEach(r=>{n[r]=e[r];}),n.__deprecated=t,n}function gi(e,t){return Xe(t),e}function Xe(e){if(!Ye||ce.has(e.name))return;ce.add(e.name);let t=[`[AkashJS] DEPRECATED: ${e.name}() is deprecated since v${e.since}`];e.removeIn?t[0]+=` and will be removed in v${e.removeIn}.`:t[0]+=".",e.replacement&&t.push(` Migrate to: ${e.replacement}()`),e.message&&t.push(` ${e.message}`),t.push(` See: ${e.link??"https://akash.js.org/migration"}`);let n=t.join(`
|
|
61
61
|
`);le?le(n):typeof console<"u"&&console.warn(n);}var U=new Map;function yi(e){U.set(e.name,e);}function Ze(){return Array.from(U.values())}function hi(e){return Ze().filter(t=>t.stability===e)}function Ti(e){return U.get(e)?.stability==="deprecated"}function vi(e){return U.get(e)?.deprecation??null}function bi(e){let t=[],n=[],r=Object.entries(e);if(r.length===0)return {compatible:true,warnings:t,errors:n};let o=r.filter(([i])=>i.startsWith("@akashjs/"));if(o.length>1){let i=new Set(o.map(([,a])=>a.split(".")[0])),s=new Set(o.map(([,a])=>a.split(".").slice(0,2).join(".")));i.size>1?n.push(`Major version mismatch: ${o.map(([a,c])=>`${a}@${c}`).join(", ")}. All @akashjs packages should be on the same major version.`):s.size>1&&t.push(`Minor version mismatch: ${o.map(([a,c])=>`${a}@${c}`).join(", ")}. Consider updating all packages to the same version with \`akash update\`.`);}return {compatible:n.length===0,warnings:t,errors:n}}var wi=new Map,Si=new Map;function G(e){let n=d()[e];if(!n)return null;let r=n.$snapshot(),i={},s=[];for(let[a,c]of Object.entries(n))if(!a.startsWith("$")){if(typeof c=="function"&&"set"in c&&"update"in c)c();else if(typeof c=="function"&&!("set"in c)&&!a.startsWith("$"))try{let l=c();typeof l<"u"?i[a]=l:s.push(a);}catch{s.push(a);}}return {$id:e,state:r,getters:i,actions:s,subscriberCount:0}}var ue=new Map,de=new Map;function xi(){return {stores(){return Object.keys(d())},store(e){return G(e)},storeSnapshots(){let e={};for(let t of Object.keys(d())){let n=G(t);n&&(e[t]=n);}return e},signals(){return [...wi.values()].map(e=>({name:e.name,value:e.read(),subscribers:e.subscriberCount}))},effects(){return [...Si.values()].map(e=>({name:e.name,runs:e.runCount,isRender:e.isRender,sources:e.sourceCount}))},version(){return {runtime:"0.1.26"}},log(e){if(e){let t=G(e);t?(console.group(`\u{1F50D} Store: ${e}`),console.log("State:",t.state),console.log("Getters:",t.getters),console.log("Actions:",t.actions),console.groupEnd()):console.warn(`Store "${e}" not found. Available:`,Object.keys(d()));}else {let t=Object.keys(d());console.group("\u{1F50D} AkashJS Stores");for(let n of t){let r=G(n);r&&(console.group(n),console.log("State:",r.state),console.log("Getters:",r.getters),console.groupEnd());}console.groupEnd();}},startRecording(e){let t=d()[e];if(!t){console.warn(`Store "${e}" not found.`);return}let n=[];n.push({timestamp:Date.now(),state:t.$snapshot()});let r=t.$subscribe(o=>{n.push({timestamp:Date.now(),state:{...o}});});ue.set(e,n),de.set(e,r),console.log(`\u23FA Recording store "${e}". Call __AKASH_DEVTOOLS__.stopRecording("${e}") to view history.`);},stopRecording(e){let t=de.get(e);t&&t(),de.delete(e);let n=ue.get(e)??[];return ue.delete(e),console.log(`\u23F9 Stopped recording "${e}". ${n.length} snapshots captured.`),console.table(n.map((r,o)=>({"#":o,time:new Date(r.timestamp).toISOString().slice(11,23),state:JSON.stringify(r.state)}))),n}}}function Ei(){let e=xi();typeof globalThis<"u"&&(globalThis.__AKASH_DEVTOOLS__=e,console.log("%c\u{1F527} AkashJS DevTools installed. Access via __AKASH_DEVTOOLS__ in console.","color: #7c3aed; font-weight: bold;"),console.log(" .stores() \u2014 list stores"),console.log(' .store("id") \u2014 inspect store'),console.log(" .log() \u2014 pretty-print all stores"),console.log(' .log("id") \u2014 pretty-print one store'),console.log(' .startRecording("id") \u2014 record state changes'),console.log(' .stopRecording("id") \u2014 view recorded history'),console.log(" .signals() \u2014 list tracked signals"),console.log(" .effects() \u2014 list tracked effects"));}export{Do as Await,fn as ErrorBoundary,ge as HYDRATE_ATTR,gr as Image,qn as Portal,yn as Suspense,to as Switch,xn as Transition,Qn as VirtualFor,$r as applyDirective,Tr as applyStyles,To as assignTransitionName,Mo as awaitSignal,_e as bindClass,$o as bindClasses,jo as bindDimensions,Fo as bindElement,_o as bindGroup,No as bindGroupItem,Ho as bindScroll,Ne as bindStyle,Ko as bindStyles,ne as calculateRange,Ar as capitalize,Er as chain,bi as checkCompatibility,we as checkForLeaks,Tn as claimElement,vn as claimText,ao as clearProviders,ko as clearQueryState,kn as collectSSRHead,Xn as countOps,An as createApp,ci as createCSRFInterceptor,vr as createDataTable,Ve as createEventBus,He as createFlip,Oe as createInjector,ui as createRateLimiter,ii as createSafeHTML,pn as createSlots,Un as createToaster,hr as css,Mr as currency,Se as cx,Dr as date,Je as deepFreeze,Qo as deepSignal,co as defer,Yn as defineAsyncComponent,Gr as defineCustomElement,j as defineDirective,zo as defineFormAction,kr as definePipe,Pn as definePlugin,oo as defineProvider,Vo as defineSnippet,mi as deprecated,gi as deprecatedValue,Nr as directiveFromFn,er as disableLeakDetection,Xr as discoverStaticRoutes,je as easings,Zn as enableLeakDetection,qo as enableSnapshots,he as enterTransition,oi as escapeHtml,Sn as exitTransition,wn as findHydrationBoundaries,Lo as flip,Be as generateCSP,Qe as generateCSRFToken,Zr as generatePaths,ai as generateSRI,si as generateSecurityHeaders,Sr as generateSitemap,En as generateTransitionCSS,hi as getAPIsByStability,or as getActiveEffects,Ue as getCSPHeaderName,vi as getDeprecationInfo,sr as getLeakDetectionStats,Co as getQueryParams,Ze as getRegisteredAPIs,mn as getSuspenseContext,ye as getTransitionClasses,Zo as globalEventBus,dn as hasSlot,Z as hydrate,so as injectProvider,Wo as inspect,Ei as installDevtools,Xo as isDeepSignal,Ti as isDeprecated,hn as isHydrationActive,tr as isLeakDetectionEnabled,Hr as json,Te as longestIncreasingSubsequence,Pr as lowercase,no as match,Ir as number,Io as onEvent,jr as percent,xr as pipe,Fr as plural,Yr as prerender,bn as progressiveHydrate,ve as reconcileKeys,yi as registerAPI,gn as registerPending,_r as relativeTime,Vr as removeDirectives,Po as removeQueryState,Cn as renderHeadToString,un as renderSlot,Ae as renderSwitch,ir as reportLeaks,fi as resetDeprecationWarnings,Ao as resetQueryState,Ge as safeMerge,ze as sanitize,li as sanitizeURL,di as setDeprecationWarnings,pi as setWarningHandler,eo as sitemapFromResults,yo as startViewTransition,Le as supportsViewTransitions,Rr as titleCase,Jr as toCustomElement,Yo as toRaw,nr as trackEffect,Or as trim,Lr as truncate,Oo as tweened,rr as untrackEffect,Kr as updateDirective,Cr as uppercase,Pe as urlToFilePath,dr as useAnnounce,_n as useBreakpoint,zn as useClickOutside,$n as useClipboard,Mn as useCounter,Ln as useDebounce,lr as useFocusTrap,Vn as useGeolocation,F as useHead,yr as useInfiniteScroll,Rn as useInterval,pr as useKeyboard,Hn as useMediaQuery,Kn as useOnline,ke as useOpenGraph,jn as usePrevious,Me as useQueryState,Eo as useQueryStates,wr as useSEO,Nn as useStorage,Ee as useStructuredData,Gn as useTheme,Dn as useThrottle,On as useTimeout,In as useToggle,Ce as useTwitterCard,Jn as useVirtualList,Wn as useWindowSize,Wr as vAutoFocus,zr as vClickOutside,Br as vIntersect,qr as vLongPress,Ur as vResize,ho as viewTransitionCSS,se as watch,Uo as watchDebounced,Bo as watchOnce,Fe as withModifiers};//# sourceMappingURL=index.js.map
|
|
62
62
|
//# sourceMappingURL=index.js.map
|