tauri/examples/api/dist/assets/index.js
Fabian-Lars 3c62dbc902
feat(api): Add exists function to the fs module. (#5060)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.studio>
2022-09-15 11:28:52 -03:00

45 lines
97 KiB
JavaScript

const $l=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};$l();function J(){}function _l(t){return t()}function Uo(){return Object.create(null)}function pe(t){t.forEach(_l)}function er(t){return typeof t=="function"}function Me(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Fn;function tr(t,e){return Fn||(Fn=document.createElement("a")),Fn.href=e,t===Fn.href}function nr(t){return Object.keys(t).length===0}function ir(t,...e){if(t==null)return J;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function bl(t,e,n){t.$$.on_destroy.push(ir(e,n))}function r(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function pt(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function s(t){return document.createElement(t)}function or(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function v(){return z(" ")}function ei(){return z("")}function D(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Yn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function a(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function se(t){return t===""?null:+t}function lr(t){return Array.from(t.childNodes)}function Z(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function G(t,e){t.value=e==null?"":e}function Ot(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e){i.selected=!0;return}}t.selectedIndex=-1}function Di(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function qn(t,e,n){t.classList[n?"add":"remove"](e)}class rr{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=or(n.nodeName):this.e=s(n.nodeName),this.t=n,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)m(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(h)}}let Vt;function Bt(t){Vt=t}function gl(){if(!Vt)throw new Error("Function called outside component initialization");return Vt}function ct(t){gl().$$.on_mount.push(t)}function Ri(t){gl().$$.on_destroy.push(t)}const Ft=[],Kn=[],Vn=[],Fo=[],sr=Promise.resolve();let zi=!1;function ur(){zi||(zi=!0,sr.then(yl))}function At(t){Vn.push(t)}const Ai=new Set;let Bn=0;function yl(){const t=Vt;do{for(;Bn<Ft.length;){const e=Ft[Bn];Bn++,Bt(e),ar(e.$$)}for(Bt(null),Ft.length=0,Bn=0;Kn.length;)Kn.pop()();for(let e=0;e<Vn.length;e+=1){const n=Vn[e];Ai.has(n)||(Ai.add(n),n())}Vn.length=0}while(Ft.length);for(;Fo.length;)Fo.pop()();zi=!1,Ai.clear(),Bt(t)}function ar(t){if(t.fragment!==null){t.update(),pe(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(At)}}const Gn=new Set;let ft;function ti(){ft={r:0,c:[],p:ft}}function ni(){ft.r||pe(ft.c),ft=ft.p}function We(t,e){t&&t.i&&(Gn.delete(t),t.i(e))}function He(t,e,n,i){if(t&&t.o){if(Gn.has(t))return;Gn.add(t),ft.c.push(()=>{Gn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function xn(t){t&&t.c()}function Gt(t,e,n,i){const{fragment:o,on_mount:l,on_destroy:u,after_update:f}=t.$$;o&&o.m(e,n),i||At(()=>{const c=l.map(_l).filter(er);u?u.push(...c):pe(c),t.$$.on_mount=[]}),f.forEach(At)}function Jt(t,e){const n=t.$$;n.fragment!==null&&(pe(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function cr(t,e){t.$$.dirty[0]===-1&&(Ft.push(t),ur(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Le(t,e,n,i,o,l,u,f=[-1]){const c=Vt;Bt(t);const p=t.$$={fragment:null,ctx:null,props:l,update:J,not_equal:o,bound:Uo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Uo(),dirty:f,skip_bound:!1,root:e.target||c.$$.root};u&&u(p.root);let d=!1;if(p.ctx=n?n(t,e.props||{},(k,_,...y)=>{const g=y.length?y[0]:_;return p.ctx&&o(p.ctx[k],p.ctx[k]=g)&&(!p.skip_bound&&p.bound[k]&&p.bound[k](g),d&&cr(t,k)),_}):[],p.update(),d=!0,pe(p.before_update),p.fragment=i?i(p.ctx):!1,e.target){if(e.hydrate){const k=lr(e.target);p.fragment&&p.fragment.l(k),k.forEach(h)}else p.fragment&&p.fragment.c();e.intro&&We(t.$$.fragment),Gt(t,e.target,e.anchor,e.customElement),yl()}Bt(c)}class Se{$destroy(){Jt(this,1),this.$destroy=J}$on(e,n){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!nr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Lt=[];function wl(t,e=J){let n;const i=new Set;function o(f){if(Me(t,f)&&(t=f,n)){const c=!Lt.length;for(const p of i)p[1](),Lt.push(p,t);if(c){for(let p=0;p<Lt.length;p+=2)Lt[p][0](Lt[p+1]);Lt.length=0}}}function l(f){o(f(t))}function u(f,c=J){const p=[f,c];return i.add(p),i.size===1&&(n=e(o)||J),f(t),()=>{i.delete(p),i.size===0&&(n(),n=null)}}return{set:o,update:l,subscribe:u}}var Wi=function(t,e){return Wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},Wi(t,e)};function Ii(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Wi(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ue=function(){return ue=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ue.apply(this,arguments)};function M(t,e,n,i){return new(n||(n=Promise))(function(o,l){function u(p){try{c(i.next(p))}catch(d){l(d)}}function f(p){try{c(i.throw(p))}catch(d){l(d)}}function c(p){var d;p.done?o(p.value):(d=p.value,d instanceof n?d:new n(function(k){k(d)})).then(u,f)}c((i=i.apply(t,e||[])).next())})}function T(t,e){var n,i,o,l,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(c){return function(p){return function(d){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&d[0]?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[2&d[0],o.value]),d[0]){case 0:case 1:o=d;break;case 4:return u.label++,{value:d[1],done:!1};case 5:u.label++,i=d[1],d=[0];continue;case 7:d=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!((o=o.length>0&&o[o.length-1])||d[0]!==6&&d[0]!==2)){u=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){u.label=d[1];break}if(d[0]===6&&u.label<o[1]){u.label=o[1],o=d;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(d);break}o[2]&&u.ops.pop(),u.trys.pop();continue}d=e.call(t,u)}catch(k){d=[6,k],i=0}finally{n=o=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([c,p])}}}function ht(t,e){e===void 0&&(e=!1);var n=window.crypto.getRandomValues(new Uint32Array(1))[0],i="_".concat(n);return Object.defineProperty(window,i,{value:function(o){return e&&Reflect.deleteProperty(window,i),t==null?void 0:t(o)},writable:!1,configurable:!0}),n}function Qn(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,new Promise(function(i,o){var l=ht(function(f){i(f),Reflect.deleteProperty(window,"_".concat(u))},!0),u=ht(function(f){o(f),Reflect.deleteProperty(window,"_".concat(l))},!0);window.__TAURI_IPC__(ue({cmd:t,callback:l,error:u},e))})]})})}function kl(t,e){e===void 0&&(e="asset");var n=encodeURIComponent(t);return navigator.userAgent.includes("Windows")?"https://".concat(e,".localhost/").concat(n):"".concat(e,"://").concat(n)}Object.freeze({__proto__:null,transformCallback:ht,invoke:Qn,convertFileSrc:kl});function A(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,Qn("tauri",t)]})})}function fr(t,e,n,i){return n===void 0&&(n=[]),M(this,void 0,void 0,function(){return T(this,function(o){return typeof n=="object"&&Object.freeze(n),[2,A({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:n,options:i,onEventFn:ht(t)}})]})})}var Jn=function(){function t(){this.eventListeners=Object.create(null)}return t.prototype.addListener=function(e,n){return this.on(e,n)},t.prototype.removeListener=function(e,n){return this.off(e,n)},t.prototype.on=function(e,n){return e in this.eventListeners?this.eventListeners[e].push(n):this.eventListeners[e]=[n],this},t.prototype.once=function(e,n){var i=this,o=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];i.removeListener(e,o),n.apply(void 0,l)};return this.addListener(e,o)},t.prototype.off=function(e,n){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(function(i){return i!==n})),this},t.prototype.removeAllListeners=function(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this},t.prototype.emit=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(e in this.eventListeners){for(var o=this.eventListeners[e],l=0,u=o;l<u.length;l++){var f=u[l];f.apply(void 0,n)}return!0}return!1},t.prototype.listenerCount=function(e){return e in this.eventListeners?this.eventListeners[e].length:0},t.prototype.prependListener=function(e,n){return e in this.eventListeners?this.eventListeners[e].unshift(n):this.eventListeners[e]=[n],this},t.prototype.prependOnceListener=function(e,n){var i=this,o=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];i.removeListener(e,o),n.apply(void 0,l)};return this.prependListener(e,o)},t}(),Ml=function(){function t(e){this.pid=e}return t.prototype.write=function(e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})]})})},t.prototype.kill=function(){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})]})})},t}(),Tl=function(t){function e(n,i,o){i===void 0&&(i=[]);var l=t.call(this)||this;return l.stdout=new Jn,l.stderr=new Jn,l.program=n,l.args=typeof i=="string"?[i]:i,l.options=o!=null?o:{},l}return Ii(e,t),e.sidecar=function(n,i,o){i===void 0&&(i=[]);var l=new e(n,i,o);return l.options.sidecar=!0,l},e.prototype.spawn=function(){return M(this,void 0,void 0,function(){var n=this;return T(this,function(i){return[2,fr(function(o){switch(o.event){case"Error":n.emit("error",o.payload);break;case"Terminated":n.emit("close",o.payload);break;case"Stdout":n.stdout.emit("data",o.payload);break;case"Stderr":n.stderr.emit("data",o.payload)}},this.program,this.args,this.options).then(function(o){return new Ml(o)})]})})},e.prototype.execute=function(){return M(this,void 0,void 0,function(){var n=this;return T(this,function(i){return[2,new Promise(function(o,l){n.on("error",l);var u=[],f=[];n.stdout.on("data",function(c){u.push(c)}),n.stderr.on("data",function(c){f.push(c)}),n.on("close",function(c){o({code:c.code,signal:c.signal,stdout:u.join(`
`),stderr:f.join(`
`)})}),n.spawn().catch(l)})]})})},e}(Jn);function Ni(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:Tl,Child:Ml,EventEmitter:Jn,open:Ni});function Cl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Ll(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function ji(t,e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return[2,A({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:ht(n)}}).then(function(l){return function(){return M(i,void 0,void 0,function(){return T(this,function(u){return[2,Cl(t,l)]})})}})]})})}function Sl(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,ji(t,e,function(o){n(o),Cl(t,o.id).catch(function(){})})]})})}var ve;function Yt(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,ji(t,null,e)]})})}function Ol(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Sl(t,null,e)]})})}function ii(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Ll(t,void 0,e)]})})}(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",t.MENU="tauri://menu",t.CHECK_UPDATE="tauri://update",t.UPDATE_AVAILABLE="tauri://update-available",t.INSTALL_UPDATE="tauri://update-install",t.STATUS_UPDATE="tauri://update-status",t.DOWNLOAD_PROGRESS="tauri://update-download-progress"})(ve||(ve={}));Object.freeze({__proto__:null,get TauriEvent(){return ve},listen:Yt,once:Ol,emit:ii});var Xt,Zn=function(t,e){this.type="Logical",this.width=t,this.height=e},St=function(){function t(e,n){this.type="Physical",this.width=e,this.height=n}return t.prototype.toLogical=function(e){return new Zn(this.width/e,this.height/e)},t}(),Al=function(t,e){this.type="Logical",this.x=t,this.y=e},dt=function(){function t(e,n){this.type="Physical",this.x=e,this.y=n}return t.prototype.toLogical=function(e){return new Al(this.x/e,this.y/e)},t}();function qt(){return new Et(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function El(){return window.__TAURI_METADATA__.__windows.map(function(t){return new Et(t.label,{skip:!0})})}(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Xt||(Xt={}));var Be,qo=["tauri://created","tauri://error"],Dl=function(){function t(e){this.label=e,this.listeners=Object.create(null)}return t.prototype.listen=function(e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,ji(e,this.label,n)]})})},t.prototype.once=function(e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return this._handleTauriEvent(e,n)?[2,Promise.resolve(function(){var l=i.listeners[e];l.splice(l.indexOf(n),1)})]:[2,Sl(e,this.label,n)]})})},t.prototype.emit=function(e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){if(qo.includes(e)){for(i=0,o=this.listeners[e]||[];i<o.length;i++)(0,o[i])({event:e,id:-1,windowLabel:this.label,payload:n});return[2,Promise.resolve()]}return[2,Ll(e,this.label,n)]})})},t.prototype._handleTauriEvent=function(e,n){return!!qo.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)},t}(),zl=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return Ii(e,t),e.prototype.scaleFactor=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})]})})},e.prototype.innerPosition=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new dt(o,l)})]})})},e.prototype.outerPosition=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new dt(o,l)})]})})},e.prototype.innerSize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new St(o,l)})]})})},e.prototype.outerSize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new St(o,l)})]})})},e.prototype.isFullscreen=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})]})})},e.prototype.isMaximized=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})]})})},e.prototype.isDecorated=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})]})})},e.prototype.isResizable=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})]})})},e.prototype.isVisible=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})]})})},e.prototype.theme=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})]})})},e.prototype.center=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})]})})},e.prototype.requestUserAttention=function(n){return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=null,n&&(i=n===Xt.Critical?{type:"Critical"}:{type:"Informational"}),[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:i}}}})]})})},e.prototype.setResizable=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:n}}}})]})})},e.prototype.setTitle=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:n}}}})]})})},e.prototype.maximize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})]})})},e.prototype.unmaximize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})]})})},e.prototype.toggleMaximize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})]})})},e.prototype.minimize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})]})})},e.prototype.unminimize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})]})})},e.prototype.show=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})]})})},e.prototype.hide=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})]})})},e.prototype.close=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})]})})},e.prototype.setDecorations=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:n}}}})]})})},e.prototype.setAlwaysOnTop=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:n}}}})]})})},e.prototype.setSize=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){if(!n||n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:n.type,data:{width:n.width,height:n.height}}}}}})]})})},e.prototype.setMinSize=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){if(n&&n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:n?{type:n.type,data:{width:n.width,height:n.height}}:null}}}})]})})},e.prototype.setMaxSize=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){if(n&&n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:n?{type:n.type,data:{width:n.width,height:n.height}}:null}}}})]})})},e.prototype.setPosition=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){if(!n||n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:n.type,data:{x:n.x,y:n.y}}}}}})]})})},e.prototype.setFullscreen=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:n}}}})]})})},e.prototype.setFocus=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})]})})},e.prototype.setIcon=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof n=="string"?n:Array.from(n)}}}}})]})})},e.prototype.setSkipTaskbar=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:n}}}})]})})},e.prototype.setCursorGrab=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:n}}}})]})})},e.prototype.setCursorVisible=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:n}}}})]})})},e.prototype.setCursorIcon=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:n}}}})]})})},e.prototype.setCursorPosition=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){if(!n||n.type!=="Logical"&&n.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:n.type,data:{x:n.x,y:n.y}}}}}})]})})},e.prototype.startDragging=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})]})})},e.prototype.onResized=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen(ve.WINDOW_RESIZED,n)]})})},e.prototype.onMoved=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen(ve.WINDOW_MOVED,n)]})})},e.prototype.onCloseRequested=function(n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return[2,this.listen(ve.WINDOW_CLOSE_REQUESTED,function(l){var u=new Wl(l);Promise.resolve(n(u)).then(function(){if(!u.isPreventDefault())return i.close()})})]})})},e.prototype.onFocusChanged=function(n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){switch(l.label){case 0:return[4,this.listen(ve.WINDOW_FOCUS,function(u){n(ue(ue({},u),{payload:!0}))})];case 1:return i=l.sent(),[4,this.listen(ve.WINDOW_BLUR,function(u){n(ue(ue({},u),{payload:!1}))})];case 2:return o=l.sent(),[2,function(){i(),o()}]}})})},e.prototype.onScaleChanged=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen(ve.WINDOW_SCALE_FACTOR_CHANGED,n)]})})},e.prototype.onMenuClicked=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen(ve.MENU,n)]})})},e.prototype.onFileDropEvent=function(n){return M(this,void 0,void 0,function(){var i,o,l;return T(this,function(u){switch(u.label){case 0:return[4,this.listen(ve.WINDOW_FILE_DROP,function(f){n(ue(ue({},f),{payload:{type:"drop",paths:f.payload}}))})];case 1:return i=u.sent(),[4,this.listen(ve.WINDOW_FILE_DROP_HOVER,function(f){n(ue(ue({},f),{payload:{type:"hover",paths:f.payload}}))})];case 2:return o=u.sent(),[4,this.listen(ve.WINDOW_FILE_DROP_CANCELLED,function(f){n(ue(ue({},f),{payload:{type:"cancel"}}))})];case 3:return l=u.sent(),[2,function(){i(),o(),l()}]}})})},e.prototype.onThemeChanged=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen(ve.WINDOW_THEME_CHANGED,n)]})})},e}(Dl),Wl=function(){function t(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}return t.prototype.preventDefault=function(){this._preventDefault=!0},t.prototype.isPreventDefault=function(){return this._preventDefault},t}(),Et=function(t){function e(n,i){i===void 0&&(i={});var o=t.call(this,n)||this;return i!=null&&i.skip||A({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:ue({label:n},i)}}}).then(function(){return M(o,void 0,void 0,function(){return T(this,function(l){return[2,this.emit("tauri://created")]})})}).catch(function(l){return M(o,void 0,void 0,function(){return T(this,function(u){return[2,this.emit("tauri://error",l)]})})}),o}return Ii(e,t),e.getByLabel=function(n){return El().some(function(i){return i.label===n})?new e(n,{skip:!0}):null},e}(zl);function dr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}})]})})}function pr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}})]})})}function hr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}})]})})}"__TAURI_METADATA__"in window?Be=new Et(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Be=new Et("main",{skip:!0}));Object.freeze({__proto__:null,WebviewWindow:Et,WebviewWindowHandle:Dl,WindowManager:zl,CloseRequestedEvent:Wl,getCurrent:qt,getAll:El,get appWindow(){return Be},LogicalSize:Zn,PhysicalSize:St,LogicalPosition:Al,PhysicalPosition:dt,get UserAttentionType(){return Xt},currentMonitor:dr,primaryMonitor:pr,availableMonitors:hr});function mr(){return navigator.appVersion.includes("Win")}var vr=mr()?`\r
`:`
`;function Pl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function _r(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"version"}})]})})}function br(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function gr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function yr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL:vr,platform:Pl,version:_r,type:br,arch:gr,tempdir:yr});function Rl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Il(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function Nl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:Il,getVersion:Rl,getTauriVersion:Nl});function jl(t){return t===void 0&&(t=0),M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function Hi(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:jl,relaunch:Hi});function wr(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P,C,F;return{c(){e=s("p"),e.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,n=v(),i=s("br"),o=v(),l=s("br"),u=v(),f=s("pre"),c=z("App name: "),p=s("code"),d=z(t[2]),k=z(`
App version: `),_=s("code"),y=z(t[0]),g=z(`
Tauri version: `),b=s("code"),O=z(t[1]),W=z(`
`),U=v(),R=s("br"),q=v(),E=s("div"),L=s("button"),L.textContent="Close application",S=v(),P=s("button"),P.textContent="Relaunch application",a(L,"class","btn"),a(P,"class","btn"),a(E,"class","flex flex-wrap gap-1 shadow-")},m(B,Y){m(B,e,Y),m(B,n,Y),m(B,i,Y),m(B,o,Y),m(B,l,Y),m(B,u,Y),m(B,f,Y),r(f,c),r(f,p),r(p,d),r(f,k),r(f,_),r(_,y),r(f,g),r(f,b),r(b,O),r(f,W),m(B,U,Y),m(B,R,Y),m(B,q,Y),m(B,E,Y),r(E,L),r(E,S),r(E,P),C||(F=[D(L,"click",t[3]),D(P,"click",t[4])],C=!0)},p(B,[Y]){Y&4&&Z(d,B[2]),Y&1&&Z(y,B[0]),Y&2&&Z(O,B[1])},i:J,o:J,d(B){B&&h(e),B&&h(n),B&&h(i),B&&h(o),B&&h(l),B&&h(u),B&&h(f),B&&h(U),B&&h(R),B&&h(q),B&&h(E),C=!1,pe(F)}}}function kr(t,e,n){let i="0.0.0",o="0.0.0",l="Unknown";Il().then(c=>{n(2,l=c)}),Rl().then(c=>{n(0,i=c)}),Nl().then(c=>{n(1,o=c)});async function u(){await jl()}async function f(){await Hi()}return[i,o,l,u,f]}class Mr extends Se{constructor(e){super(),Le(this,e,kr,wr,Me,{})}}function Hl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Hl});function Tr(t){let e,n,i,o,l,u,f,c,p,d,k,_,y;return{c(){e=s("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=v(),i=s("br"),o=v(),l=s("div"),l.textContent="Note that the arguments are only parsed, not implemented.",u=v(),f=s("br"),c=v(),p=s("br"),d=v(),k=s("button"),k.textContent="Get matches",a(l,"class","note"),a(k,"class","btn"),a(k,"id","cli-matches")},m(g,b){m(g,e,b),m(g,n,b),m(g,i,b),m(g,o,b),m(g,l,b),m(g,u,b),m(g,f,b),m(g,c,b),m(g,p,b),m(g,d,b),m(g,k,b),_||(y=D(k,"click",t[0]),_=!0)},p:J,i:J,o:J,d(g){g&&h(e),g&&h(n),g&&h(i),g&&h(o),g&&h(l),g&&h(u),g&&h(f),g&&h(c),g&&h(p),g&&h(d),g&&h(k),_=!1,y()}}}function Cr(t,e,n){let{onMessage:i}=e;function o(){Hl().then(i).catch(i)}return t.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Lr extends Se{constructor(e){super(),Le(this,e,Cr,Tr,Me,{onMessage:1})}}function Sr(t){let e,n,i,o,l,u,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=v(),o=s("button"),o.textContent="Call Request (async) API",l=v(),u=s("button"),u.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(u,"class","btn"),a(u,"id","event")},m(p,d){m(p,e,d),r(e,n),r(e,i),r(e,o),r(e,l),r(e,u),f||(c=[D(n,"click",t[0]),D(o,"click",t[1]),D(u,"click",t[2])],f=!0)},p:J,i:J,o:J,d(p){p&&h(e),f=!1,pe(c)}}}function Or(t,e,n){let{onMessage:i}=e,o;ct(async()=>{o=await Yt("rust-event",i)}),Ri(()=>{o&&o()});function l(){Qn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Qn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){ii("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,u,f,i]}class Ar extends Se{constructor(e){super(),Le(this,e,Or,Sr,Me,{onMessage:3})}}function Ui(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Ul(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Er(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,A({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Fl(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,A({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Dr(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,A({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}Object.freeze({__proto__:null,open:Ui,save:Ul,message:Er,ask:Fl,confirm:Dr});var Dt;function zr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Fi(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){var n;return T(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Pi(t,e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:""},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),typeof e=="string"?i.contents=e!=null?e:"":o=e,[2,A({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:o}})]})})}function Wr(t,e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:[]},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),e&&"dir"in e?o=e:typeof t=="string"&&(i.contents=e!=null?e:[]),[2,A({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:o}})]})})}function ql(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readDir",path:t,options:e}})]})})}function Pr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"createDir",path:t,options:e}})]})})}function Rr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"removeDir",path:t,options:e}})]})})}function Ir(t,e,n){return n===void 0&&(n={}),M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Fs",message:{cmd:"copyFile",source:t,destination:e,options:n}})]})})}function Nr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"removeFile",path:t,options:e}})]})})}function jr(t,e,n){return n===void 0&&(n={}),M(this,void 0,void 0,function(){return T(this,function(i){return[2,A({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:t,newPath:e,options:n}})]})})}function Hr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"exists",path:t,options:e}})]})})}(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Desktop=6]="Desktop",t[t.Document=7]="Document",t[t.Download=8]="Download",t[t.Executable=9]="Executable",t[t.Font=10]="Font",t[t.Home=11]="Home",t[t.Picture=12]="Picture",t[t.Public=13]="Public",t[t.Runtime=14]="Runtime",t[t.Template=15]="Template",t[t.Video=16]="Video",t[t.Resource=17]="Resource",t[t.App=18]="App",t[t.Log=19]="Log",t[t.Temp=20]="Temp"})(Dt||(Dt={}));Object.freeze({__proto__:null,get BaseDirectory(){return Dt},get Dir(){return Dt},readTextFile:zr,readBinaryFile:Fi,writeTextFile:Pi,writeFile:Pi,writeBinaryFile:Wr,readDir:ql,createDir:Pr,removeDir:Rr,copyFile:Ir,removeFile:Nr,renameFile:jr,exists:Hr});function Ur(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P;return{c(){e=s("div"),n=s("input"),i=v(),o=s("input"),l=v(),u=s("br"),f=v(),c=s("div"),p=s("input"),d=v(),k=s("label"),k.textContent="Multiple",_=v(),y=s("div"),g=s("input"),b=v(),O=s("label"),O.textContent="Directory",W=v(),U=s("br"),R=v(),q=s("button"),q.textContent="Open dialog",E=v(),L=s("button"),L.textContent="Open save dialog",a(n,"class","input"),a(n,"id","dialog-default-path"),a(n,"placeholder","Default path"),a(o,"class","input"),a(o,"id","dialog-filter"),a(o,"placeholder","Extensions filter, comma-separated"),a(e,"class","flex gap-2 children:grow"),a(p,"type","checkbox"),a(p,"id","dialog-multiple"),a(k,"for","dialog-multiple"),a(g,"type","checkbox"),a(g,"id","dialog-directory"),a(O,"for","dialog-directory"),a(q,"class","btn"),a(q,"id","open-dialog"),a(L,"class","btn"),a(L,"id","save-dialog")},m(C,F){m(C,e,F),r(e,n),G(n,t[0]),r(e,i),r(e,o),G(o,t[1]),m(C,l,F),m(C,u,F),m(C,f,F),m(C,c,F),r(c,p),p.checked=t[2],r(c,d),r(c,k),m(C,_,F),m(C,y,F),r(y,g),g.checked=t[3],r(y,b),r(y,O),m(C,W,F),m(C,U,F),m(C,R,F),m(C,q,F),m(C,E,F),m(C,L,F),S||(P=[D(n,"input",t[8]),D(o,"input",t[9]),D(p,"change",t[10]),D(g,"change",t[11]),D(q,"click",t[4]),D(L,"click",t[5])],S=!0)},p(C,[F]){F&1&&n.value!==C[0]&&G(n,C[0]),F&2&&o.value!==C[1]&&G(o,C[1]),F&4&&(p.checked=C[2]),F&8&&(g.checked=C[3])},i:J,o:J,d(C){C&&h(e),C&&h(l),C&&h(u),C&&h(f),C&&h(c),C&&h(_),C&&h(y),C&&h(W),C&&h(U),C&&h(R),C&&h(q),C&&h(E),C&&h(L),S=!1,pe(P)}}}function Fr(t,e){var n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(o){var l=o.target.result;e(l.substr(l.indexOf(",")+1))},i.readAsDataURL(n)}function qr(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:o}=e,l=null,u=null,f=!1,c=!1;function p(){Ui({title:"My wonderful open dialog",defaultPath:l,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:f,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{var O=b,W=O.match(/\S+\.\S+$/g);Fi(O).then(function(U){W&&(O.includes(".png")||O.includes(".jpg"))?Fr(new Uint8Array(U),function(R){var q="data:image/png;base64,"+R;o('<img src="'+q+'"></img>')}):i(b)}).catch(i(b))}}).catch(i)}function d(){Ul({title:"My wonderful save dialog",defaultPath:l,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){l=this.value,n(0,l)}function _(){u=this.value,n(1,u)}function y(){f=this.checked,n(2,f)}function g(){c=this.checked,n(3,c)}return t.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,o=b.insecureRenderHtml)},[l,u,f,c,p,d,i,o,k,_,y,g]}class Br extends Se{constructor(e){super(),Le(this,e,qr,Ur,Me,{onMessage:6,insecureRenderHtml:7})}}function Bo(t,e,n){const i=t.slice();return i[9]=e[n],i}function Vo(t){let e,n=t[9][0]+"",i,o;return{c(){e=s("option"),i=z(n),e.__value=o=t[9][1],e.value=e.__value},m(l,u){m(l,e,u),r(e,i)},p:J,d(l){l&&h(e)}}}function Vr(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q=t[2],E=[];for(let L=0;L<q.length;L+=1)E[L]=Vo(Bo(t,q,L));return{c(){e=s("form"),n=s("div"),i=s("select"),o=s("option"),o.textContent="None";for(let L=0;L<E.length;L+=1)E[L].c();l=v(),u=s("input"),f=v(),c=s("br"),p=v(),d=s("div"),k=s("button"),k.textContent="Read",_=v(),y=s("button"),y.textContent="Use as img src",g=v(),b=s("br"),O=v(),W=s("img"),o.__value="",o.value=o.__value,a(i,"class","input"),a(i,"id","dir"),a(u,"class","input grow"),a(u,"id","path-to-read"),a(u,"placeholder","Type the path to read..."),a(n,"class","flex gap-1"),a(k,"class","btn"),a(k,"id","read"),a(y,"class","btn"),a(y,"type","button"),a(e,"class","flex flex-col"),a(W,"alt","")},m(L,S){m(L,e,S),r(e,n),r(n,i),r(i,o);for(let P=0;P<E.length;P+=1)E[P].m(i,null);r(n,l),r(n,u),G(u,t[0]),r(e,f),r(e,c),r(e,p),r(e,d),r(d,k),r(d,_),r(d,y),m(L,g,S),m(L,b,S),m(L,O,S),m(L,W,S),t[8](W),U||(R=[D(u,"input",t[7]),D(y,"click",t[4]),D(e,"submit",Yn(t[3]))],U=!0)},p(L,[S]){if(S&4){q=L[2];let P;for(P=0;P<q.length;P+=1){const C=Bo(L,q,P);E[P]?E[P].p(C,S):(E[P]=Vo(C),E[P].c(),E[P].m(i,null))}for(;P<E.length;P+=1)E[P].d(1);E.length=q.length}S&1&&u.value!==L[0]&&G(u,L[0])},i:J,o:J,d(L){L&&h(e),pt(E,L),L&&h(g),L&&h(b),L&&h(O),L&&h(W),t[8](null),U=!1,pe(R)}}}function Go(){return document.getElementById("dir").value?parseInt(dir.value):null}function Gr(t,e){const n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(o){const l=o.target.result;e(l.substr(l.indexOf(",")+1))},i.readAsDataURL(n)}function Jr(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:o}=e,l="",u;const f=Object.keys(Dt).filter(_=>isNaN(parseInt(_))).map(_=>[_,Dt[_]]);function c(){const _=l.match(/\S+\.\S+$/g),y={dir:Go()};(_?Fi(l,y):ql(l,y)).then(function(b){if(_)if(l.includes(".png")||l.includes(".jpg"))Gr(new Uint8Array(b),function(O){const W="data:image/png;base64,"+O;o('<img src="'+W+'"></img>')});else{const O=String.fromCharCode.apply(null,b);o('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const W=document.getElementById("file-response");W.value=O,document.getElementById("file-save").addEventListener("click",function(){Pi(l,W.value,{dir:Go()}).catch(i)})})}else i(b)}).catch(i)}function p(){n(1,u.src=kl(l),u)}function d(){l=this.value,n(0,l)}function k(_){Kn[_?"unshift":"push"](()=>{u=_,n(1,u)})}return t.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,o=_.insecureRenderHtml)},[l,u,f,c,p,i,o,d,k]}class Xr extends Se{constructor(e){super(),Le(this,e,Jr,Vr,Me,{onMessage:5,insecureRenderHtml:6})}}var zt;(function(t){t[t.JSON=1]="JSON",t[t.Text=2]="Text",t[t.Binary=3]="Binary"})(zt||(zt={}));var Xn=function(){function t(e,n){this.type=e,this.payload=n}return t.form=function(e){var n={};for(var i in e){var o=e[i],l=void 0;l=typeof o=="string"?o:o instanceof Uint8Array||Array.isArray(o)?Array.from(o):typeof o.file=="string"?{file:o.file,mime:o.mime,fileName:o.fileName}:{file:Array.from(o.file),mime:o.mime,fileName:o.fileName},n[i]=l}return new t("Form",n)},t.json=function(e){return new t("Json",e)},t.text=function(e){return new t("Text",e)},t.bytes=function(e){return new t("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))},t}(),Bl=function(t){this.url=t.url,this.status=t.status,this.ok=this.status>=200&&this.status<300,this.headers=t.headers,this.rawHeaders=t.rawHeaders,this.data=t.data},Vl=function(){function t(e){this.id=e}return t.prototype.drop=function(){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},t.prototype.request=function(e){return M(this,void 0,void 0,function(){var n;return T(this,function(i){return(n=!e.responseType||e.responseType===zt.JSON)&&(e.responseType=zt.Text),[2,A({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(function(o){var l=new Bl(o);if(n){try{l.data=JSON.parse(l.data)}catch(u){if(l.ok&&l.data==="")l.data={};else if(l.ok)throw Error("Failed to parse response `".concat(l.data,"` as JSON: ").concat(u,";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response."))}return l}return l})]})})},t.prototype.get=function(e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.request(ue({method:"GET",url:e},n))]})})},t.prototype.post=function(e,n,i){return M(this,void 0,void 0,function(){return T(this,function(o){return[2,this.request(ue({method:"POST",url:e,body:n},i))]})})},t.prototype.put=function(e,n,i){return M(this,void 0,void 0,function(){return T(this,function(o){return[2,this.request(ue({method:"PUT",url:e,body:n},i))]})})},t.prototype.patch=function(e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.request(ue({method:"PATCH",url:e},n))]})})},t.prototype.delete=function(e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.request(ue({method:"DELETE",url:e},n))]})})},t}();function $n(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then(function(n){return new Vl(n)})]})})}var Ei=null;function Yr(t,e){var n;return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return Ei!==null?[3,2]:[4,$n()];case 1:Ei=i.sent(),i.label=2;case 2:return[2,Ei.request(ue({url:t,method:(n=e==null?void 0:e.method)!==null&&n!==void 0?n:"GET"},e))]}})})}Object.freeze({__proto__:null,getClient:$n,fetch:Yr,Body:Xn,Client:Vl,Response:Bl,get ResponseType(){return zt}});function Jo(t,e,n){const i=t.slice();return i[12]=e[n],i[14]=n,i}function Xo(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U=t[5],R=[];for(let S=0;S<U.length;S+=1)R[S]=xo(Jo(t,U,S));const q=S=>He(R[S],1,1,()=>{R[S]=null});let E=!t[3]&&Qo(),L=!t[3]&&t[8]&&Zo();return{c(){e=s("span"),n=s("span"),i=z(t[6]),o=v(),l=s("ul");for(let S=0;S<R.length;S+=1)R[S].c();u=v(),f=s("span"),c=z(t[7]),E&&E.c(),p=v(),d=s("span"),k=z(t[6]),_=z(Zr),y=z(t[7]),L&&L.c(),g=ei(),a(n,"class","bracket svelte-gbh3pt"),a(n,"tabindex","0"),a(l,"class","svelte-gbh3pt"),a(f,"class","bracket svelte-gbh3pt"),a(f,"tabindex","0"),a(e,"class","svelte-gbh3pt"),qn(e,"hidden",t[8]),a(d,"class","bracket svelte-gbh3pt"),a(d,"tabindex","0"),qn(d,"hidden",!t[8])},m(S,P){m(S,e,P),r(e,n),r(n,i),r(e,o),r(e,l);for(let C=0;C<R.length;C+=1)R[C].m(l,null);r(e,u),r(e,f),r(f,c),E&&E.m(e,null),m(S,p,P),m(S,d,P),r(d,k),r(d,_),r(d,y),L&&L.m(S,P),m(S,g,P),b=!0,O||(W=[D(n,"click",t[11]),D(f,"click",t[11]),D(d,"click",t[11])],O=!0)},p(S,P){if((!b||P&64)&&Z(i,S[6]),P&1591){U=S[5];let C;for(C=0;C<U.length;C+=1){const F=Jo(S,U,C);R[C]?(R[C].p(F,P),We(R[C],1)):(R[C]=xo(F),R[C].c(),We(R[C],1),R[C].m(l,null))}for(ti(),C=U.length;C<R.length;C+=1)q(C);ni()}(!b||P&128)&&Z(c,S[7]),S[3]?E&&(E.d(1),E=null):E||(E=Qo(),E.c(),E.m(e,null)),P&256&&qn(e,"hidden",S[8]),(!b||P&64)&&Z(k,S[6]),(!b||P&128)&&Z(y,S[7]),P&256&&qn(d,"hidden",!S[8]),!S[3]&&S[8]?L||(L=Zo(),L.c(),L.m(g.parentNode,g)):L&&(L.d(1),L=null)},i(S){if(!b){for(let P=0;P<U.length;P+=1)We(R[P]);b=!0}},o(S){R=R.filter(Boolean);for(let P=0;P<R.length;P+=1)He(R[P]);b=!1},d(S){S&&h(e),pt(R,S),E&&E.d(),S&&h(p),S&&h(d),L&&L.d(S),S&&h(g),O=!1,pe(W)}}}function Yo(t){let e,n,i=t[12]+"",o,l;return{c(){e=s("span"),n=z('"'),o=z(i),l=z('":'),a(e,"class","key")},m(u,f){m(u,e,f),r(e,n),r(e,o),r(e,l)},p(u,f){f&32&&i!==(i=u[12]+"")&&Z(o,i)},d(u){u&&h(e)}}}function Kr(t){let e,n=t[10](t[0][t[12]])+"",i,o,l=t[14]<t[5].length-1&&Ko();return{c(){e=s("span"),i=z(n),l&&l.c(),a(e,"class",o="val "+t[9](t[0][t[12]])+" svelte-gbh3pt")},m(u,f){m(u,e,f),r(e,i),l&&l.m(e,null)},p(u,f){f&33&&n!==(n=u[10](u[0][u[12]])+"")&&Z(i,n),u[14]<u[5].length-1?l||(l=Ko(),l.c(),l.m(e,null)):l&&(l.d(1),l=null),f&33&&o!==(o="val "+u[9](u[0][u[12]])+" svelte-gbh3pt")&&a(e,"class",o)},i:J,o:J,d(u){u&&h(e),l&&l.d()}}}function xr(t){let e,n;return e=new Gl({props:{json:t[0][t[12]],depth:t[1],_lvl:t[2]+1,_last:t[14]===t[5].length-1}}),{c(){xn(e.$$.fragment)},m(i,o){Gt(e,i,o),n=!0},p(i,o){const l={};o&33&&(l.json=i[0][i[12]]),o&2&&(l.depth=i[1]),o&4&&(l._lvl=i[2]+1),o&32&&(l._last=i[14]===i[5].length-1),e.$set(l)},i(i){n||(We(e.$$.fragment,i),n=!0)},o(i){He(e.$$.fragment,i),n=!1},d(i){Jt(e,i)}}}function Ko(t){let e;return{c(){e=s("span"),e.textContent=",",a(e,"class","comma svelte-gbh3pt")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function xo(t){let e,n,i,o,l,u,f,c=!t[4]&&Yo(t);const p=[xr,Kr],d=[];function k(_,y){return y&33&&(i=null),i==null&&(i=_[9](_[0][_[12]])==="object"),i?0:1}return o=k(t,-1),l=d[o]=p[o](t),{c(){e=s("li"),c&&c.c(),n=v(),l.c(),u=v()},m(_,y){m(_,e,y),c&&c.m(e,null),r(e,n),d[o].m(e,null),r(e,u),f=!0},p(_,y){_[4]?c&&(c.d(1),c=null):c?c.p(_,y):(c=Yo(_),c.c(),c.m(e,n));let g=o;o=k(_,y),o===g?d[o].p(_,y):(ti(),He(d[g],1,1,()=>{d[g]=null}),ni(),l=d[o],l?l.p(_,y):(l=d[o]=p[o](_),l.c()),We(l,1),l.m(e,u))},i(_){f||(We(l),f=!0)},o(_){He(l),f=!1},d(_){_&&h(e),c&&c.d(),d[o].d()}}}function Qo(t){let e;return{c(){e=s("span"),e.textContent=",",a(e,"class","comma svelte-gbh3pt")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Zo(t){let e;return{c(){e=s("span"),e.textContent=",",a(e,"class","comma svelte-gbh3pt")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Qr(t){let e,n,i=t[5].length&&Xo(t);return{c(){i&&i.c(),e=ei()},m(o,l){i&&i.m(o,l),m(o,e,l),n=!0},p(o,[l]){o[5].length?i?(i.p(o,l),l&32&&We(i,1)):(i=Xo(o),i.c(),We(i,1),i.m(e.parentNode,e)):i&&(ti(),He(i,1,1,()=>{i=null}),ni())},i(o){n||(We(i),n=!0)},o(o){He(i),n=!1},d(o){i&&i.d(o),o&&h(e)}}}const Zr="...";function $r(t,e,n){let{json:i}=e,{depth:o=1/0}=e,{_lvl:l=0}=e,{_last:u=!0}=e;const f=b=>b===null?"null":typeof b;let c,p,d,k,_;const y=b=>{switch(f(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},g=()=>{n(8,_=!_)};return t.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,o=b.depth),"_lvl"in b&&n(2,l=b._lvl),"_last"in b&&n(3,u=b._last)},t.$$.update=()=>{t.$$.dirty&17&&(n(5,c=f(i)==="object"?Object.keys(i):[]),n(4,p=Array.isArray(i)),n(6,d=p?"[":"{"),n(7,k=p?"]":"}")),t.$$.dirty&6&&n(8,_=o<l)},[i,o,l,u,p,c,d,k,_,f,y,g]}class Gl extends Se{constructor(e){super(),Le(this,e,$r,Qr,Me,{json:0,depth:1,_lvl:2,_last:3})}}function es(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P,C,F,B,Y,$,be,te,oe,K,ge,N,x,le,ae,ee,_e,re,ye,ne,Te,Ae;return ye=new Gl({props:{json:t[4]}}),{c(){e=s("form"),n=s("select"),i=s("option"),i.textContent="GET",o=s("option"),o.textContent="POST",l=s("option"),l.textContent="PUT",u=s("option"),u.textContent="PATCH",f=s("option"),f.textContent="DELETE",c=v(),p=s("br"),d=v(),k=s("textarea"),_=v(),y=s("br"),g=v(),b=s("button"),b.textContent="Make request",O=v(),W=s("br"),U=v(),R=s("h3"),R.textContent="HTTP Form",q=v(),E=s("div"),L=s("input"),S=v(),P=s("input"),C=v(),F=s("br"),B=v(),Y=s("label"),$=s("input"),be=z(`
Multipart`),te=v(),oe=s("br"),K=v(),ge=s("br"),N=v(),x=s("button"),x.textContent="Post it",le=v(),ae=s("br"),ee=v(),_e=s("br"),re=v(),xn(ye.$$.fragment),i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,u.__value="PATCH",u.value=u.__value,f.__value="DELETE",f.value=f.__value,a(n,"class","input"),a(n,"id","request-method"),t[0]===void 0&&At(()=>t[9].call(n)),a(k,"class","input h-auto w-100%"),a(k,"id","request-body"),a(k,"placeholder","Request body"),a(k,"rows","5"),a(b,"class","btn"),a(b,"id","make-request"),a(L,"class","input"),a(P,"class","input"),a(E,"class","flex gap-2 children:grow"),a($,"type","checkbox"),a(x,"class","btn"),a(x,"type","button")},m(I,V){m(I,e,V),r(e,n),r(n,i),r(n,o),r(n,l),r(n,u),r(n,f),Ot(n,t[0]),r(e,c),r(e,p),r(e,d),r(e,k),G(k,t[1]),r(e,_),r(e,y),r(e,g),r(e,b),m(I,O,V),m(I,W,V),m(I,U,V),m(I,R,V),m(I,q,V),m(I,E,V),r(E,L),G(L,t[2]),r(E,S),r(E,P),G(P,t[3]),m(I,C,V),m(I,F,V),m(I,B,V),m(I,Y,V),r(Y,$),$.checked=t[5],r(Y,be),m(I,te,V),m(I,oe,V),m(I,K,V),m(I,ge,V),m(I,N,V),m(I,x,V),m(I,le,V),m(I,ae,V),m(I,ee,V),m(I,_e,V),m(I,re,V),Gt(ye,I,V),ne=!0,Te||(Ae=[D(n,"change",t[9]),D(k,"input",t[10]),D(e,"submit",Yn(t[6])),D(L,"input",t[11]),D(P,"input",t[12]),D($,"change",t[13]),D(x,"click",t[7])],Te=!0)},p(I,[V]){V&1&&Ot(n,I[0]),V&2&&G(k,I[1]),V&4&&L.value!==I[2]&&G(L,I[2]),V&8&&P.value!==I[3]&&G(P,I[3]),V&32&&($.checked=I[5]);const Ne={};V&16&&(Ne.json=I[4]),ye.$set(Ne)},i(I){ne||(We(ye.$$.fragment,I),ne=!0)},o(I){He(ye.$$.fragment,I),ne=!1},d(I){I&&h(e),I&&h(O),I&&h(W),I&&h(U),I&&h(R),I&&h(q),I&&h(E),I&&h(C),I&&h(F),I&&h(B),I&&h(Y),I&&h(te),I&&h(oe),I&&h(K),I&&h(ge),I&&h(N),I&&h(x),I&&h(le),I&&h(ae),I&&h(ee),I&&h(_e),I&&h(re),Jt(ye,I),Te=!1,pe(Ae)}}}function ts(t,e,n){let i="GET",o="",{onMessage:l}=e;async function u(){const W=await $n().catch(q=>{throw l(q),q}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Xn.json(JSON.parse(o)):o!==""&&(R.body=Xn.text(o)),W.request(R).then(l).catch(l)}let f="baz",c="qux",p=null,d=!0;async function k(){const W=await $n().catch(U=>{throw l(U),U});n(4,p=await W.request({url:"http://localhost:3003",method:"POST",body:Xn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:zt.Text}))}function _(){i=Di(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function b(){c=this.value,n(3,c)}function O(){d=this.checked,n(5,d)}return t.$$set=W=>{"onMessage"in W&&n(8,l=W.onMessage)},[i,o,f,c,p,d,u,k,l,_,y,g,b,O]}class ns extends Se{constructor(e){super(),Le(this,e,ts,es,Me,{onMessage:8})}}function is(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",a(e,"class","btn"),a(e,"id","notification")},m(o,l){m(o,e,l),n||(i=D(e,"click",os),n=!0)},p:J,i:J,o:J,d(o){o&&h(e),n=!1,i()}}}function os(){new Notification("Notification title",{body:"This is the notification body"})}function ls(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class rs extends Se{constructor(e){super(),Le(this,e,ls,is,Me,{onMessage:0})}}function $o(t,e,n){const i=t.slice();return i[65]=e[n],i}function el(t,e,n){const i=t.slice();return i[68]=e[n],i}function tl(t){let e,n,i,o,l,u,f=Object.keys(t[1]),c=[];for(let p=0;p<f.length;p+=1)c[p]=nl(el(t,f,p));return{c(){e=s("span"),e.textContent="Selected window:",n=v(),i=s("select"),o=s("option"),o.textContent="Choose a window...";for(let p=0;p<c.length;p+=1)c[p].c();a(e,"class","font-700 text-sm"),o.__value="",o.value=o.__value,o.disabled=!0,o.selected=!0,a(i,"class","input"),t[0]===void 0&&At(()=>t[38].call(i))},m(p,d){m(p,e,d),m(p,n,d),m(p,i,d),r(i,o);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Ot(i,t[0]),l||(u=D(i,"change",t[38]),l=!0)},p(p,d){if(d[0]&2){f=Object.keys(p[1]);let k;for(k=0;k<f.length;k+=1){const _=el(p,f,k);c[k]?c[k].p(_,d):(c[k]=nl(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=f.length}d[0]&3&&Ot(i,p[0])},d(p){p&&h(e),p&&h(n),p&&h(i),pt(c,p),l=!1,u()}}}function nl(t){let e,n=t[68]+"",i,o;return{c(){e=s("option"),i=z(n),e.__value=o=t[68],e.value=e.__value},m(l,u){m(l,e,u),r(e,i)},p(l,u){u[0]&2&&n!==(n=l[68]+"")&&Z(i,n),u[0]&2&&o!==(o=l[68])&&(e.__value=o,e.value=e.__value)},d(l){l&&h(e)}}}function il(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P,C,F,B,Y,$,be,te,oe,K,ge,N,x,le,ae,ee,_e,re,ye,ne,Te,Ae,I,V,Ne,Ee,Ce,ce,he,fe,De,nt,me,de,j,ie,X,we,Kt,mt,xt,je,Qt,Ve,Q,Wt,Pe,Pt,it,Rt,Re,vt,_t,bt,ze,Ue,Ie,ot,It,lt,Nt,gt=t[25].width+"",oi,Bi,Zt,Vi,$t=t[25].height+"",li,Gi,Ge,en,Ji,tn,Xi,nn=t[26].width+"",ri,Yi,on,Ki,ln=t[26].height+"",si,xi,yt,Je,rn,Qi,sn,Zi,un=t[25].toLogical(t[22]).width+"",ui,$i,an,eo,cn=t[25].toLogical(t[22]).height+"",ai,to,Xe,fn,no,dn,io,pn=t[26].toLogical(t[22]).width+"",ci,oo,hn,lo,mn=t[26].toLogical(t[22]).height+"",fi,ro,wt,Ye,vn,so,_n,uo,bn=t[23].x+"",di,ao,gn,co,yn=t[23].y+"",pi,fo,Ke,wn,po,kn,ho,Mn=t[24].x+"",hi,mo,Tn,vo,Cn=t[24].y+"",mi,_o,kt,xe,Ln,bo,Sn,go,On=t[23].toLogical(t[22]).x+"",vi,yo,An,wo,En=t[23].toLogical(t[22]).y+"",_i,ko,Qe,Dn,Mo,zn,To,Wn=t[24].toLogical(t[22]).x+"",bi,Co,Pn,Lo,Rn=t[24].toLogical(t[22]).y+"",gi,yi,wi,ki,jt,Mi,rt,In,Mt,So,Oo,Nn,Tt,Ao,Ti,Fe,jn,Eo,qe,Do,Hn,zo,Ze,Wo,Un,Po,$e,Ci,Li,Si,st,ut,et,Ro,Ht,Io,at,tt,No,Ut,Oi,jo,Ct=t[28],Oe=[];for(let w=0;w<Ct.length;w+=1)Oe[w]=ol($o(t,Ct,w));return{c(){e=s("br"),n=v(),i=s("div"),o=s("button"),o.textContent="Center",l=v(),u=s("button"),u.textContent="Minimize",f=v(),c=s("button"),c.textContent="Hide",p=v(),d=s("button"),d.textContent="Change icon",k=v(),_=s("button"),_.textContent="Request attention",y=v(),g=s("br"),b=v(),O=s("div"),W=s("label"),U=z(`Maximized
`),R=s("input"),q=v(),E=s("label"),L=z(`Resizable
`),S=s("input"),P=v(),C=s("label"),F=z(`Has decorations
`),B=s("input"),Y=v(),$=s("label"),be=z(`Always on top
`),te=s("input"),oe=v(),K=s("label"),ge=z(`Fullscreen
`),N=s("input"),x=v(),le=s("br"),ae=v(),ee=s("div"),_e=s("div"),re=s("div"),ye=z(`X
`),ne=s("input"),Te=v(),Ae=s("div"),I=z(`Y
`),V=s("input"),Ne=v(),Ee=s("div"),Ce=s("div"),ce=z(`Width
`),he=s("input"),fe=v(),De=s("div"),nt=z(`Height
`),me=s("input"),de=v(),j=s("div"),ie=s("div"),X=z(`Min width
`),we=s("input"),Kt=v(),mt=s("div"),xt=z(`Min height
`),je=s("input"),Qt=v(),Ve=s("div"),Q=s("div"),Wt=z(`Max width
`),Pe=s("input"),Pt=v(),it=s("div"),Rt=z(`Max height
`),Re=s("input"),vt=v(),_t=s("br"),bt=v(),ze=s("div"),Ue=s("div"),Ie=s("div"),ot=s("div"),ot.textContent="Inner Size",It=v(),lt=s("span"),Nt=z("Width: "),oi=z(gt),Bi=v(),Zt=s("span"),Vi=z("Height: "),li=z($t),Gi=v(),Ge=s("div"),en=s("div"),en.textContent="Outer Size",Ji=v(),tn=s("span"),Xi=z("Width: "),ri=z(nn),Yi=v(),on=s("span"),Ki=z("Height: "),si=z(ln),xi=v(),yt=s("div"),Je=s("div"),rn=s("div"),rn.textContent="Inner Logical Size",Qi=v(),sn=s("span"),Zi=z("Width: "),ui=z(un),$i=v(),an=s("span"),eo=z("Height: "),ai=z(cn),to=v(),Xe=s("div"),fn=s("div"),fn.textContent="Outer Logical Size",no=v(),dn=s("span"),io=z("Width: "),ci=z(pn),oo=v(),hn=s("span"),lo=z("Height: "),fi=z(mn),ro=v(),wt=s("div"),Ye=s("div"),vn=s("div"),vn.textContent="Inner Position",so=v(),_n=s("span"),uo=z("x: "),di=z(bn),ao=v(),gn=s("span"),co=z("y: "),pi=z(yn),fo=v(),Ke=s("div"),wn=s("div"),wn.textContent="Outer Position",po=v(),kn=s("span"),ho=z("x: "),hi=z(Mn),mo=v(),Tn=s("span"),vo=z("y: "),mi=z(Cn),_o=v(),kt=s("div"),xe=s("div"),Ln=s("div"),Ln.textContent="Inner Logical Position",bo=v(),Sn=s("span"),go=z("x: "),vi=z(On),yo=v(),An=s("span"),wo=z("y: "),_i=z(En),ko=v(),Qe=s("div"),Dn=s("div"),Dn.textContent="Outer Logical Position",Mo=v(),zn=s("span"),To=z("x: "),bi=z(Wn),Co=v(),Pn=s("span"),Lo=z("y: "),gi=z(Rn),yi=v(),wi=s("br"),ki=v(),jt=s("h4"),jt.textContent="Cursor",Mi=v(),rt=s("div"),In=s("label"),Mt=s("input"),So=z(`
Grab`),Oo=v(),Nn=s("label"),Tt=s("input"),Ao=z(`
Visible`),Ti=v(),Fe=s("div"),jn=s("label"),Eo=z(`Icon
`),qe=s("select");for(let w=0;w<Oe.length;w+=1)Oe[w].c();Do=v(),Hn=s("label"),zo=z(`X position
`),Ze=s("input"),Wo=v(),Un=s("label"),Po=z(`Y position
`),$e=s("input"),Ci=v(),Li=s("br"),Si=v(),st=s("div"),ut=s("form"),et=s("input"),Ro=v(),Ht=s("button"),Ht.textContent="Set title",Io=v(),at=s("form"),tt=s("input"),No=v(),Ut=s("button"),Ut.textContent="Open URL",a(o,"class","btn"),a(o,"title","Unminimizes after 2 seconds"),a(u,"class","btn"),a(u,"title","Unminimizes after 2 seconds"),a(c,"class","btn"),a(c,"title","Visible again after 2 seconds"),a(d,"class","btn"),a(_,"class","btn"),a(_,"title","Minimizes the window, requests attention for 3s and then resets it"),a(i,"class","flex flex-wrap gap-2"),a(R,"type","checkbox"),a(S,"type","checkbox"),a(B,"type","checkbox"),a(te,"type","checkbox"),a(N,"type","checkbox"),a(O,"class","flex flex-wrap gap-2"),a(ne,"class","input"),a(ne,"type","number"),a(ne,"min","0"),a(V,"class","input"),a(V,"type","number"),a(V,"min","0"),a(_e,"class","flex children:grow flex-col"),a(he,"class","input"),a(he,"type","number"),a(he,"min","400"),a(me,"class","input"),a(me,"type","number"),a(me,"min","400"),a(Ee,"class","flex children:grow flex-col"),a(we,"class","input"),a(we,"type","number"),a(je,"class","input"),a(je,"type","number"),a(j,"class","flex children:grow flex-col"),a(Pe,"class","input"),a(Pe,"type","number"),a(Pe,"min","800"),a(Re,"class","input"),a(Re,"type","number"),a(Re,"min","400"),a(Ve,"class","flex children:grow flex-col"),a(ee,"class","flex flex-row gap-2 flex-wrap"),a(ot,"class","text-accent dark:text-darkAccent font-700"),a(Ie,"class","grow"),a(en,"class","text-accent dark:text-darkAccent font-700"),a(Ge,"class","grow"),a(Ue,"class","flex"),a(rn,"class","text-accent dark:text-darkAccent font-700"),a(Je,"class","grow"),a(fn,"class","text-accent dark:text-darkAccent font-700"),a(Xe,"class","grow"),a(yt,"class","flex"),a(vn,"class","text-accent dark:text-darkAccent font-700"),a(Ye,"class","grow"),a(wn,"class","text-accent dark:text-darkAccent font-700"),a(Ke,"class","grow"),a(wt,"class","flex"),a(Ln,"class","text-accent dark:text-darkAccent font-700"),a(xe,"class","grow"),a(Dn,"class","text-accent dark:text-darkAccent font-700"),a(Qe,"class","grow"),a(kt,"class","flex"),a(jt,"class","mb-2"),a(Mt,"type","checkbox"),a(Tt,"type","checkbox"),a(rt,"class","flex gap-2"),a(qe,"class","input"),t[19]===void 0&&At(()=>t[55].call(qe)),a(Ze,"class","input"),a(Ze,"type","number"),a($e,"class","input"),a($e,"type","number"),a(Fe,"class","flex gap-2"),a(et,"class","input grow"),a(et,"id","title"),a(Ht,"class","btn"),a(Ht,"type","submit"),a(ut,"class","flex gap-1"),a(tt,"class","input grow"),a(tt,"id","url"),a(Ut,"class","btn"),a(Ut,"id","open-url"),a(at,"class","flex gap-1"),a(st,"class","flex flex-col gap-1")},m(w,H){m(w,e,H),m(w,n,H),m(w,i,H),r(i,o),r(i,l),r(i,u),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,_),m(w,y,H),m(w,g,H),m(w,b,H),m(w,O,H),r(O,W),r(W,U),r(W,R),R.checked=t[3],r(O,q),r(O,E),r(E,L),r(E,S),S.checked=t[2],r(O,P),r(O,C),r(C,F),r(C,B),B.checked=t[4],r(O,Y),r(O,$),r($,be),r($,te),te.checked=t[5],r(O,oe),r(O,K),r(K,ge),r(K,N),N.checked=t[6],m(w,x,H),m(w,le,H),m(w,ae,H),m(w,ee,H),r(ee,_e),r(_e,re),r(re,ye),r(re,ne),G(ne,t[13]),r(_e,Te),r(_e,Ae),r(Ae,I),r(Ae,V),G(V,t[14]),r(ee,Ne),r(ee,Ee),r(Ee,Ce),r(Ce,ce),r(Ce,he),G(he,t[7]),r(Ee,fe),r(Ee,De),r(De,nt),r(De,me),G(me,t[8]),r(ee,de),r(ee,j),r(j,ie),r(ie,X),r(ie,we),G(we,t[9]),r(j,Kt),r(j,mt),r(mt,xt),r(mt,je),G(je,t[10]),r(ee,Qt),r(ee,Ve),r(Ve,Q),r(Q,Wt),r(Q,Pe),G(Pe,t[11]),r(Ve,Pt),r(Ve,it),r(it,Rt),r(it,Re),G(Re,t[12]),m(w,vt,H),m(w,_t,H),m(w,bt,H),m(w,ze,H),r(ze,Ue),r(Ue,Ie),r(Ie,ot),r(Ie,It),r(Ie,lt),r(lt,Nt),r(lt,oi),r(Ie,Bi),r(Ie,Zt),r(Zt,Vi),r(Zt,li),r(Ue,Gi),r(Ue,Ge),r(Ge,en),r(Ge,Ji),r(Ge,tn),r(tn,Xi),r(tn,ri),r(Ge,Yi),r(Ge,on),r(on,Ki),r(on,si),r(ze,xi),r(ze,yt),r(yt,Je),r(Je,rn),r(Je,Qi),r(Je,sn),r(sn,Zi),r(sn,ui),r(Je,$i),r(Je,an),r(an,eo),r(an,ai),r(yt,to),r(yt,Xe),r(Xe,fn),r(Xe,no),r(Xe,dn),r(dn,io),r(dn,ci),r(Xe,oo),r(Xe,hn),r(hn,lo),r(hn,fi),r(ze,ro),r(ze,wt),r(wt,Ye),r(Ye,vn),r(Ye,so),r(Ye,_n),r(_n,uo),r(_n,di),r(Ye,ao),r(Ye,gn),r(gn,co),r(gn,pi),r(wt,fo),r(wt,Ke),r(Ke,wn),r(Ke,po),r(Ke,kn),r(kn,ho),r(kn,hi),r(Ke,mo),r(Ke,Tn),r(Tn,vo),r(Tn,mi),r(ze,_o),r(ze,kt),r(kt,xe),r(xe,Ln),r(xe,bo),r(xe,Sn),r(Sn,go),r(Sn,vi),r(xe,yo),r(xe,An),r(An,wo),r(An,_i),r(kt,ko),r(kt,Qe),r(Qe,Dn),r(Qe,Mo),r(Qe,zn),r(zn,To),r(zn,bi),r(Qe,Co),r(Qe,Pn),r(Pn,Lo),r(Pn,gi),m(w,yi,H),m(w,wi,H),m(w,ki,H),m(w,jt,H),m(w,Mi,H),m(w,rt,H),r(rt,In),r(In,Mt),Mt.checked=t[15],r(In,So),r(rt,Oo),r(rt,Nn),r(Nn,Tt),Tt.checked=t[16],r(Nn,Ao),m(w,Ti,H),m(w,Fe,H),r(Fe,jn),r(jn,Eo),r(jn,qe);for(let ke=0;ke<Oe.length;ke+=1)Oe[ke].m(qe,null);Ot(qe,t[19]),r(Fe,Do),r(Fe,Hn),r(Hn,zo),r(Hn,Ze),G(Ze,t[17]),r(Fe,Wo),r(Fe,Un),r(Un,Po),r(Un,$e),G($e,t[18]),m(w,Ci,H),m(w,Li,H),m(w,Si,H),m(w,st,H),r(st,ut),r(ut,et),G(et,t[27]),r(ut,Ro),r(ut,Ht),r(st,Io),r(st,at),r(at,tt),G(tt,t[21]),r(at,No),r(at,Ut),Oi||(jo=[D(o,"click",t[39]),D(u,"click",t[32]),D(c,"click",t[31]),D(d,"click",t[33]),D(_,"click",t[35]),D(R,"change",t[40]),D(S,"change",t[41]),D(B,"change",t[42]),D(te,"change",t[43]),D(N,"change",t[44]),D(ne,"input",t[45]),D(V,"input",t[46]),D(he,"input",t[47]),D(me,"input",t[48]),D(we,"input",t[49]),D(je,"input",t[50]),D(Pe,"input",t[51]),D(Re,"input",t[52]),D(Mt,"change",t[53]),D(Tt,"change",t[54]),D(qe,"change",t[55]),D(Ze,"input",t[56]),D($e,"input",t[57]),D(et,"input",t[58]),D(ut,"submit",Yn(t[30])),D(tt,"input",t[59]),D(at,"submit",Yn(t[29]))],Oi=!0)},p(w,H){if(H[0]&8&&(R.checked=w[3]),H[0]&4&&(S.checked=w[2]),H[0]&16&&(B.checked=w[4]),H[0]&32&&(te.checked=w[5]),H[0]&64&&(N.checked=w[6]),H[0]&8192&&se(ne.value)!==w[13]&&G(ne,w[13]),H[0]&16384&&se(V.value)!==w[14]&&G(V,w[14]),H[0]&128&&se(he.value)!==w[7]&&G(he,w[7]),H[0]&256&&se(me.value)!==w[8]&&G(me,w[8]),H[0]&512&&se(we.value)!==w[9]&&G(we,w[9]),H[0]&1024&&se(je.value)!==w[10]&&G(je,w[10]),H[0]&2048&&se(Pe.value)!==w[11]&&G(Pe,w[11]),H[0]&4096&&se(Re.value)!==w[12]&&G(Re,w[12]),H[0]&33554432&&gt!==(gt=w[25].width+"")&&Z(oi,gt),H[0]&33554432&&$t!==($t=w[25].height+"")&&Z(li,$t),H[0]&67108864&&nn!==(nn=w[26].width+"")&&Z(ri,nn),H[0]&67108864&&ln!==(ln=w[26].height+"")&&Z(si,ln),H[0]&37748736&&un!==(un=w[25].toLogical(w[22]).width+"")&&Z(ui,un),H[0]&37748736&&cn!==(cn=w[25].toLogical(w[22]).height+"")&&Z(ai,cn),H[0]&71303168&&pn!==(pn=w[26].toLogical(w[22]).width+"")&&Z(ci,pn),H[0]&71303168&&mn!==(mn=w[26].toLogical(w[22]).height+"")&&Z(fi,mn),H[0]&8388608&&bn!==(bn=w[23].x+"")&&Z(di,bn),H[0]&8388608&&yn!==(yn=w[23].y+"")&&Z(pi,yn),H[0]&16777216&&Mn!==(Mn=w[24].x+"")&&Z(hi,Mn),H[0]&16777216&&Cn!==(Cn=w[24].y+"")&&Z(mi,Cn),H[0]&12582912&&On!==(On=w[23].toLogical(w[22]).x+"")&&Z(vi,On),H[0]&12582912&&En!==(En=w[23].toLogical(w[22]).y+"")&&Z(_i,En),H[0]&20971520&&Wn!==(Wn=w[24].toLogical(w[22]).x+"")&&Z(bi,Wn),H[0]&20971520&&Rn!==(Rn=w[24].toLogical(w[22]).y+"")&&Z(gi,Rn),H[0]&32768&&(Mt.checked=w[15]),H[0]&65536&&(Tt.checked=w[16]),H[0]&268435456){Ct=w[28];let ke;for(ke=0;ke<Ct.length;ke+=1){const Ho=$o(w,Ct,ke);Oe[ke]?Oe[ke].p(Ho,H):(Oe[ke]=ol(Ho),Oe[ke].c(),Oe[ke].m(qe,null))}for(;ke<Oe.length;ke+=1)Oe[ke].d(1);Oe.length=Ct.length}H[0]&268959744&&Ot(qe,w[19]),H[0]&131072&&se(Ze.value)!==w[17]&&G(Ze,w[17]),H[0]&262144&&se($e.value)!==w[18]&&G($e,w[18]),H[0]&134217728&&et.value!==w[27]&&G(et,w[27]),H[0]&2097152&&tt.value!==w[21]&&G(tt,w[21])},d(w){w&&h(e),w&&h(n),w&&h(i),w&&h(y),w&&h(g),w&&h(b),w&&h(O),w&&h(x),w&&h(le),w&&h(ae),w&&h(ee),w&&h(vt),w&&h(_t),w&&h(bt),w&&h(ze),w&&h(yi),w&&h(wi),w&&h(ki),w&&h(jt),w&&h(Mi),w&&h(rt),w&&h(Ti),w&&h(Fe),pt(Oe,w),w&&h(Ci),w&&h(Li),w&&h(Si),w&&h(st),Oi=!1,pe(jo)}}}function ol(t){let e,n=t[65]+"",i,o;return{c(){e=s("option"),i=z(n),e.__value=o=t[65],e.value=e.__value},m(l,u){m(l,e,u),r(e,i)},p:J,d(l){l&&h(e)}}}function ss(t){let e,n,i,o,l,u,f,c,p=Object.keys(t[1]).length>=1,d,k,_,y=p&&tl(t),g=t[1][t[0]]&&il(t);return{c(){e=s("div"),n=s("div"),i=s("input"),o=v(),l=s("button"),l.textContent="New window",u=v(),f=s("br"),c=v(),y&&y.c(),d=v(),g&&g.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(l,"class","btn"),a(n,"class","flex gap-1"),a(e,"class","flex flex-col children:grow gap-2")},m(b,O){m(b,e,O),r(e,n),r(n,i),G(i,t[20]),r(n,o),r(n,l),r(e,u),r(e,f),r(e,c),y&&y.m(e,null),r(e,d),g&&g.m(e,null),k||(_=[D(i,"input",t[37]),D(l,"click",t[34])],k=!0)},p(b,O){O[0]&1048576&&i.value!==b[20]&&G(i,b[20]),O[0]&2&&(p=Object.keys(b[1]).length>=1),p?y?y.p(b,O):(y=tl(b),y.c(),y.m(e,d)):y&&(y.d(1),y=null),b[1][b[0]]?g?g.p(b,O):(g=il(b),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},i:J,o:J,d(b){b&&h(e),y&&y.d(),g&&g.d(),k=!1,pe(_)}}}function us(t,e,n){let i=Be.label;const o={[Be.label]:Be},l=["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:u}=e,f,c="https://tauri.app",p=!0,d=!1,k=!0,_=!1,y=!1,g=null,b=null,O=null,W=null,U=null,R=null,q=null,E=null,L=1,S=new dt(q,E),P=new dt(q,E),C=new St(g,b),F=new St(g,b),B,Y,$=!1,be=!0,te=null,oe=null,K="default",ge="Awesome Tauri Example!";function N(){Ni(c)}function x(){o[i].setTitle(ge)}function le(){o[i].hide(),setTimeout(o[i].show,2e3)}function ae(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)}function ee(){Ui({multiple:!1}).then(Q=>{typeof Q=="string"&&o[i].setIcon(Q)})}function _e(){if(!f)return;const Q=new Et(f);n(1,o[f]=Q,o),Q.once("tauri://error",function(){u("Error creating new webview")})}function re(){o[i].innerSize().then(Q=>{n(25,C=Q),n(7,g=C.width),n(8,b=C.height)}),o[i].outerSize().then(Q=>{n(26,F=Q)})}function ye(){o[i].innerPosition().then(Q=>{n(23,S=Q)}),o[i].outerPosition().then(Q=>{n(24,P=Q),n(13,q=P.x),n(14,E=P.y)})}async function ne(Q){!Q||(B&&B(),Y&&Y(),Y=await Q.listen("tauri://move",ye),B=await Q.listen("tauri://resize",re))}async function Te(){await o[i].minimize(),await o[i].requestUserAttention(Xt.Critical),await new Promise(Q=>setTimeout(Q,3e3)),await o[i].requestUserAttention(null)}function Ae(){f=this.value,n(20,f)}function I(){i=Di(this),n(0,i),n(1,o)}const V=()=>o[i].center();function Ne(){d=this.checked,n(3,d)}function Ee(){p=this.checked,n(2,p)}function Ce(){k=this.checked,n(4,k)}function ce(){_=this.checked,n(5,_)}function he(){y=this.checked,n(6,y)}function fe(){q=se(this.value),n(13,q)}function De(){E=se(this.value),n(14,E)}function nt(){g=se(this.value),n(7,g)}function me(){b=se(this.value),n(8,b)}function de(){O=se(this.value),n(9,O)}function j(){W=se(this.value),n(10,W)}function ie(){U=se(this.value),n(11,U)}function X(){R=se(this.value),n(12,R)}function we(){$=this.checked,n(15,$)}function Kt(){be=this.checked,n(16,be)}function mt(){K=Di(this),n(19,K),n(28,l)}function xt(){te=se(this.value),n(17,te)}function je(){oe=se(this.value),n(18,oe)}function Qt(){ge=this.value,n(27,ge)}function Ve(){c=this.value,n(21,c)}return t.$$set=Q=>{"onMessage"in Q&&n(36,u=Q.onMessage)},t.$$.update=()=>{var Q,Wt,Pe,Pt,it,Rt,Re,vt,_t,bt,ze,Ue,Ie,ot,It,lt,Nt;t.$$.dirty[0]&3&&(o[i],ye(),re()),t.$$.dirty[0]&7&&((Q=o[i])==null||Q.setResizable(p)),t.$$.dirty[0]&11&&(d?(Wt=o[i])==null||Wt.maximize():(Pe=o[i])==null||Pe.unmaximize()),t.$$.dirty[0]&19&&((Pt=o[i])==null||Pt.setDecorations(k)),t.$$.dirty[0]&35&&((it=o[i])==null||it.setAlwaysOnTop(_)),t.$$.dirty[0]&67&&((Rt=o[i])==null||Rt.setFullscreen(y)),t.$$.dirty[0]&387&&g&&b&&((Re=o[i])==null||Re.setSize(new St(g,b))),t.$$.dirty[0]&1539&&(O&&W?(vt=o[i])==null||vt.setMinSize(new Zn(O,W)):(_t=o[i])==null||_t.setMinSize(null)),t.$$.dirty[0]&6147&&(U>800&&R>400?(bt=o[i])==null||bt.setMaxSize(new Zn(U,R)):(ze=o[i])==null||ze.setMaxSize(null)),t.$$.dirty[0]&24579&&q!==null&&E!==null&&((Ue=o[i])==null||Ue.setPosition(new dt(q,E))),t.$$.dirty[0]&3&&((Ie=o[i])==null||Ie.scaleFactor().then(gt=>n(22,L=gt))),t.$$.dirty[0]&3&&ne(o[i]),t.$$.dirty[0]&32771&&((ot=o[i])==null||ot.setCursorGrab($)),t.$$.dirty[0]&65539&&((It=o[i])==null||It.setCursorVisible(be)),t.$$.dirty[0]&524291&&((lt=o[i])==null||lt.setCursorIcon(K)),t.$$.dirty[0]&393219&&te!==null&&oe!==null&&((Nt=o[i])==null||Nt.setCursorPosition(new dt(te,oe)))},[i,o,p,d,k,_,y,g,b,O,W,U,R,q,E,$,be,te,oe,K,f,c,L,S,P,C,F,ge,l,N,x,le,ae,ee,_e,Te,u,Ae,I,V,Ne,Ee,Ce,ce,he,fe,De,nt,me,de,j,ie,X,we,Kt,mt,xt,je,Qt,Ve]}class as extends Se{constructor(e){super(),Le(this,e,us,ss,Me,{onMessage:36},null,[-1,-1,-1])}}function Jl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:ht(e)}})]})})}function cs(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:ht(e)}})]})})}function fs(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]})})}function Xl(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]})})}function Yl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:Jl,registerAll:cs,isRegistered:fs,unregister:Xl,unregisterAll:Yl});function ll(t,e,n){const i=t.slice();return i[9]=e[n],i}function rl(t){let e,n=t[9]+"",i,o,l,u,f;function c(){return t[8](t[9])}return{c(){e=s("div"),i=z(n),o=v(),l=s("button"),l.textContent="Unregister",a(l,"class","btn"),a(l,"type","button"),a(e,"class","flex justify-between")},m(p,d){m(p,e,d),r(e,i),r(e,o),r(e,l),u||(f=D(l,"click",c),u=!0)},p(p,d){t=p,d&2&&n!==(n=t[9]+"")&&Z(i,n)},d(p){p&&h(e),u=!1,f()}}}function sl(t){let e,n,i,o,l;return{c(){e=s("br"),n=v(),i=s("button"),i.textContent="Unregister all",a(i,"class","btn"),a(i,"type","button")},m(u,f){m(u,e,f),m(u,n,f),m(u,i,f),o||(l=D(i,"click",t[5]),o=!0)},p:J,d(u){u&&h(e),u&&h(n),u&&h(i),o=!1,l()}}}function ds(t){let e,n,i,o,l,u,f,c,p,d,k,_=t[1],y=[];for(let b=0;b<_.length;b+=1)y[b]=rl(ll(t,_,b));let g=t[1].length>1&&sl(t);return{c(){e=s("div"),n=s("input"),i=v(),o=s("button"),o.textContent="Register",l=v(),u=s("br"),f=v(),c=s("div");for(let b=0;b<y.length;b+=1)y[b].c();p=v(),g&&g.c(),a(n,"class","input grow"),a(n,"placeholder","Type a shortcut with '+' as separator..."),a(o,"class","btn"),a(o,"type","button"),a(e,"class","flex gap-1"),a(c,"class","flex flex-col gap-1")},m(b,O){m(b,e,O),r(e,n),G(n,t[0]),r(e,i),r(e,o),m(b,l,O),m(b,u,O),m(b,f,O),m(b,c,O);for(let W=0;W<y.length;W+=1)y[W].m(c,null);r(c,p),g&&g.m(c,null),d||(k=[D(n,"input",t[7]),D(o,"click",t[3])],d=!0)},p(b,[O]){if(O&1&&n.value!==b[0]&&G(n,b[0]),O&18){_=b[1];let W;for(W=0;W<_.length;W+=1){const U=ll(b,_,W);y[W]?y[W].p(U,O):(y[W]=rl(U),y[W].c(),y[W].m(c,p))}for(;W<y.length;W+=1)y[W].d(1);y.length=_.length}b[1].length>1?g?g.p(b,O):(g=sl(b),g.c(),g.m(c,null)):g&&(g.d(1),g=null)},i:J,o:J,d(b){b&&h(e),b&&h(l),b&&h(u),b&&h(f),b&&h(c),pt(y,b),g&&g.d(),d=!1,pe(k)}}}function ps(t,e,n){let i,{onMessage:o}=e;const l=wl([]);bl(t,l,_=>n(1,i=_));let u="CmdOrControl+X";function f(){const _=u;Jl(_,()=>{o(`Shortcut ${_} triggered`)}).then(()=>{l.update(y=>[...y,_]),o(`Shortcut ${_} registered successfully`)}).catch(o)}function c(_){const y=_;Xl(y).then(()=>{l.update(g=>g.filter(b=>b!==y)),o(`Shortcut ${y} unregistered`)}).catch(o)}function p(){Yl().then(()=>{l.update(()=>[]),o("Unregistered all shortcuts")}).catch(o)}function d(){u=this.value,n(0,u)}const k=_=>c(_);return t.$$set=_=>{"onMessage"in _&&n(6,o=_.onMessage)},[u,i,l,f,c,p,o,d,k]}class hs extends Se{constructor(e){super(),Le(this,e,ps,ds,Me,{onMessage:6})}}function ul(t){let e,n,i,o,l,u,f;return{c(){e=s("br"),n=v(),i=s("input"),o=v(),l=s("button"),l.textContent="Write",a(i,"class","input"),a(i,"placeholder","write to stdin"),a(l,"class","btn")},m(c,p){m(c,e,p),m(c,n,p),m(c,i,p),G(i,t[4]),m(c,o,p),m(c,l,p),u||(f=[D(i,"input",t[14]),D(l,"click",t[8])],u=!0)},p(c,p){p&16&&i.value!==c[4]&&G(i,c[4])},d(c){c&&h(e),c&&h(n),c&&h(i),c&&h(o),c&&h(l),u=!1,pe(f)}}}function ms(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P,C=t[5]&&ul(t);return{c(){e=s("div"),n=s("div"),i=z(`Script:
`),o=s("input"),l=v(),u=s("div"),f=z(`Encoding:
`),c=s("input"),p=v(),d=s("div"),k=z(`Working directory:
`),_=s("input"),y=v(),g=s("div"),b=z(`Arguments:
`),O=s("input"),W=v(),U=s("div"),R=s("button"),R.textContent="Run",q=v(),E=s("button"),E.textContent="Kill",L=v(),C&&C.c(),a(o,"class","grow input"),a(n,"class","flex items-center gap-1"),a(c,"class","grow input"),a(u,"class","flex items-center gap-1"),a(_,"class","grow input"),a(_,"placeholder","Working directory"),a(d,"class","flex items-center gap-1"),a(O,"class","grow input"),a(O,"placeholder","Environment variables"),a(g,"class","flex items-center gap-1"),a(R,"class","btn"),a(E,"class","btn"),a(U,"class","flex children:grow gap-1"),a(e,"class","flex flex-col childre:grow gap-1")},m(F,B){m(F,e,B),r(e,n),r(n,i),r(n,o),G(o,t[0]),r(e,l),r(e,u),r(u,f),r(u,c),G(c,t[3]),r(e,p),r(e,d),r(d,k),r(d,_),G(_,t[1]),r(e,y),r(e,g),r(g,b),r(g,O),G(O,t[2]),r(e,W),r(e,U),r(U,R),r(U,q),r(U,E),r(e,L),C&&C.m(e,null),S||(P=[D(o,"input",t[10]),D(c,"input",t[11]),D(_,"input",t[12]),D(O,"input",t[13]),D(R,"click",t[6]),D(E,"click",t[7])],S=!0)},p(F,[B]){B&1&&o.value!==F[0]&&G(o,F[0]),B&8&&c.value!==F[3]&&G(c,F[3]),B&2&&_.value!==F[1]&&G(_,F[1]),B&4&&O.value!==F[2]&&G(O,F[2]),F[5]?C?C.p(F,B):(C=ul(F),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i:J,o:J,d(F){F&&h(e),C&&C.d(),S=!1,pe(P)}}}function vs(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:u}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k="",_;function y(){return p.split(" ").reduce((L,S)=>{let[P,C]=S.split("=");return{...L,[P]:C}},{})}function g(){n(5,_=null);const L=new Tl(o,[...l,f],{cwd:c||null,env:y(),encoding:d});L.on("close",S=>{u(`command finished with code ${S.code} and signal ${S.signal}`),n(5,_=null)}),L.on("error",S=>u(`command error: "${S}"`)),L.stdout.on("data",S=>u(`command stdout: "${S}"`)),L.stderr.on("data",S=>u(`command stderr: "${S}"`)),L.spawn().then(S=>{n(5,_=S)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function O(){_.write(k).catch(u)}function W(){f=this.value,n(0,f)}function U(){d=this.value,n(3,d)}function R(){c=this.value,n(1,c)}function q(){p=this.value,n(2,p)}function E(){k=this.value,n(4,k)}return t.$$set=L=>{"onMessage"in L&&n(9,u=L.onMessage)},[f,c,p,d,k,_,g,b,O,u,W,U,R,q,E]}class _s extends Se{constructor(e){super(),Le(this,e,vs,ms,Me,{onMessage:9})}}function qi(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,Yt(ve.STATUS_UPDATE,function(n){t(n==null?void 0:n.payload)})]})})}function Kl(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return T(this,function(n){return[2,new Promise(function(i,o){qi(function(l){return l.error?(t(),o(l.error)):l.status==="DONE"?(t(),i()):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),ii(ve.INSTALL_UPDATE).catch(function(l){throw t(),l})})]})})}function xl(){return M(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return T(this,function(n){return[2,new Promise(function(i,o){Ol(ve.UPDATE_AVAILABLE,function(l){var u;u=l==null?void 0:l.payload,t(),i({manifest:u,shouldUpdate:!0})}).catch(function(l){throw t(),l}),qi(function(l){return l.error?(t(),o(l.error)):l.status==="UPTODATE"?(t(),i({shouldUpdate:!1})):void 0}).then(function(l){e=l}).catch(function(l){throw t(),l}),ii(ve.CHECK_UPDATE).catch(function(l){throw t(),l})})]})})}Object.freeze({__proto__:null,onUpdaterEvent:qi,installUpdate:Kl,checkUpdate:xl});function bs(t){let e;return{c(){e=s("button"),e.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',a(e,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,e,i)},p:J,d(n){n&&h(e)}}}function gs(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",a(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[4]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function ys(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",a(e,"class","btn")},m(o,l){m(o,e,l),n||(i=D(e,"click",t[3]),n=!0)},p:J,d(o){o&&h(e),n=!1,i()}}}function ws(t){let e;function n(l,u){return!l[0]&&!l[2]?ys:!l[1]&&l[2]?gs:bs}let i=n(t),o=i(t);return{c(){e=s("div"),o.c(),a(e,"class","flex children:grow children:h10")},m(l,u){m(l,e,u),o.m(e,null)},p(l,[u]){i===(i=n(l))&&o?o.p(l,u):(o.d(1),o=i(l),o&&(o.c(),o.m(e,null)))},i:J,o:J,d(l){l&&h(e),o.d()}}}function ks(t,e,n){let{onMessage:i}=e,o;ct(async()=>{o=await Yt("tauri://update-status",i)}),Ri(()=>{o&&o()});let l,u,f;async function c(){n(0,l=!0);try{const{shouldUpdate:d,manifest:k}=await xl();i(`Should update: ${d}`),i(k),n(2,f=d)}catch(d){i(d)}finally{n(0,l=!1)}}async function p(){n(1,u=!0);try{await Kl(),i("Installation complete, restart required."),await Hi()}catch(d){i(d)}finally{n(1,u=!1)}}return t.$$set=d=>{"onMessage"in d&&n(5,i=d.onMessage)},[l,u,f,c,p,i]}class Ms extends Se{constructor(e){super(),Le(this,e,ks,ws,Me,{onMessage:5})}}function Ql(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,A({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})]})})}function Zl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})]})})}Object.freeze({__proto__:null,writeText:Ql,readText:Zl});function Ts(t){let e,n,i,o,l,u,f,c;return{c(){e=s("div"),n=s("input"),i=v(),o=s("button"),o.textContent="Write",l=v(),u=s("button"),u.textContent="Read",a(n,"class","grow input"),a(n,"placeholder","Text to write to the clipboard"),a(o,"class","btn"),a(o,"type","button"),a(u,"class","btn"),a(u,"type","button"),a(e,"class","flex gap-1")},m(p,d){m(p,e,d),r(e,n),G(n,t[0]),r(e,i),r(e,o),r(e,l),r(e,u),f||(c=[D(n,"input",t[4]),D(o,"click",t[1]),D(u,"click",t[2])],f=!0)},p(p,[d]){d&1&&n.value!==p[0]&&G(n,p[0])},i:J,o:J,d(p){p&&h(e),f=!1,pe(c)}}}function Cs(t,e,n){let{onMessage:i}=e,o="clipboard message";function l(){Ql(o).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Zl().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function f(){o=this.value,n(0,o)}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,l,u,i,f]}class Ls extends Se{constructor(e){super(),Le(this,e,Cs,Ts,Me,{onMessage:3})}}function Ss(t){let e;return{c(){e=s("div"),e.innerHTML=`<div class="note-red grow">Not available for Linux</div>
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,a(e,"class","flex flex-col gap-2")},m(n,i){m(n,e,i)},p:J,i:J,o:J,d(n){n&&h(e)}}}function Os(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};function l(f){const c=document.querySelector("video"),p=f.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${p[0].label}`),window.stream=f,c.srcObject=f}function u(f){if(f.name==="ConstraintNotSatisfiedError"){const c=o.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${f.name}`,f)}return ct(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);l(f)}catch(f){u(f)}}),Ri(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class As extends Se{constructor(e){super(),Le(this,e,Os,Ss,Me,{onMessage:0})}}function al(t,e,n){const i=t.slice();return i[32]=e[n],i}function cl(t,e,n){const i=t.slice();return i[35]=e[n],i}function fl(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b;function O(L,S){return L[3]?Ds:Es}let W=O(t),U=W(t);function R(L,S){return L[2]?Ws:zs}let q=R(t),E=q(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=v(),o=s("span"),l=s("span"),U.c(),f=v(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=v(),d=s("span"),E.c(),_=v(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',a(n,"class","lt-sm:pl-10 text-darkPrimaryText"),a(l,"title",u=t[3]?"Switch to Light mode":"Switch to Dark mode"),a(l,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(c,"title","Minimize"),a(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(d,"title",k=t[2]?"Restore":"Maximize"),a(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(y,"title","Close"),a(y,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),a(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),a(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),a(e,"data-tauri-drag-region","")},m(L,S){m(L,e,S),r(e,n),r(e,i),r(e,o),r(o,l),U.m(l,null),r(o,f),r(o,c),r(o,p),r(o,d),E.m(d,null),r(o,_),r(o,y),g||(b=[D(l,"click",t[12]),D(c,"click",t[9]),D(d,"click",t[10]),D(y,"click",t[11])],g=!0)},p(L,S){W!==(W=O(L))&&(U.d(1),U=W(L),U&&(U.c(),U.m(l,null))),S[0]&8&&u!==(u=L[3]?"Switch to Light mode":"Switch to Dark mode")&&a(l,"title",u),q!==(q=R(L))&&(E.d(1),E=q(L),E&&(E.c(),E.m(d,null))),S[0]&4&&k!==(k=L[2]?"Restore":"Maximize")&&a(d,"title",k)},d(L){L&&h(e),U.d(),E.d(),g=!1,pe(b)}}}function Es(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-moon")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Ds(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-sun")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function zs(t){let e;return{c(){e=s("div"),a(e,"class","i-codicon-chrome-maximize")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Ws(t){let e;return{c(){e=s("div"),a(e,"class","i-codicon-chrome-restore")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Ps(t){let e;return{c(){e=s("span"),a(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function Rs(t){let e;return{c(){e=s("span"),a(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,e,i)},d(n){n&&h(e)}}}function dl(t){let e,n,i,o,l,u,f,c,p;function d(y,g){return y[3]?Ns:Is}let k=d(t),_=k(t);return{c(){e=s("a"),_.c(),n=v(),i=s("br"),o=v(),l=s("div"),u=v(),f=s("br"),a(e,"href","##"),a(e,"class","nv justify-between h-8"),a(l,"class","bg-white/5 h-2px")},m(y,g){m(y,e,g),_.m(e,null),m(y,n,g),m(y,i,g),m(y,o,g),m(y,l,g),m(y,u,g),m(y,f,g),c||(p=D(e,"click",t[12]),c=!0)},p(y,g){k!==(k=d(y))&&(_.d(1),_=k(y),_&&(_.c(),_.m(e,null)))},d(y){y&&h(e),_.d(),y&&h(n),y&&h(i),y&&h(o),y&&h(l),y&&h(u),y&&h(f),c=!1,p()}}}function Is(t){let e,n;return{c(){e=z(`Switch to Dark mode
`),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function Ns(t){let e,n;return{c(){e=z(`Switch to Light mode
`),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){m(i,e,o),m(i,n,o)},d(i){i&&h(e),i&&h(n)}}}function js(t){let e,n,i,o,l,u=t[35].label+"",f,c,p,d;function k(){return t[20](t[35])}return{c(){e=s("a"),n=s("div"),o=v(),l=s("p"),f=z(u),a(n,"class",i=t[35].icon+" mr-2"),a(e,"href","##"),a(e,"class",c="nv "+(t[1]===t[35]?"nv_selected":""))},m(_,y){m(_,e,y),r(e,n),r(e,o),r(e,l),r(l,f),p||(d=D(e,"click",k),p=!0)},p(_,y){t=_,y[0]&2&&c!==(c="nv "+(t[1]===t[35]?"nv_selected":""))&&a(e,"class",c)},d(_){_&&h(e),p=!1,d()}}}function pl(t){let e,n=t[35]&&js(t);return{c(){n&&n.c(),e=ei()},m(i,o){n&&n.m(i,o),m(i,e,o)},p(i,o){i[35]&&n.p(i,o)},d(i){n&&n.d(i),i&&h(e)}}}function hl(t){let e,n=t[32].html+"",i;return{c(){e=new rr(!1),i=ei(),e.a=i},m(o,l){e.m(n,o,l),m(o,i,l)},p(o,l){l[0]&64&&n!==(n=o[32].html+"")&&e.p(n)},d(o){o&&h(i),o&&e.d()}}}function Hs(t){let e,n,i,o,l,u,f,c,p,d,k,_,y,g,b,O,W,U,R,q,E,L,S,P,C,F,B,Y=t[1].label+"",$,be,te,oe,K,ge,N,x,le,ae,ee,_e,re,ye,ne,Te,Ae,I,V=t[5]&&fl(t);function Ne(j,ie){return j[0]?Rs:Ps}let Ee=Ne(t),Ce=Ee(t),ce=!t[5]&&dl(t),he=t[7],fe=[];for(let j=0;j<he.length;j+=1)fe[j]=pl(cl(t,he,j));var De=t[1].component;function nt(j){return{props:{onMessage:j[14],insecureRenderHtml:j[15]}}}De&&(K=new De(nt(t)));let me=t[6],de=[];for(let j=0;j<me.length;j+=1)de[j]=hl(al(t,me,j));return{c(){V&&V.c(),e=v(),n=s("div"),Ce.c(),i=v(),o=s("div"),l=s("aside"),u=s("img"),c=v(),ce&&ce.c(),p=v(),d=s("a"),d.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=v(),_=s("a"),_.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,y=v(),g=s("a"),g.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,b=v(),O=s("br"),W=v(),U=s("div"),R=v(),q=s("br"),E=v(),L=s("div");for(let j=0;j<fe.length;j+=1)fe[j].c();P=v(),C=s("main"),F=s("div"),B=s("h1"),$=z(Y),be=v(),te=s("div"),oe=s("div"),K&&xn(K.$$.fragment),ge=v(),N=s("div"),x=s("div"),le=v(),ae=s("div"),ee=s("p"),ee.textContent="Console",_e=v(),re=s("div"),re.innerHTML='<div class="i-codicon-clear-all"></div>',ye=v(),ne=s("div");for(let j=0;j<de.length;j+=1)de[j].c();a(n,"id","sidebarToggle"),a(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),a(u,"class","self-center p-7 cursor-pointer"),tr(u.src,f="tauri_logo.png")||a(u,"src",f),a(u,"alt","Tauri logo"),a(d,"class","nv justify-between h-8"),a(d,"target","_blank"),a(d,"href","https://tauri.app/v1/guides/"),a(_,"class","nv justify-between h-8"),a(_,"target","_blank"),a(_,"href","https://github.com/tauri-apps/tauri"),a(g,"class","nv justify-between h-8"),a(g,"target","_blank"),a(g,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(U,"class","bg-white/5 h-2px"),a(L,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(l,"id","sidebar"),a(l,"class",S="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(t[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),a(oe,"class","mr-2"),a(te,"class","overflow-y-auto"),a(F,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a(x,"class","bg-black/20 h-2px cursor-ns-resize"),a(ee,"class","font-semibold"),a(re,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),a(ae,"class","flex justify-between items-center px-2"),a(ne,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(N,"id","console"),a(N,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(C,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),a(o,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(j,ie){V&&V.m(j,ie),m(j,e,ie),m(j,n,ie),Ce.m(n,null),m(j,i,ie),m(j,o,ie),r(o,l),r(l,u),r(l,c),ce&&ce.m(l,null),r(l,p),r(l,d),r(l,k),r(l,_),r(l,y),r(l,g),r(l,b),r(l,O),r(l,W),r(l,U),r(l,R),r(l,q),r(l,E),r(l,L);for(let X=0;X<fe.length;X+=1)fe[X].m(L,null);r(o,P),r(o,C),r(C,F),r(F,B),r(B,$),r(F,be),r(F,te),r(te,oe),K&&Gt(K,oe,null),r(C,ge),r(C,N),r(N,x),r(N,le),r(N,ae),r(ae,ee),r(ae,_e),r(ae,re),r(N,ye),r(N,ne);for(let X=0;X<de.length;X+=1)de[X].m(ne,null);t[21](N),Te=!0,Ae||(I=[D(u,"click",t[19]),D(x,"mousedown",t[17]),D(re,"click",t[16])],Ae=!0)},p(j,ie){if(j[5]?V?V.p(j,ie):(V=fl(j),V.c(),V.m(e.parentNode,e)):V&&(V.d(1),V=null),Ee!==(Ee=Ne(j))&&(Ce.d(1),Ce=Ee(j),Ce&&(Ce.c(),Ce.m(n,null))),j[5]?ce&&(ce.d(1),ce=null):ce?ce.p(j,ie):(ce=dl(j),ce.c(),ce.m(l,p)),ie[0]&387){he=j[7];let X;for(X=0;X<he.length;X+=1){const we=cl(j,he,X);fe[X]?fe[X].p(we,ie):(fe[X]=pl(we),fe[X].c(),fe[X].m(L,null))}for(;X<fe.length;X+=1)fe[X].d(1);fe.length=he.length}if((!Te||ie[0]&32&&S!==(S="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(j[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&a(l,"class",S),(!Te||ie[0]&2)&&Y!==(Y=j[1].label+"")&&Z($,Y),De!==(De=j[1].component)){if(K){ti();const X=K;He(X.$$.fragment,1,0,()=>{Jt(X,1)}),ni()}De?(K=new De(nt(j)),xn(K.$$.fragment),We(K.$$.fragment,1),Gt(K,oe,null)):K=null}if(ie[0]&64){me=j[6];let X;for(X=0;X<me.length;X+=1){const we=al(j,me,X);de[X]?de[X].p(we,ie):(de[X]=hl(we),de[X].c(),de[X].m(ne,null))}for(;X<de.length;X+=1)de[X].d(1);de.length=me.length}},i(j){Te||(K&&We(K.$$.fragment,j),Te=!0)},o(j){K&&He(K.$$.fragment,j),Te=!1},d(j){V&&V.d(j),j&&h(e),j&&h(n),Ce.d(),j&&h(i),j&&h(o),ce&&ce.d(),pt(fe,j),K&&Jt(K),pt(de,j),t[21](null),Ae=!1,pe(I)}}}let ml=50;function vl(t){const e=document.querySelector("html");t?e.classList.add("dark"):e.classList.remove("dark"),localStorage&&localStorage.setItem("theme",t?"dark":"")}function Us(t,e){t.style.setProperty("--translate-x",`${e?"0":"-18.75"}rem`)}function Fs(t,e,n){let i;Be.label!=="main"&&Be.onCloseRequested(async N=>{await confirm("Are you sure?")||N.preventDefault()}),Be.onFileDropEvent(N=>{W(`File drop: ${JSON.stringify(N.payload)}`)});const o=navigator.userAgent.toLowerCase(),l=o.includes("android")||o.includes("iphone"),u=[{label:"Welcome",component:Mr,icon:"i-ph-hand-waving"},{label:"Communication",component:Ar,icon:"i-codicon-radio-tower"},!l&&{label:"CLI",component:Lr,icon:"i-codicon-terminal"},!l&&{label:"Dialog",component:Br,icon:"i-codicon-multiple-windows"},{label:"File system",component:Xr,icon:"i-codicon-files"},{label:"HTTP",component:ns,icon:"i-ph-globe-hemisphere-west"},!l&&{label:"Notifications",component:rs,icon:"i-codicon-bell-dot"},!l&&{label:"Window",component:as,icon:"i-codicon-window"},!l&&{label:"Shortcuts",component:hs,icon:"i-codicon-record-keys"},{label:"Shell",component:_s,icon:"i-codicon-terminal-bash"},!l&&{label:"Updater",component:Ms,icon:"i-codicon-cloud-download"},!l&&{label:"Clipboard",component:Ls,icon:"i-codicon-clippy"},{label:"WebRTC",component:As,icon:"i-ph-broadcast"}];let f=u[0];function c(N){n(1,f=N)}let p;ct(async()=>{const N=qt();n(2,p=await N.isMaximized()),Yt("tauri://resize",async()=>{n(2,p=await N.isMaximized())})});function d(){qt().minimize()}async function k(){const N=qt();await N.isMaximized()?N.unmaximize():N.maximize()}let _=!1;async function y(){_||(_=await Fl("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&qt().close())}let g;ct(()=>{n(3,g=localStorage&&localStorage.getItem("theme")=="dark"),vl(g)});function b(){n(3,g=!g),vl(g)}let O=wl([]);bl(t,O,N=>n(6,i=N));function W(N){O.update(x=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof N=="string"?N:JSON.stringify(N,null,1))+"</pre>"},...x])}function U(N){O.update(x=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+N+"</pre>"},...x])}function R(){O.update(()=>[])}let q,E,L;function S(N){L=N.clientY;const x=window.getComputedStyle(q);E=parseInt(x.height,10);const le=ee=>{const _e=ee.clientY-L,re=E-_e;n(4,q.style.height=`${re<ml?ml:re}px`,q)},ae=()=>{document.removeEventListener("mouseup",ae),document.removeEventListener("mousemove",le)};document.addEventListener("mouseup",ae),document.addEventListener("mousemove",le)}let P;ct(async()=>{n(5,P=await Pl()==="win32")});let C=!1,F,B,Y=!1,$=0,be=0;const te=(N,x,le)=>Math.min(Math.max(x,N),le);ct(()=>{n(18,F=document.querySelector("#sidebar")),B=document.querySelector("#sidebarToggle"),document.addEventListener("click",N=>{B.contains(N.target)?n(0,C=!C):C&&!F.contains(N.target)&&n(0,C=!1)}),document.addEventListener("touchstart",N=>{if(B.contains(N.target))return;const x=N.touches[0].clientX;(0<x&&x<20&&!C||C)&&(Y=!0,$=x)}),document.addEventListener("touchmove",N=>{if(Y){const x=N.touches[0].clientX;be=x;const le=(x-$)/10;F.style.setProperty("--translate-x",`-${te(0,C?0-le:18.75-le,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(Y){const N=(be-$)/10;n(0,C=C?N>-(18.75/2):N>18.75/2)}Y=!1})});const oe=()=>Ni("https://tauri.app/"),K=N=>{c(N),n(0,C=!1)};function ge(N){Kn[N?"unshift":"push"](()=>{q=N,n(4,q)})}return t.$$.update=()=>{if(t.$$.dirty[0]&1){const N=document.querySelector("#sidebar");N&&Us(N,C)}},[C,f,p,g,q,P,i,u,c,d,k,y,b,O,W,U,R,S,F,oe,K,ge]}class qs extends Se{constructor(e){super(),Le(this,e,Fs,Hs,Me,{},null,[-1,-1])}}new qs({target:document.querySelector("#app")});