tauri/examples/api/dist/assets/index.js
Amr Bashir a0f7b88fd8
build(api.js): simplify output JS files (#8025)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-10-23 18:22:00 -03:00

42 lines
55 KiB
JavaScript

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