detect/detect.gui/Embedded/dist/assets/index-9fd61467.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2024-11-19 14:27:12 +08:00
var me=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var ee=(e,o,l)=>o in e?me(e,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[o]=l,H=(e,o)=>{for(var l in o||(o={}))Ce.call(o,l)&&ee(e,l,o[l]);if(x)for(var l of x(o))Me.call(o,l)&&ee(e,l,o[l]);return e},_=(e,o)=>he(e,ye(o));var A=(e,o,l)=>new Promise((i,a)=>{var c=u=>{try{n(l.next(u))}catch(d){a(d)}},t=u=>{try{n(l.throw(u))}catch(d){a(d)}},n=u=>u.done?i(u.value):Promise.resolve(u.value).then(c,t);n((l=l.apply(e,o)).next())});import{t as se,D as be,d as He,aQ as Se,K as ke,J as Fe,a3 as $e,aR as ve,_ as j,u as re,az as Be,f as ie,aO as Oe,h as Pe,aD as ce,ao as Te,w as we}from"./index.js";import{h as q,u as r,d as D,I as De,k as S,i as Re,f as m,c as k,w as ue,o as Ne,b as de,y as B,a6 as y,n as We,Z as M,a4 as P,a5 as g,m as _e,_ as V,ab as O,ad as Ee,F as je,a8 as Y,a1 as Le,G as J,a0 as U,a9 as E,g as G,z as Ie,aa as te,a7 as ne,ag as oe,ah as ae,r as pe,J as z}from"./vue-72a104e4.js";import{M as Ae,T as ze,Z as Ve,$ as qe,ah as Xe,o as X,b as Ye}from"./antd-14caba9e.js";import{u as Je}from"./useWindowSizeFn-46f0db92.js";const{t:le}=se(),Ue={open:{type:Boolean},scrollTop:{type:Boolean,default:!0},height:{type:Number},minHeight:{type:Number},draggable:{type:Boolean,default:!0},centered:{type:Boolean},cancelText:{type:String,default:le("common.cancelText")},okText:{type:String,default:le("common.okText")},closeFunc:Function},K=Object.assign({},Ue,{defaultFullscreen:{type:Boolean},canFullscreen:{type:Boolean,default:!0},wrapperFooterOffset:{type:Number,default:0},helpMessage:[String,Array],useWrapper:{type:Boolean,default:!0},loading:{type:Boolean},loadingTip:{type:String},showCancelBtn:{type:Boolean,default:!0},showOkBtn:{type:Boolean,default:!0},wrapperProps:Object,afterClose:Function,bodyStyle:Object,closable:{type:Boolean,default:!0},closeIcon:Object,confirmLoading:{type:Boolean},destroyOnClose:{type:Boolean},footer:Object,getContainer:Function,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},maskStyle:Object,okType:{type:String,default:"primary"},okButtonProps:Object,cancelButtonProps:Object,title:{type:String},open:{type:Boolean},width:[String,Number],wrapClassName:{type:String},zIndex:{type:Number}});function Ze(e){const o=(a,c)=>getComputedStyle(a)[c],l=a=>{if(!a)return;a.setAttribute("data-drag",r(e.draggable));const c=a.querySelector(".ant-modal-header"),t=a.querySelector(".ant-modal");!c||!t||!r(e.draggable)||(c.style.cursor="move",c.onmousedown=n=>{if(!n)return;const u=n.clientX,d=n.clientY,p=document.body.clientWidth,f=document.documentElement.clientHeight,h=t.offsetWidth,b=t.offsetHeight,F=t.offsetLeft,$=p-t.offsetLeft-h,v=t.offsetTop,L=f-t.offsetTop-b,T=o(t,"left"),R=o(t,"top");let N=+T,W=+R;T.includes("%")?(N=+document.body.clientWidth*(+T.replace(/%/g,"")/100),W=+document.body.clientHeight*(+R.replace(/%/g,"")/100)):(N=+T.replace(/px/g,""),W=+R.replace(/px/g,"")),document.onmousemove=function(I){let s=I.clientX-u,C=I.clientY-d;-s>F?s=-F:s>$&&(s=$),-C>v?C=-v:C>L&&(C=L),t.style.cssText+=`;left:${s+N}px;top:${C+W}px;`},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}})},i=()=>{const a=document.querySelectorAll(".ant-modal-wrap");for(const c of Array.from(a)){if(!c)continue;const t=o(c,"display"),n=c.getAttribute("data-drag");t!=="none"&&(n===null||r(e.destroyOnClose))&&l(c)}};q(()=>{!r(e.open)||!r(e.draggable)||be(()=>{i()},30)})}function Ge(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Re(e)}const Ke=D({name:"Modal",inheritAttrs:!1,props:K,emits:["cancel"],setup(e,{slots:o,emit:l}){const{open:i,draggable:a,destroyOnClose:c}=De(e),t=He();Ze({open:i,destroyOnClose:c,draggable:a});const n=u=>{l("cancel",u)};return()=>{let u;const d=_(H(H({},r(t)),e),{onCancel:n});return S(Ae,d,Ge(u=Se(o))?u:{default:()=>[u]})}}}),fe=Symbol();function Qe(e){return Fe(e,fe)}function St(){retu