"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6083,9233],{56083:(e,t,i)=>{var n,r,s,a,o;function u(e,t,i,n){if("a"===i&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function l(e,t,i,n,r){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,i):r?r.value=i:t.set(e,i),i}i.r(t),i.d(t,{Channel:()=>_,PluginListener:()=>d,Resource:()=>v,SERIALIZE_TO_IPC_FN:()=>c,addPluginListener:()=>f,checkPermissions:()=>E,convertFileSrc:()=>g,invoke:()=>p,isTauri:()=>N,requestPermissions:()=>w,transformCallback:()=>h}),"function"==typeof SuppressedError&&SuppressedError;let c="__TAURI_TO_IPC_KEY__";function h(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class _{constructor(e){n.set(this,void 0),r.set(this,0),s.set(this,[]),a.set(this,void 0),l(this,n,e||(()=>{}),"f"),this.id=h(e=>{let t=e.index;if("end"in e)return void(t==u(this,r,"f")?this.cleanupCallback():l(this,a,t,"f"));let i=e.message;if(t==u(this,r,"f")){for(u(this,n,"f").call(this,i),l(this,r,u(this,r,"f")+1,"f");u(this,r,"f")in u(this,s,"f");){let e=u(this,s,"f")[u(this,r,"f")];u(this,n,"f").call(this,e),delete u(this,s,"f")[u(this,r,"f")],l(this,r,u(this,r,"f")+1,"f")}u(this,r,"f")===u(this,a,"f")&&this.cleanupCallback()}else u(this,s,"f")[t]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){l(this,n,e,"f")}get onmessage(){return u(this,n,"f")}[(n=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,c)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[c]()}}class d{constructor(e,t,i){this.plugin=e,this.event=t,this.channelId=i}async unregister(){return p(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function f(e,t,i){let n=new _(i);try{return await p(`plugin:${e}|register_listener`,{event:t,handler:n}),new d(e,t,n.id)}catch{return await p(`plugin:${e}|registerListener`,{event:t,handler:n}),new d(e,t,n.id)}}async function E(e){return p(`plugin:${e}|check_permissions`)}async function w(e){return p(`plugin:${e}|request_permissions`)}async function p(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function g(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class v{get rid(){return u(this,o,"f")}constructor(e){o.set(this,void 0),l(this,o,e,"f")}async close(){return p("plugin:resources|close",{rid:this.rid})}}function N(){return!!(globalThis||window).isTauri}o=new WeakMap},71614:(e,t,i)=>{i.r(t),i.d(t,{TauriEvent:()=>r,emit:()=>l,emitTo:()=>c,listen:()=>o,once:()=>u});var n,r,s=i(56083);async function a(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await (0,s.invoke)("plugin:event|unlisten",{event:e,eventId:t})}async function o(e,t,i){var n;let r="string"==typeof(null==i?void 0:i.target)?{kind:"AnyLabel",label:i.target}:null!=(n=null==i?void 0:i.target)?n:{kind:"Any"};return(0,s.invoke)("plugin:event|listen",{event:e,target:r,handler:(0,s.transformCallback)(t)}).then(t=>async()=>a(e,t))}async function u(e,t,i){return o(e,i=>{a(e,i.id),t(i)},i)}async function l(e,t){await (0,s.invoke)("plugin:event|emit",{event:e,payload:t})}async function c(e,t,i){await (0,s.invoke)("plugin:event|emit_to",{target:"string"==typeof e?{kind:"AnyLabel",label:e}:e,event:t,payload:i})}(n=r||(r={})).WINDOW_RESIZED="tauri://resize",n.WINDOW_MOVED="tauri://move",n.WINDOW_CLOSE_REQUESTED="tauri://close-requested",n.WINDOW_DESTROYED="tauri://destroyed",n.WINDOW_FOCUS="tauri://focus",n.WINDOW_BLUR="tauri://blur",n.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",n.WINDOW_THEME_CHANGED="tauri://theme-changed",n.WINDOW_CREATED="tauri://window-created",n.WINDOW_SUSPENDED="tauri://suspended",n.WINDOW_RESUMED="tauri://resumed",n.WEBVIEW_CREATED="tauri://webview-created",n.DRAG_ENTER="tauri://drag-enter",n.DRAG_OVER="tauri://drag-over",n.DRAG_DROP="tauri://drag-drop",n.DRAG_LEAVE="tauri://drag-leave"}}]);