/*! 🚀 esm.sh/tsx
 *
 * Add `<script type="module" src="https://esm.sh/tsx"></script>` to support TSX syntax in browser without build step.
 *
 */
const y=document,l=localStorage,b=new TextDecoder,x=JSON.stringify,E=new Set(["jsx","ts","tsx","babel"]),S=location.hostname;function j(){let r=[],n={},i;y.querySelectorAll("script").forEach(a=>{const{type:o,textContent:s}=a;if(s?.trim()){if(o==="importmap"){const t=JSON.parse(s);t&&(t.$support=HTMLScriptElement.supports("importmap"),n=t)}else if(o.startsWith("text/")){const t=o.slice(5);if(E.has(t)){if(s.length>128*1024)throw new Error("[esm.sh/tsx] reach 128KB limit");r.push({el:a,lang:t==="babel"?"tsx":t,code:s})}}}}),r.forEach(async({el:a,lang:o,code:s},t)=>{const m="es2022",f=[...new Uint8Array(await crypto.subtle.digest("SHA-1",new TextEncoder().encode(o+s+m+x(n)+"true")))].map(c=>c.toString(16).padStart(2,"0")).join(""),h="esm.sh/tsx."+t,g=h+".hash",p=y.createElement("script");let e;try{e=l.getItem(h),e&&l.getItem(g)!==f&&(e=null)}catch{}if(!e){if(S==="localhost"||S==="127.0.0.1"){const{transform:c}=await(i??(i=T())),w=c({filename:"script-"+t+"."+o,code:s,target:m,importMap:n,sourceMap:"inline"});e=b.decode(w.code)}else{const c=await fetch(d(`/+${f}.mjs`));if(c.ok)e=await c.text();else{const u=await(await fetch(d("/transform"),{method:"POST",body:x({lang:o,code:s,target:m,importMap:n,minify:!0})})).json();if(u.error)throw new Error(u.error.message);e=u.code}}try{l.setItem(h,e),l.setItem(g,f)}catch{}}p.type="module",p.textContent=e,a.replaceWith(p)})}async function T(){const r="/@esm.sh/tsx@1.5.3",[n,i]=await Promise.all([import(r+"/es2022/tsx.mjs"),fetch(d(r+"/pkg/tsx_bg.wasm"))]);return await n.init(i),n}function d(r){return new URL(r,import.meta.url)}j();
