var zi=Object.defineProperty,Ci=Object.defineProperties;var Mi=Object.getOwnPropertyDescriptors;var Yl=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var Jl=(n,t,l)=>t in n?zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[t]=l,Kl=(n,t)=>{for(var l in t||(t={}))Ti.call(t,l)&&Jl(n,l,t[l]);if(Yl)for(var l of Yl(t))Si.call(t,l)&&Jl(n,l,t[l]);return n},Ql=(n,t)=>Ci(n,Mi(t));import{S as X,i as Y,s as J,e as o,a as h,t as C,b as u,c as S,d as e,l as y,f as G,n as W,g as R,r as x,h as Ri,j as Li,o as Ei,k as Hi,m as Zl,p as Oi,q as en,u as $l,v as Wn,w as Un,x as Pi,y as E,z as xl,A as ei,B as Ai,C as tn,D as $e,E as ti,F as Ii,G as Wi,H as Ui,I as qi,J as qn,K as xe,L as ni,M as Nn,N as Dn,O as B,P as jn,Q as nn,R as Gn,T as li,U as ii,V as Ni,W as Di,X as si,Y as oi,Z as ji,_ as Gi,$ as Bi,a0 as Fi,a1 as Vi,a2 as Xi,a3 as Yi,a4 as Ji,a5 as Ki,a6 as Bn,a7 as Fn,a8 as Vn,a9 as Xn,aa as Yn,ab as Qi,ac as ai,ad as Zi,ae as $i,af as xi,ag as es}from"./vendor.js";const ts=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function l(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerpolicy&&(a.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?a.credentials="include":s.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=l(s);fetch(s.href,a)}};ts();function ns(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P;return{c(){t=o("h1"),t.textContent="Welcome",l=h(),i=o("p"),i.textContent="Tauri's API capabilities using the ` @tauri-apps/api ` package. It's used as\n the main validation app, serving as the testbed of our development process. In\n the future, this app will be used on Tauri's integration tests.",s=h(),a=o("p"),r=C("Current App version: "),c=C(n[0]),m=h(),v=o("p"),k=C("Current Tauri version: "),g=C(n[1]),p=h(),_=o("p"),w=C("Current App name: "),b=C(n[2]),d=h(),z=o("button"),z.textContent="Close application",M=h(),q=o("button"),q.textContent="Relaunch application",u(z,"class","button"),u(q,"class","button")},m(L,I){S(L,t,I),S(L,l,I),S(L,i,I),S(L,s,I),S(L,a,I),e(a,r),e(a,c),S(L,m,I),S(L,v,I),e(v,k),e(v,g),S(L,p,I),S(L,_,I),e(_,w),e(_,b),S(L,d,I),S(L,z,I),S(L,M,I),S(L,q,I),A||(P=[y(z,"click",n[3]),y(q,"click",n[4])],A=!0)},p(L,[I]){I&1&&G(c,L[0]),I&2&&G(g,L[1]),I&4&&G(b,L[2])},i:W,o:W,d(L){L&&R(t),L&&R(l),L&&R(i),L&&R(s),L&&R(a),L&&R(m),L&&R(v),L&&R(p),L&&R(_),L&&R(d),L&&R(z),L&&R(M),L&&R(q),A=!1,x(P)}}}function ls(n,t,l){let i=0,s=0,a="Unknown";Ri().then(m=>{l(2,a=m)}),Li().then(m=>{l(0,i=m)}),Ei().then(m=>{l(1,s=m)});async function r(){await Hi()}async function c(){await Zl()}return[i,s,a,r,c]}class is extends X{constructor(t){super();Y(this,t,ls,ns,J,{})}}function ss(n){let t,l,i,s,a,r,c,m,v,k,g;return{c(){t=o("div"),l=C(`This binary can be run on the terminal and takes the following arguments: `),i=o("ul"),i.innerHTML=`
  • --config PATH
  • --theme light|dark|system
  • --verbose
  • `,s=C(` Additionally, it has a `),a=o("i"),a.textContent="update --background",r=C(` subcommand. Note that the arguments are only parsed, not implemented. `),c=o("br"),m=h(),v=o("button"),v.textContent="Get matches",u(v,"class","button"),u(v,"id","cli-matches")},m(p,_){S(p,t,_),e(t,l),e(t,i),e(t,s),e(t,a),e(t,r),e(t,c),e(t,m),e(t,v),k||(g=y(v,"click",n[0]),k=!0)},p:W,i:W,o:W,d(p){p&&R(t),k=!1,g()}}}function os(n,t,l){let{onMessage:i}=t;function s(){Oi().then(i).catch(i)}return n.$$set=a=>{"onMessage"in a&&l(1,i=a.onMessage)},[s,i]}class as extends X{constructor(t){super();Y(this,t,os,ss,J,{onMessage:1})}}function us(n){let t,l,i,s,a,r,c,m;return{c(){t=o("div"),l=o("button"),l.textContent="Call Log API",i=h(),s=o("button"),s.textContent="Call Request (async) API",a=h(),r=o("button"),r.textContent="Send event to Rust",u(l,"class","button"),u(l,"id","log"),u(s,"class","button"),u(s,"id","request"),u(r,"class","button"),u(r,"id","event")},m(v,k){S(v,t,k),e(t,l),e(t,i),e(t,s),e(t,a),e(t,r),c||(m=[y(l,"click",n[0]),y(s,"click",n[1]),y(r,"click",n[2])],c=!0)},p:W,i:W,o:W,d(v){v&&R(t),c=!1,x(m)}}}function rs(n,t,l){let{onMessage:i}=t,s;en(async()=>{s=await $l("rust-event",i)}),Wn(()=>{s&&s()});function a(){Un("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function r(){Un("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){Pi("js-event","this is the payload string")}return n.$$set=m=>{"onMessage"in m&&l(3,i=m.onMessage)},[a,r,c,i]}class cs extends X{constructor(t){super();Y(this,t,rs,us,J,{onMessage:3})}}function ps(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A;return{c(){t=o("div"),l=o("input"),i=h(),s=o("input"),a=h(),r=o("div"),c=o("input"),m=h(),v=o("label"),v.textContent="Multiple",k=h(),g=o("div"),p=o("input"),_=h(),w=o("label"),w.textContent="Directory",b=h(),d=o("button"),d.textContent="Open dialog",z=h(),M=o("button"),M.textContent="Open save dialog",u(l,"id","dialog-default-path"),u(l,"placeholder","Default path"),u(s,"id","dialog-filter"),u(s,"placeholder","Extensions filter, comma-separated"),u(s,"class","svelte-1eg58yg"),u(c,"type","checkbox"),u(c,"id","dialog-multiple"),u(v,"for","dialog-multiple"),u(p,"type","checkbox"),u(p,"id","dialog-directory"),u(w,"for","dialog-directory"),u(d,"class","button"),u(d,"id","open-dialog"),u(M,"class","button"),u(M,"id","save-dialog")},m(P,L){S(P,t,L),e(t,l),E(l,n[0]),e(t,i),e(t,s),E(s,n[1]),e(t,a),e(t,r),e(r,c),c.checked=n[2],e(r,m),e(r,v),e(t,k),e(t,g),e(g,p),p.checked=n[3],e(g,_),e(g,w),e(t,b),e(t,d),e(t,z),e(t,M),q||(A=[y(l,"input",n[8]),y(s,"input",n[9]),y(c,"change",n[10]),y(p,"change",n[11]),y(d,"click",n[4]),y(M,"click",n[5])],q=!0)},p(P,[L]){L&1&&l.value!==P[0]&&E(l,P[0]),L&2&&s.value!==P[1]&&E(s,P[1]),L&4&&(c.checked=P[2]),L&8&&(p.checked=P[3])},i:W,o:W,d(P){P&&R(t),q=!1,x(A)}}}function fs(n,t){var l=new Blob([n],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(s){var a=s.target.result;t(a.substr(a.indexOf(",")+1))},i.readAsDataURL(l)}function ds(n,t,l){let{onMessage:i}=t,{insecureRenderHtml:s}=t,a=null,r=null,c=!1,m=!1;function v(){xl({title:"My wonderful open dialog",defaultPath:a,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[],multiple:c,directory:m}).then(function(b){if(Array.isArray(b))i(b);else{var d=b,z=d.match(/\S+\.\S+$/g);ei(d).then(function(M){z&&(d.includes(".png")||d.includes(".jpg"))?fs(new Uint8Array(M),function(q){var A="data:image/png;base64,"+q;s('')}):i(b)}).catch(i(b))}}).catch(i)}function k(){Ai({title:"My wonderful save dialog",defaultPath:a,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function g(){a=this.value,l(0,a)}function p(){r=this.value,l(1,r)}function _(){c=this.checked,l(2,c)}function w(){m=this.checked,l(3,m)}return n.$$set=b=>{"onMessage"in b&&l(6,i=b.onMessage),"insecureRenderHtml"in b&&l(7,s=b.insecureRenderHtml)},[a,r,c,m,v,k,i,s,g,p,_,w]}class hs extends X{constructor(t){super();Y(this,t,ds,ps,J,{onMessage:6,insecureRenderHtml:7})}}function ui(n,t,l){const i=n.slice();return i[9]=t[l],i}function ri(n){let t,l=n[9][0]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[9][1],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p:W,d(a){a&&R(t)}}}function ms(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w=n[2],b=[];for(let d=0;disNaN(parseInt(p))).map(p=>[p,ti[p]]);function m(){const p=a.match(/\S+\.\S+$/g),_={dir:ci()};(p?ei(a,_):Ii(a,_)).then(function(b){if(p)if(a.includes(".png")||a.includes(".jpg"))vs(new Uint8Array(b),function(d){const z="data:image/png;base64,"+d;s('')});else{const d=String.fromCharCode.apply(null,b);s(''),setTimeout(()=>{const z=document.getElementById("file-response");z.value=d,document.getElementById("file-save").addEventListener("click",function(){Wi(a,z.value,{dir:ci()}).catch(i)})})}else i(b)}).catch(i)}function v(){l(1,r.src=Ui(a),r)}function k(){a=this.value,l(0,a)}function g(p){qi[p?"unshift":"push"](()=>{r=p,l(1,r)})}return n.$$set=p=>{"onMessage"in p&&l(5,i=p.onMessage),"insecureRenderHtml"in p&&l(6,s=p.insecureRenderHtml)},[a,r,c,m,v,i,s,k,g]}class gs extends X{constructor(t){super();Y(this,t,_s,ms,J,{onMessage:5,insecureRenderHtml:6})}}function bs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b;return{c(){t=o("form"),l=o("select"),i=o("option"),i.textContent="GET",s=o("option"),s.textContent="POST",a=o("option"),a.textContent="PUT",r=o("option"),r.textContent="PATCH",c=o("option"),c.textContent="DELETE",m=h(),v=o("br"),k=h(),g=o("textarea"),p=h(),_=o("button"),_.textContent="Make request",i.__value="GET",i.value=i.__value,s.__value="POST",s.value=s.__value,a.__value="PUT",a.value=a.__value,r.__value="PATCH",r.value=r.__value,c.__value="DELETE",c.value=c.__value,u(l,"class","button"),u(l,"id","request-method"),n[0]===void 0&&qn(()=>n[4].call(l)),u(g,"id","request-body"),u(g,"placeholder","Request body"),u(g,"rows","5"),u(g,"class","svelte-1xfmj7b"),u(_,"class","button"),u(_,"id","make-request")},m(d,z){S(d,t,z),e(t,l),e(l,i),e(l,s),e(l,a),e(l,r),e(l,c),xe(l,n[0]),e(t,m),e(t,v),e(t,k),e(t,g),E(g,n[1]),e(t,p),e(t,_),w||(b=[y(l,"change",n[4]),y(g,"input",n[5]),y(t,"submit",tn(n[2]))],w=!0)},p(d,[z]){z&1&&xe(l,d[0]),z&2&&E(g,d[1])},i:W,o:W,d(d){d&&R(t),w=!1,x(b)}}}function ws(n,t,l){let i="GET",s="",{onMessage:a}=t;async function r(){const v=await ni().catch(p=>{throw a(p),p}),g={url:"http://localhost:3003",method:i||"GET"||"GET"};s.startsWith("{")&&s.endsWith("}")||s.startsWith("[")&&s.endsWith("]")?g.body=Nn.json(JSON.parse(s)):s!==""&&(g.body=Nn.text(s)),v.request(g).then(a).catch(a)}function c(){i=Dn(this),l(0,i)}function m(){s=this.value,l(1,s)}return n.$$set=v=>{"onMessage"in v&&l(3,a=v.onMessage)},[i,s,r,a,c,m]}class ks extends X{constructor(t){super();Y(this,t,ws,bs,J,{onMessage:3})}}function ys(n){let t,l,i;return{c(){t=o("button"),t.textContent="Send test notification",u(t,"class","button"),u(t,"id","notification")},m(s,a){S(s,t,a),l||(i=y(t,"click",zs),l=!0)},p:W,i:W,o:W,d(s){s&&R(t),l=!1,i()}}}function zs(){new Notification("Notification title",{body:"This is the notification body"})}function Cs(n,t,l){let{onMessage:i}=t;return n.$$set=s=>{"onMessage"in s&&l(0,i=s.onMessage)},[i]}class Ms extends X{constructor(t){super();Y(this,t,Cs,ys,J,{onMessage:0})}}function pi(n,t,l){const i=n.slice();return i[65]=t[l],i}function fi(n,t,l){const i=n.slice();return i[68]=t[l],i}function di(n){let t,l=n[68]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[68],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p(a,r){r[0]&2&&l!==(l=a[68]+"")&&G(i,l),r[0]&2&&s!==(s=a[68])&&(t.__value=s,t.value=t.__value)},d(a){a&&R(t)}}}function hi(n){let t,l=n[65]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[65],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p:W,d(a){a&&R(t)}}}function Ts(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P,L,I,N,K,fe,V,j,O,Q,H,F,Se,Re,Ae,wt,et,ee,de,Ie,kt,le,yt,We,zt,ie,Ct,he,Ue,Mt,se,Tt,qe,St,oe,Rt,me,Ne,Lt,ae,Et,De,Ht,ue,Ot,ve,je,D,te,Jn,Pt,Kn,ce,ln,re,Ge,_e,sn,Qn,tt,Zn,At=n[25].width+"",on,$n,nt,xn,It=n[25].height+"",an,el,ge,un,tl,lt,nl,Wt=n[26].width+"",rn,ll,it,il,Ut=n[26].height+"",cn,sl,Be,be,pn,ol,st,al,qt=n[25].toLogical(n[22]).width+"",fn,ul,ot,rl,Nt=n[25].toLogical(n[22]).height+"",dn,cl,we,hn,pl,at,fl,Dt=n[26].toLogical(n[22]).width+"",mn,dl,ut,hl,jt=n[26].toLogical(n[22]).height+"",vn,ml,Fe,ke,_n,vl,rt,_l,Gt=n[23].x+"",gn,gl,ct,bl,Bt=n[23].y+"",bn,wl,ye,wn,kl,pt,yl,Ft=n[24].x+"",kn,zl,ft,Cl,Vt=n[24].y+"",yn,Ml,Ve,ze,zn,Tl,dt,Sl,Xt=n[23].toLogical(n[22]).x+"",Cn,Rl,ht,Ll,Yt=n[23].toLogical(n[22]).y+"",Mn,El,Ce,Tn,Hl,mt,Ol,Jt=n[24].toLogical(n[22]).x+"",Sn,Pl,vt,Al,Kt=n[24].toLogical(n[22]).y+"",Rn,Ln,ne,En,Il,Qt,Xe,Wl,Ul,Zt,Ye,ql,Nl,pe,Dl,Je,$t,jl,Le,Gl,xt,Bl,Ee,Hn,Me,He,Fl,_t,On,Te,Oe,Vl,gt,Pn,Pe,An,Ke,In,Xl,Qe=Object.keys(n[1]),Z=[];for(let f=0;fn[37].call(l)),u(r,"type","checkbox"),u(k,"type","checkbox"),u(_,"title","Unminimizes after 2 seconds"),u(b,"title","Unminimizes after 2 seconds"),u(z,"title","Visible again after 2 seconds"),u(A,"type","checkbox"),u(N,"type","checkbox"),u(j,"type","checkbox"),u(F,"type","checkbox"),u(le,"type","number"),u(le,"min","0"),u(le,"class","svelte-1tppwwz"),u(ie,"type","number"),u(ie,"min","0"),u(ie,"class","svelte-1tppwwz"),u(de,"class","flex col grow svelte-1tppwwz"),u(se,"type","number"),u(se,"min","400"),u(se,"class","svelte-1tppwwz"),u(oe,"type","number"),u(oe,"min","400"),u(oe,"class","svelte-1tppwwz"),u(he,"class","flex col grow svelte-1tppwwz"),u(ae,"type","number"),u(ae,"class","svelte-1tppwwz"),u(ue,"type","number"),u(ue,"class","svelte-1tppwwz"),u(me,"class","flex col grow svelte-1tppwwz"),u(te,"type","number"),u(te,"min","400"),u(te,"class","svelte-1tppwwz"),u(ce,"type","number"),u(ce,"min","400"),u(ce,"class","svelte-1tppwwz"),u(ve,"class","flex col grow svelte-1tppwwz"),u(ee,"class","window-controls flex flex-row svelte-1tppwwz"),u(t,"class","flex col"),u(tt,"class","svelte-1tppwwz"),u(nt,"class","svelte-1tppwwz"),u(_e,"class","grow window-property svelte-1tppwwz"),u(lt,"class","svelte-1tppwwz"),u(it,"class","svelte-1tppwwz"),u(ge,"class","grow window-property svelte-1tppwwz"),u(Ge,"class","flex"),u(st,"class","svelte-1tppwwz"),u(ot,"class","svelte-1tppwwz"),u(be,"class","grow window-property svelte-1tppwwz"),u(at,"class","svelte-1tppwwz"),u(ut,"class","svelte-1tppwwz"),u(we,"class","grow window-property svelte-1tppwwz"),u(Be,"class","flex"),u(rt,"class","svelte-1tppwwz"),u(ct,"class","svelte-1tppwwz"),u(ke,"class","grow window-property svelte-1tppwwz"),u(pt,"class","svelte-1tppwwz"),u(ft,"class","svelte-1tppwwz"),u(ye,"class","grow window-property svelte-1tppwwz"),u(Fe,"class","flex"),u(dt,"class","svelte-1tppwwz"),u(ht,"class","svelte-1tppwwz"),u(ze,"class","grow window-property svelte-1tppwwz"),u(mt,"class","svelte-1tppwwz"),u(vt,"class","svelte-1tppwwz"),u(Ce,"class","grow window-property svelte-1tppwwz"),u(Ve,"class","flex"),u(Xe,"type","checkbox"),u(Ye,"type","checkbox"),u(pe,"class","button"),n[19]===void 0&&qn(()=>n[55].call(pe)),u(Le,"type","number"),u(Ee,"type","number"),u(Je,"class","flex col grow svelte-1tppwwz"),u(He,"id","title"),u(_t,"class","button"),u(_t,"type","submit"),u(Me,"class","svelte-1tppwwz"),u(Oe,"id","url"),u(gt,"class","button"),u(gt,"id","open-url"),u(Te,"class","svelte-1tppwwz"),u(Pe,"class","button"),u(Pe,"title","Minimizes the window, requests attention for 3s and then resets it"),u(Ke,"class","button")},m(f,T){S(f,t,T),e(t,l);for(let U=0;U{typeof D=="string"&&s[i].setIcon(D)})}function Ie(){const D=Math.random().toString().replace(".",""),te=new Ni(D);l(1,s[D]=te,s),te.once("tauri://error",function(){r("Error creating new webview")})}function kt(){s[i].innerSize().then(D=>{l(25,K=D),l(7,w=K.width),l(8,b=K.height)}),s[i].outerSize().then(D=>{l(26,fe=D)})}function le(){s[i].innerPosition().then(D=>{l(23,I=D)}),s[i].outerPosition().then(D=>{l(24,N=D),l(13,A=N.x),l(14,P=N.y)})}async function yt(D){V&&V(),j&&j(),j=await D.listen("tauri://move",le),V=await D.listen("tauri://resize",kt)}async function We(){await s[i].minimize(),await s[i].requestUserAttention(Di.Critical),await new Promise(D=>setTimeout(D,3e3)),await s[i].requestUserAttention(null)}function zt(){i=Dn(this),l(0,i),l(1,s)}function ie(){m=this.checked,l(2,m)}function Ct(){v=this.checked,l(3,v)}const he=()=>s[i].center();function Ue(){k=this.checked,l(21,k)}function Mt(){g=this.checked,l(4,g)}function se(){p=this.checked,l(5,p)}function Tt(){_=this.checked,l(6,_)}function qe(){A=B(this.value),l(13,A)}function St(){P=B(this.value),l(14,P)}function oe(){w=B(this.value),l(7,w)}function Rt(){b=B(this.value),l(8,b)}function me(){d=B(this.value),l(9,d)}function Ne(){z=B(this.value),l(10,z)}function Lt(){M=B(this.value),l(11,M)}function ae(){q=B(this.value),l(12,q)}function Et(){O=this.checked,l(15,O)}function De(){Q=this.checked,l(16,Q)}function Ht(){Se=Dn(this),l(19,Se),l(28,a)}function ue(){H=B(this.value),l(17,H)}function Ot(){F=B(this.value),l(18,F)}function ve(){Re=this.value,l(27,Re)}function je(){c=this.value,l(20,c)}return n.$$set=D=>{"onMessage"in D&&l(36,r=D.onMessage)},n.$$.update=()=>{n.$$.dirty[0]&7&&s[i].setResizable(m),n.$$.dirty[0]&11&&(v?s[i].maximize():s[i].unmaximize()),n.$$.dirty[0]&19&&s[i].setDecorations(g),n.$$.dirty[0]&35&&s[i].setAlwaysOnTop(p),n.$$.dirty[0]&67&&s[i].setFullscreen(_),n.$$.dirty[0]&387&&s[i].setSize(new Gn(w,b)),n.$$.dirty[0]&1539&&(d&&z?s[i].setMinSize(new li(d,z)):s[i].setMinSize(null)),n.$$.dirty[0]&6147&&(M&&q?s[i].setMaxSize(new li(M,q)):s[i].setMaxSize(null)),n.$$.dirty[0]&24579&&s[i].setPosition(new nn(A,P)),n.$$.dirty[0]&3&&s[i].scaleFactor().then(D=>l(22,L=D)),n.$$.dirty[0]&3&&yt(s[i]),n.$$.dirty[0]&32771&&s[i].setCursorGrab(O),n.$$.dirty[0]&65539&&s[i].setCursorVisible(Q),n.$$.dirty[0]&524291&&s[i].setCursorIcon(Se),n.$$.dirty[0]&393219&&s[i].setCursorPosition(new nn(H,F))},[i,s,m,v,g,p,_,w,b,d,z,M,q,A,P,O,Q,H,F,Se,c,k,L,I,N,K,fe,Re,a,Ae,wt,et,ee,de,Ie,We,r,zt,ie,Ct,he,Ue,Mt,se,Tt,qe,St,oe,Rt,me,Ne,Lt,ae,Et,De,Ht,ue,Ot,ve,je]}class Rs extends X{constructor(t){super();Y(this,t,Ss,Ts,J,{onMessage:36},[-1,-1,-1])}}function mi(n,t,l){const i=n.slice();return i[9]=t[l],i}function vi(n){let t,l=n[9]+"",i,s,a,r,c;function m(){return n[8](n[9])}return{c(){t=o("div"),i=C(l),s=h(),a=o("button"),a.textContent="Unregister",u(a,"type","button")},m(v,k){S(v,t,k),e(t,i),e(t,s),e(t,a),r||(c=y(a,"click",m),r=!0)},p(v,k){n=v,k&2&&l!==(l=n[9]+"")&&G(i,l)},d(v){v&&R(t),r=!1,c()}}}function _i(n){let t,l,i;return{c(){t=o("button"),t.textContent="Unregister all",u(t,"type","button")},m(s,a){S(s,t,a),l||(i=y(t,"click",n[5]),l=!0)},p:W,d(s){s&&R(t),l=!1,i()}}}function Ls(n){let t,l,i,s,a,r,c,m,v,k,g=n[1],p=[];for(let w=0;wl(1,i=p));let r="CmdOrControl+X";function c(){const p=r;ji(p,()=>{s(`Shortcut ${p} triggered`)}).then(()=>{a.update(_=>[..._,p]),s(`Shortcut ${p} registered successfully`)}).catch(s)}function m(p){const _=p;Gi(_).then(()=>{a.update(w=>w.filter(b=>b!==_)),s(`Shortcut ${_} unregistered`)}).catch(s)}function v(){Bi().then(()=>{a.update(()=>[]),s("Unregistered all shortcuts")}).catch(s)}function k(){r=this.value,l(0,r)}const g=p=>m(p);return n.$$set=p=>{"onMessage"in p&&l(6,s=p.onMessage)},[r,i,a,c,m,v,s,k,g]}class Hs extends X{constructor(t){super();Y(this,t,Es,Ls,J,{onMessage:6})}}function gi(n){let t,l,i,s,a;return{c(){t=o("input"),l=h(),i=o("button"),i.textContent="Write",u(t,"placeholder","write to stdin"),u(i,"class","button")},m(r,c){S(r,t,c),E(t,n[3]),S(r,l,c),S(r,i,c),s||(a=[y(t,"input",n[10]),y(i,"click",n[7])],s=!0)},p(r,c){c&8&&t.value!==r[3]&&E(t,r[3])},d(r){r&&R(t),r&&R(l),r&&R(i),s=!1,x(a)}}}function Os(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d=n[4]&&gi(n);return{c(){t=o("div"),l=o("div"),i=o("input"),s=h(),a=o("button"),a.textContent="Run",r=h(),c=o("button"),c.textContent="Kill",m=h(),d&&d.c(),v=h(),k=o("div"),g=o("input"),p=h(),_=o("input"),u(a,"class","button"),u(c,"class","button"),u(g,"placeholder","Working directory"),u(_,"class","env-vars svelte-1g38c1n"),u(_,"placeholder","Environment variables")},m(z,M){S(z,t,M),e(t,l),e(l,i),E(i,n[0]),e(l,s),e(l,a),e(l,r),e(l,c),e(l,m),d&&d.m(l,null),e(t,v),e(t,k),e(k,g),E(g,n[1]),e(k,p),e(k,_),E(_,n[2]),w||(b=[y(i,"input",n[9]),y(a,"click",n[5]),y(c,"click",n[6]),y(g,"input",n[11]),y(_,"input",n[12])],w=!0)},p(z,[M]){M&1&&i.value!==z[0]&&E(i,z[0]),z[4]?d?d.p(z,M):(d=gi(z),d.c(),d.m(l,null)):d&&(d.d(1),d=null),M&2&&g.value!==z[1]&&E(g,z[1]),M&4&&_.value!==z[2]&&E(_,z[2])},i:W,o:W,d(z){z&&R(t),d&&d.d(),w=!1,x(b)}}}function Ps(n,t,l){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",a=i?["/C"]:["-c"],{onMessage:r}=t,c='echo "hello world"',m=null,v="SOMETHING=value ANOTHER=2",k="",g;function p(){return v.split(" ").reduce((A,P)=>{let[L,I]=P.split("=");return Ql(Kl({},A),{[L]:I})},{})}function _(){l(4,g=null);const A=new Fi(s,[...a,c],{cwd:m||null,env:p()});A.on("close",P=>{r(`command finished with code ${P.code} and signal ${P.signal}`),l(4,g=null)}),A.on("error",P=>r(`command error: "${P}"`)),A.stdout.on("data",P=>r(`command stdout: "${P}"`)),A.stderr.on("data",P=>r(`command stderr: "${P}"`)),A.spawn().then(P=>{l(4,g=P)}).catch(r)}function w(){g.kill().then(()=>r("killed child process")).catch(r)}function b(){g.write(k).catch(r)}function d(){c=this.value,l(0,c)}function z(){k=this.value,l(3,k)}function M(){m=this.value,l(1,m)}function q(){v=this.value,l(2,v)}return n.$$set=A=>{"onMessage"in A&&l(8,r=A.onMessage)},[c,m,v,k,g,_,w,b,r,d,z,M,q]}class As extends X{constructor(t){super();Y(this,t,Ps,Os,J,{onMessage:8})}}function Is(n){let t,l,i,s,a,r;return{c(){t=o("div"),l=o("button"),l.textContent="Check update",i=h(),s=o("button"),s.textContent="Install update",u(l,"class","button"),u(l,"id","check_update"),u(s,"class","button hidden"),u(s,"id","start_update")},m(c,m){S(c,t,m),e(t,l),e(t,i),e(t,s),a||(r=[y(l,"click",n[0]),y(s,"click",n[1])],a=!0)},p:W,i:W,o:W,d(c){c&&R(t),a=!1,x(r)}}}function Ws(n,t,l){let{onMessage:i}=t,s;en(async()=>{s=await $l("tauri://update-status",i)}),Wn(()=>{s&&s()});async function a(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:m}=await Vi();i(`Should update: ${c}`),i(m),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function r(){try{document.getElementById("start_update").classList.add("hidden"),await Xi(),i("Installation complete, restart required."),await Zl()}catch(c){i(c)}}return n.$$set=c=>{"onMessage"in c&&l(2,i=c.onMessage)},[a,r,i]}class Us extends X{constructor(t){super();Y(this,t,Ws,Is,J,{onMessage:2})}}function qs(n){let t,l,i,s,a,r,c,m,v;return{c(){t=o("div"),l=o("div"),i=o("input"),s=h(),a=o("button"),a.textContent="Write",r=h(),c=o("button"),c.textContent="Read",u(i,"placeholder","Text to write to the clipboard"),u(a,"type","button"),u(c,"type","button")},m(k,g){S(k,t,g),e(t,l),e(l,i),E(i,n[0]),e(l,s),e(l,a),e(t,r),e(t,c),m||(v=[y(i,"input",n[4]),y(a,"click",n[1]),y(c,"click",n[2])],m=!0)},p(k,[g]){g&1&&i.value!==k[0]&&E(i,k[0])},i:W,o:W,d(k){k&&R(t),m=!1,x(v)}}}function Ns(n,t,l){let{onMessage:i}=t,s="clipboard message";function a(){Yi(s).then(()=>{i("Wrote to the clipboard")}).catch(i)}function r(){Ji().then(m=>{i(`Clipboard contents: ${m}`)}).catch(i)}function c(){s=this.value,l(0,s)}return n.$$set=m=>{"onMessage"in m&&l(3,i=m.onMessage)},[s,a,r,i,c]}class Ds extends X{constructor(t){super();Y(this,t,Ns,qs,J,{onMessage:3})}}function js(n){let t;return{c(){t=o("div"),t.innerHTML=`

    Not available for Linux

    `},m(l,i){S(l,t,i)},p:W,i:W,o:W,d(l){l&&R(t)}}}function Gs(n,t,l){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function a(c){const m=document.querySelector("video"),v=c.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${v[0].label}`),window.stream=c,m.srcObject=c}function r(c){if(c.name==="ConstraintNotSatisfiedError"){const m=s.video;i(`The resolution ${m.width.exact}x${m.height.exact} px is not supported by your device.`)}else c.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: ${c.name}`,c)}return en(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(s);a(c)}catch(c){r(c)}}),Wn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),n.$$set=c=>{"onMessage"in c&&l(0,i=c.onMessage)},[i]}class Bs extends X{constructor(t){super();Y(this,t,Gs,js,J,{onMessage:0})}}function Fs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b;return p=new Ki({props:{json:n[2]}}),{c(){t=o("div"),l=o("input"),i=h(),s=o("input"),a=h(),r=o("label"),c=o("input"),m=C(` Multipart`),v=h(),k=o("button"),k.textContent="Post it.",g=h(),Bn(p.$$.fragment),u(c,"type","checkbox"),u(k,"type","button")},m(d,z){S(d,t,z),e(t,l),E(l,n[0]),e(t,i),e(t,s),E(s,n[1]),e(t,a),e(t,r),e(r,c),c.checked=n[3],e(r,m),e(t,v),e(t,k),e(t,g),Fn(p,t,null),_=!0,w||(b=[y(l,"input",n[5]),y(s,"input",n[6]),y(c,"change",n[7]),y(k,"click",n[4])],w=!0)},p(d,[z]){z&1&&l.value!==d[0]&&E(l,d[0]),z&2&&s.value!==d[1]&&E(s,d[1]),z&8&&(c.checked=d[3]);const M={};z&4&&(M.json=d[2]),p.$set(M)},i(d){_||(Vn(p.$$.fragment,d),_=!0)},o(d){Xn(p.$$.fragment,d),_=!1},d(d){d&&R(t),Yn(p),w=!1,x(b)}}}function Vs(n,t,l){let i="baz",s="qux",a=null,r=!0;async function c(){const g=await ni().catch(p=>{throw onMessage(p),p});l(2,a=await g.request({url:"http://localhost:3003",method:"POST",body:Nn.form({foo:i,bar:s}),headers:r?{"Content-Type":"multipart/form-data"}:void 0,responseType:Qi.Text}))}function m(){i=this.value,l(0,i)}function v(){s=this.value,l(1,s)}function k(){r=this.checked,l(3,r)}return[i,s,a,r,c,m,v,k]}class Xs extends X{constructor(t){super();Y(this,t,Vs,Fs,J,{})}}function bi(n,t,l){const i=n.slice();return i[10]=t[l],i}function wi(n,t,l){const i=n.slice();return i[13]=t[l],i}function ki(n){let t,l=n[13].label+"",i,s,a,r,c;function m(){return n[9](n[13])}return{c(){t=o("p"),i=C(l),s=h(),u(t,"class",a="nv noselect "+(n[0]===n[13]?"nv_selected":""))},m(v,k){S(v,t,k),e(t,i),e(t,s),r||(c=y(t,"click",m),r=!0)},p(v,k){n=v,k&1&&a!==(a="nv noselect "+(n[0]===n[13]?"nv_selected":""))&&u(t,"class",a)},d(v){v&&R(t),r=!1,c()}}}function Ys(n){let t,l=n[10].html+"",i;return{c(){i=ai(),t=new es(i)},m(s,a){t.m(l,s,a),S(s,i,a)},p(s,a){a&2&&l!==(l=s[10].html+"")&&t.p(l)},d(s){s&&R(i),s&&t.d()}}}function Js(n){let t,l=n[10].text+"",i;return{c(){t=o("p"),i=C(l)},m(s,a){S(s,t,a),e(t,i)},p(s,a){a&2&&l!==(l=s[10].text+"")&&G(i,l)},d(s){s&&R(t)}}}function yi(n){let t;function l(a,r){return a[10].text?Js:Ys}let i=l(n),s=i(n);return{c(){s.c(),t=ai()},m(a,r){s.m(a,r),S(a,t,r)},p(a,r){i===(i=l(a))&&s?s.p(a,r):(s.d(1),s=i(a),s&&(s.c(),s.m(t.parentNode,t)))},d(a){s.d(a),a&&R(t)}}}function Ks(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P,L,I=n[2],N=[];for(let O=0;ODocumentation Github Source`,c=h(),m=o("div"),v=o("div");for(let O=0;O{Yn(H,1)}),Zi()}K?(p=new K(fe(O)),Bn(p.$$.fragment),Vn(p.$$.fragment,1),Fn(p,g,null)):p=null}if(Q&2){V=O[1];let H;for(H=0;H{xi(Qs,()=>{Un("menu_toggle")})}),jn.listen("tauri://file-drop",function(_){m(`File drop: ${_.payload}`)});const s=[{label:"Welcome",component:is},{label:"Messages",component:cs},{label:"CLI",component:as},{label:"Dialog",component:hs},{label:"File system",component:gs},{label:"HTTP",component:ks},{label:"HTTP Form",component:Xs},{label:"Notifications",component:Ms},{label:"Window",component:Rs},{label:"Shortcuts",component:Hs},{label:"Shell",component:As},{label:"Updater",component:Us},{label:"Clipboard",component:Ds},{label:"WebRTC",component:Bs}];let a=s[0],r=oi([]);si(n,r,_=>l(1,i=_));function c(_){l(0,a=_)}function m(_){r.update(w=>[{text:`[${new Date().toLocaleTimeString()}]: `+(typeof _=="string"?_:JSON.stringify(_))},...w])}function v(_){r.update(w=>[{html:_},...w])}function k(){r.update(()=>[])}function g(){ii("https://tauri.app/")}return[a,i,s,r,c,m,v,k,g,_=>c(_)]}class $s extends X{constructor(t){super();Y(this,t,Zs,Ks,J,{})}}new $s({target:document.body});