tauri/examples/api/dist/assets/index.js
2022-05-03 13:05:18 -03:00

30 lines
40 KiB
JavaScript

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 F,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 qn,J as xe,K as ni,L as Nn,M as Dn,N as G,O as jn,P as nn,Q as Fn,R as li,T as ii,U as qi,V as Ni,W as si,X as oi,Y as Di,Z as ji,_ as Fi,$ as Gi,a0 as Bi,a1 as Vi,a2 as Xi,a3 as Yi,a4 as Ji,a5 as Gn,a6 as Bn,a7 as Vn,a8 as Xn,a9 as Yn,aa as Ki,ab as ai,ac as Qi,ad as Zi,ae as $i,af as xi}from"./vendor.js";const es=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)}};es();function ts(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&&F(c,L[0]),I&2&&F(g,L[1]),I&4&&F(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 ns(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 ls extends X{constructor(t){super();Y(this,t,ns,ts,J,{})}}function is(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=`<li>--config PATH</li>
<li>--theme light|dark|system</li>
<li>--verbose</li>`,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 ss(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 os extends X{constructor(t){super();Y(this,t,ss,is,J,{onMessage:1})}}function as(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 us(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 rs extends X{constructor(t){super();Y(this,t,us,as,J,{onMessage:3})}}function cs(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 ps(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 fs(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"))?ps(new Uint8Array(M),function(q){var A="data:image/png;base64,"+q;s('<img src="'+A+'"></img>')}):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 ds extends X{constructor(t){super();Y(this,t,fs,cs,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 hs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w=n[2],b=[];for(let d=0;d<w.length;d+=1)b[d]=ri(ui(n,w,d));return{c(){t=o("form"),l=o("select"),i=o("option"),i.textContent="None";for(let d=0;d<b.length;d+=1)b[d].c();s=h(),a=o("input"),r=h(),c=o("button"),c.textContent="Read",m=h(),v=o("button"),v.textContent="Use as img src",k=h(),g=o("img"),i.__value="",i.value=i.__value,u(l,"class","button"),u(l,"id","dir"),u(a,"id","path-to-read"),u(a,"placeholder","Type the path to read..."),u(c,"class","button"),u(c,"id","read"),u(v,"class","button"),u(v,"type","button"),u(g,"alt","file")},m(d,z){S(d,t,z),e(t,l),e(l,i);for(let M=0;M<b.length;M+=1)b[M].m(l,null);e(t,s),e(t,a),E(a,n[0]),e(t,r),e(t,c),e(t,m),e(t,v),e(t,k),e(t,g),n[8](g),p||(_=[y(a,"input",n[7]),y(v,"click",n[4]),y(t,"submit",tn(n[3]))],p=!0)},p(d,[z]){if(z&4){w=d[2];let M;for(M=0;M<w.length;M+=1){const q=ui(d,w,M);b[M]?b[M].p(q,z):(b[M]=ri(q),b[M].c(),b[M].m(l,null))}for(;M<b.length;M+=1)b[M].d(1);b.length=w.length}z&1&&a.value!==d[0]&&E(a,d[0])},i:W,o:W,d(d){d&&R(t),$e(b,d),n[8](null),p=!1,x(_)}}}function ci(){return document.getElementById("dir").value?parseInt(dir.value):null}function ms(n,t){const l=new Blob([n],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(s){const a=s.target.result;t(a.substr(a.indexOf(",")+1))},i.readAsDataURL(l)}function vs(n,t,l){let{onMessage:i}=t,{insecureRenderHtml:s}=t,a="",r;const c=Object.keys(ti).filter(p=>isNaN(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"))ms(new Uint8Array(b),function(d){const z="data:image/png;base64,"+d;s('<img src="'+z+'"></img>')});else{const d=String.fromCharCode.apply(null,b);s('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const z=document.getElementById("file-response");z.value=d,document.getElementById("file-save").addEventListener("click",function(){writeFile({file:a,contents:z.value},{dir:ci()}).catch(i)})})}else i(b)}).catch(i)}function v(){l(1,r.src=Wi(a),r)}function k(){a=this.value,l(0,a)}function g(p){Ui[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 _s extends X{constructor(t){super();Y(this,t,vs,hs,J,{onMessage:5,insecureRenderHtml:6})}}function gs(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 bs(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 ws extends X{constructor(t){super();Y(this,t,bs,gs,J,{onMessage:3})}}function ks(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",ys),l=!0)},p:W,i:W,o:W,d(s){s&&R(t),l=!1,i()}}}function ys(){new Notification("Notification title",{body:"This is the notification body"})}function zs(n,t,l){let{onMessage:i}=t;return n.$$set=s=>{"onMessage"in s&&l(0,i=s.onMessage)},[i]}class Cs extends X{constructor(t){super();Y(this,t,zs,ks,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]+"")&&F(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 Ms(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,B,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,Fe,_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,Ge,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,Be,ke,_n,vl,rt,_l,Ft=n[23].x+"",gn,gl,ct,bl,Gt=n[23].y+"",bn,wl,ye,wn,kl,pt,yl,Bt=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,Fl,xt,Gl,Ee,Hn,Me,He,Bl,_t,On,Te,Oe,Vl,gt,Pn,Pe,An,Ke,In,Xl,Qe=Object.keys(n[1]),Z=[];for(let f=0;f<Qe.length;f+=1)Z[f]=di(fi(n,Qe,f));let Ze=n[28],$=[];for(let f=0;f<Ze.length;f+=1)$[f]=hi(pi(n,Ze,f));return{c(){t=o("div"),l=o("select");for(let f=0;f<Z.length;f+=1)Z[f].c();i=h(),s=o("div"),a=o("label"),r=o("input"),c=C(`
Resizable`),m=h(),v=o("label"),k=o("input"),g=C(`
Maximize`),p=h(),_=o("button"),_.textContent="Center",w=h(),b=o("button"),b.textContent="Minimize",d=h(),z=o("button"),z.textContent="Hide",M=h(),q=o("label"),A=o("input"),P=C(`
Transparent`),L=h(),I=o("label"),N=o("input"),K=C(`
Has decorations`),fe=h(),V=o("label"),j=o("input"),O=C(`
Always on top`),Q=h(),H=o("label"),B=o("input"),Se=C(`
Fullscreen`),Re=h(),Ae=o("button"),Ae.textContent="Change icon",wt=h(),et=o("div"),ee=o("div"),de=o("div"),Ie=o("div"),kt=C(`X
`),le=o("input"),yt=h(),We=o("div"),zt=C(`Y
`),ie=o("input"),Ct=h(),he=o("div"),Ue=o("div"),Mt=C(`Width
`),se=o("input"),Tt=h(),qe=o("div"),St=C(`Height
`),oe=o("input"),Rt=h(),me=o("div"),Ne=o("div"),Lt=C(`Min width
`),ae=o("input"),Et=h(),De=o("div"),Ht=C(`Min height
`),ue=o("input"),Ot=h(),ve=o("div"),je=o("div"),D=C(`Max width
`),te=o("input"),Jn=h(),Pt=o("div"),Kn=C(`Max height
`),ce=o("input"),ln=h(),re=o("div"),Fe=o("div"),_e=o("div"),sn=o("div"),sn.textContent="Inner Size",Qn=h(),tt=o("span"),Zn=C("Width: "),on=C(At),$n=h(),nt=o("span"),xn=C("Height: "),an=C(It),el=h(),ge=o("div"),un=o("div"),un.textContent="Outer Size",tl=h(),lt=o("span"),nl=C("Width: "),rn=C(Wt),ll=h(),it=o("span"),il=C("Height: "),cn=C(Ut),sl=h(),Ge=o("div"),be=o("div"),pn=o("div"),pn.textContent="Inner Logical Size",ol=h(),st=o("span"),al=C("Width: "),fn=C(qt),ul=h(),ot=o("span"),rl=C("Height: "),dn=C(Nt),cl=h(),we=o("div"),hn=o("div"),hn.textContent="Outer Logical Size",pl=h(),at=o("span"),fl=C("Width: "),mn=C(Dt),dl=h(),ut=o("span"),hl=C("Height: "),vn=C(jt),ml=h(),Be=o("div"),ke=o("div"),_n=o("div"),_n.textContent="Inner Position",vl=h(),rt=o("span"),_l=C("x: "),gn=C(Ft),gl=h(),ct=o("span"),bl=C("y: "),bn=C(Gt),wl=h(),ye=o("div"),wn=o("div"),wn.textContent="Outer Position",kl=h(),pt=o("span"),yl=C("x: "),kn=C(Bt),zl=h(),ft=o("span"),Cl=C("y: "),yn=C(Vt),Ml=h(),Ve=o("div"),ze=o("div"),zn=o("div"),zn.textContent="Inner Logical Position",Tl=h(),dt=o("span"),Sl=C("x: "),Cn=C(Xt),Rl=h(),ht=o("span"),Ll=C("y: "),Mn=C(Yt),El=h(),Ce=o("div"),Tn=o("div"),Tn.textContent="Outer Logical Position",Hl=h(),mt=o("span"),Ol=C("x: "),Sn=C(Jt),Pl=h(),vt=o("span"),Al=C("y: "),Rn=C(Kt),Ln=h(),ne=o("div"),En=o("h4"),En.textContent="Cursor",Il=h(),Qt=o("label"),Xe=o("input"),Wl=C(`
Grab`),Ul=h(),Zt=o("label"),Ye=o("input"),ql=C(`
Visible`),Nl=h(),pe=o("select");for(let f=0;f<$.length;f+=1)$[f].c();Dl=h(),Je=o("div"),$t=o("div"),jl=C(`X position
`),Le=o("input"),Fl=h(),xt=o("div"),Gl=C(`Y position
`),Ee=o("input"),Hn=h(),Me=o("form"),He=o("input"),Bl=h(),_t=o("button"),_t.textContent="Set title",On=h(),Te=o("form"),Oe=o("input"),Vl=h(),gt=o("button"),gt.textContent="Open URL",Pn=h(),Pe=o("button"),Pe.textContent="Request attention",An=h(),Ke=o("button"),Ke.textContent="New window",u(l,"class","button"),n[0]===void 0&&qn(()=>n[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(B,"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(Fe,"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(Ge,"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(Be,"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<Z.length;U+=1)Z[U].m(l,null);xe(l,n[0]),e(t,i),e(t,s),e(s,a),e(a,r),r.checked=n[2],e(a,c),e(s,m),e(s,v),e(v,k),k.checked=n[3],e(v,g),e(s,p),e(s,_),e(s,w),e(s,b),e(s,d),e(s,z),e(s,M),e(s,q),e(q,A),A.checked=n[21],e(q,P),e(s,L),e(s,I),e(I,N),N.checked=n[4],e(I,K),e(s,fe),e(s,V),e(V,j),j.checked=n[5],e(V,O),e(s,Q),e(s,H),e(H,B),B.checked=n[6],e(H,Se),e(s,Re),e(s,Ae),e(t,wt),e(t,et),e(et,ee),e(ee,de),e(de,Ie),e(Ie,kt),e(Ie,le),E(le,n[13]),e(de,yt),e(de,We),e(We,zt),e(We,ie),E(ie,n[14]),e(ee,Ct),e(ee,he),e(he,Ue),e(Ue,Mt),e(Ue,se),E(se,n[7]),e(he,Tt),e(he,qe),e(qe,St),e(qe,oe),E(oe,n[8]),e(ee,Rt),e(ee,me),e(me,Ne),e(Ne,Lt),e(Ne,ae),E(ae,n[9]),e(me,Et),e(me,De),e(De,Ht),e(De,ue),E(ue,n[10]),e(ee,Ot),e(ee,ve),e(ve,je),e(je,D),e(je,te),E(te,n[11]),e(ve,Jn),e(ve,Pt),e(Pt,Kn),e(Pt,ce),E(ce,n[12]),S(f,ln,T),S(f,re,T),e(re,Fe),e(Fe,_e),e(_e,sn),e(_e,Qn),e(_e,tt),e(tt,Zn),e(tt,on),e(_e,$n),e(_e,nt),e(nt,xn),e(nt,an),e(Fe,el),e(Fe,ge),e(ge,un),e(ge,tl),e(ge,lt),e(lt,nl),e(lt,rn),e(ge,ll),e(ge,it),e(it,il),e(it,cn),e(re,sl),e(re,Ge),e(Ge,be),e(be,pn),e(be,ol),e(be,st),e(st,al),e(st,fn),e(be,ul),e(be,ot),e(ot,rl),e(ot,dn),e(Ge,cl),e(Ge,we),e(we,hn),e(we,pl),e(we,at),e(at,fl),e(at,mn),e(we,dl),e(we,ut),e(ut,hl),e(ut,vn),e(re,ml),e(re,Be),e(Be,ke),e(ke,_n),e(ke,vl),e(ke,rt),e(rt,_l),e(rt,gn),e(ke,gl),e(ke,ct),e(ct,bl),e(ct,bn),e(Be,wl),e(Be,ye),e(ye,wn),e(ye,kl),e(ye,pt),e(pt,yl),e(pt,kn),e(ye,zl),e(ye,ft),e(ft,Cl),e(ft,yn),e(re,Ml),e(re,Ve),e(Ve,ze),e(ze,zn),e(ze,Tl),e(ze,dt),e(dt,Sl),e(dt,Cn),e(ze,Rl),e(ze,ht),e(ht,Ll),e(ht,Mn),e(Ve,El),e(Ve,Ce),e(Ce,Tn),e(Ce,Hl),e(Ce,mt),e(mt,Ol),e(mt,Sn),e(Ce,Pl),e(Ce,vt),e(vt,Al),e(vt,Rn),S(f,Ln,T),S(f,ne,T),e(ne,En),e(ne,Il),e(ne,Qt),e(Qt,Xe),Xe.checked=n[15],e(Qt,Wl),e(ne,Ul),e(ne,Zt),e(Zt,Ye),Ye.checked=n[16],e(Zt,ql),e(ne,Nl),e(ne,pe);for(let U=0;U<$.length;U+=1)$[U].m(pe,null);xe(pe,n[19]),e(ne,Dl),e(ne,Je),e(Je,$t),e($t,jl),e($t,Le),E(Le,n[17]),e(Je,Fl),e(Je,xt),e(xt,Gl),e(xt,Ee),E(Ee,n[18]),S(f,Hn,T),S(f,Me,T),e(Me,He),E(He,n[27]),e(Me,Bl),e(Me,_t),S(f,On,T),S(f,Te,T),e(Te,Oe),E(Oe,n[20]),e(Te,Vl),e(Te,gt),S(f,Pn,T),S(f,Pe,T),S(f,An,T),S(f,Ke,T),In||(Xl=[y(l,"change",n[37]),y(r,"change",n[38]),y(k,"change",n[39]),y(_,"click",n[40]),y(b,"click",n[32]),y(z,"click",n[31]),y(A,"change",n[41]),y(N,"change",n[42]),y(j,"change",n[43]),y(B,"change",n[44]),y(Ae,"click",n[33]),y(le,"input",n[45]),y(ie,"input",n[46]),y(se,"input",n[47]),y(oe,"input",n[48]),y(ae,"input",n[49]),y(ue,"input",n[50]),y(te,"input",n[51]),y(ce,"input",n[52]),y(Xe,"change",n[53]),y(Ye,"change",n[54]),y(pe,"change",n[55]),y(Le,"input",n[56]),y(Ee,"input",n[57]),y(He,"input",n[58]),y(Me,"submit",tn(n[30])),y(Oe,"input",n[59]),y(Te,"submit",tn(n[29])),y(Pe,"click",n[35]),y(Ke,"click",n[34])],In=!0)},p(f,T){if(T[0]&2){Qe=Object.keys(f[1]);let U;for(U=0;U<Qe.length;U+=1){const bt=fi(f,Qe,U);Z[U]?Z[U].p(bt,T):(Z[U]=di(bt),Z[U].c(),Z[U].m(l,null))}for(;U<Z.length;U+=1)Z[U].d(1);Z.length=Qe.length}if(T[0]&3&&xe(l,f[0]),T[0]&4&&(r.checked=f[2]),T[0]&8&&(k.checked=f[3]),T[0]&2097152&&(A.checked=f[21]),T[0]&16&&(N.checked=f[4]),T[0]&32&&(j.checked=f[5]),T[0]&64&&(B.checked=f[6]),T[0]&8192&&G(le.value)!==f[13]&&E(le,f[13]),T[0]&16384&&G(ie.value)!==f[14]&&E(ie,f[14]),T[0]&128&&G(se.value)!==f[7]&&E(se,f[7]),T[0]&256&&G(oe.value)!==f[8]&&E(oe,f[8]),T[0]&512&&G(ae.value)!==f[9]&&E(ae,f[9]),T[0]&1024&&G(ue.value)!==f[10]&&E(ue,f[10]),T[0]&2048&&G(te.value)!==f[11]&&E(te,f[11]),T[0]&4096&&G(ce.value)!==f[12]&&E(ce,f[12]),T[0]&33554432&&At!==(At=f[25].width+"")&&F(on,At),T[0]&33554432&&It!==(It=f[25].height+"")&&F(an,It),T[0]&67108864&&Wt!==(Wt=f[26].width+"")&&F(rn,Wt),T[0]&67108864&&Ut!==(Ut=f[26].height+"")&&F(cn,Ut),T[0]&37748736&&qt!==(qt=f[25].toLogical(f[22]).width+"")&&F(fn,qt),T[0]&37748736&&Nt!==(Nt=f[25].toLogical(f[22]).height+"")&&F(dn,Nt),T[0]&71303168&&Dt!==(Dt=f[26].toLogical(f[22]).width+"")&&F(mn,Dt),T[0]&71303168&&jt!==(jt=f[26].toLogical(f[22]).height+"")&&F(vn,jt),T[0]&8388608&&Ft!==(Ft=f[23].x+"")&&F(gn,Ft),T[0]&8388608&&Gt!==(Gt=f[23].y+"")&&F(bn,Gt),T[0]&16777216&&Bt!==(Bt=f[24].x+"")&&F(kn,Bt),T[0]&16777216&&Vt!==(Vt=f[24].y+"")&&F(yn,Vt),T[0]&12582912&&Xt!==(Xt=f[23].toLogical(f[22]).x+"")&&F(Cn,Xt),T[0]&12582912&&Yt!==(Yt=f[23].toLogical(f[22]).y+"")&&F(Mn,Yt),T[0]&20971520&&Jt!==(Jt=f[24].toLogical(f[22]).x+"")&&F(Sn,Jt),T[0]&20971520&&Kt!==(Kt=f[24].toLogical(f[22]).y+"")&&F(Rn,Kt),T[0]&32768&&(Xe.checked=f[15]),T[0]&65536&&(Ye.checked=f[16]),T[0]&268435456){Ze=f[28];let U;for(U=0;U<Ze.length;U+=1){const bt=pi(f,Ze,U);$[U]?$[U].p(bt,T):($[U]=hi(bt),$[U].c(),$[U].m(pe,null))}for(;U<$.length;U+=1)$[U].d(1);$.length=Ze.length}T[0]&268959744&&xe(pe,f[19]),T[0]&131072&&G(Le.value)!==f[17]&&E(Le,f[17]),T[0]&262144&&G(Ee.value)!==f[18]&&E(Ee,f[18]),T[0]&134217728&&He.value!==f[27]&&E(He,f[27]),T[0]&1048576&&Oe.value!==f[20]&&E(Oe,f[20])},i:W,o:W,d(f){f&&R(t),$e(Z,f),f&&R(ln),f&&R(re),f&&R(Ln),f&&R(ne),$e($,f),f&&R(Hn),f&&R(Me),f&&R(On),f&&R(Te),f&&R(Pn),f&&R(Pe),f&&R(An),f&&R(Ke),In=!1,x(Xl)}}}function Ts(n,t,l){let i=jn.label;const s={[i]:jn},a=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:r}=t,c="https://tauri.studio",m=!0,v=!1,k=!1,g=!0,p=!1,_=!1,w=900,b=700,d=600,z=600,M=null,q=null,A=100,P=100,L=1,I=new nn(A,P),N=new nn(A,P),K=new Fn(w,b),fe=new Fn(w,b),V,j,O=!1,Q=!0,H=600,B=800,Se="default",Re="Awesome Tauri Example!";function Ae(){ii(c)}function wt(){s[i].setTitle(Re)}function et(){s[i].hide(),setTimeout(s[i].show,2e3)}function ee(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function de(){xl({multiple:!1}).then(D=>{typeof D=="string"&&s[i].setIcon(D)})}function Ie(){const D=Math.random().toString().replace(".",""),te=new qi(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(Ni.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=G(this.value),l(13,A)}function St(){P=G(this.value),l(14,P)}function oe(){w=G(this.value),l(7,w)}function Rt(){b=G(this.value),l(8,b)}function me(){d=G(this.value),l(9,d)}function Ne(){z=G(this.value),l(10,z)}function Lt(){M=G(this.value),l(11,M)}function ae(){q=G(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=G(this.value),l(17,H)}function Ot(){B=G(this.value),l(18,B)}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 Fn(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,B))},[i,s,m,v,g,p,_,w,b,d,z,M,q,A,P,O,Q,H,B,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 Ss extends X{constructor(t){super();Y(this,t,Ts,Ms,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]+"")&&F(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 Rs(n){let t,l,i,s,a,r,c,m,v,k,g=n[1],p=[];for(let w=0;w<g.length;w+=1)p[w]=vi(mi(n,g,w));let _=n[1].length&&_i(n);return{c(){t=o("div"),l=o("div"),i=o("input"),s=h(),a=o("button"),a.textContent="Register",r=h(),c=o("div");for(let w=0;w<p.length;w+=1)p[w].c();m=h(),_&&_.c(),u(i,"placeholder","Type a shortcut with '+' as separator..."),u(a,"type","button")},m(w,b){S(w,t,b),e(t,l),e(l,i),E(i,n[0]),e(l,s),e(l,a),e(t,r),e(t,c);for(let d=0;d<p.length;d+=1)p[d].m(c,null);e(c,m),_&&_.m(c,null),v||(k=[y(i,"input",n[7]),y(a,"click",n[3])],v=!0)},p(w,[b]){if(b&1&&i.value!==w[0]&&E(i,w[0]),b&18){g=w[1];let d;for(d=0;d<g.length;d+=1){const z=mi(w,g,d);p[d]?p[d].p(z,b):(p[d]=vi(z),p[d].c(),p[d].m(c,m))}for(;d<p.length;d+=1)p[d].d(1);p.length=g.length}w[1].length?_?_.p(w,b):(_=_i(w),_.c(),_.m(c,null)):_&&(_.d(1),_=null)},i:W,o:W,d(w){w&&R(t),$e(p,w),_&&_.d(),v=!1,x(k)}}}function Ls(n,t,l){let i,{onMessage:s}=t;const a=oi([]);si(n,a,p=>l(1,i=p));let r="CmdOrControl+X";function c(){const p=r;Di(p,()=>{s(`Shortcut ${p} triggered`)}).then(()=>{a.update(_=>[..._,p]),s(`Shortcut ${p} registered successfully`)}).catch(s)}function m(p){const _=p;ji(_).then(()=>{a.update(w=>w.filter(b=>b!==_)),s(`Shortcut ${_} unregistered`)}).catch(s)}function v(){Fi().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 Es extends X{constructor(t){super();Y(this,t,Ls,Rs,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 Hs(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 Os(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 Gi(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 Ps extends X{constructor(t){super();Y(this,t,Os,Hs,J,{onMessage:8})}}function As(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 Is(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 Bi();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 Vi(),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 Ws extends X{constructor(t){super();Y(this,t,Is,As,J,{onMessage:2})}}function Us(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 qs(n,t,l){let{onMessage:i}=t,s="clipboard message";function a(){Xi(s).then(()=>{i("Wrote to the clipboard")}).catch(i)}function r(){Yi().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 Ns extends X{constructor(t){super();Y(this,t,qs,Us,J,{onMessage:3})}}function Ds(n){let t;return{c(){t=o("div"),t.innerHTML=`<div class="alert"><p>Not available for Linux</p></div>
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`},m(l,i){S(l,t,i)},p:W,i:W,o:W,d(l){l&&R(t)}}}function js(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 Fs extends X{constructor(t){super();Y(this,t,js,Ds,J,{onMessage:0})}}function Gs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b;return p=new Ji({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(),Gn(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),Bn(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 Bs(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:Ki.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 Vs extends X{constructor(t){super();Y(this,t,Bs,Gs,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 Xs(n){let t,l=n[10].html+"",i;return{c(){i=ai(),t=new xi(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 Ys(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+"")&&F(i,l)},d(s){s&&R(t)}}}function yi(n){let t;function l(a,r){return a[10].text?Ys:Xs}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 Js(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;O<I.length;O+=1)N[O]=ki(wi(n,I,O));var K=n[0].component;function fe(O){return{props:{onMessage:O[5],insecureRenderHtml:O[6]}}}K&&(p=new K(fe(n)));let V=n[1],j=[];for(let O=0;O<V.length;O+=1)j[O]=yi(bi(n,V,O));return{c(){t=o("main"),l=o("div"),i=o("img"),a=h(),r=o("div"),r.innerHTML=`<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/get-started/intro">Documentation</a>
<a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri">Github</a>
<a class="dark-link" target="_blank" href="https://github.com/tauri-apps/tauri/tree/dev/tauri/examples/api">Source</a>`,c=h(),m=o("div"),v=o("div");for(let O=0;O<N.length;O+=1)N[O].c();k=h(),g=o("div"),p&&Gn(p.$$.fragment),_=h(),w=o("div"),b=o("p"),d=o("strong"),d.textContent="Tauri Console",z=h(),M=o("span"),M.textContent="clear",q=h();for(let O=0;O<j.length;O+=1)j[O].c();u(i,"class","logo"),i.src!==(s="tauri logo.png")&&u(i,"src",s),u(i,"height","60"),u(i,"alt","logo"),u(l,"class","flex row noselect just-around container svelte-1fam3xt"),u(l,"data-tauri-drag-region",""),u(v,"class","view-container svelte-1fam3xt"),u(g,"class","content"),u(m,"class","flex row"),u(M,"class","nv"),u(b,"class","flex row just-around"),u(w,"id","response"),u(w,"class","svelte-1fam3xt")},m(O,Q){S(O,t,Q),e(t,l),e(l,i),e(l,a),e(l,r),e(t,c),e(t,m),e(m,v);for(let H=0;H<N.length;H+=1)N[H].m(v,null);e(m,k),e(m,g),p&&Bn(p,g,null),e(t,_),e(t,w),e(w,b),e(b,d),e(b,z),e(b,M),e(w,q);for(let H=0;H<j.length;H+=1)j[H].m(w,null);A=!0,P||(L=[y(i,"click",n[8]),y(M,"click",n[7])],P=!0)},p(O,[Q]){if(Q&21){I=O[2];let H;for(H=0;H<I.length;H+=1){const B=wi(O,I,H);N[H]?N[H].p(B,Q):(N[H]=ki(B),N[H].c(),N[H].m(v,null))}for(;H<N.length;H+=1)N[H].d(1);N.length=I.length}if(K!==(K=O[0].component)){if(p){Zi();const H=p;Xn(H.$$.fragment,1,0,()=>{Yn(H,1)}),Qi()}K?(p=new K(fe(O)),Gn(p.$$.fragment),Vn(p.$$.fragment,1),Bn(p,g,null)):p=null}if(Q&2){V=O[1];let H;for(H=0;H<V.length;H+=1){const B=bi(O,V,H);j[H]?j[H].p(B,Q):(j[H]=yi(B),j[H].c(),j[H].m(w,null))}for(;H<j.length;H+=1)j[H].d(1);j.length=V.length}},i(O){A||(p&&Vn(p.$$.fragment,O),A=!0)},o(O){p&&Xn(p.$$.fragment,O),A=!1},d(O){O&&R(t),$e(N,O),p&&Yn(p),$e(j,O),P=!1,x(L)}}}const Ks="ctrl+b";function Qs(n,t,l){let i;en(()=>{$i(Ks,()=>{Un("menu_toggle")})}),jn.listen("tauri://file-drop",function(_){m(`File drop: ${_.payload}`)});const s=[{label:"Welcome",component:ls},{label:"Messages",component:rs},{label:"CLI",component:os},{label:"Dialog",component:ds},{label:"File system",component:_s},{label:"HTTP",component:ws},{label:"HTTP Form",component:Vs},{label:"Notifications",component:Cs},{label:"Window",component:Ss},{label:"Shortcuts",component:Es},{label:"Shell",component:Ps},{label:"Updater",component:Ws},{label:"Clipboard",component:Ns},{label:"WebRTC",component:Fs}];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.studio/")}return[a,i,s,r,c,m,v,k,g,_=>c(_)]}class Zs extends X{constructor(t){super();Y(this,t,Qs,Js,J,{})}}new Zs({target:document.body});