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

46 lines
98 KiB
JavaScript
Raw Normal View History

const ir=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};ir();function J(){}function wl(t){return t()}function Vo(){return Object.create(null)}function pe(t){t.forEach(wl)}function or(t){return typeof t=="function"}function Me(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Gn;function lr(t,e){return Gn||(Gn=document.createElement("a")),Gn.href=e,t===Gn.href}function rr(t){return Object.keys(t).length===0}function sr(t,...e){if(t==null)return J;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function kl(t,e,n){t.$$.on_destroy.push(sr(e,n))}function r(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function pt(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function s(t){return document.createElement(t)}function ur(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function W(t){return document.createTextNode(t)}function v(){return W(" ")}function oi(){return W("")}function D(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function xn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function u(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function re(t){return t===""?null:+t}function ar(t){return Array.from(t.childNodes)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function G(t,e){t.value=e==null?"":e}function Dt(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e){i.selected=!0;return}}t.selectedIndex=-1}function Pi(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Jn(t,e,n){t.classList[n?"add":"remove"](e)}class cr{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=ur(n.nodeName):this.e=s(n.nodeName),this.t=n,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)m(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(h)}}let Xt;function Jt(t){Xt=t}function Ml(){if(!Xt)throw new Error("Function called outside component initialization");return Xt}function ct(t){Ml().$$.on_mount.push(t)}function ji(t){Ml().$$.on_destroy.push(t)}const Vt=[],$n=[],Yn=[],Go=[],fr=Promise.resolve();let Ri=!1;function dr(){Ri||(Ri=!0,fr.then(Tl))}function Wt(t){Yn.push(t)}const Wi=new Set;let Xn=0;function Tl(){const t=Xt;do{for(;Xn<Vt.length;){const e=Vt[Xn];Xn++,Jt(e),pr(e.$$)}for(Jt(null),Vt.length=0,Xn=0;$n.length;)$n.pop()();for(let e=0;e<Yn.length;e+=1){const n=Yn[e];Wi.has(n)||(Wi.add(n),n())}Yn.length=0}while(Vt.length);for(;Go.length;)Go.pop()();Ri=!1,Wi.clear(),Jt(t)}function pr(t){if(t.fragment!==null){t.update(),pe(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Wt)}}const Kn=new Set;let ft;function li(){ft={r:0,c:[],p:ft}}function ri(){ft.r||pe(ft.c),ft=ft.p}function ze(t,e){t&&t.i&&(Kn.delete(t),t.i(e))}function je(t,e,n,i){if(t&&t.o){if(Kn.has(t))return;Kn.add(t),ft.c.push(()=>{Kn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function ei(t){t&&t.c()}function Yt(t,e,n,i){const{fragment:o,on_mount:l,on_destroy:a,after_update:f}=t.$$;o&&o.m(e,n),i||Wt(()=>{const c=l.map(wl).filter(or);a?a.push(...c):pe(c),t.$$.on_mount=[]}),f.forEach(Wt)}function Kt(t,e){const n=t.$$;n.fragment!==null&&(pe(n.on_destroy),n.f
`),stderr:f.join(`
`)})}),n.spawn().catch(l)})]})})},e}(Qn);function Ui(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:Sl,Child:Ll,EventEmitter:Qn,open:Ui});function Ol(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Al(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return[4,O({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function Fi(t,e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return[2,O({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:ht(n)}}).then(function(l){return function(){return M(i,void 0,void 0,function(){return T(this,function(a){return[2,Ol(t,l)]})})}})]})})}function Dl(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,Fi(t,e,function(o){n(o),Ol(t,o.id).catch(function(){})})]})})}var ve;function Zt(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Fi(t,null,e)]})})}function Wl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Dl(t,null,e)]})})}function si(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Al(t,void 0,e)]})})}(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",t.MENU="tauri://menu",t.CHECK_UPDATE="tauri://update",t.UPDATE_AVAILABLE="tauri://update-available",t.INSTALL_UPDATE="tauri://update-install",t.STATUS_UPDATE="tauri://update-status",t.DOWNLOAD_PROGRESS="tauri://update-download-progress"})(ve||(ve={}));Object.freeze({__proto__:null,get TauriEvent(){return ve},listen:Zt,once:Wl,emit:si});var Qt,ni=function(t,e){this.type="Logical",this.width=t,this.height=e},At=function(){function t(e,n){this.type="Physical",this.width=e,this.height=n}return t.prototype.toLogical=function(e){return new ni(this.width/e,this.height/e)},t}(),zl=function(t,e){this.type="Logical",this.x=t,this.y=e},dt=function(){function t(e,n){this.type="Physical",this.x=e,this.y=n}return t.prototype.toLogical=function(e){return new zl(this.x/e,this.y/e)},t}();function Gt(){return new zt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Pl(){return window.__TAURI_METADATA__.__windows.map(function(t){return new zt(t.label,{skip:!0})})}(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Qt||(Qt={}));var Be,Jo=["tauri://created","tauri://error"],Rl=function(){function t(e){this.label=e,this.listeners=Object.create(null)}return t.prototype.listen=function(e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,Fi(e,this.label,n)]})})},t.prototype.once=function(e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,Dl(e,this.label,n)]})})},t.prototype.emit=function(e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){if(Jo.includes(e)){for(i=0,o=this.listeners[e]||[];i<o.length;i++)(0,o[i])({event:e,id:-1,windowLabel:this.label,payload:n});return[2,Promise.resolve()]}return[2,Al(e,this.label,n)]})})},t.prototype._handleTauriEvent=function(e,n){return!!Jo.includes(e)&&(e in
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Be=new zt("main",{skip:!0}));Object.freeze({__proto__:null,WebviewWindow:zt,WebviewWindowHandle:Rl,WindowManager:Il,CloseRequestedEvent:Nl,getCurrent:Gt,getAll:Pl,get appWindow(){return Be},LogicalSize:ni,PhysicalSize:At,LogicalPosition:zl,PhysicalPosition:dt,get UserAttentionType(){return Qt},currentMonitor:vr,primaryMonitor:_r,availableMonitors:br});function gr(){return navigator.appVersion.includes("Win")}var yr=gr()?`\r
`:`
`;function jl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function wr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"version"}})]})})}function kr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function Mr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function Tr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL:yr,platform:jl,version:wr,type:kr,arch:Mr,tempdir:Tr});function Hl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Ul(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function Fl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:Ul,getVersion:Hl,getTauriVersion:Fl});function ql(t){return t===void 0&&(t=0),M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function qi(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:ql,relaunch:qi});function Cr(t){let e,n,i,o,l,a,f,c,p,d,k,_,y,g,b,S,z,U,R,q,A,E,L,P,C,F;return{c(){e=s("p"),e.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=v(),i=s("br"),o=v(),l=s("br"),a=v(),f=s("pre"),c=W("App name: "),p=s("code"),d=W(t[2]),k=W(`
App version: `),_=s("code"),y=W(t[0]),g=W(`
Tauri version: `),b=s("code"),S=W(t[1]),z=W(`
`),U=v(),R=s("br"),q=v(),A=s("div"),E=s("button"),E.textContent="Close application",L=v(),P=s("button"),P.textContent="Relaunch application",u(E,"class","btn"),u(P,"class","btn"),u(A,"class","flex flex-wrap gap-1 shadow-")},m(B,Y){m(B,e,Y),m(B,n,Y),m(B,i,Y),m(B,o,Y),m(B,l,Y),m(B,a,Y),m(B,f,Y),r(f,c),r(f,p),r(p,d),r(f,k),r(f,_),r(_,y),r(f,g),r(f,b),r(b,S),r(f,z),m(B,U,Y),m(B,R,Y),m(B,q,Y),m(B,A,Y),r(A,E),r(A,L),r(A,P),C||(F=[D(E,"click",t[3]),D(P,"click",t[4])],C=!0)},p(B,[Y]){Y&4&&x(d,B[2]),Y&1&&x(y,B[0]),Y&2&&x(S,B[1])},i:J,o:J,d(B){B&&h(e),B&&h(n),B&&h(i),B&&h(o),B&&h(l),B&&h(a),B&&h(f),B&&h(U),B&&h(R),B&&h(q),B&&h(A),C=!1,pe(F)}}}function Er(t,e,n){let i="0.0.0",o="0.0.0",l="Unknown";Ul().then(c=>{n(2,l=c)}),Hl().then(c=>{n(0,i=c)}),Fl().then(c=>{n(1,o=c)});async function a(){await ql()}async function f(){await qi()}return[i,o,l,a,f]}class Lr extends Le{constructor(e){super(),Ee(this,e,Er,Cr,Me,{})}}function Bl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Bl});function Sr(t){let e,n,i,o,l,a,f,c,p,d,k,_,y;return{c(){e=s("p"),e.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=v(),i=s("br"),o=v(),l=s("div"),l.textContent="Note that the arguments are only parsed, not implemented.",a=v(),f=s("br"),c=v(),p=s("br"),d=v(),k=s("button"),k.textContent="Get matches",u(l,"class","note"),u(k,"class","btn"),u(k,"id","cli-matches")},m(g,b){m(g,e,b),m(g,n,b),m(g,i,b),m(g,o,b),m(g,l,b),m(g,a,b),m(g,f,b),m(g,c,b),m(g,p,b),m(g,d,b),m(g,k,b),_||(y=D(k,"click",t[0]),_=!0)},p:J,i:J,o:J,d(g){g&&h(e),g&&h(n),g&&h(i),g&&h(o),g&&h(l),g&&h(a),g&&h(f),g&&h(c),g&&h(p),g&&h(d),g&&h(k),_=!1,y()}}}function Or(t,e,n){let{onMessage:i}=e;function o(){Bl().then(i).catch(i)}return t.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Ar extends Le{constructor(e){super(),Ee(this,e,Or,Sr,Me,{onMessage:1})}}function Dr(t){let e,n,i,o,l,a,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=v(),o=s("button"),o.textContent="Call Request (async) API",l=v(),a=s("button"),a.textContent="Send event to Rust",u(n,"class","btn"),u(n,"id","log"),u(o,"class","btn"),u(o,"id","request"),u(a,"class","btn"),u(a,"id","event")},m(p,d){m(p,e,d),r(e,n),r(e,i),r(e,o),r(e,l),r(e,a),f||(c=[D(n,"click",t[0]),D(o,"click",t[1]),D(a,"click",t[2])],f=!0)},p:J,i:J,o:J,d(p){p&&h(e),f=!1,pe(c)}}}function Wr(t,e,n){let{onMessage:i}=e,o;ct(async()=>{o=await Zt("rust-event",i)}),ji(()=>{o&&o()});function l(){ti("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function a(){ti("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){si("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,a,f,i]}class zr extends Le{constructor(e){super(),Ee(this,e,Wr,Dr,Me,{onMessage:3})}}function Bi(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,O({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Vl(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,O({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Pr(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Gl(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Rr(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}Object.freeze({__proto__:null,open:Bi,save:Vl,message:Pr,ask:Gl,confirm:Rr});var Pt;function Ir(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Vi(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){var n;return T(this,function(i){switch(i.label){case 0:return[4,O({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Ni(t,e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:""},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),typeof e=="string"?i.contents=e!=null?e:"":o=e,[2,O({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,
Multipart`),te=v(),oe=s("br"),Q=v(),ge=s("br"),I=v(),Z=s("button"),Z.textContent="Post it",le=v(),ue=s("br"),ee=v(),_e=s("br"),ae=v(),ei(ye.$$.fragment),i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,a.__value="PATCH",a.value=a.__value,f.__value="DELETE",f.value=f.__value,u(n,"class","input"),u(n,"id","request-method"),t[0]===void 0&&Wt(()=>t[9].call(n)),u(k,"class","input h-auto w-100%"),u(k,"id","request-body"),u(k,"placeholder","Request body"),u(k,"rows","5"),u(b,"class","btn"),u(b,"id","make-request"),u(E,"class","input"),u(P,"class","input"),u(A,"class","flex gap-2 children:grow"),u($,"type","checkbox"),u(Z,"class","btn"),u(Z,"type","button")},m(N,V){m(N,e,V),r(e,n),r(n,i),r(n,o),r(n,l),r(n,a),r(n,f),Dt(n,t[0]),r(e,c),r(e,p),r(e,d),r(e,k),G(k,t[1]),r(e,_),r(e,y),r(e,g),r(e,b),m(N,S,V),m(N,z,V),m(N,U,V),m(N,R,V),m(N,q,V),m(N,A,V),r(A,E),G(E,t[2]),r(A,L),r(A,P),G(P,t[3]),m(N,C,V),m(N,F,V),m(N,B,V),m(N,Y,V),r(Y,$),$.checked=t[5],r(Y,be),m(N,te,V),m(N,oe,V),m(N,Q,V),m(N,ge,V),m(N,I,V),m(N,Z,V),m(N,le,V),m(N,ue,V),m(N,ee,V),m(N,_e,V),m(N,ae,V),Yt(ye,N,V),ne=!0,Te||(Oe=[D(n,"change",t[9]),D(k,"input",t[10]),D(e,"submit",xn(t[6])),D(E,"input",t[11]),D(P,"input",t[12]),D($,"change",t[13]),D(Z,"click",t[7])],Te=!0)},p(N,[V]){V&1&&Dt(n,N[0]),V&2&&G(k,N[1]),V&4&&E.value!==N[2]&&G(E,N[2]),V&8&&P.value!==N[3]&&G(P,N[3]),V&32&&($.checked=N[5]);const Ie={};V&16&&(Ie.json=N[4]),ye.$set(Ie)},i(N){ne||(ze(ye.$$.fragment,N),ne=!0)},o(N){je(ye.$$.fragment,N),ne=!1},d(N){N&&h(e),N&&h(S),N&&h(z),N&&h(U),N&&h(R),N&&h(q),N&&h(A),N&&h(C),N&&h(F),N&&h(B),N&&h(Y),N&&h(te),N&&h(oe),N&&h(Q),N&&h(ge),N&&h(I),N&&h(Z),N&&h(le),N&&h(ue),N&&h(ee),N&&h(_e),N&&h(ae),Kt(ye,N),Te=!1,pe(Oe)}}}function ls(t,e,n){let i="GET",o="",{onMessage:l}=e;async function a(){const z=await ii().catch(q=>{throw l(q),q}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Zn.json(JSON.parse(o)):o!==""&&(R.body=Zn.text(o)),z.request(R).then(l).catch(l)}let f="baz",c="qux",p=null,d=!0;async function k(){const z=await ii().catch(U=>{throw l(U),U});n(4,p=await z.request({url:"http://localhost:3003",method:"POST",body:Zn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:Rt.Text}))}function _(){i=Pi(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function b(){c=this.value,n(3,c)}function S(){d=this.checked,n(5,d)}return t.$$set=z=>{"onMessage"in z&&n(8,l=z.onMessage)},[i,o,f,c,p,d,a,k,l,_,y,g,b,S]}class rs extends Le{constructor(e){super(),Ee(this,e,ls,os,Me,{onMessage:8})}}function ss(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",u(e,"class","btn"),u(e,"id","notification")},m(o,l){m(o,e,l),n||(i=D(e,"click",us),n=!0)},p:J,i:J,o:J,d(o){o&&h(e),n=!1,i()}}}function us(){new Notification("Notification title",{body:"This is the notification body"})}function as(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class cs extends Le{constructor(e){super(),Ee(this,e,as,ss,Me,{onMessage:0})}}function il(t,e,n){const i=t.slice();return i[67]=e[n],i}function ol(t,e,n){const i=t.slice();return i[70]=e[n],i}function ll(t){let e,n,i,o,l,a,f=Object.keys(t[1]),c=[];for(let p=0;p<f.length;p+=1)c[p]=rl(ol(t,f,p));return{c(){e=s("span"),e.textContent="Selected window:",n=v(),i=s("select"),o=s("option"),o.textContent="Choose a window...";for(let p=0;p<c.length;p+=1)c[p].c();u(e,"class","font-700 text-sm"),o.__value="",o.value=o.__value,o.disabled=!0,o.selected=!0,u(i,"class","input"),t[0]===void 0&&Wt(()=>t[39].call(i))},m(p,d){m(p,e,d),m(p,n,d),m(p,i,d),r(i,o);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Dt(i,t[0]),l||(a=D(i,"change",t[39]),l=!0)},p(p,d){if(d[0]&2){f=Object.keys(p[1]);let k;for(k=0;k<f.length;k+=1){const _=ol(p,f,k);c[k]?c[k].p(_,d):(c[k]=rl(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=f.length}d[0]&3&&Dt(i,p[0])},d(p){p&&h(e),p&&h(n),p&&h(i),pt(c,p),l=!1,a()}}}function rl(t){let e,n=t[
`),R=s("input"),q=v(),A=s("label"),E=W(`Resizable
`),L=s("input"),P=v(),C=s("label"),F=W(`Has decorations
`),B=s("input"),Y=v(),$=s("label"),be=W(`Always on top
`),te=s("input"),oe=v(),Q=s("label"),ge=W(`Fullscreen
`),I=s("input"),Z=v(),le=s("br"),ue=v(),ee=s("div"),_e=s("div"),ae=s("div"),ye=W(`X
`),ne=s("input"),Te=v(),Oe=s("div"),N=W(`Y
`),V=s("input"),Ie=v(),Ae=s("div"),Ce=s("div"),ce=W(`Width
`),he=s("input"),fe=v(),De=s("div"),nt=W(`Height
`),me=s("input"),de=v(),H=s("div"),ie=s("div"),X=W(`Min width
`),we=s("input"),xt=v(),mt=s("div"),$t=W(`Min height
`),Ne=s("input"),en=v(),Ve=s("div"),vt=s("div"),tn=W(`Max width
`),K=s("input"),It=v(),it=s("div"),Nt=W(`Max height
`),Pe=s("input"),_t=v(),bt=s("br"),gt=v(),We=s("div"),He=s("div"),Re=s("div"),ot=s("div"),ot.textContent="Inner Size",jt=v(),lt=s("span"),Ht=W("Width: "),yt=W(rt),Ut=v(),wt=s("span"),Ji=W("Height: "),ui=W(nn),Xi=v(),Ge=s("div"),on=s("div"),on.textContent="Outer Size",Yi=v(),ln=s("span"),Ki=W("Width: "),ai=W(rn),Qi=v(),sn=s("span"),Zi=W("Height: "),ci=W(un),xi=v(),kt=s("div"),Je=s("div"),an=s("div"),an.textContent="Inner Logical Size",$i=v(),cn=s("span"),eo=W("Width: "),fi=W(fn),to=v(),dn=s("span"),no=W("Height: "),di=W(pn),io=v(),Xe=s("div"),hn=s("div"),hn.textContent="Outer Logical Size",oo=v(),mn=s("span"),lo=W("Width: "),pi=W(vn),ro=v(),_n=s("span"),so=W("Height: "),hi=W(bn),uo=v(),Mt=s("div"),Ye=s("div"),gn=s("div"),gn.textContent="Inner Position",ao=v(),yn=s("span"),co=W("x: "),mi=W(wn),fo=v(),kn=s("span"),po=W("y: "),vi=W(Mn),ho=v(),Ke=s("div"),Tn=s("div"),Tn.textContent="Outer Position",mo=v(),Cn=s("span"),vo=W("x: "),_i=W(En),_o=v(),Ln=s("span"),bo=W("y: "),bi=W(Sn),go=v(),Tt=s("div"),Qe=s("div"),On=s("div"),On.textContent="Inner Logical Position",yo=v(),An=s("span"),wo=W("x: "),gi=W(Dn),ko=v(),Wn=s("span"),Mo=W("y: "),yi=W(zn),To=v(),Ze=s("div"),Pn=s("div"),Pn.textContent="Outer Logical Position",Co=v(),Rn=s("span"),Eo=W("x: "),wi=W(In),Lo=v(),Nn=s("span"),So=W("y: "),ki=W(jn),Mi=v(),Ti=s("br"),Ci=v(),Ft=s("h4"),Ft.textContent="Cursor",Ei=v(),Ue=s("div"),Hn=s("label"),Ct=s("input"),Oo=W(`
Grab`),Ao=v(),Un=s("label"),Et=s("input"),Do=W(`
Visible`),Wo=v(),Fn=s("label"),Lt=s("input"),zo=W(`
Ignore events`),Li=v(),Fe=s("div"),qn=s("label"),Po=W(`Icon
`),qe=s("select");for(let w=0;w<Se.length;w+=1)Se[w].c();Ro=v(),Bn=s("label"),Io=W(`X position
`),xe=s("input"),No=v(),Vn=s("label"),jo=W(`Y position
`),$e=s("input"),Si=v(),Oi=s("br"),Ai=v(),st=s("div"),ut=s("form"),et=s("input"),Ho=v(),qt=s("button"),qt.textContent="Set title",Uo=v(),at=s("form"),tt=s("input"),Fo=v(),Bt=s("button"),Bt.textContent="Open URL",u(o,"class","btn"),u(o,"title","Unminimizes after 2 seconds"),u(a,"class","btn"),u(a,"title","Unminimizes after 2 seconds"),u(c,"class","btn"),u(c,"title","Visible again after 2 seconds"),u(d,"class","btn"),u(_,"class","btn"),u(_,"title","Minimizes the window, requests attention for 3s and then resets it"),u(i,"class","flex flex-wrap gap-2"),u(R,"type","checkbox"),u(L,"type","checkbox"),u(B,"type","checkbox"),u(te,"type","checkbox"),u(I,"type","checkbox"),u(S,"class","flex flex-wrap gap-2"),u(ne,"class","input"),u(ne,"type","number"),u(ne,"min","0"),u(V,"class","input"),u(V,"type","number"),u(V,"min","0"),u(_e,"class","flex children:grow flex-col"),u(he,"class","input"),u(he,"type","number"),u(he,"min","400"),u(me,"class","input"),u(me,"type","number"),u(me,"min","400"),u(Ae,"class","flex children:grow flex-col"),u(we,"class","input"),u(we,"type","number"),u(Ne,"class","input"),u(Ne,"type","number"),u(H,"class","flex children:grow flex-col"),u(K,"class","input"),u(K,"type","number"),u(K,"min","800"),u(Pe,"class","input"),u(Pe,"type","number"),u(Pe,"min","400"),u(Ve,"class","flex children:grow flex-col"),u(ee,"class","flex flex-row gap-2 flex-wrap"),u(ot,"class","text-accent dark:text-darkAccent font-700"),u(Re,"class","grow"),u(on,"class","text-accent dark:text-darkAccent font-700"),u(Ge,"class","grow"),u(He,"class","flex"),u(an,"class","text-accent dark:text-darkAccent font-700"),u(Je,"class","grow"),u(hn,"class","text-accent dark:text-darkAccent font-700"),u(Xe,"class","grow"),u(kt,"class","flex"),u(gn,"class","text-accent dark:text-darkAccent font-700"),u(Ye,"class","grow"),u(Tn,"class","text-accent dark:text-darkAccent font-700"),u(Ke,"class","grow"),u(Mt,"class","flex"),u(On,"class","text-accent dark:text-darkAccent font-700"),u(Qe,"class","grow"),u(Pn,"class","text-accent dark:text-darkAccent font-700"),u(Ze,"class","grow"),u(Tt,"class","flex"),u(Ft,"class","mb-2"),u(Ct,"type","checkbox"),u(Et,"type","checkbox"),u(Lt,"type","checkbox"),u(Ue,"class","flex gap-2"),u(qe,"class","input"),t[19]===void 0&&Wt(()=>t[57].call(qe)),u(xe,"class","input"),u(xe,"type","number"),u($e,"class","input"),u($e,"type","number"),u(Fe,"class","flex gap-2"),u(et,"class","input grow"),u(et,"id","title"),u(qt,"class","btn"),u(qt,"type","submit"),u(ut,"class","flex gap-1"),u(tt,"class","input grow"),u(tt,"id","url"),u(Bt,"class","btn"),u(Bt,"id","open-url"),u(at,"class","flex gap-1"),u(st,"class","flex flex-col gap-1")},m(w,j){m(w,e,j),m(w,n,j),m(w,i,j),r(i,o),r(i,l),r(i,a),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,_),m(w,y,j),m(w,g,j),m(w,b,j),m(w,S,j),r(S,z),r(z,U),r(z,R),R.checked=t[3],r(S,q),r(S,A),r(A,E),r(A,L),L.checked=t[2],r(S,P),r(S,C),r(C,F),r(C,B),B.checked=t[4],r(S,Y),r(S,$),r($,be),r($,te),te.checked=t[5],r(S,oe),r(S,Q),r(Q,ge),r(Q,I),I.checked=t[6],m(w,Z,j),m(w,le,j),m(w,ue,j),m(w,ee,j),r(ee,_e),r(_e,ae),r(ae,ye),r(ae,ne),G(ne,t[13]),r(_e,Te),r(_e,Oe),r(Oe,N),r(Oe,V),G(V,t[14]),r(ee,Ie),r(ee,Ae),r(Ae,Ce),r(Ce,ce),r(Ce,he),G(he,t[7]),r(Ae,fe),r(Ae,De),r(De,nt),r(De,me),G(me,t[8]),r(ee,de),r(ee,H),r(H,ie),r(ie,X),r(ie,we),G(we,t[9]),r(H,xt),r(H,mt),r(mt,$t),r(mt,Ne),G(Ne,t[10]),r(ee,en),r(ee,Ve),r(Ve,vt),r(vt,tn),r(vt,K),G(K,t[11]),r(Ve,It),r(Ve,it),r(it,Nt),r(it,Pe),G(Pe,t[12]),m(w,_t,j),m(w,bt,j),m(w,gt,j),m(w,We,j),r(We,He),r(He,Re),r(Re,ot),r(Re,jt),r(Re,lt),r(lt,Ht),r(lt,yt),r(Re,Ut),r(Re,wt),r(wt,Ji),r(wt,ui),r(He,Xi),r(He,Ge),r(Ge,on),r(Ge,Yi),r(Ge,ln),r(ln,Ki),r(ln,ai),r(Ge,Qi),r(Ge,sn),r(sn,Zi),r(sn,ci),r(We,xi),r(We,kt),r(kt,Je),r(Je,an),r(Je,$i),r(Je,cn),r(cn,eo),r(cn,fi),r(Je,to),r(Je,dn),r(dn,no),r(dn,di),r(kt,io),r(kt,Xe),r(Xe,hn),r(Xe,oo),r(Xe,mn),r(mn,lo),r(mn,pi),r(Xe,ro),r(Xe,_n),r(_n,so),r(_n,hi),r(We,uo),r(We,Mt),r(Mt,Ye),r(Ye,gn),r(Ye,ao),r(Ye,yn),r(yn,co),r(yn,mi),r(Ye,fo),r(Ye,kn),r(kn,po),r(kn,vi),r(Mt,ho),r(Mt,Ke),r(Ke,Tn),r(Ke,mo),r(Ke,Cn),r(Cn,vo),r(Cn,_i),r(Ke,_o),r(Ke,Ln),r(Ln,bo),r(Ln,
`),o=s("input"),l=v(),a=s("div"),f=W(`Encoding:
`),c=s("input"),p=v(),d=s("div"),k=W(`Working directory:
`),_=s("input"),y=v(),g=s("div"),b=W(`Arguments:
`),S=s("input"),z=v(),U=s("div"),R=s("button"),R.textContent="Run",q=v(),A=s("button"),A.textContent="Kill",E=v(),C&&C.c(),u(o,"class","grow input"),u(n,"class","flex items-center gap-1"),u(c,"class","grow input"),u(a,"class","flex items-center gap-1"),u(_,"class","grow input"),u(_,"placeholder","Working directory"),u(d,"class","flex items-center gap-1"),u(S,"class","grow input"),u(S,"placeholder","Environment variables"),u(g,"class","flex items-center gap-1"),u(R,"class","btn"),u(A,"class","btn"),u(U,"class","flex children:grow gap-1"),u(e,"class","flex flex-col childre:grow gap-1")},m(F,B){m(F,e,B),r(e,n),r(n,i),r(n,o),G(o,t[0]),r(e,l),r(e,a),r(a,f),r(a,c),G(c,t[3]),r(e,p),r(e,d),r(d,k),r(d,_),G(_,t[1]),r(e,y),r(e,g),r(g,b),r(g,S),G(S,t[2]),r(e,z),r(e,U),r(U,R),r(U,q),r(U,A),r(e,E),C&&C.m(e,null),L||(P=[D(o,"input",t[10]),D(c,"input",t[11]),D(_,"input",t[12]),D(S,"input",t[13]),D(R,"click",t[6]),D(A,"click",t[7])],L=!0)},p(F,[B]){B&1&&o.value!==F[0]&&G(o,F[0]),B&8&&c.value!==F[3]&&G(c,F[3]),B&2&&_.value!==F[1]&&G(_,F[1]),B&4&&S.value!==F[2]&&G(S,F[2]),F[5]?C?C.p(F,B):(C=dl(F),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i:J,o:J,d(F){F&&h(e),C&&C.d(),L=!1,pe(P)}}}function ys(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:a}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k="",_;function y(){return p.split(" ").reduce((E,L)=>{let[P,C]=L.split("=");return{...E,[P]:C}},{})}function g(){n(5,_=null);const E=new Sl(o,[...l,f],{cwd:c||null,env:y(),encoding:d});E.on("close",L=>{a(`command finished with code ${L.code} and signal ${L.signal}`),n(5,_=null)}),E.on("error",L=>a(`command error: "${L}"`)),E.stdout.on("data",L=>a(`command stdout: "${L}"`)),E.stderr.on("data",L=>a(`command stderr: "${L}"`)),E.spawn().then(L=>{n(5,_=L)}).catch(a)}function b(){_.kill().then(()=>a("killed child process")).catch(a)}function S(){_.write(k).catch(a)}function z(){f=this.value,n(0,f)}function U(){d=this.value,n(3,d)}function R(){c=this.value,n(1,c)}function q(){p=this.value,n(2,p)}function A(){k=this.value,n(4,k)}return t.$$set=E=>{"onMessage"in E&&n(9,a=E.onMessage)},[f,c,p,d,k,_,g,b,S,a,z,U,R,q,A]}class ws extends Le{constructor(e){super(),Ee(this,e,ys,gs,Me,{onMessage:9})}}function Gi(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,Zt(ve.STATUS_UPDATE,function(n){t(n==null?void 0:n.payload)})]})})}function $l(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return T(this,function(n){return[2,new Promise(function(i,o){Gi(function(l){return l.error?(t(),o(l.error)):l.status==="DONE"?(t(),i()):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),si(ve.INSTALL_UPDATE).catch(function(l){throw t(),l})})]})})}function er(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return T(this,function(n){return[2,new Promise(function(i,o){Wl(ve.UPDATE_AVAILABLE,function(l){var a;a=l==null?void 0:l.payload,t(),i({manifest:a,shouldUpdate:!0})}).catch(function(l){throw t(),l}),Gi(function(l){return l.error?(t(),o(l.error)):l.status==="UPTODATE"?(t(),i({shouldUpdate:!1})):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),si(ve.CHECK_UPDATE).catch(function(l){throw t(),l})})]})})}Object.freeze({__proto__:null,onUpdaterEvent:Gi,installUpdate:$l,checkUpdate:er});function ks(t){let e;return{c(){e=s("button"),e.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',u(e,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,e,i)},p:J,d(n){n&&h(e)}}}function Ms(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",u(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[4]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function Ts(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",u(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[3]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function Cs(t){let e;function n(l,a){return!l[0]&&!l[2]?Ts:!l[1]&&l[2]?Ms:ks}let i=n(t),o=i(t);return{c(){e=s("div"),o.c(),u(e,"class","flex ch
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,u(e,"class","flex flex-col gap-2")},m(n,i){m(n,e,i)},p:J,i:J,o:J,d(n){n&&h(e)}}}function Ws(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};function l(f){const c=document.querySelector("video"),p=f.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${p[0].label}`),window.stream=f,c.srcObject=f}function a(f){if(f.name==="ConstraintNotSatisfiedError"){const c=o.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else f.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: ${f.name}`,f)}return ct(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);l(f)}catch(f){a(f)}}),ji(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class zs extends Le{constructor(e){super(),Ee(this,e,Ws,Ds,Me,{onMessage:0})}}function pl(t,e,n){const i=t.slice();return i[32]=e[n],i}function hl(t,e,n){const i=t.slice();return i[35]=e[n],i}function ml(t){let e,n,i,o,l,a,f,c,p,d,k,_,y,g,b;function S(E,L){return E[3]?Rs:Ps}let z=S(t),U=z(t);function R(E,L){return E[2]?Ns:Is}let q=R(t),A=q(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=v(),o=s("span"),l=s("span"),U.c(),f=v(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=v(),d=s("span"),A.c(),_=v(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',u(n,"class","lt-sm:pl-10 text-darkPrimaryText"),u(l,"title",a=t[3]?"Switch to Light mode":"Switch to Dark mode"),u(l,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(c,"title","Minimize"),u(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(d,"title",k=t[2]?"Restore":"Maximize"),u(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(y,"title","Close"),u(y,"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 "),u(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),u(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),u(e,"data-tauri-drag-region","")},m(E,L){m(E,e,L),r(e,n),r(e,i),r(e,o),r(o,l),U.m(l,null),r(o,f),r(o,c),r(o,p),r(o,d),A.m(d,null),r(o,_),r(o,y),g||(b=[D(l,"click",t[12]),D(c,"click",t[9]),D(d,"click",t[10]),D(y,"click",t[11])],g=!0)},p(E,L){z!==(z=S(E))&&(U.d(1),U=z(E),U&&(U.c(),U.m(l,null))),L[0]&8&&a!==(a=E[3]?"Switch to Light mode":"Switch to Dark mode")&&u(l,"title",a),q!==(q=R(E))&&(A.d(1),A=q(E),A&&(A.c(),A.m(d,null))),L[0]&4&&k!==(k=E[2]?"Restore":"Maximize")&&u(d,"title",k)},d(E){E&&h(e),U.d(),A.d(),g=!1,pe(b)}}}function Ps(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-moon")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Rs(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-sun")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Is(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-maximize")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Ns(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-restore")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function js(t){let e;return{c(){e=s("span"),u(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Hs(t){let e;return{c(){e=s("span"),u(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function vl(t){let e,n,i,o,l,a,f,c,p;function d(y,g){return y[3]?Fs:Us}let k=d(t),_=k(t);return{c(){e=s("a"),_.c(),n=v(),i=s("br"),o=v(),l=s("div"),a=v(),f=s
`),n=s("div"),u(n,"class","i-ph-moon")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function Fs(t){let e,n;return{c(){e=W(`Switch to Light mode
`),n=s("div"),u(n,"class","i-ph-sun")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function qs(t){let e,n,i,o,l,a=t[35].label+"",f,c,p,d;function k(){return t[20](t[35])}return{c(){e=s("a"),n=s("div"),o=v(),l=s("p"),f=W(a),u(n,"class",i=t[35].icon+" mr-2"),u(e,"href","##"),u(e,"class",c="nv "+(t[1]===t[35]?"nv_selected":""))},m(_,y){m(_,e,y),r(e,n),r(e,o),r(e,l),r(l,f),p||(d=D(e,"click",k),p=!0)},p(_,y){t=_,y[0]&2&&c!==(c="nv "+(t[1]===t[35]?"nv_selected":""))&&u(e,"class",c)},d(_){_&&h(e),p=!1,d()}}}function _l(t){let e,n=t[35]&&qs(t);return{c(){n&&n.c(),e=oi()},m(i,o){n&&n.m(i,o),m(i,e,o)},p(i,o){i[35]&&n.p(i,o)},d(i){n&&n.d(i),i&&h(e)}}}function bl(t){let e,n=t[32].html+"",i;return{c(){e=new cr(!1),i=oi(),e.a=i},m(o,l){e.m(n,o,l),m(o,i,l)},p(o,l){l[0]&64&&n!==(n=o[32].html+"")&&e.p(n)},d(o){o&&h(i),o&&e.d()}}}function Bs(t){let e,n,i,o,l,a,f,c,p,d,k,_,y,g,b,S,z,U,R,q,A,E,L,P,C,F,B,Y=t[1].label+"",$,be,te,oe,Q,ge,I,Z,le,ue,ee,_e,ae,ye,ne,Te,Oe,N,V=t[5]&&ml(t);function Ie(H,ie){return H[0]?Hs:js}let Ae=Ie(t),Ce=Ae(t),ce=!t[5]&&vl(t),he=t[7],fe=[];for(let H=0;H<he.length;H+=1)fe[H]=_l(hl(t,he,H));var De=t[1].component;function nt(H){return{props:{onMessage:H[14],insecureRenderHtml:H[15]}}}De&&(Q=new De(nt(t)));let me=t[6],de=[];for(let H=0;H<me.length;H+=1)de[H]=bl(pl(t,me,H));return{c(){V&&V.c(),e=v(),n=s("div"),Ce.c(),i=v(),o=s("div"),l=s("aside"),a=s("img"),c=v(),ce&&ce.c(),p=v(),d=s("a"),d.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=v(),_=s("a"),_.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,y=v(),g=s("a"),g.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,b=v(),S=s("br"),z=v(),U=s("div"),R=v(),q=s("br"),A=v(),E=s("div");for(let H=0;H<fe.length;H+=1)fe[H].c();P=v(),C=s("main"),F=s("div"),B=s("h1"),$=W(Y),be=v(),te=s("div"),oe=s("div"),Q&&ei(Q.$$.fragment),ge=v(),I=s("div"),Z=s("div"),le=v(),ue=s("div"),ee=s("p"),ee.textContent="Console",_e=v(),ae=s("div"),ae.innerHTML='<div class="i-codicon-clear-all"></div>',ye=v(),ne=s("div");for(let H=0;H<de.length;H+=1)de[H].c();u(n,"id","sidebarToggle"),u(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"),u(a,"class","self-center p-7 cursor-pointer"),lr(a.src,f="tauri_logo.png")||u(a,"src",f),u(a,"alt","Tauri logo"),u(d,"class","nv justify-between h-8"),u(d,"target","_blank"),u(d,"href","https://tauri.app/v1/guides/"),u(_,"class","nv justify-between h-8"),u(_,"target","_blank"),u(_,"href","https://github.com/tauri-apps/tauri"),u(g,"class","nv justify-between h-8"),u(g,"target","_blank"),u(g,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),u(U,"class","bg-white/5 h-2px"),u(E,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),u(l,"id","sidebar"),u(l,"class",L="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(t[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),u(oe,"class","mr-2"),u(te,"class","overflow-y-auto"),u(F,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),u(Z,"class","bg-black/20 h-2px cursor-ns-resize"),u(ee,"class","font-semibold"),u(ae,"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 "),u(ue,"class","flex justify-between items-center px-2"),u(ne,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),u(I,"id","console"),u(I,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),u(C,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),u(o,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(H,ie){V&&V.m(H,ie),m(H,e,ie),m(H,n,ie),Ce.m(n,null),m(H,i,ie),m(H,o,ie),r(o,l),r(l,a),r(l,c),ce&&ce.m(l,null),r(l,p),r(l,d),r(l,k),r(l,_),r(l,y),r(l,g),r(l,b),r(l,S),r(l,z),r(l,U),r(l,R),r(l,q),r(l,A),r(l,E);for(let X=0;X<fe.length;X+=1)fe[X].m(E,null);r(o,P),r(o,C),r(C,F),r(F,B),r(B,$),r(F,be),r(F,te),r(te,oe),Q&&Yt(Q,oe,null),r(C,ge),r(C,I),r(I,Z),r(I,le),r(I,ue),r(ue,ee),r(ue,_e),r(ue,ae),r(I,ye),r(I,ne);for(let X=0;X<de.length;X+=1)de[X].m(ne,null);t[21](I),Te=!0,Oe||(N=[D(a,"click",t[19]),D(Z,"mousedown",t[17]),D(ae,"click",t[16])],Oe=!0)},p(H,ie){if(H[5]?V?V.p(H,ie):(V=ml(H),V.c(),V.m(e.parentNode,e)):V&&(V.d(1),V=null),Ae!==(Ae=Ie(H))&&(Ce.d(1),Ce=Ae(H),Ce&&(Ce.c(),Ce.m(n,null))),H[5]?ce&&(ce.d(1),ce=null):ce?ce.p(H,ie):(ce=vl(H),ce.c(),ce.m(l,p)),ie[0]&387){he=H[7];let X;for(X=0;X<he.length;X+=1){const we=hl(H,he,X);fe[X]?fe[X].p(we,ie):(fe[X]=_l(we),fe[X].c(),fe[X].m(E,null))}for(;X<fe.length;X+=1)fe[X].d(1);fe.length=he.length}if((!Te||ie[0]&32&&L!==(L="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(H[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&u(l,"class",L),(!Te||ie[0]&2)&&Y!==(Y=H[1].label+"")&&x($,Y),De!==(De=H[1].component)){if(Q){li();const X=Q;je(X.$$.fragment,1,0,()=>{Kt(X,1)}),ri()}De?(Q=new De(nt(H)),ei(Q.$$.fragment),ze(Q.$$.fragment,1),Yt(Q,oe,null)):Q=null}if(ie[0]&64){me=H[6];let X;for(X=0;X<me.length;X+=1){const we=pl(H,me,X);de[X]?de[X].p(we,ie):(de[X]=bl(we),de[X].c(),de[X].m(ne,null))}for(;X<de.length;X+=1)de[X].d(1);de.length=me.length}},i(H){Te||(Q&&ze(Q.$$.