montana/Russian/Site/messenger/dist/748.48eece6321d4e8e0ac31.js
2026-05-18 18:05:32 +03:00

2 lines
15 KiB
JavaScript

"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[748,8925],{8925(e,i,n){n.r(i),n.d(i,{TauriEvent:()=>t,emit:()=>o,emitTo:()=>u,listen:()=>s,once:()=>r});var t,l=n(55962);async function a(e,i){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,i),await(0,l.invoke)("plugin:event|unlisten",{event:e,eventId:i})}async function s(e,i,n){var t;const s="string"==typeof(null==n?void 0:n.target)?{kind:"AnyLabel",label:n.target}:null!==(t=null==n?void 0:n.target)&&void 0!==t?t:{kind:"Any"};return(0,l.invoke)("plugin:event|listen",{event:e,target:s,handler:(0,l.transformCallback)(i)}).then(i=>async()=>a(e,i))}async function r(e,i,n){return s(e,n=>{a(e,n.id),i(n)},n)}async function o(e,i){await(0,l.invoke)("plugin:event|emit",{event:e,payload:i})}async function u(e,i,n){const t="string"==typeof e?{kind:"AnyLabel",label:e}:e;await(0,l.invoke)("plugin:event|emit_to",{target:t,event:i,payload:n})}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",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_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={}))},60748(e,i,n){n.d(i,{getCurrentWindow:()=>v});var t=n(55962);class l{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new a(this.width*e,this.height*e)}[t.SERIALIZE_TO_IPC_FN](){return{width:this.width,height:this.height}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}class a{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new l(this.width/e,this.height/e)}[t.SERIALIZE_TO_IPC_FN](){return{width:this.width,height:this.height}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}class s{constructor(e){this.size=e}toLogical(e){return this.size instanceof l?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof a?this.size:this.size.toPhysical(e)}[t.SERIALIZE_TO_IPC_FN](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}class r{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new o(this.x*e,this.y*e)}[t.SERIALIZE_TO_IPC_FN](){return{x:this.x,y:this.y}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}class o{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new r(this.x/e,this.y/e)}[t.SERIALIZE_TO_IPC_FN](){return{x:this.x,y:this.y}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}class u{constructor(e){this.position=e}toLogical(e){return this.position instanceof r?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof o?this.position:this.position.toPhysical(e)}[t.SERIALIZE_TO_IPC_FN](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[t.SERIALIZE_TO_IPC_FN]()}}var c,h,d=n(8925);class w extends t.Resource{constructor(e){super(e)}static async new(e,i,n){return(0,t.invoke)("plugin:image|new",{rgba:b(e),width:i,height:n}).then(e=>new w(e))}static async fromBytes(e){return(0,t.invoke)("plugin:image|from_bytes",{bytes:b(e)}).then(e=>new w(e))}static async fromPath(e){return(0,t.invoke)("plugin:image|from_path",{path:e}).then(e=>new w(e))}async rgba(){return(0,t.invoke)("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return(0,t.invoke)("plugin:image|size",{rid:this.rid})}}function b(e){return null==e?null:"string"==typeof e?e:e instanceof w?e.rid:e}!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(c||(c={}));class g{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function v(){return new _(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function y(){return(0,t.invoke)("plugin:window|get_all_windows").then(e=>e.map(e=>new _(e,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(h||(h={}));const p=["tauri://created","tauri://error"];class _{constructor(e,i={}){var n;this.label=e,this.listeners=Object.create(null),(null==i?void 0:i.skip)||(0,t.invoke)("plugin:window|create",{options:{...i,parent:"string"==typeof i.parent?i.parent:null===(n=i.parent)||void 0===n?void 0:n.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var i;return null!==(i=(await y()).find(i=>i.label===e))&&void 0!==i?i:null}static getCurrent(){return v()}static async getAll(){return y()}static async getFocusedWindow(){for(const e of await y())if(await e.isFocused())return e;return null}async listen(e,i){return this._handleTauriEvent(e,i)?()=>{const n=this.listeners[e];n.splice(n.indexOf(i),1)}:(0,d.listen)(e,i,{target:{kind:"Window",label:this.label}})}async once(e,i){return this._handleTauriEvent(e,i)?()=>{const n=this.listeners[e];n.splice(n.indexOf(i),1)}:(0,d.once)(e,i,{target:{kind:"Window",label:this.label}})}async emit(e,i){if(!p.includes(e))return(0,d.emit)(e,i);for(const n of this.listeners[e]||[])n({event:e,id:-1,payload:i})}async emitTo(e,i,n){if(!p.includes(i))return(0,d.emitTo)(e,i,n);for(const e of this.listeners[i]||[])e({event:i,id:-1,payload:n})}_handleTauriEvent(e,i){return!!p.includes(e)&&(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0)}async scaleFactor(){return(0,t.invoke)("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return(0,t.invoke)("plugin:window|inner_position",{label:this.label}).then(e=>new o(e))}async outerPosition(){return(0,t.invoke)("plugin:window|outer_position",{label:this.label}).then(e=>new o(e))}async innerSize(){return(0,t.invoke)("plugin:window|inner_size",{label:this.label}).then(e=>new a(e))}async outerSize(){return(0,t.invoke)("plugin:window|outer_size",{label:this.label}).then(e=>new a(e))}async isFullscreen(){return(0,t.invoke)("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return(0,t.invoke)("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return(0,t.invoke)("plugin:window|is_maximized",{label:this.label})}async isFocused(){return(0,t.invoke)("plugin:window|is_focused",{label:this.label})}async isDecorated(){return(0,t.invoke)("plugin:window|is_decorated",{label:this.label})}async isResizable(){return(0,t.invoke)("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return(0,t.invoke)("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return(0,t.invoke)("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return(0,t.invoke)("plugin:window|is_closable",{label:this.label})}async isVisible(){return(0,t.invoke)("plugin:window|is_visible",{label:this.label})}async title(){return(0,t.invoke)("plugin:window|title",{label:this.label})}async theme(){return(0,t.invoke)("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return(0,t.invoke)("plugin:window|is_always_on_top",{label:this.label})}async center(){return(0,t.invoke)("plugin:window|center",{label:this.label})}async requestUserAttention(e){let i=null;return e&&(i=e===c.Critical?{type:"Critical"}:{type:"Informational"}),(0,t.invoke)("plugin:window|request_user_attention",{label:this.label,value:i})}async setResizable(e){return(0,t.invoke)("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return(0,t.invoke)("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return(0,t.invoke)("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return(0,t.invoke)("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return(0,t.invoke)("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return(0,t.invoke)("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return(0,t.invoke)("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return(0,t.invoke)("plugin:window|maximize",{label:this.label})}async unmaximize(){return(0,t.invoke)("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return(0,t.invoke)("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return(0,t.invoke)("plugin:window|minimize",{label:this.label})}async unminimize(){return(0,t.invoke)("plugin:window|unminimize",{label:this.label})}async show(){return(0,t.invoke)("plugin:window|show",{label:this.label})}async hide(){return(0,t.invoke)("plugin:window|hide",{label:this.label})}async close(){return(0,t.invoke)("plugin:window|close",{label:this.label})}async destroy(){return(0,t.invoke)("plugin:window|destroy",{label:this.label})}async setDecorations(e){return(0,t.invoke)("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return(0,t.invoke)("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return(0,t.invoke)("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return(0,t.invoke)("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return(0,t.invoke)("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return(0,t.invoke)("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return(0,t.invoke)("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return(0,t.invoke)("plugin:window|set_size",{label:this.label,value:e instanceof s?e:new s(e)})}async setMinSize(e){return(0,t.invoke)("plugin:window|set_min_size",{label:this.label,value:e instanceof s?e:e?new s(e):null})}async setMaxSize(e){return(0,t.invoke)("plugin:window|set_max_size",{label:this.label,value:e instanceof s?e:e?new s(e):null})}async setSizeConstraints(e){function i(e){return e?{Logical:e}:null}return(0,t.invoke)("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:i(null==e?void 0:e.minWidth),minHeight:i(null==e?void 0:e.minHeight),maxWidth:i(null==e?void 0:e.maxWidth),maxHeight:i(null==e?void 0:e.maxHeight)}})}async setPosition(e){return(0,t.invoke)("plugin:window|set_position",{label:this.label,value:e instanceof u?e:new u(e)})}async setFullscreen(e){return(0,t.invoke)("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return(0,t.invoke)("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return(0,t.invoke)("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return(0,t.invoke)("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return(0,t.invoke)("plugin:window|set_icon",{label:this.label,value:b(e)})}async setSkipTaskbar(e){return(0,t.invoke)("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return(0,t.invoke)("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return(0,t.invoke)("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return(0,t.invoke)("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return(0,t.invoke)("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return(0,t.invoke)("plugin:window|set_cursor_position",{label:this.label,value:e instanceof u?e:new u(e)})}async setIgnoreCursorEvents(e){return(0,t.invoke)("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return(0,t.invoke)("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return(0,t.invoke)("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return(0,t.invoke)("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return(0,t.invoke)("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return(0,t.invoke)("plugin:window|set_overlay_icon",{label:this.label,value:e?b(e):void 0})}async setProgressBar(e){return(0,t.invoke)("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return(0,t.invoke)("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return(0,t.invoke)("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return(0,t.invoke)("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(d.TauriEvent.WINDOW_RESIZED,i=>{i.payload=new a(i.payload),e(i)})}async onMoved(e){return this.listen(d.TauriEvent.WINDOW_MOVED,i=>{i.payload=new o(i.payload),e(i)})}async onCloseRequested(e){return this.listen(d.TauriEvent.WINDOW_CLOSE_REQUESTED,async i=>{const n=new g(i);await e(n),n.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const i=await this.listen(d.TauriEvent.DRAG_ENTER,i=>{e({...i,payload:{type:"enter",paths:i.payload.paths,position:new o(i.payload.position)}})}),n=await this.listen(d.TauriEvent.DRAG_OVER,i=>{e({...i,payload:{type:"over",position:new o(i.payload.position)}})}),t=await this.listen(d.TauriEvent.DRAG_DROP,i=>{e({...i,payload:{type:"drop",paths:i.payload.paths,position:new o(i.payload.position)}})}),l=await this.listen(d.TauriEvent.DRAG_LEAVE,i=>{e({...i,payload:{type:"leave"}})});return()=>{i(),t(),n(),l()}}async onFocusChanged(e){const i=await this.listen(d.TauriEvent.WINDOW_FOCUS,i=>{e({...i,payload:!0})}),n=await this.listen(d.TauriEvent.WINDOW_BLUR,i=>{e({...i,payload:!1})});return()=>{i(),n()}}async onScaleChanged(e){return this.listen(d.TauriEvent.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(d.TauriEvent.WINDOW_THEME_CHANGED,e)}}var k,m,E,f;!function(e){e.Disabled="disabled",e.Throttle="throttle",e.Suspend="suspend"}(k||(k={})),function(e){e.Default="default",e.FluentOverlay="fluentOverlay"}(m||(m={})),function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(E||(E={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(f||(f={}))}}]);
//# sourceMappingURL=748.48eece6321d4e8e0ac31.js.map