tauri/examples/api/dist/assets/index.js
Amr Bashir ed32257d04
feat(windows): add tabbed effect (#7794)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2023-10-17 12:29:10 -03:00

36 lines
53 KiB
JavaScript

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