@stacksjs/stx 0.2.567 → 0.2.571
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-01mxer9s.js +2 -0
- package/dist/chunk-09gtbb1w.js +2 -0
- package/dist/{chunk-8cpqy9ea.js → chunk-0bt0fbs1.js} +61 -61
- package/dist/{chunk-z06npyzn.js → chunk-0dz1b6a1.js} +3 -3
- package/dist/{chunk-203rr1c8.js → chunk-0g2ybnht.js} +2 -2
- package/dist/{chunk-wsdn5fxe.js → chunk-0q6n3by0.js} +3 -3
- package/dist/chunk-15erabm6.js +2 -0
- package/dist/chunk-194qgkc9.js +2 -0
- package/dist/{chunk-wy4hfmjs.js → chunk-1dg5qxg9.js} +5 -5
- package/dist/{chunk-rgage0vm.js → chunk-1edvsndv.js} +2 -2
- package/dist/{chunk-g1epk002.js → chunk-1n64749x.js} +3 -3
- package/dist/chunk-1z6c6dyk.js +2 -0
- package/dist/{chunk-36aj0yzt.js → chunk-232jswfm.js} +1 -1
- package/dist/chunk-279jv0yf.js +2 -0
- package/dist/chunk-2a1q5y6r.js +2 -0
- package/dist/{chunk-xfpfs9zq.js → chunk-2ads8rw5.js} +2 -2
- package/dist/chunk-2cqbyb8w.js +2 -0
- package/dist/{chunk-9ya4tdpz.js → chunk-2crxkm7j.js} +3 -3
- package/dist/{chunk-6sf4v894.js → chunk-2jjff8kv.js} +5 -5
- package/dist/chunk-2jsnrfc8.js +2 -0
- package/dist/{chunk-ffxwsa94.js → chunk-2z0trbbm.js} +2 -2
- package/dist/{chunk-mt8sew7a.js → chunk-36agnyhe.js} +10 -10
- package/dist/chunk-3gft8zng.js +2 -0
- package/dist/chunk-49gwmcrn.js +2 -0
- package/dist/{chunk-5grx48s2.js → chunk-4bgfpkwx.js} +3 -3
- package/dist/{chunk-tsmbstj6.js → chunk-4easd8da.js} +11 -11
- package/dist/chunk-4ssg5xpq.js +64 -0
- package/dist/chunk-4wfr074d.js +2 -0
- package/dist/{chunk-cbyh8fhn.js → chunk-58tz7tmf.js} +3 -3
- package/dist/chunk-5afw7z6v.js +2 -0
- package/dist/{chunk-7wyyjdks.js → chunk-5dmkkvs7.js} +2 -2
- package/dist/chunk-5fv4g4et.js +2 -0
- package/dist/{chunk-g8tx0yf8.js → chunk-5t1whxxt.js} +6 -6
- package/dist/{chunk-39tkfkp7.js → chunk-5vw8493b.js} +3 -3
- package/dist/chunk-604rs9sq.js +2 -0
- package/dist/chunk-636sfxyj.js +2 -0
- package/dist/chunk-6aq3sm83.js +2 -0
- package/dist/chunk-6f4qrd0s.js +2 -0
- package/dist/chunk-6va5pe2m.js +2 -0
- package/dist/{chunk-tfeenp4h.js → chunk-6wc2t6cd.js} +96 -79
- package/dist/{chunk-gjx5256r.js → chunk-707n4pbz.js} +5 -5
- package/dist/{chunk-5s555c1r.js → chunk-74xwzxwz.js} +3 -3
- package/dist/{chunk-01s01ten.js → chunk-79vdkvhf.js} +5 -5
- package/dist/{chunk-8nr1kras.js → chunk-7bwkeake.js} +6 -6
- package/dist/chunk-7kh4p06d.js +2 -0
- package/dist/{chunk-8cs45k3f.js → chunk-7t3ykgsm.js} +2 -2
- package/dist/chunk-7xrrzqh7.js +2 -0
- package/dist/{chunk-mb59b499.js → chunk-83fdt4yj.js} +6 -6
- package/dist/chunk-8jaw6exk.js +2 -0
- package/dist/chunk-8k61b4ae.js +2 -0
- package/dist/{chunk-tc01jkfc.js → chunk-9k7bq97t.js} +1 -1
- package/dist/chunk-9yar9rfq.js +2 -0
- package/dist/{chunk-jbmhdyzz.js → chunk-a6jq7hex.js} +3 -3
- package/dist/{chunk-7ze47qgv.js → chunk-anjm087t.js} +5 -5
- package/dist/chunk-asbq9cgs.js +2 -0
- package/dist/chunk-b2q8bk8p.js +3 -0
- package/dist/chunk-b7t8jejd.js +2 -0
- package/dist/chunk-b894fxfc.js +2 -0
- package/dist/{chunk-wwn9dh6p.js → chunk-b9r88ysg.js} +2 -2
- package/dist/{chunk-fpa1nq88.js → chunk-beqkrwt1.js} +2 -2
- package/dist/chunk-bm2q1srp.js +2 -0
- package/dist/{chunk-6vnnx536.js → chunk-bpdsdbvg.js} +2 -2
- package/dist/{chunk-2ernwctg.js → chunk-c4zpzxex.js} +6 -6
- package/dist/chunk-cgwyd9aq.js +2 -0
- package/dist/chunk-cvswrbzw.js +2 -0
- package/dist/{chunk-n6va14bt.js → chunk-cyg9w31a.js} +2 -2
- package/dist/chunk-d8206zbp.js +2 -0
- package/dist/chunk-dcpf6kas.js +15 -0
- package/dist/chunk-ensp20xk.js +2 -0
- package/dist/chunk-f10299sf.js +2 -0
- package/dist/chunk-f1apaqfk.js +2 -0
- package/dist/chunk-f4jh9vrj.js +2834 -0
- package/dist/{chunk-3hkv4e7t.js → chunk-g66m3g2r.js} +1 -1
- package/dist/chunk-g6zeqvvb.js +2 -0
- package/dist/chunk-ghy82tsc.js +2 -0
- package/dist/{chunk-c765y72x.js → chunk-gzgc8zk5.js} +4 -4
- package/dist/{chunk-9tcvkbb5.js → chunk-h4k3hyny.js} +2 -2
- package/dist/chunk-jqefcghh.js +31 -0
- package/dist/chunk-jw33eys8.js +2 -0
- package/dist/chunk-jwvzvapp.js +11 -0
- package/dist/{chunk-b76jbdtk.js → chunk-jze68d0z.js} +2 -2
- package/dist/chunk-k6wgh598.js +2 -0
- package/dist/{chunk-7m0r2qs2.js → chunk-k7ht6tqe.js} +2 -2
- package/dist/{chunk-q94wdmdp.js → chunk-kgj852hx.js} +4 -4
- package/dist/{chunk-325p135t.js → chunk-kzjrgh0b.js} +10 -10
- package/dist/chunk-m2a1fxpb.js +2 -0
- package/dist/chunk-m6mxqepz.js +2 -0
- package/dist/chunk-mbmbaj0m.js +2 -0
- package/dist/{chunk-kch9a9v1.js → chunk-mr9c2ej6.js} +2 -2
- package/dist/chunk-mzqyv7s5.js +33 -0
- package/dist/chunk-n61v7e3s.js +2 -0
- package/dist/chunk-n6qp05t9.js +2 -0
- package/dist/chunk-nn174xjh.js +2 -0
- package/dist/chunk-ntgy4e1q.js +2 -0
- package/dist/chunk-nw4axkpx.js +2 -0
- package/dist/chunk-p5chk3s9.js +2 -0
- package/dist/{chunk-ev3qnr9q.js → chunk-phzs239m.js} +4 -4
- package/dist/{chunk-8afnq4qx.js → chunk-pnag11c4.js} +3 -3
- package/dist/{chunk-ss78553t.js → chunk-pqcvh9pp.js} +1 -1
- package/dist/{chunk-k2dgwy05.js → chunk-pveafhzg.js} +2 -2
- package/dist/chunk-pw9verqx.js +2 -0
- package/dist/{chunk-68b64sj4.js → chunk-q79kmad5.js} +1 -1
- package/dist/chunk-q83w8edy.js +3 -0
- package/dist/{chunk-s1xxkzc9.js → chunk-qcymqscj.js} +5 -5
- package/dist/{chunk-saf7kypg.js → chunk-qt3x1sh3.js} +3 -3
- package/dist/chunk-qx6tr8mr.js +2 -0
- package/dist/{chunk-55hfvmvv.js → chunk-qzbzn1yf.js} +23 -23
- package/dist/{chunk-f46a7pvn.js → chunk-r4w1cye7.js} +2 -2
- package/dist/{chunk-ghnkphy4.js → chunk-rfnr4xz6.js} +2 -2
- package/dist/{chunk-8txqk9nq.js → chunk-rrj5m9xv.js} +2 -2
- package/dist/{chunk-d4ybwtqt.js → chunk-s12b57m9.js} +2 -2
- package/dist/chunk-s6sf70ty.js +2 -0
- package/dist/{chunk-1hrj0t0j.js → chunk-sfwprq8q.js} +10 -10
- package/dist/chunk-ta8bhz27.js +2 -0
- package/dist/chunk-tc5r2vmw.js +2 -0
- package/dist/chunk-ts80ktq7.js +2 -0
- package/dist/{chunk-dmf1jmge.js → chunk-tv784gv0.js} +4 -4
- package/dist/{chunk-4zb2ga7p.js → chunk-vp31ff54.js} +2 -2
- package/dist/{chunk-125rc958.js → chunk-vr36s2en.js} +2 -2
- package/dist/chunk-vyg8bvkt.js +2 -0
- package/dist/{chunk-m6m19hwd.js → chunk-wwhxgvr8.js} +4 -4
- package/dist/{chunk-pzasxhwz.js → chunk-xckzvbvn.js} +1 -1
- package/dist/chunk-xq2ck69k.js +2 -0
- package/dist/chunk-y4ajd836.js +2 -0
- package/dist/{chunk-m8qgr307.js → chunk-ydx3mfpp.js} +7 -7
- package/dist/{chunk-n1xcmhjw.js → chunk-yk3wh2xv.js} +3 -3
- package/dist/{chunk-18270qgd.js → chunk-ymawe0y5.js} +2 -2
- package/dist/{chunk-jra9r8fq.js → chunk-zd01r00t.js} +1 -1
- package/dist/chunk-zddzjd60.js +2 -0
- package/dist/chunk-zgxj1q7w.js +2 -0
- package/dist/chunk-zs7qhh40.js +2 -0
- package/dist/{chunk-wm11csdm.js → chunk-zyk12484.js} +2 -2
- package/dist/cli.js +20 -20
- package/dist/client/signals-helpers-runtime.d.ts +1 -1
- package/dist/client/signals-helpers-runtime.js +1 -8
- package/dist/client/signals-notify-runtime.d.ts +2 -0
- package/dist/client/signals-notify-runtime.js +26 -0
- package/dist/client/signals-process-element-runtime.js +8 -4
- package/dist/client/signals-reactive-core-bootstrap-runtime.js +2 -0
- package/dist/client/signals-state-runtime.d.ts +1 -1
- package/dist/client/signals-state-runtime.js +12 -18
- package/dist/client-script-bundler.js +1 -1
- package/dist/composable-loader.js +3 -2
- package/dist/config.d.ts +16 -0
- package/dist/config.js +12 -3
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/env.d.ts +16 -0
- package/dist/env.js +12 -0
- package/dist/native/compiler/bundle.d.ts +2 -0
- package/dist/native/compiler/bundle.js +40 -11
- package/dist/process.js +3 -3
- package/dist/pwa.js +3 -3
- package/dist/reactive-tracking.d.ts +17 -0
- package/dist/reactive-tracking.js +23 -0
- package/dist/reactivity.js +3 -11
- package/dist/signals-api.js +13 -11
- package/dist/signals-notify-runtime.d.ts +2 -0
- package/dist/ssg.js +8 -8
- package/dist/store-loader.js +4 -3
- package/package.json +5 -5
- package/dist/chunk-04qvjcsr.js +0 -2
- package/dist/chunk-2xbrrc5a.js +0 -2
- package/dist/chunk-2yypassp.js +0 -2
- package/dist/chunk-375skn32.js +0 -2
- package/dist/chunk-3wyxe996.js +0 -2
- package/dist/chunk-4mmdpb46.js +0 -2
- package/dist/chunk-4q5d5r7s.js +0 -2
- package/dist/chunk-5ytg0wbc.js +0 -2
- package/dist/chunk-6qyters0.js +0 -2
- package/dist/chunk-6yn90mq9.js +0 -2
- package/dist/chunk-7d2vyre0.js +0 -2
- package/dist/chunk-7pewegtw.js +0 -2
- package/dist/chunk-7w0qa3n0.js +0 -2
- package/dist/chunk-8d788kvt.js +0 -2
- package/dist/chunk-90qywh24.js +0 -31
- package/dist/chunk-bdhtq3vs.js +0 -2
- package/dist/chunk-brnapchc.js +0 -2
- package/dist/chunk-c78327kx.js +0 -2
- package/dist/chunk-d19w3e4x.js +0 -2
- package/dist/chunk-d1mqedk0.js +0 -33
- package/dist/chunk-da649d3k.js +0 -2
- package/dist/chunk-da9avgd9.js +0 -2
- package/dist/chunk-dkyjw3hc.js +0 -3
- package/dist/chunk-e3njkecx.js +0 -2
- package/dist/chunk-efzc1nw8.js +0 -2
- package/dist/chunk-fm4w1r9e.js +0 -2
- package/dist/chunk-gan95hj0.js +0 -2
- package/dist/chunk-hg7amzgz.js +0 -2
- package/dist/chunk-hmk7z0z6.js +0 -2
- package/dist/chunk-hn105xy3.js +0 -2
- package/dist/chunk-jq079mrx.js +0 -2
- package/dist/chunk-jr149mmp.js +0 -2
- package/dist/chunk-k50k9zbw.js +0 -2
- package/dist/chunk-kwxy0e3r.js +0 -2
- package/dist/chunk-kza3nxr0.js +0 -2
- package/dist/chunk-m9cmc6np.js +0 -2
- package/dist/chunk-m9r4x7e6.js +0 -2
- package/dist/chunk-mahv855w.js +0 -2
- package/dist/chunk-mbwdn96z.js +0 -2
- package/dist/chunk-mdxg95mq.js +0 -2
- package/dist/chunk-mm1vvk49.js +0 -15
- package/dist/chunk-mqje968d.js +0 -2
- package/dist/chunk-n2g9mj2h.js +0 -2
- package/dist/chunk-n2nha538.js +0 -2
- package/dist/chunk-nebw444s.js +0 -2
- package/dist/chunk-ngcjy2dj.js +0 -63
- package/dist/chunk-nm0y4qjg.js +0 -11
- package/dist/chunk-nmt7kw0e.js +0 -2
- package/dist/chunk-pq8mz4ma.js +0 -2
- package/dist/chunk-pxcmv1xz.js +0 -2
- package/dist/chunk-pxes1ft6.js +0 -2
- package/dist/chunk-qajc13zq.js +0 -2
- package/dist/chunk-qtnqmw1n.js +0 -2
- package/dist/chunk-r3zdgeah.js +0 -2
- package/dist/chunk-r5htacg5.js +0 -2
- package/dist/chunk-rf2rwddd.js +0 -2
- package/dist/chunk-s833fbvf.js +0 -2
- package/dist/chunk-sgvszh9s.js +0 -2
- package/dist/chunk-t5r3s1wj.js +0 -2
- package/dist/chunk-tjprg6kq.js +0 -2
- package/dist/chunk-v0dzrwg8.js +0 -2
- package/dist/chunk-vtz9empe.js +0 -2
- package/dist/chunk-wa6nzq5b.js +0 -2
- package/dist/chunk-xw8kzm6b.js +0 -2834
- package/dist/chunk-ymdy7b8z.js +0 -3
- package/dist/chunk-ytdzgctp.js +0 -2
- package/dist/chunk-z2n1rtj5.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Wi,qi,Gi}from"./chunk-k7ht6tqe.js";import{W,Ln,Yt,Ur,Vr,jn,Zt,Qt,Wr,Bn}from"./chunk-b2q8bk8p.js";function K(t,s,i,a,c){let y=!0,h=new Set,f=(l)=>a.get?a.get(l):l,d=()=>f(t());return Object.defineProperty(d,"_isSignal",{value:!0}),Object.defineProperty(d,"modifiers",{get:s}),d.set=(l)=>{if(!y)return;let v=s(),g=a.set?a.set(l,v):l;if(v.trim&&typeof g==="string")g=g.trim();if(v.number&&typeof g==="string"&&g!==""){let n=Number(g);if(!Number.isNaN(n))g=n}if(Object.is(t(),g))return;t.set(g),i(g)},d.update=(l)=>d.set(l(d())),d.input=(l)=>{if(!s().lazy)d.set(l)},d.change=(l)=>{if(s().lazy)d.set(l)},d.subscribe=(l)=>{if(!y)return()=>{};let v=t.subscribe((g,n)=>l(f(g),f(n)));return h.add(v),()=>{v(),h.delete(v)}},Object.defineProperty(d,"value",{get:d,set:d.set}),c(()=>{y=!1,h.forEach((l)=>l()),h.clear()}),d}function z(t,s=!0,i){if(!s||!t||typeof window>"u")return;let a=window;if(!a.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let h=JSON.parse(y?.textContent||"{}");a.__STX_DATA__=h&&typeof h==="object"&&!Array.isArray(h)?h:{}}catch{a.__STX_DATA__={}}}let c=a.__STX_DATA__;if(c&&Object.prototype.hasOwnProperty.call(c,t))try{return{data:i?i(c[t]):c[t]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function X(t){if(typeof window>"u")return;let s=window;if(t===void 0)s.__STX_DATA__={};else{if(!s.__STX_DATA__)try{let i=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");s.__STX_DATA__=i&&typeof i==="object"&&!Array.isArray(i)?i:{}}catch{s.__STX_DATA__={}}if(s.__STX_DATA__)delete s.__STX_DATA__[t]}}function Q(t){let s=null;try{s=typeof indexedDB<"u"?indexedDB:null}catch{s=null}if(!s)return null;let i=s,a=t||"stx-kept",c=null,y=()=>{if(!c)c=new Promise((f,d)=>{let l=i.open(a,1);l.onupgradeneeded=()=>{l.result.createObjectStore("kv")},l.onsuccess=()=>f(l.result),l.onerror=()=>d(l.error),l.onblocked=()=>d(Error("blocked"))}),c.catch(()=>{c=null});return c},h=(f,d)=>y().then((l)=>new Promise((v,g)=>{let n=l.transaction("kv",f),o=d(n.objectStore("kv"));n.oncomplete=()=>v(o?o.result:void 0),n.onerror=()=>g(n.error),n.onabort=()=>g(n.error)}));return{get:(f)=>h("readonly",(d)=>d.get(f)),set:(f,d)=>h("readwrite",(l)=>{l.put(d,f)}),remove:(f)=>h("readwrite",(d)=>{d.delete(f)}),removePrefix:(f)=>h("readwrite",(d)=>{d.delete(IDBKeyRange.bound(f,`${f}\uFFFF`))})}}function Y(t,s){let i=t||{},a=null;if(i.storage!==void 0)a=i.storage;else try{a=typeof localStorage<"u"?localStorage:null}catch{a=null}let c=null,y=i.backend!==void 0;if(y)c=i.backend||null;let h=()=>{if(y)return c;y=!0;try{c=s?s():null}catch{c=null}if(c){let e=c;e.get("__stx_probe__").catch(()=>{if(c===e)c=null})}return c},f=i.limit||32768,d=i.defer||((e)=>{let r=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(r)r(e,{timeout:200});else setTimeout(e,16)}),l=new Map,v=new Set,g=new Map,n=!1,o=Promise.resolve(),m=(e)=>{try{return JSON.parse(e)}catch{return e}},p=(e,r)=>{if(!a)return!1;try{return a.setItem(e,r),!0}catch{return!1}},T=(e)=>{try{if(a)a.removeItem(e)}catch{}},k=()=>{if(n=!1,!g.size)return o;let e=Array.from(g.entries());return g.clear(),o=o.then(()=>Promise.all(e.map(([r,u])=>{if(!c){v.delete(r);try{p(r,JSON.stringify(u===void 0?null:u))}catch{}return}let x;try{return x={v:u},c.set(r,x).catch(()=>{let w;try{w=JSON.stringify(u)}catch{return}return c?c.set(r,{j:w}).catch(()=>{p(r,w)}):void 0})}catch{return}}))).then(()=>{}),o},C=(e,r)=>{if(g.set(e,r),v.add(e),n)return;n=!0,d(()=>{k()})},O=(e)=>{if(!e||typeof e!=="object")return;let r=e;if("v"in r)return{value:r.v};if(typeof r.j==="string")return{value:m(r.j)};return},E={peek(e){if(l.has(e))return{value:l.get(e)};let r=null;try{r=a?a.getItem(e):null}catch{r=null}if(r===null||r===void 0)return;let u=m(r);return l.set(e,u),{value:u}},load(e){let r=E.peek(e),u=r?null:h();if(r||!u)return Promise.resolve(r);return u.get(e).then((x)=>{if(l.has(e))return{value:l.get(e)};let w=O(x);if(w)l.set(e,w.value),v.add(e);return w},()=>{return})},set(e,r){if(l.set(e,r),c&&v.has(e)){C(e,r);return}let u;try{u=JSON.stringify(r===void 0?null:r)}catch{return}if(u.length<=f&&p(e,u))return;if(!h()){if(u.length>f)p(e,u);return}T(e),C(e,r)},forget(e){for(let u of Array.from(l.keys()))if(u.indexOf(e)===0)l.delete(u);for(let u of Array.from(g.keys()))if(u.indexOf(e)===0)g.delete(u);for(let u of Array.from(v))if(u.indexOf(e)===0)v.delete(u);try{if(a)for(let u=a.length-1;u>=0;u--){let x=a.key(u);if(x&&x.indexOf(e)===0)a.removeItem(x)}}catch{}let r=h();if(!r)return o;return o=o.then(()=>r.removePrefix(e)).catch(()=>{}),o},flush(){return k()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")k()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{k()})}catch{}return E}function J(t,s){if(!t)return!1;if(t===s.key)return!0;if(!s.url)return!1;if(t===s.url)return!0;try{let i=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",a=new URL(t,i),c=new URL(s.url,i);if(a.origin!==c.origin||a.pathname!==c.pathname)return!1;return!a.search||a.search===c.search}catch{return!1}}function Z(t){let s=t.prefix||"stx:kept:",i=t.matches||((n,o)=>n===o.key||n===o.url),a=new Set,c=new Map,y,h=(n)=>n===void 0?y:n,f=(n,o)=>{let m=h(o);if(m===!1||m===null||m==="")return null;return`${s}${m===void 0?"":`${m}:`}query:${n}`},d=(n)=>{let o=n&&n.value;if(!o||typeof o!=="object"||!("d"in o))return;return{data:o.d,at:Number(o.at)||0}},l=()=>{let n=globalThis;return n.__stx_outboxes instanceof Map?n.__stx_outboxes:null},v={setScope(n){y=n},scope:()=>y,keyFor:f,seed(n,o){let m=f(n,o);return m?d(t.kept.peek(m)):void 0},restore(n,o){let m=f(n,o);return m?t.kept.load(m).then(d):Promise.resolve(void 0)},persist(n,o,m){let p=f(n,m);if(p)t.kept.set(p,{d:o,at:Date.now()})},overlay(n,o,m){let p=l();if(!p||!p.size)return o;let T=o;return p.forEach((k)=>{try{T=k.overlay(n,T,m)}catch{}}),T},watch(n){return a.add(n),()=>{a.delete(n)}},cachedQuery(n,o){let m=c.get(n);if(m){if(o&&m.__options)m.__options(o);return m}let p=o||{},T=p.initial===void 0?null:p.initial,k=()=>typeof p.scope==="function"?p.scope():p.scope,C=()=>(typeof p.url==="function"?p.url():p.url)||null,O=()=>({key:n,url:C()}),E=k(),e=T,r=0,u=null,x=v.seed(n,E);if(x)e=x.data;let w=t.state(v.overlay(O(),e)),V=t.state(!1),U=t.state(!1),j=t.state(null),M=t.state(x?x.at:0),I=0,P=()=>{w.set(v.overlay(O(),e))},G=(b)=>{let _=I;v.restore(n,b).then((N)=>{if(!N||_!==I||r)return;e=N.data,M.set(N.at),P()})};if(!x)G(E);let vt=()=>{let b=k();if(b===E)return;E=b,I++,u=null,r=0;let _=v.seed(n,E);if(e=_?_.data:T,M.set(_?_.at:0),P(),!_)G(E)},yt=(b)=>{let _=C(),N=p.timeoutMs||15000,A=typeof AbortController<"u"?new AbortController:null,S=null,bt=new Promise((R,L)=>{S=setTimeout(()=>{if(A)A.abort();L(Error("The request took too long."))},N)}),B;if(p.load)B=p.load({force:b,url:_,signal:A?A.signal:void 0});else if(_){let R=p.fetch||((D,F)=>fetch(D,F)),L={method:"GET",headers:{Accept:"application/json"}};if(b)L.cache="no-cache";if(A)L.signal=A.signal;B=R(_,L).then((D)=>{if(!D.ok)return D.json().catch(()=>null).then((F)=>{throw Error(F&&(F.error||F.message)||`Request failed (${D.status})`)});return D.json()})}else return Promise.resolve(w());return Promise.race([B,bt]).then((R)=>{if(S)clearTimeout(S);return p.transform?p.transform(R):R},(R)=>{if(S)clearTimeout(S);throw R})},q=(b)=>{if(u)return u;let _=I;if(U.set(!0),r===0&&!M())V.set(!0);let N=()=>{if(_!==I)return;u=null,U.set(!1),V.set(!1)},A=yt(b).then((S)=>{if(_!==I)return w();return e=S,r=Date.now(),M.set(r),j.set(null),v.persist(n,S,E),P(),N(),w()},(S)=>{if(_===I)j.set(S&&S.message?S.message:"Could not load.");return N(),w()});return u=A,A},H={data:w,loading:V,isFetching:U,error:j,updatedAt:M,get key(){return n},load(b){if(vt(),!b&&r&&Date.now()-r<(p.staleTime||0))return Promise.resolve(w());return q(!!b)},refresh(){return H.load(!0)},set(b){e=typeof b==="function"?b(e):b,v.persist(n,e,E),P()},invalidate(){r=0},__options(b){p={...p,...b}}};if(a.add({target:O,updated:()=>{if(r||M())q(!1)},outbox:(b)=>{if(b)e=v.overlay(O(),e,b.id),r=0,q(!0);P()}}),c.set(n,H),p.immediate)H.load();return H}},g=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(t.listen!==!1&&g&&typeof g.addEventListener==="function")g.addEventListener("stx:updated",(n)=>{let o=n.detail||{};if(o.kind!=="api"||typeof o.url!=="string")return;a.forEach((m)=>{if(i(o.url,m.target()))m.updated()})}),g.addEventListener("stx:outbox",(n)=>{let o=n.detail||{},m=o.sent&&typeof o.sent.id==="string"?o.sent:null;a.forEach((p)=>{if(m){let T=Array.isArray(m.affects)?m.affects:[],k=p.target();if(!T.some((C)=>i(C,k)))return}p.outbox(m)})});return v}var ee=` function useColorMode(options) {
|
|
3
3
|
options = options || {};
|
|
4
4
|
// The pre-paint boot script (stacksjs/stx#1794) publishes the app's
|
|
5
5
|
// configured options here. Reading them makes a bare useColorMode() agree
|
|
@@ -3647,14 +3647,7 @@ catch (e) {
|
|
|
3647
3647
|
const depsMap = targetMap.get(target);
|
|
3648
3648
|
if (!depsMap) return;
|
|
3649
3649
|
const deps = depsMap.get(key);
|
|
3650
|
-
if (deps)
|
|
3651
|
-
if (isBatching) {
|
|
3652
|
-
deps.forEach(effect => pendingEffects.add(effect));
|
|
3653
|
-
}
|
|
3654
|
-
else {
|
|
3655
|
-
deps.forEach(effect => effect());
|
|
3656
|
-
}
|
|
3657
|
-
}
|
|
3650
|
+
if (deps) notifySubscribers(deps);
|
|
3658
3651
|
}
|
|
3659
3652
|
`;var Ce=` // \u2500\u2500 Host \u2500\u2500
|
|
3660
3653
|
//
|
|
@@ -6526,7 +6519,32 @@ finally {
|
|
|
6526
6519
|
reset: function() { data.set(null); error.set(null); loading.set(false); }
|
|
6527
6520
|
};
|
|
6528
6521
|
}
|
|
6529
|
-
`;
|
|
6522
|
+
`;var We=` // ==========================================================================
|
|
6523
|
+
// Notify
|
|
6524
|
+
// ==========================================================================
|
|
6525
|
+
|
|
6526
|
+
// Gather the effects a change reaches, walking through derived values.
|
|
6527
|
+
function collectSubscribers(subscribers, into) {
|
|
6528
|
+
subscribers.forEach(function(sub) {
|
|
6529
|
+
if (sub._stxCollect) sub._stxCollect(into);
|
|
6530
|
+
else into.add(sub);
|
|
6531
|
+
});
|
|
6532
|
+
}
|
|
6533
|
+
|
|
6534
|
+
// Two phases: mark every derived value on the way stale and gather the
|
|
6535
|
+
// effects reached, then run each once. Running them as found ran an effect
|
|
6536
|
+
// that reads a signal both directly and through a derived twice for one
|
|
6537
|
+
// change, the first time against the derived's old value.
|
|
6538
|
+
function notifySubscribers(subscribers) {
|
|
6539
|
+
if (isBatching) {
|
|
6540
|
+
collectSubscribers(subscribers, pendingEffects);
|
|
6541
|
+
return;
|
|
6542
|
+
}
|
|
6543
|
+
const reached = new Set();
|
|
6544
|
+
collectSubscribers(subscribers, reached);
|
|
6545
|
+
reached.forEach(function(e) { e(); });
|
|
6546
|
+
}
|
|
6547
|
+
`;function Xe(t,s,i){return`${t} // ==========================================================================
|
|
6530
6548
|
// Reactive Core
|
|
6531
6549
|
// ==========================================================================
|
|
6532
6550
|
|
|
@@ -6535,6 +6553,7 @@ ${s}
|
|
|
6535
6553
|
const effectStack = [];
|
|
6536
6554
|
const pendingEffects = new Set();
|
|
6537
6555
|
let isBatching = false;
|
|
6556
|
+
${We}
|
|
6538
6557
|
|
|
6539
6558
|
// DevTools Phase 2 (#1747): dev-mode reactivity instrumentation. OFF by
|
|
6540
6559
|
// default \u2014 even in the dev runtime \u2014 so set()/effect-run stay zero-overhead
|
|
@@ -6553,7 +6572,7 @@ ${s}
|
|
|
6553
6572
|
function __stxDevtoolsRecordQuery(rec) { if (!__stxDevtoolsTracking) return; __stxDevtoolsQueries.push(rec); if (__stxDevtoolsQueries.length > 100) __stxDevtoolsQueries.shift(); }
|
|
6554
6573
|
${i}
|
|
6555
6574
|
let activeDisposers = null; // Array | null \u2014 when non-null, effects auto-register their dispose fn
|
|
6556
|
-
const targetMap = new WeakMap();`}var
|
|
6575
|
+
const targetMap = new WeakMap();`}var Qe=` // Vue-compat aliases
|
|
6557
6576
|
var ref = state;
|
|
6558
6577
|
|
|
6559
6578
|
// reactive() used to be a bare alias of state(), which made it the most
|
|
@@ -6619,7 +6638,7 @@ ${i}
|
|
|
6619
6638
|
}
|
|
6620
6639
|
var computed = derived;
|
|
6621
6640
|
var watch = $watch;
|
|
6622
|
-
var watchEffect = function(fn) { return effect(fn); };`;var
|
|
6641
|
+
var watchEffect = function(fn) { return effect(fn); };`;var Ye=` // ==========================================================================
|
|
6623
6642
|
// Pipe Syntax Support (Feature #2)
|
|
6624
6643
|
// ==========================================================================
|
|
6625
6644
|
|
|
@@ -6795,7 +6814,7 @@ else {
|
|
|
6795
6814
|
|
|
6796
6815
|
return value;
|
|
6797
6816
|
}
|
|
6798
|
-
`;function
|
|
6817
|
+
`;function Je(t,s,i){return` // skipChildren: this element's bindings only, because something else already
|
|
6799
6818
|
// knows where the rest are. The manifest path passes it for every entry, so
|
|
6800
6819
|
// the tree is never walked; see processFromManifest.
|
|
6801
6820
|
function processElement(el, scope = componentScope, skipChildren) {
|
|
@@ -7403,8 +7422,12 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
|
|
|
7403
7422
|
var shorthandFn = parseEventShorthand(value, eventCapturedScope);
|
|
7404
7423
|
if (shorthandFn) { shorthandFn(handlerEvent); return; }
|
|
7405
7424
|
// Check if any scope values are signals (x-data pattern)
|
|
7425
|
+
// A derived value reads like a signal in a handler, as it does in a
|
|
7426
|
+
// binding: \`pick(selectedPackage)\` passes the package. Leaving it
|
|
7427
|
+
// out handed the handler the derived's getter function, so
|
|
7428
|
+
// \`selectedPackage.trainer_id\` was undefined with nothing said.
|
|
7406
7429
|
var hasSignals = Object.values(eventCapturedScope).some(function(v) {
|
|
7407
|
-
return v && typeof v === 'function' && v._isSignal;
|
|
7430
|
+
return v && typeof v === 'function' && (v._isSignal || v._isDerived);
|
|
7408
7431
|
});
|
|
7409
7432
|
// Only use signal read/write proxy for DIRECT assignment expressions
|
|
7410
7433
|
// like "count = count + 1" or "open = !open". Function calls like
|
|
@@ -7413,7 +7436,7 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
|
|
|
7413
7436
|
var isDirectAssignment = hasSignals && /^[a-zA-Z_$]\\w*\\s*=/.test(value.trim()) && !value.trim().startsWith('==');
|
|
7414
7437
|
if (isDirectAssignment) {
|
|
7415
7438
|
var getVars = Object.keys(eventCapturedScope).map(function(k) {
|
|
7416
|
-
return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && __s["' + k + '"]._isSignal ? __s["' + k + '"]() : __s["' + k + '"]';
|
|
7439
|
+
return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
|
|
7417
7440
|
}).join(';');
|
|
7418
7441
|
var setVars = Object.keys(eventCapturedScope).filter(function(k) {
|
|
7419
7442
|
var v = eventCapturedScope[k];
|
|
@@ -7439,11 +7462,11 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
|
|
|
7439
7462
|
// handler like \`pick(option.value)\` receives the whole item.
|
|
7440
7463
|
// It is not an error, so it lands silently: the wrong value is
|
|
7441
7464
|
// stored and only surfaces much later.
|
|
7442
|
-
if (v && typeof v === 'function' && v._isSignal && !v._isStxLoopItem
|
|
7465
|
+
if (v && typeof v === 'function' && ((v._isSignal && !v._isStxLoopItem) || v._isDerived)
|
|
7443
7466
|
&& (expressionCallsSignal(value, k) || expressionUsesSignalApi(value, k))) {
|
|
7444
7467
|
return 'var ' + k + ' = __s["' + k + '"]';
|
|
7445
7468
|
}
|
|
7446
|
-
return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && __s["' + k + '"]._isSignal ? __s["' + k + '"]() : __s["' + k + '"]';
|
|
7469
|
+
return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
|
|
7447
7470
|
}).join(';');
|
|
7448
7471
|
var fn3 = __stxCompile(['__s', '$event'], unwrapVars + ';' + value);
|
|
7449
7472
|
fn3(eventCapturedScope, handlerEvent);
|
|
@@ -7488,7 +7511,7 @@ catch (e) {
|
|
|
7488
7511
|
processElement(child, scope);
|
|
7489
7512
|
});
|
|
7490
7513
|
}
|
|
7491
|
-
}`}var
|
|
7514
|
+
}`}var Ze=` // ==========================================================================
|
|
7492
7515
|
// Auto-unwrap Signals (Feature #1)
|
|
7493
7516
|
// ==========================================================================
|
|
7494
7517
|
|
|
@@ -7565,7 +7588,7 @@ catch (e) {
|
|
|
7565
7588
|
},
|
|
7566
7589
|
});
|
|
7567
7590
|
}
|
|
7568
|
-
`;function
|
|
7591
|
+
`;function et(t){return` // Component mount system
|
|
7569
7592
|
var mountQueue = [];
|
|
7570
7593
|
|
|
7571
7594
|
// MERGE, never replace (#1804). Three client bundles assign window.stx and
|
|
@@ -7682,7 +7705,7 @@ ${t}
|
|
|
7682
7705
|
_scopes: {}, // Component-level scopes
|
|
7683
7706
|
_scopeCounter: 0, // Counter for generating unique scope IDs during SPA navigation
|
|
7684
7707
|
_latestSetup: window.__stx_latestSetup || null, // Latest SFC setup function (including scripts parsed before the runtime)
|
|
7685
|
-
_stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var
|
|
7708
|
+
_stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var tt=` // ==========================================================================
|
|
7686
7709
|
// Template Refs (useRef)
|
|
7687
7710
|
// ==========================================================================
|
|
7688
7711
|
|
|
@@ -7714,7 +7737,7 @@ ${t}
|
|
|
7714
7737
|
Object.defineProperty(read, 'value', { get: read, enumerable: true });
|
|
7715
7738
|
return read;
|
|
7716
7739
|
}
|
|
7717
|
-
`;var
|
|
7740
|
+
`;var nt=` // ==========================================================================
|
|
7718
7741
|
// Scope Disposal
|
|
7719
7742
|
// ==========================================================================
|
|
7720
7743
|
|
|
@@ -7908,7 +7931,7 @@ ${t}
|
|
|
7908
7931
|
delete scopes[id];
|
|
7909
7932
|
}
|
|
7910
7933
|
}
|
|
7911
|
-
`;var
|
|
7934
|
+
`;var rt=` // Helper to process elements while skipping already-processed scoped containers
|
|
7912
7935
|
function processElementSkipScopes(el, processedScopes) {
|
|
7913
7936
|
if (processedScopes.has(el)) return;
|
|
7914
7937
|
if (el.nodeType === Node.TEXT_NODE) {
|
|
@@ -7949,7 +7972,7 @@ ${t}
|
|
|
7949
7972
|
if (el.tagName !== 'SCRIPT' && el.tagName !== 'STYLE') {
|
|
7950
7973
|
Array.from(el.childNodes).forEach(child => processElementSkipScopes(child, processedScopes));
|
|
7951
7974
|
}
|
|
7952
|
-
}`;var
|
|
7975
|
+
}`;var ot=` function bindShow(el, expr, passedScope = componentScope, attrName = '@show') {
|
|
7953
7976
|
if (el.__stx_show_bound) return;
|
|
7954
7977
|
el.__stx_show_bound = true;
|
|
7955
7978
|
|
|
@@ -8002,7 +8025,7 @@ ${t}
|
|
|
8002
8025
|
}
|
|
8003
8026
|
el.removeAttribute(attrName);
|
|
8004
8027
|
}
|
|
8005
|
-
`;var
|
|
8028
|
+
`;var st=` // Re-initialize components after SPA content swap.
|
|
8006
8029
|
// Debounce to handle rapid re-fires (HMR triggers navigate which triggers stx:load again).
|
|
8007
8030
|
var _stxLoadTimer = null;
|
|
8008
8031
|
if (window.__stxLoadHandler) {
|
|
@@ -8043,7 +8066,7 @@ ${t}
|
|
|
8043
8066
|
var departingDestroys = null;
|
|
8044
8067
|
function beginSwap() {
|
|
8045
8068
|
departingDestroys = (departingDestroys || []).concat(destroyCallbacks.splice(0));
|
|
8046
|
-
}`;var
|
|
8069
|
+
}`;var at=` function _handleStxLoad() {
|
|
8047
8070
|
_stxLoadTimer = null;
|
|
8048
8071
|
console.log('[stx:load] START. mountQueue:', mountQueue.length, '_latestSetup:', !!window.stx._latestSetup);
|
|
8049
8072
|
|
|
@@ -8229,7 +8252,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
8229
8252
|
// Everything that should have hydrated has now had its chance (#1773).
|
|
8230
8253
|
auditHydration(container, 'stx:load');
|
|
8231
8254
|
}
|
|
8232
|
-
`;var
|
|
8255
|
+
`;var it=` // ==========================================================================
|
|
8233
8256
|
// State Signal
|
|
8234
8257
|
// ==========================================================================
|
|
8235
8258
|
|
|
@@ -8260,12 +8283,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
8260
8283
|
try { cb(value, prev); }
|
|
8261
8284
|
catch (e) { console.error('[stx] subscriber error:', e); }
|
|
8262
8285
|
});
|
|
8263
|
-
|
|
8264
|
-
effects.forEach(effect => pendingEffects.add(effect));
|
|
8265
|
-
}
|
|
8266
|
-
else {
|
|
8267
|
-
effects.forEach(effect => effect());
|
|
8268
|
-
}
|
|
8286
|
+
notifySubscribers(effects);
|
|
8269
8287
|
}
|
|
8270
8288
|
};
|
|
8271
8289
|
|
|
@@ -8277,12 +8295,7 @@ else {
|
|
|
8277
8295
|
try { cb(value, value); }
|
|
8278
8296
|
catch (e) { console.error('[stx] subscriber error:', e); }
|
|
8279
8297
|
});
|
|
8280
|
-
|
|
8281
|
-
effects.forEach(effect => pendingEffects.add(effect));
|
|
8282
|
-
}
|
|
8283
|
-
else {
|
|
8284
|
-
effects.forEach(effect => effect());
|
|
8285
|
-
}
|
|
8298
|
+
notifySubscribers(effects);
|
|
8286
8299
|
};
|
|
8287
8300
|
signal.subscribe = (cb) => {
|
|
8288
8301
|
subscribers.add(cb);
|
|
@@ -8312,15 +8325,19 @@ else {
|
|
|
8312
8325
|
let isDirty = true;
|
|
8313
8326
|
const effects = new Set();
|
|
8314
8327
|
|
|
8328
|
+
// Passes a change on to what read this value. A signal's notification
|
|
8329
|
+
// collects through it (_stxCollect) instead of calling it, so an effect
|
|
8330
|
+
// reached both directly and through here still runs once.
|
|
8315
8331
|
const markDirty = () => {
|
|
8316
8332
|
if (!isDirty) {
|
|
8317
8333
|
isDirty = true;
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8334
|
+
notifySubscribers(effects);
|
|
8335
|
+
}
|
|
8336
|
+
};
|
|
8337
|
+
markDirty._stxCollect = (into) => {
|
|
8338
|
+
if (!isDirty) {
|
|
8339
|
+
isDirty = true;
|
|
8340
|
+
collectSubscribers(effects, into);
|
|
8324
8341
|
}
|
|
8325
8342
|
};
|
|
8326
8343
|
|
|
@@ -8353,7 +8370,7 @@ finally {
|
|
|
8353
8370
|
|
|
8354
8371
|
return signal;
|
|
8355
8372
|
}
|
|
8356
|
-
`;var
|
|
8373
|
+
`;var lt=` // \u2500\u2500 Store System \u2500\u2500
|
|
8357
8374
|
// Pinia-inspired, signals-based. Stores survive SPA navigation.
|
|
8358
8375
|
|
|
8359
8376
|
defineStore: function(id, setupOrOptions, storeOptions) {
|
|
@@ -8813,7 +8830,7 @@ finally {
|
|
|
8813
8830
|
}
|
|
8814
8831
|
console.log('[stx:store] useStore:', id);
|
|
8815
8832
|
return store;
|
|
8816
|
-
},`;var
|
|
8833
|
+
},`;var ct=` // Storage access is guarded end to end (stacksjs/stx#1793). Every one of
|
|
8817
8834
|
// these can throw, and each throw took down the whole client script for the
|
|
8818
8835
|
// page rather than just the composable:
|
|
8819
8836
|
//
|
|
@@ -8891,7 +8908,7 @@ finally {
|
|
|
8891
8908
|
window.addEventListener('storage', handler);
|
|
8892
8909
|
onDestroy(function() { window.removeEventListener('storage', handler); });
|
|
8893
8910
|
return s;
|
|
8894
|
-
}`;var
|
|
8911
|
+
}`;var dt=` function bindStyle(el, expr, passedScope = componentScope, isVisible) {
|
|
8895
8912
|
// Capture scope at setup time - use passed scope to preserve context
|
|
8896
8913
|
const capturedScope = { ...globalHelpers, ...passedScope, ...(findElementScope(el) || {}) };
|
|
8897
8914
|
|
|
@@ -8925,7 +8942,7 @@ catch (e2) {
|
|
|
8925
8942
|
stxHost.setStyle(el, value);
|
|
8926
8943
|
});
|
|
8927
8944
|
}
|
|
8928
|
-
`;var
|
|
8945
|
+
`;var ut=` // <Suspense> boundary (#1742). Aggregates the loading/error state of every
|
|
8929
8946
|
// descendant suspense query (useQuery/useFetch with { suspense: true }) for
|
|
8930
8947
|
// which this is the nearest [data-stx-suspense] ancestor, and toggles three
|
|
8931
8948
|
// regions accordingly: [data-stx-suspense-fallback] while any query is loading,
|
|
@@ -8983,7 +9000,7 @@ catch (e2) {
|
|
|
8983
9000
|
var contentRoot = (contentEl === el) ? el : contentEl;
|
|
8984
9001
|
Array.from(contentRoot.childNodes).forEach(function(child) { processElement(child, scope); });
|
|
8985
9002
|
}
|
|
8986
|
-
`;var
|
|
9003
|
+
`;var pt=` // ==========================================================================
|
|
8987
9004
|
// Timer & Utility Composables
|
|
8988
9005
|
// ==========================================================================
|
|
8989
9006
|
|
|
@@ -9360,7 +9377,7 @@ else if (timer === null) {
|
|
|
9360
9377
|
}
|
|
9361
9378
|
};
|
|
9362
9379
|
}
|
|
9363
|
-
`;var
|
|
9380
|
+
`;var ht=` // \u2500\u2500 Tooltip runtime \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
9364
9381
|
(function() {
|
|
9365
9382
|
var tip = null;
|
|
9366
9383
|
function createTip() {
|
|
@@ -9399,7 +9416,7 @@ else if (timer === null) {
|
|
|
9399
9416
|
document.addEventListener('focusin', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) show(el); });
|
|
9400
9417
|
document.addEventListener('focusout', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) hide(); });
|
|
9401
9418
|
})();
|
|
9402
|
-
`;var
|
|
9419
|
+
`;var ft=` // ==========================================================================
|
|
9403
9420
|
// Toast notification system
|
|
9404
9421
|
// ==========================================================================
|
|
9405
9422
|
|
|
@@ -9604,7 +9621,7 @@ else if (timer === null) {
|
|
|
9604
9621
|
removeToast(tid);
|
|
9605
9622
|
}
|
|
9606
9623
|
}
|
|
9607
|
-
};`;var
|
|
9624
|
+
};`;var mt=` // \u2500\u2500 <TransitionGroup> support (#1742) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
9608
9625
|
// Class-driven enter/leave + FLIP move animations for keyed :for lists whose
|
|
9609
9626
|
// parent is a [data-stx-transition-group]. All helpers are self-contained and
|
|
9610
9627
|
// guarded (no-ops off the happy path), and every transition has a timeout
|
|
@@ -9695,7 +9712,7 @@ else if (timer === null) {
|
|
|
9695
9712
|
});
|
|
9696
9713
|
});
|
|
9697
9714
|
}
|
|
9698
|
-
`;var
|
|
9715
|
+
`;var gt=` // ==========================================================================
|
|
9699
9716
|
// WebSocket Composable
|
|
9700
9717
|
// ==========================================================================
|
|
9701
9718
|
|
|
@@ -9832,18 +9849,18 @@ else if (timer === null) {
|
|
|
9832
9849
|
subscribe: subscribe
|
|
9833
9850
|
};
|
|
9834
9851
|
}
|
|
9835
|
-
`;function Me(){let t=
|
|
9836
|
-
${
|
|
9852
|
+
`;function Me(){let t=wt(Jt());try{let i=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t);return i=i.replace(/\}(var |let |const |function )/g,"};$1"),i}catch{return t}}function wt(t){let s=[],i=0,a="console.log(";while(i<t.length){let c=t.indexOf(a,i);if(c===-1){s.push(t.slice(i));break}s.push(t.slice(i,c));let y=1,h=c+a.length;while(h<t.length&&y>0){let f=t[h];if(f==='"'||f==="'"||f==="`"){let d=f;h++;while(h<t.length&&t[h]!==d){if(t[h]==="\\")h++;h++}h++;continue}if(f==="(")y++;else if(f===")")y--;h++}s.push("0"),i=h}return s.join("")}function Jt(){return`${re}${Ce}
|
|
9853
|
+
${Xe(oe,we,xe)}
|
|
9837
9854
|
|
|
9838
9855
|
${Ne}
|
|
9839
|
-
${
|
|
9840
|
-
${
|
|
9841
|
-
${
|
|
9856
|
+
${Ze}
|
|
9857
|
+
${Ye}
|
|
9858
|
+
${it}
|
|
9842
9859
|
${ye}
|
|
9843
9860
|
${Fe}
|
|
9844
|
-
${
|
|
9845
|
-
${Se(
|
|
9846
|
-
${
|
|
9861
|
+
${gt}
|
|
9862
|
+
${Se(z.toString(),X.toString())}
|
|
9863
|
+
${tt}
|
|
9847
9864
|
${Ge}
|
|
9848
9865
|
${ze}
|
|
9849
9866
|
${Ke}
|
|
@@ -9859,14 +9876,14 @@ ${ne}
|
|
|
9859
9876
|
${ie}
|
|
9860
9877
|
${ue}
|
|
9861
9878
|
${je}
|
|
9862
|
-
${
|
|
9879
|
+
${Je(qi(),Gi(),Wi())}
|
|
9863
9880
|
|
|
9864
|
-
${
|
|
9865
|
-
${
|
|
9881
|
+
${ut}
|
|
9882
|
+
${ot}
|
|
9866
9883
|
${qe}
|
|
9867
9884
|
${se}
|
|
9868
|
-
${
|
|
9869
|
-
${
|
|
9885
|
+
${dt}
|
|
9886
|
+
${mt}
|
|
9870
9887
|
${He}
|
|
9871
9888
|
${le}
|
|
9872
9889
|
${Ue}
|
|
@@ -9876,26 +9893,26 @@ ${de}
|
|
|
9876
9893
|
${Oe}
|
|
9877
9894
|
${De}
|
|
9878
9895
|
${ae}
|
|
9879
|
-
${
|
|
9896
|
+
${pt}
|
|
9880
9897
|
${ee}
|
|
9881
|
-
${
|
|
9898
|
+
${Qe}
|
|
9882
9899
|
|
|
9883
|
-
${
|
|
9900
|
+
${ct}
|
|
9884
9901
|
|
|
9885
9902
|
${Pe(Y.toString(),Q.toString(),Z.toString(),J.toString())}
|
|
9886
9903
|
${he}
|
|
9887
|
-
${te(
|
|
9904
|
+
${te(K.toString())}
|
|
9888
9905
|
${Ae}
|
|
9889
|
-
${
|
|
9906
|
+
${ft}
|
|
9890
9907
|
|
|
9891
9908
|
${$e}
|
|
9892
9909
|
${fe}
|
|
9893
9910
|
${ve}
|
|
9894
|
-
${
|
|
9911
|
+
${ht}
|
|
9895
9912
|
${Ie}
|
|
9896
|
-
${
|
|
9913
|
+
${et(ce)}
|
|
9897
9914
|
|
|
9898
|
-
${
|
|
9915
|
+
${lt}
|
|
9899
9916
|
|
|
9900
9917
|
${Be}
|
|
9901
9918
|
});
|
|
@@ -9903,12 +9920,12 @@ ${Be}
|
|
|
9903
9920
|
${Ee}
|
|
9904
9921
|
${me}
|
|
9905
9922
|
${ge}
|
|
9906
|
-
${
|
|
9923
|
+
${nt}
|
|
9907
9924
|
${Re}
|
|
9908
9925
|
${pe}
|
|
9909
|
-
${ot}
|
|
9910
9926
|
${st}
|
|
9911
|
-
${
|
|
9927
|
+
${at}
|
|
9928
|
+
${rt}
|
|
9912
9929
|
})();
|
|
9913
|
-
`}var
|
|
9914
|
-
export{Me,Jt,
|
|
9930
|
+
`}var pd={state:W,derived:Ln,effect:Yt,batch:Ur,onMount:Vr,onDestroy:jn,isSignal:Zt,isDerived:Qt,untrack:Wr,peek:Bn,generateSignalsRuntime:Me,generateSignalsRuntimeDev:Jt};
|
|
9931
|
+
export{Me,Jt,pd};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function
|
|
2
|
+
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function Il(e,t={},n){let i=/@keepAlive(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@endkeepAlive/gi;return e.replace(i,(a,c,o)=>{let s=l(),r=u(c||"");return p(s,o.trim(),r)})}function u(e){let t={max:10},n=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,i;while((i=n.exec(e))!==null){let a=i[1],c=i[2]||i[3],o=i[4];switch(a){case"max":t.max=o?parseInt(o,10):10;break;case"include":t.include=c;break;case"exclude":t.exclude=c;break;case"id":t.id=c;break}}return t}function p(e,t,n){let{max:i,include:a,exclude:c}=n,o=n.id||e;return`
|
|
3
3
|
<div class="stx-keep-alive" data-keep-alive-id="${e}" data-custom-id="${o}">
|
|
4
4
|
<div class="stx-keep-alive-content" data-keep-alive-content="${e}">
|
|
5
5
|
${t}
|
|
@@ -286,7 +286,7 @@ else {
|
|
|
286
286
|
});
|
|
287
287
|
})();
|
|
288
288
|
</script>
|
|
289
|
-
`}function
|
|
289
|
+
`}function Ol(e={}){return{id:e.id||l(),cache:new Map,max:e.max||10,include:e.include?e.include.split(",").map((n)=>n.trim()):null,exclude:e.exclude?e.exclude.split(",").map((n)=>n.trim()):null}}function Dl(e,t){if(t.exclude&&t.exclude.includes(e))return!1;if(t.include&&!t.include.includes(e))return!1;return!0}function Ml(){return`
|
|
290
290
|
/* STX Keep-Alive Styles */
|
|
291
291
|
.stx-keep-alive {
|
|
292
292
|
position: relative;
|
|
@@ -311,7 +311,7 @@ else {
|
|
|
311
311
|
.stx-keep-alive-content > [data-activated] {
|
|
312
312
|
opacity: 1;
|
|
313
313
|
}
|
|
314
|
-
`}function
|
|
314
|
+
`}function Nl(){return`
|
|
315
315
|
// STX Keep-Alive Runtime
|
|
316
316
|
(function() {
|
|
317
317
|
if (typeof window === 'undefined') return;
|
|
@@ -347,5 +347,5 @@ else {
|
|
|
347
347
|
|
|
348
348
|
console.log('[stx] Keep-alive runtime initialized');
|
|
349
349
|
})();
|
|
350
|
-
`}function
|
|
351
|
-
export{
|
|
350
|
+
`}function Ll(e){if(typeof document<"u")document.addEventListener("stx:activated",(t)=>{e(t.detail)})}function jl(e){if(typeof document<"u")document.addEventListener("stx:deactivated",(t)=>{e(t.detail)})}
|
|
351
|
+
export{Il,Ol,Dl,Ml,Nl,Ll,jl};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n
|
|
2
|
+
function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=$i(t,n+2),n<t.length)n++;continue}n++}return t.length}function $i(t,i){let n=1,e=i,r="{",f="";while(e<t.length){let l=t[e];if(l==="\\"){e+=2;continue}if(l==='"'||l==="'"){e=o(t,e),r=h,f="";continue}if(l==="`"){e=b(t,e),r=h,f="";continue}if(l==="/"&&t[e+1]==="/"){while(e<t.length&&t[e]!==`
|
|
3
3
|
`)e++;continue}if(l==="/"&&t[e+1]==="*"){e+=2;while(e<t.length&&t.slice(e,e+2)!=="*/")e++;e+=2;continue}if(l==="/"&&a(r,f)){let u=w(t,e);if(u!==-1){e=u,r=h,f="";continue}}if(l==="{")n++;else if(l==="}"){if(n--,n===0)return e}if(/[\w$]/.test(l))f=/[\w$]/.test(r)?f+l:l,r=l;else if(!/\s/.test(l))r=l,f="";e++}return t.length}var m=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function a(t,i){if(i)return m.has(i);return!(t===")"||t==="]"||t===h)}var h="\x00";function w(t,i){let n=i+1,e=!1;while(n<t.length){let r=t[n];if(r===`
|
|
4
4
|
`)return-1;if(r==="\\"){n+=2;continue}if(r==="[")e=!0;else if(r==="]")e=!1;else if(r==="/"&&!e){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let i="",n=0,e="",r="";while(n<t.length){let f=t.slice(n,n+2);if(f==="//"){while(n<t.length&&t[n]!==`
|
|
5
5
|
`)i+=" ",n++;continue}if(f==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")i+=t[n]===`
|
|
6
6
|
`?`
|
|
7
7
|
`:" ",n++;i+=" ",n+=2;continue}let l=t[n];if(l==='"'||l==="'"){let u=l;i+=" ",n++;while(n<t.length&&t[n]!==u){if(t[n]==="\\"){i+=" ",n+=2;continue}i+=t[n]===`
|
|
8
8
|
`?`
|
|
9
|
-
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g
|
|
9
|
+
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=$i(t,u);if(i+=" ",i+=s(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
|
|
10
10
|
`?`
|
|
11
11
|
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(i+=l,n++,/[\w$]/.test(l))r=/[\w$]/.test(e)?r+l:l,e=l;else if(!/\s/.test(l))e=l,r=""}return i}function xe(t){let i=new Uint16Array(t.length),n=0,e=!0;for(let r=0;r<t.length;r++){let f=t[r];if(f===")"||f==="]"||f==="}")if(n===0)e=!1;else n--;if(i[r]=n,f==="("||f==="["||f==="{")n++}return{depths:i,balanced:e&&n===0}}
|
|
12
|
-
export{
|
|
12
|
+
export{$i,s,xe};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
`);if(!await Bun.file(o).exists()||await Bun.file(o).text()!==f)await Bun.write(o,f);return o}async function
|
|
4
|
-
`)}`);let p=e.outputs.find((c)=>c.kind==="entry-point");if(!p)throw Error(`No API bundle for ${t.filePath}`);if(e.outputs.length!==1)throw Error(`API endpoint ${t.filePath} emits assets; package those explicitly instead`);let n=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await p.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write(m.join(l,n),p),f.push({...t,filePath:n})}return f}function E(s,l){let o=s.map((i)=>({route:i,...
|
|
5
|
-
`));let c=n.outputs.find((d)=>d.kind==="entry-point");if(!c||n.outputs.length!==1)throw Error(`Unsupported API bundle output: ${u.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await c.text()).toString("base64")}`)).default})(f))}catch(t){return console.error("[stx] API discovery failed:",t),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function
|
|
6
|
-
export{St,
|
|
2
|
+
import{Z}from"./chunk-phzs239m.js";import{fe,C}from"./chunk-rfnr4xz6.js";import{Ri}from"./chunk-tv784gv0.js";import{a}from"./chunk-0g2ybnht.js";import v from"fs";import m from"path";import{pathToFileURL as I}from"url";var P=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],R=new Set;function St(s,l={}){let o=m.resolve(s,l.dir??"server/api"),i=[],f=new Map;if(!v.existsSync(o))return i;let t=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:o})).sort();for(let e of t){if(e.endsWith(".d.ts"))continue;let u=e.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),n=u.pop(),c=n.lastIndexOf("."),d=c>=0?n.slice(c+1):"get",g=d.toUpperCase();if(!P.includes(g)||d!==d.toLowerCase())throw Error(`Unsupported API method suffix in ${e}; use ${P.map((A)=>A.toLowerCase()).join(", ")}`);if(c>=0)n=n.slice(0,c);if(n!=="index")u.push(n);let r=new Set,h=u.map((A,j)=>{let y=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(A);if(y){if(r.has(y[2])||y[1]&&j!==u.length-1)throw Error(`Invalid API parameter in ${e}`);return r.add(y[2]),`:${y[2]}${y[1]?"*":""}`}if(!/^[\w-]+$/.test(A))throw Error(`Unsupported API path segment ${A} in ${e}`);return A}),w=`/api${h.length?`/${h.join("/")}`:""}`,S=`${g} ${w.replace(/:\w+/g,":param")}`;if(f.has(S))throw Error(`Ambiguous API route ${g} ${w}: ${f.get(S)} and ${e}`);f.set(S,e);let x=m.join(o,e);R.add(m.resolve(x)),R.add(v.realpathSync(x)),i.push({pattern:w,method:g,filePath:x})}return i.sort((e,p)=>{let u=e.pattern.split("/"),n=p.pattern.split("/"),c=(d)=>d?.endsWith("*")?0:d?.startsWith(":")?1:2;for(let d=0;d<Math.max(u.length,n.length);d++){let g=c(n[d])-c(u[d]);if(g)return g}return e.pattern.localeCompare(p.pattern)||e.method.localeCompare(p.method)})}async function Jr(s,l){let o=a(s,"api-types.d.ts"),i=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let t of l){let e=`./${m.relative(m.dirname(o),t.filePath).replace(/\\/g,"/")}`,{params:p}=Z(t.pattern);i.push(` ${JSON.stringify(`${t.method} ${t.pattern}`)}: { params: { ${p.map((u)=>`${JSON.stringify(u)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(e)}).default>> }`)}i.push(" }","}","export {}","");let f=i.join(`
|
|
3
|
+
`);if(!await Bun.file(o).exists()||await Bun.file(o).text()!==f)await Bun.write(o,f);return o}async function Yr(s,l,o={}){let i=St(s,o);await Jr(s,i);let f=[];for(let t of i){let e=await Bun.build({entrypoints:[t.filePath],target:"bun",format:"esm",minify:!1,splitting:!1});if(!e.success)throw Error(`API build failed for ${t.filePath}: ${e.logs.join(`
|
|
4
|
+
`)}`);let p=e.outputs.find((c)=>c.kind==="entry-point");if(!p)throw Error(`No API bundle for ${t.filePath}`);if(e.outputs.length!==1)throw Error(`API endpoint ${t.filePath} emits assets; package those explicitly instead`);let n=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await p.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write(m.join(l,n),p),f.push({...t,filePath:n})}return f}function E(s,l){let o=s.map((i)=>({route:i,...Z(i.pattern)}));return async(i)=>{let f=new URL(i.url).pathname,t=o.filter((r)=>r.regex.test(f));if(!t.length)return null;let e=t[0].route.pattern,p=(r)=>r.replace(/:\w+/g,":param"),u=t.filter((r)=>p(r.route.pattern)===p(e)),n=i.method,c=u.find((r)=>r.route.method===n)??(n==="HEAD"?u.find((r)=>r.route.method==="GET"):void 0);if(!c){let r=new Set(u.map((h)=>h.route.method));if(r.has("GET"))r.add("HEAD");return r.add("OPTIONS"),new Response(null,{status:n==="OPTIONS"?204:405,headers:{Allow:Array.from(r).sort().join(", ")}})}let d=c.regex.exec(f),g=Object.create(null);try{c.params.forEach((r,h)=>{g[r]=decodeURIComponent(d[h+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let r=await l(c.route);if(typeof r!=="function")throw Error(`API endpoint ${c.route.filePath} must default-export a handler`);let h=await r(i,{params:g}),w=h instanceof Response?h:h===void 0?new Response(null,{status:204}):Response.json(h);if(n==="HEAD")return new Response(null,{status:w.status,headers:w.headers});return w}catch(r){return console.error(`[stx] API error for ${n} ${e}:`,r),Response.json({error:"Internal Server Error"},{status:500})}}}function Zr(s,l){return E(l,async(o)=>(await import(I(m.resolve(s,o.filePath)).href)).default)}async function Nd(s,l){if(!l)return async()=>null;let o=l===!0?{}:l,i=St(s,o);return await Jr(s,i),async(f)=>{if(!new URL(f.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let t=St(s,o);await Jr(s,t);let{loadStxConfig:e}=await import("./chunk-zddzjd60.js"),p=C((await e(s)).runtimeConfig);return await fe(p,()=>E(t,async(u)=>{let n=await Bun.build({entrypoints:[u.filePath],target:"bun",format:"esm",splitting:!1});if(!n.success)throw Error(n.logs.join(`
|
|
5
|
+
`));let c=n.outputs.find((d)=>d.kind==="entry-point");if(!c||n.outputs.length!==1)throw Error(`Unsupported API bundle output: ${u.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await c.text()).toString("base64")}`)).default})(f))}catch(t){return console.error("[stx] API discovery failed:",t),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function Qr(s,l,o){if(Ri(s))return!0;let i=/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/;if(i.test(m.basename(s)))return!0;try{if(i.test(m.basename(v.realpathSync(s))))return!0}catch{}if(R.has(m.resolve(s)))return!0;if(!o)return!1;let f=m.resolve(l,typeof o==="object"?o.dir??"server/api":"server/api"),t=(p)=>{try{return v.realpathSync(p)}catch{return m.resolve(p)}},e=t(s);return[f,m.resolve(l,"server"),m.resolve(l,".output/server")].some((p)=>{let u=t(p);return e===u||e.startsWith(`${u}${m.sep}`)})}
|
|
6
|
+
export{St,Jr,Yr,Zr,Nd,Qr};
|
|
@@ -159,7 +159,7 @@ else {
|
|
|
159
159
|
stxIslands.initIslands();
|
|
160
160
|
}
|
|
161
161
|
})();
|
|
162
|
-
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function
|
|
162
|
+
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function Pa(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
|
|
163
163
|
<script data-hydrate="${e}">
|
|
164
164
|
(function() {
|
|
165
165
|
const island = document.querySelector('[data-island="${e}"]');
|
|
@@ -311,7 +311,7 @@ else {
|
|
|
311
311
|
});
|
|
312
312
|
})();
|
|
313
313
|
</script>
|
|
314
|
-
`}function
|
|
314
|
+
`}function Ia(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
|
|
315
315
|
`+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
|
|
316
316
|
<script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
|
|
317
317
|
<div data-island="${s}"
|
|
@@ -342,7 +342,7 @@ else {
|
|
|
342
342
|
}
|
|
343
343
|
})();
|
|
344
344
|
</script>
|
|
345
|
-
`})}function
|
|
345
|
+
`})}function Oa(){return`
|
|
346
346
|
/* Island base styles */
|
|
347
347
|
.stx-island {
|
|
348
348
|
display: contents;
|
|
@@ -383,9 +383,9 @@ else {
|
|
|
383
383
|
.stx-island.hydrated {
|
|
384
384
|
opacity: 1;
|
|
385
385
|
}
|
|
386
|
-
`}function
|
|
386
|
+
`}function Da(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function Ma(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function Na(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function La(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function ja(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function Ba(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Fa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
|
|
387
387
|
<script type="application/json" id="stx-island-manifest">
|
|
388
388
|
${JSON.stringify(t)}
|
|
389
389
|
</script>
|
|
390
|
-
`}var
|
|
391
|
-
export{
|
|
390
|
+
`}var Fl={processPartialHydrationDirectives:Ia,processStaticDirectives:Ba,generatePartialHydrationCSS:Oa,generateIslandManifest:Fa,createIslandRegistry:Pa,hydrateIsland:Da,hydrateByStrategy:Ma,hydrateAll:Na,isHydrated:La,onHydrated:ja};
|
|
391
|
+
export{Pa,Ia,Oa,Da,Ma,Na,La,ja,Ba,Fa,Fl};
|