@stacksjs/stx 0.2.753 → 0.2.755

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.
Files changed (222) hide show
  1. package/dist/{chunk-qeyjbnpn.js → chunk-024m1xmd.js} +6 -6
  2. package/dist/{chunk-1bk3t4s1.js → chunk-0dsykna3.js} +5 -5
  3. package/dist/{chunk-n3t2cd17.js → chunk-0dt7ax79.js} +2 -2
  4. package/dist/{chunk-qksbf2gt.js → chunk-0fweckq5.js} +6 -6
  5. package/dist/{chunk-yax8wz93.js → chunk-0md73jp8.js} +2 -2
  6. package/dist/{chunk-5hrm7rtx.js → chunk-0tgrqhkr.js} +12 -12
  7. package/dist/{chunk-p4h5c79q.js → chunk-0vvb78yj.js} +5 -5
  8. package/dist/{chunk-67z3kesf.js → chunk-1a2cwee1.js} +2 -2
  9. package/dist/chunk-1gan06yr.js +2 -0
  10. package/dist/chunk-1menbxwb.js +2 -0
  11. package/dist/chunk-1n2d3cy5.js +2 -0
  12. package/dist/{chunk-pnpd7gz7.js → chunk-1tmq09ch.js} +3 -3
  13. package/dist/{chunk-kyk4ekng.js → chunk-236bdf7y.js} +2 -2
  14. package/dist/chunk-2vc2pkyz.js +2 -0
  15. package/dist/chunk-33bp9m4c.js +2 -0
  16. package/dist/chunk-361yezje.js +2 -0
  17. package/dist/{chunk-7t9wj2m4.js → chunk-3ap06zzx.js} +1 -1
  18. package/dist/{chunk-c0v9ng82.js → chunk-3z38swhv.js} +7 -7
  19. package/dist/{chunk-02c0zcaw.js → chunk-41sq06t2.js} +2 -2
  20. package/dist/chunk-45cvagp1.js +2 -0
  21. package/dist/{chunk-9hfk5wf1.js → chunk-4fc8zs15.js} +5 -5
  22. package/dist/{chunk-jq6gggcz.js → chunk-4zta7ay1.js} +2 -2
  23. package/dist/{chunk-srjhnk6w.js → chunk-5evgz54v.js} +30 -30
  24. package/dist/chunk-5f0wwwmw.js +2 -0
  25. package/dist/chunk-5h71xbzk.js +2 -0
  26. package/dist/{chunk-8qhw7me1.js → chunk-5q2tfrcw.js} +2 -2
  27. package/dist/{chunk-3yz7fafy.js → chunk-5wcgg5t4.js} +1 -1
  28. package/dist/chunk-5z9a1vzw.js +2 -0
  29. package/dist/chunk-67jf2e8x.js +2 -0
  30. package/dist/chunk-6b7je8dc.js +2 -0
  31. package/dist/chunk-6fxjs3ay.js +3 -0
  32. package/dist/chunk-6n5jnd97.js +2 -0
  33. package/dist/chunk-6wvnfdqq.js +2 -0
  34. package/dist/{chunk-6z8rdsc6.js → chunk-6ywa41tr.js} +2 -2
  35. package/dist/{chunk-vzn029zn.js → chunk-73b6sst8.js} +3 -3
  36. package/dist/chunk-78jkbaz3.js +2 -0
  37. package/dist/{chunk-g7shwb6q.js → chunk-7djnbbeb.js} +6 -6
  38. package/dist/chunk-7e9hfrtb.js +2 -0
  39. package/dist/{chunk-fcp5mde5.js → chunk-7mm5mvg0.js} +2 -2
  40. package/dist/{chunk-g019qe9x.js → chunk-7r5vhqtz.js} +4 -4
  41. package/dist/chunk-7tc5fj96.js +2 -0
  42. package/dist/{chunk-myr79xxf.js → chunk-7ycf8a8d.js} +2 -2
  43. package/dist/{chunk-r3v1zaj0.js → chunk-81ysx0tc.js} +2 -2
  44. package/dist/chunk-82q0fy52.js +2 -0
  45. package/dist/chunk-8q5ec4s1.js +2 -0
  46. package/dist/{chunk-9d9rn9qs.js → chunk-8w0cwcvk.js} +81 -81
  47. package/dist/{chunk-80gbx1jn.js → chunk-8wbcy0cn.js} +3 -3
  48. package/dist/{chunk-k4yjbkgb.js → chunk-8wbgq43c.js} +3 -3
  49. package/dist/chunk-8ysk095d.js +2 -0
  50. package/dist/{chunk-hnzfzm0k.js → chunk-90gx5qxn.js} +4 -4
  51. package/dist/{chunk-h7y2pmd9.js → chunk-9q1kkfv1.js} +6 -6
  52. package/dist/{chunk-hc6m2t92.js → chunk-9r3ehqtx.js} +2 -2
  53. package/dist/chunk-9vbrj55v.js +2 -0
  54. package/dist/chunk-bcefawtc.js +2 -0
  55. package/dist/chunk-bd6s91p9.js +2 -0
  56. package/dist/chunk-bhkqzz91.js +2 -0
  57. package/dist/{chunk-tg8z1h11.js → chunk-bkkwdh13.js} +2 -2
  58. package/dist/chunk-bx1mjwhb.js +2 -0
  59. package/dist/{chunk-bd4c8af4.js → chunk-c3dphs36.js} +1 -1
  60. package/dist/{chunk-rt5as4t6.js → chunk-c85j39f7.js} +3 -3
  61. package/dist/{chunk-snfmgp7a.js → chunk-cb4ybh7g.js} +4 -4
  62. package/dist/{chunk-41yjah34.js → chunk-cmaxdd8d.js} +2 -2
  63. package/dist/{chunk-amwxbvdp.js → chunk-d2vsw1j7.js} +2 -2
  64. package/dist/{chunk-9b5k0fvr.js → chunk-d73hh5ar.js} +1 -1
  65. package/dist/{chunk-rzqd4t77.js → chunk-df8cbgf0.js} +2 -2
  66. package/dist/{chunk-8mkxge3a.js → chunk-dvakr9p9.js} +4 -4
  67. package/dist/chunk-dw0m259e.js +2 -0
  68. package/dist/chunk-dx4g2ec9.js +2 -0
  69. package/dist/chunk-evdskc25.js +2 -0
  70. package/dist/{chunk-neh3kewg.js → chunk-fa3ygt8c.js} +4 -4
  71. package/dist/{chunk-s20j5yns.js → chunk-fmxtnva8.js} +2 -2
  72. package/dist/{chunk-k7p9wkw3.js → chunk-fxftc455.js} +2 -2
  73. package/dist/{chunk-1sb6z37d.js → chunk-g223zsce.js} +3 -3
  74. package/dist/{chunk-vfe8xj8g.js → chunk-g22absm0.js} +2 -2
  75. package/dist/{chunk-dg1h0d9r.js → chunk-g45p4y4v.js} +3 -3
  76. package/dist/{chunk-37j288h1.js → chunk-g5sctfwa.js} +10 -10
  77. package/dist/chunk-gppv6fez.js +2 -0
  78. package/dist/chunk-grjr8shp.js +2 -0
  79. package/dist/chunk-gz1w4cpp.js +2 -0
  80. package/dist/chunk-gzbmfwxr.js +42 -0
  81. package/dist/chunk-h0qtmmq3.js +2 -0
  82. package/dist/chunk-h6sewvt2.js +20 -0
  83. package/dist/chunk-hb34m4pp.js +2 -0
  84. package/dist/chunk-hwvtpx3p.js +2 -0
  85. package/dist/{chunk-vpzadc7t.js → chunk-j2hm8v8b.js} +4 -4
  86. package/dist/{chunk-kf80wm87.js → chunk-j3d9zknp.js} +6 -6
  87. package/dist/{chunk-3h2e5jte.js → chunk-j5p191zq.js} +7 -7
  88. package/dist/chunk-k3kav39s.js +2 -0
  89. package/dist/chunk-k46j2maz.js +2 -0
  90. package/dist/{chunk-mdsrnd6s.js → chunk-k4dn3ry6.js} +4 -4
  91. package/dist/{chunk-rra9xhgg.js → chunk-k9m36nyw.js} +5 -5
  92. package/dist/chunk-ka2f844k.js +2 -0
  93. package/dist/chunk-kh4dr6gd.js +2 -0
  94. package/dist/{chunk-8q8202pj.js → chunk-kjfzkac7.js} +7 -7
  95. package/dist/{chunk-ecpr2jsc.js → chunk-m0shnhth.js} +3 -3
  96. package/dist/{chunk-qeh8f4bk.js → chunk-m6w75sq2.js} +2 -2
  97. package/dist/{chunk-qmy12s7k.js → chunk-mpmx0n3q.js} +28 -28
  98. package/dist/chunk-myd82d80.js +2 -0
  99. package/dist/chunk-nek0q523.js +130 -0
  100. package/dist/{chunk-4nmb776w.js → chunk-nmy72s6r.js} +2 -2
  101. package/dist/{chunk-9mtc6m11.js → chunk-np8knskz.js} +1 -1
  102. package/dist/{chunk-5s8bt976.js → chunk-nsjkmpjf.js} +1 -1
  103. package/dist/chunk-nvbjcgzd.js +2 -0
  104. package/dist/{chunk-664tnv9e.js → chunk-nzy4set0.js} +5 -5
  105. package/dist/chunk-p13dxvaj.js +2 -0
  106. package/dist/{chunk-6fhcmg96.js → chunk-p2v0r96k.js} +2 -2
  107. package/dist/{chunk-y1h6z9cy.js → chunk-p33w8zst.js} +3 -3
  108. package/dist/chunk-pht5z7wa.js +2 -0
  109. package/dist/{chunk-572rs7vb.js → chunk-ppvdbstz.js} +3 -3
  110. package/dist/chunk-pwdk7jbx.js +2 -0
  111. package/dist/{chunk-ecf9tftk.js → chunk-pydmzvpq.js} +1 -1
  112. package/dist/{chunk-ftk2jdg8.js → chunk-q0f28539.js} +2 -2
  113. package/dist/chunk-qekyxjy6.js +2 -0
  114. package/dist/{chunk-fgg1stc0.js → chunk-qpb80r4b.js} +2 -2
  115. package/dist/{chunk-smpb39kv.js → chunk-qxrsm48h.js} +5 -5
  116. package/dist/chunk-r10eadgn.js +2 -0
  117. package/dist/chunk-r8184e10.js +2 -0
  118. package/dist/{chunk-8zr9xhf3.js → chunk-rshaz0df.js} +1 -1
  119. package/dist/{chunk-r6s35xw9.js → chunk-sj2a5twe.js} +2 -2
  120. package/dist/chunk-tcrpa52j.js +2 -0
  121. package/dist/{chunk-zpqqdyb4.js → chunk-thr1m7k7.js} +18 -18
  122. package/dist/{chunk-wjtn0ywp.js → chunk-txgd0sj1.js} +5 -5
  123. package/dist/{chunk-tary163t.js → chunk-v0s52tmv.js} +2 -2
  124. package/dist/{chunk-3tg9bsbc.js → chunk-vc4jww9y.js} +13 -13
  125. package/dist/chunk-vp1p250v.js +2 -0
  126. package/dist/{chunk-mcdwjq8t.js → chunk-vpa4xzz3.js} +1 -1
  127. package/dist/chunk-vqrg5j83.js +2 -0
  128. package/dist/chunk-vzdfq3b5.js +2 -0
  129. package/dist/chunk-wzh4ene8.js +2 -0
  130. package/dist/{chunk-8x3axvek.js → chunk-x5sy0tym.js} +6 -6
  131. package/dist/chunk-x5vwkccx.js +2 -0
  132. package/dist/chunk-x6cmj5sa.js +2 -0
  133. package/dist/chunk-xnrfz4c3.js +2 -0
  134. package/dist/{chunk-5bkha4ej.js → chunk-xrzghjvy.js} +2 -2
  135. package/dist/{chunk-we96m579.js → chunk-xzz36k99.js} +2 -2
  136. package/dist/chunk-yaabhcss.js +2 -0
  137. package/dist/chunk-yazqtmq4.js +2 -0
  138. package/dist/{chunk-5afjh2ms.js → chunk-yd2nj0rv.js} +1 -1
  139. package/dist/{chunk-0p6fpsw5.js → chunk-z5kdmget.js} +3 -3
  140. package/dist/{chunk-sva555j3.js → chunk-zqmvhg37.js} +10 -10
  141. package/dist/chunk-zygpvm1x.js +2 -0
  142. package/dist/chunk-zz247c1r.js +2 -0
  143. package/dist/cli.js +19 -19
  144. package/dist/client-script-bundler.d.ts +3 -2
  145. package/dist/client-script-bundler.js +2 -2
  146. package/dist/component-image-usage.d.ts +2 -0
  147. package/dist/component-image-usage.js +13 -0
  148. package/dist/component-renderer.js +7 -2
  149. package/dist/craft-entry.js +2 -2
  150. package/dist/craft.js +2 -2
  151. package/dist/native/compiler/inline-style.js +16 -6
  152. package/dist/native/compiler/ir.d.ts +2 -0
  153. package/dist/native/compiler/render-screen.js +1 -1
  154. package/dist/native/components/primitives.d.ts +2 -0
  155. package/dist/native/prop-names.js +2 -0
  156. package/dist/native/runtime/browser-renderer.js +6 -0
  157. package/dist/pwa.js +3 -3
  158. package/dist/ssg.js +4 -4
  159. package/dist/utils.js +2 -1
  160. package/package.json +5 -5
  161. package/dist/chunk-02kkd7fy.js +0 -2
  162. package/dist/chunk-051evb5w.js +0 -2
  163. package/dist/chunk-1019v091.js +0 -2
  164. package/dist/chunk-1h9mcnvn.js +0 -2
  165. package/dist/chunk-1kdtapc1.js +0 -2
  166. package/dist/chunk-1mmtkbhf.js +0 -2
  167. package/dist/chunk-3a42s01p.js +0 -2
  168. package/dist/chunk-3t737sdr.js +0 -2
  169. package/dist/chunk-4jwp2per.js +0 -2
  170. package/dist/chunk-59512t1y.js +0 -2
  171. package/dist/chunk-5cyzd17z.js +0 -2
  172. package/dist/chunk-5q1mnc79.js +0 -2
  173. package/dist/chunk-6jtjhx7w.js +0 -2
  174. package/dist/chunk-6x112bw3.js +0 -2
  175. package/dist/chunk-7ygjbxm8.js +0 -2
  176. package/dist/chunk-8wnjaz0x.js +0 -2
  177. package/dist/chunk-af1e9spb.js +0 -2
  178. package/dist/chunk-bn13c7ma.js +0 -2
  179. package/dist/chunk-bymeqhjp.js +0 -2
  180. package/dist/chunk-cgyddqxw.js +0 -2
  181. package/dist/chunk-cpexmwbs.js +0 -2
  182. package/dist/chunk-cr12w7hv.js +0 -2
  183. package/dist/chunk-cs5gf4zp.js +0 -2
  184. package/dist/chunk-engy7e5m.js +0 -2
  185. package/dist/chunk-enzptxpw.js +0 -2
  186. package/dist/chunk-f0kbpzbb.js +0 -2
  187. package/dist/chunk-f83dksbn.js +0 -2
  188. package/dist/chunk-fedcrvrm.js +0 -2
  189. package/dist/chunk-fk7gs41v.js +0 -2
  190. package/dist/chunk-fmsrzpb4.js +0 -3
  191. package/dist/chunk-gbve6fgb.js +0 -2
  192. package/dist/chunk-gsawyk8q.js +0 -2
  193. package/dist/chunk-gv6w1j3z.js +0 -2
  194. package/dist/chunk-h3w9sx7w.js +0 -2
  195. package/dist/chunk-hf0n98x2.js +0 -2
  196. package/dist/chunk-k83z4nyg.js +0 -2
  197. package/dist/chunk-kg4zjb7a.js +0 -2
  198. package/dist/chunk-mjam7gyj.js +0 -2
  199. package/dist/chunk-nhm3qamb.js +0 -2
  200. package/dist/chunk-p5hbpmws.js +0 -2
  201. package/dist/chunk-pe5643ce.js +0 -2
  202. package/dist/chunk-q82kcwn4.js +0 -2
  203. package/dist/chunk-rhygq40y.js +0 -2
  204. package/dist/chunk-rx71g5z4.js +0 -2
  205. package/dist/chunk-s4fr9cx8.js +0 -2
  206. package/dist/chunk-sp5c1pgg.js +0 -2
  207. package/dist/chunk-tcrxk0mv.js +0 -130
  208. package/dist/chunk-th2ej2dz.js +0 -2
  209. package/dist/chunk-tkp7npcj.js +0 -42
  210. package/dist/chunk-tyb22n6n.js +0 -2
  211. package/dist/chunk-va57s6yw.js +0 -2
  212. package/dist/chunk-vch68zrs.js +0 -20
  213. package/dist/chunk-vqjbqm6c.js +0 -2
  214. package/dist/chunk-vyznvnew.js +0 -2
  215. package/dist/chunk-wad1w2d2.js +0 -2
  216. package/dist/chunk-wzb2g38x.js +0 -2
  217. package/dist/chunk-xe7wyaac.js +0 -2
  218. package/dist/chunk-y627cbst.js +0 -2
  219. package/dist/chunk-ycxwf633.js +0 -2
  220. package/dist/chunk-ydx3j69d.js +0 -2
  221. package/dist/chunk-yq3p5y7y.js +0 -2
  222. package/dist/chunk-z3ggbhhc.js +0 -2
