2022-07-05 22:57:53 +03:00
|
|
|
const xl=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 a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).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)}};xl();function G(){}function ml(t){return t()}function Fo(){return Object.create(null)}function ae(t){t.forEach(ml)}function $l(t){return typeof t=="function"}function ve(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Nn;function er(t,e){return Nn||(Nn=document.createElement("a")),Nn.href=e,t===Nn.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 vl(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 Ei(){return W("")}function L(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 u(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 Oi(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Un(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 Ut;function Nt(t){Ut=t}function _l(){if(!Ut)throw new Error("Function called outside component initialization");return Ut}function Mt(t){_l().$$.on_mount.push(t)}function Wi(t){_l().$$.on_destroy.push(t)}const Ft=[],Xn=[],Bn=[],Io=[],rr=Promise.resolve();let Pi=!1;function sr(){Pi||(Pi=!0,rr.then(bl))}function zt(t){Bn.push(t)}const Si=new Set;let qn=0;function bl(){const t=Ut;do{for(;qn<Ft.length;){const e=Ft[qn];qn++,Nt(e),ur(e.$$)}for(Nt(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(;Io.length;)Io.pop()();Pi=!1,Si.clear(),Nt(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 $n(){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)}}function Kn(t){t&&t.c()}function qt(t,e,n,i){const{fragment:o,on_mount:l,on_destroy:a,after_update:f}=t.$$;o&&o.m(e,n),i||zt(()=>{const c=l.map(ml).filter($l);a?a.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.
|
2022-07-04 04:15:23 +03:00
|
|
|
`),stderr:f.join(`
|
2022-07-05 22:57:53 +03:00
|
|
|
`)})}),n.spawn().catch(l)})]})})},e}(Gn);function ji(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})]})})}Object.freeze({__proto__:null,Command:Ml,Child:kl,EventEmitter:Gn,open:ji});function Tl(t,e){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})]})})}function Cl(t,e,n){return M(this,void 0,void 0,function(){return T(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:typeof n=="string"?n:JSON.stringify(n)}})];case 1:return i.sent(),[2]}})})}function Ri(t,e,n){return M(this,void 0,void 0,function(){var i=this;return T(this,function(o){return[2,A({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:at(n)}}).then(function(l){return function(){return M(i,void 0,void 0,function(){return T(this,function(a){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,Ri(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 Al(){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"],Ol=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,Ri(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}(),Pl=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return Di(e,t),e.prototype.scaleFactor=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})]})})},e.prototype.innerPosition=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new st(o,l)})]})})},e.prototype.outerPosition=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(function(i){var o=i.x,l=i.y;return new st(o,l)})]})})},e.prototype.innerSize=function(){return M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(function(i){var o=i.width,l=i.height;return new Tt(o,l)})
|
|
|
|
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:Ol,WindowManager:Pl,CloseRequestedEvent:Ll,getCurrent:It,getAll:Al,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
|
2022-07-04 04:15:23 +03:00
|
|
|
`:`
|
2022-07-05 22:57:53 +03:00
|
|
|
`;function El(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"platform"}})]})})}function vr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"version"}})]})})}function _r(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"osType"}})]})})}function br(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"arch"}})]})})}function gr(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Os",message:{cmd:"tempdir"}})]})})}Object.freeze({__proto__:null,EOL: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,A({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function Dl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function jl(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName: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,A({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})]})})}function Hi(){return M(this,void 0,void 0,function(){return T(this,function(t){return[2,A({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:Rl,relaunch:Hi});function yr(t){let e,n,i,o,l,a,f,c,p,d,k,b,y,g,h,O,D,N,R,H,C,z,S,j,P,F;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
|
2022-07-04 04:15:23 +03:00
|
|
|
development process. In the future, this app will be used on Tauri's integration
|
2022-07-05 22:57:53 +03:00
|
|
|
tests.`,n=_(),i=s("br"),o=_(),l=s("br"),a=_(),f=s("pre"),c=W("App name: "),p=s("code"),d=W(t[2]),k=W(`
|
|
|
|
App version: `),b=s("code"),y=W(t[0]),g=W(`
|
|
|
|
Tauri version: `),h=s("code"),O=W(t[1]),D=W(`
|
|
|
|
`),N=_(),R=s("br"),H=_(),C=s("div"),z=s("button"),z.textContent="Close application",S=_(),j=s("button"),j.textContent="Relaunch application",u(z,"class","btn"),u(j,"class","btn"),u(C,"class","flex flex-wrap gap-1 shadow-")},m(q,X){v(q,e,X),v(q,n,X),v(q,i,X),v(q,o,X),v(q,l,X),v(q,a,X),v(q,f,X),r(f,c),r(f,p),r(p,d),r(f,k),r(f,b),r(b,y),r(f,g),r(f,h),r(h,O),r(f,D),v(q,N,X),v(q,R,X),v(q,H,X),v(q,C,X),r(C,z),r(C,S),r(C,j),P||(F=[L(z,"click",t[3]),L(j,"click",t[4])],P=!0)},p(q,[X]){X&4&&Q(d,q[2]),X&1&&Q(y,q[0]),X&2&&Q(O,q[1])},i:G,o:G,d(q){q&&m(e),q&&m(n),q&&m(i),q&&m(o),q&&m(l),q&&m(a),q&&m(f),q&&m(N),q&&m(R),q&&m(H),q&&m(C),P=!1,ae(F)}}}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 a(){await Rl()}async function f(){await Hi()}return[i,o,l,a,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,A({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Hl});function Mr(t){let e,n,i,o,l,a,f,c,p,d,k,b,y;return{c(){e=s("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments:
|
2022-07-04 04:15:23 +03:00
|
|
|
<code class="code-block flex flex-wrap my-2"><pre> --config <PATH>
|
|
|
|
--theme <light|dark|system>
|
|
|
|
--verbose</pre></code>
|
2022-07-05 22:57:53 +03:00
|
|
|
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.",a=_(),f=s("br"),c=_(),p=s("br"),d=_(),k=s("button"),k.textContent="Get matches",u(l,"class","note"),u(k,"class","btn"),u(k,"id","cli-matches")},m(g,h){v(g,e,h),v(g,n,h),v(g,i,h),v(g,o,h),v(g,l,h),v(g,a,h),v(g,f,h),v(g,c,h),v(g,p,h),v(g,d,h),v(g,k,h),b||(y=L(k,"click",t[0]),b=!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(a),g&&m(f),g&&m(c),g&&m(p),g&&m(d),g&&m(k),b=!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,Ri(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,a,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=_(),a=s("button"),a.textContent="Send event to Rust",u(n,"class","btn"),u(n,"id","log"),u(o,"class","btn"),u(o,"id","request"),u(a,"class","btn"),u(a,"id","event")},m(p,d){v(p,e,d),r(e,n),r(e,i),r(e,o),r(e,l),r(e,a),f||(c=[L(n,"click",t[0]),L(o,"click",t[1]),L(a,"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)}),Wi(()=>{o&&o()});function l(){Qn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function a(){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,a,f,i]}class Ar extends we{constructor(e){super(),ye(this,e,Sr,zr,ve,{onMessage:3})}}function Fi(t){return t===void 0&&(t={}),M(this,void 0,void 0,function(){return T(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function 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,A({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Or(t,e){return M(this,void 0,void 0,function(){var n;return T(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Nl(t,e){return M(this,void 0,void 0,function(){var n;return T(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Pr(t,e){return M(this,void 0,void 0,function(){var n;return T(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}Object.freeze({__proto__:null,open:Fi,save:Il,message:Or,ask:Nl,confirm:Pr});var At;function Lr(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){return T(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Ii(t,e){return e===void 0&&(e={}),M(this,void 0,void 0,function(){var n;return T(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Li(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)
|
|
|
|
Multipart`),Y=_(),fe=s("br"),$=_(),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,a.__value="PATCH",a.value=a.__value,f.__value="DELETE",f.value=f.__value,u(n,"class","input"),u(n,"id","request-method"),t[0]===void 0&&zt(()=>t[9].call(n)),u(k,"class","input h-auto w-100%"),u(k,"id","request-body"),u(k,"placeholder","Request body"),u(k,"rows","5"),u(h,"class","btn"),u(h,"id","make-request"),u(z,"class","input"),u(j,"class","input"),u(C,"class","flex gap-2 children:grow"),u(x,"type","checkbox"),u(ie,"class","btn"),u(ie,"type","button")},m(E,V){v(E,e,V),r(e,n),r(n,i),r(n,o),r(n,l),r(n,a),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,b),r(e,y),r(e,g),r(e,h),v(E,O,V),v(E,D,V),v(E,N,V),v(E,R,V),v(E,H,V),v(E,C,V),r(C,z),B(z,t[2]),r(C,S),r(C,j),B(j,t[3]),v(E,P,V),v(E,F,V),v(E,q,V),v(E,X,V),r(X,x),x.checked=t[5],r(X,ce),v(E,Y,V),v(E,fe,V),v(E,$,V),v(E,he,V),v(E,_e,V),v(E,ie,V),v(E,ke,V),v(E,ze,V),v(E,te,V),v(E,be,V),v(E,de,V),qt(oe,E,V),le=!0,Oe||(ee=[L(n,"change",t[9]),L(k,"input",t[10]),L(e,"submit",Yn(t[6])),L(z,"input",t[11]),L(j,"input",t[12]),L(x,"change",t[13]),L(ie,"click",t[7])],Oe=!0)},p(E,[V]){V&1&&Ct(n,E[0]),V&2&&B(k,E[1]),V&4&&z.value!==E[2]&&B(z,E[2]),V&8&&j.value!==E[3]&&B(j,E[3]),V&32&&(x.checked=E[5]);const ne={};V&16&&(ne.json=E[4]),oe.$set(ne)},i(E){le||(Ce(oe.$$.fragment,E),le=!0)},o(E){De(oe.$$.fragment,E),le=!1},d(E){E&&m(e),E&&m(O),E&&m(D),E&&m(N),E&&m(R),E&&m(H),E&&m(C),E&&m(P),E&&m(F),E&&m(q),E&&m(X),E&&m(Y),E&&m(fe),E&&m($),E&&m(he),E&&m(_e),E&&m(ie),E&&m(ke),E&&m(ze),E&&m(te),E&&m(be),E&&m(de),Bt(oe,E),Oe=!1,ae(ee)}}}function $r(t,e,n){let i="GET",o="",{onMessage:l}=e;async function a(){const D=await xn().catch(H=>{throw l(H),H}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Jn.json(JSON.parse(o)):o!==""&&(R.body=Jn.text(o)),D.request(R).then(l).catch(l)}let f="baz",c="qux",p=null,d=!0;async function k(){const D=await xn().catch(N=>{throw l(N),N});n(4,p=await D.request({url:"http://localhost:3003",method:"POST",body:Jn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:Ot.Text}))}function b(){i=Oi(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function h(){c=this.value,n(3,c)}function O(){d=this.checked,n(5,d)}return t.$$set=D=>{"onMessage"in D&&n(8,l=D.onMessage)},[i,o,f,c,p,d,a,k,l,b,y,g,h,O]}class es extends we{constructor(e){super(),ye(this,e,$r,xr,ve,{onMessage:8})}}function ts(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",u(e,"class","btn"),u(e,"id","notification")},m(o,l){v(o,e,l),n||(i=L(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 Zo(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 $o(t){let e,n,i,o,l,a,f=Object.keys(t[1]),c=[];for(let p=0;p<f.length;p+=1)c[p]=el(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();u(e,"class","font-700 text-sm"),o.__value="",o.value=o.__value,o.disabled=!0,o.selected=!0,u(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||(a=L(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 b=xo(p,f,k);c[k]?c[k].p(b,d):(c[k]=el(b),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,a()}}}function el(t){let
|
|
|
|
`),R=s("input"),H=_(),C=s("label"),z=W(`Resizable
|
|
|
|
`),S=s("input"),j=_(),P=s("label"),F=W(`Has decorations
|
|
|
|
`),q=s("input"),X=_(),x=s("label"),ce=W(`Always on top
|
|
|
|
`),Y=s("input"),fe=_(),$=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"),Oe=_(),ee=s("div"),E=W(`Y
|
|
|
|
`),V=s("input"),ne=_(),ge=s("div"),je=s("div"),Pe=W(`Width
|
|
|
|
`),Z=s("input"),U=_(),se=s("div"),J=W(`Height
|
|
|
|
`),pe=s("input"),Jt=_(),Ne=s("div"),ct=s("div"),Yt=W(`Min width
|
|
|
|
`),Ee=s("input"),Xt=_(),ft=s("div"),Kt=W(`Min height
|
|
|
|
`),We=s("input"),Qt=_(),Ue=s("div"),K=s("div"),Pt=W(`Max width
|
|
|
|
`),Se=s("input"),Lt=_(),$e=s("div"),Et=W(`Max height
|
|
|
|
`),Ae=s("input"),dt=_(),pt=s("br"),ht=_(),Te=s("div"),Re=s("div"),Le=s("div"),et=s("div"),et.textContent="Inner Size",Wt=_(),tt=s("span"),Dt=W("Width: "),ni=W(mt),Ui=_(),Zt=s("span"),qi=W("Height: "),ii=W(xt),Bi=_(),qe=s("div"),$t=s("div"),$t.textContent="Outer Size",Vi=_(),en=s("span"),Gi=W("Width: "),oi=W(tn),Ji=_(),nn=s("span"),Yi=W("Height: "),li=W(on),Xi=_(),vt=s("div"),Be=s("div"),ln=s("div"),ln.textContent="Inner Logical Size",Ki=_(),rn=s("span"),Qi=W("Width: "),ri=W(sn),Zi=_(),un=s("span"),xi=W("Height: "),si=W(an),$i=_(),Ve=s("div"),cn=s("div"),cn.textContent="Outer Logical Size",eo=_(),fn=s("span"),to=W("Width: "),ui=W(dn),no=_(),pn=s("span"),io=W("Height: "),ai=W(hn),oo=_(),_t=s("div"),Ge=s("div"),mn=s("div"),mn.textContent="Inner Position",lo=_(),vn=s("span"),ro=W("x: "),ci=W(_n),so=_(),bn=s("span"),uo=W("y: "),fi=W(gn),ao=_(),Je=s("div"),yn=s("div"),yn.textContent="Outer Position",co=_(),wn=s("span"),fo=W("x: "),di=W(kn),po=_(),Mn=s("span"),ho=W("y: "),pi=W(Tn),mo=_(),bt=s("div"),Ye=s("div"),Cn=s("div"),Cn.textContent="Inner Logical Position",vo=_(),zn=s("span"),_o=W("x: "),hi=W(Sn),bo=_(),An=s("span"),go=W("y: "),mi=W(On),yo=_(),Xe=s("div"),Pn=s("div"),Pn.textContent="Outer Logical Position",wo=_(),Ln=s("span"),ko=W("x: "),vi=W(En),Mo=_(),Wn=s("span"),To=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"),Co=W(`
|
|
|
|
Grab`),zo=_(),Rn=s("label"),yt=s("input"),So=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"),Lo=_(),In=s("label"),Eo=W(`Y position
|
|
|
|
`),Qe=s("input"),Mi=_(),Ti=s("br"),Ci=_(),it=s("div"),ot=s("form"),Ze=s("input"),Wo=_(),Rt=s("button"),Rt.textContent="Set title",Do=_(),lt=s("form"),xe=s("input"),jo=_(),Ht=s("button"),Ht.textContent="Open URL",u(o,"class","btn"),u(o,"title","Unminimizes after 2 seconds"),u(a,"class","btn"),u(a,"title","Unminimizes after 2 seconds"),u(c,"class","btn"),u(c,"title","Visible again after 2 seconds"),u(d,"class","btn"),u(b,"class","btn"),u(b,"title","Minimizes the window, requests attention for 3s and then resets it"),u(R,"type","checkbox"),u(S,"type","checkbox"),u(q,"type","checkbox"),u(Y,"type","checkbox"),u(_e,"type","checkbox"),u(O,"class","flex flex-wrap gap-2"),u(le,"class","input"),u(le,"type","number"),u(le,"min","0"),u(V,"class","input"),u(V,"type","number"),u(V,"min","0"),u(be,"class","flex children:grow flex-col"),u(Z,"class","input"),u(Z,"type","number"),u(Z,"min","400"),u(pe,"class","input"),u(pe,"type","number"),u(pe,"min","400"),u(ge,"class","flex children:grow flex-col"),u(Ee,"class","input"),u(Ee,"type","number"),u(We,"class","input"),u(We,"type","number"),u(Ne,"class","flex children:grow flex-col"),u(Se,"class","input"),u(Se,"type","number"),u(Se,"min","800"),u(Ae,"class","input"),u(Ae,"type","number"),u(Ae,"min","400"),u(Ue,"class","flex children:grow flex-col"),u(te,"class","flex flex-row gap-2 flex-wrap"),u(et,"class","text-accent dark:text-darkAccent font-700"),u(Le,"class","grow"),u($t,"class","text-accent dark:text-darkAccent font-700"),u(qe,"class","grow"),u(Re,"class","flex"),u(ln,"class","text-accent dark:text-darkAccent font-700"),u(Be,"class","grow"),u(cn,"class","text-accent dark:text-darkAccent font-700"),u(Ve,"class","grow"),u(vt,"class","flex"),u(mn,"class","text-accent dark:text-darkAccent font-700"),u(Ge,"class","grow"),u(yn,"class","text-accent dark:text-darkAccent font-700"),u(Je,"class","grow"),u(_t,"class","flex"),u(Cn,"class","text-accent dark:text-darkAccent font-700"),u(Ye,"class","grow"),u(Pn,"class","text-accent dark:text-darkAccent font-700"),u(Xe,"class","grow"),u(bt,"class","flex"),u(jt,"class","mb-2"),u(gt,"type","checkbox"),u(yt,"type","checkbox"),u(nt,"class","flex gap-2"),u(Fe,"class","input"),t[19]===void 0&&zt(()=>t[55].call(Fe)),u(Ke,"class","input"),u(Ke,"type","number"),u(Qe,"class","input"),u(Qe,"type","number"),u(He,"class","flex gap-2"),u(Ze,"class","input grow"),u(Ze,"id","title"),u(Rt,"class","btn"),u(Rt,"type","submit"),u(ot,"class","flex gap-1"),u(xe,"class","input grow"),u(xe,"id","url"),u(Ht,"class","btn"),u(Ht,"id","open-url"),u(lt,"class","flex gap-1"),u(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,a),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,b),v(w,y,I),v(w,g,I),v(w,h,I),v(w,O,I),r(O,D),r(D,N),r(D,R),R.checked=t[3],r(O,H),r(O,C),r(C,z),r(C,S),S.checked=t[2],r(O,j),r(O,P),r(P,F),r(P,q),q.checked=t[4],r(O,X),r(O,x),r(x,ce),r(x,Y),Y.checked=t[5],r(O,fe),r(O,$),r($,he),r($,_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,Oe),r(be,ee),r(ee,E),r(ee,V),B(V,t[14]),r(te,ne),r(te,ge),r(ge,je),r(je,Pe),r(je,Z),B(Z,t[7]),r(ge,U),r(ge,se),r(se,J),r(se,pe),B(pe,t[8]),r(te,Jt),r(te,Ne),r(Ne,ct),r(ct,Yt),r(ct,Ee),B(Ee,t[9]),r(Ne,Xt),r(Ne,ft),r(ft,Kt),r(ft,We),B(We,t[10]),r(te,Qt),r(te,Ue),r(Ue,K),r(K,Pt),r(K,Se),B(Se,t[11]),r(Ue,Lt),r(Ue,$e),r($e,Et),r($e,Ae),B(Ae,t[12]),v(w,dt,I),v(w,pt,I),v(w,ht,I),v(w,Te,I),r(Te,Re),r(Re,Le),r(Le,et),r(Le,Wt),r(Le,tt),r(tt,Dt),r(tt,ni),r(Le,Ui),r(Le,Zt),r(Zt,qi),r(Zt,ii),r(Re,Bi),r(Re,qe),r(qe,$t),r(qe,Vi),r(qe,en),r(en,Gi),r(en,oi),r(qe,Ji),r(qe,nn),r(nn,Yi),r(nn,li),r(Te,Xi),r(Te,vt),r(vt,Be),r(Be,ln),r(Be,Ki),r(Be,rn),r(rn,Qi),r(rn,ri),r(Be,Zi),r(Be,un),r(un,xi),r(un,si),r(vt,$i),r(vt,Ve),r(Ve,cn),r(Ve,eo),r(Ve,fn),r(fn,to),r(fn,ui),r(Ve,no),r(Ve,pn),r(pn,io),r(pn,ai),r(Te,oo),r(Te,_t),r(_t,Ge),r(Ge,mn),r(Ge,lo),r(Ge,vn),r(vn,ro),r(vn,ci),r(Ge,so),r(Ge,bn),r(bn,uo),r(bn,fi),r(_t,ao),r(_t,Je),r(Je,yn),r(Je,co),r(Je,wn),r(wn,fo),r(wn,di),r(Je,po),r(Je,Mn),r(Mn,ho),r(Mn,pi),r(Te,mo),r(Te,bt),r(bt,Ye),r(Ye,Cn),r(Ye,vo),r(Ye,zn),
|
|
|
|
`),o=s("input"),l=_(),a=s("div"),f=W(`Working directory:
|
|
|
|
`),c=s("input"),p=_(),d=s("div"),k=W(`Arguments:
|
|
|
|
`),b=s("input"),y=_(),g=s("div"),h=s("button"),h.textContent="Run",O=_(),D=s("button"),D.textContent="Kill",N=_(),C&&C.c(),u(o,"class","grow input"),u(n,"class","flex items-center gap-1"),u(c,"class","grow input"),u(c,"placeholder","Working directory"),u(a,"class","flex items-center gap-1"),u(b,"class","grow input"),u(b,"placeholder","Environment variables"),u(d,"class","flex items-center gap-1"),u(h,"class","btn"),u(D,"class","btn"),u(g,"class","flex children:grow gap-1"),u(e,"class","flex flex-col childre:grow gap-1")},m(z,S){v(z,e,S),r(e,n),r(n,i),r(n,o),B(o,t[0]),r(e,l),r(e,a),r(a,f),r(a,c),B(c,t[1]),r(e,p),r(e,d),r(d,k),r(d,b),B(b,t[2]),r(e,y),r(e,g),r(g,h),r(g,O),r(g,D),r(e,N),C&&C.m(e,null),R||(H=[L(o,"input",t[9]),L(c,"input",t[10]),L(b,"input",t[11]),L(h,"click",t[5]),L(D,"click",t[6])],R=!0)},p(z,[S]){S&1&&o.value!==z[0]&&B(o,z[0]),S&2&&c.value!==z[1]&&B(c,z[1]),S&4&&b.value!==z[2]&&B(b,z[2]),z[4]?C?C.p(z,S):(C=rl(z),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i:G,o:G,d(z){z&&m(e),C&&C.d(),R=!1,ae(H)}}}function hs(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:a}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k;function b(){return p.split(" ").reduce((H,C)=>{let[z,S]=C.split("=");return{...H,[z]:S}},{})}function y(){n(4,k=null);const H=new Ml(o,[...l,f],{cwd:c||null,env:b()});H.on("close",C=>{a(`command finished with code ${C.code} and signal ${C.signal}`),n(4,k=null)}),H.on("error",C=>a(`command error: "${C}"`)),H.stdout.on("data",C=>a(`command stdout: "${C}"`)),H.stderr.on("data",C=>a(`command stderr: "${C}"`)),H.spawn().then(C=>{n(4,k=C)}).catch(a)}function g(){k.kill().then(()=>a("killed child process")).catch(a)}function h(){k.write(d).catch(a)}function O(){f=this.value,n(0,f)}function D(){c=this.value,n(1,c)}function N(){p=this.value,n(2,p)}function R(){d=this.value,n(3,d)}return t.$$set=H=>{"onMessage"in H&&n(8,a=H.onMessage)},[f,c,p,d,k,y,g,h,a,O,D,N,R]}class ms extends we{constructor(e){super(),ye(this,e,hs,ps,ve,{onMessage:8})}}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 a;a=l==null?void 0:l.payload,t(),i({manifest:a,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>',u(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",u(e,"class","btn")},m(o,l){v(o,e,l),n||(i=L(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",u(e,"class","btn")},m(o,l){v(o,e,l),n||(i=L(e,"click",t[3]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function gs(t){let e;function n(l,a){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(),u(e,"class","flex children:grow children:h10")},m(l,a){v(l,e,a),o.m(e,null)},p(l,[a]){i===(i=n(l))&&o?o.p(l,a):(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{on
|
|
|
|
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,u(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 a(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){a(f)}}),Wi(()=>{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 sl(t,e,n){const i=t.slice();return i[23]=e[n],i}function ul(t,e,n){const i=t.slice();return i[26]=e[n],i}function al(t){let e,n,i,o,l,a,f,c,p,d,k,b,y,g,h;function O(z,S){return z[2]?Os:As}let D=O(t),N=D(t);function R(z,S){return z[1]?Ls:Ps}let H=R(t),C=H(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=_(),o=s("span"),l=s("span"),N.c(),f=_(),c=s("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',p=_(),d=s("span"),C.c(),b=_(),y=s("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',u(n,"class","text-darkPrimaryText"),u(l,"title",a=t[2]?"Switch to Light mode":"Switch to Dark mode"),u(l,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(c,"title","Minimize"),u(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(d,"title",k=t[1]?"Restore":"Maximize"),u(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(y,"title","Close"),u(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 "),u(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),u(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),u(e,"data-tauri-drag-region","")},m(z,S){v(z,e,S),r(e,n),r(e,i),r(e,o),r(o,l),N.m(l,null),r(o,f),r(o,c),r(o,p),r(o,d),C.m(d,null),r(o,b),r(o,y),g||(h=[L(l,"click",t[11]),L(c,"click",t[8]),L(d,"click",t[9]),L(y,"click",t[10])],g=!0)},p(z,S){D!==(D=O(z))&&(N.d(1),N=D(z),N&&(N.c(),N.m(l,null))),S&4&&a!==(a=z[2]?"Switch to Light mode":"Switch to Dark mode")&&u(l,"title",a),H!==(H=R(z))&&(C.d(1),C=H(z),C&&(C.c(),C.m(d,null))),S&2&&k!==(k=z[1]?"Restore":"Maximize")&&u(d,"title",k)},d(z){z&&m(e),N.d(),C.d(),g=!1,ae(h)}}}function As(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-moon")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Os(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-sun")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ps(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-maximize")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ls(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-restore")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function cl(t){let e,n,i,o,l,a,f,c,p;function d(y,g){return y[2]?Ws:Es}let k=d(t),b=k(t);return{c(){e=s("a"),b.c(),n=_(),i=s("br"),o=_(),l=s("div"),a=_(),f=s("br"),u(e,"href","##"),u(e,"class","nv justify-between h-8"),u(l,"class","bg-white/5 h-2px")},m(y,g){v(y,e,g),b.m(e,null),v(y,n,g),v(y,i,g),v(y,o,g),v(y,l,g),v(y,a,g),v(y,f,g),c||(p=L(e,"click",t[11]),c=!0)},p(y,g){k!==(k=d(y))&&(b.d(1),b=k(y),b&&(b.c(),b.m(e,null)))},d(y){y&&m(e),b.d(),y&&m(n),y&&m(i),y&&m(o)
|
|
|
|
`),n=s("div"),u(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"),u(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 fl(t){let e,n,i,o,l,a=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(a),u(n,"class",i=t[26].icon+" mr-2"),u(e,"href","##"),u(e,"class",c="nv "+(t[0]===t[26]?"nv_selected":""))},m(b,y){v(b,e,y),r(e,n),r(e,o),r(e,l),r(l,f),p||(d=L(e,"click",k),p=!0)},p(b,y){t=b,y&1&&c!==(c="nv "+(t[0]===t[26]?"nv_selected":""))&&u(e,"class",c)},d(b){b&&m(e),p=!1,d()}}}function dl(t){let e,n=t[23].html+"",i;return{c(){e=new lr(!1),i=Ei(),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,a,f,c,p,d,k,b,y,g,h,O,D,N,R,H,C,z,S,j,P,F=t[0].label+"",q,X,x,ce,Y,fe,$,he,_e,ie,ke,ze,te,be,de,oe,le,Oe,ee=t[4]&&al(t),E=!t[4]&&cl(t),V=t[6],ne=[];for(let U=0;U<V.length;U+=1)ne[U]=fl(ul(t,V,U));var ge=t[0].component;function je(U){return{props:{onMessage:U[13],insecureRenderHtml:U[14]}}}ge&&(Y=new ge(je(t)));let Pe=t[5],Z=[];for(let U=0;U<Pe.length;U+=1)Z[U]=dl(sl(t,Pe,U));return{c(){ee&&ee.c(),e=_(),n=s("div"),i=s("aside"),o=s("img"),a=_(),E&&E.c(),f=_(),c=s("a"),c.innerHTML=`Documentation
|
2022-07-04 04:15:23 +03:00
|
|
|
<span class="i-codicon-link-external"></span>`,p=_(),d=s("a"),d.innerHTML=`Github
|
|
|
|
<span class="i-codicon-link-external"></span>`,k=_(),b=s("a"),b.innerHTML=`Source
|
2022-07-05 22:57:53 +03:00
|
|
|
<span class="i-codicon-link-external"></span>`,y=_(),g=s("br"),h=_(),O=s("div"),D=_(),N=s("br"),R=_(),H=s("div");for(let U=0;U<ne.length;U+=1)ne[U].c();z=_(),S=s("main"),j=s("div"),P=s("h1"),q=W(F),X=_(),x=s("div"),ce=s("div"),Y&&Kn(Y.$$.fragment),fe=_(),$=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 U=0;U<Z.length;U+=1)Z[U].c();u(o,"class","self-center p-7 cursor-pointer"),er(o.src,l="tauri_logo.png")||u(o,"src",l),u(o,"alt","Tauri logo"),u(c,"class","nv justify-between h-8"),u(c,"target","_blank"),u(c,"href","https://tauri.app/v1/guides/"),u(d,"class","nv justify-between h-8"),u(d,"target","_blank"),u(d,"href","https://github.com/tauri-apps/tauri"),u(b,"class","nv justify-between h-8"),u(b,"target","_blank"),u(b,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),u(O,"class","bg-white/5 h-2px"),u(H,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),u(i,"class",C="w-75 "+(t[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),u(ce,"class","mr-2"),u(x,"class","overflow-y-auto"),u(j,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),u(he,"class","bg-black/20 h-2px cursor-ns-resize"),u(ke,"class","font-semibold"),u(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 "),u(ie,"class","flex justify-between items-center px-2"),u(de,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),u($,"id","console"),u($,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),u(S,"class","flex-1 bg-primary dark:bg-darkPrimary transition-colors-250 grid grid-rows-[2fr_auto]"),u(n,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(U,se){ee&&ee.m(U,se),v(U,e,se),v(U,n,se),r(n,i),r(i,o),r(i,a),E&&E.m(i,null),r(i,f),r(i,c),r(i,p),r(i,d),r(i,k),r(i,b),r(i,y),r(i,g),r(i,h),r(i,O),r(i,D),r(i,N),r(i,R),r(i,H);for(let J=0;J<ne.length;J+=1)ne[J].m(H,null);r(n,z),r(n,S),r(S,j),r(j,P),r(P,q),r(j,X),r(j,x),r(x,ce),Y&&qt(Y,ce,null),r(S,fe),r(S,$),r($,he),r($,_e),r($,ie),r(ie,ke),r(ie,ze),r(ie,te),r($,be),r($,de);for(let J=0;J<Z.length;J+=1)Z[J].m(de,null);t[19]($),oe=!0,le||(Oe=[L(o,"click",t[17]),L(he,"mousedown",t[16]),L(te,"click",t[15])],le=!0)},p(U,[se]){if(U[4]?ee?ee.p(U,se):(ee=al(U),ee.c(),ee.m(e.parentNode,e)):ee&&(ee.d(1),ee=null),U[4]?E&&(E.d(1),E=null):E?E.p(U,se):(E=cl(U),E.c(),E.m(i,f)),se&193){V=U[6];let J;for(J=0;J<V.length;J+=1){const pe=ul(U,V,J);ne[J]?ne[J].p(pe,se):(ne[J]=fl(pe),ne[J].c(),ne[J].m(H,null))}for(;J<ne.length;J+=1)ne[J].d(1);ne.length=V.length}if((!oe||se&16&&C!==(C="w-75 "+(U[4]?"bg-darkPrimaryLighter/60":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&u(i,"class",C),(!oe||se&1)&&F!==(F=U[0].label+"")&&Q(q,F),ge!==(ge=U[0].component)){if(Y){$n();const J=Y;De(J.$$.fragment,1,0,()=>{Bt(J,1)}),ei()}ge?(Y=new ge(je(U)),Kn(Y.$$.fragment),Ce(Y.$$.fragment,1),qt(Y,ce,null)):Y=null}if(se&32){Pe=U[5];let J;for(J=0;J<Pe.length;J+=1){const pe=sl(U,Pe,J);Z[J]?Z[J].p(pe,se):(Z[J]=dl(pe),Z[J].c(),Z[J].m(de,null))}for(;J<Z.length;J+=1)Z[J].d(1);Z.length=Pe.length}},i(U){oe||(Y&&Ce(Y.$$.fragment,U),oe=!0)},o(U){Y&&De(Y.$$.fragment,U),oe=!1},d(U){ee&&ee.d(U),U&&m(e),U&&m(n),E&&E.d(),ut(ne,U),Y&&Bt(Y),ut(Z,U),t[19](null),le=!1,ae(Oe)}}}let pl=50;function hl(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 F=>{await confirm("Are you sure?")||F.preventDefault()}),Ie.onFileDropEvent(F=>{h(`File drop: ${JSON.stringify(F.payload)}`)});const o=[{label:"Welcome",component:kr,icon:"i-ph-hand-waving"},{label:"Communication",component:Ar,icon:"i-codicon-
|