var q=Object.defineProperty;var F=(e,t,n)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>(F(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();const J="modulepreload",V=function(e){return"/"+e},C={},z=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=V(o),o in C)return;C[o]=!0;const l=o.endsWith(".css"),f=l?'[rel="stylesheet"]':"";if(!!i)for(let c=r.length-1;c>=0;c--){const u=r[c];if(u.href===o&&(!l||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const s=document.createElement("link");if(s.rel=l?"stylesheet":J,l||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),l)return new Promise((c,u)=>{s.addEventListener("load",c),s.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o})};function b(){}function I(e){return e()}function A(){return Object.create(null)}function v(e){e.forEach(I)}function M(e){return typeof e=="function"}function D(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function K(e){return Object.keys(e).length===0}function d(e,t){e.appendChild(t)}function T(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function y(e){return document.createElement(e)}function U(e){return document.createTextNode(e)}function k(){return U(" ")}function G(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function h(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.data!==t&&(e.data=t)}let w;function $(e){w=e}function X(){if(!w)throw new Error("Function called outside component initialization");return w}function Y(e){X().$$.on_mount.push(e)}const _=[],R=[];let g=[];const j=[],Z=Promise.resolve();let L=!1;function ee(){L||(L=!0,Z.then(W))}function O(e){g.push(e)}const x=new Set;let m=0;function W(){if(m!==0)return;const e=w;do{try{for(;m<_.length;){const t=_[m];m++,$(t),te(t.$$)}}catch(t){throw _.length=0,m=0,t}for($(null),_.length=0,m=0;R.length;)R.pop()();for(let t=0;t<g.length;t+=1){const n=g[t];x.has(n)||(x.add(n),n())}g.length=0}while(_.length);for(;j.length;)j.pop()();L=!1,x.clear(),$(e)}function te(e){if(e.fragment!==null){e.update(),v(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(O)}}function ne(e){const t=[],n=[];g.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),g=t}const re=new Set;function oe(e,t){e&&e.i&&(re.delete(e),e.i(t))}function ie(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),O(()=>{const o=e.$$.on_mount.map(I).filter(M);e.$$.on_destroy?e.$$.on_destroy.push(...o):v(o),e.$$.on_mount=[]}),r.forEach(O)}function se(e,t){const n=e.$$;n.fragment!==null&&(ne(n.after_update),v(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function le(e,t){e.$$.dirty[0]===-1&&(_.push(e),ee(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ce(e,t,n,i,r,o,l,f=[-1]){const a=w;$(e);const s=e.$$={fragment:null,ctx:[],props:o,update:b,not_equal:r,bound:A(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:A(),dirty:f,skip_bound:!1,root:t.target||a.$$.root};l&&l(s.root);let c=!1;if(s.ctx=n?n(e,t.props||{},(u,p,...N)=>{const P=N.length?N[0]:p;return s.ctx&&r(s.ctx[u],s.ctx[u]=P)&&(!s.skip_bound&&s.bound[u]&&s.bound[u](P),c&&le(e,u)),p}):[],s.update(),c=!0,v(s.before_update),s.fragment=i?i(s.ctx):!1,t.target){if(t.hydrate){const u=H(t.target);s.fragment&&s.fragment.l(u),u.forEach(S)}else s.fragment&&s.fragment.c();t.intro&&oe(e.$$.fragment),ie(e,t.target,t.anchor),W()}$(a)}class ue{constructor(){E(this,"$$");E(this,"$$set")}$destroy(){se(this,1),this.$destroy=b}$on(t,n){if(!M(n))return b;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!K(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ae="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ae);function B(e){let t,n=(!e[1]||!e[0]?"Loading...":JSON.stringify(e[0],null,2))+"",i;return{c(){t=y("pre"),i=U(n),h(t,"class","bg-gray-100 dark:bg-gray-800 p-2 rounded")},m(r,o){T(r,t,o),d(t,i)},p(r,o){o&3&&n!==(n=(!r[1]||!r[0]?"Loading...":JSON.stringify(r[0],null,2))+"")&&Q(i,n)},d(r){r&&S(t)}}}function fe(e){let t,n,i,r,o,l,f,a,s,c=e[1]!==null&&B(e);return{c(){t=y("main"),n=y("h1"),n.textContent="Transformers.js",i=k(),r=y("h2"),r.textContent="Svelte (client-side)",o=k(),l=y("input"),f=k(),c&&c.c(),h(n,"class","text-5xl font-bold mb-2 text-center"),h(r,"class","text-2xl mb-4 text-center"),h(l,"type","text"),h(l,"class","w-full max-w-xs p-2 border border-gray-300 rounded mb-4 dark:text-black"),h(l,"placeholder","Enter text here"),h(t,"class","flex min-h-screen flex-col items-center justify-center p-12")},m(u,p){T(u,t,p),d(t,n),d(t,i),d(t,r),d(t,o),d(t,l),d(t,f),c&&c.m(t,null),a||(s=G(l,"input",e[3]),a=!0)},p(u,[p]){u[1]!==null?c?c.p(u,p):(c=B(u),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i:b,o:b,d(u){u&&S(t),c&&c.d(),a=!1,s()}}}function de(e,t,n){let i,r=null,o=null;Y(async()=>{if(!i){const a=await z(()=>import("./worker-4f278980.js"),[]);i=new a.default;const s=c=>{switch(c.data.status){case"initiate":n(1,o=!1);break;case"ready":n(1,o=!0);break;case"complete":n(0,r=c.data.output[0]);break}};i.addEventListener("message",s)}});function l(a){i&&i.postMessage({text:a})}return[r,o,l,a=>{l(a.target.value)}]}class he extends ue{constructor(t){super(),ce(this,t,de,fe,D,{})}}new he({target:document.getElementById("app")}); | |