@@ -0,0 +1,130 @@
1
+ // @bun
2
+ import"./chunk-0tgrqhkr.js";import{Us,xi,il}from"./chunk-236bdf7y.js";import"./chunk-89h4snzd.js";import"./chunk-8w0cwcvk.js";import"./chunk-sj2a5twe.js";import"./chunk-7mm5mvg0.js";import"./chunk-m6w75sq2.js";import"./chunk-k4dn3ry6.js";import{a}from"./chunk-g5sctfwa.js";import"./chunk-3z38swhv.js";import"./chunk-cb4ybh7g.js";import"./chunk-xzz36k99.js";import{ht,qe,he,sn,Ae,er,tr,Ke}from"./chunk-x5sy0tym.js";import{i}from"./chunk-thr1m7k7.js";import"./chunk-gzbmfwxr.js";import"./chunk-j5p191zq.js";import{ls}from"./chunk-kjfzkac7.js";import"./chunk-8wbgq43c.js";import"./chunk-41sq06t2.js";import{gt}from"./chunk-90gx5qxn.js";import"./chunk-19safa6y.js";import"./chunk-txgd0sj1.js";import{vo}from"./chunk-h6sewvt2.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-p33w8zst.js";import{existsSync as xe,mkdirSync as hi,readFileSync as mi}from"fs";import U from"path";import{existsSync as nt,mkdirSync as mn,realpathSync as ii,rmSync as yn}from"fs";import D from"path";import{existsSync as Yr}from"fs";import K from"path";var xn="data-stx-b",ot=new Set(xi),Nn=new Set(Us);function ke(e){if(e==="ref"||e==="data-stx-ref")return"ref";if(e.startsWith("::"))return null;if(e.startsWith("@bind:")||e.startsWith("x-bind:"))return"attr";if(e.startsWith("@")||e.startsWith(":")){let t=e.slice(1).split(".")[0];if(ot.has(t))return t==="if"?"if":t;if(t==="for"||t==="else"||t==="else-if"||t==="elseif")return"for";if(il(t))return"event";if(e.startsWith("@"))return"event";return"attr"}if(e.startsWith("x-")){let t=e.split(".")[0];if(!Nn.has(t))return"attr";let n=t.slice(2);if(n==="cloak"||n==="data"||n==="bind")return null;if(n==="tooltip"||n==="tooltip-position")return null;return ot.has(n)?n==="if"?"if":n:"attr"}return null}function kn(e){let t=[];for(let[n,r]of e){let s=ke(n);if(s)t.push({name:n,value:r,kind:s})}return t}var Tn=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Ne=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function at(e){let t=[],n=0;return{html:e.replace(Tn,(s,o,c)=>{if(!c||!/[:@]|x-/.test(c))return s;let u=[];Ne.lastIndex=0;for(let y=Ne.exec(c);y;y=Ne.exec(c))u.push([y[1],y[2]??y[3]??y[4]??""]);let d=kn(u);if(!d.length)return s;let g={id:n++,bindings:d};if(d.some((y)=>y.kind==="for"))g.template=!0;t.push(g);let b=s.endsWith("/>");return`${s.slice(0,b?-2:-1).trimEnd()} ${xn}="${g.id}"${b?"/>":">"}`}),manifest:{entries:t}}}import fr from"path";function ce(e){let t=e&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(e.trim());if(!t)return;let n=Number(t[1])*(t[2]==="rem"?16:1);return Number.isFinite(n)?n:void 0}function Te(e,t){if(!he[e])return;return ce(t?.get(sn(e))??he[e].value)}function Re(e,t){let n=er[e];if(!n)return;return ce(t?.get(Ke(n))??Ae[n]?.value)}function _e(e,t){let n=tr[e];if(!n)return;let r=ce(t?.get(Ke(n.size))??Ae[n.size]?.value),s=ce(t?.get(Ke(n.leading))??Ae[n.leading]?.value);if(r===void 0||s===void 0)return;return{fontSize:r,lineHeight:s}}var Rn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},dt=Ie({}),ct,lt=null;function le(){let e=globalThis.__stxNativeStyleConfig;if(!e)return dt;if(e!==ct)ct=e,lt=Ie(e);return lt}function ft(e,t=new Map,n=""){for(let[r,s]of Object.entries(e??{})){let o=r==="DEFAULT"?n.replace(/-$/,""):`${n}${r}`;if(typeof s==="string")t.set(o,s);else if(s&&typeof s==="object")ft(s,t,`${o}-`)}return t}function pt(e){let t={};for(let[n,r]of Object.entries(e??{})){let s=typeof r==="number"?r:Number.parseFloat(String(r));if(Number.isFinite(s))t[n]=s}return t}function Ie(e){return{shortcuts:new Map(Object.entries(e.shortcuts??{}).filter(([,t])=>typeof t==="string")),colors:ft(e.colors),fontFamily:new Map(Object.entries(e.fontFamily??{}).map(([t,n])=>[t,Array.isArray(n)?n.join(", "):n])),breakpoints:new Map(Object.entries({...Rn,...pt(e.breakpoints)}))}}var Ee={};function ut(e){Ee=e??{},dt=Ie(Ee)}async function mt(e,t){let n=Ee;ut(e);try{return await t()}finally{ut(n)}}function yt(e){if(!e)return{};let t=e.theme??{},n=Object.fromEntries(Object.entries(e.shortcuts??{}).filter(([,r])=>typeof r==="string"));return{...Object.keys(n).length?{shortcuts:n}:{},...t.fontFamily?{fontFamily:JSON.parse(JSON.stringify(t.fontFamily))}:{},...t.colors?{colors:JSON.parse(JSON.stringify(t.colors))}:{},...t.screens?{breakpoints:pt(t.screens)}:{}}}function bt(e){return le().shortcuts.get(e)}function vt(e){return le().colors.get(e)}function Ce(e){return le().breakpoints.get(e)}function ue(e){return le().fontFamily.get(e)}var wt=/^--[\w\u0080-\uFFFF-]+$/u;function St(e,t){if(!/var\(/i.test(e))return e;let n="",r="",s=!1;for(let o=0;o<e.length;o++){let c=e[o];if(c==="\\"){n+=e.slice(o,o+2),o++;continue}if(r){if(n+=c,c===r)r="";continue}if(c==='"'||c==="'"){r=c,n+=c;continue}if(e.slice(o,o+4).toLowerCase()!=="var("||o>0&&/[\w-]/.test(e[o-1])){n+=c;continue}let u=1,d=-1,g="",b=o+4;for(;b<e.length;b++){let m=e[b];if(m==="\\"){b++;continue}if(g){if(m===g)g="";continue}if(m==='"'||m==="'"){g=m;continue}if(m==="(")u++;if(m===")"&&--u===0)break;if(m===","&&u===1&&d===-1)d=b}if(u!==0)return;let h=e.slice(o+4,d===-1?b:d).trim();if(!wt.test(h))return;let y=t(h,d===-1?void 0:e.slice(d+1,b).trim());if(y===void 0||n.length+y.length>65536)return;n+=y,s=!0,o=b}return s&&n.length>65536?void 0:n}function re(e,t){let n=new Map,r=new Set;for(let[f,l]of e){let x=f.trim();if(!wt.test(x))continue;if(typeof l==="string"||typeof l==="number"&&Number.isFinite(l))n.set(x,String(l).trim())}let s=new Map,o=new Set;for(let[f,l]of n){let x=new Set,p=(N,v=0)=>v>64?void 0:St(N,(k,w)=>(x.add(k),w===void 0?"":p(w,v+1)));if(p(l)===void 0)o.add(f);s.set(f,x)}let c=new Map,u=new Map,d=[],g=new Set,b=0;function h(f,l=0){if(l>64){o.add(f);return}c.set(f,b),u.set(f,b++),d.push(f),g.add(f);for(let N of s.get(f)??[]){if(!n.has(N))continue;if(!c.has(N)){if(h(N,l+1),u.has(N))u.set(f,Math.min(u.get(f),u.get(N)))}else if(g.has(N))u.set(f,Math.min(u.get(f),c.get(N)))}if(u.get(f)!==c.get(f))return;let x=[],p;do p=d.pop(),g.delete(p),x.push(p);while(p!==f);if(x.length>1||s.get(f)?.has(f))x.forEach((N)=>o.add(N))}for(let f of n.keys())if(!c.has(f))h(f);let y=new Map;function m(f,l){if(r.add(f),y.has(f))return y.get(f);let x=n.get(f),p=x===void 0||/^(?:inherit|unset)$/i.test(x)?t?.get(f):o.has(f)||/^(?:initial|revert|revert-layer)$/i.test(x)?void 0:S(x,l+1);return y.set(f,p),p}function S(f,l=0){if(l>64)return;return St(f,(x,p)=>m(x,l)??(p===void 0?void 0:S(p,l+1)))}return{resolve:S,used:r,computed(){let f=new Map(t);for(let l of n.keys())f.set(l,m(l,0));return f}}}function Oe(e){if(e.display==="flex"&&e.flexDirection==null)return{...e,flexDirection:"row"};return e}var xt=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","objectFit","objectPosition","tintColor","transform","overflow","pointerEvents","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),_n=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","order","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),Nt=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),kt=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,An=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,En=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),In=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function Cn(e){if(typeof e!=="string")return e;let t=An.exec(e);return t?Number(t[1])*(/^r?em$/i.test(t[2]||"")?16:1):e}function ee(e){return typeof e==="number"&&Number.isFinite(e)}function On(e,t){if(e==="shadowOffset"&&t&&typeof t==="object"&&!Array.isArray(t)){let{width:n,height:r}=t;return ee(n)&&ee(r)?{width:n,height:r}:void 0}if(e==="transform"&&Array.isArray(t)){let n=[];for(let r of t){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[s,o]=Object.entries(r)[0];if(In.has(s)&&ee(o))n.push({[s]:o});else if(En.has(s)&&typeof o==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(o))n.push({[s]:o});else return}return n}return}function Pn(e){let t=[],n=0,r=0,s="";for(let o=0;o<=e.length;o++){let c=e[o];if(c==="\\"){o++;continue}if(s){if(c===s)s="";continue}if(c==='"'||c==="'"){s=c;continue}if(c==="(")r++;if(c===")")r=Math.max(0,r-1);if(o!==e.length&&(c!==";"||r))continue;let u=e.slice(n,o),d=u.indexOf(":");if(d!==-1)t.push([u.slice(0,d).trim(),u.slice(d+1).trim()]);n=o+1}return t}function Mn(e,t){let n;if(typeof e==="string"){if(e=e.trim(),!e)return[];try{e=JSON.parse(e)}catch{}}if(typeof e==="string")n=Pn(e);else if(e&&typeof e==="object"&&!Array.isArray(e))n=Object.entries(e);else{if(e!=null&&e!==!1)t({kind:"non-numeric-style",name:"style"});return[]}return n}function de(e,t=()=>{},n={}){let r=Mn(e,t),s=re(r,n.inheritedVariables);return n.onVariables?.(s.computed()),Bn(r,s,t)}function Bn(e,t,n){let r={},s=[];for(let[o,c]of e){if(o.trim().startsWith("--")){s.push(o.trim());continue}let u=xt.has(o)||o.trim().startsWith("--")?o:o.trim().toLowerCase().replace(/-([a-z])/g,(b,h)=>h.toUpperCase());if(!xt.has(u)){n({kind:"unknown-style",name:u});continue}if(c==null||c==="")continue;let d=typeof c==="string"?t.resolve(c.trim()):c;if(d===void 0){n({kind:"non-numeric-style",name:u});continue}if(d==="")continue;if(u==="pointerEvents"){if(typeof d==="string"&&["auto","none","box-none","box-only"].includes(d))r.pointerEvents=d;else n({kind:"unknown-style",name:`pointerEvents:${String(d)}`});continue}if(u==="objectFit"){let b=typeof d==="string"?d.trim().toLowerCase():"";if(["fill","contain","cover","none","scale-down"].includes(b))r.objectFit=b;else n({kind:"unknown-style",name:`objectFit:${String(d)}`});continue}if(u==="objectPosition"){let b=typeof d==="string"?d.trim().toLowerCase().replace(/\s+/g," "):"",h=b.split(" ");if(h.length===1)h.push("center");if(["top","bottom"].includes(h[0])||["left","right"].includes(h[1]))h.reverse();let y=(m)=>m.endsWith("%")&&kt.test(m.slice(0,-1))&&Number.isFinite(Number(m.slice(0,-1)));if(h.length===2&&(["left","center","right"].includes(h[0])||y(h[0]))&&(["top","center","bottom"].includes(h[1])||y(h[1])))r.objectPosition=b;else n({kind:"unknown-style",name:`objectPosition:${String(d)}`});continue}let g;if(_n.has(u)||Nt.has(u)){if(g=Cn(d),!ee(g)&&!(Nt.has(u)&&typeof g==="string"&&g.endsWith("%")&&kt.test(g.slice(0,-1))&&Number.isFinite(Number(g.slice(0,-1)))))g=void 0}else if(u==="display"&&d==="inline-flex")g="flex";else if(u==="shadowOffset"||u==="transform")g=On(u,d);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")g=ee(d)||typeof d==="string"?d:void 0;else if(u==="fontWeight"&&ee(d))g=String(d);else if(typeof d==="string")g=d;if(g===void 0)n({kind:"non-numeric-style",name:u});else r[u]=g}for(let o of s)if(!t.used.has(o))n({kind:"unknown-style",name:o});return r}var Ln={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Me={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},Tt={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},Rt={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function Q(e){let t=e.lastIndexOf("/");if(t>0&&(!e.endsWith("]")||/\/\[[\d.]+%?\]$/.test(e))){let r=Q(e.slice(0,t)),s=e.slice(t+1),o=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!r||!Number.isFinite(o))return;return Dn(r,o/100)}if(e==="transparent")return"transparent";if(e==="current")return"currentColor";if(e==="black")return"#000000";if(e==="white")return"#ffffff";let n=e.split("-");if(n.length===2){let[r,s]=n,o=Ln[r];if(o&&typeof o==="object")return o[s]}if(e.startsWith("[")&&e.endsWith("]")){let r=e.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function Be(e){return Q(e.trim())}function Dn(e,t){if(e==="transparent")return e;let n=e.startsWith("#")?e.slice(1):"";if(n.length===3)n=n.split("").map((s)=>s+s).join("");if(n.length===8)n=n.slice(0,6);if(n.length!==6)return;let r=Math.round(Math.min(1,Math.max(0,t))*255);return`#${n}${r.toString(16).padStart(2,"0")}`}function Pe(e,t=16){if(!e.startsWith("[")||!e.endsWith("]"))return;let n=e.slice(1,-1),r=Number.parseFloat(n);if(!Number.isFinite(r))return;if(n.endsWith("rem"))return r*16;if(n.endsWith("em"))return r*t;return r}function j(e){if(e.startsWith("[")&&e.endsWith("]")){let t=e.slice(1,-1);if(t.endsWith("%"))return;let n=t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t);return Number.isFinite(n)?n:void 0}return Me[e]??Re(e)}function pe(e){let t=/^\[(-?\d*\.?\d+)%\]$/.exec(e);if(t)return`${Number.parseFloat(t[1])}%`;return j(e)}var $n={flex:(e,t)=>(t.display="flex",!0),block:(e,t)=>(t.display="flex",!0),hidden:(e,t)=>(t.display="none",!0),grid:(e,t)=>(t.display="grid",!0),"flex-row":(e,t)=>(t.flexDirection="row",!0),"flex-col":(e,t)=>(t.flexDirection="column",!0),"flex-row-reverse":(e,t)=>(t.flexDirection="row-reverse",!0),"flex-col-reverse":(e,t)=>(t.flexDirection="column-reverse",!0),"flex-wrap":(e,t)=>(t.flexWrap="wrap",!0),"flex-nowrap":(e,t)=>(t.flexWrap="nowrap",!0),"flex-wrap-reverse":(e,t)=>(t.flexWrap="wrap-reverse",!0),"flex-1":(e,t)=>(t.flex=1,t.flexGrow=1,t.flexShrink=1,t.flexBasis=0,!0),"flex-auto":(e,t)=>(t.flexGrow=1,t.flexShrink=1,!0),"flex-initial":(e,t)=>(t.flexGrow=0,t.flexShrink=1,!0),"flex-none":(e,t)=>(t.flexGrow=0,t.flexShrink=0,!0),grow:(e,t)=>(t.flexGrow=1,!0),"grow-0":(e,t)=>(t.flexGrow=0,!0),shrink:(e,t)=>(t.flexShrink=1,!0),"shrink-0":(e,t)=>(t.flexShrink=0,!0),"order-first":(e,t)=>(t.order=-9999,!0),"order-last":(e,t)=>(t.order=9999,!0),"order-none":(e,t)=>(t.order=0,!0),"justify-start":(e,t)=>(t.justifyContent="flex-start",!0),"justify-center":(e,t)=>(t.justifyContent="center",!0),"justify-end":(e,t)=>(t.justifyContent="flex-end",!0),"justify-between":(e,t)=>(t.justifyContent="space-between",!0),"justify-around":(e,t)=>(t.justifyContent="space-around",!0),"justify-evenly":(e,t)=>(t.justifyContent="space-evenly",!0),"items-start":(e,t)=>(t.alignItems="flex-start",!0),"items-center":(e,t)=>(t.alignItems="center",!0),"items-end":(e,t)=>(t.alignItems="flex-end",!0),"items-stretch":(e,t)=>(t.alignItems="stretch",!0),"items-baseline":(e,t)=>(t.alignItems="baseline",!0),"self-auto":(e,t)=>(t.alignSelf="auto",!0),"self-start":(e,t)=>(t.alignSelf="flex-start",!0),"self-center":(e,t)=>(t.alignSelf="center",!0),"self-end":(e,t)=>(t.alignSelf="flex-end",!0),"self-stretch":(e,t)=>(t.alignSelf="stretch",!0),"self-baseline":(e,t)=>(t.alignSelf="baseline",!0),"min-w-0":(e,t)=>(t.minWidth=0,!0),"aspect-square":(e,t)=>(t.aspectRatio=1,!0),"aspect-video":(e,t)=>(t.aspectRatio=1.7777777777777777,!0),"border-solid":(e,t)=>(t.borderStyle="solid",!0),"border-dashed":(e,t)=>(t.borderStyle="dashed",!0),"border-dotted":(e,t)=>(t.borderStyle="dotted",!0),group:()=>!0,peer:()=>!0,"inset-0":(e,t)=>(t.top=0,t.right=0,t.bottom=0,t.left=0,!0),"mx-auto":(e,t)=>(t.alignSelf="center",!0),fixed:(e,t)=>(t.position="absolute",!0),sticky:()=>!0,"sr-only":(e,t)=>(t.position="absolute",t.width=1,t.height=1,t.overflow="hidden",!0),inline:()=>!0,"inline-block":()=>!0,contents:()=>!0,"align-top":()=>!0,"align-middle":()=>!0,"align-bottom":()=>!0,"align-baseline":()=>!0,"align-text-top":()=>!0,"whitespace-normal":()=>!0,"whitespace-pre":()=>!0,"whitespace-pre-line":()=>!0,"whitespace-pre-wrap":()=>!0,"whitespace-nowrap":()=>!0,"break-words":()=>!0,"break-all":()=>!0,"break-normal":()=>!0,"object-cover":()=>!0,"object-contain":()=>!0,"object-fill":()=>!0,"object-center":()=>!0,"tracking-tighter":(e,t)=>(t.letterSpacing=-0.8,!0),"tracking-tight":(e,t)=>(t.letterSpacing=-0.4,!0),"tracking-normal":(e,t)=>(t.letterSpacing=0,!0),"tracking-wide":(e,t)=>(t.letterSpacing=0.4,!0),"tracking-wider":(e,t)=>(t.letterSpacing=0.8,!0),"tracking-widest":(e,t)=>(t.letterSpacing=1.6,!0),"tabular-nums":()=>!0,"inline-flex":(e,t)=>(t.display="flex",!0),truncate:()=>!0,relative:(e,t)=>(t.position="relative",!0),absolute:(e,t)=>(t.position="absolute",!0),"pointer-events-none":(e,t)=>(t.pointerEvents="none",!0),"pointer-events-auto":(e,t)=>(t.pointerEvents="auto",!0),"overflow-visible":(e,t)=>(t.overflow="visible",!0),"overflow-hidden":(e,t)=>(t.overflow="hidden",!0),"overflow-scroll":(e,t)=>(t.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-sans":(e,t)=>(t.fontFamily=ue("sans")??"sans-serif",!0),"font-serif":(e,t)=>(t.fontFamily=ue("serif")??"serif",!0),"font-mono":(e,t)=>(t.fontFamily=ue("mono")??"monospace",!0),"font-thin":(e,t)=>(t.fontWeight="100",!0),"font-extralight":(e,t)=>(t.fontWeight="200",!0),"font-light":(e,t)=>(t.fontWeight="300",!0),"font-normal":(e,t)=>(t.fontWeight="400",!0),"font-medium":(e,t)=>(t.fontWeight="500",!0),"font-semibold":(e,t)=>(t.fontWeight="600",!0),"font-bold":(e,t)=>(t.fontWeight="bold",!0),"font-extrabold":(e,t)=>(t.fontWeight="800",!0),"font-black":(e,t)=>(t.fontWeight="900",!0),italic:(e,t)=>(t.fontStyle="italic",!0),"not-italic":(e,t)=>(t.fontStyle="normal",!0),"text-left":(e,t)=>(t.textAlign="left",!0),"text-center":(e,t)=>(t.textAlign="center",!0),"text-right":(e,t)=>(t.textAlign="right",!0),"text-justify":(e,t)=>(t.textAlign="justify",!0),uppercase:(e,t)=>(t.textTransform="uppercase",!0),lowercase:(e,t)=>(t.textTransform="lowercase",!0),capitalize:(e,t)=>(t.textTransform="capitalize",!0),"normal-case":(e,t)=>(t.textTransform="none",!0),underline:(e,t)=>(t.textDecorationLine="underline",!0),"line-through":(e,t)=>(t.textDecorationLine="line-through",!0),"no-underline":(e,t)=>(t.textDecorationLine="none",!0)};function jn(e,t){if(!e.startsWith("bg-"))return!1;let n=e.slice(3),r=Q(n);if(r)return t.backgroundColor=r,!0;return!1}function _t(e,t){if(!e.startsWith("text-"))return!1;let n=e.slice(5),r=_e(n);if(r)return Object.assign(t,r),!0;if(Tt[n])return t.fontSize=Tt[n],!0;if(n.startsWith("[")&&n.endsWith("]")){let o=n.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(o)){let c=o.endsWith("rem")||o.endsWith("em")?Number.parseFloat(o)*16:Number.parseFloat(o);if(Number.isFinite(c))return t.fontSize=c,!0}}let s=Q(n);if(s)return t.color=s,!0;return!1}var Vn=new Set(["t","tr","r","br","b","bl","l","tl"]);function Wn(e,t){let n=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(e);if(n&&Vn.has(n[1]))return t.gradientDirection=`to-${n[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(e);if(!r)return!1;let s=Q(r[2]);if(!s)return!1;if(r[1]==="from")t.gradientFrom=s;else if(r[1]==="via")t.gradientVia=s;else t.gradientTo=s;return!0}function Fn(e,t){for(let n of["fill","stroke"]){let r=`${n}-`;if(!e.startsWith(r))continue;let s=e.slice(r.length);if(s==="none")return t[n]="none",!0;if(n==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return t.strokeWidth=Number.parseFloat(s),!0;if(n==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return t.strokeWidth=Number.parseFloat(s.slice(1)),!0;let o=Q(s);if(o)return t[n]=o,!0}return!1}function Xn(e,t){if(e.startsWith("p-")){let n=j(e.slice(2));if(n!==void 0)return t.padding=n,!0}if(e.startsWith("px-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingHorizontal=n,!0}if(e.startsWith("py-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingVertical=n,!0}if(e.startsWith("pt-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingTop=n,!0}if(e.startsWith("pr-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingRight=n,!0}if(e.startsWith("pb-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingBottom=n,!0}if(e.startsWith("pl-")){let n=j(e.slice(3));if(n!==void 0)return t.paddingLeft=n,!0}return!1}function Et(e,t){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(e)){let n={};if(!Et(e.slice(1),n))return!1;let r=Object.entries(n);if(r.some(([,s])=>typeof s!=="number"))return!1;for(let[s,o]of r)t[s]=-o;return!0}if(e.startsWith("m-")){let n=j(e.slice(2));if(n!==void 0)return t.margin=n,!0}if(e.startsWith("mx-")){let n=j(e.slice(3));if(n!==void 0)return t.marginHorizontal=n,!0}if(e.startsWith("my-")){let n=j(e.slice(3));if(n!==void 0)return t.marginVertical=n,!0}if(e.startsWith("mt-")){let n=j(e.slice(3));if(n!==void 0)return t.marginTop=n,!0}if(e.startsWith("mr-")){let n=j(e.slice(3));if(n!==void 0)return t.marginRight=n,!0}if(e.startsWith("mb-")){let n=j(e.slice(3));if(n!==void 0)return t.marginBottom=n,!0}if(e.startsWith("ml-")){let n=j(e.slice(3));if(n!==void 0)return t.marginLeft=n,!0}return!1}function zn(e,t){if(!e.startsWith("w-"))return!1;let n=e.slice(2);if(n==="full")return t.width="100%",!0;if(n==="screen")return t.width="100%",!0;if(n==="auto")return t.width="auto",!0;if(n.includes("/")){let[s,o]=n.split("/"),c=Number.parseInt(s)/Number.parseInt(o)*100;return t.width=`${c}%`,!0}let r=pe(n);if(r!==void 0)return t.width=r,!0;return!1}function Un(e,t){if(!e.startsWith("h-"))return!1;let n=e.slice(2);if(n==="full")return t.height="100%",!0;if(n==="screen")return t.height="100%",!0;if(n==="auto")return t.height="auto",!0;let r=pe(n);if(r!==void 0)return t.height=r,!0;return!1}function Hn(e,t){if(e==="rounded")return t.borderRadius=Rt.DEFAULT,!0;if(!e.startsWith("rounded-"))return!1;let n=e.slice(8);if(n==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(n),s=Rt[r[2]]??Te(r[2])??Pe(r[2]);if(s===void 0)return!1;let o={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let c of r[1]?o[r[1]]:["borderRadius"])t[c]=s;return!0}function qn(e,t){let n=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(e);if(!n)return!1;let[,r="",s]=n,o=s===void 0?1:Number(s);if(s?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(s);if(!u)return!1;o=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(o)||o<0)return!1;let c={"":["borderWidth"],t:["borderTopWidth"],r:["borderRightWidth"],b:["borderBottomWidth"],l:["borderLeftWidth"],x:["borderLeftWidth","borderRightWidth"],y:["borderTopWidth","borderBottomWidth"]};for(let u of c[r])t[u]=o;return!0}function Gn(e,t){if(!e.startsWith("border-"))return!1;let n=e.slice(7),r=Q(n);if(r)return t.borderColor=r,!0;return!1}function Kn(e,t){if(!e.startsWith("opacity-"))return!1;let n=Number.parseInt(e.slice(8));if(!Number.isNaN(n))return t.opacity=n/100,!0;return!1}function Jn(e,t,n){if(e.startsWith("tracking-[")){let r=Pe(e.slice(9),n);if(r===void 0)return!1;return t.letterSpacing=r,!0}if(e.startsWith("leading-")){let r=e.slice(8),s=n,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},c=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*s:Pe(r,s):o[r]!==void 0?o[r]*s:Me[r];if(c===void 0||!Number.isFinite(c))return!1;return t.lineHeight=c,!0}return!1}function Yn(e,t){let n=/^(-?)(inset-x|inset-y|inset|top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s=/^\[(-?[\d.]+)px\]$/.exec(r),o=s?Number(s[1]):Me[r];if(o===void 0||!Number.isFinite(o))return!1;let c=n[1]?-o:o,u=n[2]==="inset"?["top","right","bottom","left"]:n[2]==="inset-x"?["left","right"]:n[2]==="inset-y"?["top","bottom"]:[n[2]];for(let d of u)t[d]=c;return!0}function Qn(e,t){let n=/^grid-cols-\[(.+)\]$/.exec(e);if(n)return t.gridColumns=n[1].split("_").filter(Boolean).length,!0;let r=/^grid-cols-(\d+)$/.exec(e);if(!r)return!1;return t.gridColumns=Number(r[1]),!0}function Zn(e,t){if(!e.startsWith("size-"))return!1;let n=e.slice(5),r=n==="full"?"100%":pe(n);if(r===void 0)return!1;return t.width=r,t.height=r,!0}var nr={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function rr(e,t){let n=/^(min|max)-(w|h)-(.+)$/.exec(e);if(!n)return!1;let[,r,s,o]=n,c=o==="full"||o==="screen"?"100%":o==="none"?void 0:s==="w"&&r==="max"&&nr[o]||pe(o);if(c===void 0&&o!=="none")return!1;let u=`${r}${s==="w"?"Width":"Height"}`;if(c===void 0)delete t[u];else t[u]=c;return!0}function ir(e,t){let n=/^(-?)(top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3]==="full"?"100%":j(n[3]);if(r===void 0)return!1;return t[n[2]]=typeof r==="number"&&n[1]?-r:r,!0}function sr(e,t){let n=/^(-?)translate-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;s=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else s=j(r);if(s===void 0||!Number.isFinite(s))return!1;if(n[1])s=-s;let o=n[2]==="x"?"translateX":"translateY",c=o==="translateX"?{translateX:s}:{translateY:s};return t.transform=[...(t.transform??[]).filter((u)=>!(o in u)),c],!0}function or(e,t){let n=/^space-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=j(n[2]);if(r===void 0)return!1;return t.gap=r,!0}function ar(e,t){if(e.startsWith("gap-")){let n=j(e.slice(4));if(n!==void 0)return t.gap=n,!0}if(e.startsWith("gap-x-")){let n=j(e.slice(6));if(n!==void 0)return t.columnGap=n,!0}if(e.startsWith("gap-y-")){let n=j(e.slice(6));if(n!==void 0)return t.rowGap=n,!0}return!1}function cr(e,t){let r={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[e];if(!r)return!1;let[s,o,c,u]=r;return Object.assign(t,{shadowColor:"#000000",shadowOpacity:c,shadowRadius:s,shadowOffset:{width:0,height:o},elevation:u}),!0}function lr(e){let t=/^divide-(?:(y|x)(?:-(.+))?|(.+))$/.exec(e);if(!t)return null;if(t[2]==="reverse")return"";if(t[1])return`border-${t[1]==="y"?"t":"l"}${t[2]?`-${t[2]}`:""}`;return`border-${t[3]}`}var It=new Set(["aria-selected","aria-pressed","aria-checked","aria-expanded"]),ur=new Set(["hover","group-hover","peer-hover","active","group-active","visited","placeholder","selection","print","motion-safe"]),dr=/^(?:transition(?:-[a-z]+)?|animate-\S+|scroll-[mp][trblxyse]?-\S+|snap-\S+|overscroll-\S+|duration-\S+|ease-\S+|delay-\S+|will-change-\S+|cursor-\S+|select-(?:none|text|all|auto)|outline-none|outline-0|appearance-none|scroll-smooth|scroll-auto|antialiased|subpixel-antialiased|touch-\S+|resize(?:-\S+)?|backdrop-blur(?:-\S+)?|isolate|contain-\S+)$/;function Ct(e){let t=[],n=0,r=0;for(let s=0;s<e.length;s++){let o=e[s];if(o==="[")n++;else if(o==="]")n=Math.max(0,n-1);else if(o===":"&&n===0)t.push(e.slice(r,s)),r=s+1}return t.push(e.slice(r)),t}function Ot(e,t=new Set){let n=Ct(e),r=n[n.length-1],s=t.has(r)?void 0:bt(r);if(s===void 0)return[e];let o=n.slice(0,-1).map((u)=>`${u}:`).join(""),c=new Set(t).add(r);return s.split(/\s+/).filter(Boolean).flatMap((u)=>Ot(`${o}${u}`,c))}function ge(e,t,n={}){let r=new Map,s=(S,f)=>{if(!r.has(S))r.set(S,{...f,classes:[],authored:new Map});return r.get(S)};s("base",{});let o=[],c=[],u=e.split(/\s+/).filter(Boolean);if(n.rules){let S=new Set(u);for(let f of Object.keys(n.rules))if(f.includes(".")&&f.split(".").every((l)=>S.has(l)))c.push(f);c.sort((f,l)=>f.split(".").length-l.split(".").length)}for(let S of u){if(n.rules&&Object.hasOwn(n.rules,S)){o.push(S);continue}for(let f of Ot(S)){let l=Ct(f),x=l.pop(),p=l.some((T)=>T.startsWith("focus"));if(l.some((T)=>/^(?:group-|peer-)?focus(?:-visible|-within)?$/.test(T))&&/^(?:ring|outline)(?:-|$)/.test(x))continue;if(dr.test(x)||!p&&l.some((T)=>ur.has(T)))continue;let N,v,k=!1,w,R=[];for(let T of l){let _=Ce(T),C=T.startsWith("max-")?Ce(T.slice(4)):void 0;if(_!==void 0&&N===void 0)N=_;else if(C!==void 0&&v===void 0)v=C-0.02;else if(T==="disabled"&&!k)k=!0;else if(It.has(T)&&w===void 0)w=T;else R.push(T)}let I=[...R,x].join(":"),P=N!==void 0||v!==void 0,E=k?s("disabled",{disabled:!0}):w?s(`state:${w}`,{state:w}):P?s(`range:${N??0}:${v??""}`,{min:N??0,max:v}):r.get("base");if((k||w)&&(P||k&&w)){r.get("base").authored.set(f,S),r.get("base").classes.push(f);continue}if(E.classes.push(I),!E.authored.has(I))E.authored.set(I,S===f?f:`${S} (${f})`)}}let d=[...o,...c],g=(S,f)=>f.map((l)=>S.authored.get(l)??l),b=r.get("base"),h=fe(b.classes.join(" "),t,n),y=new Map;if(d.length){let S=(x)=>x?de(x,()=>{},{inheritedVariables:t}):{},f={},l={};for(let x of d){let p=n.rules[x];f={...f,...S(p.light)},l={...l,...S(p.dark)};for(let N of p.responsive??[]){let v=`${N.min}:${N.max??""}`,k=y.get(v)??{min:N.min,...N.max===void 0?{}:{max:N.max},style:{}};if(k.style={...k.style,...S(N.light)},N.dark)k.dark={...k.dark,...S(N.dark)};y.set(v,k)}}if(h.style={...f,...h.style},Object.keys(l).length)h.dark={...l,...h.dark}}h.unknown=g(b,h.unknown);let m=[];for(let S of r.values()){if(S===b)continue;let f=fe(S.classes.join(" "),t,{appearance:n.appearance});h.unknown=[...new Set([...h.unknown,...g(S,f.unknown)])];let l={style:f.style,...f.dark?{dark:f.dark}:{}};if(S.disabled)h.disabled=l;else if(S.state)(h.states??={})[S.state]=l;else m.push({min:S.min??0,...S.max===void 0?{}:{max:S.max},...l})}for(let S of y.values()){let f=m.find((l)=>l.min===S.min&&l.max===S.max);if(f){if(f.style={...S.style,...f.style},S.dark||f.dark)f.dark={...S.dark,...f.dark}}else m.push(S)}if(m.length)h.responsive=m.sort((S,f)=>S.min-f.min||(S.max??1/0)-(f.max??1/0));return h}function fe(e,t,n={}){let r=[],s=[],o=[],c=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},d=new Map;function g(p,N){let v=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(p),k=v&&vt(v[2]);if(v&&k){let E=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(k),T=E?t?.get(E[1])??E[2]:k;if(T&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(T))return[`${v[1]}-[${T.replace(/\s+/g,"")}]${v[3]||""}`]}let w=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(p),R=w&&ht[w[2]];if(R){let E=t?.get(qe(w[2]));return[`${w[1]}-${E===void 0?R[N]:`[${E}]`}${w[3]||""}`]}let I=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(p);if(I&&he[I[2]]){let E=Te(I[2],t);return E===void 0?void 0:[`rounded-${I[1]?`${I[1]}-`:""}[${E}px]`]}let P=p.startsWith("text-")?p.slice(5):"";if(tr[P]){let E=_e(P,t);return E&&[`text-[${E.fontSize}px]`,`leading-[${E.lineHeight}px]`]}for(let E of Object.keys(er)){if(!p.endsWith(`-${E}`))continue;let T=Re(E,t);return T===void 0?void 0:[`${p.slice(0,-E.length)}[${T}px]`]}return[p]}function b(p,N){if(!d.has(p))d.set(p,new Set);return d.get(p).add(N),p}let h=[],y=new Map;for(let p of e.split(/\s+/).filter(Boolean)){let N=p.startsWith("dark:")?p.slice(5):p,v=lr(N);if(v!==null){let R=v&&`${p===N?"":"dark:"}${v}`;if(R)h.push(R),y.set(R,p);continue}let k=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(p),w=k?.[2]==="focus"?"focus":"focusWithin";if(k&&n[w]&&!(k[1]&&k[3])){let R=`${k[1]||k[3]?"dark:":""}${k[4]}`,I=u[w];I.classes.push(R),I.originals.set(R,[...I.originals.get(R)??[],p]);continue}if(p.startsWith("dark:")){let R=g(p.slice(5),"dark");if(!R)c.push(p);else s.push(...R.map((I)=>b(I,p)))}else if(!p.includes(":")||p.startsWith("[")){let R=g(p,n.appearance??"light"),I=g(p,"dark");if(!R||!I){c.push(p);continue}if(r.push(...R.map((P)=>b(P,p))),I.join(" ")!==R.join(" "))o.push(...I.map((P)=>b(P,p)))}else c.push(p)}let m=[],S=At(r,m),f={style:S,unknown:m},l=[...n.appearance===void 0?o:[],...s];if(l.length)f.dark=At(l,m);if(S.transform&&f.dark?.transform){let p=new Set(f.dark.transform.flatMap((N)=>Object.keys(N)));f.dark.transform=[...S.transform.filter((N)=>!Object.keys(N).some((v)=>p.has(v))),...f.dark.transform]}for(let p of r){if(p==="truncate"||p==="whitespace-nowrap")f.numberOfLines=1;let N=/^object-(cover|contain|fill)$/.exec(p);if(N)f.resizeMode=N[1]==="fill"?"stretch":N[1];let v=/^line-clamp-(\d+)$/.exec(p);if(v)f.numberOfLines=Number(v[1]);if(!f.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(p))f.icon=p}let x=m.flatMap((p)=>[...d.get(p)??[p]]);if(f.unknown=[...new Set([...x.filter((p)=>!/^line-clamp-\d+$/.test(p)),...c])],h.length){let p=fe(h.join(" "),t,{appearance:n.appearance});f.divide={style:p.style,...p.dark?{dark:p.dark}:{}},f.unknown=[...new Set([...f.unknown,...p.unknown.map((N)=>y.get(N)??N)])]}for(let p of["focus","focusWithin"]){let N=u[p];if(!N.classes.length)continue;let v=fe(N.classes.join(" "),t,{appearance:n.appearance});f[p]={style:v.style,dark:v.dark},f.unknown=[...new Set([...f.unknown,...v.unknown.flatMap((k)=>N.originals.get(k)??[k])])];for(let k of N.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(k))f.unknown.push(...N.originals.get(k))}return f}function At(e,t){let n={},r=Array.isArray(e)?e:e.split(/\s+/).filter(Boolean),s={};for(let c of r)if(c.startsWith("text-"))_t(c,s);let o=typeof s.fontSize==="number"?s.fontSize:16;for(let c of r){if(/^i-[a-z0-9]+-/.test(c))continue;let u=$n[c];if(u){u("",n);continue}if(cr(c,n))continue;if(Wn(c,n))continue;if(jn(c,n))continue;if(Fn(c,n))continue;if(_t(c,n))continue;if(Xn(c,n))continue;if(Et(c,n))continue;if(zn(c,n))continue;if(Un(c,n))continue;if(Hn(c,n))continue;if(qn(c,n))continue;if(Gn(c,n))continue;if(Kn(c,n))continue;if(ar(c,n))continue;if(Jn(c,n,o))continue;if(Zn(c,n))continue;if(rr(c,n))continue;if(Qn(c,n))continue;let d=/^aspect-\[(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)\]$/.exec(c);if(d&&Number(d[2])>0){n.aspectRatio=Number(d[1])/Number(d[2]);continue}let g=/^z-\[(-?\d+)\]$/.exec(c)??/^z-(\d+)$/.exec(c);if(g){n.zIndex=Number(g[1]);continue}if(c==="z-auto")continue;if(Yn(c,n))continue;let b=/^order-\[(-?\d+)\]$/.exec(c)??/^order-(-?\d+)$/.exec(c);if(b){n.order=Number(b[1]);continue}if(ir(c,n))continue;if(sr(c,n))continue;if(or(c,n))continue;if(t?.push(c),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${c}`)}return n}var Pt=new Map;function Mt(e,t){if(!e)return;let n=e.trim(),r=n.lastIndexOf("-"),s=r===-1?t[n]:t[n.slice(0,r)],o=r===-1?s:s?.[n.slice(r+1)];if(typeof o==="string"&&/^#[\da-f]{3,8}$/i.test(o))return o;return Be(n)??Be(`[${n}]`)}function pr(e){let t=e.roles??{},n=e.shapes??{},r=e.density??{},s={...e.theme?.colors,...e.theme?.extend?.colors},o=[],c=[];for(let[u,d]of Object.entries(t)){if(!ht[u])continue;let g=Mt(typeof d==="string"?d:d?.light,s),b=Mt(typeof d==="string"?d:d?.dark,s);if(g)o.push(`${qe(u)}: ${g};`);if(b)c.push(`${qe(u)}: ${b};`)}for(let[u,d]of Object.entries(n))if(he[u])o.push(`${sn(u)}: ${d};`);for(let[u,d]of Object.entries(r))if(Ae[u])o.push(`${Ke(u)}: ${d};`);return[o.length?`:root { ${o.join(" ")} }`:"",c.length?`.dark { ${c.join(" ")} }`:""].filter(Boolean).join(`
3
+ `)}async function gr(e){let{resolveUserCssConfig:t}=await import("./chunk-yazqtmq4.js"),n=await t(e);return n?pr(n):""}function Bt(e){let t=fr.resolve(e),n=Pt.get(t);if(!n)n=gr(t).catch(()=>""),Pt.set(t,n);return n}var Dt={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Lt={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function hr(e){return e==="role"||e==="aria-label"||e==="aria-valuetext"||e in Dt}function mr(e,t){if(t===void 0||t===null)return;let n=String(t).trim().toLowerCase();if(n==="mixed")return e==="aria-checked"?"mixed":!0;if(n==="undefined")return;return n===""||n==="true"}function yr(e){if(e===void 0||e===null)return null;for(let t of String(e).trim().toLowerCase().split(/\s+/))if(Lt[t])return Lt[t];return null}function br(e,t,n){if(e==="aria-label")return{accessibilityLabel:t===void 0||t===null||t===""?null:String(t)};if(e==="aria-valuetext")return{accessibilityValue:t===void 0||t===null||t===""?null:String(t)};if(e==="role")return{accessibilityRole:yr(t)};let r=Dt[e];if(!r)return;let s=n.accessibilityState,o=s&&typeof s==="object"?{...s}:{},c=mr(e,t);if(c===void 0)delete o[r];else o[r]=c;return{accessibilityState:Object.keys(o).length?o:null}}function vr(e){let t=e.accessibilityState&&typeof e.accessibilityState==="object"?e.accessibilityState:void 0,n={};for(let[s,o]of Object.entries(e)){if(!hr(s))continue;let c=br(s,o,n);if(c)Object.assign(n,c)}for(let s of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(e[s]===void 0&&n[s]!==void 0&&n[s]!==null)e[s]=n[s];let r=n.accessibilityState;if(r)e.accessibilityState={...r,...t}}var Le=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function De(e,t){let n={...e};if(vr(n),t==="Image"&&n.accessibilityLabel===void 0&&e.alt!=null&&e.alt!=="")n.accessibilityLabel=String(e.alt);return Object.fromEntries(Le.filter((r)=>(r in n)).map((r)=>[r,n[r]]))}var jt=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],Sr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...jt]),wr={numeric:"number-pad",decimal:"decimal-pad",tel:"phone-pad",email:"email-address",url:"url",search:"web-search",text:"default"},xr={email:{keyboardType:"email-address",verbatim:!0,autoComplete:"email"},tel:{keyboardType:"phone-pad",autoComplete:"tel"},url:{keyboardType:"url",verbatim:!0,autoComplete:"url"},number:{keyboardType:"decimal-pad"},search:{keyboardType:"web-search",returnKeyType:"search"},password:{secure:!0,verbatim:!0}},Nr={enter:"default",done:"done",go:"go",next:"next",previous:"default",search:"search",send:"send"};function te(e){return e===void 0||e===null?"":String(e).trim().toLowerCase()}function $t(e){if(e===void 0||e===null||e===!1)return!1;return te(e)!=="false"}function $e(e,...t){for(let n of t)if(e[n]!==void 0&&e[n]!==null)return e[n];return}function Vt(e,t){if(e!=="TextInput")return{};let n={},r=te(t.type),s=xr[r]??{},o=te($e(t,"inputmode","inputMode")),c=wr[o]??s.keyboardType;if(c&&c!=="default")n.keyboardType=c;if(s.secure)n.secureTextEntry=!0;let u=te($e(t,"enterkeyhint","enterKeyHint")),d=Nr[u]??s.returnKeyType;if(d&&d!=="default")n.returnKeyType=d;let g=te(t.autoCapitalize);if(g==="off"||g==="none")n.autoCapitalize="none";else if(g==="on")n.autoCapitalize="sentences";else if(!g&&s.verbatim)n.autoCapitalize="none";let b=t.autoCorrect;if(b==="off"||b==="false"||te(t.spellcheck)==="false"||b===void 0&&s.verbatim)n.autoCorrect=!1;else if(b==="on"||b==="true")n.autoCorrect=!0;if($t($e(t,"readonly","readOnly"))||$t(t.disabled))n.editable=!1;if(s.autoComplete)n.autoComplete=s.autoComplete;return Object.fromEntries(Object.entries(n).filter(([h])=>t[h]===void 0||kr(h,t[h])))}function kr(e,t){if(e==="autoCapitalize")return t==="off"||t==="on";if(e==="autoCorrect")return typeof t==="string";return!1}function Wt(e){let t=Vt(e.type,e.props);if(!Object.keys(t).length)return;e._textEntrySource=Object.fromEntries(jt.filter((n)=>(n in e.props)).map((n)=>[n,e.props[n]])),Object.assign(e.props,t)}var je={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",onchange:"onChange",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd","page-selected":"onPageSelected",pageselected:"onPageSelected",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var We={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},Fe=new Set(Object.values(We));var zt=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Ut=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function X(e){let t=typeof e==="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function J(e){return Math.round(e*1000)/1000}function Xe(e){if(Array.isArray(e)&&e.length===4&&e.every((n)=>Number.isFinite(Number(n))))return e.map(Number);let t=String(e??"").trim().split(/[\s,]+/).map(Number);if(t.length!==4||t.some((n)=>!Number.isFinite(n))||t[2]<=0||t[3]<=0)return null;return t}function Tr(e){let t=String(e??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return t.length%2?t.slice(0,-1):t}var Ft=/[MLHVCSQTAZ]/i,Ve=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Rr(e){let t=[],n=e,r=Ft.exec(n);while(r){let s=r.index;n=n.slice(s);let o=n[0];n=n.slice(1);let c=Ft.exec(n),u=c?n.slice(0,c.index):n,d;if(o==="A"||o==="a"){d=[];let g=0,b=u.trim(),h=0;while(h<b.length){let y=g%7,m=b.slice(h).replace(/^[\s,]+/,"");if(h=b.length-m.length,!m)break;if(y===3||y===4)d.push(m[0]==="1"?1:0),h+=1;else{Ve.lastIndex=0;let S=Ve.exec(m);if(!S||S.index!==0)break;d.push(Number.parseFloat(S[0])),h+=S[0].length}g++}}else d=(u.match(Ve)||[]).map(Number.parseFloat);t.push({command:o,args:d}),r=c}return t}function _r(e,t,n,r,s,o,c,u,d){if(e===u&&t===d)return[];let g=Math.abs(n),b=Math.abs(r);if(!g||!b)return[1,u,d];let h=s*Math.PI/180,y=Math.cos(h),m=Math.sin(h),S=(e-u)/2,f=(t-d)/2,l=y*S+m*f,x=-m*S+y*f,p=l*l/(g*g)+x*x/(b*b);if(p>1)g*=Math.sqrt(p),b*=Math.sqrt(p);let N=g*g*b*b-g*g*x*x-b*b*l*l,v=g*g*x*x+b*b*l*l,k=Math.sqrt(Math.max(0,N/v));if(o===c)k=-k;let w=k*(g*x)/b,R=k*-(b*l)/g,I=y*w-m*R+(e+u)/2,P=m*w+y*R+(t+d)/2,E=(B,W,F,q)=>{let Y=B*q-W*F<0?-1:1,G=(B*F+W*q)/(Math.hypot(B,W)*Math.hypot(F,q));return Y*Math.acos(Math.min(1,Math.max(-1,G)))},T=E(1,0,(l-w)/g,(x-R)/b),_=E((l-w)/g,(x-R)/b,(-l-w)/g,(-x-R)/b);if(!c&&_>0)_-=2*Math.PI;if(c&&_<0)_+=2*Math.PI;let C=Math.max(1,Math.ceil(Math.abs(_)/(Math.PI/2))),V=_/C,A=1.3333333333333333*Math.tan(V/4),L=[],z=(B)=>{let W=g*Math.cos(B),F=b*Math.sin(B);return[y*W-m*F+I,m*W+y*F+P]},O=(B)=>{let W=-g*Math.sin(B),F=b*Math.cos(B);return[y*W-m*F,m*W+y*F]},M=T;for(let B=0;B<C;B++){let W=M+V,[F,q]=z(M),[Y,G]=O(M),[it,st]=z(W),[Sn,wn]=O(W);L.push(2,F+A*Y,q+A*G,it-A*Sn,st-A*wn,B===C-1?u:it,B===C-1?d:st),M=W}return L}function Ht(e){let t=[],n=0,r=0,s=0,o=0,c=0,u=0,d=0,g=0,b="";for(let{command:h,args:y}of Rr(String(e??""))){let m=h===h.toLowerCase(),S=h.toUpperCase(),f=()=>m?n:0,l=()=>m?r:0,x=0,p=(v)=>{if(x+v>y.length)return null;let k=y.slice(x,x+v);return x+=v,k};if(S==="Z"){t.push(4),n=s,r=o,b="Z";continue}let N=!0;while(x<y.length||N&&S==="Z"){switch(S){case"M":{let v=p(2);if(!v)return t;if(n=v[0]+f(),r=v[1]+l(),N)t.push(0,n,r),s=n,o=r;else t.push(1,n,r);b=N?"M":"L";break}case"L":{let v=p(2);if(!v)return t;n=v[0]+f(),r=v[1]+l(),t.push(1,n,r),b="L";break}case"H":{let v=p(1);if(!v)return t;n=v[0]+f(),t.push(1,n,r),b="L";break}case"V":{let v=p(1);if(!v)return t;r=v[0]+l(),t.push(1,n,r),b="L";break}case"C":{let v=p(6);if(!v)return t;let k=v[0]+f(),w=v[1]+l();c=v[2]+f(),u=v[3]+l(),n=v[4]+f(),r=v[5]+l(),t.push(2,k,w,c,u,n,r),b="C";break}case"S":{let v=p(4);if(!v)return t;let k=b==="C"?2*n-c:n,w=b==="C"?2*r-u:r;c=v[0]+f(),u=v[1]+l(),n=v[2]+f(),r=v[3]+l(),t.push(2,k,w,c,u,n,r),b="C";break}case"Q":{let v=p(4);if(!v)return t;d=v[0]+f(),g=v[1]+l(),n=v[2]+f(),r=v[3]+l(),t.push(3,d,g,n,r),b="Q";break}case"T":{let v=p(2);if(!v)return t;d=b==="Q"?2*n-d:n,g=b==="Q"?2*r-g:r,n=v[0]+f(),r=v[1]+l(),t.push(3,d,g,n,r),b="Q";break}case"A":{let v=p(7);if(!v)return t;let k=v[5]+f(),w=v[6]+l();t.push(..._r(n,r,v[0],v[1],v[2],v[3],v[4],k,w)),n=k,r=w,b="A";break}default:return t}N=!1}}return t.map((h)=>J(h))}function Xt(e,t,n,r){if(n<=0||r<=0)return[];let s=0.5522847498;return[0,e+n,t,2,e+n,t+s*r,e+s*n,t+r,e,t+r,2,e-s*n,t+r,e-n,t+s*r,e-n,t,2,e-n,t-s*r,e-s*n,t-r,e,t-r,2,e+s*n,t-r,e+n,t-s*r,e+n,t,4].map(J)}function ze(e,t){switch(e){case"Path":return Ht(String(t.d??""));case"Line":return[0,X(t.x1),X(t.y1),1,X(t.x2),X(t.y2)].map(J);case"Rect":{let n=X(t.x),r=X(t.y),s=X(t.width),o=X(t.height);if(s<=0||o<=0)return[];let c=t.rx===void 0?X(t.ry):X(t.rx),u=t.ry===void 0?c:X(t.ry);if(c=Math.min(Math.max(0,c),s/2),u=Math.min(Math.max(0,u),o/2),!c||!u)return[0,n,r,1,n+s,r,1,n+s,r+o,1,n,r+o,4].map(J);let d=0.5522847498;return[0,n+c,r,1,n+s-c,r,2,n+s-c+d*c,r,n+s,r+u-d*u,n+s,r+u,1,n+s,r+o-u,2,n+s,r+o-u+d*u,n+s-c+d*c,r+o,n+s-c,r+o,1,n+c,r+o,2,n+c-d*c,r+o,n,r+o-u+d*u,n,r+o-u,1,n,r+u,2,n,r+u-d*u,n+c-d*c,r,n+c,r,4].map(J)}case"Circle":return Xt(X(t.cx),X(t.cy),X(t.r),X(t.r));case"Ellipse":return Xt(X(t.cx),X(t.cy),X(t.rx),X(t.ry));case"Polyline":case"Polygon":{let n=Tr(t.points);if(n.length<4)return[];let r=[0,n[0],n[1]];for(let s=2;s<n.length;s+=2)r.push(1,n[s],n[s+1]);if(e==="Polygon")r.push(4);return r.map(J)}default:return null}}function Ar(e){let t=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(e??""));if(!t)return null;let n=Number(t[1])/(t[2]==="ms"?1000:1);return n>0?n:null}function Er(e){if(e.attributeName!=="d")return null;let t=Ar(e.dur),n=String(e.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(t===null||n.length<2)return null;let r=n.map(Ht);if(r.some((u)=>!u.length))return null;let s=String(e.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),c=s.length===r.length&&s[0]===0&&s[s.length-1]===1&&s.every((u,d)=>Number.isFinite(u)&&(d===0||u>=s[d-1]))?s.map(J):r.map((u,d)=>J(d/(r.length-1)));return{frames:r,frameTimes:c,duration:t}}function Ue(e){let t=Er(e),n={frames:t?.frames??null,frameTimes:t?.frameTimes??null,duration:t?.duration??null};for(let[r,s]of Object.entries(n))if(s===null)delete e[r];else e[r]=s;return n}var Ir=[...Ut,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","barStyle","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","contentContainerStyle","currentTime","defaultSource","defaultValue","ellipsizeMode","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","ios_backgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","listRole","maxLength","mostRecentEventCount","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","objectFit","objectPosition","onEndReachedThreshold","pageIndex","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","sheetDetents","selectedDetent","grabberVisible","tintColor","clearButtonMode","nonModal","dismissOnOutsideTap","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","fillColor","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],qt=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","nonModal","dismissOnOutsideTap","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture","grabberVisible"]),Cr=new Map(Ir.map((e)=>[Gt(e),e]));function Gt(e){return e.replace(/[-_]/g,"").toLowerCase()}function He(e,t){if((t==="Image"||t==="Video")&&e.toLowerCase()==="src")return"source";return Cr.get(Gt(e))??e}var Or={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mappolygon:"MapPolygon",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",segmentedcontrol:"SegmentedControl",nativesegmentedcontrol:"SegmentedControl",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function Kt(e){return Or[e.toLowerCase()]||e}var Pr={"circle-pause":"pause.circle","cloud-alert":"exclamationmark.icloud","key-round":"key",paperclip:"paperclip","rotate-cw":"arrow.clockwise","route-off":"location.slash",syringe:"syringe","volume-1":"speaker.wave.1",activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",apple:"leaf",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bean:"leaf",bed:"bed.double",beef:"fork.knife",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector","cake-slice":"birthday.cake",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera",carrot:"carrot","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-question-mark":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock","clock-alert":"clock.badge.exclamationmark",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",cookie:"birthday.cake",copy:"doc.on.doc","credit-card":"creditcard","cup-soda":"takeoutbag.and.cup.and.straw",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",drumstick:"fork.knife",dumbbell:"dumbbell",edit:"pencil",egg:"frying.pan","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",fish:"fish",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift","glass-water":"waterbottle",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",hamburger:"takeoutbag.and.cup.and.straw","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble","messages-square":"bubble.left.and.bubble.right",mic:"mic",milk:"waterbottle",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",nut:"leaf",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",salad:"leaf",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",soup:"mug",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",utensils:"fork.knife",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wheat:"laurel.leading",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",wine:"wineglass",x:"xmark","x-circle":"xmark.circle",zap:"bolt"},Jt={lucide:Pr,hugeicons:{"workout-run":"figure.run"}};function ie(e,t=!1){let n=String(e??"").trim();if(!n)return{symbol:"questionmark.square.dashed",known:!1};if(t)return{symbol:n,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(n)??/^([a-z0-9]+):(.+)$/.exec(n),s=r?r[1]:"lucide",o=r?r[2]:n,c=Object.hasOwn(Jt,s)?Jt[s]:void 0;if(c&&Object.hasOwn(c,o))return{symbol:c[o],iconify:`i-${s}-${o}`,known:!0};if(!r&&n.includes("."))return{symbol:n,known:!0};return{symbol:"questionmark.square.dashed",iconify:r?n:`i-lucide-${o}`,known:!1}}function Ge(e){return e.split(/\s+/).find((t)=>/^i-[a-z0-9]+-[a-z0-9-]+$/.test(t))}import{generate as me,parse as Mr}from"@stacksjs/ts-css/parse";var Br=/^(?::hover|:active|:visited|:focus|:focus-visible|:focus-within)$/;function Lr(e){let t=e.replace(/\s+/g,"").toLowerCase();if(!t||t==="all"||t==="screen")return{};if(/^(?:screenand)?\(prefers-color-scheme:dark\)$/.test(t))return{dark:!0};if(/^(?:screenand)?\(prefers-color-scheme:light\)$/.test(t))return{};if(/prefers-reduced-motion|\(hover|\(pointer|print|forced-colors|prefers-contrast/.test(t))return"skip";let n=t.replace(/^screenand/,"").split("and"),r={};for(let s of n){let o=/^\((min|max)-width:([\d.]+)(px|rem|em)\)$/.exec(s);if(!o)return;r[o[1]]=Number(o[2])*(o[3]==="px"?1:16)}return r}async function Yt(e,t){let n={},r=new Set,s=(g)=>{if(r.has(g))return;r.add(g),t(g,[...g.matchAll(/\.(-?[a-z_][\w-]*)/gi)].map((b)=>b[1]))},o=(g,b,h)=>{if(!b.trim())return;let y=n[g]??={},m=h.dark?"dark":"light";if(h.min===void 0&&h.max===void 0){y[m]=y[m]?`${y[m]};${b}`:b;return}let S=y.responsive??=[],f=h.min??0,l=S.find((x)=>x.min===f&&x.max===h.max);if(!l)S.push(l={min:f,...h.max===void 0?{}:{max:h.max}});l[m]=l[m]?`${l[m]};${b}`:b};function c(g,b){for(let h of g){if(h.type==="Atrule"){let S=h.name.toLowerCase();if(["font-face","keyframes","-webkit-keyframes","import","charset","property","page","layer"].includes(S)){if(S==="layer"&&h.block)c(h.block.children,b);continue}if(S!=="media"||!h.block){s(`@${S}`);continue}let f=h.prelude?me(h.prelude):"",l=Lr(f);if(l==="skip")continue;if(!l){s(`@media ${f}`);continue}c(h.block.children,{dark:b.dark||l.dark,min:l.min??b.min,max:l.max??b.max});continue}if(h.type!=="Rule"||h.block.type!=="Block")continue;let y=[...h.block.children].filter((S)=>S.type==="Declaration").map((S)=>me(S)).join(";"),m=h.prelude.type==="SelectorList"?[...h.prelude.children].map(me):[me(h.prelude)];for(let S of m){let f=/^(?:(?:html|:root)?\.dark\s+)?((?:\.-?[a-z_][\w-]*)+)((?::{1,2}[a-z-]+)*)$/i.exec(S.trim());if(!f){if(!/^(?:html|:root|body|\*|::?[a-z-]+)/i.test(S.trim()))s(S.trim());continue}let l=f[2];if(l){if(!Br.test(l))s(S.trim());continue}let x=b.dark||/^(?:(?:html|:root)?\.dark\s+)/i.test(S.trim());o(f[1].slice(1),y,{dark:x,min:b.min,max:b.max})}}}let u="",d=!0;await new HTMLRewriter().on("style",{element(g){u="";let b=g.getAttribute("type");d=!b||b.toLowerCase()==="text/css",g.onEndTag(()=>{if(!d)return;try{let h=Mr(u);if(h.type==="StyleSheet")c(h.children,{})}catch{s("invalid stylesheet")}})},text(g){u+=g.text}}).transform(new Response(e)).text();for(let g of Object.values(n))g.responsive?.sort((b,h)=>b.min-h.min||(b.max??1/0)-(h.max??1/0));return n}import{generate as se,parse as Qt}from"@stacksjs/ts-css/parse";async function Zt(e,t){let n={light:new Map,dark:new Map},r=new Set,s=(h)=>{if(!r.has(h))r.add(h),t(h)},o=(h,y,m)=>{for(let S of m){let f=n[S].get(h);if(!f||Number(y.important)>Number(f.important)||y.important===f.important&&y.specificity>=f.specificity)n[S].set(h,y)}},c=(h)=>{if(h.type==="Declaration")return h.property.startsWith("--");if(h.type==="Rule"||h.type==="Atrule")return!!h.block&&[...h.block.children].some(c);return!1},u=(h)=>{let y=h.replace(/\s+/g,"").toLowerCase();if(!y||y==="all"||y==="screen")return["light","dark"];let m=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(y);return m?[m[1]]:void 0};function d(h,y){for(let m of h){if(!c(m))continue;if(m.type==="Atrule"){let f=m.prelude?se(m.prelude):"",l=m.name.toLowerCase()==="media"?u(f):void 0;if(!l){s(`@${m.name} ${f}`.trim());continue}d(m.block.children,y.filter((x)=>l.includes(x)));continue}if(m.type!=="Rule")continue;let S=m.prelude.type==="SelectorList"?[...m.prelude.children].map(se):[se(m.prelude)];for(let f of S){let l=/^(html|:root)?(?:\.(dark|light))?$/.exec(f.trim());if(!l||!l[1]&&!l[2]){s(f);continue}let x=(l[1]===":root"?10:l[1]?1:0)+(l[2]?10:0);for(let p of m.block.children){if(p.type!=="Declaration"){if(c(p))s(`nested rule in ${f}`);continue}if(!p.property.startsWith("--"))continue;let N={value:se(p.value),important:!!p.important,specificity:x};o(p.property,N,y.filter((v)=>!l[2]||l[2]===v))}}}}let g="",b;return await new HTMLRewriter().on("html",{element(h){let y=h.getAttribute("style");if(!y)return;try{let m=Qt(y,{context:"declarationList"});if(m.type!=="DeclarationList")return;for(let S of m.children)if(S.type==="Declaration"&&S.property.startsWith("--"))o(S.property,{value:se(S.value),important:!!S.important,specificity:1000},["light","dark"])}catch{s("invalid document inline theme")}}}).on("style",{element(h){g="";let y=h.getAttribute("type");b=!y||y.toLowerCase()==="text/css"?u(h.getAttribute("media")??""):void 0,h.onEndTag(()=>{try{let m=Qt(g);if(m.type!=="StyleSheet")return;if(!b){if([...m.children].some(c))s("style type/media");return}d(m.children,b)}catch{s("invalid stylesheet")}})},text(h){g+=h.text}}).transform(new Response(e)).text(),{light:[...n.light].map(([h,y])=>[h,y.value]),dark:[...n.dark].map(([h,y])=>[h,y.value])}}function H(e,t={},n={},r={},s=[]){return{type:e,props:t,style:n,events:r,children:s}}function en(e,t,n={}){return{version:"1.0.0",root:e,script:t,meta:{source:n.source||"unknown",compiledAt:n.compiledAt||Date.now(),headwindConfig:n.headwindConfig}}}var Dr=/^(?:key(?:down|up|press)|mouse[a-z]+|pointer[a-z]+|dbl(?:click)?|contextmenu|wheel|drag[a-z]*|drop|copy|cut|paste|beforeinput|compositionstart|compositionupdate|compositionend|animation[a-z]+|transition[a-z]+|resize|hashchange|popstate|beforeunload|unload|visibilitychange|selectionchange|selectstart|auxclick)$/,tn=new Set(["script","style","head","meta","link","title","base","noscript"]),nn=new Set(["template","body","html","main","fragment"]),ye=new Set,$r=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onPageSelected","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),be=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","SegmentedControl","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...Fe]),jr=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),rn=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Vr={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function Z(e){return e.replace(/&(#x?[0-9a-f]+|\w+);/gi,(t,n)=>{let r=Vr[n.toLowerCase()];if(r!==void 0)return r;if(n[0]==="#"){let s=n[1]==="x"||n[1]==="X"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):t}return t})}function Je(e){if(!e.includes("{{"))return null;let t=[],n=0;for(let r of e.matchAll(/\{\{([\s\S]+?)\}\}/g)){if(r.index>n)t.push(JSON.stringify(e.slice(n,r.index)));t.push(`(${r[1].trim()})`),n=r.index+r[0].length}if(!t.some((r)=>r.startsWith("(")))return null;if(n<e.length)t.push(JSON.stringify(e.slice(n)));if(t.length===1)return t[0].slice(1,-1);return`[${t.join(", ")}].map(__stxPart => __stxPart == null ? '' : __stxPart).join('')`}function on(e,t,n,r={}){let s=r.inheritedVariables,o={},c={},u={},d=[],g="",b={};for(let[S,f]of t){let l=S.toLowerCase();if(l==="class"||l==="classname"){g=g?`${g} ${f}`:f;continue}if(l==="style"){b={...b,...Wr(e,f,n,{...r,onVariables(v){s=v,r.onVariables?.(v)}})};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){u[l.startsWith(":")?l.slice(1):l.slice(2)]=Z(f);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let v=l.startsWith("@")?l.slice(1):l.slice(5),[k]=v.split("."),w=je[k]??(k.startsWith("on")?k:"");if(!w||!$r.has(w)){if(Dr.test(k)||/\./.test(v))n.push({kind:"unread-event",tag:e,name:S});continue}c[w]=Z(f);continue}if(l==="key"){o.key=f;continue}let x=Z(f),p=Je(x);if(p){u[l]=p,d.push(l);continue}let N=He(S);if(x===""&&qt.has(N)){o[N]=!0;continue}try{o[N]=JSON.parse(x)}catch{o[N]=x}}let h=o["data-native"]?o["data-native"]==="TextInput":e==="textarea"||e==="input"&&!["checkbox","radio","hidden"].includes(String(o.type??"text").toLowerCase()),y=g?ge(g,s,{focus:h,focusWithin:!0,rules:r.rules}):void 0;for(let S of new Set(y?.unknown??[]))n.push({kind:"unknown-class",tag:e,name:S});let m=Oe({...y?.style,...b});return{props:o,style:m,events:c,bindings:u,classes:g,inline:b,templated:d}}function Wr(e,t,n,r){return de(Z(t),(s)=>n.push({...s,tag:e}),r)}function Ye(e){return e.children.map((t)=>typeof t==="string"?t:Ye(t)).join("").replace(/\s+/g," ").trim()}function Fr(e,t){let n=e.node;if(n.props["data-stx-native-template"])return n.children=n.children.map((o)=>typeof o==="string"?H("Text",{},{},{},[o]):o),n;let r=n.children.filter((o)=>typeof o!=="string"),s=n.children.filter((o)=>typeof o==="string").join("").trim();if(e.tag==="button"&&n.type==="Button"&&!e.declaredNative&&r.length>0)return n.type="Pressable",n.props.role??="button",n.children=n.children.flatMap((o)=>typeof o==="string"?o.trim()?[H("Text",{},{},{},[o.trim()])]:[]:[o]),n;if(n.type==="Button"&&r.length===0)return n.children=s?[s]:[],n;if(n.type==="Svg"||n.type==="G")return n.children=r,n;if(n.type==="SvgText"){let o=Ye(n);return n.children=o?[o]:[],n}if(rn.has(n.type)&&r.length===0&&s)return n.type="Text",n.children=[s],n;if(n.type==="Text"&&!s&&r.length===0&&typeof n.props.text==="string")return n.children=n.props.text?[n.props.text]:[],delete n.props.text,n;if(n.type==="Text"&&r.length>0){if(/(?:^|\s)(?:inline-)?(?:flex|grid)(?:\s|$)/.test(n._classes??"")||r.some((u)=>u.type!=="Text"))return n.type="View",n.children=n.children.map((u)=>typeof u==="string"?H("Text",{},{},{},[u]):u),n;let c=Ye(n);return t.push({kind:"flattened-text",tag:e.tag}),n.children=c?[c]:[],n}if(rn.has(n.type)&&r.length>0)n.children=r;return n}async function Xr(e,t={}){e=await oe(e);let n=[],r=await Zt(e,(l)=>n.push({kind:"unsupported-theme-rule",tag:"style",name:l})),s=re(r.light).computed(),o=new Set([...e.matchAll(/\sclass(?:name)?\s*=\s*"([^"]*)"/gi)].flatMap((l)=>l[1].split(/\s+/))),c=await Yt(e,(l,x)=>{if(!x.length||x.some((p)=>o.has(p)))n.push({kind:"unsupported-style-rule",tag:"style",name:l})}),u=[],d=[],g=new Set;function b(l){let x=d[d.length-1];if(!x)u.push(l);else if(!x.dropped)x.node.children.push(l)}function h(l){let x=l.node.style.fontFamily,p=(v)=>{if(l.tag!=="html"&&l.node._styleSource)v._styleAncestors=[l.node._styleSource,...v._styleAncestors??[]];if(x&&v.style.fontFamily===void 0)v._layoutDefaults={...v._layoutDefaults,fontFamily:x},v.style={fontFamily:x,...v.style}};if(l.node.bindings&&Object.keys(l.node.bindings).length>0){let v=l.node.children,k=v.filter((R)=>typeof R!=="string"),w=k.length===1&&k.length===v.length?k[0]:H("View",{},{},{},v);if(w.bindings={...l.node.bindings,...w.bindings},w.bindingId===void 0&&l.node.bindingId!==void 0)w.bindingId=l.node.bindingId;p(w),b(w);return}let N=d[d.length-1];for(let v of l.node.children){if(typeof v==="string"){if(N&&!N.dropped)N.node.children.push(v);continue}if(p(v),!N)u.push(v);else if(!N.dropped)N.node.children.push(v)}}function y(l,x){let p=d[d.length-1];if(l==="svg"||p?.svg)return m(l,x,p);let N=tn.has(l)&&!ye.has(l),v=d[d.length-1]?.dropped??!1,k=p?.variables??s,{props:w,style:R,events:I,bindings:P,classes:E,inline:T,templated:_}=N||v?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:on(l,x,n,{inheritedVariables:k,onVariables:(O)=>{k=O},rules:c});if(l==="html")k=s;let C=w["data-native"],V=l==="template"&&x.some(([O])=>[":for","x-for","@for"].includes(O)),A;if(V)A="View",w["data-stx-native-template"]=!0;else if(typeof C==="string"&&be.has(C))A=C,delete w["data-native"];else{if(A=ye.has(l)?"View":Kt(l),(l==="i"||l==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(E))A="Icon";else if(l==="i"&&x.some(([O])=>/^(?::|x-)class$/i.test(O)))A="Icon";if(l==="input"){let O=String(w.type??"text").toLowerCase();if(O==="checkbox")A="Checkbox",w.formValue=w.value??"on",w.checked=w.checked===""||w.checked===!0||w.checked==="true",w.value=w.checked;else if(O==="hidden")A="View",R.display="none",T.display="none";else if(O==="radio")A="View",w.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:l,name:"input:radio"})}}if(!v&&A===l&&!be.has(A)&&!tn.has(l)&&!nn.has(l)&&!g.has(l))g.add(l),n.push({kind:"unmapped-tag",tag:l});if((N||ye.has(l))&&!g.has(`drop:${l}`))g.add(`drop:${l}`),n.push({kind:"dropped-subtree",tag:l});if(A==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(E))A="ScrollView",w.horizontal=!0,w.showsHorizontalScrollIndicator??=!1;else if(A==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(E))A="ScrollView";if(l==="form")w["data-stx-form"]=!0;if(l==="button"&&w.type===void 0)w.type="submit";if(l==="textarea"&&A==="TextInput")w.multiline??=!0;if((A==="Video"||A==="Image")&&w.source===void 0&&w.src!==void 0)w.source=w.src,delete w.src;if(A==="Icon"){let O=ge(E).icon,M=String(w.symbol||w.name||O||""),B=ie(M,Boolean(w.symbol));if(M.trim()&&!B.known)n.push({kind:"unknown-icon",tag:l,name:M});if(w.symbol=B.symbol,B.iconify)w.iconify=B.iconify}if(A==="FlatList"||A==="SectionList"){let O=new Set([...Object.keys(w),...Object.keys(P)].map((M)=>M.toLowerCase()));for(let[M,B]of jr)if(O.has(M))n.push({kind:"unsupported-list-prop",tag:A,name:B})}let L=H(A,w,R,I);L._inlineStyle=T,L._styleSource=Z(x.find(([O])=>O==="style")?.[1]??"");let z=w["data-stx-b"];if(typeof z==="number"&&Number.isInteger(z))L.bindingId=z;if(delete w["data-stx-b"],E)L._classes=E;if(Object.keys(P).length>0)L.bindings=P;if(_.length>0)L._templated=_;if(typeof w.key==="string")L.key=w.key,delete w.key;return{tag:l,node:L,variables:k,declaredNative:typeof C==="string"&&be.has(C),dropped:N||v||ye.has(l)||A==="Video",discard:N||v,unwrap:nn.has(l)&&!V&&A!=="ScrollView"&&!(typeof C==="string"&&be.has(C))}}function m(l,x,p){let N=p?.dropped??!1,v=We[l];if(N||!v){if(!N&&!g.has(`drop:${l}`))g.add(`drop:${l}`),n.push({kind:zt.has(l)?"dropped-subtree":"unmapped-tag",tag:l});return{tag:l,node:H("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let k=p?.variables??s,{props:w,style:R,events:I,bindings:P,classes:E,inline:T,templated:_}=on(l,x,n,{inheritedVariables:k,onVariables:(L)=>{k=L},rules:c});if(v==="Svg"){let L=Xe(w.viewBox);if(L)w.viewBox=L;else delete w.viewBox;for(let z of["width","height"]){if(typeof w[z]==="number"&&R[z]===void 0)R[z]=w[z];delete w[z]}}if(typeof w.strokeDasharray==="string"||typeof w.strokeDasharray==="number"){let L=String(w.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);w.strokeDasharray=L}let C=ze(v,w);if(C)w.geometry=C;if(v==="Animate")Ue(w);let V=H(v,w,R,I);V._inlineStyle=T,V._styleSource=Z(x.find(([L])=>L==="style")?.[1]??"");let A=w["data-stx-b"];if(typeof A==="number"&&Number.isInteger(A))V.bindingId=A;if(delete w["data-stx-b"],E)V._classes=E;if(Object.keys(P).length>0)V.bindings=P;if(_.length>0)V._templated=_;if(typeof w.key==="string")V.key=w.key,delete w.key;return{tag:l,node:V,variables:k,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(l){let x=l.tagName.toLowerCase(),p=y(x,[...l.attributes]),N=!0;try{l.onEndTag(()=>{if(d.pop(),p.discard)return;if(p.unwrap)h(p);else b(Fr(p,n))})}catch{N=!1}if(N)d.push(p);else if(!p.discard)b(p.node)},text(l){let x=d[d.length-1];if(!x||x.dropped)return;let p=zr(Z(l.text),x.inMustache===!0);x.inMustache=p.inside;let N=p.text;if(!N.trim())return;x.node.children.push(N)}}).transform(new Response(e)).text(),u.length===0)throw Error(`No element to translate in the rendered output of ${t.source??"unknown"}`);let S=u.length===1?u[0]:H("View",{},{},{},u);if(r.light.length||r.dark.length)S._stylesheetTheme=r;if(Object.keys(c).length)S._stylesheetRules=c;let f=(l)=>{Ur(l);let x=De(l.props,l.type);if(Object.keys(x).length)l._accessibilitySource=Object.fromEntries(Le.filter((p)=>(p in l.props)).map((p)=>[p,l.props[p]])),Object.assign(l.props,x);Wt(l);for(let p of l.children)if(typeof p!=="string")f(p)};return f(S),an(S),{root:S,diagnostics:n}}function an(e){if(["ScrollView","FlatList","SectionList"].includes(e.type))return!e.props.horizontal&&(Number(e.style.flex)>0||Number(e.style.flexGrow)>0);if(!e.children.map((n)=>typeof n==="string"?!1:an(n)).some(Boolean)||!["View","SafeAreaView","KeyboardAvoidingView"].includes(e.type))return!1;if(e.style.height!==void 0||e.style.maxHeight!==void 0)return!1;if(e.style.flex===0||e.style.flexGrow===0||e.style.flexShrink===0)return!1;if(e.style.flex===void 0&&e.style.flexGrow===void 0)e._layoutDefaults={flex:1,flexGrow:1,flexShrink:1,flexBasis:0},e.style={...e._layoutDefaults,...e.style};return!0}function zr(e,t){let n="",r=0;while(r<e.length){if(!t&&e.startsWith("{{",r)){t=!0,n+="{{",r+=2;continue}if(t&&e.startsWith("}}",r)){t=!1,n+="}}",r+=2;continue}let s=e[r];if(!t&&/\s/.test(s)){if(!n.endsWith(" "))n+=" ";while(r<e.length&&/\s/.test(e[r]))r++;continue}n+=s,r++}return{text:n,inside:t}}function Ur(e){if(e.props["data-stx-native-template"])return;if(e.bindings?.text||e.children.length===0)return;let t=e.children.filter((r)=>typeof r==="string");if(t.length<e.children.length){let r=e.type==="Button"||e.type==="Text"?null:Je(t.join(""));if(!r)return;e.bindings={...e.bindings,text:r},e._templated=[...e._templated??[],"text"],e.children=e.children.filter((s)=>typeof s!=="string");return}let n=Je(e.children.join(""));if(!n)return;if(e.type!=="Button")e.bindings={...e.bindings,text:n},e._templated=[...e._templated??[],"text"],e.children=[];else{e.type="Pressable",e.props.role??="button";let r=H("Text",{},{},{},[]);r.bindings={text:n},r._templated=["text"],e.children=[r]}}async function cn(e,t={}){let{root:n,diagnostics:r}=await Xr(e,t),s=t.script??{exports:{},functions:[],code:""};return{document:en(n,s,{source:t.source??"unknown"}),diagnostics:r}}async function oe(e){if(!/\bdata-native-exclude\b/i.test(e))return e;return new HTMLRewriter().on("[data-native-exclude]",{element(t){t.remove()}}).transform(new Response(e)).text()}var ln=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Hr=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,qr=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,un=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Qe(e){let t=[];ln.lastIndex=0;for(let o of e.matchAll(ln)){let c=o[1]??"";if(/\bserver\b/.test(c))continue;t.push(o[2].trim())}let n=t.filter(Boolean).join(`
4
+
5
+ `),r=[];for(let o of[Hr,qr]){o.lastIndex=0;for(let c of n.matchAll(o))if(!r.includes(c[1]))r.push(c[1])}let s={};un.lastIndex=0;for(let o of n.matchAll(un)){let c=o[2];try{s[o[1]]=JSON.parse(c.replace(/^'(.*)'$/,'"$1"'))}catch{s[o[1]]=c}}return{exports:s,functions:r,code:n}}var ne="[data-native-chrome]";function Gr(e){let t=(e??"").trim().toLowerCase();return t==="tabs"||t==="bar"?t:""}function dn(e,t){let n=ie(e);if(!n.known&&/^i-|:/.test(e))t?.(e);return n.known||/^i-|:/.test(e)?n.symbol:e}function Kr(e){let t=(e??"").trim();if(!t.startsWith("/")||t.startsWith("//"))return null;return t}function fn(e){return e.replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0?39;/g,"'").replace(/\s+/g," ").trim()}async function pn(e,t){if(!/\bdata-native-chrome\b/i.test(e))return{html:e,chrome:null};let n=[],r=[],s=new Set,o=[],c=[],u=null,d=null,g=!1;if(await new HTMLRewriter().on(ne,{element(y){g=!0;let m=y.getAttribute("data-stx-scope");if(m)s.add(m);n.push(Gr(y.getAttribute("data-native-chrome"))),y.onEndTag(()=>{n.pop()})}}).on("[data-stx-component-wrapper]",{element(y){let m={scope:y.getAttribute("data-stx-scope")??"",children:0,chrome:0};o.push(m),y.onEndTag(()=>{if(o.pop(),m.scope&&m.children>0&&m.chrome===m.children)s.add(m.scope)})}}).on("[data-stx-component-wrapper] > *",{element(y){let m=o[o.length-1];if(!m)return;if(m.children++,y.hasAttribute("data-native-chrome"))m.chrome++}}).on(`${ne} [data-stx-scope]`,{element(y){let m=y.getAttribute("data-stx-scope");if(m)s.add(m)}}).on(`${ne} script[data-stx-component-factories]`,{element(y){let m=[...y.attributes].map(([S,f])=>f===""?S:`${S}="${f.replace(/"/g,"&quot;")}"`).join(" ");u="",y.onEndTag(()=>{c.push(`<script ${m}>${u}</script>`),u=null})},text(y){if(u!==null)u+=y.text}}).on(`${ne} a`,{element(y){let m=Kr(y.getAttribute("href")),S=n[n.length-1]??"";if(!m||!S)return;let f=y.getAttribute("data-native-icon")||Ge(y.getAttribute("class")??""),l={path:m,title:"",region:S,label:y.getAttribute("aria-label")||y.getAttribute("title")||"",...f?{symbol:dn(f,t)}:{}};d=l,y.onEndTag(()=>{if(l.title=fn(l.title)||fn(l.label),r.push(l),d===l)d=null})},text(y){if(d)d.title+=y.text}}).on(`${ne} a *`,{element(y){if(!d||d.symbol)return;let m=y.getAttribute("data-native-icon")||Ge(y.getAttribute("class")??"");if(m)d.symbol=dn(m,t)}}).transform(new Response(e)).text(),!g)return{html:e,chrome:null};let b=await new HTMLRewriter().on(ne,{element(y){y.remove()}}).on("script[data-stx-owner]",{element(y){if(s.has(y.getAttribute("data-stx-owner")??""))y.remove()}}).transform(new Response(e)).text(),h=(y)=>r.filter((m)=>m.region===y).map(({path:m,title:S,symbol:f})=>({path:m,title:S,...f?{symbol:f}:{}}));return{html:c.join(`
6
+ `)+b,chrome:{tabs:h("tabs"),bar:h("bar")}}}var ve=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,gn=/function\s+(__stx_setup_[\w$]+)\s*\(/,Jr=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function Ze(e){ve.lastIndex=0;for(let t of e.matchAll(ve)){let n=t[2].trim(),r=gn.exec(n)?.[1];if(r)return{name:r,code:n}}return null}function hn(e){let t=[];ve.lastIndex=0;for(let n of e.matchAll(ve)){let r=n[1],s=n[2].trim(),o=Jr.exec(r)?.[1],c=/\bdata-stx-component-factories\b/i.test(r);if(!s||!o&&!c&&!gn.test(s))continue;t.push(o?{code:s,owner:o}:{code:s})}return t}function Qr(){let e=[K.join(import.meta.dir,"..","primitives"),K.join(import.meta.dir,"native","primitives")];for(let t of e)if(Yr(K.join(t,"View.stx")))return t;return e[0]}async function Zr(e,t,n={}){e=await oe(e);let r=n.root??K.dirname(t),s=await a(r),o=typeof s.root==="string"&&s.root?K.resolve(r,s.root):r,c=(T,_)=>T?K.isAbsolute(T)?T:K.resolve(o,T):K.join(o,_),u={root:r,layoutsDir:c(s.layoutsDir,"layouts"),partialsDir:c(s.partialsDir,"partials"),storesDir:c(s.storesDir,"stores"),componentsDir:n.componentsDir??(s.componentsDir?c(s.componentsDir,"components"):K.join(o,"components")),buildMode:"serve",cache:!1,_targetComponentDirs:[Qr()],_targetComponentFallbackNames:["Button","Checkbox","Switch","TextInput","Image","Video"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:s._pluginComponentDirs??[]},d={...n.context??{},__stx_inject_css:!1,__stx_native_screen:!0},g=new Set([t]),b=await i(e,d,t,u,g),h=[],{html:y,chrome:m}=await pn(await oe(b),(T)=>{h.push({kind:"unknown-icon",tag:"data-native-chrome",name:T})}),{html:S,manifest:f}=at(await oe(y)),l=await Bt(r),{document:x,diagnostics:p}=await cn(l?`<style>${l}</style>${S}`:S,{source:t,script:Qe(e)});p.unshift(...h),ei(x.root,f);let N=d.__stx_runtime_head;if(typeof N?.title==="string"&&N.title.trim())x.title=N.title.trim();if(m)x.chrome=m;let v=Ze(S),k=hn(S);if(Qe(e).code.trim()){let T=await ls(e,t,n.context,{forceClientSetup:!0}),_=Ze(T.setupCode??"");if(v=_??v,_&&!k.some((C)=>C.code===_.code))k.push({code:_.code})}let{buildModuleRegistryScript:w,registeredModuleIdsIn:R}=await import("./chunk-rshaz0df.js"),I=async()=>{let T=[],_=await w(R(...k.map((C)=>C.code)),{collectInputs:T});for(let C of T)g.add(C);return _},P=await I();if([...k.map((T)=>T.code),P??""].some((T)=>/\buseStore\s*\(/.test(T))&&/<script\b[^>]*\bdata-stx-stores\b/i.test(S)){let{getStoreScript:T}=await import("./chunk-p13dxvaj.js"),_=await T(u.storesDir);if(_){k.unshift({code:_});for(let C of new Bun.Glob("*.ts").scanSync({cwd:u.storesDir,absolute:!0}))g.add(C);P=await I()}}if(P)k.unshift({code:P});return{document:x,manifest:f,setup:v,scripts:k,diagnostics:p,html:S,dependencies:[...g]}}function ei(e,t){let n=new Map(t.entries.map((o)=>[o.id,o])),r=t.entries.reduce((o,c)=>Math.max(o,c.id),-1)+1,s=(o)=>{if(o._templated?.length&&o.bindings){if(o.bindingId===void 0||!n.has(o.bindingId)){let u={id:o.bindingId??r++,bindings:[]};o.bindingId=u.id,n.set(u.id,u),t.entries.push(u)}let c=n.get(o.bindingId);for(let u of o._templated){let d=`:${u}`,g=ke(d);if(g&&!c.bindings.some((b)=>b.name===d))c.bindings.push({name:d,value:o.bindings[u],kind:g})}}for(let c of o.children)if(typeof c!=="string")s(c)};s(e)}async function Se(e,t={}){return Zr(await Bun.file(e).text(),e,t)}var Bs=Symbol("stx.nativeWebStorage.raw");var ae="__app";async function si(e){try{let{loadCssEngineConfig:t}=await import("./chunk-yazqtmq4.js");return yt(await t(e))}catch{return{}}}var we="__runtime",oi="__messages";function et(e){let n=[D.join(import.meta.dir,"..","runtime",`${e}.ts`),D.join(import.meta.dir,"..","runtime",`${e}.js`),D.join(import.meta.dir,"native","runtime",`${e}.js`)].find((r)=>nt(r));if(!n)throw Error(`Native runtime module ${e} is missing`);return n}async function tt(e,t,n,r,s){let o={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{r.add(d);let g=s?.get(d);return g===void 0?void 0:{contents:g,loader:"js"}})}},c=await Bun.build({entrypoints:[e],target:"browser",format:"iife",minify:n,plugins:[o,...t],define:{"process.env.NODE_ENV":JSON.stringify(n?"production":"development")}});if(!c.success){let u=c.logs.map((d)=>String(d.message??d)).join(`
7
+ `);throw Error(`Could not bundle ${e}:
8
+ ${u}`)}return(await c.outputs[0].text()).trim()}var ai=/^[\w-]+(?:\/[\w-]+)*$/,ci=/^[\w-]+$/;async function li(e,t){let n=D.resolve(e,t.dir);if(!t.languages?.length)throw Error("messages.languages must name at least one language");let r=new Map,s=new Map;for(let o of t.languages){if(!ci.test(o))throw Error(`messages: "${o}" is not a language directory name`);let c=D.join(n,o);if(!nt(c))throw Error(`messages: ${D.relative(e,c)} does not exist`);let u=new Map;for(let d of[...new Bun.Glob("**/*.{ts,js,mjs,json}").scanSync({cwd:c})].sort()){if(/\.(?:test|spec|d)\.[^.]+$/.test(d))continue;let g=d.replace(/\.[^./]+$/,"").split(D.sep).join("/");if(!ai.test(g))throw Error(`messages: ${o}/${d} is not an area name`);if(u.has(g))throw Error(`messages: ${o}/${g} is defined twice`);let b=D.join(c,d),h=await import(b),y=Object.keys(h).filter((f)=>f!=="default");if(y.length)throw Error(`messages: ${o}/${d} exports ${y.join(", ")}; a message module exports its messages as default, and nothing else`);let m=h.default,S=m!==null&&typeof m==="object"&&!Array.isArray(m)?JSON.stringify(m):void 0;if(S===void 0||!Bun.deepEquals(JSON.parse(S),m,!0))throw Error(`messages: ${o}/${d} must export plain data (an object JSON can hold) as default`);u.set(g,S),r.set(b,{language:o,area:g})}s.set(o,u)}return{files:r,data:s}}function ui(e,t){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(e)}, ${JSON.stringify(t)});`}function di(e){let t=new Map;for(let[n,{language:r,area:s}]of e.files){let o=ui(r,s);t.set(n,o),t.set(ii(n),o)}return t}function fi(e){let t=new Set;for(let n of e.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))t.add(n[1]);return[...t].sort()}function pi(e,t){let n=D.isAbsolute(e.meta.source)?D.relative(t,e.meta.source).split(D.sep).join("/"):e.meta.source;return{...e,script:{exports:e.script.exports,functions:[],code:""},meta:{...e.meta,source:n,compiledAt:0}}}async function rt(e){let t=Object.keys(e.screens);if(t.length===0)throw Error("screens must name at least one .stx file");let n=e.routed??!0,r=e.initialScreen??t[0];if(!e.screens[r])throw Error(`Initial screen ${r} is not in screens`);let s=D.resolve(e.root??process.cwd());if(e.messages&&!e.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(e.sharedRuntime&&!e.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(e.messages&&!e.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(e.messages&&e.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let o=e.messages?await li(s,e.messages):null,c=e.styleConfig??await si(s),u=o?di(o):null,d=[],g=async()=>{for(let T of t){let _=D.resolve(s,e.screens[T]);if(!_.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);d.push({name:T,file:_,compiled:await Se(_,{root:s})})}};await mt(c,()=>u?vo(u,g):g());let b=et("jsc-globals"),h=et("shared-screen"),y=e.app?D.resolve(s,e.app):null;if(y&&!nt(y))throw Error(`The app script ${e.app} does not exist`);if(y&&!n)throw Error("An app script needs a routed bundle");if(y&&e.screens[ae])throw Error(`${ae} is the app script's route, not a screen name`);let m=e.browser;if(e.screens[we])throw Error(`${we} is the runtime prelude's file, not a screen name`);let S=gt();if(m&&e.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let f=(T,_,C)=>{let V=n?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
9
+ var isApp = ${y?`routeName === ${JSON.stringify(ae)}`:"false"};
10
+ if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
11
+ if (isApp ? ${!_} : ${JSON.stringify(T.map(({name:F})=>F))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
12
+ var isApp = false;`,A=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
13
+ nativeDocument = ${JSON.stringify(pi(q.document,s))};
14
+ manifest = ${JSON.stringify(q.manifest)};
15
+ }`).join(`
16
+ `),L=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
17
+ g.__stx_latestSetup = null;
18
+ ${q.scripts.map((G)=>G.owner?` g.__stx_componentSetups = g.__stx_componentSetups || {};
19
+ // Kept by id as well as run once: a :for or :if clone of this component
20
+ // has no script to copy, and is set up from this (component hydration).
21
+ g.__stx_componentSetups[${JSON.stringify(G.owner)}] = function() {
22
+ ${G.code}
23
+ };
24
+ g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(G.owner)});
25
+ try { g.__stx_componentSetups[${JSON.stringify(G.owner)}](); }
26
+ finally { g.__STX_SETUP_ROOT__ = null; }`:G.code).join(`
27
+ `)}
28
+ }`).join(`
29
+ `),z=_&&y,O=m?et("browser-screen"):null,M=m?Bun.resolveSync(m.platformModule,s):null;return`
30
+ ${C?`var runtime = globalThis.__stxNativeRuntime;
31
+ if (!runtime || runtime.version !== ${JSON.stringify(C)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${we}.js from the same build first');
32
+ var installJSCGlobals = runtime.installJSCGlobals;
33
+ var prepareNativeApp = runtime.prepareNativeApp;
34
+ var prepareSharedNativeScreen = runtime.prepareSharedNativeScreen;`:`import { installJSCGlobals } from ${JSON.stringify(b)};
35
+ import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(h)};`}
36
+ ${m?`import { createBrowserScreenBridge } from ${JSON.stringify(O)};
37
+ import { createBrowserPlatform } from ${JSON.stringify(M)};`:""}
38
+ ${z?`import * as nativeAppModule from ${JSON.stringify(y)};`:"var nativeAppModule = null;"}
39
+ ${m?"(async function() {":""}
40
+ var g = globalThis;
41
+ installJSCGlobals(g);
42
+ g.__stxNativeStyleConfig = ${JSON.stringify(c)};
43
+ ${m?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(m.platformOptions??{})});
44
+ var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(m)});
45
+ var bridge = browserBridge;
46
+ g.__stxNativeRoute = ${JSON.stringify(r)};`:"var bridge = g.__stxNativeBridge;"}
47
+ if (!bridge) throw new Error('Missing __stxNativeBridge');
48
+ var routeNames = ${JSON.stringify(n?t:["main"])};
49
+ var shareStorage = ${JSON.stringify(e.shareStorage??{})};
50
+ ${V}
51
+ g.__stxNativeRoute = routeName;
52
+ var nativeDocument;
53
+ var manifest;
54
+ ${A}
55
+ var screen = null;
56
+ var app = null;
57
+ if (isApp) {
58
+ app = prepareNativeApp(bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
59
+ g.__stxNativeUnmount = function() { app.unmount(); };
60
+ }
61
+ else {
62
+ screen = prepareSharedNativeScreen(nativeDocument, manifest, bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
63
+ g.__stx_host = screen.host;
64
+ g.__stxNativeUnmount = function() { screen.unmount(); };
65
+ }
66
+ ${C?"runtime.startSignals();":S}
67
+ var pageSetup = g.__stx_latestSetup;
68
+ var pageRuntimeSetup = g.stx && g.stx._latestSetup;
69
+ ${L}
70
+ // The screen's setup is the native host's to run. A screen script publishes
71
+ // it where a page's document runtime adopts its own, and in a browser that
72
+ // runtime's DOMContentLoaded and stx:load ran it a second time: another copy
73
+ // of the screen, mounted beside this one. Take it, and hand the page back
74
+ // whatever setup it had.
75
+ var screenSetup = g.__stx_latestSetup || null;
76
+ g.__stx_latestSetup = pageSetup;
77
+ if (g.stx) g.stx._latestSetup = pageRuntimeSetup || null;
78
+ if (isApp) app.start(nativeAppModule);
79
+ else screen.mount(g.stx, screenSetup);
80
+ ${m?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
81
+ var unmount = g.__stxNativeUnmount;
82
+ var ended = false;
83
+ g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
84
+ g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
85
+ })().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(m.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
86
+ `},l=(T)=>({name:"stx-native-shared-screens",setup(_){_.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),_.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),x=new Set(d.flatMap(({compiled:T})=>T.dependencies)),p=d.flatMap(({compiled:T})=>T.diagnostics).map((T)=>({level:"warning",message:[T.kind,T.tag,T.name].filter(Boolean).join(": ")})),N=d.filter(({compiled:T})=>T.document.chrome),v=N.length?{chrome:Object.fromEntries(N.map(({name:T,compiled:_})=>[T,_.document.chrome]))}:{},k=e.minify??!1,w,R,I;if(e.routesDir){let T=D.resolve(s,e.routesDir);mn(T,{recursive:!0});let _=`
87
+ import { installJSCGlobals } from ${JSON.stringify(b)};
88
+ import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(h)};
89
+ globalThis.__stxNativeRuntime = {
90
+ version: '__STX_NATIVE_RUNTIME_VERSION__',
91
+ installJSCGlobals: installJSCGlobals,
92
+ prepareNativeApp: prepareNativeApp,
93
+ prepareSharedNativeScreen: prepareSharedNativeScreen,
94
+ // Each screen starts its own signals runtime, after its host is in place.
95
+ startSignals: function() {
96
+ ${S}
97
+ },
98
+ // A language's messages for an area (the compile's \`messages\`), read the
99
+ // first time they are looked into: a screen never parses a language it
100
+ // is not shown in, nor an area it does not use.
101
+ messages: function(language, area) {
102
+ var g = globalThis;
103
+ var loaded = g.__stxNativeMessages || (g.__stxNativeMessages = {});
104
+ function table() {
105
+ var forLanguage = loaded[language] || (loaded[language] = {});
106
+ if (Object.prototype.hasOwnProperty.call(forLanguage, area)) return forLanguage[area];
107
+ var value = null;
108
+ if (typeof g.__stxNativeReadMessages === 'function') {
109
+ try {
110
+ var text = g.__stxNativeReadMessages(language, area);
111
+ if (typeof text === 'string') value = JSON.parse(text);
112
+ }
113
+ catch (error) { console.error('[stx native] could not read the ' + language + ' messages for ' + area, error); }
114
+ }
115
+ forLanguage[area] = value;
116
+ return value;
117
+ }
118
+ var own = Object.prototype.hasOwnProperty;
119
+ return new Proxy({}, {
120
+ get: function(target, name) { var messages = table(); return messages && own.call(messages, name) ? messages[name] : undefined; },
121
+ has: function(target, name) { var messages = table(); return !!messages && own.call(messages, name); },
122
+ ownKeys: function() { var messages = table(); return messages ? Object.keys(messages) : []; },
123
+ getOwnPropertyDescriptor: function(target, name) {
124
+ var messages = table();
125
+ return messages && own.call(messages, name) ? { value: messages[name], writable: false, enumerable: true, configurable: true } : undefined;
126
+ },
127
+ });
128
+ },
129
+ };
130
+ `,C,V=D.join(T,`${we}.js`);if(e.sharedRuntime){let O=await tt("stx:native-shared-screens",[l(_)],k,x);C=Bun.hash(O).toString(36),R=V,await Bun.write(R,O.replace("__STX_NATIVE_RUNTIME_VERSION__",C))}else yn(V,{force:!0});let A=D.join(T,oi);yn(A,{recursive:!0,force:!0});let L={},z=[...d.map((O)=>({name:O.name,screens:[O],app:!1})),...y?[{name:ae,screens:[],app:!0}]:[]];w={};for(let O=0;O<z.length;O+=6)await Promise.all(z.slice(O,O+6).map(async(M)=>{let B=D.join(T,`${M.name}.js`),W=await tt("stx:native-shared-screens",[l(f(M.screens,M.app,C))],k,x,u??void 0);if(await Bun.write(B,W),w[M.name]=B,o)L[M.name]=fi(W)}));if(o){for(let[M,B]of o.data)for(let[W,F]of B)await Bun.write(D.join(A,M,`${W}.json`),F);let O=Object.fromEntries(Object.keys(L).sort().map((M)=>[M,L[M]]));await Bun.write(D.join(A,"routes.json"),JSON.stringify(O));for(let M of o.files.keys())x.add(M);I={dir:A,languages:[...o.data.keys()],routes:O}}if(!e.outFile)return{code:"",routes:w,runtime:R,...I?{messages:I}:{},...v,diagnostics:p,dependencies:[...x]}}let P=await tt("stx:native-shared-screens",[l(f(d,!0))],k,x);if(!e.outFile)return{code:P,...v,diagnostics:p,dependencies:[...x]};let E=D.resolve(s,e.outFile);return mn(D.dirname(E),{recursive:!0}),await Bun.write(E,P),{code:P,outFile:E,...w?{routes:w,runtime:R}:{},...I?{messages:I}:{},...v,diagnostics:p,dependencies:[...x]}}async function gi(e,t={}){return rt({...t,screens:{main:e},routed:!1})}function bn(e,t={}){return gi(e,t)}var vn=["native.config.json","stx-native.config.json"];function yi(e=process.cwd(),t){let n=t?U.resolve(e,t):vn.map((d)=>U.join(e,d)).find((d)=>xe(d));if(!n)return null;if(!xe(n))throw Error(`Native config not found: ${n}`);let r=JSON.parse(mi(n,"utf8")),s=Object.entries(r.screens??{});if(s.length===0)throw Error(`${U.basename(n)} must name at least one screen in "screens"`);let o={};for(let[d,g]of s){if(!/^[A-Z][\w-]*$/i.test(d))throw Error(`Invalid native screen name: ${d}`);if(typeof g!=="string"||!g.endsWith(".stx"))throw Error(`Screen ${d} must name a .stx file`);if(o[d]=U.resolve(U.dirname(n),g),!xe(o[d]))throw Error(`Screen ${d} not found: ${o[d]}`)}let c=r.initialScreen||s[0][0];if(!o[c])throw Error(`Initial screen ${c} is not in screens`);if(r.app!==void 0&&typeof r.app!=="string")throw Error(`"app" must name the app script's file`);let u=r.app?U.resolve(U.dirname(n),r.app):void 0;if(u&&!xe(u))throw Error(`App script not found: ${u}`);return{initialScreen:c,screens:o,file:n,...u?{app:u}:{}}}async function fa(e,t={}){let n=U.resolve(t.cwd??process.cwd()),r=t.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let s=e?null:yi(n,t.config);if(!e&&!s)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${vn[0]}`);let o,c=[];if(r==="bundle"){let d=s?await rt({screens:s.screens,initialScreen:s.initialScreen,minify:t.minify,root:n,...s.app?{app:s.app}:{}}):await bn(U.resolve(n,e),{minify:t.minify});o=d.code,c=d.diagnostics}else{let d=async(b)=>{let h=await Se(b);return c.push(...h.diagnostics.map((y)=>({level:"warning",message:[y.kind,y.tag,y.name].filter(Boolean).join(": ")}))),h.document},g=s?{initialScreen:s.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(s.screens).map(async([b,h])=>[b,await d(h)])))}:await d(U.resolve(n,e));o=JSON.stringify(g,null,2)}if(!t.output)return{output:o,diagnostics:c};let u=U.resolve(n,t.output);return hi(U.dirname(u),{recursive:!0}),await Bun.write(u,o),{output:o,written:u,diagnostics:c}}export{fa as runNativeCompile};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- function T(){let{NODE_ENV:n}=process.env;return n==="production"}function K(){let{STX_DEBUG:n}=process.env;return!T()||n==="true"}function kn(){let{NODE_ENV:n}=process.env;return n==="test"}function bi(n,t){return t??(n==="compile"||T())}function Rr(n){if(!n)return n;try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(n).trim()}catch{return n}}
3
- export{T,K,kn,bi,Rr};
2
+ function T(){let{NODE_ENV:n}=process.env;return n==="production"}function K(){let{STX_DEBUG:n}=process.env;return!T()||n==="true"}function kn(){let{NODE_ENV:n}=process.env;return n==="test"}function vi(n,t){return t??(n==="compile"||T())}function Ar(n){if(!n)return n;try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(n).trim()}catch{return n}}
3
+ export{T,K,kn,vi,Ar};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{W,Oe}from"./chunk-9d9rn9qs.js";var o=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function u(t,e,r){let i={fullTag:r,content:e,attrs:t};if(/\bserver\b/.test(t))return{...i,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...i,type:"client"};if(o.test(e))return{...i,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...i,type:"client"};return{...i,type:"server"}}var S=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function Yt(t){let e=[],r=[],i=[],c=0;while(c<t.length){let s=t.indexOf("<",c);if(s===-1)break;let p=Oe(t,s);if(p>s){c=p;continue}let a=W(t,s);if(a>s){let f=t.slice(s,a),l=S.exec(f);if(l){let n=u(l[1],l[2],f);switch(n.type){case"signals":e.push(n);break;case"client":r.push(n);break;case"server":i.push(n);break}}c=a;continue}c=s+(t.startsWith("<!--",s)?4:1)}return{signals:e,client:r,server:i}}
2
+ import{W,Oe}from"./chunk-8w0cwcvk.js";var o=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function u(t,e,r){let i={fullTag:r,content:e,attrs:t};if(/\bserver\b/.test(t))return{...i,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...i,type:"client"};if(o.test(e))return{...i,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...i,type:"client"};return{...i,type:"server"}}var S=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function Yt(t){let e=[],r=[],i=[],c=0;while(c<t.length){let s=t.indexOf("<",c);if(s===-1)break;let p=Oe(t,s);if(p>s){c=p;continue}let a=W(t,s);if(a>s){let f=t.slice(s,a),l=S.exec(f);if(l){let n=u(l[1],l[2],f);switch(n.type){case"signals":e.push(n);break;case"client":r.push(n);break;case"server":i.push(n);break}}c=a;continue}c=s+(t.startsWith("<!--",s)?4:1)}return{signals:e,client:r,server:i}}
3
3
  export{Yt};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{b}from"./chunk-5hrm7rtx.js";function Je(e,r){let n=y(e,r);return n.ok?{expression:n.expression,endPos:n.endPos}:null}function y(e,r){let n=r;while(n<e.length&&/\s/.test(e[n]))n++;if(e[n]!=="(")return{ok:!1,reason:"missing-open-paren",pos:n};let c=b(e,"(",")",n);if(c===-1)return{ok:!1,reason:"unclosed-paren",pos:n};return{ok:!0,expression:e.slice(n+1,c),endPos:c+1}}function k(e,r){let n=e.lastIndexOf("<",r);if(n===-1)return!1;return n>e.lastIndexOf(">",r)}function bt(e,r,n,c){let o=1,i=c,u=new RegExp(`@${r}\\s*\\(`,"g"),a=new RegExp(`@${n}(?![a-z])`,"g");while(i<e.length&&o>0){u.lastIndex=i,a.lastIndex=i;let p=u.exec(e),t=a.exec(e),s=p?p.index:1/0,f=t?t.index:1/0;if(s<f)o++,i=s+p[0].length;else if(f<1/0){if(o--,o===0)return f;i=f+t[0].length}else break}return-1}function v(e,r){let n=e.slice(r).match(/^@if\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"if","endif",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s="if",f=o.expression,l=0,x=0;while(t<a.length){let h=a.indexOf("@",t);if(h===-1)break;t=h;let d=a.substring(h);if(k(a,h)){t++;continue}if(/^@if\s*\(/.test(d)){x++,t++;continue}if(/^@endif(?![a-z])/.test(d)){x--,t+=6;continue}if(x===0){let g=d.match(/^@elseif\s*/);if(g){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t});let E=t+g[0].length,m=Je(a,E);if(!m){t++;continue}s="elseif",f=m.expression,t=m.endPos,l=t;continue}else if(/^@else(?![a-z])/.test(d)){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t}),s="else",f=void 0,t+=5,l=t;continue}}t++}return p.push({type:s,condition:f,content:a.slice(l),start:i+l,end:i+a.length}),{fullMatch:e.slice(r,u+6),branches:p,start:r,end:u+6}}function an(e){let r=[],n=/@if\s*\(/g,c=n.exec(e);while(c!==null){if(r.some((u)=>c.index>u.start&&c.index<u.end)){c=n.exec(e);continue}let i=v(e,c.index);if(i)r.push(i),n.lastIndex=i.end;c=n.exec(e)}return r}function ls(e,r,n){let c=[],o=new RegExp(`@${r}\\s*\\(`,"g"),i=o.exec(e);while(i!==null){if(c.some((d)=>i.index>d.start&&i.index<d.end)){i=o.exec(e);continue}let a=i.index,p=a+i[0].length-1,t=b(e,"(",")",p);if(t===-1){i=o.exec(e);continue}let s=e.slice(p+1,t),f=t+1,l=bt(e,r,n,f);if(l===-1){i=o.exec(e);continue}let x=e.slice(f,l),h=l+`@${n}`.length;c.push({fullMatch:e.slice(a,h),name:r,params:s,content:x,start:a,end:h}),o.lastIndex=h,i=o.exec(e)}return c}function Mo(e,r){let n=e.slice(r).match(/^@switch\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"switch","endswitch",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s=null,f=0;while(t<a.length){let l=a.slice(t),x=l.match(/^@switch\s*\(/),h=l.match(/^@endswitch(?![a-z])/);if(x){if(f++,s)s.content+=x[0];t+=x[0].length;continue}if(h){if(f--,s)s.content+=h[0];t+=h[0].length;continue}if(f>0){if(s)s.content+=a[t];t++;continue}let d=l.match(/^@case\s*/),g=l.match(/^@default(?![a-z])/),E=l.match(/^@break(?![a-z])/);if(d&&l.startsWith("@case")){if(s)p.push(s);let m=t+d[0].length,P=Je(a,m);if(!P){t++;continue}s={type:"case",value:P.expression,content:""},t=P.endPos}else if(g&&l.startsWith("@default")){if(s)p.push(s);s={type:"default",content:""},t+=g[0].length}else if(E&&l.startsWith("@break"))t+=E[0].length;else{if(s)s.content+=a[t];t++}}if(s)p.push(s);return{fullMatch:e.slice(r,u+10),expression:o.expression,cases:p,start:r,end:u+10}}export{Je,bt,an,ls,Mo};
2
+ import{b}from"./chunk-0tgrqhkr.js";function Je(e,r){let n=y(e,r);return n.ok?{expression:n.expression,endPos:n.endPos}:null}function y(e,r){let n=r;while(n<e.length&&/\s/.test(e[n]))n++;if(e[n]!=="(")return{ok:!1,reason:"missing-open-paren",pos:n};let c=b(e,"(",")",n);if(c===-1)return{ok:!1,reason:"unclosed-paren",pos:n};return{ok:!0,expression:e.slice(n+1,c),endPos:c+1}}function k(e,r){let n=e.lastIndexOf("<",r);if(n===-1)return!1;return n>e.lastIndexOf(">",r)}function bt(e,r,n,c){let o=1,i=c,u=new RegExp(`@${r}\\s*\\(`,"g"),a=new RegExp(`@${n}(?![a-z])`,"g");while(i<e.length&&o>0){u.lastIndex=i,a.lastIndex=i;let p=u.exec(e),t=a.exec(e),s=p?p.index:1/0,f=t?t.index:1/0;if(s<f)o++,i=s+p[0].length;else if(f<1/0){if(o--,o===0)return f;i=f+t[0].length}else break}return-1}function v(e,r){let n=e.slice(r).match(/^@if\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"if","endif",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s="if",f=o.expression,l=0,x=0;while(t<a.length){let h=a.indexOf("@",t);if(h===-1)break;t=h;let d=a.substring(h);if(k(a,h)){t++;continue}if(/^@if\s*\(/.test(d)){x++,t++;continue}if(/^@endif(?![a-z])/.test(d)){x--,t+=6;continue}if(x===0){let g=d.match(/^@elseif\s*/);if(g){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t});let E=t+g[0].length,m=Je(a,E);if(!m){t++;continue}s="elseif",f=m.expression,t=m.endPos,l=t;continue}else if(/^@else(?![a-z])/.test(d)){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t}),s="else",f=void 0,t+=5,l=t;continue}}t++}return p.push({type:s,condition:f,content:a.slice(l),start:i+l,end:i+a.length}),{fullMatch:e.slice(r,u+6),branches:p,start:r,end:u+6}}function an(e){let r=[],n=/@if\s*\(/g,c=n.exec(e);while(c!==null){if(r.some((u)=>c.index>u.start&&c.index<u.end)){c=n.exec(e);continue}let i=v(e,c.index);if(i)r.push(i),n.lastIndex=i.end;c=n.exec(e)}return r}function us(e,r,n){let c=[],o=new RegExp(`@${r}\\s*\\(`,"g"),i=o.exec(e);while(i!==null){if(c.some((d)=>i.index>d.start&&i.index<d.end)){i=o.exec(e);continue}let a=i.index,p=a+i[0].length-1,t=b(e,"(",")",p);if(t===-1){i=o.exec(e);continue}let s=e.slice(p+1,t),f=t+1,l=bt(e,r,n,f);if(l===-1){i=o.exec(e);continue}let x=e.slice(f,l),h=l+`@${n}`.length;c.push({fullMatch:e.slice(a,h),name:r,params:s,content:x,start:a,end:h}),o.lastIndex=h,i=o.exec(e)}return c}function Lo(e,r){let n=e.slice(r).match(/^@switch\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"switch","endswitch",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s=null,f=0;while(t<a.length){let l=a.slice(t),x=l.match(/^@switch\s*\(/),h=l.match(/^@endswitch(?![a-z])/);if(x){if(f++,s)s.content+=x[0];t+=x[0].length;continue}if(h){if(f--,s)s.content+=h[0];t+=h[0].length;continue}if(f>0){if(s)s.content+=a[t];t++;continue}let d=l.match(/^@case\s*/),g=l.match(/^@default(?![a-z])/),E=l.match(/^@break(?![a-z])/);if(d&&l.startsWith("@case")){if(s)p.push(s);let m=t+d[0].length,P=Je(a,m);if(!P){t++;continue}s={type:"case",value:P.expression,content:""},t=P.endPos}else if(g&&l.startsWith("@default")){if(s)p.push(s);s={type:"default",content:""},t+=g[0].length}else if(E&&l.startsWith("@break"))t+=E[0].length;else{if(s)s.content+=a[t];t++}}if(s)p.push(s);return{fullMatch:e.slice(r,u+10),expression:o.expression,cases:p,start:r,end:u+10}}export{Je,bt,an,us,Lo};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$f,Fo}from"./chunk-m6w75sq2.js";export{$f as looksLikeGlob,Fo as resolveStxTargets};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function vm(s,n={},t){let e=/@suspense(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@endsuspense/gi;return s.replace(e,(r,i,o,d)=>{let u=l(),a=p(i||"");return f(u,o.trim(),d.trim(),a)})}function p(s){let n={},t=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,e;while((e=t.exec(s))!==null){let r=e[1],i=e[2]||e[3],o=e[4];switch(r){case"id":n.id=i;break;case"timeout":n.timeout=o?parseInt(o,10):void 0;break}}return n}function f(s,n,t,e){let r=e.timeout||30000,i=e.id||s;return`
2
+ var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function wm(s,n={},t){let e=/@suspense(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@endsuspense/gi;return s.replace(e,(r,i,o,d)=>{let u=l(),a=p(i||"");return f(u,o.trim(),d.trim(),a)})}function p(s){let n={},t=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,e;while((e=t.exec(s))!==null){let r=e[1],i=e[2]||e[3],o=e[4];switch(r){case"id":n.id=i;break;case"timeout":n.timeout=o?parseInt(o,10):void 0;break}}return n}function f(s,n,t,e){let r=e.timeout||30000,i=e.id||s;return`
3
3
  <div class="stx-suspense" data-suspense-id="${s}" data-custom-id="${i}" data-status="pending">
4
4
  <div class="stx-suspense-fallback" data-suspense-fallback="${s}">
5
5
  ${t}
@@ -189,7 +189,7 @@ else {
189
189
  }, 0);
190
190
  })();
191
191
  </script>
192
- `}function wm(s,n,t){return{id:s,fallback:t,content:n}}async function xm(s){let n=s.map((e)=>`
192
+ `}function xm(s,n,t){return{id:s,fallback:t,content:n}}async function Sm(s){let n=s.map((e)=>`
193
193
  <div id="stx-ssr-suspense-${e.id}" class="stx-ssr-suspense">
194
194
  ${e.fallback}
195
195
  </div>
@@ -214,7 +214,7 @@ else {
214
214
  }
215
215
  })();
216
216
  </script>
217
- `}}return{initial:n,streaming:t()}}function Sm(){return`
217
+ `}}return{initial:n,streaming:t()}}function km(){return`
218
218
  /* STX Suspense Styles */
219
219
  .stx-suspense {
220
220
  position: relative;
@@ -270,7 +270,7 @@ else {
270
270
  background-size: 200% 100%;
271
271
  }
272
272
  }
273
- `}function km(){return`
273
+ `}function _m(){return`
274
274
  // STX Suspense Runtime
275
275
  (function() {
276
276
  if (typeof window === 'undefined') return;
@@ -338,4 +338,4 @@ else {
338
338
  console.log('[stx] Suspense runtime initialized');
339
339
  })();
340
340
  `}
341
- export{vm,wm,xm,Sm,km};
341
+ export{wm,xm,Sm,km,_m};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Lm,jm}from"./chunk-ppvdbstz.js";import"./chunk-h6sewvt2.js";import"./chunk-txgd0sj1.js";import"./chunk-19safa6y.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{jm as clearStoreCache,Lm as getStoreScript};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var w={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m"},R={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",inverse:"\x1B[7m",strikethrough:"\x1B[9m"};function p(e,t){return`${w[t]}${e}\x1B[0m`}function C(e,t){return`${R[t]}${e}\x1B[0m`}var b=(e)=>p(e,"red"),S=(e)=>p(e,"green"),y=(e)=>p(e,"yellow"),O=(e)=>p(e,"blue");var c=(e)=>p(e,"cyan");var a=(e)=>C(e,"bold"),m=(e)=>C(e,"dim");function zt(){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" \uD83D\uDCD6 STX Story ")+c("\u2551")),console.log(c(" \u2551")+m(" Component Showcase & Testing ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log("")}function Ks(e,t){if(console.log(a(" Server running at:")),console.log(""),console.log(` ${m("\u279C")} ${a("Local:")} ${c(e)}`),t)console.log(` ${m("\u279C")} ${a("Network:")} ${c(t)}`);console.log("")}function Ht(e){let t=e>0?"\u2713":"\u25CB",r=e>0?S:y;console.log(` ${r(t)} Found ${a(String(e))} story ${e===1?"file":"files"}`)}function Oi(e,t){if(console.log(""),console.log(` ${b("\u2717")} ${a(b("Error:"))} ${e}`),t)console.log(` ${m(t)}`);console.log("")}function it(e){console.log(` ${y("\u26A0")} ${y("Warning:")} ${e}`)}function Ni(e){console.log(` ${O("\u2139")} ${e}`)}function Di(e,t,r){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" Build Complete ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log(""),console.log(` ${S("\u2713")} Stories: ${a(String(e))}`),console.log(` ${S("\u2713")} Output: ${a(t)}`),console.log(` ${S("\u2713")} Time: ${a(`${r}ms`)}`),console.log("")}function Gs(){console.log(""),console.log(a(" Keyboard Shortcuts:")),console.log(""),console.log(` ${c("h")} Show this help`),console.log(` ${c("o")} Open in browser`),console.log(` ${c("r")} Restart server`),console.log(` ${c("c")} Clear console`),console.log(` ${c("q")} Quit`),console.log("")}import h from"fs";import d from"path";async function Vt(e){let{root:t,config:r}=e,o=[],i=await P(t,r.storyMatch,r.storyIgnored);for(let s of i){let n=d.resolve(t,s),l=v(s,n);o.push(l)}return o}async function P(e,t,r){let o=[];async function i(s,n){let l=await h.promises.readdir(s,{withFileTypes:!0});for(let g of l){let f=d.join(s,g.name),u=d.relative(n,f);if(T(u,r))continue;if(g.isDirectory())await i(f,n);else if(g.isFile()){if(F(u,t))o.push(u)}}}return await i(e,e),o}function T(e,t){for(let r of t)if(E(e,r))return!0;return!1}function F(e,t){for(let r of t)if(E(e,r))return!0;return!1}function E(e,t){let r=e.replace(/\\/g,"/"),i=t.replace(/\\/g,"/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return i=`^${i}$`,new RegExp(i).test(r)}function v(e,t){let r=d.basename(e,".story.stx");return{id:e.toLowerCase().replace(/\.story\.stx$/,"").replace(/[/\\]/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),path:t,relativePath:e,fileName:r,treeFile:{title:r,path:e}}}function Mi(e,t){let{root:r,config:o}=e,i=[],s=h.watch(r,{recursive:!0},async(n,l)=>{if(!l)return;let g=l.replace(/\\/g,"/");if(!F(g,o.storyMatch))return;if(T(g,o.storyIgnored))return;let f=d.resolve(r,g);try{await h.promises.access(f);let u=v(g,f);t(n==="rename"?"add":"change",u)}catch{let u=v(g,f);t("unlink",u)}});return i.push(s),()=>{for(let n of i)n.close()}}function N(e,t){let r=t.treeFile||{title:t.fileName,path:t.relativePath};if(e.tree.file==="title")return r.title.split("/");if(e.tree.file==="path")return[...t.relativePath.split("/").slice(0,-1),r.title];if(typeof e.tree.file==="function")return e.tree.file(r);return[r.title]}function Ut(e,t){for(let n of t)n.treePath=N(e,n);let r=(e.tree.groups||[]).map((n)=>({groupConfig:{id:n.id||n.title,title:n.title,include:n.include},treeObject:{}})),o={treeObject:{}};r.push(o);for(let n=0;n<t.length;n++){let l=t[n],g=j(l,r,o);k(l.treePath,n,g.treeObject)}let i=e.tree.order==="asc"?(n,l)=>n.localeCompare(l):e.tree.order,s=[];for(let n of r)if(n===o)s.push(...x(n.treeObject,i));else if(n.groupConfig&&Object.keys(n.treeObject).length>0)s.push({group:!0,id:n.groupConfig.id,title:n.groupConfig.title,children:x(n.treeObject,i)});return s}function j(e,t,r){let o=e.treeFile||{title:e.fileName,path:e.relativePath};for(let i of t)if(i.groupConfig?.include&&i.groupConfig.include(o))return i;return r}function k(e,t,r){let o=r;for(let i=0;i<e.length;i++){let s=e[i];if(i===e.length-1)if(o[s]!==void 0){let l=1;while(o[`${s}-${l}`]!==void 0)l++;o[`${s}-${l}`]=t}else o[s]=t;else{if(o[s]===void 0)o[s]={};else if(typeof o[s]==="number"){let l=o[s];o[s]={"":l}}o=o[s]}}}function x(e,t){let r=[];for(let[o,i]of Object.entries(e))if(typeof i==="number")r.push({title:o,index:i});else r.push({title:o,children:x(i,t)});return r.sort((o,i)=>t(o.title,i.title)),r}
3
- export{zt,Ks,Ht,Oi,it,Ni,Di,Gs,Vt,Mi,Ut};
2
+ var w={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m"},R={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",inverse:"\x1B[7m",strikethrough:"\x1B[9m"};function p(e,t){return`${w[t]}${e}\x1B[0m`}function C(e,t){return`${R[t]}${e}\x1B[0m`}var b=(e)=>p(e,"red"),S=(e)=>p(e,"green"),y=(e)=>p(e,"yellow"),O=(e)=>p(e,"blue");var c=(e)=>p(e,"cyan");var a=(e)=>C(e,"bold"),m=(e)=>C(e,"dim");function zt(){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" \uD83D\uDCD6 STX Story ")+c("\u2551")),console.log(c(" \u2551")+m(" Component Showcase & Testing ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log("")}function Gs(e,t){if(console.log(a(" Server running at:")),console.log(""),console.log(` ${m("\u279C")} ${a("Local:")} ${c(e)}`),t)console.log(` ${m("\u279C")} ${a("Network:")} ${c(t)}`);console.log("")}function Ht(e){let t=e>0?"\u2713":"\u25CB",r=e>0?S:y;console.log(` ${r(t)} Found ${a(String(e))} story ${e===1?"file":"files"}`)}function Ni(e,t){if(console.log(""),console.log(` ${b("\u2717")} ${a(b("Error:"))} ${e}`),t)console.log(` ${m(t)}`);console.log("")}function it(e){console.log(` ${y("\u26A0")} ${y("Warning:")} ${e}`)}function Di(e){console.log(` ${O("\u2139")} ${e}`)}function Mi(e,t,r){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" Build Complete ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log(""),console.log(` ${S("\u2713")} Stories: ${a(String(e))}`),console.log(` ${S("\u2713")} Output: ${a(t)}`),console.log(` ${S("\u2713")} Time: ${a(`${r}ms`)}`),console.log("")}function Xs(){console.log(""),console.log(a(" Keyboard Shortcuts:")),console.log(""),console.log(` ${c("h")} Show this help`),console.log(` ${c("o")} Open in browser`),console.log(` ${c("r")} Restart server`),console.log(` ${c("c")} Clear console`),console.log(` ${c("q")} Quit`),console.log("")}import h from"fs";import d from"path";async function Vt(e){let{root:t,config:r}=e,o=[],i=await P(t,r.storyMatch,r.storyIgnored);for(let s of i){let n=d.resolve(t,s),l=v(s,n);o.push(l)}return o}async function P(e,t,r){let o=[];async function i(s,n){let l=await h.promises.readdir(s,{withFileTypes:!0});for(let g of l){let f=d.join(s,g.name),u=d.relative(n,f);if(T(u,r))continue;if(g.isDirectory())await i(f,n);else if(g.isFile()){if(F(u,t))o.push(u)}}}return await i(e,e),o}function T(e,t){for(let r of t)if(E(e,r))return!0;return!1}function F(e,t){for(let r of t)if(E(e,r))return!0;return!1}function E(e,t){let r=e.replace(/\\/g,"/"),i=t.replace(/\\/g,"/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return i=`^${i}$`,new RegExp(i).test(r)}function v(e,t){let r=d.basename(e,".story.stx");return{id:e.toLowerCase().replace(/\.story\.stx$/,"").replace(/[/\\]/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),path:t,relativePath:e,fileName:r,treeFile:{title:r,path:e}}}function Li(e,t){let{root:r,config:o}=e,i=[],s=h.watch(r,{recursive:!0},async(n,l)=>{if(!l)return;let g=l.replace(/\\/g,"/");if(!F(g,o.storyMatch))return;if(T(g,o.storyIgnored))return;let f=d.resolve(r,g);try{await h.promises.access(f);let u=v(g,f);t(n==="rename"?"add":"change",u)}catch{let u=v(g,f);t("unlink",u)}});return i.push(s),()=>{for(let n of i)n.close()}}function N(e,t){let r=t.treeFile||{title:t.fileName,path:t.relativePath};if(e.tree.file==="title")return r.title.split("/");if(e.tree.file==="path")return[...t.relativePath.split("/").slice(0,-1),r.title];if(typeof e.tree.file==="function")return e.tree.file(r);return[r.title]}function Ut(e,t){for(let n of t)n.treePath=N(e,n);let r=(e.tree.groups||[]).map((n)=>({groupConfig:{id:n.id||n.title,title:n.title,include:n.include},treeObject:{}})),o={treeObject:{}};r.push(o);for(let n=0;n<t.length;n++){let l=t[n],g=j(l,r,o);k(l.treePath,n,g.treeObject)}let i=e.tree.order==="asc"?(n,l)=>n.localeCompare(l):e.tree.order,s=[];for(let n of r)if(n===o)s.push(...x(n.treeObject,i));else if(n.groupConfig&&Object.keys(n.treeObject).length>0)s.push({group:!0,id:n.groupConfig.id,title:n.groupConfig.title,children:x(n.treeObject,i)});return s}function j(e,t,r){let o=e.treeFile||{title:e.fileName,path:e.relativePath};for(let i of t)if(i.groupConfig?.include&&i.groupConfig.include(o))return i;return r}function k(e,t,r){let o=r;for(let i=0;i<e.length;i++){let s=e[i];if(i===e.length-1)if(o[s]!==void 0){let l=1;while(o[`${s}-${l}`]!==void 0)l++;o[`${s}-${l}`]=t}else o[s]=t;else{if(o[s]===void 0)o[s]={};else if(typeof o[s]==="number"){let l=o[s];o[s]={"":l}}o=o[s]}}}function x(e,t){let r=[];for(let[o,i]of Object.entries(e))if(typeof i==="number")r.push({title:o,index:i});else r.push({title:o,children:x(i,t)});return r.sort((o,i)=>t(o.title,i.title)),r}
3
+ export{zt,Gs,Ht,Ni,it,Di,Mi,Xs,Vt,Li,Ut};