var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function o(e){return"function"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function u(t,n,i){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function a(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function c(e){e.parentNode.removeChild(e)}function l(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function _(e){return function(t){return t.preventDefault(),e.call(this,t)}}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function v(e){return""===e?null:+e}function g(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function b(e,t){e.value=null==t?"":t}function y(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function w(e,t){for(let n=0;n{z.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function R(e){e&&e.c()}function q(e,n,r,u){const{fragment:a,on_mount:s,on_destroy:c,after_update:l}=e.$$;a&&a.m(n,r),u||D((()=>{const n=s.map(t).filter(o);c?c.push(...n):i(n),e.$$.on_mount=[]})),l.forEach(D)}function I(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function H(e,t){-1===e.$$.dirty[0]&&(C.push(e),F||(F=!0,O.then(W)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const o=i.length?i[0]:n;return f.ctx&&a(f.ctx[e],f.ctx[e]=o)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](o),p&&H(t,e)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!u&&u(f.ctx),o.target){if(o.hydrate){const e=function(e){return Array.from(e.childNodes)}(o.target);f.fragment&&f.fragment.l(e),e.forEach(c)}else f.fragment&&f.fragment.c();o.intro&&S(t.$$.fragment),q(t,o.target,o.anchor,o.customElement),W()}x(d)}class N{$destroy(){I(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function U(e){var t={exports:{}};return e(t,t.exports),t.exports}var G=U((function(e,t){ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t,n,i){return new(n||(n=Promise))((function(o,r){function u(e){try{s(i.next(e))}catch(e){r(e)}}function a(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((i=i.apply(e,t||[])).next())}))}function o(e,t){var n,i,o,r,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"onMessage"in e&&n(1,i=e.onMessage)},[function(){Q.getMatches().then(i).catch(i)},i]}class te extends N{constructor(e){super(),L(this,e,ee,Z,r,{onMessage:1})}}var ne=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,X.emit(e,void 0,t)]}))}))}var i=Object.freeze({__proto__:null,emit:n,listen:X.listen,once:X.once});t.emit=n,t.event=i})),ie=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.listen=X.listen,t.once=X.once,t.emit=ne.emit})),oe=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=G.invoke,t.transformCallback=G.transformCallback}));function re(t){let n,o,r,u,l,f,_,v;return{c(){n=d("div"),o=d("button"),o.textContent="Call Log API",r=p(),u=d("button"),u.textContent="Call Request (async) API",l=p(),f=d("button"),f.textContent="Send event to Rust",m(o,"class","button"),m(o,"id","log"),m(u,"class","button"),m(u,"id","request"),m(f,"class","button"),m(f,"id","event")},m(e,i){s(e,n,i),a(n,o),a(n,r),a(n,u),a(n,l),a(n,f),_||(v=[h(o,"click",t[0]),h(u,"click",t[1]),h(f,"click",t[2])],_=!0)},p:e,i:e,o:e,d(e){e&&c(n),_=!1,i(v)}}}function ue(e,t,n){let{onMessage:i}=t;return ie.listen("rust-event",i),e.$$set=e=>{"onMessage"in e&&n(3,i=e.onMessage)},[function(){oe.invoke("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})},function(){oe.invoke("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)},function(){ie.emit("js-event","this is the payload string")},i]}class ae extends N{constructor(e){super(),L(this,e,ue,re,r,{onMessage:3})}}var se=U((function(e,t){function n(e){return void 0===e&&(e={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:e}})]}))}))}function i(e){return void 0===e&&(e={}),G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:e}})]}))}))}var o=Object.freeze({__proto__:null,open:n,save:i});t.dialog=o,t.open=n,t.save=i})),ce=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.open=se.open,t.save=se.save})),le=U((function(e,t){var n,i=G;function o(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})]}))}))}function r(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})]}))}))}function u(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){return"object"==typeof t&&Object.freeze(t),"object"==typeof e&&Object.freeze(e),[2,J.invokeTauriCommand({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})]}))}))}function a(e){var t=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));for(var t="",n=e.length,i=0;i{"onMessage"in e&&n(6,i=e.onMessage)},[o,r,u,a,function(){ce.open({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((e=>e.trim()))}]:[],multiple:u,directory:a}).then((function(e){if(Array.isArray(e))i(e);else{var t=e,n=t.match(/\S+\.\S+$/g);de.readBinaryFile(t).then((function(o){var r,u,a,s;n&&(t.includes(".png")||t.includes(".jpg"))?(r=new Uint8Array(o),u=function(e){i('')},a=new Blob([r],{type:"application/octet-binary"}),(s=new FileReader).onload=function(e){var t=e.target.result;u(t.substr(t.indexOf(",")+1))},s.readAsDataURL(a)):i(e)})).catch(i(e))}})).catch(i)},function(){ce.save({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((e=>e.trim()))}]:[]}).then(i).catch(i)},i,function(){o=this.value,n(0,o)},function(){r=this.value,n(1,r)},function(){u=this.checked,n(2,u)},function(){a=this.checked,n(3,a)}]}class he extends N{constructor(e){var t;super(),document.getElementById("svelte-1eg58yg-style")||((t=d("style")).id="svelte-1eg58yg-style",t.textContent="#dialog-filter.svelte-1eg58yg{width:260px}",a(document.head,t)),L(this,e,pe,fe,r,{onMessage:6})}}function _e(e,t,n){const i=e.slice();return i[5]=t[n],i}function me(t){let n,i,o=t[5][0]+"";return{c(){n=d("option"),i=f(o),n.__value=t[5][1],n.value=n.__value},m(e,t){s(e,n,t),a(n,i)},p:e,d(e){e&&c(n)}}}function ve(t){let n,o,r,u,f,v,g,y,w,k=t[1],x=[];for(let e=0;eisNaN(parseInt(e)))).map((e=>[e,de.Dir[e]]));return e.$$set=e=>{"onMessage"in e&&n(3,i=e.onMessage)},[o,r,function(){const e=o.match(/\S+\.\S+$/g),t={dir:ge()};(e?de.readBinaryFile(o,t):de.readDir(o,t)).then((function(t){if(e)if(o.includes(".png")||o.includes(".jpg"))!function(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(e){const n=e.target.result;t(n.substr(n.indexOf(",")+1))},i.readAsDataURL(n)}(new Uint8Array(t),(function(e){i('')}));else{const e=String.fromCharCode.apply(null,t);i(''),setTimeout((()=>{const t=document.getElementById("file-response");t.value=e,document.getElementById("file-save").addEventListener("click",(function(){writeFile({file:o,contents:t.value},{dir:ge()}).catch(i)}))}))}else i(t)})).catch(i)},i,function(){o=this.value,n(0,o)}]}class ye extends N{constructor(e){super(),L(this,e,be,ve,r,{onMessage:3})}}var we=U((function(e,t){var n;t.ResponseType=void 0,(n=t.ResponseType||(t.ResponseType={}))[n.JSON=1]="JSON",n[n.Text=2]="Text",n[n.Binary=3]="Binary";var i=function(){function e(e,t){this.type=e,this.payload=t}return e.form=function(t){return new e("Form",t)},e.json=function(t){return new e("Json",t)},e.text=function(t){return new e("Text",t)},e.bytes=function(t){return new e("Bytes",t)},e}(),o=function(){function e(e){this.id=e}return e.prototype.drop=function(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]}))}))},e.prototype.request=function(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}})]}))}))},e.prototype.get=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"GET",url:e},t))]}))}))},e.prototype.post=function(e,t,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"POST",url:e,body:t},n))]}))}))},e.prototype.put=function(e,t,n){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){return[2,this.request(G._assign({method:"PUT",url:e,body:t},n))]}))}))},e.prototype.patch=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"PATCH",url:e},t))]}))}))},e.prototype.delete=function(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,this.request(G._assign({method:"DELETE",url:e},t))]}))}))},e}();function r(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then((function(e){return new o(e)}))]}))}))}var u=null;function a(e,t){var n;return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(i){switch(i.label){case 0:return null!==u?[3,2]:[4,r()];case 1:u=i.sent(),i.label=2;case 2:return[2,u.request(G._assign({url:e,method:null!==(n=null==t?void 0:t.method)&&void 0!==n?n:"GET"},t))]}}))}))}var s=Object.freeze({__proto__:null,get ResponseType(){return t.ResponseType},Body:i,Client:o,getClient:r,fetch:a});t.Body=i,t.Client=o,t.fetch=a,t.getClient=r,t.http=s})),ke=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Body=we.Body,t.Client=we.Client,Object.defineProperty(t,"ResponseType",{enumerable:!0,get:function(){return we.ResponseType}}),t.fetch=we.fetch,t.getClient=we.getClient}));function xe(t){let n,o,r,u,l,f,v,g,k,x,C,T,M,$,O,F,j;return{c(){n=d("form"),o=d("select"),r=d("option"),r.textContent="GET",u=d("option"),u.textContent="POST",l=d("option"),l.textContent="PUT",f=d("option"),f.textContent="PATCH",v=d("option"),v.textContent="DELETE",g=p(),k=d("input"),x=p(),C=d("br"),T=p(),M=d("textarea"),$=p(),O=d("button"),O.textContent="Make request",r.__value="GET",r.value=r.__value,u.__value="POST",u.value=u.__value,l.__value="PUT",l.value=l.__value,f.__value="PATCH",f.value=f.__value,v.__value="DELETE",v.value=v.__value,m(o,"class","button"),m(o,"id","request-method"),void 0===t[0]&&D((()=>t[5].call(o))),m(k,"id","request-url"),m(k,"placeholder","Type the request URL..."),m(M,"id","request-body"),m(M,"placeholder","Request body"),m(M,"rows","5"),y(M,"width","100%"),y(M,"margin-right","10px"),y(M,"font-size","12px"),m(O,"class","button"),m(O,"id","make-request")},m(e,i){s(e,n,i),a(n,o),a(o,r),a(o,u),a(o,l),a(o,f),a(o,v),w(o,t[0]),a(n,g),a(n,k),b(k,t[1]),a(n,x),a(n,C),a(n,T),a(n,M),b(M,t[2]),a(n,$),a(n,O),F||(j=[h(o,"change",t[5]),h(k,"input",t[6]),h(M,"input",t[7]),h(n,"submit",_(t[3]))],F=!0)},p(e,[t]){1&t&&w(o,e[0]),2&t&&k.value!==e[1]&&b(k,e[1]),4&t&&b(M,e[2])},i:e,o:e,d(e){e&&c(n),F=!1,i(j)}}}function Ce(e,t,n){let i="GET",o="",r="",{onMessage:u}=t;return e.$$set=e=>{"onMessage"in e&&n(4,u=e.onMessage)},[i,o,r,async function(){const e=await ke.getClient(),t={url:o||""||"",method:i||"GET"||"GET"};r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]")?t.body=ke.Body.json(JSON.parse(r)):""!==r&&(t.body=ke.Body.text(r)),e.request(t).then(u).catch(u)},u,function(){i=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(0,i)},function(){o=this.value,n(1,o)},function(){r=this.value,n(2,r)}]}class Te extends N{constructor(e){super(),L(this,e,Ce,xe,r,{onMessage:4})}}function Me(t){let n,i,o;return{c(){n=d("button"),n.textContent="Send test notification",m(n,"class","button"),m(n,"id","notification")},m(e,r){s(e,n,r),i||(o=h(n,"click",t[0]),i=!0)},p:e,i:e,o:e,d(e){e&&c(n),i=!1,o()}}}function $e(){new Notification("Notification title",{body:"This is the notification body"})}function Oe(e,t,n){let{onMessage:i}=t;return e.$$set=e=>{"onMessage"in e&&n(1,i=e.onMessage)},[function(){"default"===Notification.permission?Notification.requestPermission().then((function(e){"granted"===e?$e():i("Permission is "+e)})).catch(i):"granted"===Notification.permission?$e():i("Permission is denied")},i]}class Fe extends N{constructor(e){super(),L(this,e,Oe,Me,r,{onMessage:1})}}var De=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return"object"==typeof t&&Object.freeze(t),[2,J.invokeTauriCommand({__tauriModule:"Shell",message:{cmd:"execute",command:e,args:"string"==typeof t?[t]:t}})]}))}))}function i(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})]}))}))}var o=Object.freeze({__proto__:null,execute:n,open:i});t.execute=n,t.open=i,t.shell=o})),je=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.execute=De.execute,t.open=De.open}));function Pe(t){let n,o,r,u,l,g,w,k,x,C,T,M,$,O,F,D,j,P,W,A,z,E,S,B,R,q,I,H,L,N,U,G,J,X,Y,V,K,Q,Z,ee,te,ne,ie,oe,re,ue,ae,se,ce,le,de,fe,pe,he,_e,me,ve,ge,be,ye,we,ke,xe,Ce,Te,Me,$e,Oe,Fe,De,je,Pe,We,Ae,ze,Ee,Se,Be,Re,qe,Ie;return{c(){n=d("div"),o=d("div"),r=d("label"),u=d("input"),l=f("\n Resizable"),g=p(),w=d("label"),k=d("input"),x=f("\n Maximize"),C=p(),T=d("button"),T.textContent="Minimize",M=p(),$=d("button"),$.textContent="Hide",O=p(),F=d("label"),D=d("input"),j=f("\n Transparent"),P=p(),W=d("label"),A=d("input"),z=f("\n Has decorations"),E=p(),S=d("label"),B=d("input"),R=f("\n Always on top"),q=p(),I=d("label"),H=d("input"),L=f("\n Fullscreen"),N=p(),U=d("button"),U.textContent="Change icon",G=p(),J=d("div"),X=d("div"),Y=d("div"),V=d("div"),K=f("X\n "),Q=d("input"),Z=p(),ee=d("div"),te=f("Y\n "),ne=d("input"),ie=p(),oe=d("div"),re=d("div"),ue=f("Width\n "),ae=d("input"),se=p(),ce=d("div"),le=f("Height\n "),de=d("input"),fe=p(),pe=d("div"),he=d("div"),_e=f("Min width\n "),me=d("input"),ve=p(),ge=d("div"),be=f("Min height\n "),ye=d("input"),we=p(),ke=d("div"),xe=d("div"),Ce=f("Max width\n "),Te=d("input"),Me=p(),$e=d("div"),Oe=f("Max height\n "),Fe=d("input"),De=p(),je=d("form"),Pe=d("input"),We=p(),Ae=d("button"),Ae.textContent="Set title",ze=p(),Ee=d("form"),Se=d("input"),Be=p(),Re=d("button"),Re.textContent="Open URL",m(u,"type","checkbox"),m(k,"type","checkbox"),m(T,"title","Unminimizes after 2 seconds"),m($,"title","Visible again after 2 seconds"),m(D,"type","checkbox"),m(A,"type","checkbox"),m(B,"type","checkbox"),m(H,"type","checkbox"),m(Q,"type","number"),m(Q,"min","0"),m(Q,"class","svelte-b76pvm"),m(ne,"type","number"),m(ne,"min","0"),m(ne,"class","svelte-b76pvm"),m(Y,"class","flex col grow svelte-b76pvm"),m(ae,"type","number"),m(ae,"min","400"),m(ae,"class","svelte-b76pvm"),m(de,"type","number"),m(de,"min","400"),m(de,"class","svelte-b76pvm"),m(oe,"class","flex col grow svelte-b76pvm"),m(me,"type","number"),m(me,"class","svelte-b76pvm"),m(ye,"type","number"),m(ye,"class","svelte-b76pvm"),m(pe,"class","flex col grow svelte-b76pvm"),m(Te,"type","number"),m(Te,"min","400"),m(Te,"class","svelte-b76pvm"),m(Fe,"type","number"),m(Fe,"min","400"),m(Fe,"class","svelte-b76pvm"),m(ke,"class","flex col grow svelte-b76pvm"),m(X,"class","window-controls flex flex-row svelte-b76pvm"),m(n,"class","flex col"),m(Pe,"id","title"),m(Ae,"class","button"),m(Ae,"type","submit"),y(je,"margin-top","24px"),m(Se,"id","url"),m(Re,"class","button"),m(Re,"id","open-url"),y(Ee,"margin-top","24px")},m(e,i){s(e,n,i),a(n,o),a(o,r),a(r,u),u.checked=t[0],a(r,l),a(o,g),a(o,w),a(w,k),k.checked=t[1],a(w,x),a(o,C),a(o,T),a(o,M),a(o,$),a(o,O),a(o,F),a(F,D),D.checked=t[14],a(F,j),a(o,P),a(o,W),a(W,A),A.checked=t[2],a(W,z),a(o,E),a(o,S),a(S,B),B.checked=t[3],a(S,R),a(o,q),a(o,I),a(I,H),H.checked=t[4],a(I,L),a(o,N),a(o,U),a(n,G),a(n,J),a(J,X),a(X,Y),a(Y,V),a(V,K),a(V,Q),b(Q,t[11]),a(Y,Z),a(Y,ee),a(ee,te),a(ee,ne),b(ne,t[12]),a(X,ie),a(X,oe),a(oe,re),a(re,ue),a(re,ae),b(ae,t[5]),a(oe,se),a(oe,ce),a(ce,le),a(ce,de),b(de,t[6]),a(X,fe),a(X,pe),a(pe,he),a(he,_e),a(he,me),b(me,t[7]),a(pe,ve),a(pe,ge),a(ge,be),a(ge,ye),b(ye,t[8]),a(X,we),a(X,ke),a(ke,xe),a(xe,Ce),a(xe,Te),b(Te,t[9]),a(ke,Me),a(ke,$e),a($e,Oe),a($e,Fe),b(Fe,t[10]),s(e,De,i),s(e,je,i),a(je,Pe),b(Pe,t[15]),a(je,We),a(je,Ae),s(e,ze,i),s(e,Ee,i),a(Ee,Se),b(Se,t[13]),a(Ee,Be),a(Ee,Re),qe||(Ie=[h(u,"change",t[21]),h(k,"change",t[22]),h(T,"click",t[19]),h($,"click",t[18]),h(D,"change",t[23]),h(A,"change",t[24]),h(B,"change",t[25]),h(H,"change",t[26]),h(U,"click",t[20]),h(Q,"input",t[27]),h(ne,"input",t[28]),h(ae,"input",t[29]),h(de,"input",t[30]),h(me,"input",t[31]),h(ye,"input",t[32]),h(Te,"input",t[33]),h(Fe,"input",t[34]),h(Pe,"input",t[35]),h(je,"submit",_(t[17])),h(Se,"input",t[36]),h(Ee,"submit",_(t[16]))],qe=!0)},p(e,t){1&t[0]&&(u.checked=e[0]),2&t[0]&&(k.checked=e[1]),16384&t[0]&&(D.checked=e[14]),4&t[0]&&(A.checked=e[2]),8&t[0]&&(B.checked=e[3]),16&t[0]&&(H.checked=e[4]),2048&t[0]&&v(Q.value)!==e[11]&&b(Q,e[11]),4096&t[0]&&v(ne.value)!==e[12]&&b(ne,e[12]),32&t[0]&&v(ae.value)!==e[5]&&b(ae,e[5]),64&t[0]&&v(de.value)!==e[6]&&b(de,e[6]),128&t[0]&&v(me.value)!==e[7]&&b(me,e[7]),256&t[0]&&v(ye.value)!==e[8]&&b(ye,e[8]),512&t[0]&&v(Te.value)!==e[9]&&b(Te,e[9]),1024&t[0]&&v(Fe.value)!==e[10]&&b(Fe,e[10]),32768&t[0]&&Pe.value!==e[15]&&b(Pe,e[15]),8192&t[0]&&Se.value!==e[13]&&b(Se,e[13])},i:e,o:e,d(e){e&&c(n),e&&c(De),e&&c(je),e&&c(ze),e&&c(Ee),qe=!1,i(Ie)}}}function We(e,t,n){const{setResizable:i,setTitle:o,maximize:r,unmaximize:u,minimize:a,unminimize:s,show:c,hide:l,setTransparent:d,setDecorations:f,setAlwaysOnTop:p,setWidth:h,setHeight:_,setMinSize:m,setMaxSize:g,setX:b,setY:y,setFullscreen:w,setIcon:k}=V.appWindow;let x="https://tauri.studio",C=!0,T=!1,M=!1,$=!0,O=!1,F=!1,D=900,j=700,P=600,W=600,A=null,z=null,E=100,S=100,B="Awesome Tauri Example!";return e.$$.update=()=>{1&e.$$.dirty[0]&&i(C),2&e.$$.dirty[0]&&(T?r():u()),4&e.$$.dirty[0]&&f($),8&e.$$.dirty[0]&&p(O),16&e.$$.dirty[0]&&w(F),32&e.$$.dirty[0]&&h(D),64&e.$$.dirty[0]&&_(j),384&e.$$.dirty[0]&&P&&W&&m(P,W),1536&e.$$.dirty[0]&&A&&z&&g(A,z),2048&e.$$.dirty[0]&&b(E),4096&e.$$.dirty[0]&&y(S)},[C,T,$,O,F,D,j,P,W,A,z,E,S,x,M,B,function(){je.open(x)},function(){o(B)},function(){l(),setTimeout(c,2e3)},function(){a(),setTimeout(s,2e3)},function(){ce.open({multiple:!1}).then(k)},function(){C=this.checked,n(0,C)},function(){T=this.checked,n(1,T)},function(){M=this.checked,n(14,M)},function(){$=this.checked,n(2,$)},function(){O=this.checked,n(3,O)},function(){F=this.checked,n(4,F)},function(){E=v(this.value),n(11,E)},function(){S=v(this.value),n(12,S)},function(){D=v(this.value),n(5,D)},function(){j=v(this.value),n(6,j)},function(){P=v(this.value),n(7,P)},function(){W=v(this.value),n(8,W)},function(){A=v(this.value),n(9,A)},function(){z=v(this.value),n(10,z)},function(){B=this.value,n(15,B)},function(){x=this.value,n(13,x)}]}class Ae extends N{constructor(e){var t;super(),document.getElementById("svelte-b76pvm-style")||((t=d("style")).id="svelte-b76pvm-style",t.textContent=".flex-row.svelte-b76pvm.svelte-b76pvm{flex-direction:row}.grow.svelte-b76pvm.svelte-b76pvm{flex-grow:1}.window-controls.svelte-b76pvm input.svelte-b76pvm{width:50px}",a(document.head,t)),L(this,e,We,Pe,r,{},[-1,-1])}}const ze=[];var Ee=U((function(e,t){function n(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:G.transformCallback(t)}})]}))}))}function i(e,t){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(n){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:G.transformCallback(t)}})]}))}))}function o(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})]}))}))}function r(e){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(t){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})]}))}))}function u(){return G.__awaiter(this,void 0,void 0,(function(){return G.__generator(this,(function(e){return[2,J.invokeTauriCommand({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]}))}))}var a=Object.freeze({__proto__:null,register:n,registerAll:i,isRegistered:o,unregister:r,unregisterAll:u});t.globalShortcut=a,t.isRegistered=o,t.register=n,t.registerAll=i,t.unregister=r,t.unregisterAll=u})),Se=U((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isRegistered=Ee.isRegistered,t.register=Ee.register,t.registerAll=Ee.registerAll,t.unregister=Ee.unregister,t.unregisterAll=Ee.unregisterAll}));function Be(e,t,n){const i=e.slice();return i[9]=t[n],i}function Re(e){let t,n,i,o,r,u,l=e[9]+"";function _(){return e[8](e[9])}return{c(){t=d("div"),n=f(l),i=p(),o=d("button"),o.textContent="Unregister",m(o,"type","button")},m(e,c){s(e,t,c),a(t,n),a(t,i),a(t,o),r||(u=h(o,"click",_),r=!0)},p(t,i){e=t,2&i&&l!==(l=e[9]+"")&&g(n,l)},d(e){e&&c(t),r=!1,u()}}}function qe(t){let n,i,o;return{c(){n=d("button"),n.textContent="Unregister all",m(n,"type","button")},m(e,r){s(e,n,r),i||(o=h(n,"click",t[5]),i=!0)},p:e,d(e){e&&c(n),i=!1,o()}}}function Ie(t){let n,o,r,u,f,_,v,g,y,w,k=t[1],x=[];for(let e=0;e{const e=o.indexOf(s);-1!==e&&o.splice(e,1),0===o.length&&(i(),i=null)}}}}([]);u(t,s,(e=>i(1,o=e)));let c="CmdOrControl+X";function l(e){const t=e;Se.unregister(t).then((()=>{s.update((e=>e.filter((e=>e!==t)))),a(`Shortcut ${t} unregistered`)})).catch(a)}return t.$$set=e=>{"onMessage"in e&&i(6,a=e.onMessage)},[c,o,s,function(){const e=c;Se.register(e,(()=>{a(`Shortcut ${e} triggered`)})).then((()=>{s.update((t=>[...t,e])),a(`Shortcut ${e} registered successfully`)})).catch(a)},l,function(){Se.unregisterAll().then((()=>{s.update((()=>[])),a("Unregistered all shortcuts")})).catch(a)},a,function(){c=this.value,i(0,c)},e=>l(e)]}class Le extends N{constructor(e){super(),L(this,e,He,Ie,r,{onMessage:6})}}function Ne(t){let n,i,o;return{c(){n=d("h1"),n.textContent="Welcome",i=p(),o=d("p"),o.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."},m(e,t){s(e,n,t),s(e,i,t),s(e,o,t)},p:e,i:e,o:e,d(e){e&&c(n),e&&c(i),e&&c(o)}}}class Ue extends N{constructor(e){super(),L(this,e,null,Ne,r,{})}}function Ge(e,t,n){const i=e.slice();return i[8]=t[n],i}function Je(e){let t,n,i,o,r,u,l=e[8].label+"";function _(){return e[6](e[8])}return{c(){t=d("p"),n=f(l),i=p(),m(t,"class",o="nv noselect "+(e[0]===e[8]?"nv_selected":""))},m(e,o){s(e,t,o),a(t,n),a(t,i),r||(u=h(t,"click",_),r=!0)},p(n,i){e=n,1&i&&o!==(o="nv noselect "+(e[0]===e[8]?"nv_selected":""))&&m(t,"class",o)},d(e){e&&c(t),r=!1,u()}}}function Xe(e){let t,n,o,r,u,_,v,b,w,k,x,C,T,M,$,O,F,D,j,P,W,A,z,H=e[2],L=[];for(let t=0;tDocumentation \n Github \n Source',v=p(),b=d("div"),w=d("div");for(let e=0;e{I(e,1)})),E.r||i(E.c),E=E.p}N?(C=new N(U(e)),R(C.$$.fragment),S(C.$$.fragment,1),q(C,x,null)):C=null}(!W||2&t)&&g(P,e[1])},i(e){W||(C&&S(C.$$.fragment,e),W=!0)},o(e){C&&B(C.$$.fragment,e),W=!1},d(e){e&&c(t),l(L,e),C&&I(C),A=!1,i(z)}}}function Ye(e,t,n){const i=[{label:"Welcome",component:Ue},{label:"Messages",component:ae},{label:"CLI",component:te},{label:"Dialog",component:he},{label:"File system",component:ye},{label:"HTTP",component:Te},{label:"Notifications",component:Fe},{label:"Window",component:Ae},{label:"Shortcuts",component:Le}];let o=i[0],r=[""];function u(e){n(0,o=e)}return[o,r,i,u,function(e){n(1,r+="string"==typeof e?e:JSON.stringify(e)),n(1,r+="\n")},function(){V.open("https://tauri.studio/")},e=>u(e),()=>{n(1,r=[""])}]}return new class extends N{constructor(e){super(),L(this,e,Ye,Xe,r,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map