tauri/examples/api/dist/assets/index.js

47 lines
81 KiB
JavaScript
Raw Normal View History

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function V(){}function hs(e){return e()}function ql(){return Object.create(null)}function ue(e){e.forEach(hs)}function Ks(e){return typeof e=="function"}function ge(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Bn;function Qs(e,t){return Bn||(Bn=document.createElement("a")),Bn.href=t,e===Bn.href}function Zs(e){return Object.keys(e).length===0}function xs(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function _s(e,t,n){e.$$.on_destroy.push(xs(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function zt(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function a(e){return document.createElement(e)}function eo(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function A(e){return document.createTextNode(e)}function h(){return A(" ")}function ti(){return A("")}function L(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Wi(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function to(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Wt(e,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===t){i.selected=!0;return}}e.selectedIndex=-1}function Pi(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function Jn(e,t,n){e.classList[n?"add":"remove"](t)}class no{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=eo(n.nodeName):this.e=a(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)m(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(p)}}let Vt;function Gt(e){Vt=e}function bs(){if(!Vt)throw new Error("Function called outside component initialization");return Vt}function dt(e){bs().$$.on_mount.push(e)}function Ri(e){bs().$$.on_destroy.push(e)}const qt=[],Oi=[],Yn=[],Fl=[],io=Promise.resolve();let Di=!1;function lo(){Di||(Di=!0,io.then(gs))}function Pt(e){Yn.push(e)}const Ei=new Set;let Xn=0;function gs(){const e=Vt;do{for(;Xn<qt.length;){const t=qt[Xn];Xn++,Gt(t),so(t.$$)}for(Gt(null),qt.length=0,Xn=0;Oi.length;)Oi.pop()();for(let t=0;t<Yn.length;t+=1){const n=Yn[t];Ei.has(n)||(Ei.add(n),n())}Yn.length=0}while(qt.length);for(;Fl.length;)Fl.pop()();Di=!1,Ei.clear(),Gt(e)}function so(e){if(e.fragment!==null){e.update(),ue(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Pt)}}const $n=new Set;let ft;function ni(){ft={r:0,c:[],p:ft}}function ii(){ft.r||ue(ft.c),ft=ft.p}function Se(e,t){e&&e.i&&($n.delete(e),e.i(t))}function Ie(e,t,n,i){if(e&&e.o){if($n.has(e))return;$n.add(e),ft.c.push(()=>{$n.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Qn(e){e&&e.c()}function Bt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Pt(()=>{const c=o.map(hs).filter(Ks);u?u.push(...c):ue(c),e.$$.on_mount=[]}),d.forEach(Pt)}function Jt(e,t){const n=e.$$;n.fragment!==null&&(ue(n.on_destroy),n.fragment&&n
`)}};async function Ii(e,t){return E({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var mo={};We(mo,{TauriEvent:()=>Ts,emit:()=>li,listen:()=>Yt,once:()=>Cs});async function ws(e,t){return E({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function ks(e,t,n){await E({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return E({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:mt(n)}}).then(i=>async()=>ws(e,i))}async function Ms(e,t,n){return Ni(e,t,i=>{n(i),ws(e,i.id).catch(()=>{})})}var Ts=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ts||{});async function Yt(e,t){return Ni(e,null,t)}async function Cs(e,t){return Ms(e,null,t)}async function li(e,t){return ks(e,void 0,t)}var ho={};We(ho,{CloseRequestedEvent:()=>zs,LogicalPosition:()=>Ss,LogicalSize:()=>xn,PhysicalPosition:()=>nt,PhysicalSize:()=>pt,UserAttentionType:()=>Hi,WebviewWindow:()=>ht,WebviewWindowHandle:()=>As,WindowManager:()=>Es,appWindow:()=>Fe,availableMonitors:()=>go,currentMonitor:()=>_o,getAll:()=>Ls,getCurrent:()=>Ft,primaryMonitor:()=>bo});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},pt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},Ss=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},nt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Ss(this.x/e,this.y/e)}},Hi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Hi||{});function Ft(){return new ht(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ls(){return window.__TAURI_METADATA__.__windows.map(e=>new ht(e.label,{skip:!0}))}var Gl=["tauri://created","tauri://error"],As=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ni(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ms(e,this.label,t)}async emit(e,t){if(Gl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return ks(e,this.label,t)}_handleTauriEvent(e,t){return Gl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Es=class extends As{async scaleFactor(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async outerPosition(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async innerSize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async outerSize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async isFullscreen(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{typ
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Fe=new ht("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new nt(e.position.x,e.position.y),size:new pt(e.size.width,e.size.height)}}async function _o(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function bo(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function go(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function yo(){return navigator.appVersion.includes("Win")}var vo={};We(vo,{EOL:()=>wo,arch:()=>To,platform:()=>Ws,tempdir:()=>Co,type:()=>Mo,version:()=>ko});var wo=yo()?`\r
`:`
`;async function Ws(){return E({__tauriModule:"Os",message:{cmd:"platform"}})}async function ko(){return E({__tauriModule:"Os",message:{cmd:"version"}})}async function Mo(){return E({__tauriModule:"Os",message:{cmd:"osType"}})}async function To(){return E({__tauriModule:"Os",message:{cmd:"arch"}})}async function Co(){return E({__tauriModule:"Os",message:{cmd:"tempdir"}})}var So={};We(So,{getName:()=>Os,getTauriVersion:()=>Ds,getVersion:()=>Ps,hide:()=>Is,show:()=>Rs});async function Ps(){return E({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Os(){return E({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Ds(){return E({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Rs(){return E({__tauriModule:"App",message:{cmd:"show"}})}async function Is(){return E({__tauriModule:"App",message:{cmd:"hide"}})}var Lo={};We(Lo,{exit:()=>Ns,relaunch:()=>ji});async function Ns(e=0){return E({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function ji(){return E({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Ao(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H,M,I;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,n=h(),i=a("br"),l=h(),o=a("br"),u=h(),d=a("pre"),c=A("App name: "),f=a("code"),b=A(e[2]),k=A(`
App version: `),g=a("code"),w=A(e[0]),_=A(`
Tauri version: `),v=a("code"),S=A(e[1]),D=A(`
`),U=h(),O=a("br"),F=h(),W=a("div"),C=a("button"),C.textContent="Close application",T=h(),H=a("button"),H.textContent="Relaunch application",r(C,"class","btn"),r(H,"class","btn"),r(W,"class","flex flex-wrap gap-1 shadow-")},m(j,J){m(j,t,J),m(j,n,J),m(j,i,J),m(j,l,J),m(j,o,J),m(j,u,J),m(j,d,J),s(d,c),s(d,f),s(f,b),s(d,k),s(d,g),s(g,w),s(d,_),s(d,v),s(v,S),s(d,D),m(j,U,J),m(j,O,J),m(j,F,J),m(j,W,J),s(W,C),s(W,T),s(W,H),M||(I=[L(C,"click",e[3]),L(H,"click",e[4])],M=!0)},p(j,[J]){J&4&&K(b,j[2]),J&1&&K(w,j[0]),J&2&&K(S,j[1])},i:V,o:V,d(j){j&&p(t),j&&p(n),j&&p(i),j&&p(l),j&&p(o),j&&p(u),j&&p(d),j&&p(U),j&&p(O),j&&p(F),j&&p(W),M=!1,ue(I)}}}function Eo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Os().then(c=>{n(2,o=c)}),Ps().then(c=>{n(0,i=c)}),Ds().then(c=>{n(1,l=c)});async function u(){await Ns()}async function d(){await ji()}return[i,l,o,u,d]}class zo extends Me{constructor(t){super(),ke(this,t,Eo,Ao,ge,{})}}function Wo(e){let t,n,i,l,o,u,d,c,f,b,k,g,w;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),b=h(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(_,v){m(_,t,v),m(_,n,v),m(_,i,v),m(_,l,v),m(_,o,v),m(_,u,v),m(_,d,v),m(_,c,v),m(_,f,v),m(_,b,v),m(_,k,v),g||(w=L(k,"click",e[0]),g=!0)},p:V,i:V,o:V,d(_){_&&p(t),_&&p(n),_&&p(i),_&&p(l),_&&p(o),_&&p(u),_&&p(d),_&&p(c),_&&p(f),_&&p(b),_&&p(k),g=!1,w()}}}function Po(e,t,n){let{onMessage:i}=t;function l(){Xt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class Oo extends Me{constructor(t){super(),ke(this,t,Po,Wo,ge,{onMessage:1})}}function Do(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,b){m(f,t,b),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,ue(c)}}}function Ro(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("rust-event",i)}),Ri(()=>{l&&l()});function o(){Xt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Xt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){li("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Io extends Me{constructor(t){super(),ke(this,t,Ro,Do,ge,{onMessage:3})}}var No={};We(No,{ask:()=>Us,confirm:()=>Uo,message:()=>Ho,open:()=>qi,save:()=>Hs});async function qi(e={}){return typeof e=="object"&&Object.freeze(e),E({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Hs(e={}){return typeof e=="object"&&Object.freeze(e),E({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Ho(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Us(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function Uo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}function jo(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),b=h(),k=a("label"),k.textContent="Multiple",g=h(),w=a("div"),_=a("input"),v=h(),S=a("label"),S.textContent="Directory",D=h(),U=a("br"),O=h(),F=a("button"),F.textContent="Open dialog",W=h(),C=a("button"),C.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(_,"type","checkbox"),r(_,"id","dialog-directory"),r(S,"for","dialog-directory
try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ei(e){return E({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new qs(t))}var zi=null;async function Vo(e,t){var n;return zi===null&&(zi=await ei()),zi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Vl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Bl(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U=e[5],O=[];for(let T=0;T<U.length;T+=1)O[T]=Yl(Vl(e,U,T));const F=T=>Ie(O[T],1,1,()=>{O[T]=null});let W=!e[3]&&$l(),C=!e[3]&&e[8]&&Kl();return{c(){t=a("span"),n=a("span"),i=A(e[6]),l=h(),o=a("ul");for(let T=0;T<O.length;T+=1)O[T].c();u=h(),d=a("span"),c=A(e[7]),W&&W.c(),f=h(),b=a("span"),k=A(e[6]),g=A(Yo),w=A(e[7]),C&&C.c(),_=ti(),r(n,"class","bracket svelte-gbh3pt"),r(n,"tabindex","0"),r(o,"class","svelte-gbh3pt"),r(d,"class","bracket svelte-gbh3pt"),r(d,"tabindex","0"),r(t,"class","svelte-gbh3pt"),Jn(t,"hidden",e[8]),r(b,"class","bracket svelte-gbh3pt"),r(b,"tabindex","0"),Jn(b,"hidden",!e[8])},m(T,H){m(T,t,H),s(t,n),s(n,i),s(t,l),s(t,o);for(let M=0;M<O.length;M+=1)O[M].m(o,null);s(t,u),s(t,d),s(d,c),W&&W.m(t,null),m(T,f,H),m(T,b,H),s(b,k),s(b,g),s(b,w),C&&C.m(T,H),m(T,_,H),v=!0,S||(D=[L(n,"click",e[11]),L(d,"click",e[11]),L(b,"click",e[11])],S=!0)},p(T,H){if((!v||H&64)&&K(i,T[6]),H&1591){U=T[5];let M;for(M=0;M<U.length;M+=1){const I=Vl(T,U,M);O[M]?(O[M].p(I,H),Se(O[M],1)):(O[M]=Yl(I),O[M].c(),Se(O[M],1),O[M].m(o,null))}for(ni(),M=U.length;M<O.length;M+=1)F(M);ii()}(!v||H&128)&&K(c,T[7]),T[3]?W&&(W.d(1),W=null):W||(W=$l(),W.c(),W.m(t,null)),H&256&&Jn(t,"hidden",T[8]),(!v||H&64)&&K(k,T[6]),(!v||H&128)&&K(w,T[7]),H&256&&Jn(b,"hidden",!T[8]),!T[3]&&T[8]?C||(C=Kl(),C.c(),C.m(_.parentNode,_)):C&&(C.d(1),C=null)},i(T){if(!v){for(let H=0;H<U.length;H+=1)Se(O[H]);v=!0}},o(T){O=O.filter(Boolean);for(let H=0;H<O.length;H+=1)Ie(O[H]);v=!1},d(T){T&&p(t),zt(O,T),W&&W.d(),T&&p(f),T&&p(b),C&&C.d(T),T&&p(_),S=!1,ue(D)}}}function Jl(e){let t,n,i=e[12]+"",l,o;return{c(){t=a("span"),n=A('"'),l=A(i),o=A('":'),r(t,"class","key")},m(u,d){m(u,t,d),s(t,n),s(t,l),s(t,o)},p(u,d){d&32&&i!==(i=u[12]+"")&&K(l,i)},d(u){u&&p(t)}}}function Bo(e){let t,n=e[10](e[0][e[12]])+"",i,l,o=e[14]<e[5].length-1&&Xl();return{c(){t=a("span"),i=A(n),o&&o.c(),r(t,"class",l="val "+e[9](e[0][e[12]])+" svelte-gbh3pt")},m(u,d){m(u,t,d),s(t,i),o&&o.m(t,null)},p(u,d){d&33&&n!==(n=u[10](u[0][u[12]])+"")&&K(i,n),u[14]<u[5].length-1?o||(o=Xl(),o.c(),o.m(t,null)):o&&(o.d(1),o=null),d&33&&l!==(l="val "+u[9](u[0][u[12]])+" svelte-gbh3pt")&&r(t,"class",l)},i:V,o:V,d(u){u&&p(t),o&&o.d()}}}function Jo(e){let t,n;return t=new Fs({props:{json:e[0][e[12]],depth:e[1],_lvl:e[2]+1,_last:e[14]===e[5].length-1}}),{c(){Qn(t.$$.fragment)},m(i,l){Bt(t,i,l),n=!0},p(i,l){const o={};l&33&&(o.json=i[0][i[12]]),l&2&&(o.depth=i[1]),l&4&&(o._lvl=i[2]+1),l&32&&(o._last=i[14]===i[5].length-1),t.$set(o)},i(i){n||(Se(t.$$.fragment,i),n=!0)},o(i){Ie(t.$$.fragment,i),n=!1},d(i){Jt(t,i)}}}function Xl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Yl(e){let t,n,i,l,o,u,d,c=!e[4]&&Jl(e);const f=[Jo,Bo],b=[];function k(g,w){return w&33&&(i=null),i==null&&(i=g[9](g[0][g[12]])==="object"),i?0:1}return l=k(e,-1),o=b[l]=f[l](e),{c(){t=a("li"),c&&c.c(),n=h(),o.c(),u=h()},m(g,w){m(g,t,w),c&&c.m(t,null),s(t,n),b[l].m(t,null),s(t,u),d=!0},p(g,w){g[4]?c&&(c.d(1),c=null):c?c.p(g,w):(c=Jl(g),c.c(),c.m(t,n));let _=l;l=k(g,w),l===_?b[l].p(g,w):(ni(),Ie(b[_],1,1,()=>{b[_]=null}),ii(),o=b[l],o?o.p(g,w):(o=b[l]=f[l](g),o.c()),Se(o,1),o.m(t,u))},i(g){d||(Se(o),d=!0)},
Multipart`),te=h(),Y=a("br"),se=h(),ee=a("br"),R=h(),X=a("button"),X.textContent="Post it",Z=h(),_e=a("br"),fe=h(),pe=a("br"),ye=h(),Qn(oe.$$.fragment),i.__value="GET",i.value=i.__value,l.__value="POST",l.value=l.__value,o.__value="PUT",o.value=o.__value,u.__value="PATCH",u.value=u.__value,d.__value="DELETE",d.value=d.__value,r(n,"class","input"),r(n,"id","request-method"),e[0]===void 0&&Pt(()=>e[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(v,"class","btn"),r(v,"id","make-request"),r(C,"class","input"),r(H,"class","input"),r(W,"class","flex gap-2 children:grow"),r(ne,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(z,G){m(z,t,G),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Wt(n,e[0]),s(t,c),s(t,f),s(t,b),s(t,k),q(k,e[1]),s(t,g),s(t,w),s(t,_),s(t,v),m(z,S,G),m(z,D,G),m(z,U,G),m(z,O,G),m(z,F,G),m(z,W,G),s(W,C),q(C,e[2]),s(W,T),s(W,H),q(H,e[3]),m(z,M,G),m(z,I,G),m(z,j,G),m(z,J,G),s(J,ne),ne.checked=e[5],s(J,ce),m(z,te,G),m(z,Y,G),m(z,se,G),m(z,ee,G),m(z,R,G),m(z,X,G),m(z,Z,G),m(z,_e,G),m(z,fe,G),m(z,pe,G),m(z,ye,G),Bt(oe,z,G),x=!0,me||(Le=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",Wi(e[6])),L(C,"input",e[11]),L(H,"input",e[12]),L(ne,"change",e[13]),L(X,"click",e[7])],me=!0)},p(z,[G]){G&1&&Wt(n,z[0]),G&2&&q(k,z[1]),G&4&&C.value!==z[2]&&q(C,z[2]),G&8&&H.value!==z[3]&&q(H,z[3]),G&32&&(ne.checked=z[5]);const Ae={};G&16&&(Ae.json=z[4]),oe.$set(Ae)},i(z){x||(Se(oe.$$.fragment,z),x=!0)},o(z){Ie(oe.$$.fragment,z),x=!1},d(z){z&&p(t),z&&p(S),z&&p(D),z&&p(U),z&&p(O),z&&p(F),z&&p(W),z&&p(M),z&&p(I),z&&p(j),z&&p(J),z&&p(te),z&&p(Y),z&&p(se),z&&p(ee),z&&p(R),z&&p(X),z&&p(Z),z&&p(_e),z&&p(fe),z&&p(pe),z&&p(ye),Jt(oe,z),me=!1,ue(Le)}}}function Qo(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await ei().catch(F=>{throw o(F),F}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=it.json(JSON.parse(l)):l!==""&&(O.body=it.text(l)),D.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,b=!0;async function k(){const D=await ei().catch(U=>{throw o(U),U});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:it.form({foo:d,bar:c}),headers:b?{"Content-Type":"multipart/form-data"}:void 0,responseType:Fi.Text}))}function g(){i=Pi(this),n(0,i)}function w(){l=this.value,n(1,l)}function _(){d=this.value,n(2,d)}function v(){c=this.value,n(3,c)}function S(){b=this.checked,n(5,b)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,b,u,k,o,g,w,_,v,S]}class Zo extends Me{constructor(t){super(),ke(this,t,Qo,Ko,ge,{onMessage:8})}}function xo(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",ea),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function ea(){new Notification("Notification title",{body:"This is the notification body"})}function ta(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class na extends Me{constructor(t){super(),ke(this,t,ta,xo,ge,{onMessage:0})}}function Ql(e,t,n){const i=e.slice();return i[69]=t[n],i}function Zl(e,t,n){const i=e.slice();return i[72]=t[n],i}function xl(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;f<d.length;f+=1)c[f]=es(Zl(e,d,f));return{c(){t=a("span"),t.textContent="Selected window:",n=h(),i=a("select"),l=a("option"),l.textContent="Choose a window...";for(let f=0;f<c.length;f+=1)c[f].c();r(t,"class","font-700 text-sm"),l.__value="",l.value=l.__value,l.disabled=!0,l.selected=!0,r(i,"class","input"),e[0]===void 0&&Pt(()=>e[40].call(i))},m(f,b){m(f,t,b),m(f,n,b),m(f,i,b),s(i,l);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Wt(i,e[0]),o||(u=L(i,"change",e[40]),o=!0)},p(f,b){if(b[0]&2){d=Object.keys(f[1]);let k;for(k=0;k<d.length;k+=1){const g=Zl(f,d,k);c[k]?c[k].p(g,b):(c[k]=es(g),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=d.length}b[0]&3&&Wt(i,f[0])},d(f){f&&p(t),f&&p(n),f&&p(i),zt(c,f),o=!1,u()}}}function es(e){let t,n=e[72
`),O=a("input"),F=h(),W=a("label"),C=A(`Resizable
`),T=a("input"),H=h(),M=a("label"),I=A(`Has decorations
`),j=a("input"),J=h(),ne=a("label"),ce=A(`Always on top
`),te=a("input"),Y=h(),se=a("label"),ee=A(`Content protected
`),R=a("input"),X=h(),Z=a("label"),_e=A(`Fullscreen
`),fe=a("input"),pe=h(),ye=a("br"),oe=h(),x=a("div"),me=a("div"),Le=a("div"),z=A(`X
`),G=a("input"),Ae=h(),ve=a("div"),ae=A(`Y
`),de=a("input"),re=h(),we=a("div"),Ne=a("div"),Pe=A(`Width
`),Q=a("input"),N=h(),ie=a("div"),B=A(`Height
`),he=a("input"),$t=h(),Ge=a("div"),_t=a("div"),Kt=A(`Min width
`),De=a("input"),Qt=h(),bt=a("div"),Zt=A(`Min height
`),Re=a("input"),xt=h(),Ve=a("div"),$=a("div"),Ot=A(`Max width
`),Ee=a("input"),Dt=h(),lt=a("div"),Rt=A(`Max height
`),ze=a("input"),gt=h(),yt=a("br"),vt=h(),Ce=a("div"),He=a("div"),Oe=a("div"),st=a("div"),st.textContent="Inner Size",It=h(),ot=a("span"),Nt=A("Width: "),wt=A(at),en=h(),tn=a("span"),Vi=A("Height: "),si=A(nn),Bi=h(),Be=a("div"),ln=a("div"),ln.textContent="Outer Size",Ji=h(),sn=a("span"),Xi=A("Width: "),oi=A(on),Yi=h(),an=a("span"),$i=A("Height: "),ai=A(rn),Ki=h(),kt=a("div"),Je=a("div"),un=a("div"),un.textContent="Inner Logical Size",Qi=h(),cn=a("span"),Zi=A("Width: "),ri=A(dn),xi=h(),fn=a("span"),el=A("Height: "),ui=A(pn),tl=h(),Xe=a("div"),mn=a("div"),mn.textContent="Outer Logical Size",nl=h(),hn=a("span"),il=A("Width: "),ci=A(_n),ll=h(),bn=a("span"),sl=A("Height: "),di=A(gn),ol=h(),Mt=a("div"),Ye=a("div"),yn=a("div"),yn.textContent="Inner Position",al=h(),vn=a("span"),rl=A("x: "),fi=A(wn),ul=h(),kn=a("span"),cl=A("y: "),pi=A(Mn),dl=h(),$e=a("div"),Tn=a("div"),Tn.textContent="Outer Position",fl=h(),Cn=a("span"),pl=A("x: "),mi=A(Sn),ml=h(),Ln=a("span"),hl=A("y: "),hi=A(An),_l=h(),Tt=a("div"),Ke=a("div"),En=a("div"),En.textContent="Inner Logical Position",bl=h(),zn=a("span"),gl=A("x: "),_i=A(Wn),yl=h(),Pn=a("span"),vl=A("y: "),bi=A(On),wl=h(),Qe=a("div"),Dn=a("div"),Dn.textContent="Outer Logical Position",kl=h(),Rn=a("span"),Ml=A("x: "),gi=A(In),Tl=h(),Nn=a("span"),Cl=A("y: "),yi=A(Hn),vi=h(),wi=a("br"),ki=h(),Ht=a("h4"),Ht.textContent="Cursor",Mi=h(),Ue=a("div"),Un=a("label"),Ct=a("input"),Sl=A(`
Grab`),Ll=h(),jn=a("label"),St=a("input"),Al=A(`
Visible`),El=h(),qn=a("label"),Lt=a("input"),zl=A(`
Ignore events`),Ti=h(),je=a("div"),Fn=a("label"),Wl=A(`Icon
`),qe=a("select");for(let y=0;y<Te.length;y+=1)Te[y].c();Pl=h(),Gn=a("label"),Ol=A(`X position
`),Ze=a("input"),Dl=h(),Vn=a("label"),Rl=A(`Y position
`),xe=a("input"),Ci=h(),Si=a("br"),Li=h(),rt=a("div"),ut=a("form"),et=a("input"),Il=h(),Ut=a("button"),Ut.textContent="Set title",Nl=h(),ct=a("form"),tt=a("input"),Hl=h(),jt=a("button"),jt.textContent="Open URL",r(l,"class","btn"),r(l,"title","Unminimizes after 2 seconds"),r(u,"class","btn"),r(u,"title","Unminimizes after 2 seconds"),r(c,"class","btn"),r(c,"title","Visible again after 2 seconds"),r(b,"class","btn"),r(g,"class","btn"),r(g,"title","Minimizes the window, requests attention for 3s and then resets it"),r(i,"class","flex flex-wrap gap-2"),r(O,"type","checkbox"),r(T,"type","checkbox"),r(j,"type","checkbox"),r(te,"type","checkbox"),r(R,"type","checkbox"),r(fe,"type","checkbox"),r(S,"class","flex flex-wrap gap-2"),r(G,"class","input"),r(G,"type","number"),r(G,"min","0"),r(de,"class","input"),r(de,"type","number"),r(de,"min","0"),r(me,"class","flex children:grow flex-col"),r(Q,"class","input"),r(Q,"type","number"),r(Q,"min","400"),r(he,"class","input"),r(he,"type","number"),r(he,"min","400"),r(we,"class","flex children:grow flex-col"),r(De,"class","input"),r(De,"type","number"),r(Re,"class","input"),r(Re,"type","number"),r(Ge,"class","flex children:grow flex-col"),r(Ee,"class","input"),r(Ee,"type","number"),r(Ee,"min","800"),r(ze,"class","input"),r(ze,"type","number"),r(ze,"min","400"),r(Ve,"class","flex children:grow flex-col"),r(x,"class","flex flex-row gap-2 flex-wrap"),r(st,"class","text-accent dark:text-darkAccent font-700"),r(Oe,"class","grow"),r(ln,"class","text-accent dark:text-darkAccent font-700"),r(Be,"class","grow"),r(He,"class","flex"),r(un,"class","text-accent dark:text-darkAccent font-700"),r(Je,"class","grow"),r(mn,"class","text-accent dark:text-darkAccent font-700"),r(Xe,"class","grow"),r(kt,"class","flex"),r(yn,"class","text-accent dark:text-darkAccent font-700"),r(Ye,"class","grow"),r(Tn,"class","text-accent dark:text-darkAccent font-700"),r($e,"class","grow"),r(Mt,"class","flex"),r(En,"class","text-accent dark:text-darkAccent font-700"),r(Ke,"class","grow"),r(Dn,"class","text-accent dark:text-darkAccent font-700"),r(Qe,"class","grow"),r(Tt,"class","flex"),r(Ht,"class","mb-2"),r(Ct,"type","checkbox"),r(St,"type","checkbox"),r(Lt,"type","checkbox"),r(Ue,"class","flex gap-2"),r(qe,"class","input"),e[20]===void 0&&Pt(()=>e[59].call(qe)),r(Ze,"class","input"),r(Ze,"type","number"),r(xe,"class","input"),r(xe,"type","number"),r(je,"class","flex gap-2"),r(et,"class","input grow"),r(et,"id","title"),r(Ut,"class","btn"),r(Ut,"type","submit"),r(ut,"class","flex gap-1"),r(tt,"class","input grow"),r(tt,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ct,"class","flex gap-1"),r(rt,"class","flex flex-col gap-1")},m(y,P){m(y,t,P),m(y,n,P),m(y,i,P),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,b),s(i,k),s(i,g),m(y,w,P),m(y,_,P),m(y,v,P),m(y,S,P),s(S,D),s(D,U),s(D,O),O.checked=e[3],s(S,F),s(S,W),s(W,C),s(W,T),T.checked=e[2],s(S,H),s(S,M),s(M,I),s(M,j),j.checked=e[4],s(S,J),s(S,ne),s(ne,ce),s(ne,te),te.checked=e[5],s(S,Y),s(S,se),s(se,ee),s(se,R),R.checked=e[6],s(S,X),s(S,Z),s(Z,_e),s(Z,fe),fe.checked=e[7],m(y,pe,P),m(y,ye,P),m(y,oe,P),m(y,x,P),s(x,me),s(me,Le),s(Le,z),s(Le,G),q(G,e[14]),s(me,Ae),s(me,ve),s(ve,ae),s(ve,de),q(de,e[15]),s(x,re),s(x,we),s(we,Ne),s(Ne,Pe),s(Ne,Q),q(Q,e[8]),s(we,N),s(we,ie),s(ie,B),s(ie,he),q(he,e[9]),s(x,$t),s(x,Ge),s(Ge,_t),s(_t,Kt),s(_t,De),q(De,e[10]),s(Ge,Qt),s(Ge,bt),s(bt,Zt),s(bt,Re),q(Re,e[11]),s(x,xt),s(x,Ve),s(Ve,$),s($,Ot),s($,Ee),q(Ee,e[12]),s(Ve,Dt),s(Ve,lt),s(lt,Rt),s(lt,ze),q(ze,e[13]),m(y,gt,P),m(y,yt,P),m(y,vt,P),m(y,Ce,P),s(Ce,He),s(He,Oe),s(Oe,st),s(Oe,It),s(Oe,ot),s(ot,Nt),s(ot,wt),s(Oe,en),s(Oe,tn),s(tn,Vi),s(tn,si),s(He,Bi),s(He,Be),s(Be,ln),s(Be,Ji),s(Be,sn),s(sn,Xi),s(sn,oi),s(Be,Yi),s(Be,an),s(an,$i),s(an,ai),s(Ce,Ki),s(Ce,kt),s(kt,Je),s(Je,un),s(Je,Qi),s(Je,cn),s(cn,Zi),s(cn,ri),s(Je,xi),s(Je,fn),s(fn,el),s(fn,ui),s(kt,tl),s(kt,Xe),s(Xe,mn),s(Xe,nl),s(Xe,hn),s(hn,il),s(hn,ci),s(Xe,ll),s(Xe,bn),s(bn,sl),s(bn,di),s(Ce,ol),s(Ce,Mt),s(Mt,Ye),s(Ye,yn),s(Ye,al),s(Ye,vn),s(vn,rl),s(vn,fi),s(Ye,ul),s(Ye,kn),s(kn,cl),s(kn,pi),s(Mt,dl),s(Mt,$e),s($e,Tn)
`),l=a("input"),o=h(),u=a("div"),d=A(`Encoding:
`),c=a("input"),f=h(),b=a("div"),k=A(`Working directory:
`),g=a("input"),w=h(),_=a("div"),v=A(`Arguments:
`),S=a("input"),D=h(),U=a("div"),O=a("button"),O.textContent="Run",F=h(),W=a("button"),W.textContent="Kill",C=h(),M&&M.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(g,"class","grow input"),r(g,"placeholder","Working directory"),r(b,"class","flex items-center gap-1"),r(S,"class","grow input"),r(S,"placeholder","Environment variables"),r(_,"class","flex items-center gap-1"),r(O,"class","btn"),r(W,"class","btn"),r(U,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(I,j){m(I,t,j),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,b),s(b,k),s(b,g),q(g,e[1]),s(t,w),s(t,_),s(_,v),s(_,S),q(S,e[2]),s(t,D),s(t,U),s(U,O),s(U,F),s(U,W),s(t,C),M&&M.m(t,null),T||(H=[L(l,"input",e[10]),L(c,"input",e[11]),L(g,"input",e[12]),L(S,"input",e[13]),L(O,"click",e[6]),L(W,"click",e[7])],T=!0)},p(I,[j]){j&1&&l.value!==I[0]&&q(l,I[0]),j&8&&c.value!==I[3]&&q(c,I[3]),j&2&&g.value!==I[1]&&q(g,I[1]),j&4&&S.value!==I[2]&&q(S,I[2]),I[5]?M?M.p(I,j):(M=os(I),M.c(),M.m(t,null)):M&&(M.d(1),M=null)},i:V,o:V,d(I){I&&p(t),M&&M.d(),T=!1,ue(H)}}}function pa(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",b="",k="",g;function w(){return f.split(" ").reduce((C,T)=>{let[H,M]=T.split("=");return{...C,[H]:M}},{})}function _(){n(5,g=null);const C=Zn.create(l,[...o,d],{cwd:c||null,env:w(),encoding:b||void 0});C.on("close",T=>{u(`command finished with code ${T.code} and signal ${T.signal}`),n(5,g=null)}),C.on("error",T=>u(`command error: "${T}"`)),C.stdout.on("data",T=>u(`command stdout: "${T}"`)),C.stderr.on("data",T=>u(`command stderr: "${T}"`)),C.spawn().then(T=>{n(5,g=T)}).catch(u)}function v(){g.kill().then(()=>u("killed child process")).catch(u)}function S(){g.write(k).catch(u)}function D(){d=this.value,n(0,d)}function U(){b=this.value,n(3,b)}function O(){c=this.value,n(1,c)}function F(){f=this.value,n(2,f)}function W(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,b,k,g,_,v,S,u,D,U,O,F,W]}class ma extends Me{constructor(t){super(),ke(this,t,pa,fa,ge,{onMessage:9})}}var ha={};We(ha,{checkUpdate:()=>Xs,installUpdate:()=>Js,onUpdaterEvent:()=>Gi});async function Gi(e){return Yt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Js(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Gi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),li("tauri://update-install").catch(o=>{throw t(),o})})}async function Xs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Cs("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Gi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),li("tauri://update").catch(u=>{throw t(),u})})}function _a(e){let t;return{c(){t=a("button"),t.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function ba(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ga(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ya(e){let t;function n(o,u){return!o[0]&&!o[2]?ga:!o[1]&&o[2]?ba:_a}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function va(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("tauri://update-sta
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function La(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return dt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ri(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Aa extends Me{constructor(t){super(),ke(this,t,La,Sa,ge,{onMessage:0})}}function Ea(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,ue(u)}}}function za(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Rs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Is().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Wa extends Me{constructor(t){super(),ke(this,t,za,Ea,ge,{onMessage:2})}}function as(e,t,n){const i=e.slice();return i[32]=t[n],i}function rs(e,t,n){const i=e.slice();return i[35]=t[n],i}function us(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v;function S(C,T){return C[3]?Oa:Pa}let D=S(e),U=D(e);function O(C,T){return C[2]?Ra:Da}let F=O(e),W=F(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),U.c(),d=h(),c=a("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',f=h(),b=a("span"),W.c(),g=h(),w=a("span"),w.innerHTML='<div class="i-codicon-chrome-close"></div>',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(b,"title",k=e[2]?"Restore":"Maximize"),r(b,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(w,"title","Close"),r(w,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(C,T){m(C,t,T),s(t,n),s(t,i),s(t,l),s(l,o),U.m(o,null),s(l,d),s(l,c),s(l,f),s(l,b),W.m(b,null),s(l,g),s(l,w),_||(v=[L(o,"click",e[12]),L(c,"click",e[9]),L(b,"click",e[10]),L(w,"click",e[11])],_=!0)},p(C,T){D!==(D=S(C))&&(U.d(1),U=D(C),U&&(U.c(),U.m(o,null))),T[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),F!==(F=O(C))&&(W.d(1),W=F(C),W&&(W.c(),W.m(b,null))),T[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&r(b,"title",k)},d(C){C&&p(t),U.d(),W.d(),_=!1,ue(v)}}}function Pa(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Oa(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-su
`),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Ua(e){let t,n;return{c(){t=A(`Switch to Light mode
`),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function ja(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function b(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=A(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,g){m(k,t,g),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",b),c=!0)},p(k,g){e=k,g[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function ds(e){let t,n=e[35]&&ja(e);return{c(){n&&n.c(),t=ti()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function fs(e){let t,n=e[32].html+"",i;return{c(){t=new no(!1),i=ti(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function qa(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H,M,I,j=e[1].label+"",J,ne,ce,te,Y,se,ee,R,X,Z,_e,fe,pe,ye,oe,x,me,Le,z=e[5]&&us(e);function G(N,ie){return N[0]?Na:Ia}let Ae=G(e),ve=Ae(e),ae=!e[5]&&cs(e),de=e[7],re=[];for(let N=0;N<de.length;N+=1)re[N]=ds(rs(e,de,N));var we=e[1].component;function Ne(N){return{props:{onMessage:N[14],insecureRenderHtml:N[15]}}}we&&(Y=new we(Ne(e)));let Pe=e[6],Q=[];for(let N=0;N<Pe.length;N+=1)Q[N]=fs(as(e,Pe,N));return{c(){z&&z.c(),t=h(),n=a("div"),ve.c(),i=h(),l=a("div"),o=a("aside"),u=a("img"),c=h(),ae&&ae.c(),f=h(),b=a("a"),b.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=h(),g=a("a"),g.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,w=h(),_=a("a"),_.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,v=h(),S=a("br"),D=h(),U=a("div"),O=h(),F=a("br"),W=h(),C=a("div");for(let N=0;N<re.length;N+=1)re[N].c();T=h(),H=a("main"),M=a("div"),I=a("h1"),J=A(j),ne=h(),ce=a("div"),te=a("div"),Y&&Qn(Y.$$.fragment),se=h(),ee=a("div"),R=a("div"),X=h(),Z=a("div"),_e=a("p"),_e.textContent="Console",fe=h(),pe=a("div"),pe.innerHTML='<div class="i-codicon-clear-all"></div>',ye=h(),oe=a("div");for(let N=0;N<Q.length;N+=1)Q[N].c();r(n,"id","sidebarToggle"),r(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),r(u,"class","self-center p-7 cursor-pointer"),Qs(u.src,d="tauri_logo.png")||r(u,"src",d),r(u,"alt","Tauri logo"),r(b,"class","nv justify-between h-8"),r(b,"target","_blank"),r(b,"href","https://tauri.app/v1/guides/"),r(g,"class","nv justify-between h-8"),r(g,"target","_blank"),r(g,"href","https://github.com/tauri-apps/tauri"),r(_,"class","nv justify-between h-8"),r(_,"target","_blank"),r(_,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),r(U,"class","bg-white/5 h-2px"),r(C,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),r(o,"id","sidebar"),r(o,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),r(te,"class","mr-2"),r(ce,"class","overflow-y-auto"),r(M,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),r(R,"class","bg-black/20 h-2px cursor-ns-resize"),r(_e,"class","font-semibold"),r(pe,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),r(Z,"class","flex justify-between items-center px-2"),r(oe,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),r(ee,"id","console"),r(ee,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),r(H,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),r(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(N,ie){z&&z.m(N,ie),m(N,t,ie),m(N,n,ie),ve.m(n,null),m(N,i,ie),m(N,l,ie),s(l,o),s(o,u),s(o,c),ae&&ae.m(o,null),s(o,f),s(o,b),s(o,k),s(o,g),s(o,w),s(o,_),s(o,v),s(o,S),s(o,D),s(o,U),s(o,O),s(o,F),s(o,W),s(o,C);for(let B=0;B<re.length;B+=1)re[B].m(C,null);s(l,T),s(l,H),s(H,M),s(M,I),s(I,J),s(M,ne),s(M,ce),s(ce,te),Y&&Bt(Y,te,null),s(H,se),s(H,ee),s(ee,R),s(ee,X),s(ee,Z),s(Z,_e),s(Z,fe),s(Z,pe),s(ee,ye),s(ee,oe);for(let B=0;B<Q.length;B+=1)Q[B].m(oe,null);e[21](ee),x=!0,me||(Le=[L(u,"click",e[19]),L(R,"mousedown",e[17]),L(pe,"click",e[16])],me=!0)},p(N,ie){if(N[5]?z?z.p(N,ie):(z=us(N),z.c(),z.m(t.parentNode,t)):z&&(z.d(1),z=null),Ae!==(Ae=G(N))&&(ve.d(1),ve=Ae(N),ve&&(ve.c(),ve.m(n,null))),N[5]?ae&&(ae.d(1),ae=null):ae?ae.p(N,ie):(ae=cs(N),ae.c(),ae.m(o,f)),ie[0]&387){de=N[7];let B;for(B=0;B<de.length;B+=1){const he=rs(N,de,B);re[B]?re[B].p(he,ie):(re[B]=ds(he),re[B].c(),re[B].m(C,null))}for(;B<re.length;B+=1)re[B].d(1);re.length=de.length}if((!x||ie[0]&2)&&j!==(j=N[1].label+"")&&K(J,j),we!==(we=N[1].component)){if(Y){ni();const B=Y;Ie(B.$$.fragment,1,0,()=>{Jt(B,1)}),ii()}we?(Y=new we(Ne(N)),Qn(Y.$$.fragment),Se(Y.$$.fragment,1),Bt(Y,te,null)):Y=null}if(ie[0]&64){Pe=N[6];let B;for(B=0;B<Pe.length;B+=1){const he=as(N,Pe,B);Q[B]?Q[B].p(he,ie):(Q[B]=fs(he),Q[B].c(),Q[B].m(oe,null))}for(;B<Q.length;B+=1)Q[B].d(1);Q.length=Pe.length}},i(N){x||(Y&&Se(Y.$$.fragment,N),x=!0)},o(N){Y&&Ie(Y.$$.fragment,N),x=!1},d(N){z&&z.d(N),N&&p(t),N&&p(n),ve.d(),N&&p(i),N&&p(l),ae&&ae.d(),zt(re,N),Y&&Jt(Y),zt(Q,N),e[21](null),me=!1,ue(Le)}}}let ps=50;function ms(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function Fa(e,t){e.style.setPro