"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828,6083],{56083:(e,t,i)=>{var n,r,s,a,o;function c(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 h(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:()=>f,PluginListener:()=>p,Resource:()=>k,SERIALIZE_TO_IPC_FN:()=>l,addPluginListener:()=>_,checkPermissions:()=>d,convertFileSrc:()=>v,invoke:()=>g,isTauri:()=>m,requestPermissions:()=>w,transformCallback:()=>u}),"function"==typeof SuppressedError&&SuppressedError;let l="__TAURI_TO_IPC_KEY__";function u(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){n.set(this,void 0),r.set(this,0),s.set(this,[]),a.set(this,void 0),h(this,n,e||(()=>{}),"f"),this.id=u(e=>{let t=e.index;if("end"in e)return void(t==c(this,r,"f")?this.cleanupCallback():h(this,a,t,"f"));let i=e.message;if(t==c(this,r,"f")){for(c(this,n,"f").call(this,i),h(this,r,c(this,r,"f")+1,"f");c(this,r,"f")in c(this,s,"f");){let e=c(this,s,"f")[c(this,r,"f")];c(this,n,"f").call(this,e),delete c(this,s,"f")[c(this,r,"f")],h(this,r,c(this,r,"f")+1,"f")}c(this,r,"f")===c(this,a,"f")&&this.cleanupCallback()}else c(this,s,"f")[t]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){h(this,n,e,"f")}get onmessage(){return c(this,n,"f")}[(n=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class p{constructor(e,t,i){this.plugin=e,this.event=t,this.channelId=i}async unregister(){return g(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function _(e,t,i){let n=new f(i);try{return await g(`plugin:${e}|register_listener`,{event:t,handler:n}),new p(e,t,n.id)}catch{return await g(`plugin:${e}|registerListener`,{event:t,handler:n}),new p(e,t,n.id)}}async function d(e){return g(`plugin:${e}|check_permissions`)}async function w(e){return g(`plugin:${e}|request_permissions`)}async function g(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function v(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class k{get rid(){return c(this,o,"f")}constructor(e){o.set(this,void 0),h(this,o,e,"f")}async close(){return g("plugin:resources|close",{rid:this.rid})}}function m(){return!!(globalThis||window).isTauri}o=new WeakMap},92828:(e,t,i)=>{i.r(t),i.d(t,{openPath:()=>s,openUrl:()=>r,revealItemInDir:()=>a});var n=i(56083);async function r(e,t){await (0,n.invoke)("plugin:opener|open_url",{url:e,with:t})}async function s(e,t){await (0,n.invoke)("plugin:opener|open_path",{path:e,with:t})}async function a(e){return(0,n.invoke)("plugin:opener|reveal_item_in_dir",{paths:"string"==typeof e?[e]:e})}}}]);