tauri/examples/api/dist/assets/index.js
Amr Bashir fb10b87970
feat: move app plugin back to core (#8039)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-10-17 15:13:47 -03:00

39 lines
55 KiB
JavaScript

var Rs=Object.defineProperty;var Ds=(e,t,i)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var ot=(e,t,i)=>(Ds(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&l(_)}).observe(document,{childList:!0,subtree:!0});function i(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function l(s){if(s.ep)return;s.ep=!0;const r=i(s);fetch(s.href,r)}})();function $(){}function _s(e){return e()}function Yl(){return Object.create(null)}function He(e){e.forEach(_s)}function ms(e){return typeof e=="function"}function yt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ci;function Hs(e,t){return e===t?!0:(ci||(ci=document.createElement("a")),ci.href=t,e===ci.href)}function Us(e){return Object.keys(e).length===0}function qs(e,...t){if(e==null){for(const l of t)l(void 0);return $}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function Fs(e,t,i){e.$$.on_destroy.push(qs(t,i))}function n(e,t){e.appendChild(t)}function v(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Bt(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function o(e){return document.createElement(e)}function js(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function p(e){return document.createTextNode(e)}function c(){return p(" ")}function Qi(){return p("")}function L(e,t,i,l){return e.addEventListener(t,i,l),()=>e.removeEventListener(t,i,l)}function Kl(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function j(e){return e===""?null:+e}function Bs(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function A(e,t){e.value=t??""}function Ht(e,t,i,l){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,l?"important":"")}function at(e,t,i){for(let l=0;l<e.options.length;l+=1){const s=e.options[l];if(s.__value===t){s.selected=!0;return}}(!i||t!==void 0)&&(e.selectedIndex=-1)}function di(e){const t=e.querySelector(":checked");return t&&t.__value}class Vs{constructor(t=!1){ot(this,"is_svg",!1);ot(this,"e");ot(this,"n");ot(this,"t");ot(this,"a");this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,i,l=null){this.e||(this.is_svg?this.e=js(i.nodeName):this.e=o(i.nodeType===11?"TEMPLATE":i.nodeName),this.t=i.tagName!=="TEMPLATE"?i:i.content,this.c(t)),this.i(l)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let i=0;i<this.n.length;i+=1)v(this.t,this.n[i],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(m)}}function Jl(e,t){return new e(t)}let rn;function an(e){rn=e}function ws(){if(!rn)throw new Error("Function called outside component initialization");return rn}function pi(e){ws().$$.on_mount.push(e)}function vs(e){ws().$$.on_destroy.push(e)}const Ft=[],Gi=[];let jt=[];const Ql=[],Gs=Promise.resolve();let Xi=!1;function Xs(){Xi||(Xi=!0,Gs.then(ys))}function vt(e){jt.push(e)}const Vi=new Set;let Ut=0;function ys(){if(Ut!==0)return;const e=rn;do{try{for(;Ut<Ft.length;){const t=Ft[Ut];Ut++,an(t),Ys(t.$$)}}catch(t){throw Ft.length=0,Ut=0,t}for(an(null),Ft.length=0,Ut=0;Gi.length;)Gi.pop()();for(let t=0;t<jt.length;t+=1){const i=jt[t];Vi.has(i)||(Vi.add(i),i())}jt.length=0}while(Ft.length);for(;Ql.length;)Ql.pop()();Xi=!1,Vi.clear(),an(e)}function Ys(e){if(e.fragment!==null){e.update(),He(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(vt)}}function Ks(e){const t=[],i=[];jt.forEach(l=>e.indexOf(l)===-1?t.push(l):i.push(l)),i.forEach(l=>l()),jt=t}const fi=new Set;let wt;function Js(){wt={r:0,c:[],p:wt}}function Qs(){wt.r||He(wt.c),wt=wt.p}function Yi(e,t){e&&e.i&&(fi.delete(e),e.i(t))}function Zl(e,t,i,l){if(e&&e.o){if(fi.has(e))return;fi.add(e),wt.c.push(()=>{fi.delete(e),l&&(i&&e.d(1),l())}),e.o(t)}else l&&l()}function Te(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function xl(e){e&&e.c()}function Ki(e,t,i){const{fragment:l,after_update:s}=e.$$;l&&l.m(t,i),vt(()=>{const r=e.$$.on_mount.map(_s).filter(ms);e.$$.on_destroy?e.$$.on_destroy.push(...r):He(r),e.$$.on_mount=[]}),s.forEach(vt)}function Ji(e,t){const i=e.$$;i.fragment!==null&&(Ks(i.after_update),He(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Zs(e,t){e.$$.dirty[0]===-1&&(Ft.push(e),Xs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Vt(e,t,i,l,s,r,_=null,f=[-1]){const b=rn;an(e);const d=e.$$={fragment:null,ctx:[],props:r,update:$,not_equal:s,bound:Yl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(b?b.$$.context:[])),callbacks:Yl(),dirty:f,skip_bound:!1,root:t.target||b.$$.root};_&&_(d.root);let I=!1;if(d.ctx=i?i(e,t.props||{},(k,G,...E)=>{const C=E.length?E[0]:G;return d.ctx&&s(d.ctx[k],d.ctx[k]=C)&&(!d.skip_bound&&d.bound[k]&&d.bound[k](C),I&&Zs(e,k)),G}):[],d.update(),I=!0,He(d.before_update),d.fragment=l?l(d.ctx):!1,t.target){if(t.hydrate){const k=Bs(t.target);d.fragment&&d.fragment.l(k),k.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&Yi(e.$$.fragment),Ki(e,t.target,t.anchor),ys()}an(b)}class Gt{constructor(){ot(this,"$$");ot(this,"$$set")}$destroy(){Ji(this,1),this.$destroy=$}$on(t,i){if(!ms(i))return $;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(i),()=>{const s=l.indexOf(i);s!==-1&&l.splice(s,1)}}$set(t){this.$$set&&!Us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const xs="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(xs);const qt=[];function $s(e,t=$){let i;const l=new Set;function s(f){if(yt(e,f)&&(e=f,i)){const b=!qt.length;for(const d of l)d[1](),qt.push(d,e);if(b){for(let d=0;d<qt.length;d+=2)qt[d][0](qt[d+1]);qt.length=0}}}function r(f){s(f(e))}function _(f,b=$){const d=[f,b];return l.add(d),l.size===1&&(i=t(s,r)||$),f(e),()=>{l.delete(d),l.size===0&&i&&(i(),i=null)}}return{set:s,update:r,subscribe:_}}var eo=Object.defineProperty,cn=(e,t)=>{for(var i in t)eo(e,i,{get:t[i],enumerable:!0})},ks=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},$l=(e,t,i)=>(ks(e,t,"read from private field"),i?i.call(e):t.get(e)),to=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},no=(e,t,i,l)=>(ks(e,t,"write to private field"),l?l.call(e,i):t.set(e,i),i),io={};cn(io,{Channel:()=>zs,PluginListener:()=>Ls,addPluginListener:()=>lo,convertFileSrc:()=>so,invoke:()=>g,transformCallback:()=>Zi});function Zi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var on,zs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,to(this,on,()=>{}),this.id=Zi(t=>{$l(this,on).call(this,t)})}set onmessage(t){no(this,on,t)}get onmessage(){return $l(this,on)}toJSON(){return`__CHANNEL__:${this.id}`}};on=new WeakMap;var Ls=class{constructor(t,i,l){this.plugin=t,this.event=i,this.channelId=l}async unregister(){return g(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function lo(e,t,i){let l=new zs;return l.onmessage=i,g(`plugin:${e}|register_listener`,{event:t,handler:l}).then(()=>new Ls(e,t,l.id))}async function g(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function so(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var oo={};cn(oo,{getName:()=>Ss,getTauriVersion:()=>Cs,getVersion:()=>Es,hide:()=>Ts,show:()=>Ps});async function Es(){return g("plugin:app|version")}async function Ss(){return g("plugin:app|name")}async function Cs(){return g("plugin:app|tauri_version")}async function Ps(){return g("plugin:app|app_show")}async function Ts(){return g("plugin:app|app_hide")}function ao(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z;return{c(){t=o("div"),i=o("p"),i.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,l=c(),s=o("br"),r=c(),_=o("br"),f=c(),b=o("pre"),d=p(" App name: "),I=o("code"),k=p(e[2]),G=p(`
App version: `),E=o("code"),C=p(e[0]),O=p(`
Tauri version: `),N=o("code"),oe=p(e[1]),D=p(`
`),R=c(),B=o("br"),V=c(),P=o("button"),P.textContent="Context menu",a(P,"class","btn")},m(W,ee){v(W,t,ee),n(t,i),n(t,l),n(t,s),n(t,r),n(t,_),n(t,f),n(t,b),n(b,d),n(b,I),n(I,k),n(b,G),n(b,E),n(E,C),n(b,O),n(b,N),n(N,oe),n(b,D),n(t,R),n(t,B),n(t,V),n(t,P),F||(Z=L(P,"click",e[3]),F=!0)},p(W,[ee]){ee&4&&ie(k,W[2]),ee&1&&ie(C,W[0]),ee&2&&ie(oe,W[1])},i:$,o:$,d(W){W&&m(t),F=!1,Z()}}}function ro(e,t,i){let l="1.0.0",s="1.0.0",r="Unknown";Ss().then(f=>{i(2,r=f)}),Es().then(f=>{i(0,l=f)}),Cs().then(f=>{i(1,s=f)});function _(){g("popup_context_menu")}return[l,s,r,_]}class uo extends Gt{constructor(t){super(),Vt(this,t,ro,ao,yt,{})}}var co={};cn(co,{TauriEvent:()=>Ms,emit:()=>xi,listen:()=>_i,once:()=>Is});var Ms=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(Ms||{});async function As(e,t){await g("plugin:event|unlisten",{event:e,eventId:t})}async function _i(e,t,i){return g("plugin:event|listen",{event:e,windowLabel:i==null?void 0:i.target,handler:Zi(t)}).then(l=>async()=>As(e,l))}async function Is(e,t,i){return _i(e,l=>{t(l),As(e,l.id).catch(()=>{})},i)}async function xi(e,t,i){await g("plugin:event|emit",{event:e,windowLabel:i==null?void 0:i.target,payload:t})}function fo(e){let t,i,l,s,r,_,f,b;return{c(){t=o("div"),i=o("button"),i.textContent="Call Log API",l=c(),s=o("button"),s.textContent="Call Request (async) API",r=c(),_=o("button"),_.textContent="Send event to Rust",a(i,"class","btn"),a(i,"id","log"),a(s,"class","btn"),a(s,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){v(d,t,I),n(t,i),n(t,l),n(t,s),n(t,r),n(t,_),f||(b=[L(i,"click",e[0]),L(s,"click",e[1]),L(_,"click",e[2])],f=!0)},p:$,i:$,o:$,d(d){d&&m(t),f=!1,He(b)}}}function ho(e,t,i){let{onMessage:l}=t,s;pi(async()=>{s=await _i("rust-event",l)}),vs(()=>{s&&s()});function r(){g("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){g("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function f(){xi("js-event","this is the payload string")}return e.$$set=b=>{"onMessage"in b&&i(3,l=b.onMessage)},[r,_,f,l]}class po extends Gt{constructor(t){super(),Vt(this,t,ho,fo,yt,{onMessage:3})}}var bo={};cn(bo,{LogicalPosition:()=>$i,LogicalSize:()=>un,PhysicalPosition:()=>Ye,PhysicalSize:()=>rt});var un=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},rt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new un(this.width/e,this.height/e)}},$i=class{constructor(t,i){this.type="Logical",this.x=t,this.y=i}},Ye=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new $i(this.x/e,this.y/e)}},go={};cn(go,{CloseRequestedEvent:()=>Os,Effect:()=>bi,EffectState:()=>gi,LogicalPosition:()=>$i,LogicalSize:()=>un,PhysicalPosition:()=>Ye,PhysicalSize:()=>rt,UserAttentionType:()=>el,Window:()=>dn,availableMonitors:()=>wo,currentMonitor:()=>_o,getAll:()=>hi,getCurrent:()=>tl,primaryMonitor:()=>mo});var el=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(el||{}),Os=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}};function tl(){return new dn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function hi(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new dn(e.label,{skip:!0}))}var es=["tauri://created","tauri://error"],dn=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t!=null&&t.skip||g("plugin:window|create",{options:{...t,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(e){return hi().some(t=>t.label===e)?new dn(e,{skip:!0}):null}static getCurrent(){return tl()}static getAll(){return hi()}static async getFocusedWindow(){for(let e of hi())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)}):_i(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)}):Is(e,t,{target:this.label})}async emit(e,t){if(es.includes(e)){for(let i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return xi(e,t,{target:this.label})}_handleTauriEvent(e,t){return es.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return g("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return g("plugin:window|inner_position",{label:this.label}).then(({x:e,y:t})=>new Ye(e,t))}async outerPosition(){return g("plugin:window|outer_position",{label:this.label}).then(({x:e,y:t})=>new Ye(e,t))}async innerSize(){return g("plugin:window|inner_size",{label:this.label}).then(({width:e,height:t})=>new rt(e,t))}async outerSize(){return g("plugin:window|outer_size",{label:this.label}).then(({width:e,height:t})=>new rt(e,t))}async isFullscreen(){return g("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return g("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return g("plugin:window|is_maximized",{label:this.label})}async isFocused(){return g("plugin:window|is_focused",{label:this.label})}async isDecorated(){return g("plugin:window|is_decorated",{label:this.label})}async isResizable(){return g("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return g("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return g("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return g("plugin:window|is_closable",{label:this.label})}async isVisible(){return g("plugin:window|is_visible",{label:this.label})}async title(){return g("plugin:window|title",{label:this.label})}async theme(){return g("plugin:window|theme",{label:this.label})}async center(){return g("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),g("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return g("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return g("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return g("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return g("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return g("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return g("plugin:window|maximize",{label:this.label})}async unmaximize(){return g("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return g("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return g("plugin:window|minimize",{label:this.label})}async unminimize(){return g("plugin:window|unminimize",{label:this.label})}async show(){return g("plugin:window|show",{label:this.label})}async hide(){return g("plugin:window|hide",{label:this.label})}async close(){return g("plugin:window|close",{label:this.label})}async setDecorations(e){return g("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return g("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return g("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return g("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return g("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return g("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return g("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return g("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return g("plugin:window|set_focus",{label:this.label})}async setIcon(e){return g("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return g("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return g("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return g("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return g("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return g("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return g("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return g("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Ns(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Ws(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let i=new Os(t);Promise.resolve(e(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),i=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{t(),i()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),i=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),i(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},bi=(e=>(e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight",e))(bi||{}),gi=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(gi||{});function nl(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Ws(e.position),size:Ns(e.size)}}function Ws(e){return new Ye(e.x,e.y)}function Ns(e){return new rt(e.width,e.height)}async function _o(){return g("plugin:window|current_monitor").then(nl)}async function mo(){return g("plugin:window|primary_monitor").then(nl)}async function wo(){return g("plugin:window|available_monitors").then(e=>e.map(nl))}function ts(e,t,i){const l=e.slice();return l[98]=t[i],l}function ns(e,t,i){const l=e.slice();return l[101]=t[i],l}function is(e,t,i){const l=e.slice();return l[104]=t[i],l}function ls(e,t,i){const l=e.slice();return l[107]=t[i],l}function ss(e){let t,i,l,s,r,_,f=Te(Object.keys(e[1])),b=[];for(let d=0;d<f.length;d+=1)b[d]=os(ls(e,f,d));return{c(){t=o("span"),t.textContent="Selected window:",i=c(),l=o("select"),s=o("option"),s.textContent="Choose a window...";for(let d=0;d<b.length;d+=1)b[d].c();a(t,"class","font-700 text-sm"),s.__value="",A(s,s.__value),s.disabled=!0,s.selected=!0,a(l,"class","input"),e[0]===void 0&&vt(()=>e[55].call(l))},m(d,I){v(d,t,I),v(d,i,I),v(d,l,I),n(l,s);for(let k=0;k<b.length;k+=1)b[k]&&b[k].m(l,null);at(l,e[0],!0),r||(_=L(l,"change",e[55]),r=!0)},p(d,I){if(I[0]&2){f=Te(Object.keys(d[1]));let k;for(k=0;k<f.length;k+=1){const G=ls(d,f,k);b[k]?b[k].p(G,I):(b[k]=os(G),b[k].c(),b[k].m(l,null))}for(;k<b.length;k+=1)b[k].d(1);b.length=f.length}I[0]&3&&at(l,d[0])},d(d){d&&(m(t),m(i),m(l)),Bt(b,d),r=!1,_()}}}function os(e){let t,i=e[107]+"",l,s;return{c(){t=o("option"),l=p(i),t.__value=s=e[107],A(t,t.__value)},m(r,_){v(r,t,_),n(t,l)},p(r,_){_[0]&2&&i!==(i=r[107]+"")&&ie(l,i),_[0]&2&&s!==(s=r[107])&&(t.__value=s,A(t,t.__value))},d(r){r&&m(t)}}}function as(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ye,le,ce,_e,de,re,Y,ue,H,x,K,w,J,S,se,ke,ze,fe,Se,Le,Me,he,me,Fe,je,pe,Ce,te,Ee,ge,we,ne,z,Q,T,Pe,fn,Ae,hn,Ke,kt,pn,Ie,bn,zt,gn,Oe,_n,Je,Lt,mn,Ue,wn,Et,vn,qe,yn,Qe,St,kn,We,zn,Ct,Ln,Ne,Xt,Yt,Kt,M,Be,Re,ut,Jt,ct,Qt,dt=e[29].width+"",Pt,Zt,ft,xt,ht=e[29].height+"",Tt,$t,De,pt,en,bt,tn,gt=e[30].width+"",Mt,En,Sn,il,Cn=e[30].height+"",mi,ll,At,Ze,Pn,sl,Tn,ol,Mn=e[29].toLogical(e[26]).width+"",wi,al,An,rl,In=e[29].toLogical(e[26]).height+"",vi,ul,xe,On,cl,Wn,dl,Nn=e[30].toLogical(e[26]).width+"",yi,fl,Rn,hl,Dn=e[30].toLogical(e[26]).height+"",ki,pl,It,$e,Hn,bl,Un,gl,qn=e[27].x+"",zi,_l,Fn,ml,jn=e[27].y+"",Li,wl,et,Bn,vl,Vn,yl,Gn=e[28].x+"",Ei,kl,Xn,zl,Yn=e[28].y+"",Si,Ll,Ot,tt,Kn,El,Jn,Sl,Qn=e[27].toLogical(e[26]).x+"",Ci,Cl,Zn,Pl,xn=e[27].toLogical(e[26]).y+"",Pi,Tl,nt,$n,Ml,ei,Al,ti=e[28].toLogical(e[26]).x+"",Ti,Il,ni,Ol,ii=e[28].toLogical(e[26]).y+"",Mi,Ai,Ii,Oi,nn,Wi,Ve,li,Wt,Wl,Nl,si,Nt,Rl,Dl,oi,Rt,Hl,Ni,Ge,ai,Ul,Xe,ql,ri,Fl,it,jl,ui,Bl,lt,Ri,Di,Hi,ln,_t,st,Vl,sn,Ui,qi,Fi,ji,Bi,Gl,Dt=Te(e[41]),ve=[];for(let u=0;u<Dt.length;u+=1)ve[u]=rs(is(e,Dt,u));let mt=(e[42]||e[43])&&vo(e);return{c(){t=o("br"),i=c(),l=o("div"),s=o("label"),s.textContent="Icon path",r=c(),_=o("form"),f=o("input"),b=c(),d=o("button"),d.textContent="Change window icon",I=c(),k=o("br"),G=c(),E=o("div"),C=o("button"),C.textContent="Center",O=c(),N=o("button"),N.textContent="Minimize",oe=c(),D=o("button"),D.textContent="Hide",R=c(),B=o("button"),B.textContent="Request attention",V=c(),P=o("div"),F=o("label"),Z=p(`Maximized
`),W=o("input"),ee=c(),ae=o("label"),y=p(`Resizable
`),U=o("input"),q=c(),X=o("label"),ye=p(`Maximizable
`),le=o("input"),ce=c(),_e=o("label"),de=p(`Minimizable
`),re=o("input"),Y=c(),ue=o("label"),H=p(`Closable
`),x=o("input"),K=c(),w=o("label"),J=p(`Has decorations
`),S=o("input"),se=c(),ke=o("label"),ze=p(`Always on top
`),fe=o("input"),Se=c(),Le=o("label"),Me=p(`Content protected
`),he=o("input"),me=c(),Fe=o("label"),je=p(`Fullscreen
`),pe=o("input"),Ce=c(),te=o("br"),Ee=c(),ge=o("div"),we=o("div"),ne=o("div"),z=p(`X
`),Q=o("input"),T=c(),Pe=o("div"),fn=p(`Y
`),Ae=o("input"),hn=c(),Ke=o("div"),kt=o("div"),pn=p(`Width
`),Ie=o("input"),bn=c(),zt=o("div"),gn=p(`Height
`),Oe=o("input"),_n=c(),Je=o("div"),Lt=o("div"),mn=p(`Min width
`),Ue=o("input"),wn=c(),Et=o("div"),vn=p(`Min height
`),qe=o("input"),yn=c(),Qe=o("div"),St=o("div"),kn=p(`Max width
`),We=o("input"),zn=c(),Ct=o("div"),Ln=p(`Max height
`),Ne=o("input"),Xt=c(),Yt=o("br"),Kt=c(),M=o("div"),Be=o("div"),Re=o("div"),ut=o("div"),ut.textContent="Inner Size",Jt=c(),ct=o("span"),Qt=p("Width: "),Pt=p(dt),Zt=c(),ft=o("span"),xt=p("Height: "),Tt=p(ht),$t=c(),De=o("div"),pt=o("div"),pt.textContent="Outer Size",en=c(),bt=o("span"),tn=p("Width: "),Mt=p(gt),En=c(),Sn=o("span"),il=p("Height: "),mi=p(Cn),ll=c(),At=o("div"),Ze=o("div"),Pn=o("div"),Pn.textContent="Inner Logical Size",sl=c(),Tn=o("span"),ol=p("Width: "),wi=p(Mn),al=c(),An=o("span"),rl=p("Height: "),vi=p(In),ul=c(),xe=o("div"),On=o("div"),On.textContent="Outer Logical Size",cl=c(),Wn=o("span"),dl=p("Width: "),yi=p(Nn),fl=c(),Rn=o("span"),hl=p("Height: "),ki=p(Dn),pl=c(),It=o("div"),$e=o("div"),Hn=o("div"),Hn.textContent="Inner Position",bl=c(),Un=o("span"),gl=p("x: "),zi=p(qn),_l=c(),Fn=o("span"),ml=p("y: "),Li=p(jn),wl=c(),et=o("div"),Bn=o("div"),Bn.textContent="Outer Position",vl=c(),Vn=o("span"),yl=p("x: "),Ei=p(Gn),kl=c(),Xn=o("span"),zl=p("y: "),Si=p(Yn),Ll=c(),Ot=o("div"),tt=o("div"),Kn=o("div"),Kn.textContent="Inner Logical Position",El=c(),Jn=o("span"),Sl=p("x: "),Ci=p(Qn),Cl=c(),Zn=o("span"),Pl=p("y: "),Pi=p(xn),Tl=c(),nt=o("div"),$n=o("div"),$n.textContent="Outer Logical Position",Ml=c(),ei=o("span"),Al=p("x: "),Ti=p(ti),Il=c(),ni=o("span"),Ol=p("y: "),Mi=p(ii),Ai=c(),Ii=o("br"),Oi=c(),nn=o("h4"),nn.textContent="Cursor",Wi=c(),Ve=o("div"),li=o("label"),Wt=o("input"),Wl=p(`
Grab`),Nl=c(),si=o("label"),Nt=o("input"),Rl=p(`
Visible`),Dl=c(),oi=o("label"),Rt=o("input"),Hl=p(`
Ignore events`),Ni=c(),Ge=o("div"),ai=o("label"),Ul=p(`Icon
`),Xe=o("select");for(let u=0;u<ve.length;u+=1)ve[u].c();ql=c(),ri=o("label"),Fl=p(`X position
`),it=o("input"),jl=c(),ui=o("label"),Bl=p(`Y position
`),lt=o("input"),Ri=c(),Di=o("br"),Hi=c(),ln=o("div"),_t=o("form"),st=o("input"),Vl=c(),sn=o("button"),sn.textContent="Set title",Ui=c(),qi=o("br"),Fi=c(),mt&&mt.c(),ji=Qi(),a(f,"class","input grow"),a(d,"class","btn"),a(d,"type","submit"),a(_,"class","flex gap-1 grow"),a(l,"class","flex gap-1 items-center"),a(C,"class","btn"),a(C,"title","Unminimizes after 2 seconds"),a(N,"class","btn"),a(N,"title","Unminimizes after 2 seconds"),a(D,"class","btn"),a(D,"title","Visible again after 2 seconds"),a(B,"class","btn"),a(B,"title","Minimizes the window, requests attention for 3s and then resets it"),a(E,"class","flex flex-wrap gap-2"),a(W,"type","checkbox"),a(U,"type","checkbox"),a(le,"type","checkbox"),a(re,"type","checkbox"),a(x,"type","checkbox"),a(S,"type","checkbox"),a(fe,"type","checkbox"),a(he,"type","checkbox"),a(pe,"type","checkbox"),a(P,"class","flex flex-wrap gap-2"),a(Q,"class","input"),a(Q,"type","number"),a(Q,"min","0"),a(Ae,"class","input"),a(Ae,"type","number"),a(Ae,"min","0"),a(we,"class","flex children:grow flex-col"),a(Ie,"class","input"),a(Ie,"type","number"),a(Ie,"min","400"),a(Oe,"class","input"),a(Oe,"type","number"),a(Oe,"min","400"),a(Ke,"class","flex children:grow flex-col"),a(Ue,"class","input"),a(Ue,"type","number"),a(qe,"class","input"),a(qe,"type","number"),a(Je,"class","flex children:grow flex-col"),a(We,"class","input"),a(We,"type","number"),a(We,"min","800"),a(Ne,"class","input"),a(Ne,"type","number"),a(Ne,"min","400"),a(Qe,"class","flex children:grow flex-col"),a(ge,"class","flex flex-row gap-2 flex-wrap"),a(ut,"class","text-accent dark:text-darkAccent font-700"),a(Re,"class","grow"),a(pt,"class","text-accent dark:text-darkAccent font-700"),a(De,"class","grow"),a(Be,"class","flex"),a(Pn,"class","text-accent dark:text-darkAccent font-700"),a(Ze,"class","grow"),a(On,"class","text-accent dark:text-darkAccent font-700"),a(xe,"class","grow"),a(At,"class","flex"),a(Hn,"class","text-accent dark:text-darkAccent font-700"),a($e,"class","grow"),a(Bn,"class","text-accent dark:text-darkAccent font-700"),a(et,"class","grow"),a(It,"class","flex"),a(Kn,"class","text-accent dark:text-darkAccent font-700"),a(tt,"class","grow"),a($n,"class","text-accent dark:text-darkAccent font-700"),a(nt,"class","grow"),a(Ot,"class","flex"),a(nn,"class","mb-2"),a(Wt,"type","checkbox"),a(Nt,"type","checkbox"),a(Rt,"type","checkbox"),a(Ve,"class","flex gap-2"),a(Xe,"class","input"),e[23]===void 0&&vt(()=>e[78].call(Xe)),a(it,"class","input"),a(it,"type","number"),a(lt,"class","input"),a(lt,"type","number"),a(Ge,"class","flex gap-2"),a(st,"class","input grow"),a(st,"id","title"),a(sn,"class","btn"),a(sn,"type","submit"),a(_t,"class","flex gap-1"),a(ln,"class","flex flex-col gap-1")},m(u,h){v(u,t,h),v(u,i,h),v(u,l,h),n(l,s),n(l,r),n(l,_),n(_,f),A(f,e[40]),n(_,b),n(_,d),v(u,I,h),v(u,k,h),v(u,G,h),v(u,E,h),n(E,C),n(E,O),n(E,N),n(E,oe),n(E,D),n(E,R),n(E,B),v(u,V,h),v(u,P,h),n(P,F),n(F,Z),n(F,W),W.checked=e[6],n(P,ee),n(P,ae),n(ae,y),n(ae,U),U.checked=e[2],n(P,q),n(P,X),n(X,ye),n(X,le),le.checked=e[3],n(P,ce),n(P,_e),n(_e,de),n(_e,re),re.checked=e[4],n(P,Y),n(P,ue),n(ue,H),n(ue,x),x.checked=e[5],n(P,K),n(P,w),n(w,J),n(w,S),S.checked=e[7],n(P,se),n(P,ke),n(ke,ze),n(ke,fe),fe.checked=e[8],n(P,Se),n(P,Le),n(Le,Me),n(Le,he),he.checked=e[9],n(P,me),n(P,Fe),n(Fe,je),n(Fe,pe),pe.checked=e[10],v(u,Ce,h),v(u,te,h),v(u,Ee,h),v(u,ge,h),n(ge,we),n(we,ne),n(ne,z),n(ne,Q),A(Q,e[17]),n(we,T),n(we,Pe),n(Pe,fn),n(Pe,Ae),A(Ae,e[18]),n(ge,hn),n(ge,Ke),n(Ke,kt),n(kt,pn),n(kt,Ie),A(Ie,e[11]),n(Ke,bn),n(Ke,zt),n(zt,gn),n(zt,Oe),A(Oe,e[12]),n(ge,_n),n(ge,Je),n(Je,Lt),n(Lt,mn),n(Lt,Ue),A(Ue,e[13]),n(Je,wn),n(Je,Et),n(Et,vn),n(Et,qe),A(qe,e[14]),n(ge,yn),n(ge,Qe),n(Qe,St),n(St,kn),n(St,We),A(We,e[15]),n(Qe,zn),n(Qe,Ct),n(Ct,Ln),n(Ct,Ne),A(Ne,e[16]),v(u,Xt,h),v(u,Yt,h),v(u,Kt,h),v(u,M,h),n(M,Be),n(Be,Re),n(Re,ut),n(Re,Jt),n(Re,ct),n(ct,Qt),n(ct,Pt),n(Re,Zt),n(Re,ft),n(ft,xt),n(ft,Tt),n(Be,$t),n(Be,De),n(De,pt),n(De,en),n(De,bt),n(bt,tn),n(bt,Mt),n(De,En),n(De,Sn),n(Sn,il),n(Sn,mi),n(M,ll),n(M,At),n(At,Ze),n(Ze,Pn),n(Ze,sl),n(Ze,Tn),n(Tn,ol),n(Tn,wi),n(Ze,al),n(Ze,An),n(An,rl),n(An,vi),n(At,ul),n(At,xe),n(xe,On),n(xe,cl),n(xe,Wn),n(Wn,dl),n(Wn,yi),n(xe,fl),n(xe,Rn),n(Rn,hl),n(Rn,ki),n(M,pl),n(M,It),n(It,$e),n($e,Hn),n($e,bl),n($e,Un),n(Un,gl),n(Un,zi),n($e,_l),n($e,Fn),n(Fn,ml),n(Fn,Li),n(It,wl),n(It,et),n(et,Bn),n(et,vl),n(et,Vn),n(Vn,yl),n(Vn,Ei),n(et,kl),n(et,Xn),n(Xn,zl),n(Xn,Si),n(M,Ll),n(M,Ot),n(Ot,tt),n(tt,Kn),n(tt,El),n(tt,Jn),n(Jn,Sl),n(Jn,Ci),n(tt,Cl),n(tt,Zn),n(Zn,Pl),n(Zn,Pi),n(Ot,Tl),n(Ot,nt),n(nt,$n),n(nt,Ml),n(nt,ei),n(ei,Al),n(ei,Ti),n(nt,Il),n(nt,ni),n(ni,Ol),n(ni,Mi),v(u,Ai,h),v(u,Ii,h),v(u,Oi,h),v(u,nn,h),v(u,Wi,h),v(u,Ve,h),n(Ve,li),n(li,Wt),Wt.checked=e[19],n(li,Wl),n(Ve,Nl),n(Ve,si),n(si,Nt),Nt.checked=e[20],n(si,Rl),n(Ve,Dl),n(Ve,oi),n(oi,Rt),Rt.checked=e[24],n(oi,Hl),v(u,Ni,h),v(u,Ge,h),n(Ge,ai),n(ai,Ul),n(ai,Xe);for(let be=0;be<ve.length;be+=1)ve[be]&&ve[be].m(Xe,null);at(Xe,e[23],!0),n(Ge,ql),n(Ge,ri),n(ri,Fl),n(ri,it),A(it,e[21]),n(Ge,jl),n(Ge,ui),n(ui,Bl),n(ui,lt),A(lt,e[22]),v(u,Ri,h),v(u,Di,h),v(u,Hi,h),v(u,ln,h),n(ln,_t),n(_t,st),A(st,e[31]),n(_t,Vl),n(_t,sn),v(u,Ui,h),v(u,qi,h),v(u,Fi,h),mt&&mt.m(u,h),v(u,ji,h),Bi||(Gl=[L(f,"input",e[56]),L(_,"submit",Kl(e[46])),L(C,"click",e[57]),L(N,"click",e[48]),L(D,"click",e[47]),L(B,"click",e[50]),L(W,"change",e[58]),L(U,"change",e[59]),L(le,"change",e[60]),L(re,"change",e[61]),L(x,"change",e[62]),L(S,"change",e[63]),L(fe,"change",e[64]),L(he,"change",e[65]),L(pe,"change",e[66]),L(Q,"input",e[67]),L(Ae,"input",e[68]),L(Ie,"input",e[69]),L(Oe,"input",e[70]),L(Ue,"input",e[71]),L(qe,"input",e[72]),L(We,"input",e[73]),L(Ne,"input",e[74]),L(Wt,"change",e[75]),L(Nt,"change",e[76]),L(Rt,"change",e[77]),L(Xe,"change",e[78]),L(it,"input",e[79]),L(lt,"input",e[80]),L(st,"input",e[81]),L(_t,"submit",Kl(e[46]))],Bi=!0)},p(u,h){if(h[1]&512&&f.value!==u[40]&&A(f,u[40]),h[0]&64&&(W.checked=u[6]),h[0]&4&&(U.checked=u[2]),h[0]&8&&(le.checked=u[3]),h[0]&16&&(re.checked=u[4]),h[0]&32&&(x.checked=u[5]),h[0]&128&&(S.checked=u[7]),h[0]&256&&(fe.checked=u[8]),h[0]&512&&(he.checked=u[9]),h[0]&1024&&(pe.checked=u[10]),h[0]&131072&&j(Q.value)!==u[17]&&A(Q,u[17]),h[0]&262144&&j(Ae.value)!==u[18]&&A(Ae,u[18]),h[0]&2048&&j(Ie.value)!==u[11]&&A(Ie,u[11]),h[0]&4096&&j(Oe.value)!==u[12]&&A(Oe,u[12]),h[0]&8192&&j(Ue.value)!==u[13]&&A(Ue,u[13]),h[0]&16384&&j(qe.value)!==u[14]&&A(qe,u[14]),h[0]&32768&&j(We.value)!==u[15]&&A(We,u[15]),h[0]&65536&&j(Ne.value)!==u[16]&&A(Ne,u[16]),h[0]&536870912&&dt!==(dt=u[29].width+"")&&ie(Pt,dt),h[0]&536870912&&ht!==(ht=u[29].height+"")&&ie(Tt,ht),h[0]&1073741824&&gt!==(gt=u[30].width+"")&&ie(Mt,gt),h[0]&1073741824&&Cn!==(Cn=u[30].height+"")&&ie(mi,Cn),h[0]&603979776&&Mn!==(Mn=u[29].toLogical(u[26]).width+"")&&ie(wi,Mn),h[0]&603979776&&In!==(In=u[29].toLogical(u[26]).height+"")&&ie(vi,In),h[0]&1140850688&&Nn!==(Nn=u[30].toLogical(u[26]).width+"")&&ie(yi,Nn),h[0]&1140850688&&Dn!==(Dn=u[30].toLogical(u[26]).height+"")&&ie(ki,Dn),h[0]&134217728&&qn!==(qn=u[27].x+"")&&ie(zi,qn),h[0]&134217728&&jn!==(jn=u[27].y+"")&&ie(Li,jn),h[0]&268435456&&Gn!==(Gn=u[28].x+"")&&ie(Ei,Gn),h[0]&268435456&&Yn!==(Yn=u[28].y+"")&&ie(Si,Yn),h[0]&201326592&&Qn!==(Qn=u[27].toLogical(u[26]).x+"")&&ie(Ci,Qn),h[0]&201326592&&xn!==(xn=u[27].toLogical(u[26]).y+"")&&ie(Pi,xn),h[0]&335544320&&ti!==(ti=u[28].toLogical(u[26]).x+"")&&ie(Ti,ti),h[0]&335544320&&ii!==(ii=u[28].toLogical(u[26]).y+"")&&ie(Mi,ii),h[0]&524288&&(Wt.checked=u[19]),h[0]&1048576&&(Nt.checked=u[20]),h[0]&16777216&&(Rt.checked=u[24]),h[1]&1024){Dt=Te(u[41]);let be;for(be=0;be<Dt.length;be+=1){const Xl=is(u,Dt,be);ve[be]?ve[be].p(Xl,h):(ve[be]=rs(Xl),ve[be].c(),ve[be].m(Xe,null))}for(;be<ve.length;be+=1)ve[be].d(1);ve.length=Dt.length}h[0]&8388608|h[1]&1024&&at(Xe,u[23]),h[0]&2097152&&j(it.value)!==u[21]&&A(it,u[21]),h[0]&4194304&&j(lt.value)!==u[22]&&A(lt,u[22]),h[1]&1&&st.value!==u[31]&&A(st,u[31]),(u[42]||u[43])&&mt.p(u,h)},d(u){u&&(m(t),m(i),m(l),m(I),m(k),m(G),m(E),m(V),m(P),m(Ce),m(te),m(Ee),m(ge),m(Xt),m(Yt),m(Kt),m(M),m(Ai),m(Ii),m(Oi),m(nn),m(Wi),m(Ve),m(Ni),m(Ge),m(Ri),m(Di),m(Hi),m(ln),m(Ui),m(qi),m(Fi),m(ji)),Bt(ve,u),mt&&mt.d(u),Bi=!1,He(Gl)}}}function rs(e){let t,i=e[104]+"",l;return{c(){t=o("option"),l=p(i),t.__value=e[104],A(t,t.__value)},m(s,r){v(s,t,r),n(t,l)},p:$,d(s){s&&m(t)}}}function vo(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ye,le=(e[32].length?e[32].join(","):"None")+"",ce,_e,de,re,Y,ue=Te(e[44]),H=[];for(let w=0;w<ue.length;w+=1)H[w]=us(ns(e,ue,w));let x=Te(e[45]),K=[];for(let w=0;w<x.length;w+=1)K[w]=cs(ts(e,x,w));return{c(){t=o("div"),i=o("div"),l=o("label"),s=p(`Effect
`),r=o("select");for(let w=0;w<H.length;w+=1)H[w].c();_=c(),f=o("label"),b=p(`State
`),d=o("select");for(let w=0;w<K.length;w+=1)K[w].c();I=c(),k=o("label"),G=p(`Radius
`),E=o("input"),C=c(),O=o("div"),N=o("label"),oe=p(`Color
`),D=o("div"),R=o("input"),B=c(),V=o("input"),P=c(),F=o("input"),Z=c(),W=o("input"),ee=c(),ae=o("div"),y=o("button"),y.textContent="Add",U=c(),q=o("div"),X=o("div"),ye=p("Applied effects: "),ce=p(le),_e=c(),de=o("button"),de.textContent="Clear",a(r,"class","input"),e[33]===void 0&&vt(()=>e[82].call(r)),a(d,"class","input"),e[34]===void 0&&vt(()=>e[83].call(d)),a(E,"class","input"),a(E,"type","number"),a(i,"class","flex"),Ht(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","R"),Ht(V,"max-width","120px"),a(V,"class","input"),a(V,"type","number"),a(V,"placeholder","G"),Ht(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Ht(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","A"),a(D,"class","flex"),a(O,"class","flex"),a(y,"class","btn"),Ht(y,"width","80px"),a(ae,"class","flex"),a(de,"class","btn"),Ht(de,"width","80px"),a(q,"class","flex"),a(t,"class","flex flex-col gap-1")},m(w,J){v(w,t,J),n(t,i),n(i,l),n(l,s),n(l,r);for(let S=0;S<H.length;S+=1)H[S]&&H[S].m(r,null);at(r,e[33],!0),n(i,_),n(i,f),n(f,b),n(f,d);for(let S=0;S<K.length;S+=1)K[S]&&K[S].m(d,null);at(d,e[34],!0),n(i,I),n(i,k),n(k,G),n(k,E),A(E,e[35]),n(t,C),n(t,O),n(O,N),n(N,oe),n(N,D),n(D,R),A(R,e[36]),n(D,B),n(D,V),A(V,e[37]),n(D,P),n(D,F),A(F,e[38]),n(D,Z),n(D,W),A(W,e[39]),n(t,ee),n(t,ae),n(ae,y),n(t,U),n(t,q),n(q,X),n(X,ye),n(X,ce),n(q,_e),n(q,de),re||(Y=[L(r,"change",e[82]),L(d,"change",e[83]),L(E,"input",e[84]),L(R,"input",e[85]),L(V,"input",e[86]),L(F,"input",e[87]),L(W,"input",e[88]),L(y,"click",e[51]),L(de,"click",e[52])],re=!0)},p(w,J){if(J[1]&8192){ue=Te(w[44]);let S;for(S=0;S<ue.length;S+=1){const se=ns(w,ue,S);H[S]?H[S].p(se,J):(H[S]=us(se),H[S].c(),H[S].m(r,null))}for(;S<H.length;S+=1)H[S].d(1);H.length=ue.length}if(J[1]&8196&&at(r,w[33]),J[1]&16384){x=Te(w[45]);let S;for(S=0;S<x.length;S+=1){const se=ts(w,x,S);K[S]?K[S].p(se,J):(K[S]=cs(se),K[S].c(),K[S].m(d,null))}for(;S<K.length;S+=1)K[S].d(1);K.length=x.length}J[1]&16392&&at(d,w[34]),J[1]&16&&j(E.value)!==w[35]&&A(E,w[35]),J[1]&32&&j(R.value)!==w[36]&&A(R,w[36]),J[1]&64&&j(V.value)!==w[37]&&A(V,w[37]),J[1]&128&&j(F.value)!==w[38]&&A(F,w[38]),J[1]&256&&j(W.value)!==w[39]&&A(W,w[39]),J[1]&2&&le!==(le=(w[32].length?w[32].join(","):"None")+"")&&ie(ce,le)},d(w){w&&m(t),Bt(H,w),Bt(K,w),re=!1,He(Y)}}}function us(e){let t,i=e[101]+"",l;return{c(){t=o("option"),l=p(i),t.__value=e[101],A(t,t.__value)},m(s,r){v(s,t,r),n(t,l)},p:$,d(s){s&&m(t)}}}function cs(e){let t,i=e[98]+"",l;return{c(){t=o("option"),l=p(i),t.__value=e[98],A(t,t.__value)},m(s,r){v(s,t,r),n(t,l)},p:$,d(s){s&&m(t)}}}function yo(e){let t,i,l,s,r,_,f,b,d=Object.keys(e[1]).length>=1,I,k,G,E=d&&ss(e),C=e[1][e[0]]&&as(e);return{c(){t=o("div"),i=o("div"),l=o("input"),s=c(),r=o("button"),r.textContent="New window",_=c(),f=o("br"),b=c(),E&&E.c(),I=c(),C&&C.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(r,"class","btn"),a(i,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(O,N){v(O,t,N),n(t,i),n(i,l),A(l,e[25]),n(i,s),n(i,r),n(t,_),n(t,f),n(t,b),E&&E.m(t,null),n(t,I),C&&C.m(t,null),k||(G=[L(l,"input",e[54]),L(r,"click",e[49])],k=!0)},p(O,N){N[0]&33554432&&l.value!==O[25]&&A(l,O[25]),N[0]&2&&(d=Object.keys(O[1]).length>=1),d?E?E.p(O,N):(E=ss(O),E.c(),E.m(t,I)):E&&(E.d(1),E=null),O[1][O[0]]?C?C.p(O,N):(C=as(O),C.c(),C.m(t,null)):C&&(C.d(1),C=null)},i:$,o:$,d(O){O&&m(t),E&&E.d(),C&&C.d(),k=!1,He(G)}}}function ko(e,t,i){const l=tl();let s=l.label;const r={[l.label]: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"],f=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],b=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=b?f:Object.keys(bi).map(M=>bi[M]).filter(M=>!f.includes(M));const k=Object.keys(gi).map(M=>gi[M]);let{onMessage:G}=t;const E=document.querySelector("main");let C,O=!0,N=!0,oe=!0,D=!0,R=!1,B=!0,V=!1,P=!0,F=!1,Z=null,W=null,ee=null,ae=null,y=null,U=null,q=null,X=null,ye=1,le=new Ye(q,X),ce=new Ye(q,X),_e=new rt(Z,W),de=new rt(Z,W),re,Y,ue=!1,H=!0,x=null,K=null,w="default",J=!1,S="Awesome Tauri Example!",se=[],ke,ze,fe,Se,Le,Me,he,me;function Fe(){r[s].setTitle(S)}function je(){r[s].hide(),setTimeout(r[s].show,2e3)}function pe(){r[s].minimize(),setTimeout(r[s].unminimize,2e3)}function Ce(){if(!C)return;const M=new dn(C);i(1,r[C]=M,r),M.once("tauri://error",function(){G("Error creating new webview")})}function te(){r[s].innerSize().then(M=>{i(29,_e=M),i(11,Z=_e.width),i(12,W=_e.height)}),r[s].outerSize().then(M=>{i(30,de=M)})}function Ee(){r[s].innerPosition().then(M=>{i(27,le=M)}),r[s].outerPosition().then(M=>{i(28,ce=M),i(17,q=ce.x),i(18,X=ce.y)})}async function ge(M){M&&(re&&re(),Y&&Y(),Y=await M.listen("tauri://move",Ee),re=await M.listen("tauri://resize",te))}async function we(){await r[s].minimize(),await r[s].requestUserAttention(el.Critical),await new Promise(M=>setTimeout(M,3e3)),await r[s].requestUserAttention(null)}async function ne(){se.includes(ke)||i(32,se=[...se,ke]);const M={effects:se,state:ze,radius:fe};Number.isInteger(Se)&&Number.isInteger(Le)&&Number.isInteger(Me)&&Number.isInteger(he)&&(M.color=[Se,Le,Me,he]),E.classList.remove("bg-primary"),E.classList.remove("dark:bg-darkPrimary"),await r[s].clearEffects(),await r[s].setEffects(M)}async function z(){i(32,se=[]),await r[s].clearEffects(),E.classList.add("bg-primary"),E.classList.add("dark:bg-darkPrimary")}function Q(){C=this.value,i(25,C)}function T(){s=di(this),i(0,s),i(1,r)}function Pe(){me=this.value,i(40,me)}const fn=()=>r[s].center();function Ae(){R=this.checked,i(6,R)}function hn(){O=this.checked,i(2,O)}function Ke(){N=this.checked,i(3,N)}function kt(){oe=this.checked,i(4,oe)}function pn(){D=this.checked,i(5,D)}function Ie(){B=this.checked,i(7,B)}function bn(){V=this.checked,i(8,V)}function zt(){P=this.checked,i(9,P)}function gn(){F=this.checked,i(10,F)}function Oe(){q=j(this.value),i(17,q)}function _n(){X=j(this.value),i(18,X)}function Je(){Z=j(this.value),i(11,Z)}function Lt(){W=j(this.value),i(12,W)}function mn(){ee=j(this.value),i(13,ee)}function Ue(){ae=j(this.value),i(14,ae)}function wn(){y=j(this.value),i(15,y)}function Et(){U=j(this.value),i(16,U)}function vn(){ue=this.checked,i(19,ue)}function qe(){H=this.checked,i(20,H)}function yn(){J=this.checked,i(24,J)}function Qe(){w=di(this),i(23,w),i(41,_)}function St(){x=j(this.value),i(21,x)}function kn(){K=j(this.value),i(22,K)}function We(){S=this.value,i(31,S)}function zn(){ke=di(this),i(33,ke),i(44,I)}function Ct(){ze=di(this),i(34,ze),i(45,k)}function Ln(){fe=j(this.value),i(35,fe)}function Ne(){Se=j(this.value),i(36,Se)}function Xt(){Le=j(this.value),i(37,Le)}function Yt(){Me=j(this.value),i(38,Me)}function Kt(){he=j(this.value),i(39,he)}return e.$$set=M=>{"onMessage"in M&&i(53,G=M.onMessage)},e.$$.update=()=>{var M,Be,Re,ut,Jt,ct,Qt,dt,Pt,Zt,ft,xt,ht,Tt,$t,De,pt,en,bt,tn,gt,Mt;e.$$.dirty[0]&3&&(r[s],Ee(),te()),e.$$.dirty[0]&7&&((M=r[s])==null||M.setResizable(O)),e.$$.dirty[0]&11&&((Be=r[s])==null||Be.setMaximizable(N)),e.$$.dirty[0]&19&&((Re=r[s])==null||Re.setMinimizable(oe)),e.$$.dirty[0]&35&&((ut=r[s])==null||ut.setClosable(D)),e.$$.dirty[0]&67&&(R?(Jt=r[s])==null||Jt.maximize():(ct=r[s])==null||ct.unmaximize()),e.$$.dirty[0]&131&&((Qt=r[s])==null||Qt.setDecorations(B)),e.$$.dirty[0]&259&&((dt=r[s])==null||dt.setAlwaysOnTop(V)),e.$$.dirty[0]&515&&((Pt=r[s])==null||Pt.setContentProtected(P)),e.$$.dirty[0]&1027&&((Zt=r[s])==null||Zt.setFullscreen(F)),e.$$.dirty[0]&6147&&Z&&W&&((ft=r[s])==null||ft.setSize(new rt(Z,W))),e.$$.dirty[0]&24579&&(ee&&ae?(xt=r[s])==null||xt.setMinSize(new un(ee,ae)):(ht=r[s])==null||ht.setMinSize(null)),e.$$.dirty[0]&98307&&(y>800&&U>400?(Tt=r[s])==null||Tt.setMaxSize(new un(y,U)):($t=r[s])==null||$t.setMaxSize(null)),e.$$.dirty[0]&393219&&q!==null&&X!==null&&((De=r[s])==null||De.setPosition(new Ye(q,X))),e.$$.dirty[0]&3&&((pt=r[s])==null||pt.scaleFactor().then(En=>i(26,ye=En))),e.$$.dirty[0]&3&&ge(r[s]),e.$$.dirty[0]&524291&&((en=r[s])==null||en.setCursorGrab(ue)),e.$$.dirty[0]&1048579&&((bt=r[s])==null||bt.setCursorVisible(H)),e.$$.dirty[0]&8388611&&((tn=r[s])==null||tn.setCursorIcon(w)),e.$$.dirty[0]&6291459&&x!==null&&K!==null&&((gt=r[s])==null||gt.setCursorPosition(new Ye(x,K))),e.$$.dirty[0]&16777219&&((Mt=r[s])==null||Mt.setIgnoreCursorEvents(J))},[s,r,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ue,H,x,K,w,J,C,ye,le,ce,_e,de,S,se,ke,ze,fe,Se,Le,Me,he,me,_,b,d,I,k,Fe,je,pe,Ce,we,ne,z,G,Q,T,Pe,fn,Ae,hn,Ke,kt,pn,Ie,bn,zt,gn,Oe,_n,Je,Lt,mn,Ue,wn,Et,vn,qe,yn,Qe,St,kn,We,zn,Ct,Ln,Ne,Xt,Yt,Kt]}class zo extends Gt{constructor(t){super(),Vt(this,t,ko,yo,yt,{onMessage:53},null,[-1,-1,-1,-1])}}function Lo(e){let t;return{c(){t=o("div"),t.innerHTML='<div class="note-red grow">Not available for Linux</div> <video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>',a(t,"class","flex flex-col gap-2")},m(i,l){v(i,t,l)},p:$,i:$,o:$,d(i){i&&m(t)}}}function Eo(e,t,i){let{onMessage:l}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const b=document.querySelector("video"),d=f.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${d[0].label}`),window.stream=f,b.srcObject=f}function _(f){if(f.name==="ConstraintNotSatisfiedError"){const b=s.video;l(`The resolution ${b.width.exact}x${b.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&l("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.");l(`getUserMedia error: ${f.name}`,f)}return pi(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){_(f)}}),vs(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&i(0,l=f.onMessage)},[l]}class So extends Gt{constructor(t){super(),Vt(this,t,Eo,Lo,yt,{onMessage:0})}}function Co(e){let t,i,l,s,r,_;return{c(){t=o("div"),i=o("button"),i.textContent="Show",l=c(),s=o("button"),s.textContent="Hide",a(i,"class","btn"),a(i,"id","show"),a(i,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(f,b){v(f,t,b),n(t,i),n(t,l),n(t,s),r||(_=[L(i,"click",e[0]),L(s,"click",e[1])],r=!0)},p:$,i:$,o:$,d(f){f&&m(t),r=!1,He(_)}}}function Po(e,t,i){let{onMessage:l}=t;function s(){r().then(()=>{setTimeout(()=>{Ps().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function r(){return Ts().then(()=>l("Hide app")).catch(l)}return e.$$set=_=>{"onMessage"in _&&i(2,l=_.onMessage)},[s,r,l]}class To extends Gt{constructor(t){super(),Vt(this,t,Po,Co,yt,{onMessage:2})}}function ds(e,t,i){const l=e.slice();return l[25]=t[i],l}function fs(e,t,i){const l=e.slice();return l[28]=t[i],l}function Mo(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(i,l){v(i,t,l)},d(i){i&&m(t)}}}function Ao(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(i,l){v(i,t,l)},d(i){i&&m(t)}}}function Io(e){let t,i;return{c(){t=p(`Switch to Dark mode
`),i=o("div"),a(i,"class","i-ph-moon")},m(l,s){v(l,t,s),v(l,i,s)},d(l){l&&(m(t),m(i))}}}function Oo(e){let t,i;return{c(){t=p(`Switch to Light mode
`),i=o("div"),a(i,"class","i-ph-sun")},m(l,s){v(l,t,s),v(l,i,s)},d(l){l&&(m(t),m(i))}}}function Wo(e){let t,i,l,s,r,_,f;function b(){return e[14](e[28])}return{c(){t=o("a"),i=o("div"),l=c(),s=o("p"),s.textContent=`${e[28].label}`,a(i,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){v(d,t,I),n(t,i),n(t,l),n(t,s),_||(f=L(t,"click",b),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,f()}}}function hs(e){let t,i=e[28]&&Wo(e);return{c(){i&&i.c(),t=Qi()},m(l,s){i&&i.m(l,s),v(l,t,s)},p(l,s){l[28]&&i.p(l,s)},d(l){l&&m(t),i&&i.d(l)}}}function ps(e){let t,i=e[25].html+"",l;return{c(){t=new Vs(!1),l=Qi(),t.a=l},m(s,r){t.m(i,s,r),v(s,l,r)},p(s,r){r&16&&i!==(i=s[25].html+"")&&t.p(i)},d(s){s&&(m(l),t.d())}}}function No(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ye,le=e[1].label+"",ce,_e,de,re,Y,ue,H,x,K,w,J,S,se,ke,ze,fe,Se,Le;function Me(z,Q){return z[0]?Ao:Mo}let he=Me(e),me=he(e);function Fe(z,Q){return z[2]?Oo:Io}let je=Fe(e),pe=je(e),Ce=Te(e[5]),te=[];for(let z=0;z<Ce.length;z+=1)te[z]=hs(fs(e,Ce,z));var Ee=e[1].component;function ge(z,Q){return{props:{onMessage:z[9],insecureRenderHtml:z[10]}}}Ee&&(Y=Jl(Ee,ge(e)));let we=Te(e[4]),ne=[];for(let z=0;z<we.length;z+=1)ne[z]=ps(ds(e,we,z));return{c(){t=o("div"),me.c(),i=c(),l=o("div"),s=o("aside"),r=o("img"),f=c(),b=o("a"),pe.c(),d=c(),I=o("br"),k=c(),G=o("div"),E=c(),C=o("br"),O=c(),N=o("a"),N.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,oe=c(),D=o("a"),D.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,R=c(),B=o("a"),B.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,V=c(),P=o("br"),F=c(),Z=o("div"),W=c(),ee=o("br"),ae=c(),y=o("div");for(let z=0;z<te.length;z+=1)te[z].c();U=c(),q=o("main"),X=o("div"),ye=o("h1"),ce=p(le),_e=c(),de=o("div"),re=o("div"),Y&&xl(Y.$$.fragment),ue=c(),H=o("div"),x=o("div"),K=c(),w=o("div"),J=o("p"),J.textContent="Console",S=c(),se=o("div"),se.innerHTML='<div class="i-codicon-clear-all"></div>',ke=c(),ze=o("div");for(let z=0;z<ne.length;z+=1)ne[z].c();a(t,"id","sidebarToggle"),a(t,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),a(r,"class","self-center p-7 cursor-pointer"),Hs(r.src,_="tauri_logo.png")||a(r,"src",_),a(r,"alt","Tauri logo"),a(b,"href","##"),a(b,"class","nv justify-between h-8"),a(G,"class","bg-white/5 h-2px"),a(N,"class","nv justify-between h-8"),a(N,"target","_blank"),a(N,"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(B,"class","nv justify-between h-8"),a(B,"target","_blank"),a(B,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(Z,"class","bg-white/5 h-2px"),a(y,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(s,"id","sidebar"),a(s,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid grid-rows-[min-content_auto] select-none px-2"),a(re,"class","mr-2"),a(de,"class","overflow-y-auto"),a(X,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a(x,"class","bg-black/20 h-2px cursor-ns-resize"),a(J,"class","font-semibold"),a(se,"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(w,"class","flex justify-between items-center px-2"),a(ze,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(H,"id","console"),a(H,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(q,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),a(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(z,Q){v(z,t,Q),me.m(t,null),v(z,i,Q),v(z,l,Q),n(l,s),n(s,r),n(s,f),n(s,b),pe.m(b,null),n(s,d),n(s,I),n(s,k),n(s,G),n(s,E),n(s,C),n(s,O),n(s,N),n(s,oe),n(s,D),n(s,R),n(s,B),n(s,V),n(s,P),n(s,F),n(s,Z),n(s,W),n(s,ee),n(s,ae),n(s,y);for(let T=0;T<te.length;T+=1)te[T]&&te[T].m(y,null);n(l,U),n(l,q),n(q,X),n(X,ye),n(ye,ce),n(X,_e),n(X,de),n(de,re),Y&&Ki(Y,re,null),n(q,ue),n(q,H),n(H,x),n(H,K),n(H,w),n(w,J),n(w,S),n(w,se),n(H,ke),n(H,ze);for(let T=0;T<ne.length;T+=1)ne[T]&&ne[T].m(ze,null);e[15](H),fe=!0,Se||(Le=[L(b,"click",e[7]),L(x,"mousedown",e[12]),L(se,"click",e[11])],Se=!0)},p(z,[Q]){if(he!==(he=Me(z))&&(me.d(1),me=he(z),me&&(me.c(),me.m(t,null))),je!==(je=Fe(z))&&(pe.d(1),pe=je(z),pe&&(pe.c(),pe.m(b,null))),Q&99){Ce=Te(z[5]);let T;for(T=0;T<Ce.length;T+=1){const Pe=fs(z,Ce,T);te[T]?te[T].p(Pe,Q):(te[T]=hs(Pe),te[T].c(),te[T].m(y,null))}for(;T<te.length;T+=1)te[T].d(1);te.length=Ce.length}if((!fe||Q&2)&&le!==(le=z[1].label+"")&&ie(ce,le),Q&2&&Ee!==(Ee=z[1].component)){if(Y){Js();const T=Y;Zl(T.$$.fragment,1,0,()=>{Ji(T,1)}),Qs()}Ee?(Y=Jl(Ee,ge(z)),xl(Y.$$.fragment),Yi(Y.$$.fragment,1),Ki(Y,re,null)):Y=null}if(Q&16){we=Te(z[4]);let T;for(T=0;T<we.length;T+=1){const Pe=ds(z,we,T);ne[T]?ne[T].p(Pe,Q):(ne[T]=ps(Pe),ne[T].c(),ne[T].m(ze,null))}for(;T<ne.length;T+=1)ne[T].d(1);ne.length=we.length}},i(z){fe||(Y&&Yi(Y.$$.fragment,z),fe=!0)},o(z){Y&&Zl(Y.$$.fragment,z),fe=!1},d(z){z&&(m(t),m(i),m(l)),me.d(),pe.d(),Bt(te,z),Y&&Ji(Y),Bt(ne,z),e[15](null),Se=!1,He(Le)}}}let bs=50;function gs(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function Ro(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function Do(e,t,i){let l;document.addEventListener("keydown",y=>{y.ctrlKey&&y.key==="b"&&g("toggle_menu")});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),_=[{label:"Welcome",component:uo,icon:"i-ph-hand-waving"},{label:"Communication",component:po,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:To,icon:"i-codicon-hubot"},{label:"Window",component:zo,icon:"i-codicon-window"},{label:"WebRTC",component:So,icon:"i-ph-broadcast"}];let f=_[0];function b(y){i(1,f=y)}let d;pi(()=>{i(2,d=localStorage&&localStorage.getItem("theme")=="dark"),gs(d)});function I(){i(2,d=!d),gs(d)}let k=$s([]);Fs(e,k,y=>i(4,l=y));function G(y){k.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"</pre>"},...U])}function E(y){k.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+y+"</pre>"},...U])}function C(){k.update(()=>[])}let O,N,oe;function D(y){oe=y.clientY;const U=window.getComputedStyle(O);N=parseInt(U.height,10);const q=ye=>{const le=ye.clientY-oe,ce=N-le;i(3,O.style.height=`${ce<bs?bs:ce}px`,O)},X=()=>{document.removeEventListener("mouseup",X),document.removeEventListener("mousemove",q)};document.addEventListener("mouseup",X),document.addEventListener("mousemove",q)}let R=!1,B,V,P=!1,F=0,Z=0;const W=(y,U,q)=>Math.min(Math.max(U,y),q);pi(()=>{i(13,B=document.querySelector("#sidebar")),V=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{V.contains(y.target)?i(0,R=!R):R&&!B.contains(y.target)&&i(0,R=!1)}),document.addEventListener("touchstart",y=>{if(V.contains(y.target))return;const U=y.touches[0].clientX;(0<U&&U<20&&!R||R)&&(P=!0,F=U)}),document.addEventListener("touchmove",y=>{if(P){const U=y.touches[0].clientX;Z=U;const q=(U-F)/10;B.style.setProperty("--translate-x",`-${W(0,R?0-q:18.75-q,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(Z-F)/10;i(0,R=R?y>-(18.75/2):y>18.75/2)}P=!1})});const ee=y=>{b(y),i(0,R=!1)};function ae(y){Gi[y?"unshift":"push"](()=>{O=y,i(3,O)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&Ro(y,R)}},[R,f,d,O,l,_,b,I,k,G,E,C,D,B,ee,ae]}class Ho extends Gt{constructor(t){super(),Vt(this,t,Do,No,yt,{})}}new Ho({target:document.querySelector("#app")});