mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-22 10:11:32 +03:00
45 lines
94 KiB
JavaScript
45 lines
94 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 G(){}function vl(t){return t()}function Io(){return Object.create(null)}function ae(t){t.forEach(vl)}function xl(t){return typeof t=="function"}function ve(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Un;function er(t,e){return Un||(Un=document.createElement("a")),Un.href=e,t===Un.href}function tr(t){return Object.keys(t).length===0}function nr(t,...e){if(t==null)return G;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function _l(t,e,n){t.$$.on_destroy.push(nr(e,n))}function r(t,e){t.appendChild(e)}function v(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode.removeChild(t)}function ut(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 ir(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function W(t){return document.createTextNode(t)}function _(){return W(" ")}function Wi(){return W("")}function E(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 re(t){return t===""?null:+t}function or(t){return Array.from(t.childNodes)}function Q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function B(t,e){t.value=e==null?"":e}function Ct(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 Ai(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Nn(t,e,n){t.classList[n?"add":"remove"](e)}class lr{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=ir(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)v(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(m)}}let Nt;function Ut(t){Nt=t}function bl(){if(!Nt)throw new Error("Function called outside component initialization");return Nt}function Mt(t){bl().$$.on_mount.push(t)}function Di(t){bl().$$.on_destroy.push(t)}const Ft=[],Xn=[],Bn=[],Uo=[],rr=Promise.resolve();let Oi=!1;function sr(){Oi||(Oi=!0,rr.then(gl))}function zt(t){Bn.push(t)}const Si=new Set;let qn=0;function gl(){const t=Nt;do{for(;qn<Ft.length;){const e=Ft[qn];qn++,Ut(e),ur(e.$$)}for(Ut(null),Ft.length=0,qn=0;Xn.length;)Xn.pop()();for(let e=0;e<Bn.length;e+=1){const n=Bn[e];Si.has(n)||(Si.add(n),n())}Bn.length=0}while(Ft.length);for(;Uo.length;)Uo.pop()();Oi=!1,Si.clear(),Ut(t)}function ur(t){if(t.fragment!==null){t.update(),ae(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(zt)}}const Vn=new Set;let rt;function xn(){rt={r:0,c:[],p:rt}}function ei(){rt.r||ae(rt.c),rt=rt.p}function Ce(t,e){t&&t.i&&(Vn.delete(t),t.i(e))}function De(t,e,n,i){if(t&&t.o){if(Vn.has(t))return;Vn.add(t),rt.c.push(()=>{Vn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function Kn(t){t&&t.c()}function qt(t,e,n,i){const{fragment:o,on_mount:l,on_destroy:u,after_update:f}=t.$$;o&&o.m(e,n),i||zt(()=>{const c=l.map(vl).filter(xl);u?u.push(...c):ae(c),t.$$.on_mount=[]}),f.forEach(zt)}function Bt(t,e){const n=t.$$;n.fragment!==null&&(ae(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ar(t,e){t.$$.dirty[0]===-1&&(Ft.push(t),sr(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ye(t,e,n,i,o,l,u,f=[-1]){const c=Nt;Ut(t);const p=t.$$={fragment:null,ctx:null,props:l,update:G,not_equal:o,bound:Io(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Io(),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,h,...y)=>{const g=y.length?y[0]:h;return p.ctx&&o(p.ctx[k],p.ctx[k]=g)&&(!p.skip_bound&&p.bound[k]&&p.bound[k](g),d&&ar(t,k)),h}):[],p.update(),d=!0,ae(p.before_update),p.fragment=i?i(p.ctx):!1,e.target){if(e.hydrate){const k=or(e.target);p.fragment&&p.fragment.l(k),k.forEach(m)}else p.fragment&&p.fragment.c();e.intro&&Ce(t.$$.fragment),qt(t,e.target,e.anchor,e.customElement),gl()}Ut(c)}class we{$destroy(){Bt(this,1),this.$destroy=G}$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&&!tr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const kt=[];function yl(t,e=G){let n;const i=new Set;function o(f){if(ve(t,f)&&(t=f,n)){const c=!kt.length;for(const p of i)p[1](),kt.push(p,t);if(c){for(let p=0;p<kt.length;p+=2)kt[p][0](kt[p+1]);kt.length=0}}}function l(f){o(f(t))}function u(f,c=G){const p=[f,c];return i.add(p),i.size===1&&(n=e(o)||G),f(t),()=>{i.delete(p),i.size===0&&(n(),n=null)}}return{set:o,update:l,subscribe:u}}var Pi=function(t,e){return Pi=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])},Pi(t,e)};function ji(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}Pi(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var se=function(){return se=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},se.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 at(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=at(function(f){i(f),Reflect.deleteProperty(window,"_".concat(u))},!0),u=at(function(f){o(f),Reflect.deleteProperty(window,"_".concat(l))},!0);window.__TAURI_IPC__(se({__cmd:t,callback:l,error:u},e))})]})})}function wl(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:at,invoke:Qn,convertFileSrc:wl});function O(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,Qn("tauri",t)]})})}function cr(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,O({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:n,options:i,onEventFn:at(t)}})]})})}var Gn=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}(),kl=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,O({__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,O({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})]})})},t}(),Ml=function(t){function e(n,i,o){i===void 0&&(i=[]);var l=t.call(this)||this;return l.stdout=new Gn,l.stderr=new Gn,l.program=n,l.args=typeof i=="string"?[i]:i,l.options=o!=null?o:{},l}return ji(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,cr(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 kl(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}(Gn);function Ri(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:Ml,Child:kl,EventEmitter:Gn,open:Ri});function Tl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Cl(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return[4,O({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function Hi(t,e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return[2,O({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:at(n)}}).then(function(l){return function(){return M(i,void 0,void 0,function(){return T(this,function(u){return[2,Tl(t,l)]})})}})]})})}function zl(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,Hi(t,e,function(o){n(o),Tl(t,o.id).catch(function(){})})]})})}var Vt,Zn=function(t,e){this.type="Logical",this.width=t,this.height=e},Tt=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}(),Sl=function(t,e){this.type="Logical",this.x=t,this.y=e},st=function(){function t(e,n){this.type="Physical",this.x=e,this.y=n}return t.prototype.toLogical=function(e){return new Sl(this.x/e,this.y/e)},t}();function It(){return new St(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ll(){return window.__TAURI_METADATA__.__windows.map(function(t){return new St(t.label,{skip:!0})})}(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Vt||(Vt={}));var Ie,No=["tauri://created","tauri://error"],Al=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,Hi(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,zl(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(No.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,Cl(e,this.label,n)]})})},t.prototype._handleTauriEvent=function(e,n){return!!No.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)},t}(),Ol=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return ji(e,t),e.prototype.scaleFactor=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__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,O({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new st(o,l)})]})})},e.prototype.outerPosition=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new st(o,l)})]})})},e.prototype.innerSize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new Tt(o,l)})]})})},e.prototype.outerSize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new Tt(o,l)})]})})},e.prototype.isFullscreen=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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===Vt.Critical?{type:"Critical"}:{type:"Informational"}),[2,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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,O({__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("tauri://resize",n)]})})},e.prototype.onMoved=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen("tauri://move",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("tauri://close-requested",function(l){var u=new Pl(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("tauri://focus",function(u){n(se(se({},u),{payload:!0}))})];case 1:return i=l.sent(),[4,this.listen("tauri://blur",function(u){n(se(se({},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("tauri://scale-change",n)]})})},e.prototype.onMenuClicked=function(n){return M(this,void 0,void 0,function(){return T(this,function(i){return[2,this.listen("tauri://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("tauri://file-drop",function(f){n(se(se({},f),{payload:{type:"drop",paths:f.payload}}))})];case 1:return i=u.sent(),[4,this.listen("tauri://file-drop-hover",function(f){n(se(se({},f),{payload:{type:"hover",paths:f.payload}}))})];case 2:return o=u.sent(),[4,this.listen("tauri://file-drop-cancelled",function(f){n(se(se({},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("tauri://theme-changed",n)]})})},e}(Al),Pl=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}(),St=function(t){function e(n,i){i===void 0&&(i={});var o=t.call(this,n)||this;return i!=null&&i.skip||O({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:se({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 ji(e,t),e.getByLabel=function(n){return Ll().some(function(i){return i.label===n})?new e(n,{skip:!0}):null},e}(Ol);function fr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}})]})})}function dr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}})]})})}function pr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}})]})})}"__TAURI_METADATA__"in window?Ie=new St(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.`),Ie=new St("main",{skip:!0}));Object.freeze({__proto__:null,WebviewWindow:St,WebviewWindowHandle:Al,WindowManager:Ol,CloseRequestedEvent:Pl,getCurrent:It,getAll:Ll,get appWindow(){return Ie},LogicalSize:Zn,PhysicalSize:Tt,LogicalPosition:Sl,PhysicalPosition:st,get UserAttentionType(){return Vt},currentMonitor:fr,primaryMonitor:dr,availableMonitors:pr});function hr(){return navigator.appVersion.includes("Win")}var mr=hr()?`\r
|
|
`:`
|
|
`;function El(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function vr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"version"}})]})})}function _r(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function br(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function gr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL:mr,platform:El,version:vr,type:_r,arch:br,tempdir:gr});function Wl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Dl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function jl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:Dl,getVersion:Wl,getTauriVersion:jl});function Rl(t){return t===void 0&&(t=0),M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function Fi(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:Rl,relaunch:Fi});function yr(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j,S,P;return{c(){e=s("p"),e.innerHTML=`This is a demo of Tauri's API capabilities using the <code>@tauri-apps/api</code> package. It'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's integration
|
|
tests.`,n=_(),i=s("br"),o=_(),l=s("br"),u=_(),f=s("pre"),c=W("App name: "),p=s("code"),d=W(t[2]),k=W(`
|
|
App version: `),h=s("code"),y=W(t[0]),g=W(`
|
|
Tauri version: `),b=s("code"),L=W(t[1]),R=W(`
|
|
`),F=_(),H=s("br"),N=_(),A=s("div"),C=s("button"),C.textContent="Close application",z=_(),j=s("button"),j.textContent="Relaunch application",a(C,"class","btn"),a(j,"class","btn"),a(A,"class","flex flex-wrap gap-1 shadow-")},m(U,X){v(U,e,X),v(U,n,X),v(U,i,X),v(U,o,X),v(U,l,X),v(U,u,X),v(U,f,X),r(f,c),r(f,p),r(p,d),r(f,k),r(f,h),r(h,y),r(f,g),r(f,b),r(b,L),r(f,R),v(U,F,X),v(U,H,X),v(U,N,X),v(U,A,X),r(A,C),r(A,z),r(A,j),S||(P=[E(C,"click",t[3]),E(j,"click",t[4])],S=!0)},p(U,[X]){X&4&&Q(d,U[2]),X&1&&Q(y,U[0]),X&2&&Q(L,U[1])},i:G,o:G,d(U){U&&m(e),U&&m(n),U&&m(i),U&&m(o),U&&m(l),U&&m(u),U&&m(f),U&&m(F),U&&m(H),U&&m(N),U&&m(A),S=!1,ae(P)}}}function wr(t,e,n){let i="0.0.0",o="0.0.0",l="Unknown";Dl().then(c=>{n(2,l=c)}),Wl().then(c=>{n(0,i=c)}),jl().then(c=>{n(1,o=c)});async function u(){await Rl()}async function f(){await Fi()}return[i,o,l,u,f]}class kr extends we{constructor(e){super(),ye(this,e,wr,yr,ve,{})}}function Hl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Hl});function Mr(t){let e,n,i,o,l,u,f,c,p,d,k,h,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 <PATH>
|
|
--theme <light|dark|system>
|
|
--verbose</pre></code>
|
|
Additionally, it has a <code>update --background</code> subcommand.`,n=_(),i=s("br"),o=_(),l=s("div"),l.textContent="Note that the arguments are only parsed, not implemented.",u=_(),f=s("br"),c=_(),p=s("br"),d=_(),k=s("button"),k.textContent="Get matches",a(l,"class","note"),a(k,"class","btn"),a(k,"id","cli-matches")},m(g,b){v(g,e,b),v(g,n,b),v(g,i,b),v(g,o,b),v(g,l,b),v(g,u,b),v(g,f,b),v(g,c,b),v(g,p,b),v(g,d,b),v(g,k,b),h||(y=E(k,"click",t[0]),h=!0)},p:G,i:G,o:G,d(g){g&&m(e),g&&m(n),g&&m(i),g&&m(o),g&&m(l),g&&m(u),g&&m(f),g&&m(c),g&&m(p),g&&m(d),g&&m(k),h=!1,y()}}}function Tr(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 Cr extends we{constructor(e){super(),ye(this,e,Tr,Mr,ve,{onMessage:1})}}function Gt(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Hi(t,null,e)]})})}function Fl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,zl(t,null,e)]})})}function ti(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,Cl(t,void 0,e)]})})}Object.freeze({__proto__:null,listen:Gt,once:Fl,emit:ti});function zr(t){let e,n,i,o,l,u,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=_(),o=s("button"),o.textContent="Call Request (async) API",l=_(),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){v(p,e,d),r(e,n),r(e,i),r(e,o),r(e,l),r(e,u),f||(c=[E(n,"click",t[0]),E(o,"click",t[1]),E(u,"click",t[2])],f=!0)},p:G,i:G,o:G,d(p){p&&m(e),f=!1,ae(c)}}}function Sr(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Gt("rust-event",i)}),Di(()=>{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(){ti("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,u,f,i]}class Lr extends we{constructor(e){super(),ye(this,e,Sr,zr,ve,{onMessage:3})}}function Ii(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,O({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Il(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,O({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Ar(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Ul(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}function Or(t,e){var n;return M(this,void 0,void 0,function(){var i;return T(this,function(o){return i=typeof e=="string"?{title:e}:e,[2,O({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t.toString(),title:(n=i==null?void 0:i.title)===null||n===void 0?void 0:n.toString(),type:i==null?void 0:i.type}})]})})}Object.freeze({__proto__:null,open:Ii,save:Il,message:Ar,ask:Ul,confirm:Or});var Lt;function Pr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Ui(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){var n;return T(this,function(i){switch(i.label){case 0:return[4,O({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Ei(t,e,n){return M(this,void 0,void 0,function(){var i,o;return T(this,function(l){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:""},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),typeof e=="string"?i.contents=e!=null?e:"":o=e,[2,O({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:o}})]})})}function Er(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,O({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:o}})]})})}function Nl(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"readDir",path:t,options:e}})]})})}function Wr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"createDir",path:t,options:e}})]})})}function Dr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"removeDir",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,O({__tauriModule:"Fs",message:{cmd:"copyFile",source:t,destination:e,options:n}})]})})}function Rr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"Fs",message:{cmd:"removeFile",path:t,options:e}})]})})}function Hr(t,e,n){return n===void 0&&(n={}),M(this,void 0,void 0,function(){return T(this,function(i){return[2,O({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:t,newPath:e,options:n}})]})})}(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"})(Lt||(Lt={}));Object.freeze({__proto__:null,get BaseDirectory(){return Lt},get Dir(){return Lt},readTextFile:Pr,readBinaryFile:Ui,writeTextFile:Ei,writeFile:Ei,writeBinaryFile:Er,readDir:Nl,createDir:Wr,removeDir:Dr,copyFile:jr,removeFile:Rr,renameFile:Hr});function Fr(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j;return{c(){e=s("div"),n=s("input"),i=_(),o=s("input"),l=_(),u=s("br"),f=_(),c=s("div"),p=s("input"),d=_(),k=s("label"),k.textContent="Multiple",h=_(),y=s("div"),g=s("input"),b=_(),L=s("label"),L.textContent="Directory",R=_(),F=s("br"),H=_(),N=s("button"),N.textContent="Open dialog",A=_(),C=s("button"),C.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(L,"for","dialog-directory"),a(N,"class","btn"),a(N,"id","open-dialog"),a(C,"class","btn"),a(C,"id","save-dialog")},m(S,P){v(S,e,P),r(e,n),B(n,t[0]),r(e,i),r(e,o),B(o,t[1]),v(S,l,P),v(S,u,P),v(S,f,P),v(S,c,P),r(c,p),p.checked=t[2],r(c,d),r(c,k),v(S,h,P),v(S,y,P),r(y,g),g.checked=t[3],r(y,b),r(y,L),v(S,R,P),v(S,F,P),v(S,H,P),v(S,N,P),v(S,A,P),v(S,C,P),z||(j=[E(n,"input",t[8]),E(o,"input",t[9]),E(p,"change",t[10]),E(g,"change",t[11]),E(N,"click",t[4]),E(C,"click",t[5])],z=!0)},p(S,[P]){P&1&&n.value!==S[0]&&B(n,S[0]),P&2&&o.value!==S[1]&&B(o,S[1]),P&4&&(p.checked=S[2]),P&8&&(g.checked=S[3])},i:G,o:G,d(S){S&&m(e),S&&m(l),S&&m(u),S&&m(f),S&&m(c),S&&m(h),S&&m(y),S&&m(R),S&&m(F),S&&m(H),S&&m(N),S&&m(A),S&&m(C),z=!1,ae(j)}}}function Ir(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 Ur(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:o}=e,l=null,u=null,f=!1,c=!1;function p(){Ii({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 L=b,R=L.match(/\S+\.\S+$/g);Ui(L).then(function(F){R&&(L.includes(".png")||L.includes(".jpg"))?Ir(new Uint8Array(F),function(H){var N="data:image/png;base64,"+H;o('<img src="'+N+'"></img>')}):i(b)}).catch(i(b))}}).catch(i)}function d(){Il({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 h(){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,h,y,g]}class Nr extends we{constructor(e){super(),ye(this,e,Ur,Fr,ve,{onMessage:6,insecureRenderHtml:7})}}function qo(t,e,n){const i=t.slice();return i[9]=e[n],i}function Bo(t){let e,n=t[9][0]+"",i,o;return{c(){e=s("option"),i=W(n),e.__value=o=t[9][1],e.value=e.__value},m(l,u){v(l,e,u),r(e,i)},p:G,d(l){l&&m(e)}}}function qr(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N=t[2],A=[];for(let C=0;C<N.length;C+=1)A[C]=Bo(qo(t,N,C));return{c(){e=s("form"),n=s("div"),i=s("select"),o=s("option"),o.textContent="None";for(let C=0;C<A.length;C+=1)A[C].c();l=_(),u=s("input"),f=_(),c=s("br"),p=_(),d=s("div"),k=s("button"),k.textContent="Read",h=_(),y=s("button"),y.textContent="Use as img src",g=_(),b=s("br"),L=_(),R=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(R,"alt","")},m(C,z){v(C,e,z),r(e,n),r(n,i),r(i,o);for(let j=0;j<A.length;j+=1)A[j].m(i,null);r(n,l),r(n,u),B(u,t[0]),r(e,f),r(e,c),r(e,p),r(e,d),r(d,k),r(d,h),r(d,y),v(C,g,z),v(C,b,z),v(C,L,z),v(C,R,z),t[8](R),F||(H=[E(u,"input",t[7]),E(y,"click",t[4]),E(e,"submit",Yn(t[3]))],F=!0)},p(C,[z]){if(z&4){N=C[2];let j;for(j=0;j<N.length;j+=1){const S=qo(C,N,j);A[j]?A[j].p(S,z):(A[j]=Bo(S),A[j].c(),A[j].m(i,null))}for(;j<A.length;j+=1)A[j].d(1);A.length=N.length}z&1&&u.value!==C[0]&&B(u,C[0])},i:G,o:G,d(C){C&&m(e),ut(A,C),C&&m(g),C&&m(b),C&&m(L),C&&m(R),t[8](null),F=!1,ae(H)}}}function Vo(){return document.getElementById("dir").value?parseInt(dir.value):null}function Br(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 Vr(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:o}=e,l="",u;const f=Object.keys(Lt).filter(h=>isNaN(parseInt(h))).map(h=>[h,Lt[h]]);function c(){const h=l.match(/\S+\.\S+$/g),y={dir:Vo()};(h?Ui(l,y):Nl(l,y)).then(function(b){if(h)if(l.includes(".png")||l.includes(".jpg"))Br(new Uint8Array(b),function(L){const R="data:image/png;base64,"+L;o('<img src="'+R+'"></img>')});else{const L=String.fromCharCode.apply(null,b);o('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const R=document.getElementById("file-response");R.value=L,document.getElementById("file-save").addEventListener("click",function(){Ei(l,R.value,{dir:Vo()}).catch(i)})})}else i(b)}).catch(i)}function p(){n(1,u.src=wl(l),u)}function d(){l=this.value,n(0,l)}function k(h){Xn[h?"unshift":"push"](()=>{u=h,n(1,u)})}return t.$$set=h=>{"onMessage"in h&&n(5,i=h.onMessage),"insecureRenderHtml"in h&&n(6,o=h.insecureRenderHtml)},[l,u,f,c,p,i,o,d,k]}class Gr extends we{constructor(e){super(),ye(this,e,Vr,qr,ve,{onMessage:5,insecureRenderHtml:6})}}var At;(function(t){t[t.JSON=1]="JSON",t[t.Text=2]="Text",t[t.Binary=3]="Binary"})(At||(At={}));var Jn=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}(),ql=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},Bl=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,O({__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===At.JSON)&&(e.responseType=At.Text),[2,O({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(function(o){var l=new ql(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(se({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(se({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(se({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(se({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(se({method:"DELETE",url:e},n))]})})},t}();function $n(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then(function(n){return new Bl(n)})]})})}var Li=null;function Jr(t,e){var n;return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return Li!==null?[3,2]:[4,$n()];case 1:Li=i.sent(),i.label=2;case 2:return[2,Li.request(se({url:t,method:(n=e==null?void 0:e.method)!==null&&n!==void 0?n:"GET"},e))]}})})}Object.freeze({__proto__:null,getClient:$n,fetch:Jr,Body:Jn,Client:Bl,Response:ql,get ResponseType(){return At}});function Go(t,e,n){const i=t.slice();return i[12]=e[n],i[14]=n,i}function Jo(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F=t[5],H=[];for(let z=0;z<F.length;z+=1)H[z]=Ko(Go(t,F,z));const N=z=>De(H[z],1,1,()=>{H[z]=null});let A=!t[3]&&Qo(),C=!t[3]&&t[8]&&Zo();return{c(){e=s("span"),n=s("span"),i=W(t[6]),o=_(),l=s("ul");for(let z=0;z<H.length;z+=1)H[z].c();u=_(),f=s("span"),c=W(t[7]),A&&A.c(),p=_(),d=s("span"),k=W(t[6]),h=W(Qr),y=W(t[7]),C&&C.c(),g=Wi(),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"),Nn(e,"hidden",t[8]),a(d,"class","bracket svelte-gbh3pt"),a(d,"tabindex","0"),Nn(d,"hidden",!t[8])},m(z,j){v(z,e,j),r(e,n),r(n,i),r(e,o),r(e,l);for(let S=0;S<H.length;S+=1)H[S].m(l,null);r(e,u),r(e,f),r(f,c),A&&A.m(e,null),v(z,p,j),v(z,d,j),r(d,k),r(d,h),r(d,y),C&&C.m(z,j),v(z,g,j),b=!0,L||(R=[E(n,"click",t[11]),E(f,"click",t[11]),E(d,"click",t[11])],L=!0)},p(z,j){if((!b||j&64)&&Q(i,z[6]),j&1591){F=z[5];let S;for(S=0;S<F.length;S+=1){const P=Go(z,F,S);H[S]?(H[S].p(P,j),Ce(H[S],1)):(H[S]=Ko(P),H[S].c(),Ce(H[S],1),H[S].m(l,null))}for(xn(),S=F.length;S<H.length;S+=1)N(S);ei()}(!b||j&128)&&Q(c,z[7]),z[3]?A&&(A.d(1),A=null):A||(A=Qo(),A.c(),A.m(e,null)),j&256&&Nn(e,"hidden",z[8]),(!b||j&64)&&Q(k,z[6]),(!b||j&128)&&Q(y,z[7]),j&256&&Nn(d,"hidden",!z[8]),!z[3]&&z[8]?C||(C=Zo(),C.c(),C.m(g.parentNode,g)):C&&(C.d(1),C=null)},i(z){if(!b){for(let j=0;j<F.length;j+=1)Ce(H[j]);b=!0}},o(z){H=H.filter(Boolean);for(let j=0;j<H.length;j+=1)De(H[j]);b=!1},d(z){z&&m(e),ut(H,z),A&&A.d(),z&&m(p),z&&m(d),C&&C.d(z),z&&m(g),L=!1,ae(R)}}}function Yo(t){let e,n,i=t[12]+"",o,l;return{c(){e=s("span"),n=W('"'),o=W(i),l=W('":'),a(e,"class","key")},m(u,f){v(u,e,f),r(e,n),r(e,o),r(e,l)},p(u,f){f&32&&i!==(i=u[12]+"")&&Q(o,i)},d(u){u&&m(e)}}}function Yr(t){let e,n=t[10](t[0][t[12]])+"",i,o,l=t[14]<t[5].length-1&&Xo();return{c(){e=s("span"),i=W(n),l&&l.c(),a(e,"class",o="val "+t[9](t[0][t[12]])+" svelte-gbh3pt")},m(u,f){v(u,e,f),r(e,i),l&&l.m(e,null)},p(u,f){f&33&&n!==(n=u[10](u[0][u[12]])+"")&&Q(i,n),u[14]<u[5].length-1?l||(l=Xo(),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:G,o:G,d(u){u&&m(e),l&&l.d()}}}function Xr(t){let e,n;return e=new Vl({props:{json:t[0][t[12]],depth:t[1],_lvl:t[2]+1,_last:t[14]===t[5].length-1}}),{c(){Kn(e.$$.fragment)},m(i,o){qt(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||(Ce(e.$$.fragment,i),n=!0)},o(i){De(e.$$.fragment,i),n=!1},d(i){Bt(e,i)}}}function Xo(t){let e;return{c(){e=s("span"),e.textContent=",",a(e,"class","comma svelte-gbh3pt")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ko(t){let e,n,i,o,l,u,f,c=!t[4]&&Yo(t);const p=[Xr,Yr],d=[];function k(h,y){return y&33&&(i=null),i==null&&(i=h[9](h[0][h[12]])==="object"),i?0:1}return o=k(t,-1),l=d[o]=p[o](t),{c(){e=s("li"),c&&c.c(),n=_(),l.c(),u=_()},m(h,y){v(h,e,y),c&&c.m(e,null),r(e,n),d[o].m(e,null),r(e,u),f=!0},p(h,y){h[4]?c&&(c.d(1),c=null):c?c.p(h,y):(c=Yo(h),c.c(),c.m(e,n));let g=o;o=k(h,y),o===g?d[o].p(h,y):(xn(),De(d[g],1,1,()=>{d[g]=null}),ei(),l=d[o],l?l.p(h,y):(l=d[o]=p[o](h),l.c()),Ce(l,1),l.m(e,u))},i(h){f||(Ce(l),f=!0)},o(h){De(l),f=!1},d(h){h&&m(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){v(n,e,i)},d(n){n&&m(e)}}}function Zo(t){let e;return{c(){e=s("span"),e.textContent=",",a(e,"class","comma svelte-gbh3pt")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Kr(t){let e,n,i=t[5].length&&Jo(t);return{c(){i&&i.c(),e=Wi()},m(o,l){i&&i.m(o,l),v(o,e,l),n=!0},p(o,[l]){o[5].length?i?(i.p(o,l),l&32&&Ce(i,1)):(i=Jo(o),i.c(),Ce(i,1),i.m(e.parentNode,e)):i&&(xn(),De(i,1,1,()=>{i=null}),ei())},i(o){n||(Ce(i),n=!0)},o(o){De(i),n=!1},d(o){i&&i.d(o),o&&m(e)}}}const Qr="...";function Zr(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,h;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,h=!h)};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,h=o<l)},[i,o,l,u,p,c,d,k,h,f,y,g]}class Vl extends we{constructor(e){super(),ye(this,e,Zr,Kr,ve,{json:0,depth:1,_lvl:2,_last:3})}}function $r(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j,S,P,U,X,$,ce,Y,fe,x,he,_e,ie,ke,ze,te,be,de,oe,le,Ae,ee;return oe=new Vl({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=_(),p=s("br"),d=_(),k=s("textarea"),h=_(),y=s("br"),g=_(),b=s("button"),b.textContent="Make request",L=_(),R=s("br"),F=_(),H=s("h3"),H.textContent="HTTP Form",N=_(),A=s("div"),C=s("input"),z=_(),j=s("input"),S=_(),P=s("br"),U=_(),X=s("label"),$=s("input"),ce=W(`
|
|
Multipart`),Y=_(),fe=s("br"),x=_(),he=s("br"),_e=_(),ie=s("button"),ie.textContent="Post it",ke=_(),ze=s("br"),te=_(),be=s("br"),de=_(),Kn(oe.$$.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&&zt(()=>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(C,"class","input"),a(j,"class","input"),a(A,"class","flex gap-2 children:grow"),a($,"type","checkbox"),a(ie,"class","btn"),a(ie,"type","button")},m(D,V){v(D,e,V),r(e,n),r(n,i),r(n,o),r(n,l),r(n,u),r(n,f),Ct(n,t[0]),r(e,c),r(e,p),r(e,d),r(e,k),B(k,t[1]),r(e,h),r(e,y),r(e,g),r(e,b),v(D,L,V),v(D,R,V),v(D,F,V),v(D,H,V),v(D,N,V),v(D,A,V),r(A,C),B(C,t[2]),r(A,z),r(A,j),B(j,t[3]),v(D,S,V),v(D,P,V),v(D,U,V),v(D,X,V),r(X,$),$.checked=t[5],r(X,ce),v(D,Y,V),v(D,fe,V),v(D,x,V),v(D,he,V),v(D,_e,V),v(D,ie,V),v(D,ke,V),v(D,ze,V),v(D,te,V),v(D,be,V),v(D,de,V),qt(oe,D,V),le=!0,Ae||(ee=[E(n,"change",t[9]),E(k,"input",t[10]),E(e,"submit",Yn(t[6])),E(C,"input",t[11]),E(j,"input",t[12]),E($,"change",t[13]),E(ie,"click",t[7])],Ae=!0)},p(D,[V]){V&1&&Ct(n,D[0]),V&2&&B(k,D[1]),V&4&&C.value!==D[2]&&B(C,D[2]),V&8&&j.value!==D[3]&&B(j,D[3]),V&32&&($.checked=D[5]);const ne={};V&16&&(ne.json=D[4]),oe.$set(ne)},i(D){le||(Ce(oe.$$.fragment,D),le=!0)},o(D){De(oe.$$.fragment,D),le=!1},d(D){D&&m(e),D&&m(L),D&&m(R),D&&m(F),D&&m(H),D&&m(N),D&&m(A),D&&m(S),D&&m(P),D&&m(U),D&&m(X),D&&m(Y),D&&m(fe),D&&m(x),D&&m(he),D&&m(_e),D&&m(ie),D&&m(ke),D&&m(ze),D&&m(te),D&&m(be),D&&m(de),Bt(oe,D),Ae=!1,ae(ee)}}}function xr(t,e,n){let i="GET",o="",{onMessage:l}=e;async function u(){const R=await $n().catch(N=>{throw l(N),N}),H={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?H.body=Jn.json(JSON.parse(o)):o!==""&&(H.body=Jn.text(o)),R.request(H).then(l).catch(l)}let f="baz",c="qux",p=null,d=!0;async function k(){const R=await $n().catch(F=>{throw l(F),F});n(4,p=await R.request({url:"http://localhost:3003",method:"POST",body:Jn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:At.Text}))}function h(){i=Ai(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 L(){d=this.checked,n(5,d)}return t.$$set=R=>{"onMessage"in R&&n(8,l=R.onMessage)},[i,o,f,c,p,d,u,k,l,h,y,g,b,L]}class es extends we{constructor(e){super(),ye(this,e,xr,$r,ve,{onMessage:8})}}function ts(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){v(o,e,l),n||(i=E(e,"click",ns),n=!0)},p:G,i:G,o:G,d(o){o&&m(e),n=!1,i()}}}function ns(){new Notification("Notification title",{body:"This is the notification body"})}function is(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class os extends we{constructor(e){super(),ye(this,e,is,ts,ve,{onMessage:0})}}function $o(t,e,n){const i=t.slice();return i[65]=e[n],i}function xo(t,e,n){const i=t.slice();return i[68]=e[n],i}function el(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]=tl(xo(t,f,p));return{c(){e=s("span"),e.textContent="Selected window:",n=_(),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&&zt(()=>t[38].call(i))},m(p,d){v(p,e,d),v(p,n,d),v(p,i,d),r(i,o);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Ct(i,t[0]),l||(u=E(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 h=xo(p,f,k);c[k]?c[k].p(h,d):(c[k]=tl(h),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&&Ct(i,p[0])},d(p){p&&m(e),p&&m(n),p&&m(i),ut(c,p),l=!1,u()}}}function tl(t){let e,n=t[68]+"",i,o;return{c(){e=s("option"),i=W(n),e.__value=o=t[68],e.value=e.__value},m(l,u){v(l,e,u),r(e,i)},p(l,u){u[0]&2&&n!==(n=l[68]+"")&&Q(i,n),u[0]&2&&o!==(o=l[68])&&(e.__value=o,e.value=e.__value)},d(l){l&&m(e)}}}function nl(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j,S,P,U,X,$,ce,Y,fe,x,he,_e,ie,ke,ze,te,be,de,oe,le,Ae,ee,D,V,ne,ge,je,Oe,Z,q,ue,J,pe,Jt,Ue,ct,Yt,Ee,Xt,ft,Kt,We,Qt,Ne,K,Ot,Se,Pt,xe,Et,Le,dt,pt,ht,Te,Re,Pe,et,Wt,tt,Dt,mt=t[25].width+"",ni,qi,Zt,Bi,$t=t[25].height+"",ii,Vi,qe,xt,Gi,en,Ji,tn=t[26].width+"",oi,Yi,nn,Xi,on=t[26].height+"",li,Ki,vt,Be,ln,Qi,rn,Zi,sn=t[25].toLogical(t[22]).width+"",ri,$i,un,xi,an=t[25].toLogical(t[22]).height+"",si,eo,Ve,cn,to,fn,no,dn=t[26].toLogical(t[22]).width+"",ui,io,pn,oo,hn=t[26].toLogical(t[22]).height+"",ai,lo,_t,Ge,mn,ro,vn,so,_n=t[23].x+"",ci,uo,bn,ao,gn=t[23].y+"",fi,co,Je,yn,fo,wn,po,kn=t[24].x+"",di,ho,Mn,mo,Tn=t[24].y+"",pi,vo,bt,Ye,Cn,_o,zn,bo,Sn=t[23].toLogical(t[22]).x+"",hi,go,Ln,yo,An=t[23].toLogical(t[22]).y+"",mi,wo,Xe,On,ko,Pn,Mo,En=t[24].toLogical(t[22]).x+"",vi,To,Wn,Co,Dn=t[24].toLogical(t[22]).y+"",_i,bi,gi,yi,jt,wi,nt,jn,gt,zo,So,Rn,yt,Lo,ki,He,Hn,Ao,Fe,Oo,Fn,Po,Ke,Eo,In,Wo,Qe,Mi,Ti,Ci,it,ot,Ze,Do,Rt,jo,lt,$e,Ro,Ht,zi,Ho,wt=t[28],Me=[];for(let w=0;w<wt.length;w+=1)Me[w]=il($o(t,wt,w));return{c(){e=s("br"),n=_(),i=s("div"),o=s("button"),o.textContent="Center",l=_(),u=s("button"),u.textContent="Minimize",f=_(),c=s("button"),c.textContent="Hide",p=_(),d=s("button"),d.textContent="Change icon",k=_(),h=s("button"),h.textContent="Request attention",y=_(),g=s("br"),b=_(),L=s("div"),R=s("label"),F=W(`Maximized
|
|
`),H=s("input"),N=_(),A=s("label"),C=W(`Resizable
|
|
`),z=s("input"),j=_(),S=s("label"),P=W(`Has decorations
|
|
`),U=s("input"),X=_(),$=s("label"),ce=W(`Always on top
|
|
`),Y=s("input"),fe=_(),x=s("label"),he=W(`Fullscreen
|
|
`),_e=s("input"),ie=_(),ke=s("br"),ze=_(),te=s("div"),be=s("div"),de=s("div"),oe=W(`X
|
|
`),le=s("input"),Ae=_(),ee=s("div"),D=W(`Y
|
|
`),V=s("input"),ne=_(),ge=s("div"),je=s("div"),Oe=W(`Width
|
|
`),Z=s("input"),q=_(),ue=s("div"),J=W(`Height
|
|
`),pe=s("input"),Jt=_(),Ue=s("div"),ct=s("div"),Yt=W(`Min width
|
|
`),Ee=s("input"),Xt=_(),ft=s("div"),Kt=W(`Min height
|
|
`),We=s("input"),Qt=_(),Ne=s("div"),K=s("div"),Ot=W(`Max width
|
|
`),Se=s("input"),Pt=_(),xe=s("div"),Et=W(`Max height
|
|
`),Le=s("input"),dt=_(),pt=s("br"),ht=_(),Te=s("div"),Re=s("div"),Pe=s("div"),et=s("div"),et.textContent="Inner Size",Wt=_(),tt=s("span"),Dt=W("Width: "),ni=W(mt),qi=_(),Zt=s("span"),Bi=W("Height: "),ii=W($t),Vi=_(),qe=s("div"),xt=s("div"),xt.textContent="Outer Size",Gi=_(),en=s("span"),Ji=W("Width: "),oi=W(tn),Yi=_(),nn=s("span"),Xi=W("Height: "),li=W(on),Ki=_(),vt=s("div"),Be=s("div"),ln=s("div"),ln.textContent="Inner Logical Size",Qi=_(),rn=s("span"),Zi=W("Width: "),ri=W(sn),$i=_(),un=s("span"),xi=W("Height: "),si=W(an),eo=_(),Ve=s("div"),cn=s("div"),cn.textContent="Outer Logical Size",to=_(),fn=s("span"),no=W("Width: "),ui=W(dn),io=_(),pn=s("span"),oo=W("Height: "),ai=W(hn),lo=_(),_t=s("div"),Ge=s("div"),mn=s("div"),mn.textContent="Inner Position",ro=_(),vn=s("span"),so=W("x: "),ci=W(_n),uo=_(),bn=s("span"),ao=W("y: "),fi=W(gn),co=_(),Je=s("div"),yn=s("div"),yn.textContent="Outer Position",fo=_(),wn=s("span"),po=W("x: "),di=W(kn),ho=_(),Mn=s("span"),mo=W("y: "),pi=W(Tn),vo=_(),bt=s("div"),Ye=s("div"),Cn=s("div"),Cn.textContent="Inner Logical Position",_o=_(),zn=s("span"),bo=W("x: "),hi=W(Sn),go=_(),Ln=s("span"),yo=W("y: "),mi=W(An),wo=_(),Xe=s("div"),On=s("div"),On.textContent="Outer Logical Position",ko=_(),Pn=s("span"),Mo=W("x: "),vi=W(En),To=_(),Wn=s("span"),Co=W("y: "),_i=W(Dn),bi=_(),gi=s("br"),yi=_(),jt=s("h4"),jt.textContent="Cursor",wi=_(),nt=s("div"),jn=s("label"),gt=s("input"),zo=W(`
|
|
Grab`),So=_(),Rn=s("label"),yt=s("input"),Lo=W(`
|
|
Visible`),ki=_(),He=s("div"),Hn=s("label"),Ao=W(`Icon
|
|
`),Fe=s("select");for(let w=0;w<Me.length;w+=1)Me[w].c();Oo=_(),Fn=s("label"),Po=W(`X position
|
|
`),Ke=s("input"),Eo=_(),In=s("label"),Wo=W(`Y position
|
|
`),Qe=s("input"),Mi=_(),Ti=s("br"),Ci=_(),it=s("div"),ot=s("form"),Ze=s("input"),Do=_(),Rt=s("button"),Rt.textContent="Set title",jo=_(),lt=s("form"),$e=s("input"),Ro=_(),Ht=s("button"),Ht.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(h,"class","btn"),a(h,"title","Minimizes the window, requests attention for 3s and then resets it"),a(H,"type","checkbox"),a(z,"type","checkbox"),a(U,"type","checkbox"),a(Y,"type","checkbox"),a(_e,"type","checkbox"),a(L,"class","flex flex-wrap gap-2"),a(le,"class","input"),a(le,"type","number"),a(le,"min","0"),a(V,"class","input"),a(V,"type","number"),a(V,"min","0"),a(be,"class","flex children:grow flex-col"),a(Z,"class","input"),a(Z,"type","number"),a(Z,"min","400"),a(pe,"class","input"),a(pe,"type","number"),a(pe,"min","400"),a(ge,"class","flex children:grow flex-col"),a(Ee,"class","input"),a(Ee,"type","number"),a(We,"class","input"),a(We,"type","number"),a(Ue,"class","flex children:grow flex-col"),a(Se,"class","input"),a(Se,"type","number"),a(Se,"min","800"),a(Le,"class","input"),a(Le,"type","number"),a(Le,"min","400"),a(Ne,"class","flex children:grow flex-col"),a(te,"class","flex flex-row gap-2 flex-wrap"),a(et,"class","text-accent dark:text-darkAccent font-700"),a(Pe,"class","grow"),a(xt,"class","text-accent dark:text-darkAccent font-700"),a(qe,"class","grow"),a(Re,"class","flex"),a(ln,"class","text-accent dark:text-darkAccent font-700"),a(Be,"class","grow"),a(cn,"class","text-accent dark:text-darkAccent font-700"),a(Ve,"class","grow"),a(vt,"class","flex"),a(mn,"class","text-accent dark:text-darkAccent font-700"),a(Ge,"class","grow"),a(yn,"class","text-accent dark:text-darkAccent font-700"),a(Je,"class","grow"),a(_t,"class","flex"),a(Cn,"class","text-accent dark:text-darkAccent font-700"),a(Ye,"class","grow"),a(On,"class","text-accent dark:text-darkAccent font-700"),a(Xe,"class","grow"),a(bt,"class","flex"),a(jt,"class","mb-2"),a(gt,"type","checkbox"),a(yt,"type","checkbox"),a(nt,"class","flex gap-2"),a(Fe,"class","input"),t[19]===void 0&&zt(()=>t[55].call(Fe)),a(Ke,"class","input"),a(Ke,"type","number"),a(Qe,"class","input"),a(Qe,"type","number"),a(He,"class","flex gap-2"),a(Ze,"class","input grow"),a(Ze,"id","title"),a(Rt,"class","btn"),a(Rt,"type","submit"),a(ot,"class","flex gap-1"),a($e,"class","input grow"),a($e,"id","url"),a(Ht,"class","btn"),a(Ht,"id","open-url"),a(lt,"class","flex gap-1"),a(it,"class","flex flex-col gap-1")},m(w,I){v(w,e,I),v(w,n,I),v(w,i,I),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,h),v(w,y,I),v(w,g,I),v(w,b,I),v(w,L,I),r(L,R),r(R,F),r(R,H),H.checked=t[3],r(L,N),r(L,A),r(A,C),r(A,z),z.checked=t[2],r(L,j),r(L,S),r(S,P),r(S,U),U.checked=t[4],r(L,X),r(L,$),r($,ce),r($,Y),Y.checked=t[5],r(L,fe),r(L,x),r(x,he),r(x,_e),_e.checked=t[6],v(w,ie,I),v(w,ke,I),v(w,ze,I),v(w,te,I),r(te,be),r(be,de),r(de,oe),r(de,le),B(le,t[13]),r(be,Ae),r(be,ee),r(ee,D),r(ee,V),B(V,t[14]),r(te,ne),r(te,ge),r(ge,je),r(je,Oe),r(je,Z),B(Z,t[7]),r(ge,q),r(ge,ue),r(ue,J),r(ue,pe),B(pe,t[8]),r(te,Jt),r(te,Ue),r(Ue,ct),r(ct,Yt),r(ct,Ee),B(Ee,t[9]),r(Ue,Xt),r(Ue,ft),r(ft,Kt),r(ft,We),B(We,t[10]),r(te,Qt),r(te,Ne),r(Ne,K),r(K,Ot),r(K,Se),B(Se,t[11]),r(Ne,Pt),r(Ne,xe),r(xe,Et),r(xe,Le),B(Le,t[12]),v(w,dt,I),v(w,pt,I),v(w,ht,I),v(w,Te,I),r(Te,Re),r(Re,Pe),r(Pe,et),r(Pe,Wt),r(Pe,tt),r(tt,Dt),r(tt,ni),r(Pe,qi),r(Pe,Zt),r(Zt,Bi),r(Zt,ii),r(Re,Vi),r(Re,qe),r(qe,xt),r(qe,Gi),r(qe,en),r(en,Ji),r(en,oi),r(qe,Yi),r(qe,nn),r(nn,Xi),r(nn,li),r(Te,Ki),r(Te,vt),r(vt,Be),r(Be,ln),r(Be,Qi),r(Be,rn),r(rn,Zi),r(rn,ri),r(Be,$i),r(Be,un),r(un,xi),r(un,si),r(vt,eo),r(vt,Ve),r(Ve,cn),r(Ve,to),r(Ve,fn),r(fn,no),r(fn,ui),r(Ve,io),r(Ve,pn),r(pn,oo),r(pn,ai),r(Te,lo),r(Te,_t),r(_t,Ge),r(Ge,mn),r(Ge,ro),r(Ge,vn),r(vn,so),r(vn,ci),r(Ge,uo),r(Ge,bn),r(bn,ao),r(bn,fi),r(_t,co),r(_t,Je),r(Je,yn),r(Je,fo),r(Je,wn),r(wn,po),r(wn,di),r(Je,ho),r(Je,Mn),r(Mn,mo),r(Mn,pi),r(Te,vo),r(Te,bt),r(bt,Ye),r(Ye,Cn),r(Ye,_o),r(Ye,zn),r(zn,bo),r(zn,hi),r(Ye,go),r(Ye,Ln),r(Ln,yo),r(Ln,mi),r(bt,wo),r(bt,Xe),r(Xe,On),r(Xe,ko),r(Xe,Pn),r(Pn,Mo),r(Pn,vi),r(Xe,To),r(Xe,Wn),r(Wn,Co),r(Wn,_i),v(w,bi,I),v(w,gi,I),v(w,yi,I),v(w,jt,I),v(w,wi,I),v(w,nt,I),r(nt,jn),r(jn,gt),gt.checked=t[15],r(jn,zo),r(nt,So),r(nt,Rn),r(Rn,yt),yt.checked=t[16],r(Rn,Lo),v(w,ki,I),v(w,He,I),r(He,Hn),r(Hn,Ao),r(Hn,Fe);for(let me=0;me<Me.length;me+=1)Me[me].m(Fe,null);Ct(Fe,t[19]),r(He,Oo),r(He,Fn),r(Fn,Po),r(Fn,Ke),B(Ke,t[17]),r(He,Eo),r(He,In),r(In,Wo),r(In,Qe),B(Qe,t[18]),v(w,Mi,I),v(w,Ti,I),v(w,Ci,I),v(w,it,I),r(it,ot),r(ot,Ze),B(Ze,t[27]),r(ot,Do),r(ot,Rt),r(it,jo),r(it,lt),r(lt,$e),B($e,t[21]),r(lt,Ro),r(lt,Ht),zi||(Ho=[E(o,"click",t[39]),E(u,"click",t[32]),E(c,"click",t[31]),E(d,"click",t[33]),E(h,"click",t[35]),E(H,"change",t[40]),E(z,"change",t[41]),E(U,"change",t[42]),E(Y,"change",t[43]),E(_e,"change",t[44]),E(le,"input",t[45]),E(V,"input",t[46]),E(Z,"input",t[47]),E(pe,"input",t[48]),E(Ee,"input",t[49]),E(We,"input",t[50]),E(Se,"input",t[51]),E(Le,"input",t[52]),E(gt,"change",t[53]),E(yt,"change",t[54]),E(Fe,"change",t[55]),E(Ke,"input",t[56]),E(Qe,"input",t[57]),E(Ze,"input",t[58]),E(ot,"submit",Yn(t[30])),E($e,"input",t[59]),E(lt,"submit",Yn(t[29]))],zi=!0)},p(w,I){if(I[0]&8&&(H.checked=w[3]),I[0]&4&&(z.checked=w[2]),I[0]&16&&(U.checked=w[4]),I[0]&32&&(Y.checked=w[5]),I[0]&64&&(_e.checked=w[6]),I[0]&8192&&re(le.value)!==w[13]&&B(le,w[13]),I[0]&16384&&re(V.value)!==w[14]&&B(V,w[14]),I[0]&128&&re(Z.value)!==w[7]&&B(Z,w[7]),I[0]&256&&re(pe.value)!==w[8]&&B(pe,w[8]),I[0]&512&&re(Ee.value)!==w[9]&&B(Ee,w[9]),I[0]&1024&&re(We.value)!==w[10]&&B(We,w[10]),I[0]&2048&&re(Se.value)!==w[11]&&B(Se,w[11]),I[0]&4096&&re(Le.value)!==w[12]&&B(Le,w[12]),I[0]&33554432&&mt!==(mt=w[25].width+"")&&Q(ni,mt),I[0]&33554432&&$t!==($t=w[25].height+"")&&Q(ii,$t),I[0]&67108864&&tn!==(tn=w[26].width+"")&&Q(oi,tn),I[0]&67108864&&on!==(on=w[26].height+"")&&Q(li,on),I[0]&37748736&&sn!==(sn=w[25].toLogical(w[22]).width+"")&&Q(ri,sn),I[0]&37748736&&an!==(an=w[25].toLogical(w[22]).height+"")&&Q(si,an),I[0]&71303168&&dn!==(dn=w[26].toLogical(w[22]).width+"")&&Q(ui,dn),I[0]&71303168&&hn!==(hn=w[26].toLogical(w[22]).height+"")&&Q(ai,hn),I[0]&8388608&&_n!==(_n=w[23].x+"")&&Q(ci,_n),I[0]&8388608&&gn!==(gn=w[23].y+"")&&Q(fi,gn),I[0]&16777216&&kn!==(kn=w[24].x+"")&&Q(di,kn),I[0]&16777216&&Tn!==(Tn=w[24].y+"")&&Q(pi,Tn),I[0]&12582912&&Sn!==(Sn=w[23].toLogical(w[22]).x+"")&&Q(hi,Sn),I[0]&12582912&&An!==(An=w[23].toLogical(w[22]).y+"")&&Q(mi,An),I[0]&20971520&&En!==(En=w[24].toLogical(w[22]).x+"")&&Q(vi,En),I[0]&20971520&&Dn!==(Dn=w[24].toLogical(w[22]).y+"")&&Q(_i,Dn),I[0]&32768&&(gt.checked=w[15]),I[0]&65536&&(yt.checked=w[16]),I[0]&268435456){wt=w[28];let me;for(me=0;me<wt.length;me+=1){const Fo=$o(w,wt,me);Me[me]?Me[me].p(Fo,I):(Me[me]=il(Fo),Me[me].c(),Me[me].m(Fe,null))}for(;me<Me.length;me+=1)Me[me].d(1);Me.length=wt.length}I[0]&268959744&&Ct(Fe,w[19]),I[0]&131072&&re(Ke.value)!==w[17]&&B(Ke,w[17]),I[0]&262144&&re(Qe.value)!==w[18]&&B(Qe,w[18]),I[0]&134217728&&Ze.value!==w[27]&&B(Ze,w[27]),I[0]&2097152&&$e.value!==w[21]&&B($e,w[21])},d(w){w&&m(e),w&&m(n),w&&m(i),w&&m(y),w&&m(g),w&&m(b),w&&m(L),w&&m(ie),w&&m(ke),w&&m(ze),w&&m(te),w&&m(dt),w&&m(pt),w&&m(ht),w&&m(Te),w&&m(bi),w&&m(gi),w&&m(yi),w&&m(jt),w&&m(wi),w&&m(nt),w&&m(ki),w&&m(He),ut(Me,w),w&&m(Mi),w&&m(Ti),w&&m(Ci),w&&m(it),zi=!1,ae(Ho)}}}function il(t){let e,n=t[65]+"",i,o;return{c(){e=s("option"),i=W(n),e.__value=o=t[65],e.value=e.__value},m(l,u){v(l,e,u),r(e,i)},p:G,d(l){l&&m(e)}}}function ls(t){let e,n,i,o,l,u,f,c,p=Object.keys(t[1]).length>=1,d,k,h,y=p&&el(t),g=t[1][t[0]]&&nl(t);return{c(){e=s("div"),n=s("div"),i=s("input"),o=_(),l=s("button"),l.textContent="New window",u=_(),f=s("br"),c=_(),y&&y.c(),d=_(),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,L){v(b,e,L),r(e,n),r(n,i),B(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||(h=[E(i,"input",t[37]),E(l,"click",t[34])],k=!0)},p(b,L){L[0]&1048576&&i.value!==b[20]&&B(i,b[20]),L[0]&2&&(p=Object.keys(b[1]).length>=1),p?y?y.p(b,L):(y=el(b),y.c(),y.m(e,d)):y&&(y.d(1),y=null),b[1][b[0]]?g?g.p(b,L):(g=nl(b),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},i:G,o:G,d(b){b&&m(e),y&&y.d(),g&&g.d(),k=!1,ae(h)}}}function rs(t,e,n){let i=Ie.label;const o={[Ie.label]:Ie},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,h=!1,y=!1,g=null,b=null,L=null,R=null,F=null,H=null,N=null,A=null,C=1,z=new st(N,A),j=new st(N,A),S=new Tt(g,b),P=new Tt(g,b),U,X,$=!1,ce=!0,Y=null,fe=null,x="default",he="Awesome Tauri Example!";function _e(){Ri(c)}function ie(){o[i].setTitle(he)}function ke(){o[i].hide(),setTimeout(o[i].show,2e3)}function ze(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)}function te(){Ii({multiple:!1}).then(K=>{typeof K=="string"&&o[i].setIcon(K)})}function be(){if(!f)return;const K=new St(f);n(1,o[f]=K,o),K.once("tauri://error",function(){u("Error creating new webview")})}function de(){o[i].innerSize().then(K=>{n(25,S=K),n(7,g=S.width),n(8,b=S.height)}),o[i].outerSize().then(K=>{n(26,P=K)})}function oe(){o[i].innerPosition().then(K=>{n(23,z=K)}),o[i].outerPosition().then(K=>{n(24,j=K),n(13,N=j.x),n(14,A=j.y)})}async function le(K){!K||(U&&U(),X&&X(),X=await K.listen("tauri://move",oe),U=await K.listen("tauri://resize",de))}async function Ae(){await o[i].minimize(),await o[i].requestUserAttention(Vt.Critical),await new Promise(K=>setTimeout(K,3e3)),await o[i].requestUserAttention(null)}function ee(){f=this.value,n(20,f)}function D(){i=Ai(this),n(0,i),n(1,o)}const V=()=>o[i].center();function ne(){d=this.checked,n(3,d)}function ge(){p=this.checked,n(2,p)}function je(){k=this.checked,n(4,k)}function Oe(){h=this.checked,n(5,h)}function Z(){y=this.checked,n(6,y)}function q(){N=re(this.value),n(13,N)}function ue(){A=re(this.value),n(14,A)}function J(){g=re(this.value),n(7,g)}function pe(){b=re(this.value),n(8,b)}function Jt(){L=re(this.value),n(9,L)}function Ue(){R=re(this.value),n(10,R)}function ct(){F=re(this.value),n(11,F)}function Yt(){H=re(this.value),n(12,H)}function Ee(){$=this.checked,n(15,$)}function Xt(){ce=this.checked,n(16,ce)}function ft(){x=Ai(this),n(19,x),n(28,l)}function Kt(){Y=re(this.value),n(17,Y)}function We(){fe=re(this.value),n(18,fe)}function Qt(){he=this.value,n(27,he)}function Ne(){c=this.value,n(21,c)}return t.$$set=K=>{"onMessage"in K&&n(36,u=K.onMessage)},t.$$.update=()=>{var K,Ot,Se,Pt,xe,Et,Le,dt,pt,ht,Te,Re,Pe,et,Wt,tt,Dt;t.$$.dirty[0]&3&&(o[i],oe(),de()),t.$$.dirty[0]&7&&((K=o[i])==null||K.setResizable(p)),t.$$.dirty[0]&11&&(d?(Ot=o[i])==null||Ot.maximize():(Se=o[i])==null||Se.unmaximize()),t.$$.dirty[0]&19&&((Pt=o[i])==null||Pt.setDecorations(k)),t.$$.dirty[0]&35&&((xe=o[i])==null||xe.setAlwaysOnTop(h)),t.$$.dirty[0]&67&&((Et=o[i])==null||Et.setFullscreen(y)),t.$$.dirty[0]&387&&g&&b&&((Le=o[i])==null||Le.setSize(new Tt(g,b))),t.$$.dirty[0]&1539&&(L&&R?(dt=o[i])==null||dt.setMinSize(new Zn(L,R)):(pt=o[i])==null||pt.setMinSize(null)),t.$$.dirty[0]&6147&&(F>800&&H>400?(ht=o[i])==null||ht.setMaxSize(new Zn(F,H)):(Te=o[i])==null||Te.setMaxSize(null)),t.$$.dirty[0]&24579&&N!==null&&A!==null&&((Re=o[i])==null||Re.setPosition(new st(N,A))),t.$$.dirty[0]&3&&((Pe=o[i])==null||Pe.scaleFactor().then(mt=>n(22,C=mt))),t.$$.dirty[0]&3&&le(o[i]),t.$$.dirty[0]&32771&&((et=o[i])==null||et.setCursorGrab($)),t.$$.dirty[0]&65539&&((Wt=o[i])==null||Wt.setCursorVisible(ce)),t.$$.dirty[0]&524291&&((tt=o[i])==null||tt.setCursorIcon(x)),t.$$.dirty[0]&393219&&Y!==null&&fe!==null&&((Dt=o[i])==null||Dt.setCursorPosition(new st(Y,fe)))},[i,o,p,d,k,h,y,g,b,L,R,F,H,N,A,$,ce,Y,fe,x,f,c,C,z,j,S,P,he,l,_e,ie,ke,ze,te,be,Ae,u,ee,D,V,ne,ge,je,Oe,Z,q,ue,J,pe,Jt,Ue,ct,Yt,Ee,Xt,ft,Kt,We,Qt,Ne]}class ss extends we{constructor(e){super(),ye(this,e,rs,ls,ve,{onMessage:36},null,[-1,-1,-1])}}function Gl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:at(e)}})]})})}function us(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,O({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:at(e)}})]})})}function as(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]})})}function Jl(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]})})}function Yl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:Gl,registerAll:us,isRegistered:as,unregister:Jl,unregisterAll:Yl});function ol(t,e,n){const i=t.slice();return i[9]=e[n],i}function ll(t){let e,n=t[9]+"",i,o,l,u,f;function c(){return t[8](t[9])}return{c(){e=s("div"),i=W(n),o=_(),l=s("button"),l.textContent="Unregister",a(l,"class","btn"),a(l,"type","button"),a(e,"class","flex justify-between")},m(p,d){v(p,e,d),r(e,i),r(e,o),r(e,l),u||(f=E(l,"click",c),u=!0)},p(p,d){t=p,d&2&&n!==(n=t[9]+"")&&Q(i,n)},d(p){p&&m(e),u=!1,f()}}}function rl(t){let e,n,i,o,l;return{c(){e=s("br"),n=_(),i=s("button"),i.textContent="Unregister all",a(i,"class","btn"),a(i,"type","button")},m(u,f){v(u,e,f),v(u,n,f),v(u,i,f),o||(l=E(i,"click",t[5]),o=!0)},p:G,d(u){u&&m(e),u&&m(n),u&&m(i),o=!1,l()}}}function cs(t){let e,n,i,o,l,u,f,c,p,d,k,h=t[1],y=[];for(let b=0;b<h.length;b+=1)y[b]=ll(ol(t,h,b));let g=t[1].length>1&&rl(t);return{c(){e=s("div"),n=s("input"),i=_(),o=s("button"),o.textContent="Register",l=_(),u=s("br"),f=_(),c=s("div");for(let b=0;b<y.length;b+=1)y[b].c();p=_(),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,L){v(b,e,L),r(e,n),B(n,t[0]),r(e,i),r(e,o),v(b,l,L),v(b,u,L),v(b,f,L),v(b,c,L);for(let R=0;R<y.length;R+=1)y[R].m(c,null);r(c,p),g&&g.m(c,null),d||(k=[E(n,"input",t[7]),E(o,"click",t[3])],d=!0)},p(b,[L]){if(L&1&&n.value!==b[0]&&B(n,b[0]),L&18){h=b[1];let R;for(R=0;R<h.length;R+=1){const F=ol(b,h,R);y[R]?y[R].p(F,L):(y[R]=ll(F),y[R].c(),y[R].m(c,p))}for(;R<y.length;R+=1)y[R].d(1);y.length=h.length}b[1].length>1?g?g.p(b,L):(g=rl(b),g.c(),g.m(c,null)):g&&(g.d(1),g=null)},i:G,o:G,d(b){b&&m(e),b&&m(l),b&&m(u),b&&m(f),b&&m(c),ut(y,b),g&&g.d(),d=!1,ae(k)}}}function fs(t,e,n){let i,{onMessage:o}=e;const l=yl([]);_l(t,l,h=>n(1,i=h));let u="CmdOrControl+X";function f(){const h=u;Gl(h,()=>{o(`Shortcut ${h} triggered`)}).then(()=>{l.update(y=>[...y,h]),o(`Shortcut ${h} registered successfully`)}).catch(o)}function c(h){const y=h;Jl(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=h=>c(h);return t.$$set=h=>{"onMessage"in h&&n(6,o=h.onMessage)},[u,i,l,f,c,p,o,d,k]}class ds extends we{constructor(e){super(),ye(this,e,fs,cs,ve,{onMessage:6})}}function sl(t){let e,n,i,o,l,u,f;return{c(){e=s("br"),n=_(),i=s("input"),o=_(),l=s("button"),l.textContent="Write",a(i,"class","input"),a(i,"placeholder","write to stdin"),a(l,"class","btn")},m(c,p){v(c,e,p),v(c,n,p),v(c,i,p),B(i,t[4]),v(c,o,p),v(c,l,p),u||(f=[E(i,"input",t[14]),E(l,"click",t[8])],u=!0)},p(c,p){p&16&&i.value!==c[4]&&B(i,c[4])},d(c){c&&m(e),c&&m(n),c&&m(i),c&&m(o),c&&m(l),u=!1,ae(f)}}}function ps(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j,S=t[5]&&sl(t);return{c(){e=s("div"),n=s("div"),i=W(`Script:
|
|
`),o=s("input"),l=_(),u=s("div"),f=W(`Encoding:
|
|
`),c=s("input"),p=_(),d=s("div"),k=W(`Working directory:
|
|
`),h=s("input"),y=_(),g=s("div"),b=W(`Arguments:
|
|
`),L=s("input"),R=_(),F=s("div"),H=s("button"),H.textContent="Run",N=_(),A=s("button"),A.textContent="Kill",C=_(),S&&S.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(h,"class","grow input"),a(h,"placeholder","Working directory"),a(d,"class","flex items-center gap-1"),a(L,"class","grow input"),a(L,"placeholder","Environment variables"),a(g,"class","flex items-center gap-1"),a(H,"class","btn"),a(A,"class","btn"),a(F,"class","flex children:grow gap-1"),a(e,"class","flex flex-col childre:grow gap-1")},m(P,U){v(P,e,U),r(e,n),r(n,i),r(n,o),B(o,t[0]),r(e,l),r(e,u),r(u,f),r(u,c),B(c,t[3]),r(e,p),r(e,d),r(d,k),r(d,h),B(h,t[1]),r(e,y),r(e,g),r(g,b),r(g,L),B(L,t[2]),r(e,R),r(e,F),r(F,H),r(F,N),r(F,A),r(e,C),S&&S.m(e,null),z||(j=[E(o,"input",t[10]),E(c,"input",t[11]),E(h,"input",t[12]),E(L,"input",t[13]),E(H,"click",t[6]),E(A,"click",t[7])],z=!0)},p(P,[U]){U&1&&o.value!==P[0]&&B(o,P[0]),U&8&&c.value!==P[3]&&B(c,P[3]),U&2&&h.value!==P[1]&&B(h,P[1]),U&4&&L.value!==P[2]&&B(L,P[2]),P[5]?S?S.p(P,U):(S=sl(P),S.c(),S.m(e,null)):S&&(S.d(1),S=null)},i:G,o:G,d(P){P&&m(e),S&&S.d(),z=!1,ae(j)}}}function hs(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="",h;function y(){return p.split(" ").reduce((C,z)=>{let[j,S]=z.split("=");return{...C,[j]:S}},{})}function g(){n(5,h=null);const C=new Ml(o,[...l,f],{cwd:c||null,env:y(),encoding:d});C.on("close",z=>{u(`command finished with code ${z.code} and signal ${z.signal}`),n(5,h=null)}),C.on("error",z=>u(`command error: "${z}"`)),C.stdout.on("data",z=>u(`command stdout: "${z}"`)),C.stderr.on("data",z=>u(`command stderr: "${z}"`)),C.spawn().then(z=>{n(5,h=z)}).catch(u)}function b(){h.kill().then(()=>u("killed child process")).catch(u)}function L(){h.write(k).catch(u)}function R(){f=this.value,n(0,f)}function F(){d=this.value,n(3,d)}function H(){c=this.value,n(1,c)}function N(){p=this.value,n(2,p)}function A(){k=this.value,n(4,k)}return t.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[f,c,p,d,k,h,g,b,L,u,R,F,H,N,A]}class ms extends we{constructor(e){super(),ye(this,e,hs,ps,ve,{onMessage:9})}}function Ni(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,Gt("tauri://update-status",function(n){t(n==null?void 0:n.payload)})]})})}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){Ni(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}),ti("tauri://update-install").catch(function(l){throw t(),l})})]})})}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){Fl("tauri://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}),Ni(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}),ti("tauri://update").catch(function(l){throw t(),l})})]})})}Object.freeze({__proto__:null,onUpdaterEvent:Ni,installUpdate:Xl,checkUpdate:Kl});function vs(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){v(n,e,i)},p:G,d(n){n&&m(e)}}}function _s(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",a(e,"class","btn")},m(o,l){v(o,e,l),n||(i=E(e,"click",t[4]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function bs(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",a(e,"class","btn")},m(o,l){v(o,e,l),n||(i=E(e,"click",t[3]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function gs(t){let e;function n(l,u){return!l[0]&&!l[2]?bs:!l[1]&&l[2]?_s:vs}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){v(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:G,o:G,d(l){l&&m(e),o.d()}}}function ys(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Gt("tauri://update-status",i)}),Di(()=>{o&&o()});let l,u,f;async function c(){n(0,l=!0);try{const{shouldUpdate:d,manifest:k}=await Kl();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 Xl(),i("Installation complete, restart required."),await Fi()}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 ws extends we{constructor(e){super(),ye(this,e,ys,gs,ve,{onMessage:5})}}function Ql(t){return M(this,void 0,void 0,function(){return T(this,function(e){return[2,O({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})]})})}function Zl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,O({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})]})})}Object.freeze({__proto__:null,writeText:Ql,readText:Zl});function ks(t){let e,n,i,o,l,u,f,c;return{c(){e=s("div"),n=s("input"),i=_(),o=s("button"),o.textContent="Write",l=_(),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){v(p,e,d),r(e,n),B(n,t[0]),r(e,i),r(e,o),r(e,l),r(e,u),f||(c=[E(n,"input",t[4]),E(o,"click",t[1]),E(u,"click",t[2])],f=!0)},p(p,[d]){d&1&&n.value!==p[0]&&B(n,p[0])},i:G,o:G,d(p){p&&m(e),f=!1,ae(c)}}}function Ms(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 Ts extends we{constructor(e){super(),ye(this,e,Ms,ks,ve,{onMessage:3})}}function Cs(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){v(n,e,i)},p:G,i:G,o:G,d(n){n&&m(e)}}}function zs(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 Mt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);l(f)}catch(f){u(f)}}),Di(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class Ss extends we{constructor(e){super(),ye(this,e,zs,Cs,ve,{onMessage:0})}}function ul(t,e,n){const i=t.slice();return i[23]=e[n],i}function al(t,e,n){const i=t.slice();return i[26]=e[n],i}function cl(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b;function L(C,z){return C[2]?As:Ls}let R=L(t),F=R(t);function H(C,z){return C[1]?Ps:Os}let N=H(t),A=N(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=_(),o=s("span"),l=s("span"),F.c(),f=_(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=_(),d=s("span"),A.c(),h=_(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',a(n,"class","text-darkPrimaryText"),a(l,"title",u=t[2]?"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[1]?"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(C,z){v(C,e,z),r(e,n),r(e,i),r(e,o),r(o,l),F.m(l,null),r(o,f),r(o,c),r(o,p),r(o,d),A.m(d,null),r(o,h),r(o,y),g||(b=[E(l,"click",t[11]),E(c,"click",t[8]),E(d,"click",t[9]),E(y,"click",t[10])],g=!0)},p(C,z){R!==(R=L(C))&&(F.d(1),F=R(C),F&&(F.c(),F.m(l,null))),z&4&&u!==(u=C[2]?"Switch to Light mode":"Switch to Dark mode")&&a(l,"title",u),N!==(N=H(C))&&(A.d(1),A=N(C),A&&(A.c(),A.m(d,null))),z&2&&k!==(k=C[1]?"Restore":"Maximize")&&a(d,"title",k)},d(C){C&&m(e),F.d(),A.d(),g=!1,ae(b)}}}function Ls(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-moon")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function As(t){let e;return{c(){e=s("div"),a(e,"class","i-ph-sun")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Os(t){let e;return{c(){e=s("div"),a(e,"class","i-codicon-chrome-maximize")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ps(t){let e;return{c(){e=s("div"),a(e,"class","i-codicon-chrome-restore")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function fl(t){let e,n,i,o,l,u,f,c,p;function d(y,g){return y[2]?Ws:Es}let k=d(t),h=k(t);return{c(){e=s("a"),h.c(),n=_(),i=s("br"),o=_(),l=s("div"),u=_(),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){v(y,e,g),h.m(e,null),v(y,n,g),v(y,i,g),v(y,o,g),v(y,l,g),v(y,u,g),v(y,f,g),c||(p=E(e,"click",t[11]),c=!0)},p(y,g){k!==(k=d(y))&&(h.d(1),h=k(y),h&&(h.c(),h.m(e,null)))},d(y){y&&m(e),h.d(),y&&m(n),y&&m(i),y&&m(o),y&&m(l),y&&m(u),y&&m(f),c=!1,p()}}}function Es(t){let e,n;return{c(){e=W(`Switch to Dark mode
|
|
`),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function Ws(t){let e,n;return{c(){e=W(`Switch to Light mode
|
|
`),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function dl(t){let e,n,i,o,l,u=t[26].label+"",f,c,p,d;function k(){return t[18](t[26])}return{c(){e=s("a"),n=s("div"),o=_(),l=s("p"),f=W(u),a(n,"class",i=t[26].icon+" mr-2"),a(e,"href","##"),a(e,"class",c="nv "+(t[0]===t[26]?"nv_selected":""))},m(h,y){v(h,e,y),r(e,n),r(e,o),r(e,l),r(l,f),p||(d=E(e,"click",k),p=!0)},p(h,y){t=h,y&1&&c!==(c="nv "+(t[0]===t[26]?"nv_selected":""))&&a(e,"class",c)},d(h){h&&m(e),p=!1,d()}}}function pl(t){let e,n=t[23].html+"",i;return{c(){e=new lr(!1),i=Wi(),e.a=i},m(o,l){e.m(n,o,l),v(o,i,l)},p(o,l){l&32&&n!==(n=o[23].html+"")&&e.p(n)},d(o){o&&m(i),o&&e.d()}}}function Ds(t){let e,n,i,o,l,u,f,c,p,d,k,h,y,g,b,L,R,F,H,N,A,C,z,j,S,P=t[0].label+"",U,X,$,ce,Y,fe,x,he,_e,ie,ke,ze,te,be,de,oe,le,Ae,ee=t[4]&&cl(t),D=!t[4]&&fl(t),V=t[6],ne=[];for(let q=0;q<V.length;q+=1)ne[q]=dl(al(t,V,q));var ge=t[0].component;function je(q){return{props:{onMessage:q[13],insecureRenderHtml:q[14]}}}ge&&(Y=new ge(je(t)));let Oe=t[5],Z=[];for(let q=0;q<Oe.length;q+=1)Z[q]=pl(ul(t,Oe,q));return{c(){ee&&ee.c(),e=_(),n=s("div"),i=s("aside"),o=s("img"),u=_(),D&&D.c(),f=_(),c=s("a"),c.innerHTML=`Documentation
|
|
<span class="i-codicon-link-external"></span>`,p=_(),d=s("a"),d.innerHTML=`Github
|
|
<span class="i-codicon-link-external"></span>`,k=_(),h=s("a"),h.innerHTML=`Source
|
|
<span class="i-codicon-link-external"></span>`,y=_(),g=s("br"),b=_(),L=s("div"),R=_(),F=s("br"),H=_(),N=s("div");for(let q=0;q<ne.length;q+=1)ne[q].c();C=_(),z=s("main"),j=s("div"),S=s("h1"),U=W(P),X=_(),$=s("div"),ce=s("div"),Y&&Kn(Y.$$.fragment),fe=_(),x=s("div"),he=s("div"),_e=_(),ie=s("div"),ke=s("p"),ke.textContent="Console",ze=_(),te=s("div"),te.innerHTML='<div class="i-codicon-clear-all"></div>',be=_(),de=s("div");for(let q=0;q<Z.length;q+=1)Z[q].c();a(o,"class","self-center p-7 cursor-pointer"),er(o.src,l="tauri_logo.png")||a(o,"src",l),a(o,"alt","Tauri logo"),a(c,"class","nv justify-between h-8"),a(c,"target","_blank"),a(c,"href","https://tauri.app/v1/guides/"),a(d,"class","nv justify-between h-8"),a(d,"target","_blank"),a(d,"href","https://github.com/tauri-apps/tauri"),a(h,"class","nv justify-between h-8"),a(h,"target","_blank"),a(h,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(L,"class","bg-white/5 h-2px"),a(N,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(i,"class",A="w-75 "+(t[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),a(ce,"class","mr-2"),a($,"class","overflow-y-auto"),a(j,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a(he,"class","bg-black/20 h-2px cursor-ns-resize"),a(ke,"class","font-semibold"),a(te,"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(ie,"class","flex justify-between items-center px-2"),a(de,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(x,"id","console"),a(x,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(z,"class","flex-1 bg-primary dark:bg-darkPrimary transition-colors-250 grid grid-rows-[2fr_auto]"),a(n,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(q,ue){ee&&ee.m(q,ue),v(q,e,ue),v(q,n,ue),r(n,i),r(i,o),r(i,u),D&&D.m(i,null),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,h),r(i,y),r(i,g),r(i,b),r(i,L),r(i,R),r(i,F),r(i,H),r(i,N);for(let J=0;J<ne.length;J+=1)ne[J].m(N,null);r(n,C),r(n,z),r(z,j),r(j,S),r(S,U),r(j,X),r(j,$),r($,ce),Y&&qt(Y,ce,null),r(z,fe),r(z,x),r(x,he),r(x,_e),r(x,ie),r(ie,ke),r(ie,ze),r(ie,te),r(x,be),r(x,de);for(let J=0;J<Z.length;J+=1)Z[J].m(de,null);t[19](x),oe=!0,le||(Ae=[E(o,"click",t[17]),E(he,"mousedown",t[16]),E(te,"click",t[15])],le=!0)},p(q,[ue]){if(q[4]?ee?ee.p(q,ue):(ee=cl(q),ee.c(),ee.m(e.parentNode,e)):ee&&(ee.d(1),ee=null),q[4]?D&&(D.d(1),D=null):D?D.p(q,ue):(D=fl(q),D.c(),D.m(i,f)),ue&193){V=q[6];let J;for(J=0;J<V.length;J+=1){const pe=al(q,V,J);ne[J]?ne[J].p(pe,ue):(ne[J]=dl(pe),ne[J].c(),ne[J].m(N,null))}for(;J<ne.length;J+=1)ne[J].d(1);ne.length=V.length}if((!oe||ue&16&&A!==(A="w-75 "+(q[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&a(i,"class",A),(!oe||ue&1)&&P!==(P=q[0].label+"")&&Q(U,P),ge!==(ge=q[0].component)){if(Y){xn();const J=Y;De(J.$$.fragment,1,0,()=>{Bt(J,1)}),ei()}ge?(Y=new ge(je(q)),Kn(Y.$$.fragment),Ce(Y.$$.fragment,1),qt(Y,ce,null)):Y=null}if(ue&32){Oe=q[5];let J;for(J=0;J<Oe.length;J+=1){const pe=ul(q,Oe,J);Z[J]?Z[J].p(pe,ue):(Z[J]=pl(pe),Z[J].c(),Z[J].m(de,null))}for(;J<Z.length;J+=1)Z[J].d(1);Z.length=Oe.length}},i(q){oe||(Y&&Ce(Y.$$.fragment,q),oe=!0)},o(q){Y&&De(Y.$$.fragment,q),oe=!1},d(q){ee&&ee.d(q),q&&m(e),q&&m(n),D&&D.d(),ut(ne,q),Y&&Bt(Y),ut(Z,q),t[19](null),le=!1,ae(Ae)}}}let hl=50;function ml(t){const e=document.querySelector("html");t?e.classList.add("dark"):e.classList.remove("dark"),localStorage.setItem("theme",t?"dark":"")}function js(t,e,n){let i;Ie.label!=="main"&&Ie.onCloseRequested(async P=>{await confirm("Are you sure?")||P.preventDefault()}),Ie.onFileDropEvent(P=>{b(`File drop: ${JSON.stringify(P.payload)}`)});const o=[{label:"Welcome",component:kr,icon:"i-ph-hand-waving"},{label:"Communication",component:Lr,icon:"i-codicon-radio-tower"},{label:"CLI",component:Cr,icon:"i-codicon-terminal"},{label:"Dialog",component:Nr,icon:"i-codicon-multiple-windows"},{label:"File system",component:Gr,icon:"i-codicon-files"},{label:"HTTP",component:es,icon:"i-ph-globe-hemisphere-west"},{label:"Notifications",component:os,icon:"i-codicon-bell-dot"},{label:"Window",component:ss,icon:"i-codicon-window"},{label:"Shortcuts",component:ds,icon:"i-codicon-record-keys"},{label:"Shell",component:ms,icon:"i-codicon-terminal-bash"},{label:"Updater",component:ws,icon:"i-codicon-cloud-download"},{label:"Clipboard",component:Ts,icon:"i-codicon-clippy"},{label:"WebRTC",component:Ss,icon:"i-ph-broadcast"}];let l=o[0];function u(P){n(0,l=P)}let f;Mt(async()=>{const P=It();n(1,f=await P.isMaximized()),Gt("tauri://resize",async()=>{n(1,f=await P.isMaximized())})});function c(){It().minimize()}async function p(){const P=It();await P.isMaximized()?P.unmaximize():P.maximize()}let d=!1;async function k(){d||(d=await Ul("Are you sure that you want to close this window?",{title:"Tauri API"}),d&&It().close())}let h;Mt(()=>{n(2,h=localStorage.getItem("theme")=="dark"),ml(h)});function y(){n(2,h=!h),ml(h)}let g=yl([]);_l(t,g,P=>n(5,i=P));function b(P){g.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof P=="string"?P:JSON.stringify(P,null,1))+"</pre>"},...U])}function L(P){g.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+P+"</pre>"},...U])}function R(){g.update(()=>[])}let F,H,N;function A(P){N=P.clientY;const U=window.getComputedStyle(F);H=parseInt(U.height,10);const X=ce=>{const Y=ce.clientY-N,fe=H-Y;n(3,F.style.height=`${fe<hl?hl:fe}px`,F)},$=()=>{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",X)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",X)}let C;Mt(async()=>{n(4,C=await El()==="win32")});const z=()=>Ri("https://tauri.app/"),j=P=>u(P);function S(P){Xn[P?"unshift":"push"](()=>{F=P,n(3,F)})}return[l,f,h,F,C,i,o,u,c,p,k,y,g,b,L,R,A,z,j,S]}class Rs extends we{constructor(e){super(),ye(this,e,js,Ds,ve,{})}}new Rs({target:document.querySelector("#app")});
|