2 lines
42 KiB
JavaScript
2 lines
42 KiB
JavaScript
|
import{C as he,c as Se,D as u0,F as Ke,G as te,I as Me,J as re,b as Te,d as ve,i as f0,K as v0,L as p0,N as m0,_ as Fe,O as g0,U as je,a as h0,P as C0,Q as y0,R as b0,S as Pe,V as x0,W as w0,e as k0,X as _0,t as pe,j as L0,v as E0,Y as S0,E as Ae,Z as M0,$ as B0,a0 as T0,a1 as R0,a2 as N0,a3 as I0,a4 as D0}from"./cross-icon.7mmbvARz.js";import{$ as Y0,o as Ce,a0 as Qe,e as O0,P as le,I as Re,a1 as U0,S as Be,a2 as V0,a3 as _e,d as ne,z as K,E as $,g as oe,G as O,c as J,t as x,v as _,x as i,K as H,H as l,y as V,A as G,J as me,a4 as H0,L as F,Z as Xe,a5 as $e,r as w,U as ye,a6 as G0,a7 as K0,a8 as P0,F as We,Q as be,M as $0,a9 as q0,aa as Je,ab as e0,ac as z0,ad as Z0,ae as F0,af as j0,ag as t0,ah as o0,ai as Q0,X as s0,N as j,B as se,aj as X0,C as Ne,D as Ie,u as W0,ak as J0,O as ge,T as ie,W as e2,R as t2,V as o2}from"./entry.o1ejw0kI.js";import{_ as De}from"./_plugin-vue_export-helper.x3n3nnut.js";let ce;const s2=e=>{var t;if(!he)return 0;if(ce!==void 0)return ce;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const s=o.offsetWidth;o.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%",o.appendChild(n);const a=n.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),ce=s-a,ce},l2=(...e)=>t=>{e.forEach(o=>{Y0(o)?o(t):o.value=t})};var ue=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(ue||{});const n2=(e,t,o,s)=>{let n={offsetX:0,offsetY:0};const a=v=>{const g=v.clientX,C=v.clientY,{offsetX:y,offsetY:f}=n,d=e.value.getBoundingClientRect(),p=d.left,L=d.top,N=d.width,S=d.height,B=document.documentElement.clientWidth,I=document.documentElement.clientHeight,E=-p+y,Y=-L+f,U=B-p-N+y,b=I-L-S+f,k=u=>{let M=y+u.clientX-g,R=f+u.clientY-C;s!=null&&s.value||(M=Math.min(Math.max(M,E),U),R=Math.min(Math.max(R,Y),b)),n={offsetX:M,offsetY:R},e.value&&(e.value.style.transform=`translate(${Se(M)}, ${Se(R)})`)},T=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",T)},c=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",a)},r=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",a)};Ce(()=>{Qe(()=>{o.value?c():r()})}),O0(()=>{r()})},a2=(e,t={})=>{le(e)||u0("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||Re("popup"),s=U0(()=>o.bm("parent","hidden"));if(!he||Ke(document.body,s.value))return;let n=0,a=!1,c="0";const r=()=>{setTimeout(()=>{re(document==null?void 0:document.body,s.value),a&&document&&(document.body.style.width=c)},200)};Be(e,v=>{if(!v){r();return}a=!Ke(document.body,s.value),a&&(c=document.body.style.width),n=s2(o.namespace.value);const g=document.documentElement.clientHeight<document.body.scrollHeight,C=te(document.body,"overflowY");n>0&&(g||C==="scroll")&&a&&(document.body.style.width=`calc(100% - ${n}px)`),Me(document.body,s.value)}),V0(()=>r())},l0=e=>{if(!e)return{onClick:_e,onMousedown:_e,onMouseup:_e};let t=!1,o=!1;return{onClick:c=>{t&&o&&e(c),t=o=!1},onMousedown:c=>{t=c.target===c.currentTarget},onMouseup:c=>{o=c.target===c.currentTarget}}},A2=Te({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:ve([String,Array,Object])},zIndex:{type:ve([String,Number])}}),i2={click:e=>e instanceof MouseEvent},r2="overlay";var c2=ne({name:"ElOverlay",props:A2,emits:i2,setup(e,{slots:t,emit:o}){const s=Re(r2),n=v=>{o("click",v)},{onClick:a,onMousedown:c,onMouseup:r}=l0(e.customMaskEvent?void 0:n);return()=>e.mask?K("div",{class:[s.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMou
|