@akashjs/runtime 0.1.29 → 0.1.30
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-4PK4YNND.js → chunk-DZGRBVSY.js} +2 -2
- package/dist/chunk-DZGRBVSY.js.map +1 -0
- package/dist/{chunk-A3VPGLBN.cjs → chunk-OCBLY4E4.cjs} +2 -2
- package/dist/chunk-OCBLY4E4.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4PK4YNND.js.map +0 -1
- package/dist/chunk-A3VPGLBN.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{a as createMachine}from'./chunk-TS5UKZTG.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-
|
|
1
|
+
export{a as createMachine}from'./chunk-TS5UKZTG.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-3HWR5MIF.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 cn(e,t){if(e){let n=e();return u(n)}return t?u(t()):document.createComment("empty slot")}function ln(e){if(!e)return false;let t=e();return !(t==null||t===false||typeof t=="string"&&t.trim()==="")}function un(e,t){let n={};for(let r of t){let o=e[r];typeof o=="function"&&(n[r]=o);}return n}var dn=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 j=null;function pn(){return j}function fn(e){j&&j.addPending(e);}var mn=B$1(e=>{let t=l(false),n$1=[],r={addPending(s){n$1.push(s);},isResolved:()=>t()},o=j;j=r;let i;try{i=e.children();}finally{j=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 gn(){return N}function X(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 yn(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 hn(){if(!N||!L)return null;let e=L.nextNode();for(;e;){if(e instanceof Text)return e;e=L.nextNode();}return null}function Tn(e){let{target:t,component:n,props:r,rootMargin:o="200px"}=e;if(typeof IntersectionObserver>"u")return X({container:t,component:n,props:r});let i=false,s=new IntersectionObserver(a=>{for(let c of a)c.isIntersecting&&!i&&(s.disconnect(),X({container:t,component:n,props:r}));},{rootMargin:o});return s.observe(t),()=>{i=true,s.disconnect();}}var me="data-akash-hydrate";function vn(e=document.body){return Array.from(e.querySelectorAll(`[${me}]`))}function ge(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 ye(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 bn(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 wn=B$1(e=>{let t=e.props.name??"akash",n=ge(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),ye(o,n,e.props.duration).then(()=>{e.props.onAfterEnter?.(o);}));}return r}});function xn(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};
|
|
@@ -58,5 +58,5 @@ ${n.stackTrace}`);}}}function or(){return {enabled:I,activeCount:M.size,totalTra
|
|
|
58
58
|
animation-name: ${o};
|
|
59
59
|
}
|
|
60
60
|
`),i}function yo(e,t){e.style.viewTransitionName=t;}function ho(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 To(e){return Array.isArray(e)?e.join(","):typeof e=="boolean"?e?"true":"false":String(e)}function vo(e,t){return typeof t=="number"?Number(e):typeof t=="boolean"?e==="true"||e==="1":Array.isArray(t)?e?e.split(","):[]:e}function q(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function bo(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,Le=false;function wo(){Le||typeof window>"u"||(Le=true,window.addEventListener("popstate",()=>{let e=q();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 De(e,t,n={}){let{serialize:r=m=>To(m),deserialize:o=m=>vo(m,t),history:i="replace",debounce:s=0,removeDefault:a=true}=n,l$1=q().get(e),d=l$1!==null?o(l$1):t,u=l(d);K.set(e,{signal:u,deserialize:o,defaultValue:t}),wo();let f=null,p=false,y=u.set;u.set=m=>{if(y(m),p);let h=()=>{let b=q();a&&m===t?b.delete(e):b.set(e,r(m)),bo(b,i);};s>0?(f&&clearTimeout(f),f=setTimeout(h,s)):h();};u.update;return u.update=m=>{u.set(m(u()));},u}function xo(e,t){let n={};for(let[r,o]of Object.entries(e))n[r]=De(r,o.default,{serialize:o.serialize,deserialize:o.deserialize,history:t?.history});return n}function So(){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 Eo(){let e=q(),t={};return e.forEach((n,r)=>{t[r]=n;}),t}function ko(e){K.delete(e);}function Co(){K.clear();}var Me={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 Po(e,t,n){return typeof e=="number"&&typeof t=="number"?e+(t-e)*n:n<.5?e:t}function Ao(e,t={}){let{duration:n=400,easing:r=Me.cubicOut,interpolate:o=Po,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&&(cancelAnimationFrame(c),l$1=false),new Promise(b=>{let k=performance.now()+m;l$1=true;function v(x){if(!l$1){b();return}let C=x-k;if(C<0){c=requestAnimationFrame(v);return}let A=Math.min(C/p,1),R=y(A);s.set(T(h,u,R)),A<1?c=requestAnimationFrame(v):(l$1=false,b());}c=requestAnimationFrame(v);}))},d.setImmediate=u=>{l$1&&(cancelAnimationFrame(c),l$1=false),s.set(u),a.set(u);},d.target=()=>a(),d}function Ie(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,x=b.top-k.top,C=b.width/(k.width||1),A=b.height/(k.height||1);if(Math.abs(v)<.5&&Math.abs(x)<.5&&Math.abs(C-1)<.01&&Math.abs(A-1)<.01)continue;let R=m.animate([{transform:`translate(${v}px, ${x}px) scale(${C}, ${A})`},{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 Ro(e,t,n){return Ie(e,n).flip(t)}var Oo=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 Lo(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 He(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 Do(e,t,n,r={}){let o=He(n,r),i={once:r.once,capture:r.capture,passive:r.passive};return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function Mo(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 Io(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 Ho(){return l(null)}function jo(e){return l(null)}function Fo(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 je(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])=>je(e,r,o));return ()=>n.forEach(r=>r())}function Fe(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 No(e,t){let n=Object.entries(t).map(([r,o])=>Fe(e,r,o));return ()=>n.forEach(r=>r())}function $o(e){return e}function Ko(...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 Vo(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 Wo(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 oe(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)=>!Bo(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 zo(e,t){return oe(e,t,{once:true})}function qo(e,t,n){return oe(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 Bo(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 Ne=Symbol("deepSignal"),Uo=Symbol("deepRaw");function Go(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===Ne)return t;if(c===Uo)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 Jo(e){return e.$raw??e}function Qo(e){if(e===null||typeof e!="object")return false;try{return e[Ne]!==void 0}catch{return false}}function $e(){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 ie=null;function Yo(){return ie||(ie=$e()),ie}var Xo=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"]),Zo=new Set(["alt","class","dir","href","id","lang","name","rel","src","style","tabindex","target","title","type","width","height","colspan","rowspan","scope","loading","decoding"]),ei=/^(javascript|data|vbscript):/i,ti=/^on/i;function Ve(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([...Xo,...n]),d=new Set([...Zo,...r]);s||d.delete("style");let u=new DOMParser().parseFromString(e,"text/html");return We(u.body,l,d,o,i,a,c),u.body.innerHTML}function We(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(ti.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")&&ei.test(T)){l.removeAttribute(p.name);continue}}}We(l,t,n,r,o,i,s);}}function ni(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ri(e,t){return n=>{e.innerHTML=Ve(n,t);}}function ze(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 qe(e={}){return e.reportOnly?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function oi(e={}){let t={};if(e.csp!==false){let n=e.csp??{};t[qe(n)]=ze(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 Be(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];Ke(s)&&Ke(i)?e[o]=Be({...i},s):e[o]=s;}return e}function Ue(e){if(e===null||typeof e!="object")return e;Object.freeze(e);for(let t of Object.values(e))typeof t=="object"&&t!==null&&Ue(t);return e}function Ke(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}async function ii(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 Ge(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function si(e={}){let{headerName:t="X-CSRF-Token",cookieName:n="csrf-token",tokenGenerator:r=Ge}=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 ai(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 ci(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 se=new Set,Je=true,ae=null;function li(e){Je=e;}function ui(e){ae=e;}function di(){se.clear();}function pi(e,t){let n=((...r)=>(Qe(t),e(...r)));return Object.keys(e).forEach(r=>{n[r]=e[r];}),n.__deprecated=t,n}function fi(e,t){return Qe(t),e}function Qe(e){if(!Je||se.has(e.name))return;se.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
|
-
`);ae?ae(n):typeof console<"u"&&console.warn(n);}var B=new Map;function mi(e){B.set(e.name,e);}function Ye(){return Array.from(B.values())}function gi(e){return Ye().filter(t=>t.stability===e)}function yi(e){return B.get(e)?.stability==="deprecated"}function hi(e){return B.get(e)?.deprecation??null}function Ti(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 vi=new Map,bi=new Map;function U(e){let n=d()
|
|
61
|
+
`);ae?ae(n):typeof console<"u"&&console.warn(n);}var B=new Map;function mi(e){B.set(e.name,e);}function Ye(){return Array.from(B.values())}function gi(e){return Ye().filter(t=>t.stability===e)}function yi(e){return B.get(e)?.stability==="deprecated"}function hi(e){return B.get(e)?.deprecation??null}function Ti(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 vi=new Map,bi=new Map;function U(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 ce=new Map,le=new Map;function wi(){return {stores(){return Object.keys(d())},store(e){return U(e)},storeSnapshots(){let e={};for(let t of Object.keys(d())){let n=U(t);n&&(e[t]=n);}return e},signals(){return [...vi.values()].map(e=>({name:e.name,value:e.read(),subscribers:e.subscriberCount}))},effects(){return [...bi.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=U(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=U(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}});});ce.set(e,n),le.set(e,r),console.log(`\u23FA Recording store "${e}". Call __AKASH_DEVTOOLS__.stopRecording("${e}") to view history.`);},stopRecording(e){let t=le.get(e);t&&t(),le.delete(e);let n=ce.get(e)??[];return ce.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 xi(){let e=wi();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{Oo as Await,dn as ErrorBoundary,me as HYDRATE_ATTR,fr as Image,Wn as Portal,mn as Suspense,Zr as Switch,wn as Transition,Gn as VirtualFor,_r as applyDirective,yr as applyStyles,yo as assignTransitionName,Lo as awaitSignal,je as bindClass,_o as bindClasses,Mo as bindDimensions,Ho as bindElement,jo as bindGroup,Fo as bindGroupItem,Io as bindScroll,Fe as bindStyle,No as bindStyles,te as calculateRange,Cr as capitalize,xr as chain,Ti as checkCompatibility,be as checkForLeaks,yn as claimElement,hn as claimText,io as clearProviders,So as clearQueryState,Sn as collectSSRHead,Qn as countOps,Cn as createApp,si as createCSRFInterceptor,hr as createDataTable,$e as createEventBus,Ie as createFlip,Re as createInjector,ci as createRateLimiter,ri as createSafeHTML,un as createSlots,qn as createToaster,gr as css,Lr as currency,we as cx,Or as date,Ue as deepFreeze,Go as deepSignal,so as defer,Jn as defineAsyncComponent,Br as defineCustomElement,H as defineDirective,Vo as defineFormAction,Sr as definePipe,kn as definePlugin,no as defineProvider,$o as defineSnippet,pi as deprecated,fi as deprecatedValue,Fr as directiveFromFn,Xn as disableLeakDetection,Qr as discoverStaticRoutes,Me as easings,Yn as enableLeakDetection,Wo as enableSnapshots,ye as enterTransition,ni as escapeHtml,bn as exitTransition,vn as findHydrationBoundaries,Ro as flip,ze as generateCSP,Ge as generateCSRFToken,Yr as generatePaths,ii as generateSRI,oi as generateSecurityHeaders,br as generateSitemap,xn as generateTransitionCSS,gi as getAPIsByStability,nr as getActiveEffects,qe as getCSPHeaderName,hi as getDeprecationInfo,or as getLeakDetectionStats,Eo as getQueryParams,Ye as getRegisteredAPIs,pn as getSuspenseContext,ge as getTransitionClasses,Yo as globalEventBus,ln as hasSlot,X as hydrate,oo as injectProvider,Ko as inspect,xi as installDevtools,Qo as isDeepSignal,yi as isDeprecated,gn as isHydrationActive,Zn as isLeakDetectionEnabled,Ir as json,he as longestIncreasingSubsequence,kr as lowercase,eo as match,Dr as number,Do as onEvent,Mr as percent,wr as pipe,Hr as plural,Jr as prerender,Tn as progressiveHydrate,Te as reconcileKeys,mi as registerAPI,fn as registerPending,jr as relativeTime,$r as removeDirectives,ko as removeQueryState,En as renderHeadToString,cn as renderSlot,Pe as renderSwitch,rr as reportLeaks,di as resetDeprecationWarnings,Co as resetQueryState,Be as safeMerge,Ve as sanitize,ai as sanitizeURL,li as setDeprecationWarnings,ui as setWarningHandler,Xr as sitemapFromResults,mo as startViewTransition,Oe as supportsViewTransitions,Pr as titleCase,Ur as toCustomElement,Jo as toRaw,er as trackEffect,Ar as trim,Rr as truncate,Ao as tweened,tr as untrackEffect,Nr as updateDirective,Er as uppercase,Ce as urlToFilePath,lr as useAnnounce,jn as useBreakpoint,Vn as useClickOutside,_n as useClipboard,Ln as useCounter,Rn as useDebounce,ar as useFocusTrap,$n as useGeolocation,F as useHead,mr as useInfiniteScroll,Pn as useInterval,ur as useKeyboard,In as useMediaQuery,Nn as useOnline,Ee as useOpenGraph,Mn as usePrevious,De as useQueryState,xo as useQueryStates,vr as useSEO,Fn as useStorage,Se as useStructuredData,Bn as useTheme,On as useThrottle,An as useTimeout,Dn as useToggle,ke as useTwitterCard,Un as useVirtualList,Kn as useWindowSize,Kr as vAutoFocus,Vr as vClickOutside,zr as vIntersect,Wr as vLongPress,qr as vResize,go as viewTransitionCSS,oe as watch,qo as watchDebounced,zo as watchOnce,He as withModifiers};//# sourceMappingURL=index.js.map
|
|
62
62
|
//# sourceMappingURL=index.js.map
|