From fb10b87970a43320ef4d14564f45e7579b774eaf Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 17 Oct 2023 21:13:47 +0300 Subject: [PATCH] feat: move app plugin back to core (#8039) Co-authored-by: Lucas Nogueira --- .changes/api-app.md | 5 + .changes/api-window.md | 2 +- .changes/app-plugin-core.md | 5 + .changes/window-plugin-core.md | 2 +- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/app.rs | 3 + core/tauri/src/app/plugin.rs | 52 +++++ core/tauri/src/window/scripts/drag.js | 14 +- core/tauri/src/window/scripts/print.js | 4 +- .../src/window/scripts/toggle-devtools.js | 4 +- examples/api/dist/assets/index.css | 2 +- examples/api/dist/assets/index.js | 71 +++---- examples/api/src/App.svelte | 10 + examples/api/src/views/App.svelte | 33 ++++ examples/api/src/views/Welcome.svelte | 23 +++ tooling/api/docs/js-api.json | 2 +- tooling/api/src/app.ts | 86 ++++++++ tooling/api/src/index.ts | 3 +- tooling/api/src/window.ts | 184 +++--------------- tooling/api/typedoc.json | 3 +- 20 files changed, 303 insertions(+), 207 deletions(-) create mode 100644 .changes/api-app.md create mode 100644 .changes/app-plugin-core.md create mode 100644 core/tauri/src/app/plugin.rs create mode 100644 examples/api/src/views/App.svelte create mode 100644 tooling/api/src/app.ts diff --git a/.changes/api-app.md b/.changes/api-app.md new file mode 100644 index 000000000000..7241e9798b5f --- /dev/null +++ b/.changes/api-app.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": 'minor:feat' +--- + +Add the `app` module back. \ No newline at end of file diff --git a/.changes/api-window.md b/.changes/api-window.md index c91b5dfeca93..54a9c1ff7bc0 100644 --- a/.changes/api-window.md +++ b/.changes/api-window.md @@ -2,4 +2,4 @@ "@tauri-apps/api": 'minor:feat' --- -Add the `window` module back \ No newline at end of file +Add the `window` module back. \ No newline at end of file diff --git a/.changes/app-plugin-core.md b/.changes/app-plugin-core.md new file mode 100644 index 000000000000..4574fd2f3b54 --- /dev/null +++ b/.changes/app-plugin-core.md @@ -0,0 +1,5 @@ +--- +'tauri': patch:changes +--- + +Added the `app` plugin back into core. diff --git a/.changes/window-plugin-core.md b/.changes/window-plugin-core.md index 5bea3cffc751..d3b72168e467 100644 --- a/.changes/window-plugin-core.md +++ b/.changes/window-plugin-core.md @@ -1,5 +1,5 @@ --- -"tauri": patch:changes +'tauri': patch:changes --- Added the `window` plugin back into core. diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index c9a959636d5a..b7da6cc796c8 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},J=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Q(e))!Z.call(t,a)&&a!==n&&D(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t};var K=t=>J(D({},"__esModule",{value:!0}),t);var A=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var C=(t,e,n)=>(A(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},O=(t,e,n,o)=>(A(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n);var Ne={};p(Ne,{dpi:()=>T,event:()=>S,path:()=>R,primitives:()=>z,window:()=>k});var S={};p(S,{TauriEvent:()=>L,emit:()=>E,listen:()=>v,once:()=>I});var z={};p(z,{Channel:()=>y,PluginListener:()=>w,addPluginListener:()=>Y,convertFileSrc:()=>X,invoke:()=>i,transformCallback:()=>P});function P(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var h,y=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;N(this,h,()=>{});this.id=P(e=>{C(this,h).call(this,e)})}set onmessage(e){O(this,h,e)}get onmessage(){return C(this,h)}toJSON(){return`__CHANNEL__:${this.id}`}};h=new WeakMap;var w=class{constructor(e,n,o){this.plugin=e,this.event=n,this.channelId=o}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Y(t,e,n){let o=new y;return o.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:o}).then(()=>new w(t,e,o.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function X(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}var L=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(L||{});async function x(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function v(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:P(e)}).then(o=>async()=>x(t,o))}async function I(t,e,n){return v(t,o=>{e(o),x(t,o.id).catch(()=>{})},n)}async function E(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var k={};p(k,{CloseRequestedEvent:()=>f,Effect:()=>H,EffectState:()=>V,LogicalPosition:()=>g,LogicalSize:()=>b,PhysicalPosition:()=>c,PhysicalSize:()=>u,UserAttentionType:()=>M,Window:()=>m,availableMonitors:()=>ie,currentMonitor:()=>B,getAll:()=>_,getCurrent:()=>U,primaryMonitor:()=>ee});var T={};p(T,{LogicalPosition:()=>g,LogicalSize:()=>b,PhysicalPosition:()=>c,PhysicalSize:()=>u});var b=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},u=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new b(this.width/e,this.height/e)}},g=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},c=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new g(this.x/e,this.y/e)}};var M=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(M||{}),f=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 U(){return new m(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function _(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new m(t.label,{skip:!0}))}var F=["tauri://created","tauri://error"],m=class{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return _().some(n=>n.label===e)?new m(e,{skip:!0}):null}static getCurrent(){return U()}static getAll(){return _()}static async getFocusedWindow(){for(let e of _())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):v(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):I(e,n,{target:this.label})}async emit(e,n){if(F.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return E(e,n,{target:this.label})}_handleTauriEvent(e,n){return F.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new c(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new c(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new u(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new u(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return i("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 i("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 i("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 i("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 i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("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 i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=q(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=G(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new f(n);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",a=>{e({...a,payload:!0})}),o=await this.listen("tauri://blur",a=>{e({...a,payload:!1})});return()=>{n(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",d=>{e({...d,payload:{type:"drop",paths:d.payload}})}),o=await this.listen("tauri://file-drop-hover",d=>{e({...d,payload:{type:"hover",paths:d.payload}})}),a=await this.listen("tauri://file-drop-cancelled",d=>{e({...d,payload:{type:"cancel"}})});return()=>{n(),o(),a()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},H=(s=>(s.AppearanceBased="appearanceBased",s.Light="light",s.Dark="dark",s.MediumLight="mediumLight",s.UltraDark="ultraDark",s.Titlebar="titlebar",s.Selection="selection",s.Menu="menu",s.Popover="popover",s.Sidebar="sidebar",s.HeaderView="headerView",s.Sheet="sheet",s.WindowBackground="windowBackground",s.HudWindow="hudWindow",s.FullScreenUI="fullScreenUI",s.Tooltip="tooltip",s.ContentBackground="contentBackground",s.UnderWindowBackground="underWindowBackground",s.UnderPageBackground="underPageBackground",s.Mica="mica",s.Blur="blur",s.Acrylic="acrylic",s.Tabbed="tabbed",s.TabbedDark="tabbedDark",s.TabbedLight="tabbedLight",s))(H||{}),V=(o=>(o.FollowsWindowActiveState="followsWindowActiveState",o.Active="active",o.Inactive="inactive",o))(V||{});function W(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:G(t.position),size:q(t.size)}}function G(t){return new c(t.x,t.y)}function q(t){return new u(t.width,t.height)}async function B(){return i("plugin:window|current_monitor").then(W)}async function ee(){return i("plugin:window|primary_monitor").then(W)}async function ie(){return i("plugin:window|available_monitors").then(t=>t.map(W))}var R={};p(R,{BaseDirectory:()=>$,appCacheDir:()=>oe,appConfigDir:()=>ne,appDataDir:()=>te,appLocalDataDir:()=>re,appLogDir:()=>Ce,audioDir:()=>se,basename:()=>Re,cacheDir:()=>le,configDir:()=>ae,dataDir:()=>ue,delimiter:()=>Ie,desktopDir:()=>ce,dirname:()=>We,documentDir:()=>de,downloadDir:()=>me,executableDir:()=>pe,extname:()=>ke,fontDir:()=>he,homeDir:()=>be,isAbsolute:()=>Ae,join:()=>Te,localDataDir:()=>ge,normalize:()=>Se,pictureDir:()=>ye,publicDir:()=>we,resolve:()=>Ee,resolveResource:()=>ve,resourceDir:()=>Pe,runtimeDir:()=>_e,sep:()=>Le,tempDir:()=>ze,templateDir:()=>fe,videoDir:()=>De});var $=(r=>(r[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",r))($||{});async function ne(){return i("plugin:path|resolve_directory",{directory:13})}async function te(){return i("plugin:path|resolve_directory",{directory:14})}async function re(){return i("plugin:path|resolve_directory",{directory:15})}async function oe(){return i("plugin:path|resolve_directory",{directory:16})}async function se(){return i("plugin:path|resolve_directory",{directory:1})}async function le(){return i("plugin:path|resolve_directory",{directory:2})}async function ae(){return i("plugin:path|resolve_directory",{directory:3})}async function ue(){return i("plugin:path|resolve_directory",{directory:4})}async function ce(){return i("plugin:path|resolve_directory",{directory:18})}async function de(){return i("plugin:path|resolve_directory",{directory:6})}async function me(){return i("plugin:path|resolve_directory",{directory:7})}async function pe(){return i("plugin:path|resolve_directory",{directory:19})}async function he(){return i("plugin:path|resolve_directory",{directory:20})}async function be(){return i("plugin:path|resolve_directory",{directory:21})}async function ge(){return i("plugin:path|resolve_directory",{directory:5})}async function ye(){return i("plugin:path|resolve_directory",{directory:8})}async function we(){return i("plugin:path|resolve_directory",{directory:9})}async function Pe(){return i("plugin:path|resolve_directory",{directory:11})}async function ve(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function _e(){return i("plugin:path|resolve_directory",{directory:22})}async function fe(){return i("plugin:path|resolve_directory",{directory:23})}async function De(){return i("plugin:path|resolve_directory",{directory:10})}async function Ce(){return i("plugin:path|resolve_directory",{directory:17})}async function ze(t){return i("plugin:path|resolve_directory",{directory:12})}function Le(){return window.__TAURI_INTERNALS__.plugins.path.sep}function Ie(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function Ee(...t){return i("plugin:path|resolve",{paths:t})}async function Se(t){return i("plugin:path|normalize",{path:t})}async function Te(...t){return i("plugin:path|join",{paths:t})}async function We(t){return i("plugin:path|dirname",{path:t})}async function ke(t){return i("plugin:path|extname",{path:t})}async function Re(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function Ae(t){return i("plugin:path|isAbsolute",{path:t})}return K(Ne);})(); +"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},K=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Z(e))!J.call(t,a)&&a!==n&&D(t,a,{get:()=>e[a],enumerable:!(o=Q(e,a))||o.enumerable});return t};var Y=t=>K(D({},"__esModule",{value:!0}),t);var N=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var C=(t,e,n)=>(N(t,e,"read from private field"),n?n.call(t):e.get(t)),O=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},x=(t,e,n,o)=>(N(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n);var He={};p(He,{app:()=>L,dpi:()=>W,event:()=>S,path:()=>A,primitives:()=>z,window:()=>R});var L={};p(L,{getName:()=>ie,getTauriVersion:()=>ne,getVersion:()=>ee,hide:()=>re,show:()=>te});var z={};p(z,{Channel:()=>y,PluginListener:()=>w,addPluginListener:()=>X,convertFileSrc:()=>B,invoke:()=>i,transformCallback:()=>P});function P(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var h,y=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;O(this,h,()=>{});this.id=P(e=>{C(this,h).call(this,e)})}set onmessage(e){x(this,h,e)}get onmessage(){return C(this,h)}toJSON(){return`__CHANNEL__:${this.id}`}};h=new WeakMap;var w=class{constructor(e,n,o){this.plugin=e,this.event=n,this.channelId=o}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function X(t,e,n){let o=new y;return o.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:o}).then(()=>new w(t,e,o.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function B(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function ee(){return i("plugin:app|version")}async function ie(){return i("plugin:app|name")}async function ne(){return i("plugin:app|tauri_version")}async function te(){return i("plugin:app|app_show")}async function re(){return i("plugin:app|app_hide")}var S={};p(S,{TauriEvent:()=>I,emit:()=>T,listen:()=>v,once:()=>E});var I=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(I||{});async function F(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function v(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:P(e)}).then(o=>async()=>F(t,o))}async function E(t,e,n){return v(t,o=>{e(o),F(t,o.id).catch(()=>{})},n)}async function T(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var R={};p(R,{CloseRequestedEvent:()=>f,Effect:()=>V,EffectState:()=>G,LogicalPosition:()=>g,LogicalSize:()=>b,PhysicalPosition:()=>c,PhysicalSize:()=>u,UserAttentionType:()=>U,Window:()=>m,availableMonitors:()=>le,currentMonitor:()=>oe,getAll:()=>_,getCurrent:()=>H,primaryMonitor:()=>se});var W={};p(W,{LogicalPosition:()=>g,LogicalSize:()=>b,PhysicalPosition:()=>c,PhysicalSize:()=>u});var b=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},u=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new b(this.width/e,this.height/e)}},g=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},c=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new g(this.x/e,this.y/e)}};var U=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(U||{}),f=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 H(){return new m(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function _(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new m(t.label,{skip:!0}))}var M=["tauri://created","tauri://error"],m=class{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return _().some(n=>n.label===e)?new m(e,{skip:!0}):null}static getCurrent(){return H()}static getAll(){return _()}static async getFocusedWindow(){for(let e of _())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):v(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):E(e,n,{target:this.label})}async emit(e,n){if(M.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return T(e,n,{target:this.label})}_handleTauriEvent(e,n){return M.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new c(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new c(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new u(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new u(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return i("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 i("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 i("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 i("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 i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("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 i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=$(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=q(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new f(n);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",a=>{e({...a,payload:!0})}),o=await this.listen("tauri://blur",a=>{e({...a,payload:!1})});return()=>{n(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",d=>{e({...d,payload:{type:"drop",paths:d.payload}})}),o=await this.listen("tauri://file-drop-hover",d=>{e({...d,payload:{type:"hover",paths:d.payload}})}),a=await this.listen("tauri://file-drop-cancelled",d=>{e({...d,payload:{type:"cancel"}})});return()=>{n(),o(),a()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},V=(s=>(s.AppearanceBased="appearanceBased",s.Light="light",s.Dark="dark",s.MediumLight="mediumLight",s.UltraDark="ultraDark",s.Titlebar="titlebar",s.Selection="selection",s.Menu="menu",s.Popover="popover",s.Sidebar="sidebar",s.HeaderView="headerView",s.Sheet="sheet",s.WindowBackground="windowBackground",s.HudWindow="hudWindow",s.FullScreenUI="fullScreenUI",s.Tooltip="tooltip",s.ContentBackground="contentBackground",s.UnderWindowBackground="underWindowBackground",s.UnderPageBackground="underPageBackground",s.Mica="mica",s.Blur="blur",s.Acrylic="acrylic",s.Tabbed="tabbed",s.TabbedDark="tabbedDark",s.TabbedLight="tabbedLight",s))(V||{}),G=(o=>(o.FollowsWindowActiveState="followsWindowActiveState",o.Active="active",o.Inactive="inactive",o))(G||{});function k(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:q(t.position),size:$(t.size)}}function q(t){return new c(t.x,t.y)}function $(t){return new u(t.width,t.height)}async function oe(){return i("plugin:window|current_monitor").then(k)}async function se(){return i("plugin:window|primary_monitor").then(k)}async function le(){return i("plugin:window|available_monitors").then(t=>t.map(k))}var A={};p(A,{BaseDirectory:()=>j,appCacheDir:()=>de,appConfigDir:()=>ae,appDataDir:()=>ue,appLocalDataDir:()=>ce,appLogDir:()=>Se,audioDir:()=>pe,basename:()=>Me,cacheDir:()=>me,configDir:()=>he,dataDir:()=>be,delimiter:()=>Re,desktopDir:()=>ge,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>we,executableDir:()=>Pe,extname:()=>Fe,fontDir:()=>ve,homeDir:()=>_e,isAbsolute:()=>Ue,join:()=>Oe,localDataDir:()=>fe,normalize:()=>Ne,pictureDir:()=>De,publicDir:()=>Ce,resolve:()=>Ae,resolveResource:()=>Le,resourceDir:()=>ze,runtimeDir:()=>Ie,sep:()=>ke,tempDir:()=>We,templateDir:()=>Ee,videoDir:()=>Te});var j=(r=>(r[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",r))(j||{});async function ae(){return i("plugin:path|resolve_directory",{directory:13})}async function ue(){return i("plugin:path|resolve_directory",{directory:14})}async function ce(){return i("plugin:path|resolve_directory",{directory:15})}async function de(){return i("plugin:path|resolve_directory",{directory:16})}async function pe(){return i("plugin:path|resolve_directory",{directory:1})}async function me(){return i("plugin:path|resolve_directory",{directory:2})}async function he(){return i("plugin:path|resolve_directory",{directory:3})}async function be(){return i("plugin:path|resolve_directory",{directory:4})}async function ge(){return i("plugin:path|resolve_directory",{directory:18})}async function ye(){return i("plugin:path|resolve_directory",{directory:6})}async function we(){return i("plugin:path|resolve_directory",{directory:7})}async function Pe(){return i("plugin:path|resolve_directory",{directory:19})}async function ve(){return i("plugin:path|resolve_directory",{directory:20})}async function _e(){return i("plugin:path|resolve_directory",{directory:21})}async function fe(){return i("plugin:path|resolve_directory",{directory:5})}async function De(){return i("plugin:path|resolve_directory",{directory:8})}async function Ce(){return i("plugin:path|resolve_directory",{directory:9})}async function ze(){return i("plugin:path|resolve_directory",{directory:11})}async function Le(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Ie(){return i("plugin:path|resolve_directory",{directory:22})}async function Ee(){return i("plugin:path|resolve_directory",{directory:23})}async function Te(){return i("plugin:path|resolve_directory",{directory:10})}async function Se(){return i("plugin:path|resolve_directory",{directory:17})}async function We(t){return i("plugin:path|resolve_directory",{directory:12})}function ke(){return window.__TAURI_INTERNALS__.plugins.path.sep}function Re(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function Ae(...t){return i("plugin:path|resolve",{paths:t})}async function Ne(t){return i("plugin:path|normalize",{path:t})}async function Oe(...t){return i("plugin:path|join",{paths:t})}async function xe(t){return i("plugin:path|dirname",{path:t})}async function Fe(t){return i("plugin:path|extname",{path:t})}async function Me(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function Ue(t){return i("plugin:path|isAbsolute",{path:t})}return Y(He);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index cf40e85d4fa9..ab65a96e2f2a 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -56,6 +56,8 @@ use crate::runtime::RuntimeHandle; #[cfg(target_os = "macos")] use crate::ActivationPolicy; +pub(crate) mod plugin; + #[cfg(desktop)] pub(crate) type GlobalMenuEventListener = Box; #[cfg(all(desktop, feature = "tray-icon"))] @@ -808,6 +810,7 @@ impl App { self.handle.plugin(crate::path::init())?; self.handle.plugin(crate::event::init())?; self.handle.plugin(crate::window::plugin::init())?; + self.handle.plugin(crate::app::plugin::init())?; Ok(()) } diff --git a/core/tauri/src/app/plugin.rs b/core/tauri/src/app/plugin.rs new file mode 100644 index 000000000000..ce2b35322030 --- /dev/null +++ b/core/tauri/src/app/plugin.rs @@ -0,0 +1,52 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use crate::{ + command, + plugin::{Builder, TauriPlugin}, + AppHandle, Runtime, +}; + +#[command(root = "crate")] +pub fn version(app: AppHandle) -> String { + app.package_info().version.to_string() +} + +#[command(root = "crate")] +pub fn name(app: AppHandle) -> String { + app.package_info().name.clone() +} + +#[command(root = "crate")] +pub fn tauri_version() -> &'static str { + crate::VERSION +} + +#[command(root = "crate")] +#[allow(unused_variables)] +pub fn app_show(app: AppHandle) -> crate::Result<()> { + #[cfg(target_os = "macos")] + app.show()?; + Ok(()) +} + +#[command(root = "crate")] +#[allow(unused_variables)] +pub fn app_hide(app: AppHandle) -> crate::Result<()> { + #[cfg(target_os = "macos")] + app.hide()?; + Ok(()) +} + +pub fn init() -> TauriPlugin { + Builder::new("app") + .invoke_handler(crate::generate_handler![ + version, + name, + tauri_version, + app_show, + app_hide + ]) + .build() +} diff --git a/core/tauri/src/window/scripts/drag.js b/core/tauri/src/window/scripts/drag.js index 2bcc3ee61e9a..96dd6435692f 100644 --- a/core/tauri/src/window/scripts/drag.js +++ b/core/tauri/src/window/scripts/drag.js @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -document.addEventListener("mousedown", (e) => { - if (e.target.hasAttribute("data-tauri-drag-region") && e.button === 0) { +document.addEventListener('mousedown', (e) => { + if (e.target.hasAttribute('data-tauri-drag-region') && e.button === 0) { // prevents text cursor - e.preventDefault(); + e.preventDefault() // fix #2549: double click on drag region edge causes content to maximize without window sizing change // https://github.com/tauri-apps/tauri/issues/2549#issuecomment-1250036908 - e.stopImmediatePropagation(); + e.stopImmediatePropagation() // start dragging if the element has a `tauri-drag-region` data attribute and maximize on double-clicking it - const cmd = e.detail === 2 ? "internal_toggle_maximize" : "start_dragging"; - window.__TAURI_INVOKE__("plugin:window|" + cmd); + const cmd = e.detail === 2 ? 'internal_toggle_maximize' : 'start_dragging' + window.__TAURI_INTERNALS__.invoke('plugin:window|' + cmd) } -}); +}) diff --git a/core/tauri/src/window/scripts/print.js b/core/tauri/src/window/scripts/print.js index 1e833766754d..f51a03604569 100644 --- a/core/tauri/src/window/scripts/print.js +++ b/core/tauri/src/window/scripts/print.js @@ -3,5 +3,5 @@ // SPDX-License-Identifier: MIT window.print = function () { - return window.__TAURI_INVOKE__("plugin:window|print"); -}; + return window.__TAURI_INTERNALS__.invoke('plugin:window|print') +} diff --git a/core/tauri/src/window/scripts/toggle-devtools.js b/core/tauri/src/window/scripts/toggle-devtools.js index 7be75d086152..3ca8d656b2c1 100644 --- a/core/tauri/src/window/scripts/toggle-devtools.js +++ b/core/tauri/src/window/scripts/toggle-devtools.js @@ -13,7 +13,9 @@ document.addEventListener('keydown', (event) => { if (isHotkey(event)) { - window.__TAURI_INVOKE__('plugin:window|internal_toggle_devtools') + window.__TAURI_INTERNALS__.invoke( + 'plugin:window|internal_toggle_devtools' + ) } }) } diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 81c5edf8d92d..8723712d01fb 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v28/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.items-center{align-items:center;}.self-center{align-self:center;}.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.b{border-width:1px;border-style:solid;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v28/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.items-center{align-items:center;}.self-center{align-self:center;}.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.b{border-width:1px;border-style:solid;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index faccb05a7793..798e5e1e470c 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,35 +1,38 @@ -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;ie.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;le.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<{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{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's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +var Rs=Object.defineProperty;var Ds=(e,t,i)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var ot=(e,t,i)=>(Ds(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&l(_)}).observe(document,{childList:!0,subtree:!0});function i(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function l(s){if(s.ep)return;s.ep=!0;const r=i(s);fetch(s.href,r)}})();function $(){}function _s(e){return e()}function Yl(){return Object.create(null)}function He(e){e.forEach(_s)}function ms(e){return typeof e=="function"}function yt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ci;function Hs(e,t){return e===t?!0:(ci||(ci=document.createElement("a")),ci.href=t,e===ci.href)}function Us(e){return Object.keys(e).length===0}function qs(e,...t){if(e==null){for(const l of t)l(void 0);return $}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function Fs(e,t,i){e.$$.on_destroy.push(qs(t,i))}function n(e,t){e.appendChild(t)}function v(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Bt(e,t){for(let i=0;ie.removeEventListener(t,i,l)}function Kl(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function j(e){return e===""?null:+e}function Bs(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function A(e,t){e.value=t??""}function Ht(e,t,i,l){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,l?"important":"")}function at(e,t,i){for(let l=0;le.indexOf(l)===-1?t.push(l):i.push(l)),i.forEach(l=>l()),jt=t}const fi=new Set;let wt;function Js(){wt={r:0,c:[],p:wt}}function Qs(){wt.r||He(wt.c),wt=wt.p}function Yi(e,t){e&&e.i&&(fi.delete(e),e.i(t))}function Zl(e,t,i,l){if(e&&e.o){if(fi.has(e))return;fi.add(e),wt.c.push(()=>{fi.delete(e),l&&(i&&e.d(1),l())}),e.o(t)}else l&&l()}function Te(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function xl(e){e&&e.c()}function Ki(e,t,i){const{fragment:l,after_update:s}=e.$$;l&&l.m(t,i),vt(()=>{const r=e.$$.on_mount.map(_s).filter(ms);e.$$.on_destroy?e.$$.on_destroy.push(...r):He(r),e.$$.on_mount=[]}),s.forEach(vt)}function Ji(e,t){const i=e.$$;i.fragment!==null&&(Ks(i.after_update),He(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Zs(e,t){e.$$.dirty[0]===-1&&(Ft.push(e),Xs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const C=E.length?E[0]:G;return d.ctx&&s(d.ctx[k],d.ctx[k]=C)&&(!d.skip_bound&&d.bound[k]&&d.bound[k](C),I&&Zs(e,k)),G}):[],d.update(),I=!0,He(d.before_update),d.fragment=l?l(d.ctx):!1,t.target){if(t.hydrate){const k=Bs(t.target);d.fragment&&d.fragment.l(k),k.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&Yi(e.$$.fragment),Ki(e,t.target,t.anchor),ys()}an(b)}class Gt{constructor(){ot(this,"$$");ot(this,"$$set")}$destroy(){Ji(this,1),this.$destroy=$}$on(t,i){if(!ms(i))return $;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(i),()=>{const s=l.indexOf(i);s!==-1&&l.splice(s,1)}}$set(t){this.$$set&&!Us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const xs="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(xs);const qt=[];function $s(e,t=$){let i;const l=new Set;function s(f){if(yt(e,f)&&(e=f,i)){const b=!qt.length;for(const d of l)d[1](),qt.push(d,e);if(b){for(let d=0;d{l.delete(d),l.size===0&&i&&(i(),i=null)}}return{set:s,update:r,subscribe:_}}var eo=Object.defineProperty,cn=(e,t)=>{for(var i in t)eo(e,i,{get:t[i],enumerable:!0})},ks=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},$l=(e,t,i)=>(ks(e,t,"read from private field"),i?i.call(e):t.get(e)),to=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},no=(e,t,i,l)=>(ks(e,t,"write to private field"),l?l.call(e,i):t.set(e,i),i),io={};cn(io,{Channel:()=>zs,PluginListener:()=>Ls,addPluginListener:()=>lo,convertFileSrc:()=>so,invoke:()=>g,transformCallback:()=>Zi});function Zi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var on,zs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,to(this,on,()=>{}),this.id=Zi(t=>{$l(this,on).call(this,t)})}set onmessage(t){no(this,on,t)}get onmessage(){return $l(this,on)}toJSON(){return`__CHANNEL__:${this.id}`}};on=new WeakMap;var Ls=class{constructor(t,i,l){this.plugin=t,this.event=i,this.channelId=l}async unregister(){return g(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function lo(e,t,i){let l=new zs;return l.onmessage=i,g(`plugin:${e}|register_listener`,{event:t,handler:l}).then(()=>new Ls(e,t,l.id))}async function g(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function so(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var oo={};cn(oo,{getName:()=>Ss,getTauriVersion:()=>Cs,getVersion:()=>Es,hide:()=>Ts,show:()=>Ps});async function Es(){return g("plugin:app|version")}async function Ss(){return g("plugin:app|name")}async function Cs(){return g("plugin:app|tauri_version")}async function Ps(){return g("plugin:app|app_show")}async function Ts(){return g("plugin:app|app_hide")}function ao(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z;return{c(){t=o("div"),i=o("p"),i.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,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;de[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;Se[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;pee[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=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='
Not available for Linux
',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`,X=c(),O=o("a"),O.innerHTML=`GitHub - `,Q=c(),Y=o("a"),Y.innerHTML=`Source - `,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',ke=c(),ze=o("div");for(let k=0;k{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{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:`
[${new Date().toLocaleTimeString()}]: `+(typeof L=="string"?L:JSON.stringify(L,null,1))+"
"},...R])}function S(L){d.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+L+"
"},...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{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{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")}); + tests.`,l=c(),s=o("br"),r=c(),_=o("br"),f=c(),b=o("pre"),d=p(" App name: "),I=o("code"),k=p(e[2]),G=p(` + App version: `),E=o("code"),C=p(e[0]),O=p(` + Tauri version: `),N=o("code"),oe=p(e[1]),D=p(` + `),R=c(),B=o("br"),V=c(),P=o("button"),P.textContent="Context menu",a(P,"class","btn")},m(W,ee){v(W,t,ee),n(t,i),n(t,l),n(t,s),n(t,r),n(t,_),n(t,f),n(t,b),n(b,d),n(b,I),n(I,k),n(b,G),n(b,E),n(E,C),n(b,O),n(b,N),n(N,oe),n(b,D),n(t,R),n(t,B),n(t,V),n(t,P),F||(Z=L(P,"click",e[3]),F=!0)},p(W,[ee]){ee&4&&ie(k,W[2]),ee&1&&ie(C,W[0]),ee&2&&ie(oe,W[1])},i:$,o:$,d(W){W&&m(t),F=!1,Z()}}}function ro(e,t,i){let l="1.0.0",s="1.0.0",r="Unknown";Ss().then(f=>{i(2,r=f)}),Es().then(f=>{i(0,l=f)}),Cs().then(f=>{i(1,s=f)});function _(){g("popup_context_menu")}return[l,s,r,_]}class uo extends Gt{constructor(t){super(),Vt(this,t,ro,ao,yt,{})}}var co={};cn(co,{TauriEvent:()=>Ms,emit:()=>xi,listen:()=>_i,once:()=>Is});var Ms=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(Ms||{});async function As(e,t){await g("plugin:event|unlisten",{event:e,eventId:t})}async function _i(e,t,i){return g("plugin:event|listen",{event:e,windowLabel:i==null?void 0:i.target,handler:Zi(t)}).then(l=>async()=>As(e,l))}async function Is(e,t,i){return _i(e,l=>{t(l),As(e,l.id).catch(()=>{})},i)}async function xi(e,t,i){await g("plugin:event|emit",{event:e,windowLabel:i==null?void 0:i.target,payload:t})}function fo(e){let t,i,l,s,r,_,f,b;return{c(){t=o("div"),i=o("button"),i.textContent="Call Log API",l=c(),s=o("button"),s.textContent="Call Request (async) API",r=c(),_=o("button"),_.textContent="Send event to Rust",a(i,"class","btn"),a(i,"id","log"),a(s,"class","btn"),a(s,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){v(d,t,I),n(t,i),n(t,l),n(t,s),n(t,r),n(t,_),f||(b=[L(i,"click",e[0]),L(s,"click",e[1]),L(_,"click",e[2])],f=!0)},p:$,i:$,o:$,d(d){d&&m(t),f=!1,He(b)}}}function ho(e,t,i){let{onMessage:l}=t,s;pi(async()=>{s=await _i("rust-event",l)}),vs(()=>{s&&s()});function r(){g("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){g("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function f(){xi("js-event","this is the payload string")}return e.$$set=b=>{"onMessage"in b&&i(3,l=b.onMessage)},[r,_,f,l]}class po extends Gt{constructor(t){super(),Vt(this,t,ho,fo,yt,{onMessage:3})}}var bo={};cn(bo,{LogicalPosition:()=>$i,LogicalSize:()=>un,PhysicalPosition:()=>Ye,PhysicalSize:()=>rt});var un=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},rt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new un(this.width/e,this.height/e)}},$i=class{constructor(t,i){this.type="Logical",this.x=t,this.y=i}},Ye=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new $i(this.x/e,this.y/e)}},go={};cn(go,{CloseRequestedEvent:()=>Os,Effect:()=>bi,EffectState:()=>gi,LogicalPosition:()=>$i,LogicalSize:()=>un,PhysicalPosition:()=>Ye,PhysicalSize:()=>rt,UserAttentionType:()=>el,Window:()=>dn,availableMonitors:()=>wo,currentMonitor:()=>_o,getAll:()=>hi,getCurrent:()=>tl,primaryMonitor:()=>mo});var el=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(el||{}),Os=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}};function tl(){return new dn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function hi(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new dn(e.label,{skip:!0}))}var es=["tauri://created","tauri://error"],dn=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t!=null&&t.skip||g("plugin:window|create",{options:{...t,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(e){return hi().some(t=>t.label===e)?new dn(e,{skip:!0}):null}static getCurrent(){return tl()}static getAll(){return hi()}static async getFocusedWindow(){for(let e of hi())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)}):_i(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)}):Is(e,t,{target:this.label})}async emit(e,t){if(es.includes(e)){for(let i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return xi(e,t,{target:this.label})}_handleTauriEvent(e,t){return es.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return g("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return g("plugin:window|inner_position",{label:this.label}).then(({x:e,y:t})=>new Ye(e,t))}async outerPosition(){return g("plugin:window|outer_position",{label:this.label}).then(({x:e,y:t})=>new Ye(e,t))}async innerSize(){return g("plugin:window|inner_size",{label:this.label}).then(({width:e,height:t})=>new rt(e,t))}async outerSize(){return g("plugin:window|outer_size",{label:this.label}).then(({width:e,height:t})=>new rt(e,t))}async isFullscreen(){return g("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return g("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return g("plugin:window|is_maximized",{label:this.label})}async isFocused(){return g("plugin:window|is_focused",{label:this.label})}async isDecorated(){return g("plugin:window|is_decorated",{label:this.label})}async isResizable(){return g("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return g("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return g("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return g("plugin:window|is_closable",{label:this.label})}async isVisible(){return g("plugin:window|is_visible",{label:this.label})}async title(){return g("plugin:window|title",{label:this.label})}async theme(){return g("plugin:window|theme",{label:this.label})}async center(){return g("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),g("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return g("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return g("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return g("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return g("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return g("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return g("plugin:window|maximize",{label:this.label})}async unmaximize(){return g("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return g("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return g("plugin:window|minimize",{label:this.label})}async unminimize(){return g("plugin:window|unminimize",{label:this.label})}async show(){return g("plugin:window|show",{label:this.label})}async hide(){return g("plugin:window|hide",{label:this.label})}async close(){return g("plugin:window|close",{label:this.label})}async setDecorations(e){return g("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return g("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return g("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return g("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return g("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return g("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return g("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return g("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return g("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return g("plugin:window|set_focus",{label:this.label})}async setIcon(e){return g("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return g("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return g("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return g("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return g("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return g("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return g("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return g("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Ns(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Ws(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let i=new Os(t);Promise.resolve(e(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),i=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{t(),i()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),i=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),i(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},bi=(e=>(e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight",e))(bi||{}),gi=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(gi||{});function nl(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Ws(e.position),size:Ns(e.size)}}function Ws(e){return new Ye(e.x,e.y)}function Ns(e){return new rt(e.width,e.height)}async function _o(){return g("plugin:window|current_monitor").then(nl)}async function mo(){return g("plugin:window|primary_monitor").then(nl)}async function wo(){return g("plugin:window|available_monitors").then(e=>e.map(nl))}function ts(e,t,i){const l=e.slice();return l[98]=t[i],l}function ns(e,t,i){const l=e.slice();return l[101]=t[i],l}function is(e,t,i){const l=e.slice();return l[104]=t[i],l}function ls(e,t,i){const l=e.slice();return l[107]=t[i],l}function ss(e){let t,i,l,s,r,_,f=Te(Object.keys(e[1])),b=[];for(let d=0;de[55].call(l))},m(d,I){v(d,t,I),v(d,i,I),v(d,l,I),n(l,s);for(let k=0;ke[78].call(Xe)),a(it,"class","input"),a(it,"type","number"),a(lt,"class","input"),a(lt,"type","number"),a(Ge,"class","flex gap-2"),a(st,"class","input grow"),a(st,"id","title"),a(sn,"class","btn"),a(sn,"type","submit"),a(_t,"class","flex gap-1"),a(ln,"class","flex flex-col gap-1")},m(u,h){v(u,t,h),v(u,i,h),v(u,l,h),n(l,s),n(l,r),n(l,_),n(_,f),A(f,e[40]),n(_,b),n(_,d),v(u,I,h),v(u,k,h),v(u,G,h),v(u,E,h),n(E,C),n(E,O),n(E,N),n(E,oe),n(E,D),n(E,R),n(E,B),v(u,V,h),v(u,P,h),n(P,F),n(F,Z),n(F,W),W.checked=e[6],n(P,ee),n(P,ae),n(ae,y),n(ae,U),U.checked=e[2],n(P,q),n(P,X),n(X,ye),n(X,le),le.checked=e[3],n(P,ce),n(P,_e),n(_e,de),n(_e,re),re.checked=e[4],n(P,Y),n(P,ue),n(ue,H),n(ue,x),x.checked=e[5],n(P,K),n(P,w),n(w,J),n(w,S),S.checked=e[7],n(P,se),n(P,ke),n(ke,ze),n(ke,fe),fe.checked=e[8],n(P,Se),n(P,Le),n(Le,Me),n(Le,he),he.checked=e[9],n(P,me),n(P,Fe),n(Fe,je),n(Fe,pe),pe.checked=e[10],v(u,Ce,h),v(u,te,h),v(u,Ee,h),v(u,ge,h),n(ge,we),n(we,ne),n(ne,z),n(ne,Q),A(Q,e[17]),n(we,T),n(we,Pe),n(Pe,fn),n(Pe,Ae),A(Ae,e[18]),n(ge,hn),n(ge,Ke),n(Ke,kt),n(kt,pn),n(kt,Ie),A(Ie,e[11]),n(Ke,bn),n(Ke,zt),n(zt,gn),n(zt,Oe),A(Oe,e[12]),n(ge,_n),n(ge,Je),n(Je,Lt),n(Lt,mn),n(Lt,Ue),A(Ue,e[13]),n(Je,wn),n(Je,Et),n(Et,vn),n(Et,qe),A(qe,e[14]),n(ge,yn),n(ge,Qe),n(Qe,St),n(St,kn),n(St,We),A(We,e[15]),n(Qe,zn),n(Qe,Ct),n(Ct,Ln),n(Ct,Ne),A(Ne,e[16]),v(u,Xt,h),v(u,Yt,h),v(u,Kt,h),v(u,M,h),n(M,Be),n(Be,Re),n(Re,ut),n(Re,Jt),n(Re,ct),n(ct,Qt),n(ct,Pt),n(Re,Zt),n(Re,ft),n(ft,xt),n(ft,Tt),n(Be,$t),n(Be,De),n(De,pt),n(De,en),n(De,bt),n(bt,tn),n(bt,Mt),n(De,En),n(De,Sn),n(Sn,il),n(Sn,mi),n(M,ll),n(M,At),n(At,Ze),n(Ze,Pn),n(Ze,sl),n(Ze,Tn),n(Tn,ol),n(Tn,wi),n(Ze,al),n(Ze,An),n(An,rl),n(An,vi),n(At,ul),n(At,xe),n(xe,On),n(xe,cl),n(xe,Wn),n(Wn,dl),n(Wn,yi),n(xe,fl),n(xe,Rn),n(Rn,hl),n(Rn,ki),n(M,pl),n(M,It),n(It,$e),n($e,Hn),n($e,bl),n($e,Un),n(Un,gl),n(Un,zi),n($e,_l),n($e,Fn),n(Fn,ml),n(Fn,Li),n(It,wl),n(It,et),n(et,Bn),n(et,vl),n(et,Vn),n(Vn,yl),n(Vn,Ei),n(et,kl),n(et,Xn),n(Xn,zl),n(Xn,Si),n(M,Ll),n(M,Ot),n(Ot,tt),n(tt,Kn),n(tt,El),n(tt,Jn),n(Jn,Sl),n(Jn,Ci),n(tt,Cl),n(tt,Zn),n(Zn,Pl),n(Zn,Pi),n(Ot,Tl),n(Ot,nt),n(nt,$n),n(nt,Ml),n(nt,ei),n(ei,Al),n(ei,Ti),n(nt,Il),n(nt,ni),n(ni,Ol),n(ni,Mi),v(u,Ai,h),v(u,Ii,h),v(u,Oi,h),v(u,nn,h),v(u,Wi,h),v(u,Ve,h),n(Ve,li),n(li,Wt),Wt.checked=e[19],n(li,Wl),n(Ve,Nl),n(Ve,si),n(si,Nt),Nt.checked=e[20],n(si,Rl),n(Ve,Dl),n(Ve,oi),n(oi,Rt),Rt.checked=e[24],n(oi,Hl),v(u,Ni,h),v(u,Ge,h),n(Ge,ai),n(ai,Ul),n(ai,Xe);for(let be=0;bee[82].call(r)),a(d,"class","input"),e[34]===void 0&&vt(()=>e[83].call(d)),a(E,"class","input"),a(E,"type","number"),a(i,"class","flex"),Ht(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","R"),Ht(V,"max-width","120px"),a(V,"class","input"),a(V,"type","number"),a(V,"placeholder","G"),Ht(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Ht(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","A"),a(D,"class","flex"),a(O,"class","flex"),a(y,"class","btn"),Ht(y,"width","80px"),a(ae,"class","flex"),a(de,"class","btn"),Ht(de,"width","80px"),a(q,"class","flex"),a(t,"class","flex flex-col gap-1")},m(w,J){v(w,t,J),n(t,i),n(i,l),n(l,s),n(l,r);for(let S=0;S=1,I,k,G,E=d&&ss(e),C=e[1][e[0]]&&as(e);return{c(){t=o("div"),i=o("div"),l=o("input"),s=c(),r=o("button"),r.textContent="New window",_=c(),f=o("br"),b=c(),E&&E.c(),I=c(),C&&C.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(r,"class","btn"),a(i,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(O,N){v(O,t,N),n(t,i),n(i,l),A(l,e[25]),n(i,s),n(i,r),n(t,_),n(t,f),n(t,b),E&&E.m(t,null),n(t,I),C&&C.m(t,null),k||(G=[L(l,"input",e[54]),L(r,"click",e[49])],k=!0)},p(O,N){N[0]&33554432&&l.value!==O[25]&&A(l,O[25]),N[0]&2&&(d=Object.keys(O[1]).length>=1),d?E?E.p(O,N):(E=ss(O),E.c(),E.m(t,I)):E&&(E.d(1),E=null),O[1][O[0]]?C?C.p(O,N):(C=as(O),C.c(),C.m(t,null)):C&&(C.d(1),C=null)},i:$,o:$,d(O){O&&m(t),E&&E.d(),C&&C.d(),k=!1,He(G)}}}function ko(e,t,i){const l=tl();let s=l.label;const r={[l.label]:l},_=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"],f=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],b=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=b?f:Object.keys(bi).map(M=>bi[M]).filter(M=>!f.includes(M));const k=Object.keys(gi).map(M=>gi[M]);let{onMessage:G}=t;const E=document.querySelector("main");let C,O=!0,N=!0,oe=!0,D=!0,R=!1,B=!0,V=!1,P=!0,F=!1,Z=null,W=null,ee=null,ae=null,y=null,U=null,q=null,X=null,ye=1,le=new Ye(q,X),ce=new Ye(q,X),_e=new rt(Z,W),de=new rt(Z,W),re,Y,ue=!1,H=!0,x=null,K=null,w="default",J=!1,S="Awesome Tauri Example!",se=[],ke,ze,fe,Se,Le,Me,he,me;function Fe(){r[s].setTitle(S)}function je(){r[s].hide(),setTimeout(r[s].show,2e3)}function pe(){r[s].minimize(),setTimeout(r[s].unminimize,2e3)}function Ce(){if(!C)return;const M=new dn(C);i(1,r[C]=M,r),M.once("tauri://error",function(){G("Error creating new webview")})}function te(){r[s].innerSize().then(M=>{i(29,_e=M),i(11,Z=_e.width),i(12,W=_e.height)}),r[s].outerSize().then(M=>{i(30,de=M)})}function Ee(){r[s].innerPosition().then(M=>{i(27,le=M)}),r[s].outerPosition().then(M=>{i(28,ce=M),i(17,q=ce.x),i(18,X=ce.y)})}async function ge(M){M&&(re&&re(),Y&&Y(),Y=await M.listen("tauri://move",Ee),re=await M.listen("tauri://resize",te))}async function we(){await r[s].minimize(),await r[s].requestUserAttention(el.Critical),await new Promise(M=>setTimeout(M,3e3)),await r[s].requestUserAttention(null)}async function ne(){se.includes(ke)||i(32,se=[...se,ke]);const M={effects:se,state:ze,radius:fe};Number.isInteger(Se)&&Number.isInteger(Le)&&Number.isInteger(Me)&&Number.isInteger(he)&&(M.color=[Se,Le,Me,he]),E.classList.remove("bg-primary"),E.classList.remove("dark:bg-darkPrimary"),await r[s].clearEffects(),await r[s].setEffects(M)}async function z(){i(32,se=[]),await r[s].clearEffects(),E.classList.add("bg-primary"),E.classList.add("dark:bg-darkPrimary")}function Q(){C=this.value,i(25,C)}function T(){s=di(this),i(0,s),i(1,r)}function Pe(){me=this.value,i(40,me)}const fn=()=>r[s].center();function Ae(){R=this.checked,i(6,R)}function hn(){O=this.checked,i(2,O)}function Ke(){N=this.checked,i(3,N)}function kt(){oe=this.checked,i(4,oe)}function pn(){D=this.checked,i(5,D)}function Ie(){B=this.checked,i(7,B)}function bn(){V=this.checked,i(8,V)}function zt(){P=this.checked,i(9,P)}function gn(){F=this.checked,i(10,F)}function Oe(){q=j(this.value),i(17,q)}function _n(){X=j(this.value),i(18,X)}function Je(){Z=j(this.value),i(11,Z)}function Lt(){W=j(this.value),i(12,W)}function mn(){ee=j(this.value),i(13,ee)}function Ue(){ae=j(this.value),i(14,ae)}function wn(){y=j(this.value),i(15,y)}function Et(){U=j(this.value),i(16,U)}function vn(){ue=this.checked,i(19,ue)}function qe(){H=this.checked,i(20,H)}function yn(){J=this.checked,i(24,J)}function Qe(){w=di(this),i(23,w),i(41,_)}function St(){x=j(this.value),i(21,x)}function kn(){K=j(this.value),i(22,K)}function We(){S=this.value,i(31,S)}function zn(){ke=di(this),i(33,ke),i(44,I)}function Ct(){ze=di(this),i(34,ze),i(45,k)}function Ln(){fe=j(this.value),i(35,fe)}function Ne(){Se=j(this.value),i(36,Se)}function Xt(){Le=j(this.value),i(37,Le)}function Yt(){Me=j(this.value),i(38,Me)}function Kt(){he=j(this.value),i(39,he)}return e.$$set=M=>{"onMessage"in M&&i(53,G=M.onMessage)},e.$$.update=()=>{var M,Be,Re,ut,Jt,ct,Qt,dt,Pt,Zt,ft,xt,ht,Tt,$t,De,pt,en,bt,tn,gt,Mt;e.$$.dirty[0]&3&&(r[s],Ee(),te()),e.$$.dirty[0]&7&&((M=r[s])==null||M.setResizable(O)),e.$$.dirty[0]&11&&((Be=r[s])==null||Be.setMaximizable(N)),e.$$.dirty[0]&19&&((Re=r[s])==null||Re.setMinimizable(oe)),e.$$.dirty[0]&35&&((ut=r[s])==null||ut.setClosable(D)),e.$$.dirty[0]&67&&(R?(Jt=r[s])==null||Jt.maximize():(ct=r[s])==null||ct.unmaximize()),e.$$.dirty[0]&131&&((Qt=r[s])==null||Qt.setDecorations(B)),e.$$.dirty[0]&259&&((dt=r[s])==null||dt.setAlwaysOnTop(V)),e.$$.dirty[0]&515&&((Pt=r[s])==null||Pt.setContentProtected(P)),e.$$.dirty[0]&1027&&((Zt=r[s])==null||Zt.setFullscreen(F)),e.$$.dirty[0]&6147&&Z&&W&&((ft=r[s])==null||ft.setSize(new rt(Z,W))),e.$$.dirty[0]&24579&&(ee&&ae?(xt=r[s])==null||xt.setMinSize(new un(ee,ae)):(ht=r[s])==null||ht.setMinSize(null)),e.$$.dirty[0]&98307&&(y>800&&U>400?(Tt=r[s])==null||Tt.setMaxSize(new un(y,U)):($t=r[s])==null||$t.setMaxSize(null)),e.$$.dirty[0]&393219&&q!==null&&X!==null&&((De=r[s])==null||De.setPosition(new Ye(q,X))),e.$$.dirty[0]&3&&((pt=r[s])==null||pt.scaleFactor().then(En=>i(26,ye=En))),e.$$.dirty[0]&3&&ge(r[s]),e.$$.dirty[0]&524291&&((en=r[s])==null||en.setCursorGrab(ue)),e.$$.dirty[0]&1048579&&((bt=r[s])==null||bt.setCursorVisible(H)),e.$$.dirty[0]&8388611&&((tn=r[s])==null||tn.setCursorIcon(w)),e.$$.dirty[0]&6291459&&x!==null&&K!==null&&((gt=r[s])==null||gt.setCursorPosition(new Ye(x,K))),e.$$.dirty[0]&16777219&&((Mt=r[s])==null||Mt.setIgnoreCursorEvents(J))},[s,r,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ue,H,x,K,w,J,C,ye,le,ce,_e,de,S,se,ke,ze,fe,Se,Le,Me,he,me,_,b,d,I,k,Fe,je,pe,Ce,we,ne,z,G,Q,T,Pe,fn,Ae,hn,Ke,kt,pn,Ie,bn,zt,gn,Oe,_n,Je,Lt,mn,Ue,wn,Et,vn,qe,yn,Qe,St,kn,We,zn,Ct,Ln,Ne,Xt,Yt,Kt]}class zo extends Gt{constructor(t){super(),Vt(this,t,ko,yo,yt,{onMessage:53},null,[-1,-1,-1,-1])}}function Lo(e){let t;return{c(){t=o("div"),t.innerHTML='
Not available for Linux
',a(t,"class","flex flex-col gap-2")},m(i,l){v(i,t,l)},p:$,i:$,o:$,d(i){i&&m(t)}}}function Eo(e,t,i){let{onMessage:l}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const b=document.querySelector("video"),d=f.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${d[0].label}`),window.stream=f,b.srcObject=f}function _(f){if(f.name==="ConstraintNotSatisfiedError"){const b=s.video;l(`The resolution ${b.width.exact}x${b.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&l("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");l(`getUserMedia error: ${f.name}`,f)}return pi(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){_(f)}}),vs(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&i(0,l=f.onMessage)},[l]}class So extends Gt{constructor(t){super(),Vt(this,t,Eo,Lo,yt,{onMessage:0})}}function Co(e){let t,i,l,s,r,_;return{c(){t=o("div"),i=o("button"),i.textContent="Show",l=c(),s=o("button"),s.textContent="Hide",a(i,"class","btn"),a(i,"id","show"),a(i,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(f,b){v(f,t,b),n(t,i),n(t,l),n(t,s),r||(_=[L(i,"click",e[0]),L(s,"click",e[1])],r=!0)},p:$,i:$,o:$,d(f){f&&m(t),r=!1,He(_)}}}function Po(e,t,i){let{onMessage:l}=t;function s(){r().then(()=>{setTimeout(()=>{Ps().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function r(){return Ts().then(()=>l("Hide app")).catch(l)}return e.$$set=_=>{"onMessage"in _&&i(2,l=_.onMessage)},[s,r,l]}class To extends Gt{constructor(t){super(),Vt(this,t,Po,Co,yt,{onMessage:2})}}function ds(e,t,i){const l=e.slice();return l[25]=t[i],l}function fs(e,t,i){const l=e.slice();return l[28]=t[i],l}function Mo(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(i,l){v(i,t,l)},d(i){i&&m(t)}}}function Ao(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(i,l){v(i,t,l)},d(i){i&&m(t)}}}function Io(e){let t,i;return{c(){t=p(`Switch to Dark mode + `),i=o("div"),a(i,"class","i-ph-moon")},m(l,s){v(l,t,s),v(l,i,s)},d(l){l&&(m(t),m(i))}}}function Oo(e){let t,i;return{c(){t=p(`Switch to Light mode + `),i=o("div"),a(i,"class","i-ph-sun")},m(l,s){v(l,t,s),v(l,i,s)},d(l){l&&(m(t),m(i))}}}function Wo(e){let t,i,l,s,r,_,f;function b(){return e[14](e[28])}return{c(){t=o("a"),i=o("div"),l=c(),s=o("p"),s.textContent=`${e[28].label}`,a(i,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){v(d,t,I),n(t,i),n(t,l),n(t,s),_||(f=L(t,"click",b),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,f()}}}function hs(e){let t,i=e[28]&&Wo(e);return{c(){i&&i.c(),t=Qi()},m(l,s){i&&i.m(l,s),v(l,t,s)},p(l,s){l[28]&&i.p(l,s)},d(l){l&&m(t),i&&i.d(l)}}}function ps(e){let t,i=e[25].html+"",l;return{c(){t=new Vs(!1),l=Qi(),t.a=l},m(s,r){t.m(i,s,r),v(s,l,r)},p(s,r){r&16&&i!==(i=s[25].html+"")&&t.p(i)},d(s){s&&(m(l),t.d())}}}function No(e){let t,i,l,s,r,_,f,b,d,I,k,G,E,C,O,N,oe,D,R,B,V,P,F,Z,W,ee,ae,y,U,q,X,ye,le=e[1].label+"",ce,_e,de,re,Y,ue,H,x,K,w,J,S,se,ke,ze,fe,Se,Le;function Me(z,Q){return z[0]?Ao:Mo}let he=Me(e),me=he(e);function Fe(z,Q){return z[2]?Oo:Io}let je=Fe(e),pe=je(e),Ce=Te(e[5]),te=[];for(let z=0;z`,oe=c(),D=o("a"),D.innerHTML=`GitHub + `,R=c(),B=o("a"),B.innerHTML=`Source + `,V=c(),P=o("br"),F=c(),Z=o("div"),W=c(),ee=o("br"),ae=c(),y=o("div");for(let z=0;z',ke=c(),ze=o("div");for(let z=0;z{Ji(T,1)}),Qs()}Ee?(Y=Jl(Ee,ge(z)),xl(Y.$$.fragment),Yi(Y.$$.fragment,1),Ki(Y,re,null)):Y=null}if(Q&16){we=Te(z[4]);let T;for(T=0;T{y.ctrlKey&&y.key==="b"&&g("toggle_menu")});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),_=[{label:"Welcome",component:uo,icon:"i-ph-hand-waving"},{label:"Communication",component:po,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:To,icon:"i-codicon-hubot"},{label:"Window",component:zo,icon:"i-codicon-window"},{label:"WebRTC",component:So,icon:"i-ph-broadcast"}];let f=_[0];function b(y){i(1,f=y)}let d;pi(()=>{i(2,d=localStorage&&localStorage.getItem("theme")=="dark"),gs(d)});function I(){i(2,d=!d),gs(d)}let k=$s([]);Fs(e,k,y=>i(4,l=y));function G(y){k.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...U])}function E(y){k.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...U])}function C(){k.update(()=>[])}let O,N,oe;function D(y){oe=y.clientY;const U=window.getComputedStyle(O);N=parseInt(U.height,10);const q=ye=>{const le=ye.clientY-oe,ce=N-le;i(3,O.style.height=`${ce{document.removeEventListener("mouseup",X),document.removeEventListener("mousemove",q)};document.addEventListener("mouseup",X),document.addEventListener("mousemove",q)}let R=!1,B,V,P=!1,F=0,Z=0;const W=(y,U,q)=>Math.min(Math.max(U,y),q);pi(()=>{i(13,B=document.querySelector("#sidebar")),V=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{V.contains(y.target)?i(0,R=!R):R&&!B.contains(y.target)&&i(0,R=!1)}),document.addEventListener("touchstart",y=>{if(V.contains(y.target))return;const U=y.touches[0].clientX;(0{if(P){const U=y.touches[0].clientX;Z=U;const q=(U-F)/10;B.style.setProperty("--translate-x",`-${W(0,R?0-q:18.75-q,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(Z-F)/10;i(0,R=R?y>-(18.75/2):y>18.75/2)}P=!1})});const ee=y=>{b(y),i(0,R=!1)};function ae(y){Gi[y?"unshift":"push"](()=>{O=y,i(3,O)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&Ro(y,R)}},[R,f,d,O,l,_,b,I,k,G,E,C,D,B,ee,ae]}class Ho extends Gt{constructor(t){super(),Vt(this,t,Do,No,yt,{})}}new Ho({target:document.querySelector("#app")}); diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 50431a594f12..e5e14bc64119 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -7,6 +7,8 @@ import Communication from './views/Communication.svelte' import Window from './views/Window.svelte' import WebRTC from './views/WebRTC.svelte' + import App from './views/App.svelte' + document.addEventListener('keydown', (event) => { if (event.ctrlKey && event.key === 'b') { @@ -14,6 +16,9 @@ } }) + const userAgent = navigator.userAgent.toLowerCase() + const isMobile = userAgent.includes('android') || userAgent.includes('iphone') + const views = [ { label: 'Welcome', @@ -25,6 +30,11 @@ component: Communication, icon: 'i-codicon-radio-tower' }, + !isMobile && { + label: 'App', + component: App, + icon: 'i-codicon-hubot' + }, { label: 'Window', component: Window, diff --git a/examples/api/src/views/App.svelte b/examples/api/src/views/App.svelte new file mode 100644 index 000000000000..760590f0c584 --- /dev/null +++ b/examples/api/src/views/App.svelte @@ -0,0 +1,33 @@ + + +
+ + +
diff --git a/examples/api/src/views/Welcome.svelte b/examples/api/src/views/Welcome.svelte index b19718072ee9..8e8c205226c8 100644 --- a/examples/api/src/views/Welcome.svelte +++ b/examples/api/src/views/Welcome.svelte @@ -1,5 +1,20 @@